query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
listlengths 0
30
| negative_scores
listlengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
Get the companies with featured cover images on the VTC page. | public function getFeaturedCovered(): CompanyCollection
{
return $this->featuredCovered;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFeatured(): CompanyCollection\n {\n return $this->featured;\n }",
"public function getfeaturedCities(){\n\t\t $featuredTestimonial = array();\n\t\t $tData = $this->find('all',array('conditions'=>array('CmsCity.is_display'=>1),\n\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('CmsCity.*'),\n\t\t\t\t\t\t\t\t));\n\t\t if(isset($tData) && !empty($tData)){\n\t\t\t\tforeach($tData as $key=>$testiData){\n\t\t\t\t\tif(isset($testiData['CmsCity']['image']))\n\t\t\t\t\t\t$testiData['CmsCity']['image'] = (!empty($testiData['CmsCity']['image'])) ? Router::url('/'.CMS_IMAGE_URL.$testiData['CmsCity']['image'],true) : \"\";\n\t\t\t\t\t$featuredTestimonial[] = $testiData;\n\t\t\t\t}\t\n\t\t\t}\n\t\treturn $featuredTestimonial;\t\n\t}",
"function company_photos()\n\t\t{\n\t\t\t$type = $this->uri->segment(5);\n\t\t\t$data = $this->photo->company_photos();\n\t\t\t$this->directPageDetails(\"gallery_company/list_photo_company\",\"\",$data);\n\t\t}",
"public function getCover()\n {\n return $this->makeEntity(CoverImage::class, 'cover');\n }",
"public function getUnsplashCollectionPhotos(){\n $images = $this->unsplash->unsplashCollectionPhotos();\n return $images;\n }",
"public function getFeaturedImage()\n {\n return $this->images()->orderBy('is_featured', 'desc')->orderBy('position', 'asc')->first();\n }",
"private function getMastheadItems()\n {\n $this->db->select('*', '`bf_item_tags`')\n ->where('`masthead` = 1 AND `masthead_image_path` <> \\'\\'')\n ->order('name', 'asc')\n ->execute();\n \n // Collect Item Tags\n $mastheadCollection = array();\n while($item = $this->db->next())\n {\n $mastheadCollection[] = array(\n 'name' => $item->name,\n 'link' => '/?option=tag&id=' . $item->id,\n 'url' => $item->masthead_image_path\n );\n }\n \n return $mastheadCollection;\n }",
"public function getCover()\n {\n return $this->data['fields']['cover'];\n }",
"public function getCover()\n\t\t{\n\t\t\tif(is_null($this->data))\n\t\t\t\treturn null;\n\t\t\t\n\t\t\tif(!array_key_exists('cover', $this->data))\n\t\t\t\treturn null;\n\t\t\t\n\t\t\treturn $this->data['cover']['large'];\n\t\t}",
"private function get_featured_films() {\r\n $home_page_id = get_option('page_on_front');\r\n $featured = get_field('film_carousel', $home_page_id);\r\n\r\n return $featured;\r\n }",
"public function getCategoriesWithImages() {\n return $this->categoryMapper->fetchCategoriesWithImages();\n }",
"function getFeaturedCourses(){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT id, name, author, image FROM Course ORDER BY popularity LIMIT 3\";\n\n\t\t$result = $conn->query($query);\n\n\t\treturn fetch_all($result);\n\t}",
"public function index()\n {\n return new FeaturedCollection(FeaturedResource::collection((Product::where('featured', '=', 1)->take(15)->get())));\n }",
"public function getImages()\n {\n return $this->hasMany(Image::className(), ['venueId' => 'id']);\n }",
"public function cloud()\n {\n return $this->hasOne(Cloud::class)->select(['cover']);\n }",
"public function getImagenesIndexCategorias(){\n foreach($this->indexContent as $content){\n //echo \"--------------------- Imagenes --------------<br>\";\n $vectorImagenes = array();\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 $resultados = $xpath->query($consulta);\n if ($resultados->length > 0){\n $contador = 0;\n foreach($resultados as $imagenes){\n if ($contador == 0){\n $todasImagenes = $imagenes->getElementsByTagName(\"img\");\n if ($todasImagenes->length > 0){\n foreach($todasImagenes as $imagen){\n $urlImagen = $imagen->getAttribute(\"src\");\n //echo \"url imagen categorias padre: \".$urlImagen.\"<br>\";\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n //echo \"--------------------- Fin Imagenes --------------<br>\";\n }\n return $vectorImagenes;\n }",
"public function get_featured_cca_list() \n {\n $this->db->from('cca');\n $this->db->where('featured','1');\n $query = $this->db->get();\n return $query->result();\n }",
"public function imagenes() {\n return $imagenes = ImagenesProducto::where('fk_producto',$this->codigo) -> orderBy('featured','desc') -> get(); //para mostrar las imagenes ordenadas por las destacada\n }",
"public function getMarketingImages()\n {\n return $this->marketing_images;\n }",
"function ve_get_360_photo_section() {\n\tif (is_singular('companies')) {\n\t\tif (have_rows('company_threesixty_photos_repeater')){\n\t\t\t?>\n\t\t\t<div class=\"full-width threesixty-photos-section black-bg\">\n\t\t\t\t<?php ve_get_360_photos(); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t} elseif (is_singular('group_of_companies')) {\n\t\tif (have_rows('group_of_companies_threesixty_photos_repeater')) {\n\t\t\t?>\n\t\t\t<div class=\"full-width threesixty-photos-section black-bg\">\n\t\t\t\t<?php ve_get_360_photos(); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n}",
"function wgom_get_featured_overlay() {\n\t$tag_images = array(\n\t\t'Guest DJ' => '<img class=\"overlay\" width=\"249\" height=\"71\" src=\"/wp-content/uploads/2013/12/guest-dj.jpg\" />',\n\t\t'Theme Week' => '<img class=\"overlay\" src=\"/wp-content/uploads/2014/06/TmWk.png\" />',\n\t\t'e-6 bait' => '<img class=\"overlay\" src=\"/wp-content/uploads/2014/01/e-6-bait.jpg\" />',\n\t\t'facebook watch game' => '<img class=\"overlay\" src=\"/wp-content/uploads/2018/12/fb-watch-game.png\" />',\n\t\t'new music' => '<img class=\"overlay\" src=\"/wp-content/uploads/2018/07/NewMusic.png\" />',\n\t\t'RIP' => '<img class=\"overlay\" src=\"/wp-content/uploads/2015/06/candle.png\" />',\n\t\t'SXSW 2014' => '<img class=\"overlay\" src=\"/wp-content/uploads/2014/03/SXSW.png\" />',\n\t\t'SXSW 2015' => '<img class=\"overlay\" src=\"/wp-content/uploads/2015/04/SXSW-2015.png\" />',\n\t\t'MLB.TV Free Game Of The Day' => '<img class=\"overlay\" src=\"/wp-content/uploads/2018/07/MLBFGotD.png\" />',\n\t\t'NSFW' => '<img class=\"overlay-left\" src=\"/wp-content/uploads/2015/08/NSFW.jpg\" />',\n\t\t'Best of' => '<img class=\"overlay-left\" src=\"/wp-content/uploads/2015/12/best-of-fs8.png\" />',\n\t);\n\n\t$the_tags = get_the_tags();\n\t$tags = array();\n\tif (!empty($the_tags)) {\n\t\tforeach ($the_tags as $t) {\n\t\t\tif (array_key_exists($t->name, $tag_images)) {\n\t\t\t\techo $tag_images[$t->name];\n\t\t\t}\n\t\t}\n\t}\n}",
"public function commercialCoverages()\n {\n return $this->hasMany('App\\SelectedCommercialCoverage');\n }",
"public function getHeadCover()\n {\n return $this->getData('head_cover');\n }",
"public function getPhotos();",
"public function getCover()\n {\n return $this->cover;\n }",
"public function getCover()\n {\n return $this->cover;\n }",
"public function getFeaturedbrand(){\n\t\t \n\t\t $collections = Mage::getModel('brand/brand')->getCollection()\n\t\t\t\t\t\t->addFieldToFilter('is_feature',1);\n\t\t\t\t\n\t\treturn $collections;\n\t }",
"public function getCover()\n {\n return $this->coverLink;\n }",
"protected function fetchImagesInContent(){\n if(isset($this->images)){\n return;\n }\n $texts = array(\n 'text' => $this->Article->text, \n 'full' => $this->Article->fulltext, \n 'intro' => $this->Article->introtext);\n $images = array();\n foreach ($texts as $key => $text) {\n if($text != ''){\n $fetchedImages = $this->extractImageFromHTML($text, $key);\n if($fetchedImages){\n $images = array_merge($images, $fetchedImages);\n }\n }\n }\n if(!empty($images)){\n $this->images = $images;\n }\n }",
"function getCover () {\n\n}"
]
| [
"0.6695556",
"0.6511657",
"0.5851061",
"0.584675",
"0.58007216",
"0.5646993",
"0.5573313",
"0.54981416",
"0.5433945",
"0.5427657",
"0.5417266",
"0.53894633",
"0.5386941",
"0.5381477",
"0.53778076",
"0.5364768",
"0.5359612",
"0.53527004",
"0.5304717",
"0.527311",
"0.5241324",
"0.523159",
"0.5211516",
"0.520956",
"0.51923186",
"0.51923186",
"0.5173263",
"0.51391786",
"0.5117696",
"0.510803"
]
| 0.7157424 | 0 |
Adds as addItemResponseContainer One AddItemResponseContainer container is returned for each listing that was created with the AddItems call. Each container includes the ItemID of each newly created listings, the eBay category each item is listed under, the sellerdefined SKUs of the items (if any), the listing recommendations for each item (if applicable), the start and end time of each listing, and the estimated fees that each listing will incur. | public function addToAddItemResponseContainer(\Nogrod\eBaySDK\Trading\AddItemResponseContainerType $addItemResponseContainer)
{
$this->addItemResponseContainer[] = $addItemResponseContainer;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAddItemResponseContainer(array $addItemResponseContainer)\n {\n $this->addItemResponseContainer = $addItemResponseContainer;\n return $this;\n }",
"public function getAddItemResponseContainer()\n {\n return $this->addItemResponseContainer;\n }",
"public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->item('authToken');\n\n\n // Begin creating the auction item.\n $item = new Types\\ItemType();\n\n $item->DispatchTimeMax = 3;\n /**\n * We want a single quantity auction.\n * Otherwise known as a Chinese auction.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_CHINESE;\n $item->Quantity = 1;\n\n $item->ProductListingDetails = new Types\\ProductListingDetailsType();\n $item->ProductListingDetails->ISBN = $ISBN;\n $item->ProductListingDetails->UPC = $UPC;\n $item->ProductListingDetails->EAN = $EAN;\n\n $item->ProductListingDetails->BrandMPN = new DTS\\eBaySDK\\Trading\\Types\\BrandMPNType();\n $item->ProductListingDetails->BrandMPN->Brand = '';\n $item->ProductListingDetails->BrandMPN->MPN = '';\n\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_DAYS_7;\n\n }",
"protected function addItems()\n {\n $origin = 'stock';\n $code = 'cataloginventory';\n $message = Data::ERROR_QTY;\n $additionalData = null;\n $mockItems = [];\n\n for ($i = 0; $i < 2; $i++) {\n $mockItems[] = [\n 'origin' => $origin . $i,\n 'code' => $code,\n 'message' => $message . $i,\n 'additionalData' => $additionalData,\n ];\n $this->listStatus->addItem($origin . $i, $code, $message . $i, $additionalData);\n }\n return $mockItems;\n }",
"public function Add()\n {\n if (isset($this->properties['ItemId']) && !is_null($this->properties['ItemId'])) {\n \tthrow new Services_Ebay_Exception('This item already has an ItemId and thus cannot be added.');\n }\n $call = Services_Ebay::loadAPICall('AddItem', array($this));\n \n return $call->call($this->session);\n }",
"public static function add($response)\n\t{\n\t\tforeach ($response as $key => $value) {\n\t\t\tself::$response[$key] = $value;\n\t\t}\n\t}",
"public function additem()\r\n {\r\n $shipping = array( 'ShippingServiceOptions' => array(\r\n\r\n 'ShippingService' => 'UPSGround',\r\n 'ShippingServiceCost' => 0.0,\r\n 'ShippingServiceAdditionalCost' => 0.0,\r\n 'ShippingServicePriority' => 1,\r\n 'ExpeditedService' => false,\r\n\r\n\r\n ),\r\n 'ShippingType' => 'Flat',\r\n );\r\n\r\n $returnPolicy = array(\r\n 'ReturnsAcceptedOption' => 'ReturnsAccepted',\r\n 'RefundOption' => 'MoneyBack',\r\n 'ReturnsWithinOption' => 'Days_30',\r\n 'Description ' =>'If you are not satisfied, return the item for refund.',\r\n 'ShippingCostPaidByOption' => 'Buyer',\r\n );\r\n\r\n $item = array(\r\n 'PrimaryCategory' => array('CategoryID' => 111422), // ok\r\n 'Title' => 'Miechu nowy',\r\n 'Description' => 'Testowy opis',\r\n 'StartPrice' => 100, //\r\n 'BuyItNowPrice' => 500,//\r\n 'ReservePrice' => 400,//\r\n 'Country' => 'US',//\r\n 'Currency' => 'USD',//\r\n 'ListingDuration' => 'Days_7',//\r\n 'PictureDetails' => 'dummy',//\r\n 'Site' => 'US',//\r\n 'Location' => 'San Jose',//\r\n 'PaymentMethods' => 'PayPal',//\r\n 'PayPalEmailAddress' => '[email protected]',//\r\n 'ShippingDetails' => $shipping,//\r\n 'DispatchTimeMax' => 3,//\r\n 'ConditionID' => 1000,//\r\n 'ReturnPolicy' => $returnPolicy,//\r\n\r\n );\r\n\r\n $params = array(\r\n 'Version' => 831,\r\n 'Item' => $item\r\n\r\n\r\n\r\n\r\n\r\n );\r\n $method = 'addItem';\r\n\r\n try{\r\n\r\n $resp = debay::sendRequest($method,$params);\r\n\r\n $this->load->model('ebay/debay');\r\n\r\n\r\n }\r\n catch(Exception $e)\r\n {\r\n echo $e->getMessage();\r\n }\r\n }",
"public function addItem($item)\n {\n if ($item instanceof \\Fastbill\\Item\\Item)\n {\n $this['ITEMS'][] = $item;\n }\n else\n {\n $itemObj = new \\Fastbill\\Item\\Item();\n $itemObj->fillFromArray($item);\n $this['ITEMS'];\n }\n\n }",
"public function add_item($zajlib_feed_item){\n\t\t$this->items[] = $zajlib_feed_item; \n\t}",
"public function addItem($item) {\n\t\t$this->result .= '<li>' . $item . '</li>' . PHP_EOL;\n\t}",
"public function addItems(){\n $this->validate($this->request, [\n 'title' => 'required|max:255',\n 'description' => 'string|max:255',\n 'isbn' => 'string',\n 'authorId' => 'required|integer|min:1',\n 'itemTypeId' => 'required|integer|min:1',\n 'categoryId' => 'required|integer|min:1',\n 'numberInStock' => 'required|integer|min:1',\n 'itemCondition' => 'required',\n 'itemStateId' => 'required|integer|min:1',\n ]);\n $items = array(\n 'title' => $this->request->input('title'),\n 'description' => $this->request->input('description'),\n 'isbn' => $this->request->input('isbn'),\n 'authorId' => $this->request->input( 'authorId'),\n 'catId' => $this->request->input('categoryId'),\n 'numOfItems' => $this->request->input('numberInStock'),\n 'itemCondition' => $this->request->input('itemCondition'),\n 'itemStateId' => $this->request->input('itemStateId'),\n 'itemTypeId' => $this->request->input('itemTypeId'),\n );\n\n try{\n $item = new ItemService();\n $result = $item->createNewItem($items);\n\n if ($result) {\n return response()->json([\n 'success' => true,\n 'data' => [\n 'itemId' => $result,\n ],\n 'message' => 'Item Added Successfully',\n ], 201);\n }\n return response()->json([\n 'success' => false,\n 'message' => 'item could not be added'\n ], 400);\n\n }catch(Exception $ex){\n return response()->json([\n 'success' => false,\n 'message' => 'Error Occured Adding Items. Ensure the IDs are Valid'\n ], 400);\n }\n }",
"function appendItemMetadataList(&$item) {\n $mda = array();\n\n // Static metadata\n $mda = $this->getHardCodedMetadataList(true);\n foreach($mda as $md) {\n $md->setValue($item->getHardCodedMetadataValue($md->getLabel()));\n $item->addMetadata($md);\n unset($md);\n }\n \n // Dynamic metadata\n $mdIter = $this->getRealMetadataIterator(true);\n $mdIter->rewind();\n while($mdIter->valid()) {\n $md = $mdIter->current();\n $this->addMetadataValueToItem($item, $md);\n $mdIter->next();\n }\n }",
"public function addDealsToCart( $itemMap ) {\r\n\t\t\t$params = array('session_cookie'=>$itemMap['cart_session'],'dealid'=>$itemMap['dealid']);\r\n\t\t\t$this->db->select('COUNT(*) as count')->from(TABLES::$ORDER_DEALS_CART)->where($params);\r\n\t\t\t$query = $this->db->get();\r\n\t\t\t$result = $query->result_array();\r\n\t\t\tif($result[0]['count'] <=0 ) {\r\n\t\t\t\t$params = array('session_cookie'=>$itemMap['cart_session'],'restid'=>$itemMap['restid'],'dealid'=>$itemMap['dealid']);\r\n\t\t\t\t/* New item */\r\n\t\t\t\t$this->db->insert(TABLES::$ORDER_DEALS_CART,$params);\r\n\t\t\t\t$map['message'] = 'Deal Applied To Cart';\r\n\t\t\t\t$map['status'] = 0;\r\n\t\t\t}else {\r\n// \t\t\t\t$this->updateDealsInCart( $itemMap );\r\n\t\t\t\t$map['message'] = 'Deal Applied To Cart';\r\n\t\t\t\t$map['status'] = 1;\r\n\t\t\t}\r\n\t\t\treturn $map;\r\n\t\t}",
"public function prepare_item_for_response($item, $request)\n {\n return array();\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }"
]
| [
"0.6491763",
"0.5744059",
"0.56799394",
"0.5520069",
"0.54321295",
"0.5125817",
"0.5084614",
"0.50629765",
"0.49899265",
"0.4961322",
"0.4931706",
"0.4908887",
"0.48641074",
"0.48608473",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438",
"0.48409438"
]
| 0.6877524 | 0 |
Gets as addItemResponseContainer One AddItemResponseContainer container is returned for each listing that was created with the AddItems call. Each container includes the ItemID of each newly created listings, the eBay category each item is listed under, the sellerdefined SKUs of the items (if any), the listing recommendations for each item (if applicable), the start and end time of each listing, and the estimated fees that each listing will incur. | public function getAddItemResponseContainer()
{
return $this->addItemResponseContainer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addToAddItemResponseContainer(\\Nogrod\\eBaySDK\\Trading\\AddItemResponseContainerType $addItemResponseContainer)\n {\n $this->addItemResponseContainer[] = $addItemResponseContainer;\n return $this;\n }",
"public function setAddItemResponseContainer(array $addItemResponseContainer)\n {\n $this->addItemResponseContainer = $addItemResponseContainer;\n return $this;\n }",
"protected function addItems()\n {\n $origin = 'stock';\n $code = 'cataloginventory';\n $message = Data::ERROR_QTY;\n $additionalData = null;\n $mockItems = [];\n\n for ($i = 0; $i < 2; $i++) {\n $mockItems[] = [\n 'origin' => $origin . $i,\n 'code' => $code,\n 'message' => $message . $i,\n 'additionalData' => $additionalData,\n ];\n $this->listStatus->addItem($origin . $i, $code, $message . $i, $additionalData);\n }\n return $mockItems;\n }",
"public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->item('authToken');\n\n\n // Begin creating the auction item.\n $item = new Types\\ItemType();\n\n $item->DispatchTimeMax = 3;\n /**\n * We want a single quantity auction.\n * Otherwise known as a Chinese auction.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_CHINESE;\n $item->Quantity = 1;\n\n $item->ProductListingDetails = new Types\\ProductListingDetailsType();\n $item->ProductListingDetails->ISBN = $ISBN;\n $item->ProductListingDetails->UPC = $UPC;\n $item->ProductListingDetails->EAN = $EAN;\n\n $item->ProductListingDetails->BrandMPN = new DTS\\eBaySDK\\Trading\\Types\\BrandMPNType();\n $item->ProductListingDetails->BrandMPN->Brand = '';\n $item->ProductListingDetails->BrandMPN->MPN = '';\n\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_DAYS_7;\n\n }",
"public function Add()\n {\n if (isset($this->properties['ItemId']) && !is_null($this->properties['ItemId'])) {\n \tthrow new Services_Ebay_Exception('This item already has an ItemId and thus cannot be added.');\n }\n $call = Services_Ebay::loadAPICall('AddItem', array($this));\n \n return $call->call($this->session);\n }",
"public static function items() {\r\n $doc = new DOMDocument ('1.0', 'UTF-8');\r\n $items_node = $doc->createElement(\"items\");\r\n $doc->appendChild($items_node);\r\n\r\n return new amvonetroom_XmlResponse($items_node);\r\n }",
"public function prepare_item_for_response($item, $request)\n {\n return array();\n }",
"public function additem()\r\n {\r\n $shipping = array( 'ShippingServiceOptions' => array(\r\n\r\n 'ShippingService' => 'UPSGround',\r\n 'ShippingServiceCost' => 0.0,\r\n 'ShippingServiceAdditionalCost' => 0.0,\r\n 'ShippingServicePriority' => 1,\r\n 'ExpeditedService' => false,\r\n\r\n\r\n ),\r\n 'ShippingType' => 'Flat',\r\n );\r\n\r\n $returnPolicy = array(\r\n 'ReturnsAcceptedOption' => 'ReturnsAccepted',\r\n 'RefundOption' => 'MoneyBack',\r\n 'ReturnsWithinOption' => 'Days_30',\r\n 'Description ' =>'If you are not satisfied, return the item for refund.',\r\n 'ShippingCostPaidByOption' => 'Buyer',\r\n );\r\n\r\n $item = array(\r\n 'PrimaryCategory' => array('CategoryID' => 111422), // ok\r\n 'Title' => 'Miechu nowy',\r\n 'Description' => 'Testowy opis',\r\n 'StartPrice' => 100, //\r\n 'BuyItNowPrice' => 500,//\r\n 'ReservePrice' => 400,//\r\n 'Country' => 'US',//\r\n 'Currency' => 'USD',//\r\n 'ListingDuration' => 'Days_7',//\r\n 'PictureDetails' => 'dummy',//\r\n 'Site' => 'US',//\r\n 'Location' => 'San Jose',//\r\n 'PaymentMethods' => 'PayPal',//\r\n 'PayPalEmailAddress' => '[email protected]',//\r\n 'ShippingDetails' => $shipping,//\r\n 'DispatchTimeMax' => 3,//\r\n 'ConditionID' => 1000,//\r\n 'ReturnPolicy' => $returnPolicy,//\r\n\r\n );\r\n\r\n $params = array(\r\n 'Version' => 831,\r\n 'Item' => $item\r\n\r\n\r\n\r\n\r\n\r\n );\r\n $method = 'addItem';\r\n\r\n try{\r\n\r\n $resp = debay::sendRequest($method,$params);\r\n\r\n $this->load->model('ebay/debay');\r\n\r\n\r\n }\r\n catch(Exception $e)\r\n {\r\n echo $e->getMessage();\r\n }\r\n }",
"public function prepare_item_for_response( $item, $request ) {\n return array();\n }",
"public function addItems(){\n $this->validate($this->request, [\n 'title' => 'required|max:255',\n 'description' => 'string|max:255',\n 'isbn' => 'string',\n 'authorId' => 'required|integer|min:1',\n 'itemTypeId' => 'required|integer|min:1',\n 'categoryId' => 'required|integer|min:1',\n 'numberInStock' => 'required|integer|min:1',\n 'itemCondition' => 'required',\n 'itemStateId' => 'required|integer|min:1',\n ]);\n $items = array(\n 'title' => $this->request->input('title'),\n 'description' => $this->request->input('description'),\n 'isbn' => $this->request->input('isbn'),\n 'authorId' => $this->request->input( 'authorId'),\n 'catId' => $this->request->input('categoryId'),\n 'numOfItems' => $this->request->input('numberInStock'),\n 'itemCondition' => $this->request->input('itemCondition'),\n 'itemStateId' => $this->request->input('itemStateId'),\n 'itemTypeId' => $this->request->input('itemTypeId'),\n );\n\n try{\n $item = new ItemService();\n $result = $item->createNewItem($items);\n\n if ($result) {\n return response()->json([\n 'success' => true,\n 'data' => [\n 'itemId' => $result,\n ],\n 'message' => 'Item Added Successfully',\n ], 201);\n }\n return response()->json([\n 'success' => false,\n 'message' => 'item could not be added'\n ], 400);\n\n }catch(Exception $ex){\n return response()->json([\n 'success' => false,\n 'message' => 'Error Occured Adding Items. Ensure the IDs are Valid'\n ], 400);\n }\n }",
"public function getItems()\n {\n $items = Item::all();\n return response($items, 200);\n }",
"public function addItem(Collection $collection, ItemCreateStruct $itemCreateStruct): Item;",
"function appendItemMetadataList(&$item) {\n $mda = array();\n\n // Static metadata\n $mda = $this->getHardCodedMetadataList(true);\n foreach($mda as $md) {\n $md->setValue($item->getHardCodedMetadataValue($md->getLabel()));\n $item->addMetadata($md);\n unset($md);\n }\n \n // Dynamic metadata\n $mdIter = $this->getRealMetadataIterator(true);\n $mdIter->rewind();\n while($mdIter->valid()) {\n $md = $mdIter->current();\n $this->addMetadataValueToItem($item, $md);\n $mdIter->next();\n }\n }",
"public static function endEbayListing($items)\n\t{\n\t\t$results = array();\n\t\ttry {\n\t\t\t$endListingResultXML = ISC_ADMIN_EBAY_OPERATIONS::endItems($items);\n\t\t\tforeach ($endListingResultXML->EndItemResponseContainer as $item) {\n\t\t\t\t$results[] = new ISC_ADMIN_EBAY_END_ITEM_RESULT($item);\n\t\t\t}\n\t\t\treturn $results;\n\t\t} catch (ISC_EBAY_API_REQUEST_EXCEPTION $e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function rebuildItems() {\n\t\t##\n\t\t##\tRETURNS\n\t\t##\t\tThe last modified timestamp\n\t\t$lastModified = time();\n\t\t$addedIDs = array();\n\t\t$totalPages = $this->getTotalPages();\n\t\tif($totalPages) {\n\t\t\tfor($i=1;$i<=$totalPages;$i++) {\n\t\t\t\t$items = $this->getItems($i);\n\t\t\t\tif($items && count($items)) {\n\t\t\t\t\tforeach($items as $item) {\n\t\t\t\t\t\t$campaign_id = '';\n\t\t\t\t\t\tif(isset($item->offer_url)) {\n\t\t\t\t\t\t\t$parts = parse_url($item->offer_url);\n\t\t\t\t\t\t\t$query = array();\n\t\t\t\t\t\t\tparse_str($parts['query'],$query);\n\t\t\t\t\t\t\t$campaign_id = $query['cId'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'id' => $item->id,\n\t\t\t\t\t\t\t'campaign_id' => $campaign_id,\n\t\t\t\t\t\t\t'artist_id' => $item->artist_id,\n\t\t\t\t\t\t\t'reporting_name' => $item->reporting_name,\n\t\t\t\t\t\t\t'embed_code' => $item->embed_code,\n\t\t\t\t\t\t\t'width' => $item->width,\n\t\t\t\t\t\t\t'height' => $item->height,\n\t\t\t\t\t\t\t'url' => $item->url,\n\t\t\t\t\t\t\t'poster_image' => $item->poster_image,\n\t\t\t\t\t\t\t'poster_image_source' => (isset($item->poster_image_source)) ? $item->poster_image_source : '',\n\t\t\t\t\t\t\t'product_type' => $item->product_type,\n\t\t\t\t\t\t\t'offer_type' => $item->offer_type,\n\t\t\t\t\t\t\t'description' => $item->description,\n\t\t\t\t\t\t\t'currency' => $item->currency,\n\t\t\t\t\t\t\t'price' => $item->price,\n\t\t\t\t\t\t\t'name' => $item->name,\n\t\t\t\t\t\t\t'campaign' => serialize($item->campaign),\n\t\t\t\t\t\t\t'offer_url' => (isset($item->offer_url)) ? $item->offer_url : '',\n\t\t\t\t\t\t\t'mobile_url' => (isset($item->mobile_url)) ? $item->mobile_url : '',\n\t\t\t\t\t\t\t'last_modified' => date('Y-m-d H:i:s',$lastModified)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$format = array('%d','%d','%d','%s','%s','%d','%d','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s');\n\t\n\t\t\t\t\t\t## Get Keys\n\t\t\t\t\t\t$tableFields = implode(',',array_keys($data));\n\t\t\t\t\t\t$tableFormat = implode(',',$format);\n\t\t\t\t\t\t$onDuplicateKeyUpdate = '';\n\t\t\t\t\t\t$keyIndex = 0;\n\t\t\t\t\t\tforeach($data as $key=>$field) {\n\t\t\t\t\t\t\tif($keyIndex>0) { $onDuplicateKeyUpdate .= ', '; }\n\t\t\t\t\t\t\t$onDuplicateKeyUpdate .= $key.'=VALUES('.$key.')';\n\t\t\t\t\t\t\t$keyIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t## Add item\n\t\t\t\t\t\t$sql = <<<EOD\n\t\t\t\t\t\tINSERT INTO {$this->wpdb->prefix}topspin_items ({$tableFields}) VALUES ({$tableFormat})\n\t\t\t\t\t\tON DUPLICATE KEY UPDATE {$onDuplicateKeyUpdate}\nEOD;\n\t\t\t\t\t\t$this->wpdb->query($this->wpdb->prepare($sql,$data));\n\t\n\t\t\t\t\t\t##\tDeletes old item tags\n\t\t\t\t\t\t$sql = 'DELETE FROM '.$this->wpdb->prefix.'topspin_items_tags WHERE item_id = %d';\n\t\t\t\t\t\t$this->wpdb->query($this->wpdb->prepare($sql,array($item->id)));\n\t\t\t\t\t\t##\tAdds new item tag\n\t\t\t\t\t\tif(isset($item->tags) && is_array($item->tags)) {\n\t\t\t\t\t\t\t$tagFormat = array('%d','%s');\n\t\t\t\t\t\t\tforeach($item->tags as $tag) {\n\t\t\t\t\t\t\t\t$tagData = array(\n\t\t\t\t\t\t\t\t\t'item_id' => $item->id,\n\t\t\t\t\t\t\t\t\t'tag_name' => $tag\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->wpdb->insert($this->wpdb->prefix.'topspin_items_tags',$tagData,$tagFormat);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // end if tags exist\n\t\n\t\t\t\t\t\t##\tDeletes old item images\n\t\t\t\t\t\t$sql = 'DELETE FROM '.$this->wpdb->prefix.'topspin_items_images WHERE item_id = %d';\n\t\t\t\t\t\t$this->wpdb->query($this->wpdb->prepare($sql,array($item->id)));\n\t\t\t\t\t\t##\tAdds new item images\n\t\t\t\t\t\tif(isset($item->campaign->product->images) && is_array($item->campaign->product->images)) {\n\t\t\t\t\t\t\t$imageFormat = array('%d','%s','%s','%s','%s');\n\t\t\t\t\t\t\tforeach($item->campaign->product->images as $key=>$image) {\n\t\t\t\t\t\t\t\t$imageData = array(\n\t\t\t\t\t\t\t\t\t'item_id' => $item->id,\n\t\t\t\t\t\t\t\t\t'source_url' => $item->campaign->product->images[$key]->source_url,\n\t\t\t\t\t\t\t\t\t'small_url' => $item->campaign->product->images[$key]->small_url,\n\t\t\t\t\t\t\t\t\t'medium_url' => $item->campaign->product->images[$key]->medium_url,\n\t\t\t\t\t\t\t\t\t'large_url' => $item->campaign->product->images[$key]->large_url\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->wpdb->insert($this->wpdb->prefix.'topspin_items_images',$imageData,$imageFormat);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} //end if images exist\n\t\n\t\t\t\t\t\tarray_push($addedIDs,$item->id);\n\t\t\t\t\t} //end for each item\n\t\t\t\t} //end if items\n\t\t\t} //end for each page\n\n\t\t\t##\tRemoves all items that is not modified/inserted\n\t\t\t$sql = 'DELETE FROM '.$this->wpdb->prefix.'topspin_items WHERE last_modified < %s';\n\t\t\t$this->wpdb->query($this->wpdb->prepare($sql,array(date('Y-m-d H:i:s',$lastModified))));\n\n\t\t\t##\tRemoves all item tags that is not modified/inserted\n\t\t\t$sql = 'DELETE FROM '.$this->wpdb->prefix.'topspin_items_tags WHERE item_id NOT IN (SELECT id FROM '.$this->wpdb->prefix.'topspin_items)';\n\t\t\t$this->wpdb->query($this->wpdb->prepare($sql));\n\n\t\t\t##\tRemoves all item images that is not modified/inserted\n\t\t\t$sql = 'DELETE FROM '.$this->wpdb->prefix.'topspin_items_images WHERE item_id NOT IN (SELECT id FROM '.$this->wpdb->prefix.'topspin_items)';\n\t\t\t$this->wpdb->query($this->wpdb->prepare($sql));\n\t\t\treturn $lastModified;\n\t\t}\n\t}",
"public static function get_items_returns() {\n return new external_single_structure(\n array(\n 'items' => new external_multiple_structure(\n feedback_item_exporter::get_read_structure()\n ),\n 'warnings' => new external_warnings(),\n )\n );\n }",
"public function get_all_items_by_api()\n {\n\n $data = array('token' =>'ayaolwan');//'type' => 'fees_category');\n $data_string = json_encode($data);\n $curl = curl_init(base_url() . 'webServices/Itemapi');\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n $result = json_decode(curl_exec($curl), true);\n curl_close($curl);\n\n if ($result['status'])\n {\n echo json_encode($result['itemsList']);\n }\n\n\n }",
"public function add($item)\n {\n $newCollection[] = $this->items;\n $newCollection[] = $item;\n $this->items = $newCollection;\n return $newCollection;\n }",
"public static function displayItemList($showSettings){\n\t\t\tif($showSettings && !User::isAdmin()){\n\t\t\t\t$showSettings = false;\n\t\t\t}\n\n\t\t\t$time_start = microtime(true);\n\n\t\t\t$itemCategories = LendingItem::getAllItems();\n\n\t\t\tforeach ($itemCategories as $categoryID => $category_items) {\n\t\t\t\t// For each category\n\t\t\t\t?>\n\t\t\t\t<div class=\"categoryContainer\">\n\t\t\t\t\t<h2 class=\"rubrikBooking\">\n\t\t\t\t\t\t<img class=\"categoryExpandImg\" src=\"../images/expand.gif\" />\n\t\t\t\t\t\t<img class=\"categoryContractImg\" src=\"../images/contract.gif\" />\n\t\t\t\t\t\t<?php echo(Language::itemCategory($categoryID)); ?>\n\t\t\t\t\t</h2>\n\t\t\t\t\t<div class=\"categoryItemHolder\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ($category_items as $item) {\n\t\t\t\t\t\t// For each item\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class='bookingFormItem'>\n\t\t\t\t\t\t\t<input type='hidden' class='bookingItemID' name='item' value='<?php echo($item['id']); ?>' />\n\t\t\t\t\t\t\t<input type='hidden' class='maxLendingPeriods' name='item' value='<?php echo($item['max_lending_periods']); ?>' />\n\n\t\t\t\t\t\t\t<p class=\"itemImage\">\n\t\t\t\t\t\t\t\t<?php if (file_exists(\"img/\".$item['id'].\".jpg\")) { ?>\n\t\t\t\t\t\t\t\t\t<img class=\"itemPic\" src=\"img/<?php echo($item['id']); ?>.jpg\" alt=\"<?php echo($item['name']); ?>\" />\n\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t<img class=\"itemPic\" src=\"img/404img.png\" alt=\"Image not found\" />\n\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<h4 class='itemHeading' id='<?php echo(Language::itemName($item['id'])); ?>'><?php echo(Language::itemName($item['id'])); ?></h4>\n\t\t\t\t\t\t\t<div class='itemContent' >\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t<?php echo(nl2br(Language::itemDescription($item['id']))); ?>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<?php echo((nl2br(nl2br($item['deposit'] ? Language::text(\"booking_deposit\").\": \".$item['deposit'].\" SEK\" : \"\")))); ?>\n\t\t\t\t\t\t\t\t\t<?php echo((nl2br($item['fee'] ? Language::text(\"booking_fee\").\": \".$item['fee'].\" SEK\" : \"\"))); ?><br />\n\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"max_lending_time\")); ?> <?php echo($item['max_lending_periods']); ?><br />\n\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"item_descr_there_is\")); ?> <?php echo($item['num_items']); ?> <?php echo(Language::text(\"item_descr_num\")); ?>\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tif($showSettings){\n\t\t\t\t\t\t\t\t\t//Display item options for admins\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<form action=\"item.php\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t\t\t\t\t\t\t\t\t<fieldset style=\"padding: 0;\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"lending_item_id\" value=\"<?php echo($item['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t<b><?php echo(Language::text(\"edit_item\")); ?>:</b>\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Bildfil\"><?php echo(Language::text(\"picture\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"button_style\" id =\"picture_select_btn\" type=\"file\" name=\"image\" class=\"button_style\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Internt Namn\"><?php echo(Language::text(\"internal_name\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"name\" value=\"<?php echo($item['name']); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Antal\"><?php echo(Language::text(\"amount\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"num_items\" value=\"<?php echo($item['num_items']); ?>\" size=\"3\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Max att låna\"><?php echo(Language::text(\"max_to_lend\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"max_lending_items\" value=\"<?php echo($item['max_lending_items']); ?>\" size=\"3\" /> <?php echo(Language::text(\"max_lend_info\")); ?>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Maxlånetid\"><?php echo(Language::text(\"max_time\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"max_lending_periods\" value=\"<?php echo($item['max_lending_periods']); ?>\" size=\"3\" /> <?php echo(Language::text(\"max_time_info\")); ?>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Deposition\"><?php echo(Language::text(\"deposition\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"deposit\" value=\"<?php echo($item['deposit']); ?>\" size=\"5\" /> kr\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Avgift\"><?php echo(Language::text(\"fee\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"form_style\" type=\"text\" name=\"fee\" value=\"<?php echo($item['fee']); ?>\" size=\"5\" /> kr\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Ta bort bild\"><?php echo(Language::text(\"remove_pic\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"delete_image\" value=\"1\" />\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<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"button_style\" type=\"submit\" name=\"update_lending_item\" value=\"<?php echo(Language::text(\"update\")); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"button_style\" type=\"submit\" name=\"delete_lending_item\" value=\"<?php echo(Language::text(\"remove_item\")); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t<div class=\"togglable\">\n\t\t\t\t\t\t\t\t\t\t<p class=\"toggleButton\"><b><?php echo(Language::text(\"translations\")); ?></b></p>\n\t\t\t\t\t\t\t\t\t\t<div class=\"toggleContent\"><?php\n\n\t\t\t\t\t\t\t\t\t\tforeach (Language::getLanguages() as $language) { ?>\n\t\t\t\t\t\t\t\t\t\t\t<form action=\"item.php\" method=\"post\">\n\t\t\t\t\t\t\t\t\t\t\t\t<fieldset class=\"translateBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php if ($translation = ItemTranslation::getTranslation($item['id'], $language['id'])) { ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"item_translation_id\" value=\"<?php echo($translation['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<legend><?php echo(Language::text(\"edit_language\")); ?> <?php echo($language['name']); ?></legend>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"name\")); ?>: <input type=\"text\" name=\"name\" value=\"<?php echo($translation['name']); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"description\")); ?>:<br />\n\t <textarea name=\"description\" rows=\"3\" cols=\"25\"><?php echo($translation['description']); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmail-text:<br />\n\t <textarea name=\"emailText\" rows=\"3\" cols=\"25\"><?php echo($translation['email_text']); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"update_item_translation\" value=\"<?php echo(Language::text(\"update\")); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"item_id\" value=\"<?php echo($item['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"language_id\" value=\"<?php echo($language['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<legend><?php echo(Language::text(\"add_translation\")); ?> <?php echo($language['name']); ?></legend>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"name\")); ?>: <input type=\"text\" name=\"name\" value=\"\" /><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"description\")); ?>:<br />\n\t <textarea name=\"description\" rows=\"3\" cols=\"25\"></textarea><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmail-text:<br />\n\t <textarea name=\"emailText\" rows=\"3\" cols=\"25\"></textarea><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"create_item_translation\" value=\"<?php echo(Language::text(\"create\")); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Display calendar for booking\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"calendarBooking\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\techo \"<input type='hidden' class='bookingItemID' name='item' value='\".$item['id'].\"' />\\n\";\n\t\t\t\t\t\t\t\t\t\t\techo \"<input type='hidden' class='maxLendingPeriods' name='item' value='\".$item['max_lending_periods'].\"' />\\n\";\n\t\t\t\t\t\t\t\t\t\t?><br />\n\t\t\t <div>\n\t\t\t <a href=\"#\" class=\"firstLoadButton\"><?php echo(nl2br(Language::text(\"booking_choose_period\"))); ?></a>\n\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"calendar\">\n\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\tif ($item['max_lending_items'] != \"0\") {\n\t\t\t\t\t\t\t\t\t\t\t$max_lending_items = $item['max_lending_items'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$max_lending_items = $item['num_items'];\n\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\t<br />\n\t\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"booking_num_items\")); ?>:\n\t\t\t\t\t\t\t\t\t\t<select name=\"num_items\" class=\"numItemsSelector\">\n\t\t\t\t\t\t\t\t\t\t\t<?php for ($num_items = 1; $num_items <= $max_lending_items; $num_items++) { ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo($num_items); ?>\"><?php echo($num_items); ?></option>\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"itemRowSeparator\"></div>\n\t\t\t\t\t<?php\n\t\t\t\t\t}\n\n\t\t\t\t\tif($showSettings){\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<!-- Item box for adding new item -->\n\t\t\t\t\t\t<div class=\"bookingFormItem\" style=\"background-color: #ff6600;\">\n\t\t\t\t\t\t\t<h4 class=\"itemHeading\"><?php echo(Language::text(\"add_item_to\")); ?> <b style=\"color:#0080ff\"><?php echo(Language::itemCategory($categoryID)); ?></b></h4>\n\t\t\t\t\t\t\t<div class=\"itemContent\">\n\t\t\t\t\t\t\t\t<form action=\"item.php\" method=\"post\">\n\t\t\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"lending_item_category_id\" value=\"<?php echo($categoryID); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<legend><?php echo(Language::text(\"edit_item\")); ?>:</legend>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Internt namn \"><?php echo(Language::text(\"internal_name\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"name\" value=\"\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Antal\"><?php echo(Language::text(\"amount\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"num_items\" value=\"1\" /> st\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Max att låna\"><?php echo(Language::text(\"max_to_lend\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"max_lending_items\" value=\"0\" /> <?php echo(Language::text(\"max_lend_info\")); ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Maxlånetid\"><?php echo(Language::text(\"max_time\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"max_lending_periods\" value=\"4\" /> <?php echo(Language::text(\"max_time_info\")); ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Deposition\"><?php echo(Language::text(\"deposition\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"deposit\" value=\"\" /> kr\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"pure-control-group\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"width: 6em;\" for=\"Avgift\"><?php echo(Language::text(\"fee\")); ?></label>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form_style\" name=\"fee\" value=\"\" /> kr\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"create_lending_item\" value=\"<?php echo(Language::text(\"create\")); ?>\" />\n\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"itemRowSeparator\"></div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tif($showSettings){\n\t\t\t\t?>\n\t\t\t\t<!-- Translations of category -->\n\t\t\t\t<div class=\"togglable catTranslation\">\n\t\t\t\t\t<p class=\"toggleButton\"><b><?php echo(Language::text(\"translate_category\")); ?> <b style=\"color:#ff6600\"><?php echo(Language::itemCategory($categoryID)); ?></b></b></p>\n\t\t\t\t\t<div class=\"toggleContent\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach (Language::getLanguages() as $language) { ?>\n\t\t\t\t\t\t<form action=\"item.php\" method=\"post\">\n\t\t\t\t\t\t\t<fieldset class=\"box\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$translation = ItemCategoryTranslation::getTranslation($categoryID, $language['id']);\n\t\t\t\t\t\t\t\tif ($translation) { ?>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"item_category_translation_id\" value=\"<?php echo($translation['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t<legend><?php echo(Language::text(\"edit_language\")); ?> <?php echo($language['name']); ?></legend>\n\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"name\")); ?>: <input type=\"text\" name=\"name\" value=\"<?php echo($translation['name']); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"update_item_category_translation\" value=\"<?php echo(Language::text(\"update\")); ?>\" />\n\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"category_id\" value=\"<?php echo($categoryID); ?>\" />\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"language_id\" value=\"<?php echo($language['id']); ?>\" />\n\t\t\t\t\t\t\t\t\t<legend><?php echo(Language::text(\"add_translation\")); ?> <?php echo($language['name']); ?></legend>\n\t\t\t\t\t\t\t\t\t<?php echo(Language::text(\"name\")); ?>: <input type=\"text\" name=\"name\" value=\"\" /><br />\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"create_item_category_translation\" value=\"<?php echo(Language::text(\"create\")); ?>\" />\n\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<!-- Deletion of category -->\n\t\t\t\t<div class=\"catDeleteBtn\">\n\t\t\t\t\t<form class=\"catDelForm\" action=\"item.php\" method=\"post\">\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"lending_item_category_id\" value=\"<?php echo($categoryID); ?>\" />\n\t\t\t\t\t\t\t<input type=\"submit\" class=\"button_style\" name=\"delete_lending_item_category\" value=\"<?php echo(Language::text(\"remove_category\")); ?>\" />\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<script>\n\t\t\t\t\t$('.catDelForm').submit(function() {\n\t\t\t\t\t return confirm(\"<?php echo(Language::text(\"confirm_cat_del\")); ?>\");\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\t$time_end = microtime(true);\n\t\t\t$time = $time_end - $time_start;\n\t\t}",
"public function get_listings_details($dom){\t\n\t\t\t//push each entry into new array\n\t\t\t$update_item_array = array();\n\t\t\t$update_item_array['itemnumber'] = array();\n\t\t\t$update_item_array['customlabel'] = array();\n\t\t\t$update_item_array['quantity'] = array();\n\t\t\t$update_item_array['quantitysoldandavailable'] = array();\n\t\t\t$update_item_array['sellprice'] = array();\n\t\t\t$update_item_array['starttime'] = array();\n\t\t\t$update_item_array['endtime'] = array();\n\t\t\t$update_item_array['itemtitle'] = array();\n\t\t\t$update_item_array['stockcntrl'] = array();\n\t\t\t$update_item_array['listingtype'] = array();\n\n\n\t\t\t$update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_LISTINGSSHOW_RESPONSE);\n\n\n\n\t\t\tforeach ($update_item_response as $item){\n\t \t\t\t\n\n\t\t\t\t$activelist = $item->getElementsByTagName(DOM_ELEMENT_LISTINGS_ACTIVELIST);\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach ($activelist as $activelistshow){\n\t\t\t\t\t\n\t\t\t\t\t$itemarrays = $activelistshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMARRAY);\n\n\n\t\t\t\t\tforeach($itemarrays as $itemarray){\n\n\t\t\t\t\t\t$inditems = $itemarray->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMSS);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tforeach($inditems as $inditemshow){\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) : \"Listing Type - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['listingtype'], $costers);\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) : \"Item Num - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['itemnumber'], $costers);\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) : \"SKU - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['customlabel'], $costers);\n\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) : \"0\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['quantity'], $costers);\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) : \"0\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['quantitysoldandavailable'], $costers);\n\n\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) : \"price sold - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['sellprice'], $costers);\t\n\n\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) : \"0\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['starttime'], $costers);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) : \"\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['endtime'], $costers);\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) : \"\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['itemtitle'], $costers);\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) : \"FALSE\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['stockcntrl'], $costers);\t\t\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\n\n\t\t\t\t//errors\n\t\t\t\t$error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS);\n\n\t\t\t\tforeach ($error_messages as $errormsg){\n\t\t\t\t\t$error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != \"\" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : \"No Error\";\n\t\t\t\t\tarray_push($update_item_array, $error);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\treturn $update_item_array;\n\n\t\t//DOM_ELEMENT_SHORT_ERROR_MSG\n\t\t}",
"protected function _decodeItems($parameters, $retrieveItems = false) {\n\t\t\t$response = array();\n\n\t\t\tif (!empty($parameters['items'])) {\n\t\t\t\tforeach ($parameters['items'] as $itemListName => $items) {\n\t\t\t\t\t$response[$itemListName] = array(\n\t\t\t\t\t\t'count' => count($items['data']),\n\t\t\t\t\t\t'data' => $items['data'],\n\t\t\t\t\t\t'name' => $itemListName,\n\t\t\t\t\t\t'table' => $items['table']\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!empty($items['data']) &&\n\t\t\t\t\t\t!empty($this->encode[$items['table']])\n\t\t\t\t\t) {\n\t\t\t\t\t\t$itemIndexes = array();\n\t\t\t\t\t\t$itemIndexLines = $items['data'];\n\t\t\t\t\t\t$itemIndex = $itemCount = 0;\n\n\t\t\t\t\t\tforeach ($itemIndexLines as $offsetIndex => $itemIndexLine) {\n\t\t\t\t\t\t\t$itemIndexLineChunks = explode('_', $itemIndexLine);\n\n\t\t\t\t\t\t\tforeach ($itemIndexLineChunks as $itemIndexLineChunk) {\n\t\t\t\t\t\t\t\t$itemStatus = substr($itemIndexLineChunk, 0, 1);\n\t\t\t\t\t\t\t\t$itemStatusCount = substr($itemIndexLineChunk, 1);\n\n\t\t\t\t\t\t\t\tif ($itemStatus) {\n\t\t\t\t\t\t\t\t\tif ($retrieveItems) {\n\t\t\t\t\t\t\t\t\t\tfor ($i = 0; $i < $itemStatusCount; $i++) {\n\t\t\t\t\t\t\t\t\t\t\t$itemIndexes[$itemIndex + $i] = 1;\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$itemCount += $itemStatusCount;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$itemIndex += $itemStatusCount;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$response[$itemListName]['count'] = $itemCount;\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tempty($itemIndexes) ||\n\t\t\t\t\t\t\t!$itemCount\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($retrieveItems) {\n\t\t\t\t\t\t\t$dataTable = !empty($this->encode[$items['table']]['data_table']) ? $this->encode[$items['table']]['data_table'] : $items['table'];\n\t\t\t\t\t\t\t$itemParameters = array_merge($parameters, array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'limit' => $itemIndex,\n\t\t\t\t\t\t\t\t'offset' => 0\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\tif (!empty($this->encode[$items['table']]['sort'])) {\n\t\t\t\t\t\t\t\t$itemParameters['sort'] = $this->encode[$items['table']]['sort'];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$conditions = array(\n\t\t\t\t\t\t\t\t'id' => array()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$itemIds = $this->fetch($dataTable, $itemParameters);\n\t\t\t\t\t\t\t$response[$itemListName] = array_merge($response[$itemListName], array(\n\t\t\t\t\t\t\t\t'parameters' => $itemParameters,\n\t\t\t\t\t\t\t\t'table' => $dataTable\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\tif (!empty($itemIds['data'])) {\n\t\t\t\t\t\t\t\t$conditions['id'] = array_values(array_intersect_key($itemIds['data'], $itemIndexes));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!empty($parameters['data']['instant_replacement']) &&\n\t\t\t\t\t\t\t\t$parameters['action'] == 'replace'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$conditions[]['NOT']['AND'] = array(\n\t\t\t\t\t\t\t\t\t'status' => 'replaced'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$conditions[]['OR'] = array(\n\t\t\t\t\t\t\t\t\t'next_replacement_available' => null,\n\t\t\t\t\t\t\t\t\t'next_replacement_available <' => date('Y-m-d H:i:s', time())\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$response[$itemListName] = array_merge($response[$itemListName], $this->fetch($dataTable, array(\n\t\t\t\t\t\t\t\t'conditions' => $conditions,\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $response;\n\t\t}",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }"
]
| [
"0.5959775",
"0.59046954",
"0.5823438",
"0.57163686",
"0.5458576",
"0.53723586",
"0.5043326",
"0.4992391",
"0.49779144",
"0.48841476",
"0.47663286",
"0.47312123",
"0.47287688",
"0.47039816",
"0.4698875",
"0.46446443",
"0.46417227",
"0.46344358",
"0.46032843",
"0.45956284",
"0.45826307",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476",
"0.45628476"
]
| 0.6049604 | 0 |
Sets a new addItemResponseContainer One AddItemResponseContainer container is returned for each listing that was created with the AddItems call. Each container includes the ItemID of each newly created listings, the eBay category each item is listed under, the sellerdefined SKUs of the items (if any), the listing recommendations for each item (if applicable), the start and end time of each listing, and the estimated fees that each listing will incur. | public function setAddItemResponseContainer(array $addItemResponseContainer)
{
$this->addItemResponseContainer = $addItemResponseContainer;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addToAddItemResponseContainer(\\Nogrod\\eBaySDK\\Trading\\AddItemResponseContainerType $addItemResponseContainer)\n {\n $this->addItemResponseContainer[] = $addItemResponseContainer;\n return $this;\n }",
"public function getAddItemResponseContainer()\n {\n return $this->addItemResponseContainer;\n }",
"public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->item('authToken');\n\n\n // Begin creating the auction item.\n $item = new Types\\ItemType();\n\n $item->DispatchTimeMax = 3;\n /**\n * We want a single quantity auction.\n * Otherwise known as a Chinese auction.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_CHINESE;\n $item->Quantity = 1;\n\n $item->ProductListingDetails = new Types\\ProductListingDetailsType();\n $item->ProductListingDetails->ISBN = $ISBN;\n $item->ProductListingDetails->UPC = $UPC;\n $item->ProductListingDetails->EAN = $EAN;\n\n $item->ProductListingDetails->BrandMPN = new DTS\\eBaySDK\\Trading\\Types\\BrandMPNType();\n $item->ProductListingDetails->BrandMPN->Brand = '';\n $item->ProductListingDetails->BrandMPN->MPN = '';\n\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_DAYS_7;\n\n }",
"public static function add($response)\n\t{\n\t\tforeach ($response as $key => $value) {\n\t\t\tself::$response[$key] = $value;\n\t\t}\n\t}",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"public function prepare_item_for_response($item, $request)\n {\n }",
"protected function addItems()\n {\n $origin = 'stock';\n $code = 'cataloginventory';\n $message = Data::ERROR_QTY;\n $additionalData = null;\n $mockItems = [];\n\n for ($i = 0; $i < 2; $i++) {\n $mockItems[] = [\n 'origin' => $origin . $i,\n 'code' => $code,\n 'message' => $message . $i,\n 'additionalData' => $additionalData,\n ];\n $this->listStatus->addItem($origin . $i, $code, $message . $i, $additionalData);\n }\n return $mockItems;\n }",
"public function addItem($item)\n {\n if ($item instanceof \\Fastbill\\Item\\Item)\n {\n $this['ITEMS'][] = $item;\n }\n else\n {\n $itemObj = new \\Fastbill\\Item\\Item();\n $itemObj->fillFromArray($item);\n $this['ITEMS'];\n }\n\n }",
"public function Add()\n {\n if (isset($this->properties['ItemId']) && !is_null($this->properties['ItemId'])) {\n \tthrow new Services_Ebay_Exception('This item already has an ItemId and thus cannot be added.');\n }\n $call = Services_Ebay::loadAPICall('AddItem', array($this));\n \n return $call->call($this->session);\n }",
"public function add_item($zajlib_feed_item){\n\t\t$this->items[] = $zajlib_feed_item; \n\t}",
"public function add($item)\n {\n if ($item instanceof ItemInterface) {\n $this->items[] = $item;\n } else {\n $this->items[] = new PayPalItem($item);\n }\n }",
"public function prepare_item_for_response($item, $request)\n {\n return array();\n }"
]
| [
"0.7072615",
"0.5942786",
"0.54337716",
"0.5295369",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5191135",
"0.5098202",
"0.50621927",
"0.50571",
"0.500491",
"0.48598257",
"0.4819784"
]
| 0.70213115 | 1 |
Filter the results by part of the boat name. | public function filterByName($name)
{
$name = (string) $name;
if ($name !== '') {
$this->query->andWhere($this->query->expr()->like('b.name', $this->query->createNamedParameter('%' . addcslashes($name, '%_\\') . '%')));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filter($builder, $value)\n {\n return $builder->where('vehicleName', 'LIKE', '%' . $value . '%');\n }",
"public function filtering();",
"public function filterByName($filter) {\n if (strlen($filter) > 0) {\n $this->calcData = array_filter($this->calcData, function($item) use ($filter) {\n if (strpos($item['name'], $filter) !== false) {\n return $item;\n }\n });\n }\n }",
"protected abstract function filter();",
"public function filtering(): string;",
"public function filter();",
"private static function _getFilter() {}",
"function filter($param)\r\n\t{\r\n\r\n\t\t$this->view = false;\r\n\t\t$this->layout_name = false;\r\n\r\n\t\t$_SQL = Singleton::getInstance(SQL_DRIVER);\r\n\r\n\t\t$sql = \"SELECT `\" . $param[1] . \"` FROM `\" . $param[0] . \"` WHERE `\" . $param[1] . \"` LIKE '\" . $_SQL->sql_real_escape_string($_GET['q']) . \"%' \r\n\t\t ORDER BY `\" . $param[1] . \"` LIMIT 0,100\";\r\n\t\t$res = $_SQL->sql_query($sql);\r\n\r\n\t\twhile ( $ob = $_SQL->sql_fetch_object($res) )\r\n\t\t{\r\n\t\t\techo $ob->$param[1] . \"\\n\";\r\n\t\t}\r\n\t}",
"public function getBusinessNameFilter()\n {\n return $this->business_name_filter;\n }",
"public function getFilter(string $name);",
"function filter($request) {\n\t\t//$model = singleton($this->modelClass);\n\t\t$context = $this->dataObject->getDefaultSearchContext();\n\t\t$value = $request->getVar('q');\n\t\t$results = $context->getResults(array(\"Name\"=>$value));\n\t\theader(\"Content-Type: text/plain\");\n\t\tforeach($results as $result) {\n\t\t\techo $result->Name . \"\\n\";\n\t\t}\t\t\n\t}",
"abstract public function filters();",
"public function getBedByName() {\n $term = Request::input('term', '');\n\n $results = array();\n $queries = Bed::where('name', 'LIKE', '%'.$term.'%')\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->representation()];\n return response()->json($results);\n }",
"private function filterCategory()\n {\n if(empty($this->category) || $this->category === static::FILTER_CATEGORY_NONE) {\n return;\n }\n\n if($this->category === static::FILTER_CATEGORY_OTHER) {\n $this->query->andWhere(['LIKE', 'category', 'yii\\\\']);\n return;\n }\n\n $this->query->andWhere(['category' => $this->category]);\n }",
"public function filters() {\n\t\treturn array(\n\t\t 'name' => array(array('trim')),\n\t\t);\n\t}",
"public function filter()\n\t{\n\t\tif (isset($_GET['cty']) AND (int) $_GET['cty'])\n\t\t{\n\t\t\t$db = new Database();\n\n\t\t\t$county_id = (int) $_GET['cty'];\n\t\t\t$sql = \"SELECT AsText(geometry) as geometry\n\t\t\t\t\tFROM \".Kohana::config('database.default.table_prefix').\"county \n\t\t\t\t\tWHERE id = ?\";\n\t\t\t$query = $db->query($sql, $county_id);\n\t\t\t$geometry = FALSE;\n\t\t\tforeach ( $query as $item )\n\t\t\t{\n\t\t\t\t$geometry = $item->geometry;\n\t\t\t}\n\n\t\t\tif ($geometry)\n\t\t\t{\n\t\t\t\t$filter = \" MBRContains(GeomFromText('\".$geometry.\"'), GeomFromText(CONCAT_WS(' ','Point(',l.longitude, l.latitude,')')))\";\n\n\t\t\t\t// Finally add to filters params\n\t\t\t\tarray_push(Event::$data, $filter);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($_GET['cst']) AND (int) $_GET['cst'])\n\t\t{\n\t\t\t$db = new Database();\n\n\t\t\t$constituency_id = (int) $_GET['cst'];\n\t\t\t$sql = \"SELECT AsText(geometry) as geometry\n\t\t\t\t\tFROM \".Kohana::config('database.default.table_prefix').\"constituency \n\t\t\t\t\tWHERE id = ?\";\n\t\t\t$query = $db->query($sql, $constituency_id);\n\t\t\t$geometry = FALSE;\n\t\t\tforeach ( $query as $item )\n\t\t\t{\n\t\t\t\t$geometry = $item->geometry;\n\t\t\t}\n\n\t\t\tif ($geometry)\n\t\t\t{\n\t\t\t\t$filter = \" MBRContains(GeomFromText('\".$geometry.\"'), GeomFromText(CONCAT_WS(' ','Point(',l.longitude, l.latitude,')')))\";\n\n\t\t\t\t// Finally add to filters params\n\t\t\t\tarray_push(Event::$data, $filter);\n\t\t\t}\n\t\t}\n\t}",
"abstract public function getFilterName();",
"public function filterExists(string $name);",
"public function filter ( $name ) {\n\t\t$this->opts['filter'] = $name;\n\t\treturn $this;\n\t}",
"public function search($race)\n {\n //\n return Cat::where('name', 'like', '%'.$race.'%')->get();\n }",
"private function filters() {\n\n\n\t}",
"public function getRemainingBedsByName() {\n $term = Request::input('term', '');\n $ids = Request::input('ids', '');\n $beds_id = ($ids ? array_map('intval', explode(',', $ids)) : []);\n\n $results = array();\n $queries = Bed::where('name', 'LIKE', '%'.$term.'%')\n ->whereNotIn('id', $beds_id)\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->name,\n 'price' => $query->price,\n 'total_persons' => $query->total_persons];\n return response()->json($results);\n }",
"public function testFilterBedrooms()\n {\n $this->visit('/properties')\n ->select('#bedrooms', 1)\n ->press('Update results')\n ->see('Shack in the desert');\n $this->notSee('Five bedroom mill conversion');\n $this->notSee('Victorian townhouse');\n }",
"private function filterTerm()\n {\n if(empty($this->term)) {\n return;\n }\n\n $this->query->andWhere(\n ['or',\n ['LIKE', 'message', $this->term],\n ['LIKE', 'category', $this->term],\n ]\n );\n }",
"abstract protected function filterField(): string;",
"public function bibleFilter($text, $partial, $books, $page) \n {\n $this->instance = new Bible();\n $this->view($this->instance->bibleFilter($text, $partial, $books, $page), 'filter', 'Filtro', $page);\n }",
"public function search($name)\n {\n return Item::where('title', 'like','%' .$name. '%')->orWhere('sku', 'like','%' .$name. '%')->orWhere('ebay_item_id', 'like','%' .$name. '%')->get();\n\n \n }",
"public function getFilter(): string;",
"public function filterName($table)\n {\n return trim($this->db->quote($table), \"'\");\n }",
"public function filter($data);"
]
| [
"0.6073091",
"0.5935709",
"0.58008975",
"0.5750423",
"0.5692186",
"0.5665151",
"0.5646273",
"0.5532532",
"0.54919654",
"0.5470675",
"0.5428523",
"0.5417336",
"0.54082245",
"0.5333248",
"0.5302756",
"0.52451515",
"0.52199554",
"0.51648855",
"0.5154802",
"0.5139016",
"0.51298785",
"0.5117534",
"0.50938255",
"0.509355",
"0.5091596",
"0.50449604",
"0.5041986",
"0.5040874",
"0.5029165",
"0.50268"
]
| 0.64674014 | 0 |
Include in the results only the boats without a length. | public function filterByWithoutLength()
{
$this->query->andWhere($this->query->expr()->isNull('b.length'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByWithLength()\n {\n $this->query->andWhere($this->query->expr()->isNotNull('b.length'));\n }",
"protected function notbilled()\n {\n $this->builder = $this->billable();\n return $this->builder->where('billed', false);\n }",
"protected function billed()\n {\n return $this->builder->where('billed', true);\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 }",
"protected function exclude_spare()\n {\n return $this->collection = $this->collection->where('is_spare', 'f');\n }",
"private static function _blankWeightArray($len) {\n\t\t$out = array();\n\t\tfor($i = 0; $i < $len; $i++)\n\t\t\t$out[] = 50;\n\t\treturn $out;\n\t}",
"public function ignoreLengthErrors() {\n \n $this->options .= '-l ';\n \n return $this;\n }",
"public static function ignored($key, $length)\n {\n return static::make('ignored', $length)->ignore();\n }",
"public function dry() {\n\t\treturn $this->empty;\n\t}",
"protected function nonbillable()\n {\n return $this->builder->where('billable', false);\n }",
"public function getNumberOfCombinedBathrooms()\n {\n if ($this->combined_bathroom == 0) {\n return '';\n }\n\n return Yii::t('app',\n '{n, plural, =1{# совмещенный санузел} =2{# совмещенных санузла} =3{# совмещенных санузла} =4{# совмещенных санузла} other{# совмещенных санузлов}}',\n [\n 'n' => (int)$this->combined_bathroom,\n ]);\n }",
"public function filtering();",
"public function skip($length) {}",
"public function getDoktypeExcludeWhere() {}",
"public static function getAllLands(){\n $db = Zend_Registry::get('dbAdapter');\n $query = $db->select()->distinct()\n ->from(array('o' => 'orte'), array(\n 'o.landid',\n 'o.land'\n ))\n ->where( \"LENGTH(o.land)>0\")\n ->order('o.land');\n return $db->fetchAll($query);\n }",
"public function getSubawards(){\n\t\t$connection = Database::getConnection();\n\t\t$query = \"SELECT * FROM watson WHERE status!='Award -- Terminated' and shortAwardNumber!='' ORDER BY shortAwardNumber\";\n\t\t$items=\"\";\n\t\t$result_obj=$connection->query($query);\n\t\ttry{\n\t\t\twhile($result = $result_obj->fetch_array(MYSQLI_ASSOC)){\n\t\t\t\t$items[]=$result;\n\t\t\t}\n\t\t\treturn($items);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getRemainingBedsByName() {\n $term = Request::input('term', '');\n $ids = Request::input('ids', '');\n $beds_id = ($ids ? array_map('intval', explode(',', $ids)) : []);\n\n $results = array();\n $queries = Bed::where('name', 'LIKE', '%'.$term.'%')\n ->whereNotIn('id', $beds_id)\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->name,\n 'price' => $query->price,\n 'total_persons' => $query->total_persons];\n return response()->json($results);\n }",
"public function getBuildingsWithBudgets()\n {\n $buildings_budgets = $this->find('all', [\n 'contain' => ['Budgets' =>\n function ($q) {\n return $q\n ->select(['id', 'building_id']);\n }],\n 'conditions' => ['Buildings.softland_id IS NOT NULL', 'Buildings.omit' => false]\n ]);\n $buildingsWithBudget = array();\n foreach ($buildings_budgets as $buildings_budget) {\n if (!empty($buildings_budget['budget'])) {\n $buildingsWithBudget[$buildings_budget['softland_id']]['budget_id'] = $buildings_budget['budget']['id'];\n $buildingsWithBudget[$buildings_budget['softland_id']]['active'] = $buildings_budget['active'];\n }\n }\n return $buildingsWithBudget;\n }",
"public function getWearBreakdown()\n {\n $results = array();\n $wear_types = $this->createEntity('Wear')->findAll();\n foreach ($wear_types as $wear)\n {\n $results[$wear->id] = array();\n }\n $select = $this->createEntity('DeltagereWear')->getSelect();\n $select->setFrom('wearpriser')->\n setTableWhere('wearpriser.id','deltagere_wear.wearpris_id')->\n setGroupBy('wearpris_id')->\n setGroupBy('size')->\n setGroupBy('wear_id')->\n setField('wearpris_id')->\n setField('size')->\n setField('wear_id')->\n setField('SUM(antal) AS antal',false)->\n setOrder('wearpris_id','asc')->\n setOrder('size','asc');\n $DB = $this->db;\n if ($result = $DB->query($select))\n {\n foreach ($result as $row)\n {\n $results[$row['wearpris_id']][] = $row;\n }\n }\n return $results;\n \n }",
"function filterRecipes(){\r\n global $allRecipes;\r\n global $allr_array;\r\n global $filteredRecipes;\r\n $matched = false;\r\n foreach ($allRecipes as $recipe){\r\n foreach ($allr_array as $allergen){\r\n if (substr_count($recipe[3], $allergen) <= 0){\r\n $matched = false;\r\n break;\r\n }\r\n $matched = true;\r\n }\r\n if ($matched){\r\n $filteredRecipes[] = $recipe;\r\n $matched = false;\r\n }\r\n $_SESSION['db_result'] = $filteredRecipes;\r\n $_SESSION['total_rows'] = sizeof($filteredRecipes);\r\n }\r\n}",
"public function getNovelties( ) {\n\t $novelties = Product::where('ebook', 0)\n\t ->orderBy('created_at', 'desc')\n\t ->take(6)\n\t ->with('image')\n\t ->with('author')\n\t ->where( 'amount', '>', 0 )\n\t ->get();\n\t return $novelties;\n }",
"function prune_empty ()\n {\n $this->A = array_prune_empty ($this->A);\n return $this;\n }",
"public function getNumberOfBathrooms()\n {\n if ((int)($this->combined_bathroom + $this->separate_bathroom) == 0) {\n return '';\n }\n\n return Yii::t('app',\n '{n, plural, =1{# ванная комната} =2{# ванные комнаты} =3{# ванные комнаты} =4{# ванные комнаты} other{# ванныx комнат}}',\n [\n 'n' => (int)($this->combined_bathroom + $this->separate_bathroom),\n ]);\n }",
"public function hideSumWhenEmpty()\n {\n return $this->withMeta(['hideSumWhenEmpty' => true]);\n }",
"public function getAllBreeds(){\n\t\treturn $this->getBreedsFromGET(self::GET_STRING_ALL_BREEDS);\n\t}",
"public function goalies()\n {\n return $this->filter(function($stat) {\n return ($stat->saves > 0 || $stat->goals_allowed > 0) ||\n ($stat->player && property_exists($stat->player, 'position') && $stat->player->position == 'GOALIE');\n });\n }",
"public function getBorrowings();",
"public function filter();",
"public function putCatsOutside() {\r\n\t\t$cats_house = $this->getCatsInside();\r\n\t\t$cats_boxes = $this->getCatsInBoxes();\r\n\t\t$cats_remaining = [];\r\n\t\tforeach ($cats_house as $cat_in_house) {\r\n\t\t\tif(!in_array($cat_in_house,$cats_boxes)) {\r\n\t\t\t\t$cats_remaining[] = $cat_in_house;\r\n\t\t\t\t$key = array_search($cat_in_house,$this->_cats);\r\n\t\t\t\tunset($this->_cats[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count($cats_remaining);\r\n\t}",
"private function sql_resAllItemsFilterWiRelation()\n {\n // Don't count hits\n $bool_count = false;\n\n // Query for all filter items\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereAllItems();\n $groupBy = $this->curr_tableField;\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//$this->pObj->dev_var_dump( $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }"
]
| [
"0.7014429",
"0.5278815",
"0.5187863",
"0.50470454",
"0.50388557",
"0.4918369",
"0.48931602",
"0.48479065",
"0.48432633",
"0.47818652",
"0.47742674",
"0.47298694",
"0.47029838",
"0.46926188",
"0.4689669",
"0.46764213",
"0.46739402",
"0.46683168",
"0.4661202",
"0.46375296",
"0.46343267",
"0.46323434",
"0.46286467",
"0.46187165",
"0.46152195",
"0.460784",
"0.4603868",
"0.45906562",
"0.45706525",
"0.4570279"
]
| 0.69222325 | 1 |
Include in the results only the boats with a length. | public function filterByWithLength()
{
$this->query->andWhere($this->query->expr()->isNotNull('b.length'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByWithoutLength()\n {\n $this->query->andWhere($this->query->expr()->isNull('b.length'));\n }",
"function mt_filter_excerpt_length($length) {\n\treturn 20;\n }",
"public function hasLength(){\n return $this->_has(2);\n }",
"public function setLength($length)\n {\n $this->length = $length;\n return $this;\n }",
"public function setLength($length)\n {\n $this->length = $length;\n return $this;\n }",
"public function setLength($length)\n\t\t{\n\t\t\t$this->length = $length;\n\t\t\treturn $this;\n\t\t}",
"public function toShorter($length)\n\t{\n\t\t$this->setMethod('to_Shorter');\n\t\t$this->setLength($length);\n\t\treturn $this;\n\t}",
"public function setLength($length)\n {\n $this->length = $length;\n\n return $this;\n }",
"function medigroup_mikado_excerpt_length($length) {\n\n if(medigroup_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }",
"public function setLength($length)\n {\n $this->Length = $length;\n return $this;\n }",
"public function limit($length)\n {\n $this->randomStringLength = $length;\n return $this;\n }",
"public function filterByMaximumLength($value)\n {\n $this->query->andWhere($this->query->expr()->andX()\n ->add($this->query->expr()->isNotNull('b.length'))\n ->add($this->query->expr()->lte('b.length', $this->query->createNamedParameter($value)))\n );\n }",
"public function toLonger($length)\n\t{\n\t\t$this->setMethod('to_Longer');\n\t\t$this->setLength($length);\n\t\treturn $this;\n\t}",
"function voyage_mikado_excerpt_length($length) {\n\n if(voyage_mikado_options()->getOptionValue('number_of_chars') !== '') {\n return esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n } else {\n return 45;\n }\n }",
"function filterRecipes(){\r\n global $allRecipes;\r\n global $allr_array;\r\n global $filteredRecipes;\r\n $matched = false;\r\n foreach ($allRecipes as $recipe){\r\n foreach ($allr_array as $allergen){\r\n if (substr_count($recipe[3], $allergen) <= 0){\r\n $matched = false;\r\n break;\r\n }\r\n $matched = true;\r\n }\r\n if ($matched){\r\n $filteredRecipes[] = $recipe;\r\n $matched = false;\r\n }\r\n $_SESSION['db_result'] = $filteredRecipes;\r\n $_SESSION['total_rows'] = sizeof($filteredRecipes);\r\n }\r\n}",
"public function filterByMinimumLength($value)\n {\n $this->query->andWhere($this->query->expr()->andX()\n ->add($this->query->expr()->isNotNull('b.length'))\n ->add($this->query->expr()->gte('b.length', $this->query->createNamedParameter($value)))\n );\n }",
"protected function billed()\n {\n return $this->builder->where('billed', true);\n }",
"function twig_length_filter(Twig_Environment $env, $thing)\n {\n return is_scalar($thing) ? strlen($thing) : count($thing);\n }",
"public function LimitFilterResultLength($filter, $length)\r\n\t{\r\n\t\treturn $filter . \" limit 0,$length\";\r\n\t}",
"public function excerpt($length = 300);",
"public function length()\r\n {\r\n return count($this->holdings);\r\n }",
"function isacustom_excerpt_length($length) {\n global $post;\n if ($post->post_type == 'post')\n return 48;\n else if ($post->post_type == 'clases_yoga')\n return 24;\n else\n return 48;\n\t}",
"function mobject_excerpt_length( $length ) {\n\tif ( is_admin() ) {\n\t\treturn $length;\n\t}\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\tif ( $display_options['excerpt_max_length'] ) {\n\t\treturn $display_options['excerpt_max_length'];\n\t}\n\treturn $length;\n}",
"public function length($length = null)\n {\n // TODO: Implement length() method.\n }",
"function uwmadison_excerpt_length( $length ) {\n\t\treturn 40;\n\t}",
"public function excerpt($length)\n {\n return \\Str::limit(strip_tags($this->bodyHtml()), $length, '...');\n }",
"public function add_freeform($length = \\null)\n {\n }",
"public static function filler(...$length)\n {\n $length = Arr::wrap($length);\n return static::make('filler', array_sum($length))->ignore();\n }",
"public function setLength($length);",
"function set_length($length) {\n $this->length = $length;\n }"
]
| [
"0.5822987",
"0.5197118",
"0.51970273",
"0.51788896",
"0.51788896",
"0.51726323",
"0.5154719",
"0.514515",
"0.51411724",
"0.51280284",
"0.5121146",
"0.51168287",
"0.51014787",
"0.50806004",
"0.50761193",
"0.5058604",
"0.49362087",
"0.4923544",
"0.4884077",
"0.48740026",
"0.48296404",
"0.48056284",
"0.4799142",
"0.47752863",
"0.47698197",
"0.47530428",
"0.4731526",
"0.4724549",
"0.47167137",
"0.47056425"
]
| 0.70307046 | 0 |
Include in the results only the boats with aspecified minimum length. | public function filterByMinimumLength($value)
{
$this->query->andWhere($this->query->expr()->andX()
->add($this->query->expr()->isNotNull('b.length'))
->add($this->query->expr()->gte('b.length', $this->query->createNamedParameter($value)))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function filterByWithLength()\n {\n $this->query->andWhere($this->query->expr()->isNotNull('b.length'));\n }",
"protected function _minLength()\n {\n $limit = $this->getMinLength();\n if ($limit !== null) {\n $i = 0;\n $_tagsArray = array();\n foreach ($this->_tagsArray as $key => $value) {\n if (strlen($value['tag']) >= $limit) {\n $_tagsArray[$value['tag']] = $value;\n }\n $i++;\n }\n $this->_tagsArray = array();\n $this->_tagsArray = $_tagsArray;\n }\n return $this->_tagsArray;\n }",
"public function setMinLength($minLength)\n {\n $this->minLength = $minLength;\n return $this;\n }",
"public function setMinLength($minLength)\n {\n $this->_minLength = $minLength;\n return $this;\n }",
"public function getMinBaths();",
"function setMinLength($length) {\n\n $this->field['minlength'] = $length;\n return $this;\n\n }",
"public function getMinBeds();",
"public function filterByWithoutLength()\n {\n $this->query->andWhere($this->query->expr()->isNull('b.length'));\n }",
"public function getSearchMinimumLength()\n\t\t{\n\t\t\treturn $this->_search_min_length;\n\t\t}",
"public function getMinLength()\n {\n return $this->minLength;\n }",
"public function getMinLength()\n {\n return $this->_minLength;\n }",
"function getMinWidths() {\n\t\t$widths = explode(',', $this->MinWidth);\n\t\tsort($widths);\n\n\t\treturn $widths;\n\t}",
"public function getMinimumLength()\n {\n return $this->minimumLength;\n }",
"public function GetMustHaveMinLength () {\n\t\treturn $this->mustHaveMinLength;\n\t}",
"public function setMinimumLength($length)\n {\n $this->minimumLength = $length;\n }",
"function assertLength()\n {\n if (empty($this->value))\n if (!$this->mandatory)\n return $this ;\n\n if (empty($this->attribMap['data-min']))\n return $this ; // no min specified\n\n $this->min = $ths->attribMap['data-min'];\n if (is_numeric($this->min))\n {\n if (strlen($this->value) < $this->min)\n {\n throw new Exception($this->min . __(\" or more characters expected in\") . \" $this->name: $this->value\");\n }\n }\n return $this ;\n }",
"public function lengthMin($lengthMin, $error) {\n if ($this->_exist) {\n array_push($this->_constraints, ['type' => self::LENGTHMIN, 'value' => $lengthMin, 'message' => $error]);\n }\n\n return $this;\n }",
"function min_length($array){\n\t$message = [];\n\tforeach($array as $field=>$minimum){\n\t\t$length = strlen(trim($_POST[$field]));\n\t\tif($length < $minimum){\n\t\t\t$message[$field] = readable_name($field).\" must be at least \".$minimum.\" characters. \";\n\t\t}\n\t}\n\treturn $message;\n}",
"final public function searchMinLength():int\n {\n return $this->col()->searchMinLength();\n }",
"public function setMinLength($minLength) {\n if (!is_integer($minLength) || $minLength < 0) {\n throw new \\InvalidArgumentException('Minimal length must be numeric and greather or equal to zero. Get: \"' . $minLength . '\"');\n }\n $this->minLength = $minLength;\n return $this;\n }",
"function setMinWidth($width) {\n $this->field['min_width'] = $width;\n\n return $this;\n }",
"function testMinlen(){\n\t\t#mdx:minlen\n\t\tParam::get('description')->filters()->minlen(10, \"Description must be at least %d characters long!\");\n\n\t\t$error = Param::get('description')->process(['description'=>'Test'])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains('at least 10', $error);\n\n\t}",
"public function minLength($value) {\n return $this->setProperty('minLength', $value);\n }",
"public function filterByMaximumLength($value)\n {\n $this->query->andWhere($this->query->expr()->andX()\n ->add($this->query->expr()->isNotNull('b.length'))\n ->add($this->query->expr()->lte('b.length', $this->query->createNamedParameter($value)))\n );\n }",
"public function belongsToMealWithMinimumSideItems()\n {\n $minimum_required_sideitems = 2;\n $grouped_side_items = DB::table('meal_mealitems')\n ->where('is_main', 0)\n ->get()\n ->groupBy('meal_id');\n\n foreach ($grouped_side_items as $side_items){\n if ($side_items->where('meal_item_id', $this->id)->count() > 0\n && count($side_items) <= $minimum_required_sideitems\n ){\n return true;\n }\n }\n\n return false;\n }",
"public function getLengthMin()\n {\n return $this->lengthMin;\n }",
"public function min($value)\n {\n return $this->with('Length', [$value, 0]);\n }",
"function _isEligibleMinimumQuantity()\r\n {\r\n $item = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Item.id' => $this->data[$this->name]['item_id'],\r\n ) ,\r\n 'fields' => array(\r\n 'Item.buy_min_quantity_per_user',\r\n 'Item.item_user_count',\r\n 'Item.max_limit'\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n if ($item['Item']['buy_min_quantity_per_user'] > 1) {\r\n $items_count = $this->_countUserBoughtItems();\r\n $boughtTotal = (!empty($items_count[0]['total_count']) ? $items_count[0]['total_count'] : 0) +$this->data[$this->name]['quantity'];\r\n $min = $item['Item']['buy_min_quantity_per_user'];\r\n if (!empty($item['Item']['max_limit']) && $min >= $item['Item']['max_limit']-$item['Item']['item_user_count']) {\r\n $min = $item['Item']['max_limit']-$item['Item']['item_user_count'];\r\n }\r\n if ($boughtTotal >= $min) {\r\n return true;\r\n }\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function setMinPostalCodeLength(int $minPostalCodeLength): self\n {\n $this->options['minPostalCodeLength'] = $minPostalCodeLength;\n return $this;\n }",
"protected function min($length, $field_name, $data)\n {\n if (strlen($data) >= $length) {\n return true;\n } else {\n $this->errors[$field_name][] = \"minimum {$length} char\";\n }\n// $this->errors[$field_name][] = \"minimum {$length} char\";\n// return empty(strlen($data) >= $length) ? false : true;\n }"
]
| [
"0.6248223",
"0.60291255",
"0.5796283",
"0.57558316",
"0.5704004",
"0.5693799",
"0.55407465",
"0.5491371",
"0.5423561",
"0.53483576",
"0.53409755",
"0.5324454",
"0.52407306",
"0.52402985",
"0.5203074",
"0.5164571",
"0.51616764",
"0.51487964",
"0.514811",
"0.5124312",
"0.5093455",
"0.5074098",
"0.5062405",
"0.5053801",
"0.5042081",
"0.50152874",
"0.5001595",
"0.4970124",
"0.49330187",
"0.4924715"
]
| 0.62623054 | 0 |
Parses plain HTML response (string) into Crawler object | public function parse() : self
{
$this->parsed = new Crawler($this->html);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function parse($html);",
"public function parse($html);",
"protected function parse()\n {\n\n $crawler = new Crawler($this->originalHTML);\n\n $this->tableOfContents = $crawler->filter('body > nav')->html();\n $this->body = $crawler->filter('body > main')->html();\n\n $this->reformatTableOfContents();\n $this->reformatBody();\n }",
"function parseHTML($url) {\n $html = getHTML($url);\n // php says this is some broken-ass html\n // attemtping to repair enough to make usable\n $dom = handleBrokenHTML($html);\n return simplexml_import_dom($dom);\n}",
"public function getCrawler($html) {\n\t\treturn new Crawler($html);\t\n\t}",
"abstract public function scrape();",
"public function scrape() {\n $expected_ref = null;\n if(!is_null($this->expected_journo)) {\n $expected_ref = $this->expected_journo->ref;\n }\n\n list($ret,$txt) = scrape_ScrapeURL($this->url, $expected_ref);\n $art_id = null;\n if($ret == 0) {\n // scraped ran\n\n $arts = scrape_ParseOutput($txt);\n if(sizeof($arts)>0) {\n // scraped at least one article\n $this->set_article($arts[0]);\n }\n }\n\n $this->update_status();\n return $txt;\n }",
"public function parse($url);",
"public function process($html);",
"public function parseFromHtml($url, $html) {\n $this->url = $url;\n $crawler = new Crawler(null, $this->url);\n $crawler->addContent($html);\n $this->parseFromCrawler($crawler);\n }",
"public function crawl() {\n $client = Naloader::getHttpClient($this->url);\n $crawler = $client->request('GET', $this->url);\n $this->parseFromCrawler($crawler);\n }",
"protected function parse($html) {\n $this->crawler->addHtmlContent($html, 'UTF-8');\n return $this->crawler->filterXPath(\"//div[contains(@class,'sr_item')]\")\n ->each(function(Crawler $node, $i){\n return [\n 'hotelid' => $node->attr('data-hotelid'),\n 'score' => $node->attr('data-score'),\n 'name' => $node->filterXPath(\"//span[contains(@class,'sr-hotel__name')]\")->text(),\n 'location' => $node->filterXPath(\"//div[contains(@class,'address')]/a[contains(@class,'district_link')]\")->text(),\n // 'price' => $node->filterXPath(\"//table/tr/td[contains(@class,'roomPrice')]/div[contains(@class,'smart_price_style')]\")->text(),\n ];\n });\n }",
"function _parseHtml($html)\n\t\t{\n\t\t\t$html=preg_replace(\"/<!DOCTYPE((.|\\n)*?)>/ims\",\"\",$html);\n\t\t\t$html=preg_replace(\"/<script((.|\\n)*?)>((.|\\n)*?)<\\/script>/ims\",\"\",$html);\n\t\t\tpreg_match(\"/<head>((.|\\n)*?)<\\/head>/ims\",$html,$matches);\n\t\t\t$head=$matches[1];\n\t\t\tpreg_match(\"/<title>((.|\\n)*?)<\\/title>/ims\",$head,$matches);\n\t\t\t$this->title = $matches[1];\n\t\t\t$html=preg_replace(\"/<head>((.|\\n)*?)<\\/head>/ims\",\"\",$html);\n\t\t\t$head=preg_replace(\"/<title>((.|\\n)*?)<\\/title>/ims\",\"\",$head);\n\t\t\t$head=preg_replace(\"/<\\/?head>/ims\",\"\",$head);\n\t\t\t$html=preg_replace(\"/<\\/?body((.|\\n)*?)>/ims\",\"\",$html);\n\t\t\t$this->htmlHead=$head;\n\t\t\t$this->htmlBody=$html;\n\t\t\treturn;\n\t\t}",
"abstract protected function parseResponse($response);",
"static public function getFromString(){\n set_error_handler(array('\\Draeli\\RssBridge\\Utils', 'set_error_handler'));\n $result = call_user_func_array( array('\\Sunra\\PhpSimple\\HtmlDomParser', 'str_get_html'), func_get_args() );\n restore_error_handler ();\n\n return $result;\n }",
"public function fromHtml($html, $selector = null)\n {\n $cr = $htmlStr = null;\n if ($html instanceof Response) {\n if (!$html->isSuccessful()) {\n $msg = 'Request for 1st argument of '.__METHOD__.' must be successful, check isSuccessful() first.';\n throw new \\LogicException($msg);\n }\n $html = $html->getContent();\n }\n if (is_string($html)) {\n if (null === $selector) {\n $htmlStr = $html;\n } else {\n $cr = new Crawler();\n $cr->addHtmlContent($html);\n }\n } elseif ($html instanceof \\DOMNode) {\n $node = $html;\n if (null !== $selector) {\n $cr = new Crawler();\n $cr->addNode($node);\n } else {\n $htmlStr = $node->ownerDocument->saveHTML($node);\n }\n } elseif ($html instanceof Crawler) {\n $cr = $html;\n } else {\n $type = is_object($html) ? get_class($html) : gettype($html);\n $msg = '1st argument must by string, Crawler, DOMNode or Response, but is '.$type;\n throw new \\InvalidArgumentException($msg);\n }\n\n if (null === $htmlStr) {\n if (null !== $selector) {\n $cr = $cr->filter($selector)->first();\n }\n $node = $cr->getNode(0); // $cr->html() only returns html of children\n if (!$node->ownerDocument) {\n throw new \\OutOfBoundsException('node has no ownerDocument, selector probaly returned nothing');\n }\n $htmlStr = $node->ownerDocument->saveHTML($node);\n }\n\n if (false === strpos($htmlStr, '<body>')) {\n $htmlStr = \"<html>\\n<head>\\n<meta charset=\\\"UTF-8\\\">\\n</head>\\n<body>\\n\".$htmlStr.\"</body>\\n</html>\\n\";\n }\n\n $tmpFile = $this->getTempHtmlFile($htmlStr); // as temporary file because it must have a filename\n\n return IOFactory::load($tmpFile['path']);\n // tmpfile is deleted automatically\n }",
"public function __construct($url) {\r\n $options = array(\r\n 'http'=>array('method'=>\"GET\", 'header'=>\"User-Agent: crawlBot/0.1\\n\")\r\n );\r\n $context = stream_context_create($options);\r\n \r\n $this->doc = new DomDocument();\r\n @$this->doc->loadHTML(file_get_contents($url, false, $context));\r\n }",
"abstract public function scrape(): Result;",
"public function loadHTML($string) {\n $input = new HTML5_Inputstream_String($string);\n\n return $this->parse($input);\n }",
"public function parse(string $content);",
"public function parse(string $content);",
"public function getParser($url)\n {\n try {\n $client = new Client();\n $response = $client->request('GET', $url, ['verify' => false]);\n $html = $response->getBody();\n\n $dom = new Dom();\n return $dom->load($html);\n } catch (CurlException $ex) {\n // TODO - decide what to do on HTTP error conditions, ignoring seems useless\n } catch (ClientException $clientEx) {\n \n } catch (ConnectException $connectEx) {\n \n } catch (ServerException $serverEx) {\n \n }\n \n return false;\n }",
"protected function parse($html)\n {\n $doc = new \\DOMDocument();\n $doc->loadHTML('<?xml encoding=\"UTF-8\">' . $html);\n\n $xpath = new \\DOMXPath($doc);\n\n $title = $xpath->query(\"//div[@id='title']/div[@class='left']/h1\");\n $developer = $xpath->query(\"//div[@id='title']/div[@class='left']/h2\");\n $description = $xpath->query(\"//div[@class='product-review']/p\");\n\n if (empty($title) || empty($developer) || empty($description)) {\n throw new InvalidPageException('Invalid page format');\n }\n\n $this->title = $title->item(0)->textContent;\n $this->developer = ltrim($developer->item(0)->textContent, 'By ');\n $this->description = $description->item(0)->textContent;\n $this->source = 'apple';\n }",
"public function parse($content);",
"public abstract function get_html();",
"function parseHTML(){\n\t\t$code = preg_replace_callback('~(href|src|codebase|url|action)\\s*=\\s*([\\'\\\"])?(?(2) (.*?)\\\\2 | ([^\\s\\>]+))~isx',array('self','parseExtURL'),$this->source);\n\t\t$code = preg_replace_callback('~(<\\s*style.*>)(.*)<\\s*/\\s*style\\s*>~iUs',Array('self','parseCSS'),$code);\n\t\t$code = preg_replace_callback('~(style\\s*=\\s*)([\\'\\\"])(.*)\\2~iUs',Array('self','parseStyle'),$code);\n\t\t$code = preg_replace_callback('~<script(\\s*.*)>(.*)<\\s*/\\s*script>~iUs',Array('self','parseScriptTag'),$code);\n\t\t$this->output = $code;\n\t}",
"public function _parseResponce()\n\t\t{\n\t\t\t$pattern = \"/(link_cropped_no\\\" target=\\\"_blank\\\" href=\\\")(.{0,255})(\\\" )/i\";\n\t\t\tpreg_match_all($pattern, $this->responce, $out);\n\t\t\t$this->content = (!empty($out['2'])) ? array_splice($out['2'], false, AMOUNT_OF_RESULTS) : array();\n\t\t}",
"public function getCrawler() {\n\t\t$crawler = new Crawler(NULL, $this->lastRequest->getBaseUri());\n\t\t$crawler->addContent($this->lastResponse->getContent(), $this->lastResponse->getHeader('Content-Type'));\n\n\t\treturn $crawler;\n\t}",
"public abstract function parse($text);",
"private function parsehtml()\n\t{\n\t\t$html = $this->getUrl($this->url);\n\t\t$dom = new \\DOMDocument();\n\t\t@$dom->loadHTML($html);\n\t\t// discard white space\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// get the div with id=\"moviemeter\" which includes the movies\n\t\t$movies = $dom->getElementById(\"moviemeter\");\n\t\tif(!$movies)\n\t\t\treturn null;\n\t\t\n\t\t$charts = [];\n\t\tforeach ($movies->getElementsByTagName(\"div\") as $div) \n\t\t{\n\t\t\t$array = explode(\"#\", $div->nodeValue);\n\t\t\t\t\t\n\t\t\tif(is_array($array) && count($array) == 2)\n\t\t\t{\n\t\t\t\t// get rank\n\t\t\t\t$rank = trim(substr($array[1], 0, 3));\n\t\t\n\t\t\t\t//get was\n\t\t\t\tif( preg_match( '!\\(([^\\)]+)\\)!', $array[1], $match ) )\n\t \t\t\t$was = $match[1];\n\t \t\t\n\t\t\t\t$charts[$rank] = [\"title\"=>trim($array[0]), \"was\"=>$was, \"rank\"=>$rank];\n\t\t\t}\n\t\t}\n\t\tforeach ($charts as $key => $value) \n\t\t\t$temp[$key] = $value[\"rank\"];\n\t\t\n\t\t// sort by rank\n\t\tarray_multisort($temp, SORT_ASC, $charts);\n\n\t\t// return the top <limit>\n\t\treturn array_slice($charts, 0, $this->limit);\t\n\t}"
]
| [
"0.6565682",
"0.6565682",
"0.62326205",
"0.6083824",
"0.6029237",
"0.5950584",
"0.59361535",
"0.589971",
"0.58783215",
"0.5875858",
"0.58695656",
"0.58622754",
"0.58173054",
"0.57484066",
"0.5712362",
"0.57108414",
"0.56945217",
"0.55662054",
"0.55543023",
"0.5534879",
"0.5534879",
"0.55076283",
"0.55035365",
"0.5501375",
"0.54790914",
"0.54406685",
"0.5439171",
"0.5438694",
"0.54194564",
"0.5416749"
]
| 0.66385454 | 0 |
Lists all GdpMails entities. | public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('LooninsIncidentBundle:GdpMails')->findAll();
return array(
'entities' => $entities,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}",
"public function findAll()\n {\n return $this->em\n ->getRepository('App:Mail')\n ->findAll()\n ;\n }",
"public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }",
"public function getMails(): Collection\n {\n\n return $this->mails;\n\n }",
"public function retrieveAllMails()\n {\n $mails = new Collection();\n for($i = 1; $i <= $this->countAllMails(); $i++)\n {\n $mails->add($this->retrieveMail($i));\n }\n return $mails;\n }",
"function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}",
"public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }",
"function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}",
"public function getAllMails()\n {\n $user = Auth::user();\n $emails = DB::table('users')->select('id','email')->get();\n return response()->json($emails);\n }",
"function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }",
"public function getEmails(){\r\n \r\n $dbConfig = array(\r\n \"DB_DNS\" => 'mysql:host=localhost;port=3306;dbname=PHPadvClassSpring2015',\r\n \"DB_USER\" => 'root', \r\n \"DB_PASSWORD\" => '');\r\n $pdo = new DB($dbConfig);\r\n $db = $pdo->getDB();\r\n $stmt = $db->prepare(\"SELECT * FROM emailtype where active = 1\");\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n echo '<h3>Types of E-mails</h3>';\r\n foreach ($results as $value) {\r\n echo '<p>- <strong>', $value['emailtype'], '</strong></p>';\r\n }\r\n } else {\r\n echo '<p>No data found!</p>';\r\n } \r\n \r\n }",
"public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }",
"public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}",
"public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $emails = $em->getRepository('Workshop5Bundle:Email')->findAll();\n\n return $this->render('email/index.html.twig', array(\n 'emails' => $emails,\n ));\n }",
"public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }",
"public function getAllRecipients() {}",
"public function fetchEmails(): void\n {\n $this->fetchedEmails = [];\n\n try {\n $response = $this->mailhog->request('GET', '/api/v1/messages');\n $this->fetchedEmails = json_decode($response->getBody(), false);\n } catch (Exception $e) {\n $this->fail('Exception: ' . $e->getMessage());\n }\n $this->sortEmails($this->fetchedEmails);\n\n // by default, work on all emails\n $this->setCurrentInbox($this->fetchedEmails);\n }",
"function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }",
"function get_all_mail()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('mail')->result_array();\n }",
"public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }",
"public function getEmails()\n {\n return $this->emails;\n }",
"public function getEmails()\n {\n return $this->emails;\n }",
"public function listadeTodosEmailDao(){\r\n \r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoEmail.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $listaEmail = array();\r\n \r\n $string = \"Select nome,email,comentario,data from email order by data\";\r\n $resultado = mysql_query($string) or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n\t$i=0; \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n\r\n\t $email = new objetoEmail(); \r\n $email->enviarEmail($registro['email'],$registro['nome'],$registro['comentario'],$registro['data']); \r\n\t $listaEmail[$i] = $email;\r\n \r\n $i++;\r\n }\r\n\t\t\r\n\t\tmysql_free_result($resultado);\r\n $obj->freebanco();\r\n return $listaEmail;\r\n }",
"public function newAction()\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function indexAction()\n {\n try {\n $email = new Email();\n $grupo = new EmailGrupo();\n\n $this->view->emails = $email->lista(\n $this->_session->empresa->id_empresa,\n $this->_getParam('pagina', 0),\n $this->_getParam('grupo', null)\n );\n\n $this->view->grupos = $grupo->lista(\n $this->_session->empresa->id_empresa\n );\n } catch (Exception $e) {\n $mensagem = array('error' => $e->getMessage());\n $this->_helper->flashMessenger($mensagem);\n }\n }",
"public function findAllEmails()\r\n {\r\n try {\r\n $query = 'SELECT email FROM login';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($result == false) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n } catch (PDOException $e) {\r\n echo \"get accounts error\";\r\n die();\r\n }\r\n }",
"public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}",
"public function emails()\n {\n return $this->hasMany(Email::class);\n }",
"public function getMailingLists() {\n $path = 'mailinglists.json';\n return $this->request($path);\n }"
]
| [
"0.6917383",
"0.6896523",
"0.64885604",
"0.61055005",
"0.6093053",
"0.59815973",
"0.596835",
"0.5936755",
"0.59056824",
"0.5881021",
"0.5873488",
"0.5848727",
"0.57859844",
"0.5781284",
"0.5718998",
"0.57125205",
"0.5697226",
"0.5671937",
"0.56091183",
"0.5585177",
"0.5566545",
"0.5565331",
"0.5565331",
"0.55589736",
"0.55324763",
"0.55250096",
"0.5520227",
"0.5514328",
"0.5488724",
"0.5487187"
]
| 0.72491175 | 0 |
Creates a new GdpMails entity. | public function createAction(Request $request)
{
$entity = new GdpMails();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
return $this->redirect($this->generateUrl('gdpmails_show', array('id' => $entity->getId())));
}
return array(
'entity' => $entity,
'form' => $form->createView(),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Create'));\r\n\r\n return $form;\r\n }",
"public function newAction()\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }",
"public function createAction()\n {\n $record = new \\SmartAccounts\\Entity\\Emails();\n\n $form = $this->emailsService->getCreateEmailsForm();\n\n if ($this->request->isPost()) {\n $form->setData($this->request->getPost());\n if ($form->isValid()) {\n \t$data = $form->getData();\n \t\n \t$record->setDisabled($data->getDisabled());\n \t$record->setEmail($data->getEmail());\n \t$record->setCustomerId($data->getCustomerId());\n \t\n $this->emailsService->createEmails($record, $this->identity());\n\n $this->flashMessenger()->setNamespace('success')\n ->addMessage('You have successfullly created a new Emails.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n } else {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('There was an error trying to create a new Emails.');\n }\n }\n\n $uri = $this->getRequest()->getUri();\n $base = sprintf('%s://%s', $uri->getScheme(), $uri->getHost());\n $this->viewHelperManager->get('HeadScript')\n ->appendFile($base . '/assets/rocket-admin/ckeditor/ckeditor.js');\n $this->viewHelperManager->get('InlineScript')\n ->appendScript(\"$(function () {CKEDITOR.replace('emails-fieldset[html]');});\", 'text/javascript');\n\n return new ViewModel(array(\n 'record' => $record,\n 'form' => $form,\n ));\n }",
"public function create($email);",
"public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }",
"public function CreateEmails($Payload){\n\t\t\tif(empty($Payload['id'])){\n\t\t\t\tthrow new Exception('id can not be empty.');\n\t\t\t}\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/'.$Payload['id'].'/emails';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"function create($payload){\n if ($payload->name() != 'user_sent_gift_to_user') return null;\n \n // build an entity to store the action data\n $entity = new ElggObject;\n $entity->subtype = \"feeligo_gift\";\n $entity->gift_name = $payload->gift()->name;\n $entity->sender_guid = $payload->adapter_sender()->guid();\n $entity->recipient_guid = $payload->adapter_recipient()->guid();\n $entity->gift_message = $payload->gift()->message;\n $entity->gift_id = $payload->gift()->id;\n $entity->image_url = $payload->medium_url('medium', '60x72');\n $entity->access_id = 2; // 0: private, 1: logged in, 2: public\n $entity->localized_raw_body = $payload->localized_raw_body(get_current_language());\n // save the entity\n $entity->save();\n\n //add to river\n $r = add_to_river('river/gifts_create', 'create', $entity->sender_guid , $entity->getGUID());\n\n // return an adapter with the ID of the newly added entity to confirm successful creation\n return new Feeligo_Elgg18_Model_Adapter_Action($entity->getGUID());\n }",
"public function createEntity();",
"public function create()\n {\n return (new EmailTemplate())->loadDefaultValues();\n }",
"public function create($entity);",
"public function createMailMessage();",
"public function create(Entity $entity);",
"function create($entity);",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"public function createEmail($subject, $body, $recipients, $attachements = []): Mail\n {\n return $this->mailBuilder->createEmailEntity($subject, $body, $recipients, $attachements);\n }",
"public function create(array $mailinfo)\n {\n $this->model->setClientID($mailinfo['clientid']);\n $this->model->setMailSubject($mailinfo['title']);\n $this->model->setMailSender($mailinfo['sender']);\n $this->model->setMailDescription($mailinfo['description']);\n $this->model->setMailName($mailinfo['name']);\n $this->model->setMailEmail($mailinfo['email']);\n $this->model->setToken($mailinfo['token']);\n if (isset($mailinfo['imgname'])) {\n $this->model->setFakeImage($mailinfo['imgname']);\n }\n $this->model->setImage($mailinfo['images']);\n $this->model->setDatum($mailinfo['datum']);\n $this->model->setVerified($mailinfo['verified']);\n\n if (isset($mailinfo['comment']) && $mailinfo['comment'] !== null) {\n $this->model->setMailComment($mailinfo['comment']);\n $this->model->setCommentGroup($mailinfo['commentgroep']);\n }\n\n if(isset($mailinfo['extracomment']) && $mailinfo['extracomment'] !== null){\n $this->model->setExtraComment($mailinfo['extracomment']);\n }\n\n if ($result = $this->model->create()) {\n return $result;\n }\n return false;\n }",
"public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}",
"public function create(Mail $mail)\n {\n // dd('sdfs');\n if (!User::hasDispostion()) {\n abort(404);\n }\n }",
"public function create() {\n return view('mails.create');\n }",
"public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }",
"public function createAction(Request $request)\n {\n $entity = new Push();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $user = $this->container->get('security.context')->getToken()->getUser();\n $entity->setCreatorId($user->getId());\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('push_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n $contacts = Contact ::all();\n return view('emails.create', compact('contacts'));\n }",
"public function create(Request $request)\n {\n EmailTemplate::create($request->all());\n return redirect('email/template/view');\n }",
"public static function createNewEmail($args) {\n $email = new Email;\n $email->from_email = empty($args['fromEmail']) ? config('mail.from.address') : $args['fromEmail'];\n $email->from_name = empty($args['fromName']) ? config('mail.from.name') : $args['fromName'];\n $email->reply_to_email = empty($args['replyToEmail']) ? config('mail.from.address') : $args['replyToEmail'];\n $email->reply_to_name = empty($args['replyToName']) ? config('mail.from.name') : $args['replyToName'];\n $email->to_email = empty($args['toEmail']) ? config('mail.from.name') : $args['toEmail'];\n $email->to_name = empty($args['toName']) ? config('mail.from.name') : $args['toName'];\n $email->subject = $args['subject'];\n $email->data = empty($args['data']) ? null : json_encode($args['data']);\n $email->email_type = $args['emailType'];\n $email->receiver_id = isset($args['receiverId']) ? $args['receiverId'] : null;\n $email->sender_id = isset($args['senderId']) ? $args['senderId'] : null;\n $email->site_id = isset($args['siteId']) ? $args['siteId'] : null;\n $email->parent_email_id = isset($args['parentEmailId']) ? $args['parentEmailId'] : null;\n $email->save();\n return $email;\n }",
"public function create()\n {\n //\n }",
"public function create()\n {\n //\n }",
"public function create()\n {\n //\n }",
"public function create()\n {\n //\n }",
"public function create() {\n //\n }"
]
| [
"0.65327984",
"0.63309795",
"0.58390903",
"0.58063227",
"0.556461",
"0.55068433",
"0.543389",
"0.5371196",
"0.53418183",
"0.53305686",
"0.52689457",
"0.52421206",
"0.522109",
"0.515451",
"0.5147189",
"0.51235914",
"0.511381",
"0.51007724",
"0.507179",
"0.5047809",
"0.5020041",
"0.5003777",
"0.50028086",
"0.5001896",
"0.49837887",
"0.49819508",
"0.49819508",
"0.49819508",
"0.49819508",
"0.4980382"
]
| 0.7016379 | 0 |
Creates a form to create a GdpMails entity. | private function createCreateForm(GdpMails $entity)
{
$form = $this->createForm(new GdpMailsType(), $entity, array(
'action' => $this->generateUrl('gdpmails_create'),
'method' => 'POST',
));
$form->add('submit', 'submit', array('label' => 'Create'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newAction()\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function createAction(Request $request)\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n $form->handleRequest($request);\r\n\r\n if ($form->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n return $this->redirect($this->generateUrl('gdpmails_show', array('id' => $entity->getId())));\r\n }\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"private function createEditForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_update', array('id' => $entity->getId())),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }",
"public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}",
"private function createCreateForm(Grupos $entity)\n {\n $form = $this->createForm(new GruposType(), $entity, array(\n 'action' => $this->generateUrl('grupos_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Criar'));\n\n return $form;\n }",
"public function createAction()\n {\n $record = new \\SmartAccounts\\Entity\\Emails();\n\n $form = $this->emailsService->getCreateEmailsForm();\n\n if ($this->request->isPost()) {\n $form->setData($this->request->getPost());\n if ($form->isValid()) {\n \t$data = $form->getData();\n \t\n \t$record->setDisabled($data->getDisabled());\n \t$record->setEmail($data->getEmail());\n \t$record->setCustomerId($data->getCustomerId());\n \t\n $this->emailsService->createEmails($record, $this->identity());\n\n $this->flashMessenger()->setNamespace('success')\n ->addMessage('You have successfullly created a new Emails.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n } else {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('There was an error trying to create a new Emails.');\n }\n }\n\n $uri = $this->getRequest()->getUri();\n $base = sprintf('%s://%s', $uri->getScheme(), $uri->getHost());\n $this->viewHelperManager->get('HeadScript')\n ->appendFile($base . '/assets/rocket-admin/ckeditor/ckeditor.js');\n $this->viewHelperManager->get('InlineScript')\n ->appendScript(\"$(function () {CKEDITOR.replace('emails-fieldset[html]');});\", 'text/javascript');\n\n return new ViewModel(array(\n 'record' => $record,\n 'form' => $form,\n ));\n }",
"private function createNotifyForm()\n {\n return $this->createFormBuilder(['emails' => implode(', ', $this->emails)])\n ->add('emails', TextareaType::class, ['label' => 'E-mails', 'attr' => ['placeholder' => 'E-mail Addresses...', 'required' => true]])\n ->getForm();\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public function createForm();",
"public function createForm();",
"protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }",
"private function createCreateForm(Push $entity)\n {\n $form = $this->createForm(new PushType(), $entity, array(\n 'action' => $this->generateUrl('push_create'),\n 'method' => 'POST',\n 'attr' => array('id' => 'create-form')\n ));\n\n return $form;\n }",
"public function create()\n {\n return view('panel.deliveries-management.deliveries.form-create');\n }",
"private function createCreateForm(PosgradoLineas $entity)\n {\n $form = $this->createForm(new PosgradoLineasType(), $entity, array(\n 'action' => $this->generateUrl('posgradolineas_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar'));\n\n return $form;\n }",
"public function create() {\n return view('mails.create');\n }",
"public function createForm()\n {\n }",
"public function actionCreate() {\n\t\t$request = Yii::app()->request;\n $form = new PersonaForm(\"new\");\n if($request->isPostRequest) {\n $form->attributes = $request->getPost('PersonaForm');\n if($form->validate()) {\n PersonaManager::savePersona($form);\n Yii::app()->user->setFlash('general-success', \"$form->nombre $form->apellido ha sido creado.\");\n $this->redirect('admin');\n }\n }\n $this->render('create', array('model'=>$form));\n }",
"public function create()\n {\n return view('contactusform');\n }",
"public function create()\n {\n return view('notification.form.create');\n }",
"private function createCreateForm(Productosprogramas $entity)\n {\n $form = $this->createForm(new ProductosprogramasType(), $entity, array(\n 'action' => $this->generateUrl('admin_productosprogramas_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Crear'));\n\n return $form;\n }",
"private function createCreateForm(Message $entity)\n {\n $form = $this->createForm(new MessageType(), $entity, array(\n 'action' => $this->generateUrl('message_create'),\n 'method' => 'POST',\n ));\n\n return $form;\n }",
"private function createCreateForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}",
"public function create()\n {\n $contacts = Contact ::all();\n return view('emails.create', compact('contacts'));\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n $data = [\n 'route' => 'myc::contacts.store',\n 'method' => 'POST',\n 'type' => 'create'\n ];\n\n return view('contact.form', ['page' => Constants::PageContacts, 'data' => $data]);\n }",
"public function create()\n {\n //Load view with form\n return view('contact-us');\n }",
"public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }",
"private function createCreateForm(PIFEClassique $entity,$id)\n {\n $form = $this->createForm(new PIFEClassiqueType(), $entity, array(\n 'action' => $this->generateUrl('pifeclassique_create',array('id'=>$id)),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }",
"public function CreateForm();"
]
| [
"0.7441957",
"0.7244886",
"0.67560875",
"0.6711325",
"0.6540887",
"0.6413211",
"0.6302297",
"0.6300285",
"0.6284974",
"0.6284974",
"0.6214498",
"0.61847866",
"0.61690986",
"0.61140937",
"0.6104232",
"0.60910136",
"0.6045087",
"0.60374",
"0.6030313",
"0.60129994",
"0.6009359",
"0.6004699",
"0.5996848",
"0.5994047",
"0.59807086",
"0.59549856",
"0.59475994",
"0.5938294",
"0.5936627",
"0.5923702"
]
| 0.82128966 | 0 |
Displays a form to create a new GdpMails entity. | public function newAction()
{
$entity = new GdpMails();
$form = $this->createCreateForm($entity);
return array(
'entity' => $entity,
'form' => $form->createView(),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Create'));\r\n\r\n return $form;\r\n }",
"public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}",
"public function createAction(Request $request)\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n $form->handleRequest($request);\r\n\r\n if ($form->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n return $this->redirect($this->generateUrl('gdpmails_show', array('id' => $entity->getId())));\r\n }\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function createAction()\n {\n $record = new \\SmartAccounts\\Entity\\Emails();\n\n $form = $this->emailsService->getCreateEmailsForm();\n\n if ($this->request->isPost()) {\n $form->setData($this->request->getPost());\n if ($form->isValid()) {\n \t$data = $form->getData();\n \t\n \t$record->setDisabled($data->getDisabled());\n \t$record->setEmail($data->getEmail());\n \t$record->setCustomerId($data->getCustomerId());\n \t\n $this->emailsService->createEmails($record, $this->identity());\n\n $this->flashMessenger()->setNamespace('success')\n ->addMessage('You have successfullly created a new Emails.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n } else {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('There was an error trying to create a new Emails.');\n }\n }\n\n $uri = $this->getRequest()->getUri();\n $base = sprintf('%s://%s', $uri->getScheme(), $uri->getHost());\n $this->viewHelperManager->get('HeadScript')\n ->appendFile($base . '/assets/rocket-admin/ckeditor/ckeditor.js');\n $this->viewHelperManager->get('InlineScript')\n ->appendScript(\"$(function () {CKEDITOR.replace('emails-fieldset[html]');});\", 'text/javascript');\n\n return new ViewModel(array(\n 'record' => $record,\n 'form' => $form,\n ));\n }",
"public function create() {\n return view('mails.create');\n }",
"public function newAction()\n {\n $entity = new Newsletter();\n $form = $this->createForm(new NewsletterType(), $entity);\n\n return $this->render('ClassCentralSiteBundle:Newsletter:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $contacts = Contact ::all();\n return view('emails.create', compact('contacts'));\n }",
"public function newAction()\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $entity = new Grupos();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SytemSGBundle:Grupos:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('panel.deliveries-management.deliveries.form-create');\n }",
"public function create()\n {\n return view('architect.messageRecipient.create');\n }",
"public function create()\n {\n return view('managecontactus.create'); \n }",
"public function create()\n {\n return view('notification.form.create');\n }",
"public function create()\n {\n return view(\"add_contact\", compact(\"\"));\n }",
"public function create()\n\t{\n\n\n\t return view('admin.mailbox.create');\n\t}",
"public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }",
"public function create()\n {\n return view('admin.contact.create');\n }",
"public function create()\n {\n return view('admin.contact.create');\n }",
"public function create()\n {\n //Load view with form\n return view('contact-us');\n }",
"public function create()\n {\n return view('contactos.create',[ ]);\n }",
"public function create()\n {\n return view('contactusform');\n }",
"public function create()\n {\n\n createLog(MessageContact::class);\n return view('backEnd.admin.messagecontact.create');\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public function create()\n {\n\n createLog(Contact::class);\n return view('backEnd.admin.contact.create');\n }",
"public function create()\n {\n \n \n return view('admin.contactInfo.add');\n }",
"public function create() {\n return view('project.contact.create');\n }",
"public function create()\n {\n return view('EmailAccounts');\n }",
"public function create()\n {\n return view('addressbook.create');\n }",
"public function create()\n {\n if((auth()->user()->hasPermissionTo('blogger_add') != true))\n return $this->permission_denied('blogger_dashboard');\n\n return view('dashboard.users.blogger.form')\n ->with([\n 'page_title' => $this->page_title,\n 'entity' => $this->entity,\n 'entity_action' => $this->entity_action,\n ]);\n }",
"public function create()\n {\n //\n return view('admin.settings.mailsetting.add');\n\n }",
"public function actionCreate() {\n\t\t$request = Yii::app()->request;\n $form = new PersonaForm(\"new\");\n if($request->isPostRequest) {\n $form->attributes = $request->getPost('PersonaForm');\n if($form->validate()) {\n PersonaManager::savePersona($form);\n Yii::app()->user->setFlash('general-success', \"$form->nombre $form->apellido ha sido creado.\");\n $this->redirect('admin');\n }\n }\n $this->render('create', array('model'=>$form));\n }"
]
| [
"0.727716",
"0.7130548",
"0.7095423",
"0.68532664",
"0.6734487",
"0.65864897",
"0.653791",
"0.64613175",
"0.64500666",
"0.643531",
"0.64125246",
"0.639017",
"0.63869315",
"0.63850164",
"0.6378891",
"0.6378039",
"0.6378039",
"0.6377443",
"0.637716",
"0.6373962",
"0.6346026",
"0.63319004",
"0.63090867",
"0.6301859",
"0.6288307",
"0.6277295",
"0.62696373",
"0.6268511",
"0.62624615",
"0.62539095"
]
| 0.79893667 | 0 |
Creates a form to edit a GdpMails entity. | private function createEditForm(GdpMails $entity)
{
$form = $this->createForm(new GdpMailsType(), $entity, array(
'action' => $this->generateUrl('gdpmails_update', array('id' => $entity->getId())),
'method' => 'POST',
));
$form->add('submit', 'submit', array('label' => 'Update'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"private function createEditForm(Grupos $entity)\n {\n $form = $this->createForm(new GruposType(), $entity, array(\n 'action' => $this->generateUrl('grupos_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Atualizar'));\n\n return $form;\n }",
"private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Create'));\r\n\r\n return $form;\r\n }",
"private function createEditForm(Push $entity)\n {\n $form = $this->createForm(new PushType(), $entity, array(\n 'action' => $this->generateUrl('push_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('id' => 'edit-form')\n ));\n\n return $form;\n }",
"public function editAction()\n {\n $recordId = (int) $this->params('id', null);\n\n if (null === $recordId) {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n }\n\n $record = $this->emailsService->getEmails($recordId);\n\n if (null === $record) {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n }\n\n $form = $this->emailsService->getEditEmailsForm($recordId);\n\n if ($this->request->isPost()) {\n \t\n \t$form->setData($this->request->getPost());\n \n if ($form->isValid()) {\n \t\n $this->emailsService->editEmails($record, $this->identity());\n\n $this->flashMessenger()->setNamespace('success')\n ->addMessage('You have successfully edited a Emails.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n } else {\n $form->getData();\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('There was an error trying to edit an existing Emails.');\n }\n }\n \n $uri = $this->getRequest()->getUri();\n $base = sprintf('%s://%s', $uri->getScheme(), $uri->getHost());\n $this->viewHelperManager->get('HeadScript')\n ->appendFile($base . '/assets/rocket-admin/ckeditor/ckeditor.js');\n $this->viewHelperManager->get('InlineScript')\n ->appendScript(\"$(function () {CKEDITOR.replace('emails-fieldset[html]');});\", 'text/javascript');\n\n return new ViewModel(array(\n 'record' => $record,\n 'form' => $form,\n 'recordId' => $recordId\n ));\n }",
"public function newAction()\r\n {\r\n $entity = new GdpMails();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }",
"public function getEditForm();",
"private function createEditForm(PosgradoLineas $entity)\n {\n $form = $this->createForm(new PosgradoLineasType(), $entity, array(\n 'action' => $this->generateUrl('posgradolineas_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }",
"private function createEditForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"private function createEditForm(Productosprogramas $entity)\n {\n $form = $this->createForm(new ProductosprogramasType(), $entity, array(\n 'action' => $this->generateUrl('admin_productosprogramas_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }",
"private function createEditForm(EnvaseIngreso $entity)\n {\n $form = $this->createForm(new EnvaseIngresoType(), $entity, array(\n 'action' => $this->generateUrl('envase_ingreso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar', 'attr' => array('class' => \"btn btn-success\")));\n\n return $form;\n }",
"public function edit($id)\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->message = Message::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MessageController@update', $form->message->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }",
"private function createEditForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessType(), $entity, array(\n 'action' => $this->generateUrl('business_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(DetailsProduits $entity) {\n $form = $this->createForm(new DetailsProduitsType(), $entity, array(\n 'action' => $this->generateUrl('detailsproduits_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Fileops $entity)\n {\n $form = $this->createForm(new FileopsType(), $entity, array(\n 'action' => $this->generateUrl('fileops_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(PIFEClassique $entity)\n {\n $form = $this->createForm(new PIFEClassiqueType(), $entity, array(\n 'action' => $this->generateUrl('pifeclassique_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }",
"private function createEditForm(Feedback $entity)\n {\n $form = $this->createForm('BackendBundle\\Form\\FeedbackType', $entity, array(\n 'action' => $this->generateUrl('feedback_edit', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(PersonnelPersonnel $entity)\n {\n $form = $this->createForm(new PersonnelPersonnelType(), $entity, array(\n 'action' => $this->generateUrl('personnelpersonnel_update', array('id' => $entity->getIdenuniq())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Propietario $entity)\n {\n $form = $this->createForm(\n new PropietarioType(),\n $entity,\n array(\n 'action' => $this->generateUrl('propietario_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n )\n );\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Equipo $entity)\n {\n $form = $this->createForm(new EquipoType(), $entity, array(\n 'action' => $this->generateUrl('tecnoequipo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }",
"private function createEditForm(AdmTipoAporte $entity)\r\n {\r\n $form = $this->createForm(new AdmTipoAporteType(), $entity, array(\r\n 'action' => $this->generateUrl('admtipoaporte_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr'=>array('class'=>'btn btn-success btn-sm')));\r\n\r\n return $form;\r\n }",
"private function createEditForm(Picture $entity)\n {\n $form = $this->createForm(new PictureType(), $entity, array(\n 'action' => $this->generateUrl('picture_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Functions $entity) {\n $session = $this->get(\"session\");\n $form = $this->createForm(new FunctionsType(), $entity, array(\n 'action' => $this->generateUrl('hall_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n \n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Intervalosips $entity)\n {\n $form = $this->createForm(new IntervalosipsType(), $entity, array(\n 'action' => $this->generateUrl('intervalosips_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Atualizar'));\n\n return $form;\n }",
"private function createEditForm(Feriado $entity)\n {\n $form = $this->createForm(new FeriadoType(), $entity, array(\n 'action' => $this->generateUrl('feriado_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}",
"public function editContactAction() {\n $aGetData = $this->getRequest()->getQuery();\n $id = $aGetData['id'];\n\n /*\n * Verifico si me llega un ID por POST\n */\n if (!$id) {\n $aPostData = $this->getRequest()->getPost();\n $id = $aPostData['id'];\n }\n\n /*\n * En el caso de que este el ID, busco el registro en la DB\n * En el caso que ID este null, creo un nuevo objeto\n */\n if ($id) {\n $object = $this->getEntityManager()->getRepository('Iem\\Entity\\Contact')->find($id);\n $new = false;\n } else {\n $object = new \\Iem\\Entity\\Contact();\n $new = true;\n }\n\n /*\n * Declar el Formulario\n * Defino el Hidratador de Doctrine\n * Hago el Bind entre el Formulario y el objeto\n */\n $form = new \\Iem\\Form\\Contact($this->getEntityManager());\n $form->setHydrator(new \\DoctrineModule\\Stdlib\\Hydrator\\DoctrineObject($this->getEntityManager()));\n $form->bind($object);\n\n /*\n * Verifico el Post, valido formulario y persisto en caso positivo\n */\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n\n $form->setInputFilter($object->getInputFilter());\n if ($form->isValid()) {\n\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n $user = $this->zfcUserAuthentication()->getIdentity();\n }\n\n if ($new) {\n $object->setCreatedBy($user);\n $object->setLastUpdatedBy($user);\n } else {\n $object->setLastUpdatedBy($user);\n }\n\n\n $this->getEntityManager()->persist($object);\n $this->getEntityManager()->flush();\n $form->bind($object);\n $persist = true;\n } else {\n $persist = false;\n }\n }\n\n /*\n * Paso la variable persist a la view\n * Defino terminal true para no renderizar el layout (ajax)\n */\n $view = new ViewModel(array('form' => $form,\n 'persist' => $persist));\n $view->setTerminal(true);\n return $view;\n }"
]
| [
"0.70298886",
"0.65974236",
"0.6443187",
"0.6429276",
"0.64146805",
"0.6377842",
"0.6372164",
"0.6366241",
"0.6334275",
"0.6252145",
"0.6235883",
"0.615982",
"0.614666",
"0.60807306",
"0.6068801",
"0.6067389",
"0.6066465",
"0.605718",
"0.60552603",
"0.6022499",
"0.60184187",
"0.60134983",
"0.60097635",
"0.60050684",
"0.60030097",
"0.5984845",
"0.59822387",
"0.5981704",
"0.5980389",
"0.5972082"
]
| 0.81388676 | 0 |
Creates a form to delete a GdpMails entity by id. | private function createDeleteForm($id)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('gdpmails_delete', array('id' => $id)))
->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete'))
->getForm()
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('grupos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picture_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('propietario_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }",
"public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('achats_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('message'))\n ->add('annuler', 'reset', array ( 'label' => 'Annuler',\n 'attr' => array ( 'class' => 'btn btn-default' )\n )\n )\n ->getForm()\n ;\n }",
"private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picfooter_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admtipoaporte_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Eliminar','attr'=>array('class'=>'btn btn-danger')))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoasignar_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR ASIGNACION'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_missatges_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adtiposcomision_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifdainformeordentrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar informe'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('componentgroup_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl($this->mesRoutes[\"delete\"], array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('victoire_business_template_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, ['label' => 'Delete'])\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('posgradolineas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('endroit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }"
]
| [
"0.72619367",
"0.7247486",
"0.7209604",
"0.7196196",
"0.71796817",
"0.7173532",
"0.71676487",
"0.71637625",
"0.7155489",
"0.71530664",
"0.7146956",
"0.7139615",
"0.71217984",
"0.7121034",
"0.7118328",
"0.7107895",
"0.7102422",
"0.70921946",
"0.7087138",
"0.708161",
"0.70806193",
"0.70801634",
"0.70799136",
"0.70794386",
"0.70734644",
"0.7071504",
"0.7070081",
"0.70681065",
"0.70637417",
"0.7063537"
]
| 0.76997733 | 0 |
Display all available ( and validated ) services. | public function displayAllServices() {
$services = $this->userServiceManager->getServices(null, true);
$this->addCss(['search.css', 'forms.css']);
$this->showView('service/allServices', [
'services' => $services,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }",
"public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }",
"protected function renderServicesList() {}",
"public function index()\n {\n $services = $this->serviceRepositories->getServices();\n\n return view('backend.services.list', compact('services'));\n }",
"function showAllServiciosMVC()\n {\n $servicios = $this->serviciosModel->getServicios();\n $this->viewservices->showAllServicesPrint($servicios);\n }",
"public function getServices();",
"public function index()\n {\n $services = Service::all();\n return view(\"admin.services.index\", compact('services'));\n }",
"public function index()\n {\n $services = $this->service->all();\n return view('admin.service.index')->with('services', $services);\n }",
"public function index()\n {\n \n $all_servive = Services::all();\n return view('all_service')->with('services', $all_servive);\n }",
"public function index()\n {\n $services = services::all();\n return view('widegts::services.index',compact('services'));\n }",
"public function index()\n\t{\n\t\t$services = $this->service->all();\n\n\t\treturn View::make('services.index', compact('services'));\n\t}",
"public function index()\n {\n $services = Services::OrderBy('sequence')->get();\n\n return view('services.list', ['services' => $services]);\n }",
"public function index()\n {\n $Services = Service::all();\n return view('pagesystem.Service.index', compact('Services'));\n }",
"public function services()\n {\n $sahulatServices=$this->_service->getServices(\"Sahulat\");\n $vendorServices=$this->_service->getServices(\"Vendor\");\n return view('frontend.service.services')->with(compact('sahulatServices','vendorServices'));;\n }",
"public function index()\n {\n\n return view('smmpro::services.index', [\n 'services' => Service::orderBy('created_at', 'desc')->get()\n ]);\n }",
"public function index()\n {\n $services = Service::latest()->paginate(10);\n return view('admin.services.index', compact('services'));\n }",
"public function index()\n {\n $services = Service::latest()->get();\n return view('admin.services.index', compact('services'));\n }",
"public function listsServicesGet()\r\n {\r\n $response = Services::with('regimen')->get();\r\n return response()->json($response,200);\r\n }",
"public function getList()\n {\n $service = list_services::all();\n return view('page.services',compact('service'));\n }",
"public function index()\n {\n $title = 'Services';\n $modulo = 'services';\n $models = Service::all();\n $total = Service::all()->count();\n $fields = [\n 'id',\n 'name',\n 'description',\n 'created_at',\n 'updated_at'\n ];\n return view('list', compact('title', 'models', 'total', 'fields', 'modulo'));\n }",
"public function indexAction() {\n $this->require_login('ROLE_ORGANISER', 'service/index');\n\n $allservices = Admin::getServices();\n\n // submitted year\n $maxyear = Admin::getFilteryear();\n $filteryear = $this->getParam('filter_year', 0);\n if ($filteryear) {\n Session::write('filteryear', $filteryear);\n } else {\n $filteryear = Session::read('filteryear', $maxyear);\n }\n \n // get possible years and filter results\n $services = array();\n $years = array();\n $years['All'] = 'All'; \n foreach ($allservices as $service) {\n\n // munge some data for template while here\n $service->showbookingbutton = $service->visible and $_ENV['enablebooking'];\n\n $servicedate = $service->date;\n $year = substr($servicedate, 0, 4);\n $years[$year] = $year;\n if ($filteryear=='All' or $filteryear=='') {\n $services[] = $service;\n } else if ($year == $filteryear) {\n $services[] = $service;\n }\n }\n\n // get booking status\n $enablebooking = $_ENV['enablebooking'];\n\n // Create form\n $form = new \\stdClass();\n $form->filter_year = Form::select('filter_year', 'Tour season', $filteryear, $years, '', array(\n '@change' => 'datechange()'\n ));\n\n $this->View('service/index', array(\n 'services' => Admin::formatServices($services),\n 'is_services' => !empty($services),\n 'enablebooking' => $enablebooking,\n 'form' => $form,\n 'years' => $years,\n 'filteryear' => $filteryear,\n ));\n }",
"public function index()\r\n\t{\r\n\t\t$services = Service::all();\r\n\r\n\t\treturn View::make('services.index')\r\n\t\t\t->with('services', $services);\r\n\t}",
"public function show(Services $services)\n {\n //\n }",
"public function show(Services $services)\n {\n //\n }",
"public function show(Services $services)\n {\n //\n }",
"public function index()\n {\t\t\n return ServicesResource::collection(Services::all());\n }",
"public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }",
"public function index()\n {\n $services = Service::get();\n\n \n return view('dashboard.service.index',compact('services'));\n }",
"public function index()\n {\n $services = Service::paginate(10);\n return view('admin.service.index')->withServices($services);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $services = $em->getRepository('AppBundle:Service')->findAll();\n\n return $this->render('default/services.html.twig', array(\n 'services' => $services,\n ));\n }"
]
| [
"0.7252631",
"0.7187641",
"0.71697074",
"0.7118057",
"0.70620745",
"0.7050781",
"0.70186406",
"0.7003626",
"0.6979654",
"0.6951262",
"0.69470584",
"0.6923756",
"0.69005835",
"0.68831795",
"0.68758744",
"0.68757296",
"0.687021",
"0.6865213",
"0.6864922",
"0.68605167",
"0.68573856",
"0.68520534",
"0.6844966",
"0.6844966",
"0.6844966",
"0.68407476",
"0.6810367",
"0.680878",
"0.68076086",
"0.68029594"
]
| 0.8407879 | 0 |
Returns the number of filters. | public function count()
{
return count($this->_filters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function count($filters = array()) {\n\n return 1000;\n }",
"public static function countActiveFilters()\n {\n return count(self::$_activeFilters);\n }",
"public function getFilteredCount()\n\t{\n\t\treturn $this->filteredCount;\n\t}",
"public function count($filters)\n {\n $nb = $this->getQueryBuilderForAll($filters)\n ->getQuery()\n ->execute()\n ->count()\n ;\n return $nb;\n }",
"public function getCount()\n\t{\n\t\treturn $this->getFilteredCollection()->count();\n\t}",
"public function countAppliedFilters(Request $request): int\n {\n return collect($this->filters($request))\n ->filter->isSet($request)\n ->count();\n }",
"public function count($filters = array())\n\t{\n\t\t$sql = \"SELECT COUNT(*) FROM {$this->_tbl}\";\n\t\t$sql .= $this->_buildQuery($filters);\n\n\t\t$this->_db->setQuery($sql);\n\t\treturn $this->_db->loadResult();\n\t}",
"public function countByFilter(array $filter);",
"public function getSizeBeforeFiltersHaveBeenApplied() : int\n {\n return $this->getLoader()->getSizeBeforeFiltersHaveBeenApplied();\n }",
"public function getTotalItemCount($filters = [])\n {\n $itemCount = 0;\n foreach($this->items as $item) {\n if ($item->passFilters($filters)) {\n $itemCount++;\n };\n };\n return $itemCount;\n }",
"public function getTotalNumberOfRows(array $filters = array())\n {\n return 5;\n }",
"public function getFilteredTotal(): int\n {\n return $this->filteredCount;\n }",
"public function count(array $filters = array())\n {\n $select = $this->select();\n \n /*\n * Calling function from function/switchcase proccessFIlters\n */\n $this->processFilters($filters, $select);\n \n //Zend reset previously set columns\n //Also we can reset all queries LIKE:\n // WHERE, COLUMNS.\n $select->reset('columns');\n \n //set one column/field to fetch and it is function\n $select->from($this->_name,'COUNT(*) AS total');\n \n //Fetch/GET just one row from DB table\n $row = $this->fetchRow($select)->toArray();\n \n return $row['total'];\n }",
"public function count()\n {\n return count($this->getPipes());\n }",
"public final function count($filter='', $param=array())\n {\n if ($filter)\n $this->filter = $filter;\n\n if ($param)\n $this->param = $param;\n\n return $this->read('num');\n }",
"public static function fetchCount(array $filter = array())\n {\n return self::count( self::definition(), $filter);\n }",
"public function countByFilter(VisitFilter $filter) : int;",
"public function count()\n {\n return count($this->parameters);\n }",
"public function get_count($filter = array()) {\n\t\t$this -> db -> from('Question');\n\t\t$this -> filter($filter);\n\t\treturn $this -> db -> count_all_results();\n\t}",
"function count_filtered()\n {\n $this->_get_datatables_query();\n $query = $this->db->get();\n return $query->num_rows();\n }",
"public function getParamsCount()\n {\n return $this->count(self::_PARAMS);\n }",
"public function getParamsCount()\n {\n return $this->count(self::_PARAMS);\n }",
"public function count($filters) {\n $this->_filters($filters);\n $count = $this->db->count_all_results('products');\n return (object)array(\n 'status' => 'success',\n 'code' => 'products.success.count',\n 'data' => array('count' => $count)\n );\n }",
"public function count(array $locales = null, array $filters = null);",
"public function getRecordsFiltered(): int;",
"public function getBrandsListCount($filter = array())\n {\n $whereClause = $this->getElmFilter($filter, 'entities\\Brand', 'c', array('country'));\n if (!empty($whereClause)) {\n $whereClause = \" WHERE \" . $whereClause;\n }\n $query = $this->em->createQuery(\"SELECT COUNT(c) FROM entities\\Brand c \".$whereClause);\n return $query->getSingleScalarResult();\n }",
"public function getCount($filters=array())\n\t{\n\t\t$query = \"SELECT count(*) FROM $this->_tbl AS a\";\n\t\t$where = array();\n\t\tif ($filters['catid'] > 0)\n\t\t{\n\t\t\t$where[] = \"a.catid='\" . intval($filters['catid']) . \"'\";\n\t\t}\n\t\tif ($filters['search'])\n\t\t{\n\t\t\t$where[] = \"LOWER(a.title) LIKE \" . $this->_db->quote('%' . $filters['search'] . '%');\n\t\t}\n\n\t\t//did we pass in a scope id filter\n\t\tif (isset($filters['scope_id']) && $filters['scope_id'] != '' && $filters['scope_id'] != 0)\n\t\t{\n\t\t\t$where[] = \"a.scope=\" . $this->_db->quote('group');\n\t\t\t$where[] = \"a.scope_id=\" . $this->_db->quote($filters['scope_id']);\n\t\t}\n\n\t\t$query .= (count($where)) ? \" WHERE \" . implode(' AND ', $where) : \"\";\n\t\t$this->_db->setQuery($query);\n\t\treturn $this->_db->loadResult();\n\t}",
"public function Count($filters = array(), $options = array()) {\n\t\tif (!is_array($filters)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_array($options)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tlist($whereCondition, $aParams) = db::filters($filters);\n\t\tlist($searchCondition, $searchParams) = db::searchFilter($options);\n\t\t\n\t\tif (count($searchParams) > 0 && !empty($searchCondition)) {\n \t\t$whereCondition .= $searchCondition;\n \t\t$aParams = array_merge($aParams, $searchParams);\n\t\t}\n\t\t\n\t\t$sql = \"SELECT COUNT(*) AS cnt FROM \".$this->getTableName()\n\t\t\t\t.\" WHERE \".$whereCondition;\n\t\t$row = db::querySelect($sql, $aParams);\n\t\tif (isset($row['cnt'])) {\n\t\t\treturn $row['cnt'];\n\t\t}\n\t\treturn false;\n\t}",
"public function count_filtered(){\n $this->datatables_query();\n $query = $this->db->get();\n return $query->num_rows();\n }",
"public static function getCount()\n\t{\n\t\treturn self::find()->count();\n\t}"
]
| [
"0.8212421",
"0.8071703",
"0.7509339",
"0.7496974",
"0.7416118",
"0.7332905",
"0.7168981",
"0.7036285",
"0.6982051",
"0.69567597",
"0.6922746",
"0.6825242",
"0.6785987",
"0.6777178",
"0.6705086",
"0.67007613",
"0.66974866",
"0.6685318",
"0.663803",
"0.6606071",
"0.65987265",
"0.65987265",
"0.6582089",
"0.6581597",
"0.65696657",
"0.64884746",
"0.64821213",
"0.6450234",
"0.64376485",
"0.6403884"
]
| 0.8786861 | 0 |
Several functions were moved from cancel_computer.php3 as they were only ever used in this file and I didn't want to have to copy it to the newly created cancel_multi_computer.php | function SendConfirmation($computer, $cancel_data)
// Send a confirmation message to customers
// who have been suspended, UNLESS suspention
// is due to AUP violation or non-payment.
{
// I would have passed these as parameters,
// but it looks like the other functions
// in this file use a lot of global data too.
GLOBAL $db;
$is_AUP = $db->GetVal("
select 1
from offline_reasons
where reason_number = $cancel_data[reason_number]
and category_group in ( 500, 2900)
limit 1
");
$is_NonPay = $db->GetVal("
select 1
from offline_reasons
where reason_number = $cancel_data[reason_number]
and category_group in ( 400, 3000 )
limit 1
");
// Set up Mail Message
$parser = new core_parser;
$mailer = new core_mailer;
$mailer->SetAccountNumber( $computer->customer_number );
$mailer->AddAccountAddress(ONYX_ACCOUNT_ROLE_PRIMARY);
$mailer->SetAccountFrom(ACCOUNT_ROLE_ACCOUNT_EXECUTIVE);
$target_date = $cancel_data["sec_due_offline"];
$target_date = date("D F j, Y", $target_date);
$parser->AddVar('target_date', $target_date);
$parser->SetAccount($computer->account);
$parser->SetComputer($computer);
if( $is_NonPay ) {
// this call actually set variables inside th parser
//hence it needs to come before access to "subject"
$mailer->Body = $parser->ParseTextMessage( 27 );
$mailer->Subject = $parser->subject; // "Device Cancellation: Failure to Pay";
// pseudo: SUBJECT: "Device Cancellation: Failure to Pay"
// pseudo:+ FROM: AE
// pseudo:+ TO: Primary Contact
// pseudo:+ BODY: Prefab(27)
// pseudo:+ is NonPay
// pseudo:+ Send a confirmation message to customers who have been suspended, unless nonpay
$mailer->Send();
} elseif ( $is_AUP ) {
// Do Nothing
} else { // Normal Cancellation
error_log("**normal cancellation\n");
$mailer->Body = $parser->ParseTextMessage( 12 );
$mailer->Subject = $parser->subject; // "Device Cancellation Confirmation";
// pseudo: SUBJECT: "Device Cancellation Confirmation"
// pseudo:+ FROM: AE
// pseudo:+ TO: Primary Contact
// pseudo:+ BODY: Prefab(12)
// pseudo:+ is AUP
// pseudo:+ Send a confirmation message to customers who have been suspended, unless AUP
$mailer->Send();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cancel();",
"public function cancel(): void;",
"protected function _cancelOperation() {}",
"public function cancel(): int;",
"public function cancel()\n {\n }",
"public function cancel()\n {\n }",
"protected function cancel(): void\n {\n }",
"function ajax_cancelNow()\n{\n $cc = new CapabilityCheck('cancelNow', $_POST);\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $_POST['json'] = 1;\n $cpjm = new CPJobManager('cancelNow', $_POST);\n $cpjm->RunJob();\n\n}",
"public function cancelRequests()\n {\n $this->prepareCancel();\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n $path = $this->options['Action'].'Result';\n\n if ($this->mockMode) {\n $xml = $this->fetchMockFile()->$path;\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body'])->$path;\n }\n\n $this->parseXML($xml);\n }",
"function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}",
"function MakeCancelMsg() \n\t{\n\t\t$this->log->WriteLog( INFO, \"Make Cancel Msg Start\" );\n\t\tif( strcmp( $this->REQUEST[\"AuthTy\"], \"card\" ) == 0 )\n\t\t{\n\t\t\tif( strcmp( $this->REQUEST[\"SubTy\"], \"isp\" ) == 0 )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t*\n\t\t\t\t* [1-1] 신용카드승인취소 - ISP\n\t\t\t\t*\n\t\t\t\t* -- 이부분은 취소 승인 처리를 위해 PG서버Process와 Socket통신하는 부분이다.\n\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* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.\n\t\t\t\t* 결제종류(6)\t| 업체아이디(20) \t| 승인번호(20) \t| 승인시간(8)\t| 거래고유번호(6) |\n\t\t\t\t*\n\t\t\t\t* -- 취소 승인 응답 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.\n\t\t\t\t* 업체ID(20)\t| 승인번호(20)\t| 승인시각(8)\t| 전문코드(4)\t| 거래고유번호(6)\t| 성공여부(1)\t|\n\t\t\t\t*\t\t \n\t\t\t\t****************************************************************************/\n\t\t\t\t\n\t\t\t\t$this->ENCTYPE = 2;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\"cancel\".\"|\".\n\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t$this->GetResult(\"rApprNo\").\"|\".\n\t\t\t\tsubstr($this->GetResult(\"rApprTm\"),0,8).\"|\".\n\t\t\t\t$this->GetResult(\"rDealNo\").\"|\".\n\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n \n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\t}\n\t\t\telse if( ( strcmp( $this->REQUEST[\"SubTy\"], \"visa3d\" ) == 0 ) || ( strcmp( $this->REQUEST[\"SubTy\"], \"normal\" ) == 0 ) )\n\t\t\t{\n\t\t\t\t/****************************************************************************\n\t\t\t\t*\n\t\t\t\t* [1-2] 신용카드승인취소 - VISA3D, 일반\n\t\t\t\t*\n\t\t\t\t* -- 이부분은 취소 승인 처리를 위해 암호화Process와 Socket통신하는 부분이다.\n\t\t\t\t* 가장 핵심이 되는 부분이므로 수정후에는 실제 서비스전까지 적절한 테스트를 하여야 한다.\n\t\t\t\t*\n\t\t\t\t* -- 취소 승인 요청 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 카드번호,유효기간,비밀번호,주민번호는 암호화된다.)\n\t\t\t\t* 결제종류(6)\t| 업체아이디(20) \t| 승인번호(8) \t| 승인시간(14) \t| 카드번호(16) \t|\n\t\t\t\t*\n\t\t\t\t* -- 취소 승인 응답 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t\t* 업체ID(20)\t| 승인번호(8)\t| 승인시각(14)\t| 전문코드(4)\t| 성공여부(1)\t|\n\t\t\t\t* 주문번호(20)\t| 할부개월(2)\t| 결제금액(20)\t| 카드사명(20)\t| 카드사코드(4) \t|\n\t\t\t\t* 가맹점번호(15)\t| 매입사코드(4)\t| 매입사명(20)\t| 전표번호(6)\n\t\t\t\t*\t\t \n\t\t\t\t****************************************************************************/\n\t\t\t\t\n\t\t\t\t$this->ENCTYPE = 0;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\"cancel\".\"|\".\n\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t$this->GetResult(\"rApprNo\").\"|\".\n\t\t\t\tsubstr($this->GetResult(\"rApprTm\"),0,8).\"|\".\n\t\t\t\t$this->GetResult(\"rDealNo\").\"|\".\n\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n\n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\t}\n\t\t}else if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHE_SOCKETYN\"], \"Y\" ) == 0){\n\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* [2-1] 인터넷뱅킹 계좌이체(소켓) 취소처리\n\t\t\t\t* \n\t\t\t\t* -- 이부분은 인터넷뱅킹 결제 취소처리를 위해 암호화Process와 Socket통신하는 부분이다.\n\t\t\t\t* 가장 핵심이 되는 부분이므로 수정후에는 실제 서비스전까지 적절한 테스트를 하여야 한다.\n\t\t\t\t* -- 데이터 길이는 매뉴얼 참고\n\t\t\t\t* \n\t\t\t\t* -- 인터넷뱅킹 결제 요청 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t\t* 결제종류(10)\t\t| 업체ID(20)\t\t| MTID(계좌이체결제 결과값)\t\t| 결제금액(8)\t\t| 은행코드(2)\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->ENCTYPE = R;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\t\"RB-CanReq\".\"|\".\n\t\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t\t$this->GetResult(\"ICHE_POSMTID\").\"|\".\n\t\t\t\t\t$this->GetResult(\"Amt\").\"|\".\n\t\t\t\t\t$this->GetResult(\"ICHE_OUTBANKNAME\").\"|\".\n\t\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n\t\t\t\t\t\n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\n\t\t}else if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHEARS_SOCKETYN\"], \"Y\" ) == 0){\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* [2-1] 텔레뱅킹 계좌이체(소켓) 취소처리\n\t\t\t\t* \n\t\t\t\t* -- 이부분은 텔레뱅킹 결제 취소처리를 위해 암호화Process와 Socket통신하는 부분이다.\n\t\t\t\t* 가장 핵심이 되는 부분이므로 수정후에는 실제 서비스전까지 적절한 테스트를 하여야 한다.\n\t\t\t\t* -- 데이터 길이는 매뉴얼 참고\n\t\t\t\t* \n\t\t\t\t* -- 텔레뱅킹 결제 요청 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t\t* 결제종류(10)\t\t| 업체ID(20)\t\t| MTID(계좌이체결제 결과값)\t\t| 결제금액(8)\t\t| 은행코드(2)\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->ENCTYPE = B;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\t\"TB-CanReq\".\"|\".\n\t\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t\t\"\".\"|\".\n\t\t\t\t\t\"\".\"|\".\n\t\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n\t\t\t\t\t\n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\n\t\t}else if( strcmp( $this->REQUEST[\"AuthTy\"], \"hp\" ) == 0 ){\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* [3] 핸드폰 취소처리\n\t\t\t\t* \n\t\t\t\t* -- 이부분은 핸드폰 결제 취소처리를 위해 암호화Process와 Socket통신하는 부분이다.\n\t\t\t\t* 가장 핵심이 되는 부분이므로 수정후에는 실제 서비스전까지 적절한 테스트를 하여야 한다.\n\t\t\t\t* -- 데이터 길이는 매뉴얼 참고\n\t\t\t\t* \n\t\t\t\t* -- 핸드폰 결제 요청 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t\t* 결제종류(10)\t\t| 업체ID(20)\t| NetCancID\t\t|\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->ENCTYPE = H;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\t\"MobileCanReq\".\"|\".\n\t\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n\t\t\t\t\t\n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\n\t\t}else if( strcmp( $this->REQUEST[\"AuthTy\"], \"ars\" ) == 0 ){\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* [4] ARS 취소처리\n\t\t\t\t* \n\t\t\t\t* -- 이부분은 ARS 결제 취소처리를 위해 암호화Process와 Socket통신하는 부분이다.\n\t\t\t\t* 가장 핵심이 되는 부분이므로 수정후에는 실제 서비스전까지 적절한 테스트를 하여야 한다.\n\t\t\t\t* -- 데이터 길이는 매뉴얼 참고\n\t\t\t\t* \n\t\t\t\t* -- ARS 결제 요청 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 암호화여부(1) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t\t* 결제종류(10)\t\t| 업체ID(20)\t| NetCancID\t\t|\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\n\t\t\t\t$this->ENCTYPE = A;\n\t\t\t\t\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* 전송 전문 Make\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\t\t\t\t$this->sDataMsg = $this->ENCTYPE.\n\t\t\t\t\t\"ARSCanReq\".\"|\".\n\t\t\t\t\t$this->GetResult(\"StoreId\").\"|\".\n\t\t\t\t\t$this->GetResult(\"NetCancID\").\"|\";\n\t\t\t\t\t\n\t\t\t\t$this->sSendMsg = sprintf( \"%06d%s\", strlen( $this->sDataMsg ), $this->sDataMsg );\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Make Cancel MSG OK \" );\n\t\t\n\t\t}else{\n\t\t\t//신용카드,계좌이체 이외의 결제수단은 취소기능 적용되지 않음.\n\t\t\t$this->log->WriteLog( WARN, \"Cancel Passed. AuthTy : [\".$this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\"] \" );\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = \"n\";\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = \"Cannot Cancel AuthTy[\".$this->REQUEST[\"AuthTy\"].\"]\";\t\t\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t$this->log->WriteLog( INFO, \"Make Cancel Msg End\" );\n\t\treturn true;\n\t}",
"public function cancel_traveler_booking($tourwise_id, $traveler_id_arr, $first_names_arr)\n{\n begin_t();\n for($i=0; $i<sizeof($traveler_id_arr); $i++)\n {\n $sq_cancel = mysql_query(\"update travelers_details set status='Cancel' where traveler_id='$traveler_id_arr[$i]'\");\n if(!$sq_cancel)\n {\n $GLOBALS['flag'] = false;\n echo \"error--Sorry, some members are not canceled.\";\n //exit;\n } \n } \n\n\n if($GLOBALS['flag']){\n commit_t();\n //Cancelation mail send\n $this->traveler_cancelation_mail_send($tourwise_id, $traveler_id_arr);\n\n //Cancelation sms send\n $this->traveler_cancelation_sms_send($tourwise_id);\n\n echo \"Group Booking Cancellation is successfully done.\";\n exit;\n }\n else{\n rollback_t();\n exit;\n }\n\n \n}",
"function cancelUser( $option ) {\r\n\tmosRedirect( 'index2.php?ca='. $option .'&task=view' );\r\n}",
"public function actionCancel()\n {\n }",
"function PKG_discardJobs($client)\n{\n\tCHECK_FW(CC_clientname, $client);\n\t$sql=\"DELETE FROM clientjobs WHERE client='$client' AND status='wait4acc';\";\n\tDB_query($sql); //FW ok\n}",
"protected function cancelEdit()\n {\n if ($this->backup == NULL && $this->current) {\n $this->plugins[$this->current] = new $this->current($this->dn, $this);\n $this->plugins[$this->current]->set_acl_base($this->acl_base);\n $this->plugins[$this->current]->set_acl_category(preg_replace(\"/\\/$/\", \"\", $this->acl_category));\n\n } elseif (is_array($this->backup)) {\n foreach ($this->backup as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n }\n $this->backup = NULL;\n $this->current = \"\";\n $this->closeDialogs();\n }",
"function PKG_discardJob($client, $package)\n{\n\tCHECK_FW(CC_clientname, $client, CC_package, $package);\n\t$sql=\"DELETE FROM clientjobs WHERE client='$client' AND status='wait4acc' AND package='$package';\";\n\tDB_query($sql); //FW ok\n}",
"function cancel() {\n\n\n echo \"<br/><p><b>The order was canceled!</b></p><br />\";\n foreach ($_POST as $key => $value) {\n echo \"$key: $value<br>\";\n }\n }",
"function PKG_discardNormalJob($client,$packageName)\n{\n\tCHECK_FW(CC_clientname, $client, CC_package, $packageName);\n\t$sql = \"DELETE FROM `clientjobs` WHERE client='$client' AND status='wait4acc' AND package='m23normal' AND normalPackage='$packageName';\";\n\n\tDB_query($sql); //FW ok\n}",
"function cancel(){\n\t\t//echo \"In Cancel\";\n\t\t\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ';\n\t\t//echo JFactory::getDate('now', JFactory::getApplication()->getCfg('offset'))->toFormat() . \"\\n<br/><br/>\";\n\t\t\n\t\t//$date = JFactory::getDate();\n\t\t//$date->setOffset(JFactory::getApplication()->getCfg('offset'));\n\t \n\t \t//echo \"Offset: \" . JFactory::getApplication()->getCfg('offset');\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat() . \"\\n\";\n\t\t$date =& JFactory::getDate($time= 'now', $tzOffset=0);\n\n\t\t//$date->setOffset($mainframe->getCfg('offset'));\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat();\n\t\t\n\t\t//echo \"New date: \" . date('Y-m-d H:i:s');\n\n\t\t//return false;\n\t\t\n\t\t$insData =new stdClass();\n\t\t$insData->idt_drivin_event_apply = $_POST['appCanId'];\n\n\t\t//$date = new DateTime();\n\t\t$insData->dt_cancel = date('Y-m-d H:i:s'); //'CURRENT_TIMESTAMP';//$date->getTimestamp();\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->updateObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;//resendCancelEmailById($insData->idt_drivin_event_apply);\n\t}",
"function updateCancelInMain($village)\n{\n\tglobal $db;\n\tif(!empty($_GET['cancel']) && is_numeric($_GET['cancel']))\n\t{\n\t\t$sql=\"DELETE FROM wg_status WHERE id=\".$_GET['cancel'].\" AND village_id=$village AND type=17 AND status=0\";\n\t\t$db->setQuery($sql);\n\t\t$db->query();\n\t\tif($db->getAffectedRows()==0)\n\t\t{\n\t\t\tglobalError2('function updateCancelInMain:'.$sql);\n\t\t}\n\t\theader(\"Location:build.php?id=\".$_GET['id'].\"\");\n\t\texit();\n\t}\n\treturn NULL;\n}",
"function deactivate_ipc(){\n\t\t\n\t\t}",
"public function cancel() {\n # cleanup code before cancellng job\n $ret = array('message'=>'You cancelled this job at '.date('H:i:s'));\n return $ret;\n }",
"function PKG_discardRemoveJob($client,$packageName)\n{\n\tCHECK_FW(CC_clientname, $client, CC_package, $packageName);\n\n\t$sql = \"DELETE FROM `clientjobs` WHERE client='$client' AND status='wait4acc' AND package='m23normalRemove' AND normalPackage='$packageName';\";\n\n\tDB_query($sql); //FW ok\n}",
"function PKG_rmSelectedPackages($amount,$client)\n{\n$count=0;\nfor ($i=0; $i < $amount; $i++)\n\t{\n\t\t$var=\"CB_rmNormalpkg\".$i;\n\t\tif (!empty($_POST[$var]))\n\t\t\t{\n\t\t\t\tPKG_discardNormalJob($client,$_POST[$var]);\n\t\t\t\t$count++;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\t$var=\"CB_rmpkg\".$i;\n\t\t\t\tif (!empty($_POST[$var]))\n\t\t\t\t\t{\n\t\t\t\t\t\tPKG_discardJob($client, $_POST[$var]);\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$var=\"CB_rmNormalRemovepkg\".$i;\n\t\t\t\t\t\tif (!empty($_POST[$var]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPKG_discardRemoveJob($client,$_POST[$var]);\n\t\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t}\nreturn($counter);\n}",
"public function delete_computer(){\r\n\t\t$result = $this->c->delete_computer();\r\n\t\t$msg['success'] = false;\r\n\t\tif($result){\r\n\t\t\t$msg['success'] = true;\r\n\t\t}\r\n\t\techo json_encode($msg);\r\n\t}",
"function ajax_serverActions()\n{\n\n $cc = new CapabilityCheck('serverActions', $_POST);\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('serverActions', $_POST);\n $cpjm->RunJob();\n\n}",
"public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }",
"protected function prepareCancel()\n {\n include $this->env;\n $this->options['Action'] = 'CancelReportRequests';\n if (isset($THROTTLE_LIMIT_REPORTREQUESTLIST)) {\n $this->throttleLimit = $THROTTLE_LIMIT_REPORTREQUESTLIST;\n }\n if (isset($THROTTLE_TIME_REPORTREQUESTLIST)) {\n $this->throttleTime = $THROTTLE_TIME_REPORTREQUESTLIST;\n }\n $this->throttleGroup = 'CancelReportRequests';\n unset($this->options['MaxCount']);\n unset($this->options['NextToken']);\n }",
"public function cancelClassByStudent_post()\n {\n /* code goes here */\n }"
]
| [
"0.6159684",
"0.59867156",
"0.5975934",
"0.59523803",
"0.5910269",
"0.5910269",
"0.58630073",
"0.56682074",
"0.56491554",
"0.5522898",
"0.5480505",
"0.54304194",
"0.54165524",
"0.5416165",
"0.53679794",
"0.53427505",
"0.5339265",
"0.5290827",
"0.52850544",
"0.5284578",
"0.52791816",
"0.52691895",
"0.5255548",
"0.525002",
"0.5245143",
"0.5173895",
"0.5171447",
"0.51593196",
"0.51406205",
"0.5123563"
]
| 0.63469315 | 0 |
Given a reason number, it resolves the numeric category group to a name | function getReasonCategory($reason_number)
{
global $db;
$category_group_info = $db->GetVal("
SELECT
category_group_name
FROM
offline_reasons
JOIN offline_reason_groups USING (category_group)
WHERE
reason_number = $reason_number");
return($category_group_info);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function groups_parse_name($format, $groupnumber) {\n if (strstr($format, '@') !== false) { // Convert $groupnumber to a character series\n $letter = 'A';\n for($i=0; $i<$groupnumber; $i++) {\n $letter++;\n }\n $str = str_replace('@', $letter, $format);\n } else {\n $str = str_replace('#', $groupnumber+1, $format);\n }\n return($str);\n}",
"function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function addCategoryToGroupByName($gorup_name, $category_name);",
"function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"private function refine($category)\n {\n $category = trim(ucwords(strtolower($category)));\n if ($category == 'Lifestyle (sociology)') {\n return 'Lifestyle';\n }\n if ($category == 'Sports') {\n return 'Sport';\n }\n if ($category == 'Humor') {\n return 'Comedy';\n }\n if ($category == 'Humour') {\n return 'Comedy';\n }\n if ($category == 'Pet') {\n return 'Animals';\n }\n if ($category == 'Diy') {\n return 'DIY';\n }\n if ($category == 'Association Football') {\n return 'Soccer';\n }\n return $category;\n }",
"protected function ordinal($number)\n {\n return (isset($this->dict[$number]))\n ? $this->dict[$number]\n : 'th';\n }",
"private function getCategoryNameById($categoryId)\n {\n if (!isset($this->categories[$categoryId])) {\n throw new Exception('No such category found.');\n }\n\n return $this->categories[$categoryId];\n }",
"public function getOrdinalSuffix($number) {\n $number = abs($number);\n $lastChar = substr($number, -1, 1);\n switch ($lastChar) {\n case '1' : return ($number == '11') ? 'th' : 'st';\n case '2' : return ($number == '12') ? 'th' : 'nd';\n case '3' : return ($number == '13') ? 'th' : 'rd';\n }\n return 'th';\n }",
"public function getGroupName()\n {\n switch($this->group) {\n case \"lower_secondary\":\n return \"Lower Secondary\";\n case \"upper_secondary\":\n return \"Upper Secondary\";\n case \"undergraduate\":\n return \"Undergraduate\";\n default:\n return \"Unknown\";\n }\n }",
"function cat_id_to_name($id) {\r\n\tforeach((array)(get_categories()) as $category) {\r\n \tif ($id == $category->cat_ID) { return $category->cat_name; break; }\r\n\t}\r\n}",
"function getGroupShortName($group)\n {\n return '';\n }",
"function ordinal_suffix($number)\n {\n $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');\n if ((($number % 100) >= 11) && (($number % 100) <= 13)) {\n return $number . 'th';\n } else {\n return $number . $ends[$number % 10];\n }\n }",
"function _getOrdinal($nr) {\n $digit = substr($nr, -1);\n if (!in_array($digit, array(1, 2, 3)) || in_array($nr, array(11, 12, 13))) {\n return 'th';\n }\n switch ($digit) {\n case 1:\n return 'st';\n case 2:\n return 'nd';\n case 3:\n return 'rd';\n }\n return 'th';\n }",
"public function convert_category_titles()\n\t{\n\t\t$category \t= $split_cat = ee()->TMPL->fetch_param('category');\n\n\t\tif (strtolower(substr($split_cat, 0, 3)) == 'not')\n\t\t{\n\t\t\t$split_cat = substr($split_cat, 3);\n\t\t}\n\n\t\t$categories = preg_split(\n\t\t\t'/' . preg_quote('&') . '|' . preg_quote('|') . '/',\n\t\t\t$split_cat,\n\t\t\t-1,\n\t\t\tPREG_SPLIT_NO_EMPTY\n\t\t);\n\n\t\t$to_fix = array();\n\n\t\tforeach ($categories as $cat)\n\t\t{\n\t\t\tif (preg_match('/\\w+/', trim($cat)))\n\t\t\t{\n\t\t\t\t$to_fix[trim($cat)] = 0;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty ($to_fix))\n\t\t{\n\t\t\t$cats = ee()->db->query(\n\t\t\t\t\"SELECT cat_id, cat_url_title\n\t\t\t\t FROM \texp_categories\n\t\t\t\t WHERE \tcat_url_title\n\t\t\t\t IN \t('\" . implode(\"','\", ee()->db->escape_str(array_keys($to_fix))) . \"')\"\n\t\t\t);\n\n\t\t\tforeach ($cats->result_array() as $row)\n\t\t\t{\n\t\t\t\t$to_fix[$row['cat_url_title']] = $row['cat_id'];\n\t\t\t}\n\n\t\t\tkrsort($to_fix);\n\n\t\t\tforeach ($to_fix as $cat => $id)\n\t\t\t{\n\t\t\t\tif ($id != 0)\n\t\t\t\t{\n\t\t\t\t\t$category = str_replace($cat, $id, $category);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tee()->TMPL->tagparams['category'] = $category;\n\t\t}\n\t}",
"private function getReasonIdByName($dataset, $reason)\n {\n $result = $this->getTwoArraysLookup($dataset, $reason);\n\n return Reason::where('work_not_proceeding_reason', '=', $result)\n ->first()\n ->id;\n }",
"function get_descriptive_classification( $classification ) {\n switch ( $classification ) {\n case 1: $out = 'LL'; break;\n case 2: $out = 'LS'; break;\n case 3: $out = 'LH'; break;\n case 4: $out = 'LE'; break;\n\t\t\tcase 5: $out = 'OHS'; break;\n\t\t\tcase 6: $out = 'Q'; break;\n\t\t\tcase 7: $out = 'P'; break;\n default: $out = 'Undefined'; break;\n }\n return $out;\n }",
"function _dcngettext($domain, $singular, $plural, $number, $category)\r\n\t{\r\n\t\t$l10n = _get_reader($domain, $category);\r\n\t\treturn _encode($l10n->ngettext($singular, $plural, $number));\r\n\t}",
"public function get_cat_name() {\n $c = $this->cat;\n $tmp = \"\";\n switch($c) {\n case 1:\n $tmp = \"News\";\n break;\n case 2:\n $tmp = \"Eventi\";\n break;\n case 3:\n $tmp = \"Pubblicazioni\";\n break;\n }\n return $tmp;\n }",
"function ordinal_suffix($n) {\n $n_last = $n % 100;\n if (($n_last > 10 && $n_last < 14) || $n == 0){\n return \"{$n}th\";\n }\n switch(substr($n, -1)) {\n case '1': return \"{$n}st\";\n case '2': return \"{$n}nd\";\n case '3': return \"{$n}rd\";\n default: return \"{$n}th\";\n }\n}",
"public static function code($category) {\n\t\treturn strtolower(substr($category['displayName'], 0, 2));\n\t}",
"function getCategory($pid) {\n srand(MAGIC_KEY * $pid);\n return (rand() % 12) + 1;\n}",
"public function getDayName($day_number, $abbreviation = false);",
"function surveyCodeToName($surveyCode) {\n\tswitch($surveyCode) {\n\t\tcase HW_PROJECT_VALUE:\n\t\t\treturn HW_PROJECT_NAME;\n\t\tcase CHD_PROJECT_VALUE:\n\t\t\treturn CHD_PROJECT_NAME;\n\t\tcase COMB_PROJECT_VALUE:\n\t\t\treturn COMB_PROJECT_NAME;\n\t}\n}",
"public function categoryName() {\n $categories = array(\n 'Fantasy',\n 'Technology',\n 'Thriller',\n 'Documentation',\n );\n\n return $categories[array_rand($categories)];\n }",
"abstract public function getGroupName();",
"function number_suffix($number){\n\t\tif ( is_numeric($number)){\n\t\t\t// Get the last two digits (only once)\n\t\t\t$n = $number % 100;\n\t\t} else {\n\t\t\t// If the last two characters are numbers\n\t\t\tif ( preg_match( '/[0-9]?[0-9]$/', $number, $matches )){\n\t\t\t\t// Return the last one or two digits\n\t\t\t\t$n = array_pop($matches);\n\t\t\t} else {\n\t\t\t\t// Return the string, we can add a suffix to it\n\t\t\t\treturn $number;\n\t\t\t}\n\t\t}\n\t\t// Skip the switch for as many numbers as possible.\n\t\tif ( $n > 3 && $n < 21 )\n\t\t\treturn $number . 'th';\n\t\t// Determine the suffix for numbers ending in 1, 2 or 3, otherwise add a 'th'\n\t\tswitch ( $n % 10 ){\n\t\tcase '1': return $number . 'st';\n\t\tcase '2': return $number . 'nd';\n\t\tcase '3': return $number . 'rd';\n\t\tdefault: return $number . 'th';\n\t\t}\n\t}",
"public static function getKindName(int $kind): string\n {\n $name = self::KIND_LOOKUP[$kind] ?? null;\n if (!$name) {\n throw new \\LogicException(\"Unknown kind $kind\");\n }\n return $name;\n }",
"public function getCategoryIndexFromStringOrNumberReturnsIndexDataProvider() {}",
"private function getNumberToText(int $number): string {\n\t\tswitch($number) {\n\t\t\tcase 0:\n\t\t\t\treturn Language::out()->get0Name();\n\t\t\tcase 1:\n\t\t\t\treturn Language::out()->get1Name();\n\t\t\tcase 2:\n\t\t\t\treturn Language::out()->get2Name();\n\t\t\tcase 3:\n\t\t\t\treturn Language::out()->get3Name();\n\t\t\tcase 4:\n\t\t\t\treturn Language::out()->get4Name();\n\t\t\tcase 5:\n\t\t\t\treturn Language::out()->get5Name();\n\t\t\tcase 6:\n\t\t\t\treturn Language::out()->get6Name();\n\t\t\tcase 7:\n\t\t\t\treturn Language::out()->get7Name();\n\t\t\tcase 8:\n\t\t\t\treturn Language::out()->get8Name();\n\t\t\tcase 9:\n\t\t\t\treturn Language::out()->get9Name();\n\t\t\tdefault:\n\t\t\t\treturn (string) $number;\n\t\t}\n\t}",
"public function number_to_ranking($number) {\n \t//array with all rankings as number and offcial name (//if 5 points two possibilities: N.G. / C+30/5)\n \t$rankings = ['5'\t=> 'C+30/5',\n \t\t\t\t '10'\t=> 'C+30/4',\n \t\t\t\t '15'\t=> 'C+30/3',\n \t\t\t\t '20'\t=> 'C+30/2',\n \t\t\t\t '25'\t=> 'C+30/1',\n \t\t\t\t '30'\t=> 'C+30',\n \t\t\t\t '35'\t=> 'C+15/5',\n \t\t\t\t '40'\t=> 'C+15/4',\n \t\t\t\t '45'\t=> 'C+15/3',\n \t\t\t\t '50'\t=> 'C+15/2',\n \t\t\t\t '55'\t=> 'C+15/1',\n \t\t\t\t '60'\t=> 'C+15',\n \t\t\t\t '65'\t=> 'B+4/6',\n \t\t\t\t '70'\t=> 'B+2/6',\n \t\t\t\t '75'\t=> 'B0',\n \t\t\t\t '80'\t=> 'B-2/6',\n \t\t\t\t '85'\t=> 'B-4/6',\n \t\t\t\t '90'\t=> 'B-15',\n \t\t\t\t '95'\t=> 'B-15/1',\n \t\t\t\t '100'\t=> 'B-15/2',\n \t\t\t\t '105'\t=> 'B-15/4',\n \t\t\t\t '110'\t=> 'A nationaal',\n \t\t\t\t '115'\t=> 'A internationaal'];\n \tif($number) {\n \t\t$ranking = $rankings[$number] . ' (' . $number . ')';\n \t}\n \telse {\n \t\t$ranking = null;\n \t}\n \treturn $ranking;\n }"
]
| [
"0.5417614",
"0.520743",
"0.5187734",
"0.5062734",
"0.5046812",
"0.5031372",
"0.4956008",
"0.49444664",
"0.4900403",
"0.48873132",
"0.48361897",
"0.4803727",
"0.4799904",
"0.4793611",
"0.47770697",
"0.47741404",
"0.47711176",
"0.4765816",
"0.47602147",
"0.47515997",
"0.47349864",
"0.4710312",
"0.47038236",
"0.46901327",
"0.46641463",
"0.46373922",
"0.46046817",
"0.45880607",
"0.45841914",
"0.45837873"
]
| 0.70032495 | 0 |
Detect field type from Doctrine Annotations | private function detectFieldType($class, $field)
{
$annotations = $this->annotationReader->getPropertyAnnotations(new \ReflectionProperty($class, $field));
$mappingColumn = array_filter($annotations, function($item) {
return $item instanceof \Doctrine\ORM\Mapping\Column;
});
$mappingColumnCurrent = current($mappingColumn);
return ($mappingColumnCurrent->type === 'string') ? 'text' : 'textarea';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTypeOfField($fieldName);",
"function is_field_type($name)\n {\n }",
"abstract public function getColumnTypeByField(Entity\\ScalarField $field);",
"protected abstract function get_rest_field_type();",
"public function getDbFieldType()\n {\n }",
"public function getTypeOfField($fieldName)\n {\n }",
"function get_field_type($name)\n {\n }",
"function get_field_types()\n {\n }",
"public function getType()\n\t{\n\t\t$annotations = $this->parseAnnotations();\n\t\treturn EloquentIterable::wrap($annotations)\n\t\t\t->filter(function ($annotation) {\n\t\t\t\treturn $annotation->getAnnotation() == '@var';\n\t\t\t})->transform(function ($annotation) {\n\t\t\t\treturn $annotation->getType();\n\t\t\t})->first();\n\t}",
"function _drush_behat_get_entity_field_types($entity_type) {\n $return = array();\n $fields = \\Drupal::entityManager()->getFieldStorageDefinitions($entity_type);\n foreach ($fields as $field_name => $field) {\n if (_drush_behat_is_field($entity_type, $field_name)) {\n $return[$field_name] = $field->getType();\n }\n }\n return $return;\n}",
"public function getType() {\n return $this->field->type;\n }",
"function oci_field_type($statement, $field)\n{\n}",
"public function get_rest_field_type()\n {\n }",
"public function get_rest_field_type()\n {\n }",
"public function get_rest_field_type()\n {\n }",
"public function get_rest_field_type()\n {\n }",
"function drush_behat_op_is_field($is_field_info) {\n list($entity_type, $field_name) = $is_field_info;\n return _drush_behat_is_field($entity_type, $field_name);\n}",
"public function getFieldType($fieldname);",
"public function getDataWithTypeField() {}",
"public function isAnnotation();",
"function getFieldType() {\n\t\treturn 'field';\n\t}",
"public function getTypeDoctrine()\n {\n if (isset(self::$doctrineTypeMap[$this->getType()])) {\n return self::$doctrineTypeMap[$this->getType()];\n }\n\n // our fallback default\n return self::$doctrineTypeMap[self::TYPE_STRING];\n }",
"public function getTypeAttribute();",
"function get_field_type($field)\n\t{\n\t\tif( $field == \"usr_email\" )\n\t\t\treturn \"email\";\n\t\telse if( $field == \"usr_cod_postal\" )\n\t\t\treturn \"number\";\n\t\telse\n\t\t\treturn \"text\";\n\t}",
"function register_field_type($class)\n {\n }",
"public abstract function getTypeAttribute();",
"public function fieldType($field) {\n\t\tif (strstr($field, \".\")) {\n\t\t\t// use the path to get to the data poing\n\t\t\t$fieldParts = explode(\".\", $field);\n\t\t\t$key = array_pop($fieldParts);\n\t\t\t\n\t\t\t// add the field parts to the entityPath to get the correct model\n\t\t\tEntity::_setEntityPath($fieldParts);\n\t\t} else {\n\t\t\t$key = $field;\n\t\t\t$fieldParts = array();\n\t\t}\n\t\t\n\t\t$model = Entity::currentPathClass();\n\t\t\n\t\tEntity::_revertEntityPath(count($fieldParts));\n\t\t\n\t\tApp::uses($model, \"Model\");\n\t\t\n\t\t$modelConf = $this->entityConfig($model, \"Fields\", $key);\n\t\t\t\n\t\tif (is_array($modelConf) && isset($modelConf['type'])) {\n\t\t\treturn $modelConf['type'];\n\t\t}\n\t\t\n\t\tif ($key == $this->primaryKey($model)) {\n\t\t\treturn \"primary\";\n\t\t}\n\n\t\t// if field is not defined in db, and it's not a defined html helper func, then just print whatever it is\n\t\t$types = $this->entityFields($model);\n\t\t\n\t\tif (@$types[$key] == \"virtual\") {\n\t\t\t$type = \"text\";\n\t\t} else {\n\t\t\tif (isset($types[$key]))\n\t\t\t\t$type = $types[$key];\n\t\t\telse\n\t\t\t\t$type = \"text\";\n\t\t}\n\t\t\n\t\tif (substr($type, 0, 5) == \"enum(\") {\n\t\t\t$this->_enumopts[$key] = explode(\"','\", substr($type, 6, -2));\n\t\t\t$type = \"enum\";\n\t\t}\n\t\t\n\t\treturn $type;\n\t}",
"public function getFieldType() {\n\t\t$subject = $this->Changelog()->getSubject();\n\t\t$field = $this->FieldName;\n\n\t\tif ($class = $subject->db($field)) {\n\t\t\treturn Extension::get_classname_without_arguments($class);\n\t\t} elseif(substr($field, -2) == 'ID') {\n\t\t\tif ($subject->has_one(substr($field, 0, -2))) return 'ForeignKey';\n\t\t}\n\n\t\tthrow new Exception('The corresponding field type could not be found.');\n\t}",
"function acf_get_field_type($name)\n{\n}",
"function entity_type_inheritable_fields($entity_type) {\n}"
]
| [
"0.65620965",
"0.61394083",
"0.6078466",
"0.60764545",
"0.6006963",
"0.5967719",
"0.59378195",
"0.591797",
"0.5905287",
"0.5898793",
"0.58525574",
"0.5837473",
"0.57930267",
"0.57930267",
"0.57930267",
"0.57930267",
"0.5754573",
"0.57108194",
"0.5683082",
"0.56576204",
"0.56443524",
"0.5637777",
"0.55585915",
"0.5480079",
"0.5476264",
"0.5472016",
"0.5467157",
"0.54633427",
"0.54632413",
"0.54611325"
]
| 0.61660296 | 1 |
Helper function to register a list of hooks. | private function registerHooks(array $hooks, $shopList = null)
{
foreach($hooks as $hook) {
$this->registerHook($hook, $shopList);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function register_hook_callbacks();",
"abstract protected function register_hook_callbacks();",
"public function register(\\WpOrg\\Requests\\Hooks $hooks)\n {\n }",
"public function register(\\WpOrg\\Requests\\Hooks $hooks)\n {\n }",
"protected function registerHooks() {\n\t\t$hooks = $this->elgg()->hooks;\n\t\t\n\t\t$hooks->registerHandler('action:validate', 'notifications/settings', __NAMESPACE__ . '\\Notifications::saveUserNotificationsSettings');\n\t\t$hooks->registerHandler('entity:url', 'object', __NAMESPACE__ . '\\Widgets::widgetTitleURL');\n\t\t$hooks->registerHandler('export:counters', 'elasticsearch', __NAMESPACE__ . '\\Elasticsearch::exportCounter');\n\t\t$hooks->registerHandler('group_tool_widgets', 'widget_manager', __NAMESPACE__ . '\\Widgets::groupToolBasedWidgets');\n\t\t$hooks->registerHandler('handlers', 'widgets', __NAMESPACE__ . '\\Widgets::registerHandlers');\n\t\t$hooks->registerHandler('prepare', 'notification:create:object:thewire', __NAMESPACE__ . '\\Notifications::prepareNotificationSubject', 600);\n\t\t$hooks->registerHandler('prepare', 'notification:create:object:thewire', __NAMESPACE__ . '\\Notifications::prepareReshareNotification', 700);\n\t\t$hooks->registerHandler('register', 'menu:entity', __NAMESPACE__ . '\\Menus::entityRegisterImprove', 501);\n\t\t$hooks->registerHandler('register', 'menu:social', __NAMESPACE__ . '\\Menus::entityRegisterReshare');\n\t\t$hooks->registerHandler('register', 'menu:entity', __NAMESPACE__ . '\\Menus::entityRegisterFeature');\n\t\t$hooks->registerHandler('register', 'menu:owner_block', __NAMESPACE__ . '\\Menus::ownerBlockRegister');\n\t\t$hooks->registerHandler('register', 'menu:page', __NAMESPACE__ . '\\Menus::pageRegister');\n\t\t$hooks->registerHandler('supported_types', 'entity_tools', __NAMESPACE__ . '\\Migrate::registerClass');\n\t}",
"private function hooks() {\n\t\t// Register rewrite tags.\n\t\tadd_action( 'wct_add_rewrite_tags', array( $this, 'add_rewrite_tags' ) );\n\n\t\t// Register the rewrite rules\n\t\tadd_action( 'wct_add_rewrite_rules', array( $this, 'add_rewrite_rules' ) );\n\n\t\t// Register the permastructs\n\t\tadd_action( 'wct_add_permastructs', array( $this, 'add_permastructs' ) );\n\t}",
"public function add_hooks()\n {\n }",
"public function add_hooks()\n {\n }",
"public function add_all_hook() {\n\t\tadd_action( 'all', [ $this, 'wrap_hook_callbacks' ] );\n\t}",
"public function registerHooks() {\n\t\t// Nothing to do here right now\n\t\t// Others might want to know about this and get a chance to do their own work (like messing with our's :) )\n\t\tdo_action( 'pixelgrade_portfolio_registered_hooks' );\n\t}",
"public function register_hooks() {\n\t\tadd_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );\n\t\tadd_filter( 'block_categories', array( $this, 'add_block_category' ) );\n\n\t\t$block_integrations = array(\n\t\t\tnew WPSEO_How_To_Block(),\n\t\t\tnew WPSEO_FAQ_Block(),\n\t\t);\n\n\t\tforeach ( $block_integrations as $block_integration ) {\n\t\t\t$block_integration->register_hooks();\n\t\t}\n\t}",
"public static function register_hooks()\n\t{\n\t\tif (static::$hooks_registered) {\n\t\t\treturn;\n\t\t}\n\n\t\t// register all the scripts\n\t\tadd_action('wp_enqueue_scripts', [__CLASS__, '_wp_enqueue_scripts']);\n\n\t\t// add defer/async attributes if they are specified\n\t\tadd_filter('script_loader_tag', [__CLASS__, '_script_loader_tag'], 10, 2);\n\n\t\tadd_action('wp_footer', [__CLASS__, '_wp_footer'], static::$footer_scripts_priority);\n\n\t\tstatic::$hooks_registered = true;\n\t}",
"private function add( $hooks, $hook, $component, $callback, $priority, $acc_args ) {\n\t\t$hooks[] = [\n\t\t\t'hook' => $hook, // tag.\n\t\t\t'component' => $component, // class.\n\t\t\t'callback' => $callback, // method.\n\t\t\t'priority' => $priority, // priority.\n\t\t\t'acc_args' => $acc_args, // accepted args.\n\t\t];\n\n\t\treturn $hooks;\n\t}",
"public function hooks()\n {\n foreach ($this->getActions() as $key => $action) {\n switch (true) {\n case $action instanceof HooksAdminInterface:\n if (is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksFrontInterface:\n if (!is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksInterface:\n $action->hooks();\n break;\n }\n }\n }",
"public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'admin_init' ] );\n\t}",
"public function register(\\WpOrg\\Requests\\HookManager $hooks)\n {\n }",
"private function hooks(): void {\n\t\t// Steps loader hooks.\n\n\t\tadd_filter(\n\t\t\t'learndash_breezy_localize_script_data',\n\t\t\t$this->container->callback( Steps\\Loader::class, 'add_scripts_data' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_nopriv_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t}",
"public function attach_hooks() {\n\t\t$this->define_hooks();\n\t}",
"public function registerHooks()\n {\n add_action('wp_enqueue_scripts', [$this, 'load_scripts_n_styles']);\n add_action('after_setup_theme', [$this, 'add_theme_support']);\n add_action('widgets_init', [$this, 'tf_widgets_init']);\n add_action('after_setup_theme', [$this, 'register_menus']);\n\n if( function_exists('acf_add_options_page') ) {\n acf_add_options_page();\n }\n }",
"public function attach_hooks() {\n\n\t\t$this->define_hooks();\n\n\t}",
"public function setHooks($value){$this->_hooks = self::forceArray($value);}",
"function setHooks(array $hookInfo) {\n $hooks = Helper::getHooks();\n $hooksToSet = $hooks->getValue() ?: array();\n foreach ($hookInfo as $currentHook) {\n $hooksToSet[$currentHook['name']] = $hooksToSet[$currentHook['name']] ?: array();\n $hooksToSet[$currentHook['name']][] = array(\n 'class' => isset($currentHook['class']) ? $currentHook['class'] : $this->hookEndpointClass,\n 'function' => $currentHook['function'],\n 'filepath' => isset($currentHook['filepath']) ? $currentHook['filepath'] : Text::getSubstringAfter($this->hookEndpointFilePath, SOURCEPATH, $this->hookEndpointFilePath),\n 'use_standard_model' => isset($currentHook['use_standard_model']) ? $currentHook['use_standard_model'] : false,\n );\n }\n $hooks->setValue($hooksToSet);\n }",
"public function define_hooks()\n\t{\n\t\t$base = new Base;\n\t\t$this->loader->add_action('init', $base, 'add_post_types');\n\t}",
"public function register_hooks() {\n\t\t\\add_action( 'edited_term', array( $this, 'save_meta' ), PHP_INT_MAX, 3 );\n\t\t\\add_action( 'delete_term', array( $this, 'delete_meta' ), PHP_INT_MAX, 3 );\n\t}",
"private function define_hooks() {\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'hook_add_meta_boxes' ), 10, 1 );\n\n\t\tadd_action( 'save_post', array( $this, 'hook_save_post' ), 10, 1 );\n\n\t\treturn;\n\t}",
"public function hooks() {\n\t\tadd_action( 'add_meta_boxes', [ $this, 'add_boxes' ] );\n\t\tadd_action( 'save_post', [ $this, 'save' ] );\n\n\t\tforeach ( $this->taxonomy_allowed as $taxonomy ) {\n\t\t\tadd_action( \"{$taxonomy}_edit_form_fields\", [ $this, 'display_taxonomy_boxes' ], 99 );\n\t\t\tadd_action( \"edited_{$taxonomy}\", [ $this, 'save_taxonomy' ] );\n\t\t}\n\t}",
"public function init_hooks() {\n\t}",
"public function set_hooks()\n\t{\n\t\tadd_action('init', 'register_shortcodes');\n\t}",
"public function hooks() {\n\t\tregister_activation_hook( __FILE__, array( $this, '_activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, '_deactivate' ) );\n\n\t\tadd_action( 'init', array( $this, 'init' ) );\n\t}",
"private function _createHooks($hooks = FALSE)\n\t{\n\t\t$EE =& get_instance();\n\n\t\tif (!$hooks)\n\t\t\t$hooks = $this->hooks;\n\n\t\t$hook_template = array(\n\t\t\t'class' => __CLASS__,\n\t\t\t'settings' => FALSE,\n\t\t\t'version' => $this->version,\n\t\t);\n\n\t\tforeach ($hooks as $key => $hook)\n\t\t{\n\t\t\tif (is_array($hook))\n\t\t\t{\n\t\t\t\t$data['hook'] = $key;\n\t\t\t\t$data['method'] = (isset($hook['method']) === TRUE) ? $hook['method'] : $key;\n\t\t\t\t$data = array_merge($data, $hook);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['hook'] = $data['method'] = $hook;\n\t\t\t}\n\n\t\t\t$hook = array_merge($hook_template, $data);\n\t\t\t$hook['settings'] = serialize($hook['settings']);\n\t\t\t$EE->db->insert('exp_extensions', $hook);\n\t\t}\n\t}"
]
| [
"0.710907",
"0.6961694",
"0.69532424",
"0.69532424",
"0.69415176",
"0.68665826",
"0.68083906",
"0.68083906",
"0.6692734",
"0.6657739",
"0.6570169",
"0.6568446",
"0.6557975",
"0.65321434",
"0.6513378",
"0.6502626",
"0.65002805",
"0.645745",
"0.6456569",
"0.64267874",
"0.6385806",
"0.6359277",
"0.63417387",
"0.63401806",
"0.6289415",
"0.6278854",
"0.6271236",
"0.6248488",
"0.6197698",
"0.61652946"
]
| 0.7586508 | 0 |
Helper function to unregister a list of hooks. | private function unregisterHooks(array $hooks, $shopList = null)
{
foreach($hooks as $hook) {
$this->unregisterHook($hook, $shopList);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove_hooks()\n {\n }",
"public function remove_hooks()\n {\n }",
"public function remove_all_hook() {\n\t\tremove_action( 'all', [ $this, 'wrap_hook_callbacks' ] );\n\t}",
"public function unregister() {\n // Normally, there are definitely wrappers set for the ALL filter. However,\n // in some cases involving many container rebuilds (e.g. BrowserTestBase),\n // $this->wrappers may be empty although wrappers are still registered\n // globally. Thus an isset() check is needed before iterating.\n if (isset($this->wrappers[StreamWrapperInterface::ALL])) {\n foreach (array_keys($this->wrappers[StreamWrapperInterface::ALL]) as $scheme) {\n stream_wrapper_unregister($scheme);\n }\n }\n }",
"function fuzzloc_unload() {\n\n\tunregister_hook('post_local', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_post_hook');\n\tunregister_hook('feature_settings', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings');\n\tunregister_hook('feature_settings_post', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings_post');\n\n\n\tlogger(\"removed fuzzloc\");\n}",
"function unregister_plugin_hook($hook, $entity_type, $function) {\n\tglobal $CONFIG;\n\tforeach($CONFIG->hooks[$hook][$entity_type] as $key => $hook_function) {\n\t\tif ($hook_function == $function) {\n\t\t\tunset($CONFIG->hooks[$hook][$entity_type][$key]);\n\t\t}\n\t}\n}",
"function unregister_wp_widgets() {\n\t$widgets = [\n\t\t'WP_Widget_Pages',\n\t\t'WP_Widget_Calendar',\n\t\t'WP_Widget_Archives',\n\t\t// Links Manager and its Widget is unregistered already since 3.5.\n\t\t// 'WP_Widget_Links',\n\t\t'WP_Widget_Meta',\n\t\t'WP_Widget_Search',\n\t\t'WP_Widget_Text',\n\t\t'WP_Widget_Categories',\n\t\t'WP_Widget_Recent_Posts',\n\t\t'WP_Widget_Recent_Comments',\n\t\t'WP_Widget_RSS',\n\t\t'WP_Widget_Tag_Cloud',\n\t\t'WP_Nav_Menu_Widget',\n\t];\n\n\tforeach ( $widgets as $widget ) {\n\t\tunregister_widget( $widget );\n\t}\n}",
"public function unregister(): void;",
"public function unregister(): void;",
"function pluton_remove_actions() {\n\t$hooks = pluton_theme_hooks();\n\tforeach ( $hooks as $section => $array ) {\n\t\tif ( ! empty( $array['hooks'] ) && is_array( $array['hooks'] ) ) {\n\t\t\tforeach ( $array['hooks'] as $hook ) {\n\t\t\t\tremove_all_actions( $hook, false );\n\t\t\t}\n\t\t}\n\t}\n}",
"public static function uninstall() {\n\t\t$cptp = CPTP::get_instance();\n\n\t\tforeach ( $cptp->modules as $module ) {\n\t\t\t$module->uninstall_hook();\n\t\t}\n\t}",
"public function unregister()\n {\n $isOk = true;\n foreach ($this->hooks as $hook) {\n $isHookOk = true;\n if ($this->isRegistered($hook)) {\n $isHookOk = $this->module->unregisterHook($hook->getHookName());\n $isOk &= $isHookOk;\n }\n if (!$isHookOk) {\n LoggerFactory::getLogger($this->module->name)->logError('Hook unregistration [' . $hook->getHookName() . '] KO.');\n }\n }\n return $isOk;\n }",
"function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }",
"function avenger_unregister_menus() {\n unregister_nav_menu( 'expanded' );\n unregister_nav_menu( 'primary' );\n unregister_nav_menu( 'mobile' );\n unregister_nav_menu( 'footer' );\n unregister_nav_menu( 'social' );\n}",
"function my_unregister_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Calendar');\n}",
"function remove_all_filters($hook_name, $priority = \\false)\n {\n }",
"function unregister($things) {\n $things = explode(\",\", $things);\n reset($things);\n while (list(,$thing) = each($things)) {\n $thing = trim($thing);\n if ($thing) {\n unset($this->registered_objects[$thing]);\n }\n }\n }",
"public static function unregister() {\n self::$lookup_path = null;\n self::$special_classes = null;\n return spl_autoload_unregister(array(__CLASS__, \"load\"));\n }",
"static function hookUninstall() {\n\t \t// Remove all options\n\t \tforeach(self::$plugin_options as $k => $v) {\n\t \t\tdelete_option($k);\n\t \t}\n\t }",
"public function removeWidgets()\n {\n $this->disabledWidgets->each(function ($widget) {\n unregister_widget($this->widgetIds[$widget]);\n });\n }",
"public function unregister () {\r\n\t\tspl_autoload_unregister( array( $this, 'loadClass' ) );\r\n\t}",
"public function unregister()\n {\n $previousHandlers = $this->previousHandlers;\n\n foreach ($previousHandlers as $signal => $handler) {\n if (is_null($handler)) {\n pcntl_signal($signal, SIG_DFL);\n\n unset($previousHandlers[$signal]);\n }\n }\n\n $this->setHandlers($previousHandlers);\n }",
"function unregister_genesis_callbacks() {\n//\tunregister_menu_callbacks();\n}",
"static public function unregister()\n {\n spl_autoload_unregister(array(self::getInstance(), 'autoload'));\n self::$registered = false;\n }",
"static public function unregister()\n {\n spl_autoload_unregister(array(self::getInstance(), 'autoload'));\n self::$registered = false;\n }",
"public function unregister() {\n\n\t\tspl_autoload_unregister( array( $this, 'load' ) );\n\t}",
"public function unregister()\n {\n spl_autoload_unregister(array($this, 'loadClassWithAlias'));\n }",
"function remove_all_actions($hook_name, $priority = \\false)\n {\n }",
"public function unregister()\n\t{\n\t\tspl_autoload_unregister([$this, 'loadClass']);\n\t}",
"public function execute_uninstall_hooks() {\r\n\t\t\r\n }"
]
| [
"0.6943746",
"0.6943746",
"0.6813454",
"0.64437866",
"0.6325578",
"0.629414",
"0.6284388",
"0.5986685",
"0.5986685",
"0.59760386",
"0.59585655",
"0.59533507",
"0.59479874",
"0.58255345",
"0.5781272",
"0.57512915",
"0.57451767",
"0.57379806",
"0.57089674",
"0.5698835",
"0.5698065",
"0.56844956",
"0.5678863",
"0.5678376",
"0.5678376",
"0.56704086",
"0.56613475",
"0.56547576",
"0.56524944",
"0.5643456"
]
| 0.7958074 | 0 |
Asserts that the given register value is valid A valid register value is smaller than 0xffff | public static function assertValidRegisterValue($value)
{
if ($value > 0xffff) {
throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function validateUint($value) {\n if (preg_match(\"/^[0-9]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive integer\"));\n return false;\n }",
"public static function assertValidAddress($address)\n {\n if ($address < 0x0000) {\n throw new InvalidArgumentException('Invalid address, should be >= 0x0000');\n }\n\n if ($address > 0xffff) {\n throw new InvalidArgumentException('Invalid address, should be <= 0xffff');\n }\n }",
"public function testRegistrationValuesTooShort(): void { }",
"public function testValidationBytesLowerBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MIN_BYTES - 1);\n\n $random->validate();\n }",
"public static function ensure32BitInteger($value) {}",
"public function testRegistrationValuesContainNumbers(): void { }",
"public static function isValidAddress($address, $throw = FALSE) {\n\n if (!self::hasHexPrefix($address)) {\n return FALSE;\n }\n // Address should be 20bytes=40 HEX-chars + prefix.\n if (strlen($address) !== 42) {\n return FALSE;\n }\n $return = ctype_xdigit(self::removeHexPrefix($address));\n\n if (!$return && $throw) {\n throw new \\InvalidArgumentException($address . ' has invalid format.');\n }\n return $return;\n }",
"public function testRegistrationValuesTooLong(): void { }",
"function validMinLength($value, $min)\n {\n return strlen($value) >= $min;\n }",
"function testMinval(){\n\t\t#mdx:minval\n\t\tParam::get('age')->filters()->minval(1, \"Age cannot be less than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>0])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"less than 1\", $error);\n\n\t}",
"public function isIntegerInRangeRejectsOtherDataTypesDataProvider() {}",
"public static function assertValidQuantityOfRegisters($quantityOfRegisters)\n {\n if ($quantityOfRegisters < 1) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1');\n }\n\n if ($quantityOfRegisters > 0x7d) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d');\n }\n }",
"public static function assertValidQuantityOfBits($quantityOfBits)\n {\n if ($quantityOfBits < 1) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1');\n }\n\n if ($quantityOfBits > 0x7d0) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0');\n }\n }",
"public function testReturnTrueOnValidEthereumAddress()\n {\n $result = Wallet::validate(self::VALID_ETH_ADDRESS, Wallet::ETHEREUM);\n\n $this->assertTrue($result);\n }",
"public function testTooShort(): void\n {\n $validator = new LengthValidator(5);\n $result = $validator->validate('foo');\n\n $this->assertFalse($result->isValid());\n }",
"public function testRandomEthereumAddress()\n {\n $initial_value = random_ethereum_address();\n $this->assertInternalType('string', $initial_value);\n \n CryptoStat::setCurrency('ETH');\n $is_valid = CryptoStat::validateAddress($initial_value); \n \n $this->assertTrue($is_valid);\n }",
"function validate_field_range(string $field_value, array &$field, array $params): ?bool\n{\n if (($field_value < $params['min']) || ($field_value > $params['max'])) {\n $field['error'] = strtr('Laukelio vertė turi būti @from iki @to', [\n '@from' => $params['min'],\n '@to' => $params['max']\n ]);\n return false;\n } else {\n return true;\n }\n}",
"public static function filterUint($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_INT, array(\n\t\t\t'options' => array('min_range' => 0)\n\t\t));\n\t}",
"function value_within_range($value, $min, $max) {\n return ((strlen($value) >= $min) && (strlen($value) <= $max));\n }",
"function is_unsigned_integer($value)\n {\n return (is_int($value) && $value >= 0);\n }",
"public function validate($value)\n {\n $value = preg_replace('/[^\\d]/', '', (string) $value);\n if (strlen($value) != 11 ) {\n return false;\n }\n $acumulado = 0;\n $digits = str_split($value);\n\n // obtain digit\n $digit = array_pop($digits);\n\n for ($i=0; $i < count($digits); $i++ ) {\n $acumulado += $digits[9-$i] * (2 + ($i % 6 ));\n }\n $verif = 11 - ( $acumulado % 11 );\n $verif = $verif == 11? 0 : $verif;\n\n return $digit == $verif;\n }",
"public function testRangeValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->range = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->range = 50;\n $this->assertTrue($aircraft->save());\n }",
"protected function filterUint($value) {\n return abs((int) $value);\n }",
"public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_HIGH,self::VALUE_LOW,self::VALUE_CUSTOMCODE));\n\t}",
"public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_HEADER,self::VALUE_LINE));\n\t}",
"public function testMinInvalidArgumentException()\n {\n $max = $this->ascendingSequence->getMax();\n $this->ascendingSequence->setMin($max + 1);\n $this->fail(\"Should not be able to set min > max.\");\n }",
"function pimd_validate_intrange($value, $min, $max) {\n\tif (is_numericint($value) && ($value >= $min) && ($value <= $max)) {\n\t\treturn $value;\n\t} else {\n\t\treturn null;\n\t}\n}",
"function checkNum($number) {\n if($number>50) {\n throw new Exception(\" Tavë Kosi has been known for 90 years in Albanian cuisine.\");\n }\n return true;\n}",
"public function testMobileNumberIsValid($data)\n {\n $pattern = \"/^[(]{0,1}[0-9]{2,3}[)]{0,1}[-\\s\\.]{0,1}[0-9]{2,4}[-\\s\\.]{0,1}[0-9]{4}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }",
"static public function isUnsignedInt($value)\n {\n return (preg_match('#^[0-9]+$#', (string)$value) and $value < 4294967296 and $value >= 0);\n }"
]
| [
"0.6001733",
"0.5901429",
"0.58518916",
"0.55640876",
"0.5523201",
"0.53632444",
"0.5333517",
"0.53283733",
"0.53252244",
"0.53240764",
"0.53147423",
"0.52634823",
"0.5258938",
"0.51837677",
"0.51708406",
"0.5152644",
"0.5145378",
"0.5138096",
"0.5131073",
"0.5103631",
"0.50909203",
"0.50869584",
"0.5083919",
"0.50714564",
"0.5055826",
"0.50483006",
"0.5041137",
"0.50345784",
"0.50151426",
"0.49962008"
]
| 0.7637197 | 0 |
Asserts that the given quantity of bits is valid | public static function assertValidQuantityOfBits($quantityOfBits)
{
if ($quantityOfBits < 1) {
throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1');
}
if ($quantityOfBits > 0x7d0) {
throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testBitArray()\n {\n $array = new BitArray(19);\n for ($i = 0; $i < 19; $i++) {\n $this->assertEquals(0, $array[$i]);\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $array[$i] = 1;\n } else {\n $array[$i] = 0;\n }\n }\n\n for ($i = 0; $i < 19; $i++) {\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $this->assertEquals(1, $array[$i]);\n } else {\n $this->assertEquals(0, $array[$i]);\n }\n }\n\n //\tdouble-check the internal representation \n $vals = unpack(\"C*\", $array->getData());\n $this->assertEquals(1, $vals[1]);\n $this->assertEquals(255, $vals[2]);\n $this->assertEquals(3, $vals[3]);\n\n\n //\texercise the BitStreamReader and BitStreamWriter a bit\n $writer = new BitStreamWriter();\n foreach ($array as $bit) {\n $writer->writeBit($bit);\n }\n\n $reader = new BitStreamReader($writer->getData());\n foreach ($array as $bit) {\n $this->assertEquals($bit, $reader->readBit());\n }\n }",
"public function testBinary(): void\n {\n $randomBytes = base64_decode('L3zw8k6jFccVGXr6mqci4Q=='); // random_bytes(16);\n\n $validator = new LengthValidator(16, 16);\n $result = $validator->validate($randomBytes);\n\n $this->assertFalse($result->isValid());\n\n $validator = new LengthValidator(1, 16, multibyte: false);\n $result = $validator->validate($randomBytes);\n\n $this->assertTrue($result->isValid());\n }",
"public static function assertValidQuantityOfRegisters($quantityOfRegisters)\n {\n if ($quantityOfRegisters < 1) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1');\n }\n\n if ($quantityOfRegisters > 0x7d) {\n throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d');\n }\n }",
"public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }",
"function test()\r\n {\r\n print_r($this->countBits(3));\r\n }",
"public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }",
"function validQty($qty)\n{\n return !empty($qty)\n && ctype_digit($qty)\n && $qty >= 1;\n}",
"public function testRegistrationValuesTooShort(): void { }",
"public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}",
"public function testValidationCaseForInvalidGeneratorNumberForKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } else {\n $hasThrown = null;\n\n try {\n $protocol->generateExchangeResponseInformation(bin2hex(decbin(17)), ['wrong']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }",
"public function testValidationBytesUpperBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MAX_BYTES + 1);\n\n $random->validate();\n }",
"public function testRegistrationValuesContainNumbers(): void { }",
"public function testValidationBytesLowerBounds()\n {\n $random = new Random($this->getValidator());\n\n $random->setBytes($this::MIN_BYTES - 1);\n\n $random->validate();\n }",
"public function testInvalidLengthPassword()\n {\n $password = \"23d3\";\n $response = $this->user->isValidPassword($password);\n\n $this->assertFalse($response);\n }",
"public function testValidation()\n {\n $req = new Request\\Ban('', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('', 'value');\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('', ['value']);\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('host', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('host', ['value']);\n self::assertTrue($req->isValid());\n }",
"public function testNonsuppliedBitflagsAreLeftAlone()\n {\n $bit = new Formulaic\\Bitflag('superhero', [\n 'spidey' => 'Spiderman',\n 'hulk' => 'The Hulk',\n 'daredevil' => 'Daredevil',\n ]);\n $bit->setDefaultValue(['superman']);\n $bit->setValue(['hulk']);\n yield assert($bit->getValue()->hulk);\n yield assert(!isset($bit->getValue()->superman));\n }",
"protected function validateUint($value) {\n if (preg_match(\"/^[0-9]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive integer\"));\n return false;\n }",
"public function testHexadecimal()\n {\n // Generate hex data with random length.\n $method = 'hex';\n $data = $this->getData($method);\n\n // Hex data should all be PHP strings.\n $this->assertContainsOnly('string', $data);\n\n // Check that all generated data represents hex digits.\n foreach ($data as $datum) {\n $this->assertTrue(ctype_xdigit($datum));\n }\n\n // Check that the correct bytes of data is produced.\n $i = $this::MIN_BYTES;\n while ($i <= $this::MAX_BYTES) {\n $value = $this->generateValue($method, $i);\n $value_bytes = strlen($value) / 2;\n $this->assertEquals($i, $value_bytes);\n $i++;\n }\n }",
"public function testRandomRequirements ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 4,\n 'digit' => 3,\n 'upper' => 2,\n 'lower' => 1\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){3})(?=(?:[^a-z]*[a-z]){1})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){4})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }",
"public function test_validate_withdraw_count()\n {\n $withdraw = $this->obj->validate_count(2);\n $resp = $this->obj->validate_withdraw_count();\n if($withdraw < 3){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }",
"public function testNumberOfBytes()\n {\n foreach(array(1, 2, 5, 9, 12, 20) as $numberOfBytes) {\n $bytes = RandomString::generateBytes($numberOfBytes);\n\n $this->assertEquals(\n strlen($bytes),\n $numberOfBytes,\n 'Number of bytes returned should be ' . $numberOfBytes\n );\n }\n }",
"public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }",
"public function testValidationCaseForSettingAnInvalidKeyPairSizeForTheKeyExchangeGeneration()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $protocol->setKeyExchangeSize(200);\n } else {\n $hasThrown = null;\n\n try {\n $protocol->setKeyExchangeSize(200);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }",
"public function validIntegers() {}",
"private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }",
"public function testValidLengthPassword()\n {\n $password = \"accepted\";\n\n $response = $this->user->isValidPassword($password);\n\n $this->assertTrue($response);\n }",
"public function test_validate_withdraw()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw($amount);\n $this->assertLessThanOrEqual(20000,$amount);\n $this->assertTrue($withdraw);\n }",
"protected function assertVarBinaryColumnIsValid(Table $table, string $columnName, int $expectedLength): void\n {\n $column = $table->getColumn($columnName);\n self::assertInstanceOf(BinaryType::class, $column->getType());\n self::assertSame($expectedLength, $column->getLength());\n }",
"public function testGetType0()\n{\n\n $actual = $this->bitwiseOr->getType();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testInteger()\n {\n // Generate integer data.\n $data = $this->getData('integer', $this::INT_BYTES);\n\n // Integer data should all be native PHP integer type.\n $this->assertContainsOnly('integer', $data);\n\n // While it is *possible* that the integer 0 is legitimately generated in a\n // small test run (small relative to PHP_INT_MAX) it is much, much more\n // likely that seeing exactly 0 means \"infinity\" was generated by the system\n // trying to convert more bits than it can internally represent\n // (usually either 32 or 64) and then casting \"infinity\" to an integer,\n // which results in 0. Similarly, seeing the upper bounds in the data\n // probably means there's something bad going on.\n $this->assertNotContains(0, $data);\n $this->assertNotContains(PHP_INT_MAX, $data);\n }"
]
| [
"0.61510164",
"0.60687387",
"0.57213634",
"0.5700703",
"0.56383836",
"0.5460097",
"0.5394237",
"0.5367398",
"0.53535885",
"0.53521085",
"0.53506017",
"0.5327079",
"0.5305128",
"0.5290436",
"0.52713686",
"0.5266541",
"0.52328056",
"0.5227709",
"0.52213705",
"0.5207892",
"0.52016467",
"0.51886594",
"0.5182076",
"0.5181623",
"0.51726437",
"0.51705474",
"0.5168421",
"0.5158037",
"0.5155485",
"0.5139114"
]
| 0.7590083 | 0 |
Asserts that the given quantity of registers is valid | public static function assertValidQuantityOfRegisters($quantityOfRegisters)
{
if ($quantityOfRegisters < 1) {
throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1');
}
if ($quantityOfRegisters > 0x7d) {
throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testRegistrationValuesTooShort(): void { }",
"public function testRegistrationValuesContainNumbers(): void { }",
"public function testRegistrationValuesTooLong(): void { }",
"public function testCheckIfAllRegisterFieldsHaveInputAndError()\n {\n $validate = new Validate();\n $_POST['username'] = 'Alexander';\n $_POST['password'] = '123';\n\n $validate->check($_POST, array(\n 'username' => array(\n 'required' => true,\n 'unique' => 'users',\n ),\n 'email' => array(\n 'required' => true,\n 'email' => true,\n ),\n 'password' => array(\n 'required' => true,\n ),\n 're-password' => array(\n 'required' => true,\n 'matches' => 'password',\n ),\n ));\n\n $this->assertEquals('Username is already taken', $validate->error());\n }",
"public static function assertValidQuantityOfBits($quantityOfBits)\n {\n if ($quantityOfBits < 1) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1');\n }\n\n if ($quantityOfBits > 0x7d0) {\n throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0');\n }\n }",
"public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }",
"public function user_cannot_register_with_invalid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n\t $user1= factory(User::class)->make([\n\t \t'first_name'=> 'al',\n\t\t 'last_name' => str_repeat('Number of times the input string should be repeated',15),\n\t\t 'username' => 'al',\n\t\t 'email' => 'h@',\n\t\t 'password' => 'secret'\n\t ]);\n\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>ucfirst($user1->password), 'field_type'=> 'text']\n\t\t ]\n\t );\n//\t\t\tdie($user1->last_name);\n //Assertion not written\n $browser->assertpathIs('/register')\n\t ->assertSeeIn('#registerForm div:nth-child(2) .invalid-feedback-content','The first name must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(3) .invalid-feedback-content','The last name may not be greater than 255 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(4) .invalid-feedback-content','The username must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(5) .invalid-feedback','The email must be a valid email address.')\n\t ->assertSeeIn('#registerForm div:nth-child(6) .invalid-feedback-content', 'The password confirmation does not match.')\n ->clickLink('Account')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up');\n });\n }",
"public function testApiRegistrationValidation()\n {\n $notUnique = $this->getTestRegisterData(false, 5);\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $notUnique);\n\n $response->assertStatus(422);\n $errors = collect($response->decodeResponseJson()->json('errors'));\n $this->assertEquals(2, count($errors));\n $this->assertTrue($errors->has('password'));\n $this->assertTrue($errors->has('email'));\n }",
"public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }",
"public function testValidateFormFailure()\n {\n $formData = 10;\n $validation = GRUB\\Validator\\Validator::validateIngredient($formData);\n $expected = 10;\n $this->assertEquals($validation, $expected);\n }",
"public function assertValid()\n {\n }",
"public function testIsValidFailing()\n {\n $this->assertFalse($this->helper->isValid('s1', 15));\n $this->assertFalse($this->helper->isValid('s2', true));\n $this->assertFalse($this->helper->isValid('i1', 12.1));\n $this->assertFalse($this->helper->isValid('i2', 'eleven'));\n $this->assertFalse($this->helper->isValid('i3', 12.6));\n $this->assertFalse($this->helper->isValid('i4', -2));\n $this->assertFalse($this->helper->isValid('i5', 83));\n $this->assertFalse($this->helper->isValid('i6', false));\n $this->assertFalse($this->helper->isValid('f1', 12));\n $this->assertFalse($this->helper->isValid('f2', [12.67]));\n $this->assertFalse($this->helper->isValid('f3', 13.0));\n $this->assertFalse($this->helper->isValid('b', [true]));\n $this->assertFalse($this->helper->isValid('b', 0));\n $this->assertFalse($this->helper->isValid('a', 'blue'));\n $this->assertFalse($this->helper->isValid('m', 'true'));\n $this->assertFalse($this->helper->isValid('m', false));\n $this->assertFalse($this->helper->isValid('r', 'memb3rType'));\n }",
"protected function checkRegistry()\n {\n foreach ($this->getExpectedClassrooms() as $classId => $classroom) {\n $this->assertTrue(\n $this->registry->offsetExists($classId),\n sprintf('Parser did not add class room \"%s\" to registry', $classId)\n );\n\n $this->assertEquals(\n $classroom,\n $this->registry->offsetGet($classId),\n sprintf('Parser created invalid class room for class \"%s\"', $classId)\n );\n }\n }",
"public function test_validation()\n\t{\n\t\tfor ($i = 1; $i <= 8; $i++) {\n\t\t\tlist(, $args) = $this->parse(\"test$i.xml\");\n\t\t\t$response = AFK_XmlRpc_Parser::serialise_response(\n\t\t\t\tcall_user_func_array(array($this, \"validate_$i\"), $args)\n\t\t\t);\n\t\t\t$expected = $this->load(\"test$i.response.xml\");\n\t\t\t$response = $this->format($response);\n\t\t\t$expected = $this->format($expected);\n\t\t\t$this->assertEquals($expected, $response);\n\t\t}\n\t}",
"public function testValidateFormMalformed()\n {\n $formData = ['jelly'];\n $this->expectException(TypeError::class);\n $case = GRUB\\Validator\\Validator::validateIngredient($formData);\n }",
"public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }",
"public function testRegon7()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testRegon5()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testRegon4()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testRegon0()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testRegon3()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function assertValid() : void\n {\n }",
"public function assertValid() : void\n {\n }",
"private static function assertCreateValidations(array $input)\n {\n // Verify that rut is correct\n if (!self::validateRut((int)$input['rut'], $input['rut_dv']))\n {\n throw new InvalidParametersException(['rut' => 'The rut is not valid']);\n }\n\n // Verify that you have not associated a rut for the same custoumer\n /*if (Account::where('customer_id', $input['customer_id'])->where('rut', $input['rut'])->first())\n {\n throw new ResourceAlreadyExistsException(\"rut \" . $input['rut'] . $input['rut_dv'], ['rut' => 'Rut must be unique']);\n }*/\n\n // Verify that there is no other account with the same email\n if (Account::where('email', $input['email'])->first())\n {\n throw new ResourceAlreadyExistsException(\"email \" . $input['email'], ['email' => 'Email must be unique']);\n }\n }",
"public function testRegon6()\n{\n\n // Traversed conditions\n // for (...) == true (line 40)\n // for (...) == false (line 40)\n // for (...) == true (line 44)\n // for (...) == false (line 44)\n // if ($checksum == 10) == false (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testNumber()\r\n {\r\n\r\n $testData = array(\r\n 'number' => '',\r\n 'number2' => '1337',\r\n 'number3' => 0x539,\r\n 'number4' => 02471,\r\n 'number5' => 0b10100111001,\r\n 'number6' => 1337e0,\r\n 'number7' => \"not numeric\",\r\n 'number8' => array(),\r\n 'number9' => 9.1\r\n );\r\n\r\n $validator = new Validator($testData);\r\n $validator->addRule('number', 'number', ['number']);\r\n $validator->addRule('number2', 'number2', ['required', 'number']);\r\n $validator->addRule('number3', 'number3', ['required', 'number']);\r\n $validator->addRule('number4', 'number4', ['required', 'number']);\r\n $validator->addRule('number5', 'number5', ['required', 'number']);\r\n $validator->addRule('number6', 'number6', ['required', 'number']);\r\n $validator->addRule('number7', 'number7', ['required', 'number']);\r\n $validator->addRule('number8', 'number8', ['required', 'number']);\r\n $validator->addRule('number9', 'number9', ['required', 'number']);\r\n\r\n $this->assertFalse($validator->validate());\r\n $this->assertFalse($validator->isValid());\r\n\r\n\r\n /** The field is not required, so it can be empty and contains no valid number */\r\n $this->assertFalse($validator->hasErrors('number'), $validator->getFieldError('number'));\r\n $this->assertFalse($validator->hasErrors('number2'), $validator->getFieldError('number2'));\r\n $this->assertFalse($validator->hasErrors('number3'), $validator->getFieldError('number3'));\r\n $this->assertFalse($validator->hasErrors('number4'), $validator->getFieldError('number4'));\r\n $this->assertFalse($validator->hasErrors('number5'), $validator->getFieldError('number5'));\r\n $this->assertFalse($validator->hasErrors('number6'), $validator->getFieldError('number6'));\r\n $this->assertTrue($validator->hasErrors('number7'), $validator->getFieldError('number7'));\r\n $this->assertTrue($validator->hasErrors('number8'), $validator->getFieldError('number8'));\r\n $this->assertFalse($validator->hasErrors('number9'), $validator->getFieldError('number9'));\r\n }",
"public function testGetMultipleInvalidTypeInteger(): void\n {\n $keyValuePairs = 978;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }",
"public function testRegon1()\n{\n\n // Traversed conditions\n // for (...) == false (line 40)\n // for (...) == false (line 44)\n // if ($checksum == 10) == true (line 48)\n\n $actual = $this->company->regon();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function _assertStoreCartHasProductsWithMinimalQuantity()\n {\n }",
"public function testInvalidAllOf() {\n $this->expectException(ParseException::class);\n $schema = new Schema(['$ref' => '#/components/schemas/Invalid1'], $this->lookup);\n $valid = $schema->validate(['type' => 'Invalid1']);\n }"
]
| [
"0.6522232",
"0.6493642",
"0.617038",
"0.60679156",
"0.6053062",
"0.59602296",
"0.5896966",
"0.57915497",
"0.5752414",
"0.5747303",
"0.5710024",
"0.5658892",
"0.5642109",
"0.56260484",
"0.56233144",
"0.5583203",
"0.55553687",
"0.55391455",
"0.5532799",
"0.55254424",
"0.55252576",
"0.5524527",
"0.5524527",
"0.55228585",
"0.5503743",
"0.5496526",
"0.5489989",
"0.5487408",
"0.54823077",
"0.5459667"
]
| 0.6822848 | 0 |
Asserts that the given coil value is valid | public static function assertValidCoilValue($value)
{
if ($value !== Coil::ON && $value !== Coil::OFF) {
throw new InvalidArgumentException(
sprintf('Invalid coil value. Should be %x or %x', Coil::ON, Coil::OFF)
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function it_can_identify_valid_values()\n {\n $this->assertTrue(Testee::isValid(self::TEST_NULL_VALUE));\n }",
"public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->validate($config));\n }",
"public function testCostValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->cost = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 50;\n $this->assertTrue($aircraft->save());\n }",
"public function assertValid()\n {\n }",
"public function testIsValidValid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('foo'));\n $this->assertTrue($this->uut->isValid());\n $this->assertFalse($this->uut->hasViolation());\n }",
"public function testIsValidNoConstraints()\n {\n $this->assertTrue($this->uut->setValue(new ScalarValue('foo'))->isValid());\n }",
"public function testCnh()\n {\n $this->assertTrue(BrValidation::cnh('01827854569'));\n\n $this->assertFalse(BrValidation::cnh('01827854568'));\n $this->assertFalse(BrValidation::cnh('12345678909'));\n $this->assertFalse(BrValidation::cnh('11111111111'));\n $this->assertFalse(BrValidation::cnh('018278545'));\n $this->assertFalse(BrValidation::cnh('abcdefghij'));\n }",
"public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }",
"abstract public function getIsValidValue($value);",
"private function validateValue($value)\n {\n if (is_null($value)) {\n throw new \\InvalidArgumentException(\"Value cannot be null\");\n }\n }",
"public function testCreditCardIsNotValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }",
"public function testIsValidNoValue()\n {\n $this->assertTrue($this->uut->isValid());\n }",
"public static function assertValidRegisterValue($value)\n {\n if ($value > 0xffff) {\n throw new InvalidArgumentException('Invalid register value, should be <= 0xffff');\n }\n }",
"function testnetPresentValueException()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::netPresentValue(0.1, -1000, 3000, 4200, 6800);\n\t}",
"protected function validateOrThrow() {}",
"function testpresentValueException1()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::presentValue(0.29, -7, 100);\n\t}",
"public function test_check_on_earth_invalid()\n {\n $coord = new stdClass();\n $coord->x = -133;\n $coord->y = 5543;\n $checked = \\SimpleMappr\\Mappr::checkOnEarth($coord);\n $this->assertFalse($checked);\n }",
"function testpresentValueException2()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::presentValue(0.29, 7, 100, 0, 3);\n\t}",
"public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }",
"public function testValueIsInvalid()\n {\n $init = 'foo';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }",
"public function testValidate0()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == false (line 378)\n // if (empty($value) && !is_numeric($value)) == false (line 389)\n // if (empty($domain) && !is_numeric($domain)) == false (line 397)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function assertValid() : void\n {\n }",
"public function assertValid() : void\n {\n }",
"public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}",
"public function validate($value, Constraint $constraint)\n {\n $valid = true;\n\n // Check it is in the format: 0,0,0,0:0,0,0,0\n $testValue = str_replace(' ', '', $value);\n if (!preg_match('/^(\\d+),(\\d+),(\\d+),(\\d+):(\\d+),(\\d+),(\\d+),(\\d+)$/', $testValue, $matches)) {\n $valid = false;\n }\n else {\n // Check the focus rectangle is inside the crop rectangle.\n $cropFocusCoordinates = explode(':', $testValue);\n $crop = explode(',', $cropFocusCoordinates[0]);\n $focus = explode(',', $cropFocusCoordinates[1]);\n\n // Add constraint generated entity.\n $geometry = new CoordinateGeometry($crop[0], $crop[1], $crop[2], $crop[3]);\n\n if (!$geometry->isInside($focus[0], $focus[1], $focus[2], $focus[3])) {\n $valid = false;\n }\n }\n\n if (!$valid) {\n $this->context->buildViolation($constraint->message)\n ->setParameter('{{ string }}', $value)\n ->addViolation()\n ;\n }\n }",
"public function testIsValidInvalid()\n {\n $this->uut->setConstraints([new MyConstraint()])->setValue(new ScalarValue('bar'));\n $this->assertFalse($this->uut->isValid());\n $this->assertTrue($this->uut->hasViolation());\n $this->assertInstanceOf(MyViolation::class, $this->uut->getViolation());\n }",
"public function validateValue($value)\n {\n }",
"public function testBadValidateChangeNumber()\n {\n $tests = array (\n array(\n 'label' => __LINE__ .': null',\n 'value' => null,\n ),\n array(\n 'label' => __LINE__ .': empty',\n 'value' => '',\n ),\n array(\n 'label' => __LINE__ .': negative',\n 'value' => -1,\n ),\n array(\n 'label' => __LINE__ .': float',\n 'value' => 10.10,\n ),\n );\n\n foreach ($tests as $test) {\n $label = $test['label'];\n\n $validator = new \\P4\\Validate\\ChangeNumber();\n\n $this->assertSame(\n false,\n $validator->isValid($test['value']),\n \"$label - Expected Invalid\"\n );\n }\n }",
"public static function validate($value);",
"public function testCheckGenericInputDataWithComissionNonNumeric()\n {\n $data = [\n 'hour' => '2019-07-04T19:00', \n 'comission' => 'a non numeric value',\n 'idSession' => 1\n ];\n\n $mockedEntityManager = $this->createMock(EntityManager::class);\n $comissionSessionService = new ComissionSessionService($mockedEntityManager, []);\n\n $this->expectException(ComissionInvalidException::class);\n $comissionSessionService->checkGenericInputData($data);\n }"
]
| [
"0.6008962",
"0.59076023",
"0.58623385",
"0.5819444",
"0.56846976",
"0.5613157",
"0.55885965",
"0.5501875",
"0.5497066",
"0.5492128",
"0.54439676",
"0.5432192",
"0.5430047",
"0.53856987",
"0.5355875",
"0.53495747",
"0.5348872",
"0.5342657",
"0.5341787",
"0.5340112",
"0.53243595",
"0.53208",
"0.53208",
"0.53186077",
"0.53101176",
"0.53089136",
"0.53046185",
"0.53042156",
"0.53022945",
"0.5285883"
]
| 0.7477078 | 0 |
wp_enqueue_script( 'airshp_chat_socket.io', ' array( 'jquery' ), date('Ymd').'12', true ); | function airshp_chat_scripts() {
wp_enqueue_script( 'airshp_chat_socket.io', 'http://beta.tourgigs.com:8080/socket.io/socket.io.js', array( 'jquery' ), date('Y-m-d').'12', true );
/* Serve JS page with Admin controls to only users with permissions */
if ( (current_user_can( 'manage_options' ))) {
wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'clientAdmin.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true );
} else {
wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'client.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function enqueue_scripts()\n\t{\n\t\twp_register_script('peepso-activitystream', $this->plugin_url . 'asset/js/activitystream.js',\n\t\t\tarray('peepso'), PeepSo::PLUGIN_VERSION, TRUE);\n\t}",
"function add_scripts() {\r\n \twp_enqueue_script('contact-scripts', plugins_url().'/contact-widget/js/script.js', array('jquery'),'5.7', false);\r\n }",
"function so_enqueue_scripts(){\r\n wp_register_script('jquery3','https://code.jquery.com/jquery-3.3.1.js');\r\n wp_enqueue_script( 'jquery3');\r\n wp_register_script(\r\n 'ajaxHandle',\r\n '/wp-content/plugins/refresh-plugin/js/refresh-plugin.js',\r\n array(),\r\n false,\r\n true\r\n );\r\n wp_enqueue_script( 'ajaxHandle' );\r\n wp_localize_script(\r\n 'ajaxHandle',\r\n 'ajax_object',\r\n array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'pluginurl' => plugin_dir_url( __FILE__ ) )\r\n );\r\n}",
"function secondthought_device_register_scripts(){\n\n\twp_enqueue_script('secondthought_device_widget_script', siteorigin_widget_get_plugin_dir_url('secondthought-device-widget').'js/secondthought-device-widget.js','', SOW_BUNDLE_VERSION, '', 0);\n}",
"function myweather_scripts(){\n\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css');\n wp_enqueue_script('jquery');\n\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.js');\n wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array('jquery'));\n\n}",
"public function enqueue_js(){\n\n // Enqueue scripts.\n wp_enqueue_script( 'agreable_poll_script', Helper::assetUrl('client.js'), array(), '1.0.0', true );\n\n $this->render_js_vars();\n\n }",
"public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }",
"function wp_enqueue_scripts()\n {\n }",
"function b_script_enqueuer() \n{\n wp_register_script('tf_our_people', plugin_dir_url(__FILE__).'tf_our_people.js', array('jquery'));\n\n // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily\n wp_localize_script('tf_our_people', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\n\n // enqueue jQuery library and the script you registered above\n wp_enqueue_script('jquery');\n wp_enqueue_script('tf_our_people');\n}",
"public function enqueue_scripts()\n {\n wp_enqueue_script($this->fast_social_sharing, plugin_dir_url(__FILE__) . 'js/fast-social-sharing-public.js', array( 'jquery' ), $this->version, false);\n }",
"function pgm_public_scripts(){\n wp_register_script('ppmguru-mailing-list-js-public',plugins_url('/js/public/ppmguru-mailing-list.js',__FILE__), array('jquery'),'',true);\n wp_enqueue_script('ppmguru-mailing-list-js-public');\n}",
"function mm_countdown_enqueue_scripts() {\n\twp_register_script( 'mm-countdown', plugins_url( '/js/jquery.countdown.js', __FILE__ ), array( 'jquery' ), null, true );\n\n}",
"function autodidact_script_enqueue() {\n wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/auto.css', array(), '1.0.0', 'all');\n wp_enqueue_script('customjs', get_template_directory_uri() . '/js/auto.js', array(), '1.0.0', true);\n}",
"function plugin_stater_reg_scripts() {\r\n\t// we are telling WP that we depend on jQuery\r\n\twp_register_script( CH_PLUGIN_NAME , plugins_url( '/js/app.js', __FILE__ ), array( 'jquery' ) );\r\n\twp_enqueue_script ( CH_PLUGIN_NAME );\r\n\twp_enqueue_style ( CH_PLUGIN_NAME , plugins_url( '/css/app.css', __FILE__ ) );\r\n}",
"public function enqueue_scripts() {\n wp_enqueue_script(\n $this->plugin_name,\n plugin_dir_url( __FILE__ ) . 'js/update-monitor-public.js',\n array('jquery'),\n $this->version,\n false\n );\n }",
"function wt_scripts() {\n\twp_enqueue_style( 'vue-writing-theme-pacifico', 'https://fonts.googleapis.com/css?family=Pacifico', '', null );\n\twp_enqueue_style( 'vue-writing-theme-montserrat', 'https://fonts.googleapis.com/css?family=Montserrat', '', null );\n\twp_enqueue_style( 'vue-writing-theme-styles', get_stylesheet_uri() );\n\n wp_enqueue_script('vue-writing-theme-general',\n get_template_directory_uri() . '/dist/build.js',\n array('jquery'),\n time(),\n true );\n\n\n // wp_localize_script( 'vue-writing-theme-general', 'sitedata', array(\n // 'rest_url' => esc_url_raw( rest_url('wp/v2/' ) ),\n // \t\t)\n // ;\n\n}",
"public function widget_scripts() {\n\t\twp_register_script( 'elementor-hello-world', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );\n\t}",
"function nightsky_user_scripts( ) {\n // enque your own stuff here. CSS should be added to the array above.\n // enqueue a script.\n // wp_enqueue_script( 'id', get_template_directory_uri() . 'path',array('dependencies'), filemtime(get_stylesheet_directory() . 'path'), header_or_footer );\n}",
"function wpfme_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n}",
"public function arvan_wp_enqueue_scripts(){\n \n wp_register_script('arvan-plugin-custom-script', plugin_dir_url(__FILE__) . '/js/custom.js', array('jquery'));\n wp_localize_script( 'arvan-plugin-custom-script', 'WPData', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n wp_enqueue_script( 'arvan-plugin-custom-script');\n \n\n }",
"function d2_add_plugin_scripts() {\n\twp_enqueue_style( 'd2-style-css', plugins_url('css/style.css', __FILE__));\n\twp_enqueue_script( 'd2-plugin-js', plugins_url('js/plugins.js', __FILE__) ,array(), '1.0.0', true);\n\twp_localize_script( 'd2-plugin-js', 'dwc_jquery_var',array( \n\t\t'ajax_url' \t\t\t\t=> admin_url( 'admin-ajax.php' ),\n\t\t'current_user_id'\t\t=> get_current_user_id(),\n\t\t'site_url' \t\t\t\t=> site_url(),\n\t\t//'opt_blog_num_columns'\t=> themedirect_option('opt_blog_num_columns')\n\t\t) );\n\twp_enqueue_script( 'd2-plugin-js' );\n}",
"function thrive_dashboard_enqueue_script($handle, $src = '', $deps = array(), $ver = false, $in_footer = false)\n{\n if ($ver === false) {\n $ver = \"1.0\";\n }\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n}",
"function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}",
"function eventos_carrega_script() {\n\twp_enqueue_style( \"eventos_css\",plugins_url( \"/css/eventos.css\", __FILE__ ));\n\twp_enqueue_style( \"datetimepickerCSS\",plugins_url( \"/css/jquery.datetimepicker.css\", __FILE__ ));\n\twp_enqueue_script( \"datetimepicker\",plugins_url( \"/js/jquery.datetimepicker.js\", __FILE__ ));\n\twp_enqueue_script( \"eventos_scripts\",plugins_url( \"/js/scripts.js\", __FILE__ ));\n}",
"function jakes_message_enqueue_scripts() {\r\n\r\n global $pagenow, $typenow;\r\n \r\n if ( $typenow == 'message') {\r\n\r\n wp_enqueue_style('message-cpt-style', get_template_directory_uri().'/css/message-cpt-style.css', false, '1.0.0', 'all');\r\n wp_enqueue_script('customjs-jakob', get_template_directory_uri().'/js/message-cpt-script.js', array(), '1.0.0', true);\r\n\r\n }\r\n}",
"function enqueue_scripts() {\n wp_register_script( 'waypoints', THEME . '/js/waypoint.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'waypoints' );\n wp_register_script( 'slick', THEME . '/js/slick.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'slick' );\n wp_register_script( 'validate', THEME . '/js/validate.min.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'validate' );\n wp_register_script( 'client', THEME . '/js/client.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'client' );\n wp_register_script( 'scripts', THEME . '/js/scripts.js', array( 'jquery' ), '1', true ); wp_enqueue_script( 'scripts' );\n}",
"function enqueue(){ \n\n wp_enqueue_script( 'jqx', 'https://code.jquery.com/jquery-1.12.4.js', array ( 'json2' ), 1.1, false);\n\n wp_enqueue_script( 'jqui','https://code.jquery.com/ui/1.12.1/jquery-ui.js', array ( 'jqx' ), 1.1, false);\n wp_enqueue_style( 'jqui','https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css',2); \n\n wp_enqueue_script( 'jqx_touch', plugins_url('/js/jquery.ui.touch-punch.min.js',__FILE__), array ( 'jquery' ), 1.1, true); \n \n wp_enqueue_script( 'dicejs', plugins_url('/js/dice.js',__FILE__), array ( 'jqx','jquery','jqx_touch' ), 1.1, true);\n wp_enqueue_style( 'dicecss', plugins_url('/css/dice.css',__FILE__), 99);\n }",
"function add_customjs() {\n wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js' , array('jquery'),3, true ); \n //se agrega jquery UI a la pagina\n //wp_enqueue_script( 'datepicker',get_stylesheet_directory_uri().'/js/datepicker/datepicker-min.js', array('jquery'),3, true ); \n //se agrega el plugin pickadate a la pagina\n wp_enqueue_script( 'datepicker',get_stylesheet_directory_uri().'/js/pickadate/picker-min.js', array('jquery'),3, true ); \n wp_enqueue_script( 'datepicker-date',get_stylesheet_directory_uri().'/js/pickadate/picker.date-min.js', array('jquery'),3, true ); \n wp_enqueue_script( 'datepicker-time',get_stylesheet_directory_uri().'/js/pickadate/picker.time.js', array('jquery'),3, true );\n \n //se agregan los js del tema hijo \n wp_enqueue_script( 'customjs', get_stylesheet_directory_uri().'/js/script_child_theme.js', array('jquery'),4, true );\n //se agrega el js para el bookin \n wp_enqueue_script( 'bookin2', get_stylesheet_directory_uri().'/js/bookin.js', array('jquery'),4, true ); \n wp_enqueue_script( 'validate', get_stylesheet_directory_uri().'/js/jquery.validate-min.js', array('jquery'),4, true ); \n \n\n if($_SERVER['REQUEST_URI']=='/blog-and-newsletter/' || valid_news_url($_SERVER['REQUEST_URI']) ){ \n \n wp_enqueue_script( 'contact-form', get_stylesheet_directory_uri().'/react-components/js/contact.js' , array('jquery'),3, true );\n wp_enqueue_style( 'css-react' , get_stylesheet_directory_uri().\"/react-components/widget-contact.css\", array(),'3', 'all' ); \n \n }\n\n // se agregan los css para los iconos\n wp_enqueue_style( 'iconos' , \"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\", array(),'3', 'all' );\n //se agrega el css para el header\n wp_enqueue_style( 'header' , get_stylesheet_directory_uri().\"/css/header.css\", array(),'4', 'all' );\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'footer' , get_stylesheet_directory_uri().\"/css/footer.css\", array(),'4', 'all' );\n // se agrega el css para el estilo del footer\n //wp_enqueue_style( 'restaurants' , get_stylesheet_directory_uri().\"/css/home.css\", array(),'4', 'all' );\n if($_SERVER['REQUEST_URI']=='/restaurants-bars/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'home' , get_stylesheet_directory_uri().\"/css/restaurants.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/rr2016/especial-events-payment/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'Special_events_payments' , get_stylesheet_directory_uri().\"/css/Special_events_payment.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/forgot-pin/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'forgot-pin' , get_stylesheet_directory_uri().\"/css/forgot-pin.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/register-email/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'register-email' , get_stylesheet_directory_uri().\"/css/register-email.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/home-members/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'members' , get_stylesheet_directory_uri().\"/css/home-members.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/contact-question-form/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'question-form' , get_stylesheet_directory_uri().\"/css/question-form.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/airport-transfers/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'airport-transfers' , get_stylesheet_directory_uri().\"/css/airport-transfers.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/free-shuttle-in-cancun/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'free-shuttle-in-cancun' , get_stylesheet_directory_uri().\"/css/free-shuttle-in-cancun.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/the-royal-market/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-market' , get_stylesheet_directory_uri().\"/css/the-royal-market.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/kitchen_stuffers/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'kitchen_stuffers' , get_stylesheet_directory_uri().\"/css/kitchen_stuffers.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/register_email_address/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'registeremail' , get_stylesheet_directory_uri().\"/css/registeremail.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-cancun/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-sands/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-haciendas/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-caribbean/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/grand-residences/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/the-royal-islander/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'the-royal-sands' , get_stylesheet_directory_uri().\"/css/the-royal-sands.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/discover-royal-resorts/'){\n // js de los resorts\n wp_enqueue_script( 'resorts', get_stylesheet_directory_uri().'/js/resorts-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'discover-royal-resorts' , get_stylesheet_directory_uri().\"/css/discover-royal-resorts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/restaurants-in-cancun-playa-del-carmen/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'restaurants-in-cancun-playa-del-carmen' , get_stylesheet_directory_uri().\"/css/restaurants-in-cancun-playa-del-carmen.css\", array(),'4', 'all' );\n wp_enqueue_style( 'estilo' , get_stylesheet_directory_uri().\"/css/estilo.css\", array(),'4', 'all' );\n\n wp_enqueue_script( 'bookin-reservations', get_stylesheet_directory_uri().'/js/bookin-reservations.js', array('jquery'),4, true );\n\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/capitains-cove/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'restaurants-and-bars' , get_stylesheet_directory_uri().\"/css/restaurants-and-bars.css\", array(),'4', 'all' );\n } \n \n\n if($_SERVER['REQUEST_URI']=='/destinations/weather-in-cancun-and-riviera-maya/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/'){\n //\n wp_enqueue_style( 'css-normalize' , \"/weather1/demo/css/normalize.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-apis' , \"https://fonts.googleapis.com/css?family=Roboto:400,100,300,700,500,900\", array(),'4', 'all' );\n wp_enqueue_style( 'css-demo' , \"/weather1/demo/css/demo.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-style' , \"/weather1/demo/css/style1.css\", array(),'4', 'all' );\n wp_enqueue_style( 'css-style-weather' , get_stylesheet_directory_uri().\"/css/css-style-weather.css\", array(),'4', 'all' );\n wp_enqueue_script( 'animacion-js', get_stylesheet_directory_uri().'/js/animacion-js-min.js', array('jquery'),4, true );\n wp_enqueue_script( 'animacion', '/weather1/demo/js/index.js', array('animacion-js'),4, true );\n wp_enqueue_script('index-weather', \"https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM weather.forecast WHERE woeid='114632' and u='c'&format=json&callback=callbackFunction\", array('animacion-js'),4, true );\n wp_enqueue_style( 'clima' , get_stylesheet_directory_uri().\"/css/clima.css\", array(),'4', 'all' );\n }\n\n /* 24/02/16 and 25/02/16 */\n\n if($_SERVER['REQUEST_URI']=='/cakes/'){\n wp_enqueue_style( 'cakes' , get_stylesheet_directory_uri().\"/css/cakes.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/check-out-ksk/'){\n wp_enqueue_style( 'market-chekout' , get_stylesheet_directory_uri().\"/css/market-chekout.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/check-out-multi/'){\n wp_enqueue_style( 'market-chekout-multi' , get_stylesheet_directory_uri().\"/css/market-checkout-multi.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/check-out/'){\n wp_enqueue_style( 'market-chekout-multi' , get_stylesheet_directory_uri().\"/css/market-checkout-multi.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/gift-certificates/'){\n wp_enqueue_style( 'gift-certificates' , get_stylesheet_directory_uri().\"/css/gift-certificates.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/order-confirmation/'){\n wp_enqueue_style( 'order-confirmation' , get_stylesheet_directory_uri().\"/css/order-confirmation.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/request-status/'){\n wp_enqueue_style( 'request-status' , get_stylesheet_directory_uri().\"/css/request-status.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/shopping-cart/'){\n wp_enqueue_style( 'shopping-cart' , get_stylesheet_directory_uri().\"/css/shopping-cart.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/spa-gift-certificates/'){\n wp_enqueue_style( 'spa-gift-certificates' , get_stylesheet_directory_uri().\"/css/spa-gift-certificates.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/motorized-wheelchair/'){\n wp_enqueue_style( 'motorized-wheelchair' , get_stylesheet_directory_uri().\"/css/motorized-wheelchair.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/special-gifts/'){\n wp_enqueue_style( 'special-gifts' , get_stylesheet_directory_uri().\"/css/special-gifts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/' || $_SERVER['REQUEST_URI']==''){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'home' , get_stylesheet_directory_uri().\"/css/home.css\", array(),'4', 'all' );\n } \n\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/weddings-and-special-events/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'weddings-and-special-events' , get_stylesheet_directory_uri().\"/css/weddings-and-special-events.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/spa/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'spa' , get_stylesheet_directory_uri().\"/css/spa.css\", array(),'4', 'all' );\n }\n\n\n\n\n if($_SERVER['REQUEST_URI']=='/special-offers/'){\n // js de los resorts\n wp_enqueue_script( 'promociones', get_stylesheet_directory_uri().'/js/promociones.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'royal-resorts-specials' , get_stylesheet_directory_uri().\"/css/royal-resorts-specials.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/our-recommendations/'){\n // js de los resorts\n //wp_enqueue_script( 'promociones', get_stylesheet_directory_uri().'/js/promociones-min.js', array('jquery'),4, true ); \n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'our-recommendations' , get_stylesheet_directory_uri().\"/css/our-recommendations.css\", array(),'4', 'all' );\n }\n\n\n\n if($_SERVER['REQUEST_URI']=='/directory/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'directory' , get_stylesheet_directory_uri().\"/css/directory.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/about-royal-resorts/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'about-royal-resorts' , get_stylesheet_directory_uri().\"/css/about-royal-resorts.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/press-releases/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'press-releases' , get_stylesheet_directory_uri().\"/css/press-releases.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/privacy-policy/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'privacy-policy' , get_stylesheet_directory_uri().\"/css/privacy-policy.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/faq/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'faq' , get_stylesheet_directory_uri().\"/css/faq.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/family-friendly-resorts-cancun/downloads/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'interval-calendar' , get_stylesheet_directory_uri().\"/css/interval-calendar.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/ask-joanna/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'ask-joanna' , get_stylesheet_directory_uri().\"/css/ask-joanna.css\", array(),'4', 'all' );\n } \n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/fitness-center/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'fitness-center' , get_stylesheet_directory_uri().\"/css/fitness-center.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/gift-shops/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'gift-shops' , get_stylesheet_directory_uri().\"/css/gift-shops.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-package' , get_stylesheet_directory_uri().\"/css/all-inclusive-package.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/royal-resorts-vacation-experience/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'vacation-experience' , get_stylesheet_directory_uri().\"/css/vacation-experience.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-rules/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-policies/'){\n // se agrega el css para el estilo del footer\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/all-inclusive-faqs/'){\n wp_enqueue_style( 'all-inclusive-rules' , get_stylesheet_directory_uri().\"/css/all-inclusive-rules.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/refine-all-inclusive-package/refine-all-inclusive-rates/'){\n wp_enqueue_style( 'all-inclusive-rates' , get_stylesheet_directory_uri().\"/css/all-inclusive-rates.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/coco-bongo-show-and-disco/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n } \n\n if($_SERVER['REQUEST_URI']=='/luxury-avenue/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/jewelry-collection-last-lifetime/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-caribbean-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-sands-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-haciendas-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-cancun-webcam/' || $_SERVER['REQUEST_URI']=='/weather-and-webcams-in-cancun-and-riviera-maya/the-royal-islander-webcam/'){\n\n wp_enqueue_style( 'camaras', get_stylesheet_directory_uri().\"/css/camarassection.css\", array(),'4', 'all' );\n \n }\n\n\n /* 16/03/16 and 17/02/16 */\n if($_SERVER['REQUEST_URI']=='/online-preregistration-details/'){\n wp_enqueue_style( 'online-preregistration-details' , get_stylesheet_directory_uri().\"/css/online-preregistration-details.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/destinations/riviera-maya-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/cancun-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/destinations/yucatan-destination-guide/'){\n wp_enqueue_style( 'destinations' , get_stylesheet_directory_uri().\"/css/destinations.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/royal-resorts-signature-club/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/vacation-ownership-rights/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/how-to-become-a-member/'){\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/'){\n\n wp_enqueue_style( 'royal-resorts-signature-club' , get_stylesheet_directory_uri().\"/css/royal-resorts-signature-club.css\", array(),'4', 'all' );\n }\n if($_SERVER['REQUEST_URI']=='/guest-services-and-amenities/activities-sports/'){\n\n wp_enqueue_style( 'activities-sports' , get_stylesheet_directory_uri().\"/css/activities-sports.css\", array(),'4', 'all' ); \n }\n // se agrega el css para el bookin\n wp_enqueue_style( 'bookin' , get_stylesheet_directory_uri().\"/css/bookin.css\", array(),'4', 'all' );\n // se agregan los css del pickadate\n wp_enqueue_style( 'datepicker' , get_stylesheet_directory_uri().\"/css/pickadate/default.css\", array(),'4', 'all' ); \n wp_enqueue_style( 'datepicker-theme' , get_stylesheet_directory_uri().\"/css/pickadate/default.date.css\", array(),'4', 'all' );\n wp_enqueue_style( 'datepicker-themetime' , get_stylesheet_directory_uri().\"/css/pickadate/default.time.css\", array(),'3', 'all' ); \n\n\n wp_enqueue_script( 'jquery' );\n}",
"function enqueue_window_animation() {\n wp_register_script( 'hms_jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js', array(), '3.3.1', true );\n // Enqueue Window Animation in Header jQuery 3.3.1 is present.\n\t\twp_enqueue_script( 'window_animation', get_stylesheet_directory_uri() . '/inc/js/window-animation.min.js', array('hms_jquery'), '3.3.1', true );\n }",
"function register_scripts_with_jquery(){ \n // Register the script like this for a plugin:\n // wp_register_style( '')\n wp_register_style( 'curastreamStyle', plugins_url( 'assets/css/style.css', __FILE__ ));\n wp_enqueue_style( 'curastreamStyle');\n wp_register_script( 'custom-programUI-script', plugins_url( 'assets/js/customProgramUI.js', __FILE__ ), \"\", \"\", true);\n wp_register_script( 'catagory-management-script', plugins_url( 'assets/js/categoryManagement.js', __FILE__ ), \"\", \"\", true);\n // For either a plugin or a theme, you can then enqueue the script:\n wp_enqueue_script( 'custom-programUI-script' );\n wp_enqueue_script( 'catagory-management-script' );\n}"
]
| [
"0.6992234",
"0.6499352",
"0.64374214",
"0.64326483",
"0.6426292",
"0.6425722",
"0.6418166",
"0.6372247",
"0.637026",
"0.636368",
"0.6354725",
"0.63387126",
"0.6337767",
"0.63250667",
"0.6319121",
"0.6316091",
"0.63114905",
"0.63013506",
"0.62790394",
"0.6278932",
"0.62735635",
"0.62600803",
"0.6256443",
"0.6246486",
"0.62452406",
"0.6230769",
"0.6229186",
"0.6221079",
"0.62092346",
"0.6208133"
]
| 0.81571126 | 0 |
Show Devices by Site ID | public function showDeviceBySiteId(Request $request,$id)
{
if ($request->ajax()) {
$results = DeviceSite::where('site_id',$id)->get();
return view('admin::sites.device-sites',compact('results'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Site $site)\n {\n //\n }",
"public function show(Site $site)\n {\n //\n }",
"public function show($id)\n {\n $devices = Device::all();\n $user = User::find($id);\n $userDevices = $user->devices;\n $devices = $devices->pluck('name', 'device_id');\n\n\n return view('inc.deviceManagement')->with(['devices' => $devices,\n 'userDevices' => $userDevices, 'user' => $user]);\n }",
"public function index($site_id)\n {\n $this->load->model('data_model');\n \n $this->dso->add_to(\n 'breadcrumbs', \n base_url() . 'site/index/' . $site_id, 'Visualize site'\n );\n $this->dso->page_title = 'Site Data Visualization';\n \n $site = $this->site_model->get($site_id);\n \n $totals = $this->data_model->get_total_sessions('site', $site_id);\n $this->dso->onion_width = $totals->max_width > LAYOUT_WIDTH \n ? LAYOUT_WIDTH\n : $totals->max_width;\n $this->dso->onion_height = $totals->max_width > LAYOUT_WIDTH \n ? LAYOUT_WIDTH / $totals->max_width * $totals->max_height\n : $totals->max_height;\n \n $set1 = $this->data_model->get_for_site($site_id, TRUE, 'width DESC');\n $devices1 = $this->data_model->render_set($set1, $totals);\n $this->dso->devices1 = $devices1; \n \n $set2 = $this->data_model->get_for_site($site_id, TRUE);\n $devices2 = $this->data_model->render_set($set2, $totals);\n $this->dso->devices2 = $devices2; \n \n \n $this->dso->site = $site;\n \n show_view('site/index', $this->dso->all);\n }",
"public function show($id)\n {\n //\n $device = Devices::with('devicefunction','recparams','devicefunction.params')->find($id);\n if($this->user->id == $device->user_id){\n return view('workspace.device_detail',['device' =>$device]);\n }else{\n return abort(403);\n }\n }",
"public function show(Siteinfo $siteinfo)\n {\n //\n }",
"public function show(sites $sites)\n {\n //\n }",
"public function show($id)\n {\n //\n\n\n $sitios = site::find($id);\n\n // dd($id);\n \n return view('sites.show', compact('sitios'));\n }",
"public function devices()\n {\n $this->db->select('*');\n $this->db->select('*');\n $query = $this->db->get('analytics');\n \n }",
"public function show(Device $device)\n {\n //\n }",
"public function show(Device $device)\n {\n //\n }",
"public function show(Device $device)\n {\n //\n }",
"public function for_site($site_id = '')\n {\n }",
"public function show(SiteInfo $siteInfo)\n {\n //\n }",
"public function show($id)\n {\n $d = Device::find($id);\n\n return view('devices.show' , compact( 'd'));\n }",
"public function show($id)\n {\n //\n //return $id;\n $index_loc = DB::table('mosdevices')->where('location', '=', '22.994347,120.218050')->first()->device_number;\n $mosdata=DB::table('mosdatas')->where('data_device_number', '=', $index_loc)->get();\n return view('layout.mos_device_distributed_highchart',compact('mosdata'));\n }",
"private function getOneNotifDeviceByDeviceId() {\n $this->user_panel->checkAuth();\n $this->notif_device->findOneByDeviceId();\n }",
"function widgetopts_tab_devices( $args ){ ?>\n <li class=\"extended-widget-opts-tab-devices\">\n <a href=\"#extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" title=\"<?php _e( 'Devices', 'widget-options' );?>\" ><span class=\"dashicons dashicons-smartphone\"></span> <span class=\"tabtitle\"><?php _e( 'Devices', 'widget-options' );?></span></a>\n </li>\n <?php\n }",
"public function single($siteid) {\n return siteinfo($siteid);\n }",
"public function indexAction(){\n \n $this->_view->display('device_list.tpl');\n }",
"public function show($id)\n {\n // $isdh = Isdh::with('title_isdh')->where('id', $id)->first();\n $isdh = Isdh::find($id);\n \treturn view('website.isdh_single', compact('isdh'));\n }",
"abstract public function listDevices();",
"public function show($id)\n {\n return view('setups::systemInformation.show');\n }",
"public function actionView($id)\n {\n if(isset(Yii::$app->user->identity->id)){\n if(SiteController::findCom(16)){\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }\n else {\n $this->redirect(['site/error']);\n }\n }else {\n $this->redirect(['site/login']);\n }\n}",
"public function testDevicesIndex()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->assertSee('Devices')\n ->assertSee('Kitchen Fridge')\n ->assertSee('Thermostat')\n ->assertSee('Gas Meter')\n ->assertSee('Water Meter')\n ->assertSee('Electricity Meter');\n });\n }",
"public function show($id)\n {\n if(!hasTask('admin/drivers/view')){\n return view('errors.404');\n }\n //Get driver details\n $drivers = Drivers::find($id);\n if(!count($drivers))\n {\n Session::flash('message', 'Invalid Driver Details'); \n return Redirect::to('admin/drivers');\n }\n SEOMeta::setTitle('View Driver - '.$this->site_name);\n SEOMeta::setDescription('View Driver - '.$this->site_name);\n return view('admin.drivers.show')->with('data', $drivers);\n }",
"public function show(DeviceType $deviceType)\n {\n //\n }",
"public function show($id) {\n $website = Website::find($id);\n return view('website.show', compact('webiste'));\n }",
"public function edit($id)\n {\n if ($id)\n {\n $record = DeviceSite::find($id);\n return response()->json([$record]);\n }\n }",
"function widgetopts_tabcontent_devices( $args ){\n $desktop = '';\n $tablet = '';\n $mobile = '';\n $options_role = '';\n if( isset( $args['params'] ) && isset( $args['params']['devices'] ) ){\n if( isset( $args['params']['devices']['options'] ) ){\n $options_role = $args['params']['devices']['options'];\n }\n if( isset( $args['params']['devices']['desktop'] ) ){\n $desktop = $args['params']['devices']['desktop'];\n }\n if( isset( $args['params']['devices']['tablet'] ) ){\n $tablet = $args['params']['devices']['tablet'];\n }\n if( isset( $args['params']['devices']['mobile'] ) ){\n $mobile = $args['params']['devices']['mobile'];\n }\n }\n ?>\n <div id=\"extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" class=\"extended-widget-opts-tabcontent extended-widget-opts-tabcontent-devices\">\n <p>\n <strong><?php _e( 'Hide/Show', 'widget-options' );?></strong>\n <select class=\"widefat\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][options]\">\n <option value=\"hide\" <?php if( $options_role == 'hide' ){ echo 'selected=\"selected\"'; }?> ><?php _e( 'Hide on checked devices', 'widget-options' );?></option>\n <option value=\"show\" <?php if( $options_role == 'show' ){ echo 'selected=\"selected\"'; }?>><?php _e( 'Show on checked devices', 'widget-options' );?></option>\n </select>\n </p>\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <td scope=\"row\"><strong><?php _e( 'Devices', 'widget-options' );?></strong></td>\n <td> </td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-desktop\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-desktop\"><?php _e( 'Desktop', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][desktop]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-desktop\" <?php if( !empty( $desktop ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-tablet\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-table\"><?php _e( 'Tablet', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][tablet]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-table\" <?php if( !empty( $tablet ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n <tr valign=\"top\">\n <td scope=\"row\"><span class=\"dashicons dashicons-smartphone\"></span> <label for=\"extended_widget_opts-<?php echo $args['id'];?>-devices-mobile\"><?php _e( 'Mobile', 'widget-options' );?></label></td>\n <td>\n <input type=\"checkbox\" name=\"<?php echo $args['namespace'];?>[extended_widget_opts][devices][mobile]\" value=\"1\" id=\"extended_widget_opts-<?php echo $args['id'];?>-devices-mobile\" <?php if( !empty( $mobile ) ){ echo 'checked=\"checked\"'; }?> />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n<?php\n}"
]
| [
"0.615408",
"0.615408",
"0.6031217",
"0.60052186",
"0.60039437",
"0.599986",
"0.59005696",
"0.5880219",
"0.58760303",
"0.58738685",
"0.58738685",
"0.58738685",
"0.58721524",
"0.58606946",
"0.58577704",
"0.57881343",
"0.5701316",
"0.55794376",
"0.55430174",
"0.55428094",
"0.5485885",
"0.5474101",
"0.5471179",
"0.544465",
"0.54342324",
"0.5429516",
"0.5410681",
"0.54055107",
"0.54044765",
"0.53955626"
]
| 0.7684554 | 0 |
Gets the groups this user is a member of. | public function groups()
{
$return = ['everyone'];
$groups = GroupMember::where('user_id', $this->id())
->sort('`group` ASC')
->all();
foreach ($groups as $group) {
$return[] = $group->group;
}
return $return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}",
"public function getGroups()\n {\n if ($this->_oGroups == null && $sOxid = $this->getId()) {\n // usergroups\n $this->_oGroups = oxNew('oxlist', 'oxgroups');\n $sViewName = getViewName(\"oxgroups\", $this->getLanguage());\n $sSelect = \"select {$sViewName}.* from {$sViewName}, oxobject2group \";\n $sSelect .= \"where oxobject2group.oxobjectid='$sOxid' \";\n $sSelect .= \"and oxobject2group.oxgroupsid={$sViewName}.oxid \";\n $this->_oGroups->selectString($sSelect);\n }\n\n return $this->_oGroups;\n }",
"public function get_groups()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array(array('UniGroup', $this->user[static::_column('group')]));\n\t}",
"public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"public function getGroups() {\r\n // Array to hold the group objects\r\n $groups = [];\r\n // Loop through each of the groups the user belongs to\r\n foreach ($this->groups as $group) {\r\n // Get the group from the database\r\n $grp = UserGroup::getByName($group);\r\n // If the group has a valid ID (not 0 or less)\r\n if ($grp->id != 0) {\r\n // Add the group to the array\r\n $groups[] = $grp;\r\n }\r\n }\r\n // Return the groups array\r\n return $groups;\r\n }",
"public function getUserGroups()\n {\n $query = \"SELECT groupName FROM UserGroupAccess\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return false;\n }",
"function getGroups()\n {\n//\t\t$this->_groups = array();\n if ( empty( $this->_groups ) ) {\n $member_handler = &zarilia_gethandler( 'member' );\n if ( $this->getVar( 'uid' ) ) {\n $this->_groups = $member_handler->getGroupsByUser( $this->getVar( 'uid' ) );\t\t\t\t\n } else {\n $this->_groups = array( 0 => ZAR_GROUP_ANONYMOUS );\n }\n }\t\t\n return $this->_groups;\n }",
"public function getGroups() {\n return $this->getGuardUser() ? $this->getGuardUser()->getGroups() : array();\n }",
"public function listGroups($user) {\n return $user->groups;\n }",
"public function getGroups()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getGroups() : array();\r\n }",
"public static function getCurrentUserGroups()\n {\n return self::getUserGroups();\n }",
"private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_groups', $where);\n $res = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)))\n {\n $res[$row['uid']] = $row;\n }\n\n $this->loadGroupIcons($res);\n\n return $res;\n }",
"public function get_groups(){\n $group_users = private_party_group_user::search()->where('uid', $this->uid)->exec();\n $merged_groups = array();\n foreach($group_users as $group_user){\n /* @var $group_user private_party_group_user */\n $groups = $group_user->get_groups();\n $merged_groups = array_merge($merged_groups, $groups);\n }\n return $merged_groups;\n }",
"public function GetMembers()\n {\n if($this->getGroupId())\n {\n $user = new User($this->sqlDataBase);\n $groupMembers = $user->GetGroupUsers($this->groupId);\n return $groupMembers;\n }\n return array();\n }",
"public function getGroups()\n {\n return $this->groups;\n }",
"public function getGroups()\n\t{\n\t\treturn $this->groups;\n\t}",
"public function getGroups() {\n return $this->groups;\n }",
"public function getGroupsWithMember($user_id) {\n return $this->get('get_groups_with_member', ['user_id' => $user_id]);\n }",
"public function groups()\n {\n $response = $this->request->post($this->requestUrl('get_groups'), $this->params);\n\n return $response->groups;\n }",
"public function getGroups()\n {\n if (is_null($this->groups)) {\n /** @psalm-var ?list<mixed> $data */\n $data = $this->raw(self::FIELD_GROUPS);\n if (is_null($data)) {\n return null;\n }\n $this->groups = $data;\n }\n\n return $this->groups;\n }",
"public function getUsersInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$group = FormUtil::getPassedValue('group', null, 'GETPOST');\n\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$group = UserUtil::getGroups('name = \\'' . mysql_escape_string($group) . '\\'');\n\t\t$return = array();\n\t\tif(count($group) == 1) {\n\t\t\tforeach($group as $item) {\n\t\t\t\t$users = UserUtil::getUsersForGroup($item['gid']);\n\t\t\t\tforeach($users as $uid) {\n\t\t\t\t\t$return[] = UserUtil::getVar('uname', $uid);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\treturn self::ret($return);\n\t}",
"public function getUserGroups()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('userGroups');\n }",
"public function groups()\n {\n return $this->hasMany(Group::class, 'memberuid', 'uid');\n }",
"public function getAllGroups() {\n\t\t$groups = $this->group->getAll();\n\t\treturn $groups;\n\t}",
"public function getGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$search = FormUtil::getPassedValue('search', null, 'GETPOST');\n\t\tif($search == 'admin') {\n\t\t\t$return = array('admin');\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\tif($search != '') {\n\t\t\t$where = 'name LIKE \\'' . mysql_escape_string($search) . '%\\'';\n\t\t} else {\n\t\t\t$where = '';\n\t\t}\n\t\t$offset = (integer)FormUtil::getPassedValue('offset', -1);\n\t\tif($offset == null) {\n\t\t\t$offset = -1;\n\t\t}\n\t\t$limit = (integer)FormUtil::getPassedValue('limit', -1);\n\t\tif($limit == null) {\n\t\t\t$limit = -1;\n\t\t}\n\n\t\t$groups = UserUtil::getGroups($where, 'name', $offset, $limit);\n\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$return[] = $item['name'];\n\t\t}\n\n\t\treturn self::ret($return);\n\t}",
"function get_groups() {\n\t\tif (!isset($_SESSION['groups']))\n\t\t\tlgi_mysql_fetch_session(\"SELECT GROUP_CONCAT(`name`) AS `groups` FROM %t(usergroups) AS p, %t(usercerts) AS c WHERE p.`usercertid`=c.`id` AND c.`user`='%%'\", $this->userid);\n\t\treturn explode(',', $_SESSION['groups']);\n\t}",
"public function getUserGroupMemberShip($userId)\n {\n return $this->_userDao->getGroupList($userId);\n }",
"public static function getAllGroupsByUserId($userId)\n {\n $arrMemberGroups = array();\n $arrOwnGroups = array();\n $arrAllGroups = array();\n \n // get user memeber groups\n $arrMemberGroups = self::select('network_groups.id', 'network_groups.name', 'network_groups.user_id')->join('group_users', 'group_users.network_group_id', '=', 'network_groups.id')\n ->where('group_users.user_id', '=', $userId)\n ->get()\n ->toArray();\n \n // get users own groups\n $arrOwnGroups = self::select('network_groups.id', 'network_groups.name', 'network_groups.user_id')->join('group_users', 'group_users.network_group_id', '=', 'network_groups.id')\n ->where('network_groups.user_id', '=', $userId)\n ->groupBy('network_groups.id')\n ->get()\n ->toArray();\n \n // merge all\n $arrAllGroups = array_merge($arrMemberGroups, $arrOwnGroups);\n \n return $arrAllGroups;\n }",
"public function getUserGroups($userId){\n $query = \"SELECT * FROM groups g JOIN user_groups ug \n ON g.id = ug.groupId\n WHERE ug.userId='$userId' ORDER BY g.groupName;\";\n return $this->getData($query);\n }",
"protected function _get_members_groups($member)\n {\n if ($member == $this->get_guest_id()) {\n return array(-1);\n }\n\n $groups = array();\n $additional_groups = explode(',', $this->get_member_row_field($member, 'additionalgroups'));\n foreach ($additional_groups as $key => $value) {\n if (!empty($value)) {\n $groups[] = $value;\n }\n }\n $groups[] = $this->get_member_row_field($member, 'usergroup');\n\n return $groups;\n }"
]
| [
"0.79191273",
"0.77802896",
"0.7761671",
"0.75694394",
"0.7554897",
"0.7506751",
"0.7502249",
"0.7477684",
"0.7460359",
"0.7455597",
"0.7444235",
"0.7432532",
"0.73641896",
"0.7239706",
"0.7162546",
"0.7143406",
"0.71295285",
"0.7111747",
"0.7003287",
"0.7000231",
"0.6942885",
"0.6901831",
"0.68806",
"0.6849231",
"0.68182373",
"0.679194",
"0.676465",
"0.6761135",
"0.6717238",
"0.6698248"
]
| 0.77837163 | 1 |
Checks if this user is a super user. | public function isSuperUser()
{
return $this->superUser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isSuperUser()\n\t{\n\t\treturn $this->hasPermission('superuser');\n\t}",
"public function isSuper(): bool\n {\n return $this->hasRole('super');\n }",
"public function isSuper() {\n\t\treturn ($this->isAdmin() || $this->Session->read('Acl.isSuper'));\n\t}",
"public static function isSuper(){\n if ( isset($_SESSION['super']) && ($_SESSION['super'] == 1)){\n return true;\n } else {\n return false;\n }\n }",
"public function isSuperuser($userId)\n\t{\n\t\t$assignments = $this->_authManager->getAuthAssignments($userId);\n\t\treturn isset($assignments[ $this->superuserName ]);\n\t}",
"public function isSuperAdmin()\n {\n return ($this->hasRole(HakAkses::SUPER_ADMIN));\n }",
"function isSuperAdmin() {\n return ((int) $this->curUserInfo->is_admin == 1) ? true : false;\n }",
"public function isSuperAdmin()\n {\n return ('superadmin' == $this->role);\n }",
"public function isSuperAdmin() : bool\n\t{\n\t\tif ($this->id == VENUS_SUPER_ADMIN_ID) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function getIsSuperAdmin()\r\n\t{\r\n\t\tif($this->isGuest) return false;\r\n\t\treturn isset($this->superAdmins[$this->identity->username]);\r\n\t}",
"public function isSuperAdmin() {\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\n }",
"public function isSuperAdmin()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getIsSuperAdmin() : false;\r\n }",
"private function isSuperAdmin()\n {\n return $this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN');\n }",
"function getIsSuperAdmin(){\r\n\t\tif(!isset($this->user->permissions))\r\n\t\t\treturn false;\r\n\t\treturn ($this->user && $this->user->permissions>=11);\r\n\t}",
"public function isSuperAdmin() {\n return $this->admin == 2;\n }",
"protected function isSuperAdmin(): bool {\n\t\treturn true;\n\t}",
"public function isSuperAdmin()\n {\n return in_array($this->type, [self::SUPER_ADMIN_TYPE]);\n }",
"public function isSuperUser($user)\n {\n return $this->hasRoles($user, [Role::label(Role::SUPER_USER)]);\n }",
"private function isLoggedInAsSuper($request)\n {\n return ($request->session()->has('super') || $request->user()->isSuper());\n }",
"public static function isSuperUser($user){\n\t\t$email = $user;\n\t\tif(is_object($user) && get_class($user) == \"User\"){\n\t\t\t$email = $user->getEmail();\n\t\t}\n\t\treturn in_array($email, array(\n\t\t\t\"[email protected]\",\n\t\t\t\"[email protected]\",\n\t\t\t\"[email protected]\"\n\t\t));\n\t}",
"function is_superadmin()\n{\n\tif (! is_login()) {\n\t\treturn false;\n\t}\n\n\tif (isset($_SESSION['_user_role']) &&\n\t\t$_SESSION['_user_role'] == '100'\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"public static function isSuperModerator() {\n return (int)$_SESSION['user']['supermoderator'] === 1;\n }",
"public function getIsSuperAdminAttribute()\n {\n return $this->hasRole(Role::superAdmin());\n }",
"function isSuperAdmin(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='superadmin'){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public function isAllowed() {\n\t\tif (!$this->session->has('auth')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = User::findFirst(array('username' => $this->session->get('auth')));\n\n\t\treturn $user->getSuperUser() ? true : false;\n\t}",
"function is_super_admin($user_id = \\false)\n {\n }",
"public static function isSuperAdmin($userId){\n return self::isRole($userId,'roleSuperAdmin');\n }",
"public function isSuperAdmin();",
"function ucdmanager_isSuperadmin($uid=null) {\n\t$user_account = null;\n\tif ( $uid ) {\n\t\t$user_account = user_load($uid);\n\t}\n\t// return user_access('bypass node access', $user_account);\n\treturn user_access('administer nodes', $user_account);\n}",
"public function isSuperAdmin(){\r\n if($this->user_type == 'SuperAdmin'){\r\n return true;\r\n }\r\n return false;\r\n}"
]
| [
"0.8656607",
"0.8067006",
"0.7806444",
"0.7735465",
"0.7717412",
"0.7711298",
"0.7690409",
"0.7686475",
"0.76703",
"0.7548985",
"0.7546685",
"0.75208914",
"0.7514398",
"0.7484136",
"0.74354565",
"0.74181664",
"0.7391688",
"0.7342893",
"0.73301756",
"0.72911024",
"0.7204467",
"0.7179951",
"0.71788913",
"0.70450824",
"0.70068353",
"0.70052147",
"0.6923989",
"0.68912697",
"0.6833097",
"0.6790496"
]
| 0.8446523 | 1 |
///////////////////////////////// Registration ///////////////////////////////// Sets the temporary link attached to the user. | function setTemporaryLink(UserLink $link)
{
$this->_temporaryLink = $link;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTemporaryLink()\n {\n return $this->_temporaryLink;\n }",
"public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}",
"public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }",
"public function updateUserLinked\t(){\n\t\t\n\t\t}",
"public function add_registration_link_text() {\n\t\t\tprintf(\n\t\t\t\t'<p class=\"ast-woo-form-actions\">\n\t\t\t\t\t%1$s\n\t\t\t\t\t<a href=\"#ast-woo-register\" data-type=\"do-register\" class=\"ast-woo-account-form-link\">\n\t\t\t\t\t\t%2$s\n\t\t\t\t\t</a>\n\t\t\t\t</p>',\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_heading', __( 'Not a member?', 'astra-addon' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_string', __( 'Register', 'astra-addon' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t);\n\t\t}",
"protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }",
"public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }",
"public function register($temp)\n {\n // Initialise the table with JUser.\n $user = new JUser;\n $data = (array) $this->getData();\n\n // Merge in the registration data.\n foreach($temp as $k => $v) {\n $data[$k] = $v;\n }\n\n // Prepare the data for the user object.\n $data['email'] = JStringPunycode::emailToPunycode($data['email1']);\n $data['password'] = $data['password1'];\n $data['name'] = $data['firstname'].' '.$data['lastname'];\n $data['activation'] = $data['block'] = 0;\n\n // Bind the data.\n if(!$user->bind($data)) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_BIND_FAILED', $user->getError()));\n return false;\n }\n\n // Load the users plugin group.\n JPluginHelper::importPlugin('user');\n\n // Store the data.\n if(!$user->save()) {\n $this->setError(JText::sprintf('COM_KETSHOP_REGISTRATION_SAVE_FAILED', $user->getError()));\n return false;\n }\n\n // N.B: The linking with the ketshop customer as well as his addresses is performed by the\n // ketshop user plugin in the onUserAfterSave section.\n\n $config = JFactory::getConfig();\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Compile the notification mail values.\n $data = $user->getProperties();\n $data['fromname'] = $config->get('fromname');\n $data['mailfrom'] = $config->get('mailfrom');\n $data['sitename'] = $config->get('sitename');\n $data['siteurl'] = JUri::root();\n\n $emailSubject = JText::sprintf('COM_USERS_EMAIL_ACCOUNT_DETAILS', $data['name'], $data['sitename']);\n $emailBody = JText::sprintf('COM_USERS_EMAIL_REGISTERED_BODY_NOPW', $data['name'], $data['sitename'], $data['siteurl']);\n\n // Send the registration email.\n $return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n // Check for an error.\n if($return !== true) {\n $this->setError(JText::_('COM_USERS_REGISTRATION_SEND_MAIL_FAILED'));\n return false;\n }\n\n return $user->id;\n }",
"function save($ref){\n //this primarily means add/update links\n\n //lookup user id.\n DB::db_query(\"user_id_lookup\", \"SELECT id FROM \\\"user\\\" WHERE username='\".$_SESSION[\"username\"].\"';\");\n if(DB::db_check_result(\"user_id_lookup\") > 0){\n $user_id = DB::db_get_field(\"user_id_lookup\", \"id\"); \n if($user_id == \"\") error(\"Bad User id.\"); \n }\n \n //lookup reference id\n DB::db_query(\"reference_id_lookup\", \"SELECT id FROM reference WHERE reference_id='\".$ref->reference_id.\"';\");\n if(DB::db_check_result(\"reference_id_lookup\") > 0){\n $reference_id = DB::db_get_field(\"reference_id_lookup\", \"id\");\n if($reference_id == \"\") error(\"Bad Reference id.\"); \n }\n\n if(!isset($ref->id)){\n \n //this means we are inserting so we need to: look up the\n //inserted reference's id, look up the users id, then\n //insert the REFERENCE_OF_USER link as appropriate.\n\n $link = new Link;\n $link->from_id = $reference_id;\n $link->to_id = $user_id;\n $link->type = LINK_REFERENCE_OF_USER;\n $link->save();\n \n }\n\n /* This is not being used atm as resource_id is in the reference table\n\n //we are updating hence we need to: check if the\n //REFERENCE_FROM_RESOURCE appropriate link exists, if it doesn't\n //then add it.\n\n if($ref->resource_id != \"\" && $ref->resource_id != \"-1\"){\n\n echo \"here\";\n \n\n DB::db_query(\"link_id_lookup\", \"SELECT id FROM links WHERE from_id='\".$ref->reference_id.\"' \n AND to_id='\".$ref->resource_id.\"' \n AND type='\".LINK_REFERENCE_FROM_RESOURCE.\"';\");\n if(DB::db_num_rows(\"link_id_lookup\") <= 0){\n \n $link = new Link;\n $link->id = $link_id;\n $link->from_id = $reference_id;\n $link->to_id = $ref->resource_id;\n $link->type = LINK_REFERENCE_FROM_RESOURCE;\n $link->save(); \n \n }\n \n } */\n \n }",
"public function referal($tale_id, $error = NULL){\n\n\t\t# displays signup \n\n\t\t# setup view\n\t\t\t$this->template->content = View::instance('v_users_referal');\n\t\t\t$this->template->title = \"Sign up\";\n\t\t\t$this->template->content->tale_id = $tale_id;\n\n\t\t# Pass data to the view\n\t\t$this->template->content->error = $error;\n\n\t\t# render\n\t\t\techo $this->template;\n\t}",
"function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }",
"function clearTemporaryLink()\n {\n $this->_temporaryLink = null;\n return $this;\n }",
"public function forgot_password_link($user)\n {\n $data['first_name'] = $user->first_name;\n\n $token = $data['token'] = str_random(100); // Generate random string values - limit 100\n $url = $data['url'] = URL::to('/').'/';\n\n $data['locale'] = App::getLocale();\n\n $password_resets = new PasswordResets;\n\n $password_resets->email = $user->email;\n $password_resets->token = $data['token'];\n $password_resets->created_at = date('Y-m-d H:i:s');\n \n $password_resets->save(); // Insert a generated token and email in password_resets table\n logger(\"testingg llogger\");\n $email = $user->email;\n $content = [\n 'first_name' => $user->first_name, \n 'url'=> $url,\n 'token' => $token\n ];\n // Send Forgot password email to give user email\n try {\n Mail::to($email)->queue(new ForgotPasswordMail($content));\n return true;\n // $jsonString = file_get_contents($destinationPath); \n }\n catch (\\Exception $e) {\n return false ;\n // $jsonString = \"\"; \n }\n }",
"function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }",
"protected function storeReturnUrl(TemporaryCredentials $temp)\n {\n if ($url = $this->request->input('return_url')) {\n $key = 'oauth_return_url_'.$temp->getIdentifier();\n $this->cache->put($key, $url, ProviderContract::CACHE_TTL);\n }\n }",
"function userSetTemporaryPassword($email) {\n\tqbLogin();\n\tglobal $qb;\n\tglobal $temp_password;\n\t$response = $qb->DoQuery(C_DBID_USERS, \"{'\".C_FID_USER_EMAIL.\"'.EX.'\".$email.\"'}\", 'a');\n\tif (isset($response[0]['3'])) {\n\t\t// Generate and encrypt a temporary password\n\t\t//$temp_password = random_string(10);\n\t\t$temp_password = random_str(10);\n\t\t//$temp_password = substr(bin2hex(openssl_random_pseudo_bytes(128)),0,10);\n\t\t$enc_temp_password = encrypt($temp_password);\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'fid' => C_FID_USER_TEMPORARY_PASSWORD,\n\t\t\t\t'value' => $enc_temp_password\n\t\t\t)\n\t\t);\n\t\t$qb->EditRecord(C_DBID_USERS, $response[0]['3'], $fields); // Save the temporary password in QuickBase\n\t\tsendMail($email, null, 'forgot', $temp_password); // Send the user their temporary password\n\t}\n}",
"public function admin_referral() {\n \tif (!empty($this->request->data)) {\n \t\tif ($this->__save()) {\n \t\t\t$this->__setMessage(__('Settings saved.', true));\n \t\t} else {\n \t\t\t$this->__setError(__('can\\'t save settings.', true));\n \t\t}\n \t}\n \t$data = $this->Setting->getReferralSettings();\n \t$this->request->data = $data;\n \t$this->set('data', $data);\n \t$this->set('tabs', $this->Setting->getTabs($this->params));\n }",
"public function addUserLink($link = array()) {\n foreach( $link as $name => $href ) {\n $this->user_links[$name] = $href;\n }\n }",
"function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}",
"function requestUserLogin($linkText)\n{\n $authSubUrl = getAuthSubUrl();\n echo \"<a href=\\\"{$authSubUrl}\\\">{$linkText}</a>\";\n}",
"public function getTempLink()\n {\n return $this->temp_loc;\n }",
"function setLink($link) {\r\n $this->_link = $link;\r\n }",
"function setLink($link) {\r\n $this->_link = $link;\r\n }",
"function setLink(&$link)\n {\n $this->_link = $link;\n }",
"public function user_confirmation($link)\n\t{\n\t\t//load user model\n\t\t$this->load->model('user');\n\t\t\n\t\t//send link to valid_link user function\n\t\tif ($this->user->valid_link($link))\n\t\t{\n\t\t\t//link is valid, try creating new user\n\t\t\tif($this->user->new_user($link))\n\t\t\t{\n\t\t\t\t//user created, send to registration completion page to enter info\n\t\t\t\t$this->load->view('registration_view');\n\t\t\t}\n\t\t\telse echo 'Error creating new user.';\n\t\t}\n\t\telse echo 'Invalid link.';\n\t}",
"public function set_temporary_credentials() {\n $connection = new TwitterOAuth($this->_config['consumer_key'], $this->_config['consumer_secret']);\n $temporary_credentials = $connection->getRequestToken();\n\n $this->_ci->session->set_userdata( 'oauth_token', $temporary_credentials['oauth_token'] );\n $this->_ci->session->set_userdata( 'oauth_token_secret', $temporary_credentials['oauth_token_secret'] );\n\n $redirect_url = $connection->getAuthorizeURL($temporary_credentials);\n return $redirect_url;\n }",
"function createLoginLinkRequest(User $user);",
"public function setLink($link);",
"function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}",
"protected function prepare_links($user)\n {\n }"
]
| [
"0.6377997",
"0.5984485",
"0.5952041",
"0.5725836",
"0.5650684",
"0.5540842",
"0.5490224",
"0.54593796",
"0.54348767",
"0.54314286",
"0.53844345",
"0.5360663",
"0.5346193",
"0.5344653",
"0.53431016",
"0.53301203",
"0.5314621",
"0.5307288",
"0.5291185",
"0.5272707",
"0.52722704",
"0.526157",
"0.526157",
"0.5219539",
"0.5218894",
"0.5213829",
"0.52006286",
"0.5190496",
"0.5187235",
"0.5187154"
]
| 0.7245877 | 0 |
Clears the temporary link attached to the user. | function clearTemporaryLink()
{
$this->_temporaryLink = null;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setTemporaryLink(UserLink $link)\n {\n $this->_temporaryLink = $link;\n return $this;\n }",
"public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }",
"protected function clearCachedUserData()\n {\n $user = Auth::user();\n\n if ($user) {\n $user->deleteUserData();\n }\n }",
"public static function clear_temp_user_data( $user_login ) {\n\t\tif ( $temp_id = self::get_guest_id() ) {\n\t\t\tlearn_press_remove_cookie( 'learn_press_user_guest_id' );\n\t\t\tdelete_transient( 'learn_press_user_guest_' . $temp_id );\n\n\t\t\tglobal $wpdb;\n\n\t\t\t$query = $wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT user_item_id\n\t\t\t\tFROM {$wpdb->prefix}learnpress_user_items a\n\t\t\t\tINNER JOIN {$wpdb->prefix}learnpress_user_itemmeta b ON a.user_item_id = b.learnpress_user_item_id AND b.meta_key = %s And b.meta_value = %s\n\t\t\t\",\n\t\t\t\t'temp_user_id',\n\t\t\t\t'yes'\n\t\t\t);\n\n\t\t\t$user_item_ids = $wpdb->get_row( $query );\n\t\t\tif ( $user_item_ids ) {\n\t\t\t\t$query = $wpdb->prepare(\n\t\t\t\t\t\"\n\t\t\t\t\tDELETE a.*, b.*\n\t\t\t\t\tFROM {$wpdb->prefix}learnpress_user_items a\n\t\t\t\t\tINNER JOIN {$wpdb->prefix}learnpress_user_itemmeta b\n\t\t\t\t\tWHERE a.user_item_id = b.learnpress_user_item_id\n\t\t\t\t\tAND a.user_id = %d\n\t\t\t\t\",\n\t\t\t\t\t$temp_id\n\t\t\t\t);\n\t\t\t\t$wpdb->query( $query );\n\t\t\t}\n\t\t}\n\t}",
"function clear_auth_cookie_clear_online_user() {\n\t\t$userinfo = wp_get_current_user();\n\n\t\tif ( ! empty( $userinfo->ID ) ) {\n\t\t\t$this->clear_online_user( $userinfo->ID );\n\t\t}\n\t}",
"public function removeTemporary();",
"function getTemporaryLink()\n {\n return $this->_temporaryLink;\n }",
"public function clearUserFavorites()\n\t{\n\t\t$this->collUserFavorites = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"protected function clearUserDataFromStorage()\n {\n $this->session->remove($this->getName());\n\n $recaller = $this->recaller();\n\n if (! is_null($recaller)) {\n $this->getCookieJar()->queue($this->getCookieJar()\n ->forget($this->getRecallerName()));\n\n $this->provider->deleteRememberToken($recaller->id(), $recaller->token());\n }\n }",
"public function clear()\n {\n $this->links = [];\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function actionCleartemp()\n {\n $uploadPath = '../web/web_mat/temp/';\n $file = scandir($uploadPath);\n foreach ($file as $key => $value) {\n if ($key >= 2) {\n unlink($uploadPath . $value);\n }\n }\n }",
"function clear_online_user( $user_id ) {\n\t\t$online_users = UM()->Online()->get_users();\n\n\t\tif ( ! empty( $online_users[ $user_id ] ) ) {\n\t\t\tunset( $online_users[ $user_id ] );\n\t\t\tupdate_option( 'um_online_users', $online_users );\n\n\t\t\tupdate_option( 'um_online_users_last_updated', time() );\n\t\t}\n\t}",
"public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}",
"private function clearTemporaryFiles($usertempdir)\n\t{\n\t\tif (file_exists($usertempdir))\n\t\t{\n\t\t\t$handle=opendir($usertempdir);\n\t\t\n\t\t\twhile (($file = readdir($handle))!==false)\n\t\t\t{\n\t\t\t\t@unlink($usertempdir.'/'.$file);\n\t\t\t}\n\t\t\n\t\t\tclosedir($handle);\n\t\t}\n\t}",
"public function clear_virtual_user_id();",
"static function forget(User $user) {\n $user->forget();\n setcookie( \"userId\", '');\n setcookie( \"rememberToken\", '');\n }",
"public static function forceClearUserSession()\n {\n global $user;\n $uid = $user->uid;\n error_log(\"About to clear session via forceClearUserSession for user $uid\");\n unset($_SESSION['CREATED']); \n unset($_SESSION[CONST_NM_RAPTOR_CONTEXT]);\n\n $all_literalnames = self::getAllSessionValueNames();\n foreach($all_literalnames as $onename=>$onevalue)\n {\n unset($_SESSION[$onename]);\n }\n error_log(\"Cleared session via forceClearUserSession for user $uid\");\n }",
"public function unlinkTwitter() {\n $this->setOauthToken(NULL);\n $this->setOauthTokenSecret(NULL);\n $this->setScreenName(NULL);\n $this->setTwitterId(NULL);\n }",
"public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }"
]
| [
"0.6479358",
"0.63353336",
"0.60632753",
"0.60345715",
"0.60232234",
"0.5948072",
"0.58667064",
"0.5866026",
"0.5856409",
"0.58261806",
"0.5790806",
"0.57888466",
"0.57888466",
"0.5779552",
"0.57674336",
"0.5752255",
"0.5721877",
"0.5716556",
"0.5706657",
"0.5636891",
"0.56188685",
"0.5614545",
"0.55821764",
"0.55821764",
"0.55821764",
"0.55821764",
"0.55821764",
"0.55821764",
"0.55821764",
"0.55821764"
]
| 0.71915627 | 0 |
Gets the temporary link from user registration. | function getTemporaryLink()
{
return $this->_temporaryLink;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}",
"public function getTempLink()\n {\n return $this->temp_loc;\n }",
"public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }",
"function pms_get_register_success_url() {\r\n\r\n $settings = get_option( 'pms_general_settings' );\r\n\r\n if ( isset( $settings['register_success_page'] ) && $settings['register_success_page'] != -1 )\r\n return get_permalink( $settings['register_success_page'] );\r\n\r\n return '';\r\n }",
"public function getSpotiiRegisterUrl()\n {\n return $this->registerUrl;\n }",
"public function userTempFolder(): string\n {\n /** @var \\TYPO3\\CMS\\Core\\Resource\\Folder $folder */\n $folder = $this->getBeUser()->getDefaultUploadTemporaryFolder();\n return $folder->getPublicUrl();\n }",
"public function generateRegisterUrl(): string\n {\n // This is why we 'fake' the username to a uniqid, to use the test system's token storage.\n return sprintf(\n '%s/register/%s',\n $this->accountEndpoint,\n $this->generateToken(\"register_\" . uniqid())\n );\n }",
"public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}",
"public function getAccountLink()\n {\n return $this->account_link;\n }",
"public function getActivationUrl() {\n\t\t$activationUrl = '/registration/activation';\n\t\tif (isset ( $this->profile )) {\n\t\t\t$params ['key'] = $this->activationKey;\n\t\t\t$params ['email'] = $this->profile->email;\n\t\t\t\n\t\t\treturn Yii::app ()->controller->createAbsoluteUrl ( $activationUrl, $params );\n\t\t}\n\t}",
"public function redirectAfterRegister($redirect)\n {\n return wc_get_page_permalink('myaccount');\n }",
"function myAccountLink(){\n\tglobal $current_user;\n\tget_currentuserinfo();\n\n\tif ( is_user_logged_in() ) {\n\t\t$link = \"<a href='/my-account'>Logged in as: \" . $current_user->user_firstname . \" \" . $current_user->user_lastname . \"</a>\";\n\t} else {\n\t\t$link = '';\n\t}\n\n\treturn $link;\n}",
"public function getActivationUrl()\n\t{\n\t\tif (Yum::module('registration')) {\n\t\t\t$activationUrl = Yum::module('registration')->activationUrl;\n\t\t\tif (is_array($activationUrl) && isset($this->profile)) {\n\t\t\t\t$activationUrl = $activationUrl[0];\n\t\t\t\t$params['key'] = $this->activationKey;\n\t\t\t\t$params['email'] = $this->profile->email;\n\n\t\t\t\treturn Yii::app()->controller->createAbsoluteUrl($activationUrl, $params);\n\t\t\t}\n\t\t}\n\t\treturn Yum::t('Activation Url cannot be retrieved');\n\t}",
"function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }",
"public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }",
"public function getActivationUrl()\n\t{\n\t\treturn url('account/activate/'.$this->id.'/'.$this->activation_token);\n\t}",
"protected function getOneTimeLoginUrl() {\n $user = User::load(1);\n \\Drupal::moduleHandler()->load('user');\n return user_pass_reset_url($user);\n }",
"function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}",
"public function getUnRegisterUrl()\n {\n return $this->UnRegisterUrl;\n }",
"public function getLinkRegister($format = UrlGeneratorInterface::RELATIVE_PATH)\n {\n return $this->generator->generate('authProfileRegister', [], $format);\n }",
"public function getRegistrationCompareUrl () {\n\t $date = date('Y-m-d H:i:s', $this->regisrtime);\n\t $date = urlencode($date);\n return 'http://'.$_SERVER['HTTP_HOST'].'/users/confirmregistration/?date='.$date.'&id='.$this->id.'&code='.$this->getRegistrationCode();\n }",
"protected function verificationUrl()\n {\n return Url::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n ['id' => $this->user->getKey()]\n );\n }",
"public function getCreateAccountUrl()\n {\n $url = $this->getData('create_account_url');\n if (is_null($url)) {\n $url = $this->helper('customer')->getRegisterUrl();\n }\n return $url;\n }",
"public function generateUserTokenUrl(AccountInterface $account);",
"function getRedirectLink()\n {\n global $wgRequest;\n if($this->user->isTemporary)\n {\n // User is viewing this from liveshow, means we have to redirect back to ViewSurvey page,\n // and not the wiki page.\n // In this case 'returnto' value does not mean anything, we know where to return.\n $t = Title::newFromText('Special:ViewSurvey');\n\n $url = $t->getLocalURL('liveshow='.$this->user->getTemporaryKey($this->page_id)\n .'&id='.$this->page_id\n .'&userID='.$this->user->userID).'#survey_id_'.$this->page_id;\n return $url;\n }\n else\n {\n $title = Title::newFromText($wgRequest->getVal('returnto'));\n return $title->getLocalURL();\n }\n }",
"function wp_registration_url()\n {\n }",
"public function add_registration_link_text() {\n\t\t\tprintf(\n\t\t\t\t'<p class=\"ast-woo-form-actions\">\n\t\t\t\t\t%1$s\n\t\t\t\t\t<a href=\"#ast-woo-register\" data-type=\"do-register\" class=\"ast-woo-account-form-link\">\n\t\t\t\t\t\t%2$s\n\t\t\t\t\t</a>\n\t\t\t\t</p>',\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_heading', __( 'Not a member?', 'astra-addon' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t\tapply_filters( 'astra_addon_woo_account_register_string', __( 'Register', 'astra-addon' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t);\n\t\t}",
"public function sendForgotPasswordLink(){\n return $this->repository->sendForgotPasswordLink();\n }",
"function get_generic_link() {\n\t\treturn $this->url;\n\t}",
"public function getRegistrationInitURL() {\n\t\treturn Mage::helper(\"adminhtml\")->getUrl(self::URL_REGISTRATION_INIT);\n\t}"
]
| [
"0.66361535",
"0.6517011",
"0.6459022",
"0.62687826",
"0.62031275",
"0.61700606",
"0.61397725",
"0.6110055",
"0.6071891",
"0.6024001",
"0.59574497",
"0.59408706",
"0.5908403",
"0.58708066",
"0.5862238",
"0.58469903",
"0.58068836",
"0.5785397",
"0.5782469",
"0.5757268",
"0.57569",
"0.5755782",
"0.57409555",
"0.5703364",
"0.56941277",
"0.56688166",
"0.56684315",
"0.5636914",
"0.5625994",
"0.56216127"
]
| 0.7446525 | 0 |
///////////////////////////////// Utilities ///////////////////////////////// Gets the mailer parameters when sending email to this user. | protected function getMailerParams()
{
$app = $this->getApp();
return [
'base_url' => $app['base_url'],
'siteEmail' => $app['config']->get('app.email'),
'email' => $this->email,
'username' => $this->name(true),
'to' => [
[
'email' => $this->email,
'name' => $this->name(true),
],
],
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function prepareAndGetMailParams()\n {\n $sendParam['title'] = strip_tags($this->notification->post->title);\n $sendParam['subject'] = \"[{$this->config->site->name}] \" . strip_tags($this->notification->post->title);\n $sendParam['post_url'] = $this->notificationService->getRelatedPostUrl($this->notification);\n $sendParam['settings_url'] = container('config')->site->url . '/settings';\n $sendParam['html_content'] = $this->prepareHtmlContent($sendParam);\n $sendParam['text_content'] = $this->getTextContent($this->prepareTextlContent($sendParam));\n\n return $sendParam;\n }",
"protected function getEmailParams($params) {\n $siteInfo = $this->container->get('e2w_siteinfo_service');\n $whitelabel = $siteInfo->getLabeledUrl($params['owner']->getLabel(), $params['owner']->getAgentId());\n $translator = $this->container->get('translator');\n\n $get5Url = $whitelabel['url'];\n\n $unsubscribeUrl = $get5Url . \"/dashboard/unsubscribe/\" . $params['owner']->getId() . \".\" . $params['owner']->getHash() . \"/low_review\";\n $actionUrl = $get5Url . '/agency/redirect-to-business/' . $params['owner']->getId() . '/customer-' . $params['customer']->getId();\n\n $emailParams = array(\n 'action_url' => $actionUrl,\n //'unsubscribe_url' => $unsubscribeUrl,\n 'get5_url' => $get5Url,\n 'current_year' => date('Y'),\n 'business_name' => $params['business']->getName(),\n 'subject' => $translator->trans('Customer Feedback Alert for %businessName%', array('%businessName%' => $params['business']->getName())),\n 'isAllstate' => $siteInfo->isAllstate($whitelabel['domain']),\n 'isWhitelabeled' => $whitelabel['labeled']\n );\n\n $emailParams['team'] = $whitelabel['labeled'] ? $whitelabel['info']['title'] : 'GetFiveStars';\n\n return $emailParams;\n }",
"protected function mail_config(){\n\t\t\t\t\n\t\treturn array(\n\t\t\t\"protocol\" \t\t=> \"smtp\",\n\t\t\t\"smtp_secure\"\t=> \"ssl\",\n\t\t\t\"smtp_host\" \t=> \"mail.hostname.com\",\n\t\t\t\"smtp_port\"\t\t=> 465,\n\t\t\t\"smtp_timeout\"\t=> 5,\n\t\t\t\"smtp_user\"\t\t=> \"[email protected]\",\n\t\t\t\"smtp_pass\"\t\t=> \"password\",\n\t\t\t\"mailtype\"\t\t=> \"html\",\n\t\t\t\"crlf\"\t\t\t=> \"\\r\\n\",\n\t\t\t\"newline\"\t\t=> \"\\r\\n\",\n\t\t\t\"wordwrap\"\t\t=> true\n\t\t);\n\t\t\n\t\t\n\t}",
"public function getPosterEmail() {\n\t\treturn $this->posterEmail;\n\t}",
"function get_hoster_email()\t{\n\t\t// some mandants may have configured an individual hoster_email in their TS-Template\n\t\tif(!empty($this->conf['contact_email']) && t3lib_div::validEmail($this->conf['contact_email'])){\n\t\t\treturn $this->conf['contact_email'];\n\t\t}\n\n\t\t// default: take the email-adress given in tx_civserv_configuration\n\t\t$hoster_email=\"\";\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'cf_value',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t'tx_civserv_configuration',\t\t\t\t\t\t// FROM ...\n\t\t\t'cf_key = \"mail_to\"',\t\t// AND title LIKE \"%blabla%\"', // WHERE...\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t);\n\t\tif($res){\n\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t$hoster_email = $row['cf_value'];\n\t\t}else{\n\t\t\t$hoster_email = \"info@some_hoster.de\";\n\t\t}\n\t\tif ($hoster_email == ''){\n\t\t\t$hoster_email = \"info@some_hoster.de\";\n\t\t}\n\t\treturn $hoster_email;\n\t}",
"public function getUserMail() {\n return $this->mail;\n }",
"public function getBuyerEmail() {\n return $this->params[\"original\"][\"buyer_email\"];\n }",
"function admin_get_smtp_config()\n{\n global $app, $globalSettings;\n\n $mail = ['username' => $globalSettings[SMTP_USER],\n 'password' => $globalSettings[SMTP_PASSWORD],\n 'smtpserver' => $globalSettings[SMTP_SERVER],\n 'smtpport' => $globalSettings[SMTP_PORT],\n 'smtpenc' => $globalSettings[SMTP_ENCRYPTION]];\n $app->render('admin_mail.html', [\n 'page' => mkPage(getMessageString('admin_mail'), 0, 2),\n 'mail' => $mail,\n 'encryptions' => mkEncryptions(),\n 'isadmin' => is_admin()]);\n}",
"public function getMail()\n {\n return $this->Mail_user;\n }",
"public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }",
"public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }",
"public function gatherActivationEmailProperties() {\n /* generate a password and encode it and the username into the url */\n $pword = $this->modx->user->generatePassword();\n $confirmParams['lp'] = $this->login->base64url_encode($pword);\n $confirmParams['lu'] = $this->login->base64url_encode($this->user->get('username'));\n $confirmParams = array_merge($this->persistParams,$confirmParams);\n\n /* if using redirectBack param, set here to allow dynamic redirection\n * handling from other forms.\n */\n $redirectBack = $this->modx->getOption('redirectBack',$_REQUEST,$this->controller->getProperty('redirectBack',''));\n if (!empty($redirectBack)) {\n $confirmParams['redirectBack'] = $redirectBack;\n }\n $redirectBackParams = $this->modx->getOption('redirectBackParams',$_REQUEST,$this->controller->getProperty('redirectBackParams',''));\n if (!empty($redirectBackParams)) {\n $confirmParams['redirectBackParams'] = $redirectBackParams;\n }\n\n /* generate confirmation url */\n if ($this->login->inTestMode) {\n $confirmUrl = $this->modx->makeUrl(1,'',$confirmParams,'full');\n } else {\n $confirmUrl = $this->modx->makeUrl($this->controller->getProperty('activationResourceId',1),'',$confirmParams,'full');\n }\n\n /* set confirmation email properties */\n $emailTpl = $this->controller->getProperty('activationEmailTpl','lgnActivateEmailTpl');\n $emailTplAlt = $this->controller->getProperty('activationEmailTplAlt','');\n $emailTplType = $this->controller->getProperty('activationEmailTplType','modChunk');\n $emailProperties = $this->user->toArray();\n $emailProperties['confirmUrl'] = $confirmUrl;\n $emailProperties['tpl'] = $emailTpl;\n $emailProperties['tplAlt'] = $emailTplAlt;\n $emailProperties['tplType'] = $emailTplType;\n $emailProperties['password'] = $this->dictionary->get($this->controller->getProperty('passwordField','password'));\n\n $this->setCachePassword($pword);\n return $emailProperties;\n }",
"function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}",
"public static function getSender() \n { \n return emailSettings::$sender; \n }",
"public function getEmailConf()\n\t{\n\t\treturn $this->email_conf;\n\t}",
"private function setVariables(){\n $this->mail->isSMTP();\n //$this->mail->SMTPDebug = 2;\n $this->mail->SMTPDebug = 0;\n //$this->mail->SMTPDebug = 1;\n //$this->mail->SMTPDebug = 4;\n $this->mail->Host = 'smtp.gmail.com';\n //$this->mail->SMTPDebug = 0;\n $this->mail->Port = 587;\n //Set the encryption system to use - ssl (deprecated) or tls\n $this->mail->SMTPSecure = 'tls';\n //Whether to use SMTP authentication\n $this->mail->SMTPAuth = true;\n //Username to use for SMTP authentication - use full email address for gmail\n $this->mail->Username = \"[email protected]\";\n //Password to use for SMTP authentication\n $this->mail->Password = \"password\";\n //Set who the message is to be sent from\n $this->mail->setFrom('[email protected]', 'Dries, CardiffMet');\n //Set an alternative reply-to address\n $this->mail->addReplyTo('[email protected]', 'Dries, CardiffMet');\n }",
"protected function emailConfig()\n {\n return [\n 'host' => $this->config('mail.host'),\n 'port' => $this->config('mail.port'),\n 'username' => $this->config('mail.username'),\n 'password' => $this->config('mail.password'),\n 'from' => $this->config('mail.from')\n ];\n }",
"public function get_email_template_variables()\n\t{\n\t\t$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));\n\n\t\treturn array(\n\t\t\t'AUTHOR_NAME'\t\t\t\t=> htmlspecialchars_decode($user_data['username']),\n\t\t\t'SUBJECT'\t\t\t\t\t=> htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),\n\n\t\t\t'U_VIEW_MESSAGE'\t\t\t=> generate_board_url() . '/ucp.' . $this->php_ext . \"?i=pm&mode=view&p={$this->item_id}\",\n\t\t);\n\t}",
"public function getPayerEmail() {\n\t\treturn $this->_getField(self::$PAYER_EMAIL);\n\t}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"public function getMailTo ()\n {\n return $this->mail_to;\n }",
"function get () {\n $this->_build_mail();\n\n $mail = 'To: '.$this->xheaders['To'].\"\\n\";\n $mail .= 'Subject: '.$this->xheaders['Subject'].\"\\n\";\n $mail .= $this->headers . \"\\n\";\n $mail .= $this->full_body;\n return $mail;\n }",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }",
"public function getSendTo()\n {\n return $this->NameTo ? sprintf('%s <%s>', $this->NameTo, $this->EmailTo) : $this->EmailTo;\n }",
"protected function GetSendReviewCommentNotificationEmail()\n {\n $sSendReviewCommentNotificationEmail = '';\n if (!empty($this->fieldAuthorEmail)) {\n $sSendReviewCommentNotificationEmail = $this->fieldAuthorEmail;\n } elseif (!empty($this->fieldDataExtranetUserId)) {\n $oAuthor = TdbDataExtranetUser::GetNewInstance();\n if ($oAuthor->Load($this->fieldDataExtranetUserId)) {\n $sSendReviewCommentNotificationEmail = $oAuthor->GetUserEMail();\n }\n }\n\n return $sSendReviewCommentNotificationEmail;\n }",
"function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}",
"public function diviroids_user_email($atts)\n {\n return DiviRoids_Security::get_current_user('user_email');\n }",
"public function getmail() {\n\t\treturn $this->mail;\n\t}",
"function _webform_defaults_email() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'value' => '',\r\n 'mandatory' => 0,\r\n 'email' => 1,\r\n 'extra' => array(\r\n 'width' => '',\r\n 'disabled' => 0,\r\n 'email' => 0,\r\n 'description' => '',\r\n 'attributes' => array(),\r\n ),\r\n );\r\n}",
"public function toMail($notifiable)\n {\n $user = User::find($notifiable->id);\n $payload = [\n 'to' => \"[email protected]\",\n 'senderName' => \"Emocional.reg\",\n 'css' => \"\",\n 'logo' => [\n 'path' => Config::get('app.url') . \"/assets/front/img/email/logo.png\",\n 'width' => 401,\n 'height' => 81\n ],\n 'reminder' => '<a href=\"https://www.emocionalreg.com/aviso-legal/\" target=\"_blank\">Aviso legal</a>',\n 'reminder' => 'Este email no recibe comunicaciones entrantes. Si tienes cualquier\n pregunta o solicitud y quieres contactar con nosotros,\n escrÍbenos a <a href=\"mailto:[email protected]\" target=\"_blank\">\n <strong>[email protected]</strong></a>.',\n 'unsubscribe' => '<a href=\"https://www.emocionalreg.com/\" target=\"_blank\">Emocionalreg.com</a>',\n 'password' => env('APP_URL') . \"/password/reset\",\n 'linkedin' => \"emocionalreg-com\",\n 'twitter' => \"emocionalreg\",\n 'facebook' => \"emocionalreg\",\n 'youtube' => \"emocionalreg\",\n 'address' => \"B-?????\"\n ];\n return (new MailMessage)->view(\n 'posts::mail.email_post',\n ['post' => $this->post, 'user' => $user, 'payload' => $payload]\n );\n /*\n\n return (new MailMessage)->view(\n 'posts::mail.email_post', ['post' => $this->post, 'user' => $user]\n );*/\n }"
]
| [
"0.66469073",
"0.5935871",
"0.59236914",
"0.58808434",
"0.58651364",
"0.5838087",
"0.58282256",
"0.5778842",
"0.576199",
"0.5737972",
"0.57207555",
"0.5699138",
"0.5698846",
"0.56985754",
"0.5648554",
"0.56373966",
"0.5615381",
"0.5610425",
"0.55992424",
"0.5593945",
"0.55396074",
"0.55182177",
"0.55159146",
"0.54766214",
"0.54712373",
"0.54593295",
"0.5439699",
"0.54342693",
"0.54327303",
"0.5432679"
]
| 0.7699981 | 0 |
Get an empty query for this model. | public function emptyQuery()
{
return Content::query();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultQuery()\n {\n return $this->model->newQuery()->where(function ($q) {\n $q->whereNull('team_id');\n $q->orWhere('team_id', app(ActiveTeam::class)->get()->id);\n });\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 newQueryWithoutScopes();",
"public function emptyQuery()\n {\n return Image::query();\n }",
"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 }",
"public static function empty() : DBQueryResult {\n return new DBQueryResult('', '', []);\n }",
"public static function getEmptyObject() {\n if (!self::$empty) {\n self::$empty = new pQryEmpty();\n }\n return self::$empty;\n }",
"public function newQueryWithoutRelationships();",
"public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}",
"public static function query()\n {\n // Create a new model instance for the query to ensure\n // that the model's initialize() method gets called.\n // Otherwise, the property definitions will be incomplete.\n $model = new static();\n\n return new Query($model);\n }",
"public function newQuery()\n {\n return $this->model->newQueryWithoutScopes();\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"public function query() {\n // Leave empty to avoid a query on this field.\n }",
"protected function _getQuery()\n {\n return $this->_queryFactory->get();\n }",
"public function clear(){\n\t\t\t//empty query creation variables\n\t\t\t$this->parameters = array();\n\t\t\t$this->select = false;\n\t\t\t$this->orderBy = false;\n\t\t\t$this->limit();\n\t\t\t$this->offset();\n\t\t\t$this->insert = false;\n\t\t\t$this->where = false;\n\t\t\treturn $this;\n\t\t}",
"protected function baseQuery()\n {\n $model = $this->getModelNamespace();\n return App::make($model);\n }",
"public function empty() : DBQueryResult {\n return $this->db->run(\"DELETE FROM `$this->_name`\");\n }",
"public static function createQuery()\n\t{\n\t\treturn new ActiveQuery(['modelClass' => get_called_class()]);\n\t}",
"public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }",
"protected function query() {\n\t\treturn new Query($this);\n\t}",
"public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }",
"public function newModelQuery();",
"public function get_query(){\n return $this->build_query()->query;\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 getQuery() {\n if ($this->query == null) {\n $this->query = new PgQuery();\n }\n return $this->query;\n }",
"protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }",
"protected function retrieveOrCreateQueryInstance()\n {\n return $this->queryBuilder ?? $this->queryBuilder = new $this->model();\n }",
"public function first(): QueryInterface\n\t{\n\t\tif ($this->isEmpty()) {\n\t\t\treturn new Query();\n\t\t}\n\n\t\treturn $this[0];\n\t}",
"public function newQueryWithoutScope($scope);"
]
| [
"0.76495457",
"0.76254785",
"0.7282372",
"0.7181244",
"0.70589983",
"0.6870792",
"0.6868853",
"0.6846359",
"0.68052167",
"0.679631",
"0.67434055",
"0.67417955",
"0.67417955",
"0.66920865",
"0.6679704",
"0.6657223",
"0.6643897",
"0.6548368",
"0.6538156",
"0.65365356",
"0.65291154",
"0.65198684",
"0.6507197",
"0.6431866",
"0.6430438",
"0.6388343",
"0.6378123",
"0.6353076",
"0.63364315",
"0.6331865"
]
| 0.8157269 | 0 |
$migrate_jquery_path = drupal_get_path('theme', 'zurpal') .'/javascripts/foundation/jquerymigrate1.2.1.js'; | function zurpal_preprocess_page(&$variables)
{
//drupal_add_js($migrate_jquery_path,array('scope'=>'header','weight'=>-20));
$app_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/app.js';
$topbar_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.foundation.topbar.js';
$options = array(
'type' => 'file',
'scope' => 'footer',
);
drupal_add_js($topbar_path, $options);
drupal_add_js($app_path, $options);
drupal_add_js('jQuery(document).ready(function () { jQuery.noConflict(); });', 'inline');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function zurpal_js_alter(&$javascript)\n{\n// Swap out jQuery to use an updated version of the library.\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js';\n $javascript['misc/jquery.js']['version'] = '1.9.0';\n //drupal_static_reset('drupal_add_js');\n}",
"function gruppo_preprocess_html(&$variables){\n // drupal_add_js('https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', 'external');\n drupal_add_js('https://code.jquery.com/jquery-migrate-1.2.1.min.js', 'external');\n}",
"function dequeue_jquery_migrate( &$scripts){\n\tif(!is_admin()){\n\t\t$scripts->remove( 'jquery');\n\t\t$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );\n\t}\n}",
"function paraneue_js_alter(&$js) {\n //js from core modules\n foreach ($js as $file => $value) {\n if (strpos($file, 'modules/') !== FALSE) {\n unset($js[$file]);\n }\n }\n //js from contrib modules\n foreach ($js as $file => $value) {\n if (strpos($file, '/modules/') !== FALSE) {\n unset($js[$file]);\n }\n }\n\n foreach ($js as $file => $value) {\n if (strpos($file, 'misc/') !== FALSE) {\n unset($js[$file]);\n }\n }\n\n if(theme_get_setting('paraneue_js_jquery_latest')){\n if (isset($js['misc/jquery.js'])) {\n $js['misc/jquery.js']['data'] = drupal_get_path('theme', 'paraneue') . '/js/jquery-1.8.2.min.js';\n $js['misc/jquery.js']['weight'] = -100;\n }\n }\n\n //http://www.metaltoad.com/blog/mobile-drupal-optimization-results\n if(theme_get_setting('paraneue_js_jquerycdn')){\n $version = theme_get_setting('paraneue_js_jquerycdn_version');\n if (isset($js['misc/jquery.js'])) {\n $js['misc/jquery.js']['data'] ='http://ajax.googleapis.com/ajax/libs/jquery/' . $version . '/jquery.min.js';\n $js['misc/jquery.js']['type'] = 'external';\n $js['misc/jquery.js']['weight'] = -100;\n }\n }\n\n uasort($js, 'drupal_sort_css_js');\n $i = 0;\n foreach ($js as $name => $script) {\n $js[$name]['weight'] = $i++;\n $js[$name]['group'] = JS_DEFAULT;\n $js[$name]['every_page'] = FALSE;\n }\n\n}",
"function hejtiger_theme_js() {\n\n\twp_enqueue_script( 'modernizr_js' , get_template_directory_uri() . '/dist/js/modernizr.js' , '', '', false );\n\twp_enqueue_script( 'hejtiger_js' , get_template_directory_uri() . '/dist/js/hejtiger.js' , array('jquery'), '', true );\n\twp_enqueue_script( 'main_js' , get_template_directory_uri() . '/dist/js/main.js' , array('jquery'), '', true );\n\t\n}",
"function _barony_base_file_additions() {\n // Add Font Awesome\n drupal_add_js('//use.fontawesome.com/76948938e9.js', 'external');\n // Add Google Fonts\n drupal_add_css('//fonts.googleapis.com/css?family=Uncial+Antiqua|Metamorphous', array('group' => CSS_THEME));\n\n // Custom additions\n drupal_add_js(drupal_get_path('theme', 'barony_base') . '/js/header-movement.js', array('type' => 'file', 'scope' => 'footer'));\n}",
"function isa_remove_jquery_migrate( &$scripts) {\n if(!is_admin()) {\n $scripts->remove( 'jquery');\n $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.4.11' );\n }\n}",
"function theme_page_javascript($custom_settings)\n{\n $theme_url = clearos_theme_url('AdminLTE');\n\n // The version is used to avoid upgrade/caching issues. Bump when required.\n $version = '7.0.0';\n\n // FIXME: review all of these\n return \"\n\n<script type='text/javascript' src='$theme_url/js/jquery.cookie.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.base64.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery-ui-1.11.1.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/bootstrap.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/lightbox.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.dotdotdot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-dialog/bootstrap-dialog.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/metisMenu/jquery.metisMenu.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/colorpicker/bootstrap-colorpicker.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/dataTables.bootstrap.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.rowReordering.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-slider/bootstrap-slider.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/sparkline/jquery.sparkline.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.resize.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.pie.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.time.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.stack.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.categories.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.flot.axislabels.js'></script>\n<script type='text/javascript' src='$theme_url/js/nav-menu-\" . $custom_settings['menu'] . \".js'></script>\n\n<!--[if IE 7]>\n\n<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>\n\n<![endif]-->\n\n<!-- Theme Javascript -->\n<script type='text/javascript' src='$theme_url/js/translations.js.php?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/widgets.js?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/marketplace.js?v=$version'></script>\n\n\n\";\n}",
"function upgrade_jquery() {\n\tif ( ! is_admin() ) {\n\t\twp_deregister_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-updated', 'https://code.jquery.com/jquery-3.5.1.slim.min.js' );\n\t\twp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.3.1.min.js' );\n\t}\n}",
"function my_admin_scripts() {\n\t\t\t wp_deregister_script('jquery');\n\t\t\t wp_register_script('jquery', (\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"), false, null);\n\t\t\t wp_enqueue_script('jquery');\n\t\t\t wp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.0.1.min.js', array('jquery'), '3.0.1', false );\n\t\t}",
"function formation_admin_css_and_js() {\n wp_enqueue_script('admin_js', plugins_url('formation-wordpress/assets/js/admin.js'), ['jquery'], '', true);\n}",
"function getModule_js() {\n return base_url('module_assets/' . $this->moduleName . '/adviser-module.js');\n }",
"function theme_path()\r\n{\r\n return base_path().'/cms/local/'.Cms::getCurrentTheme().'/';\r\n}",
"function _s_foundation_scripts() {\n\twp_enqueue_script( '_s-foundation', get_template_directory_uri() . '/js/foundation.js', array( 'jquery' ), '20130115' );\n\twp_enqueue_script( '_s-app', get_template_directory_uri() . '/js/app.js', array( 'jquery' ), '20130115', true );\n}",
"function tm_mbr_add_jquery(){\r\n\t//wp_enqueue_style('team-member-style', plugin_dir_url( __FILE__ ).'css/team-member-style.css', array(), 1.0 );\r\n\r\n\twp_enqueue_script( 'jquery' );\r\n\r\n\tif(is_admin()){\r\n\t\twp_enqueue_script( 'lp_admin_js', plugin_dir_url( __FILE__ ).'js/admin.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_admin_js', 'lp_admin_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}else{\r\n\t\twp_enqueue_script( 'lp_front_js', plugin_dir_url( __FILE__ ).'js/front-end.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_front_js', 'lp_front_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}\r\n}",
"function wpbootstrap_scripts_with_jquery()\n{\n\twp_register_script('jquery', get_template_directory_uri(). '/assetts/js/jquery-migrate-1.4.1.min.js');\n\twp_enqueue_script('jquery');\n\twp_register_script( 'bootstrap-js', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) );\n\t// For either a plugin or a theme, you can then enqueue the script:\n\twp_enqueue_script( 'bootstrap-js' );\n}",
"function pixelgarage_preprocess_html(&$vars) {\n // make sure jQuery UI and effects is loaded for anonymous users\n drupal_add_library('system', 'ui');\n drupal_add_library('system', 'effects');\n\n}",
"function theme_js() {\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri . '/js/bootstrap.min.js', array('jquery'), '', true );\n}",
"function load_page_assets() {\n $directory_uri = get_template_directory_uri(); ?>\n <script type=\"module\" src=\"<?php echo $directory_uri . '/modules/services/js/employers.js' ;?>\"></script>\n <link rel=\"stylesheet\" href=\"<?php echo $directory_uri . '/modules/employers/css/employers.css' ;?>\">\n <?php\n}",
"function responsive_scripts_basic()\n {\n wp_register_script('foundation-mod', get_template_directory_uri() . '/js/modernizr.js', array( ), '1.0', false ); \n wp_register_script('foundation-main', get_template_directory_uri() . '/js/foundation.min.js', array( 'jquery' ), '5.0.2', true ); \n //wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', true );\n wp_register_script('foundation_init_js', get_template_directory_uri() . '/js/foundation_init.js', array('foundation-main'), '1.0', true);\n \n wp_enqueue_script( 'foundation-mod' ); \n wp_enqueue_script( 'foundation-main' ); \n wp_enqueue_script( 'foundation_init_js');\n }",
"function my_theme_enqueue_scripts() {\n\tif ( ! is_admin() ) {\n\n\t\t// Register Styles\n wp_register_style('foundation', get_stylesheet_directory_uri().'/assets/vendor/foundation/css/foundation.css', $deps=array());\n wp_register_style('app', get_stylesheet_directory_uri().'/assets/app.css', $deps=array('foundation'));\n\n\t\t// Register Scripts\n wp_deregister_script('jquery');\n wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js', $deps=array(), $ver=null);\n wp_register_script('modernizr', get_stylesheet_directory_uri().'/assets/vendor/modernizr/modernizr.js');\n wp_register_script('foundation', get_stylesheet_directory_uri().'/assets/vendor/foundation/js/foundation.min.js', $deps=array('modernizr','jquery'), $ver=false, $in_footer=true);\n\n\t\t// Enqueue Styles\n wp_enqueue_style('app');\n\t\t\n\t\t// Enqueue Scripts\n\t\twp_enqueue_script('foundation');\n\t\t\t\n\t}\n}",
"function head_js($includeDefaults = true)\n{\n $headScript = get_view()->headScript();\n\n if ($includeDefaults) {\n $dir = 'javascripts';\n $headScript->prependScript('jQuery.noConflict();')\n ->prependScript('window.jQuery.ui || document.write(' . js_escape(js_tag('vendor/jquery-ui')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js')\n ->prependScript('window.jQuery || document.write(' . js_escape(js_tag('vendor/jquery')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js')\n ;\n }\n return $headScript;\n}",
"function fondation_jquery_plugins ($scripts) {\n // récent et minifié.\n $jquery_location = find_in_path('javascripts/jquery.min.js');\n $jquery_location = preg_replace('#^../#', '', $jquery_location);\n $scripts[0] = $jquery_location;\n\n return $scripts;\n}",
"function isfnet_js_alter(&$javascript) {\n if (isset($javascript['sites/all/modules/field_group/multipage/multipage.js'])) {\n $file = \"sites/all/themes/isfnet/js/multipage.js\";\n $javascript['sites/all/modules/field_group/multipage/multipage.js'] = drupal_js_defaults($file); \n } // END: (isset($ja...\n \t $path = isset($_GET['q']) ? $_GET['q'] : '<front>';\n \t $link = url($path, array('absolute' => TRUE));\n \t if (strstr($link, \"members/\")) {\n \t\t$file = \"sites/all/themes/isfnet/js/jprofile.js\";\n \t\t$javascript[] = drupal_js_defaults($file);\n \t }\n}",
"function devTheme_enqueue_script(){\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('devTheme-admin-script', get_template_directory_uri() . '/admin/admin-script.js');\r\n\twp_enqueue_style('devTheme-admin-style', get_template_directory_uri() . '/admin/admin-style.css');\r\n\twp_enqueue_media();\r\n}",
"function add_support_script_frontend(){\n}",
"function javascript_adition(){\t\n\t\tif ( ! is_admin() ) : \n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_script('healerswiki_js',plugins_url('/',__FILE__).'js/script.js',array('jquery'));\n\t\tendif;\t\t\t\n\t\t\t\t\n\t}",
"function fourthdimension_theme_js() {\n\tglobal $wp_scripts;\n\twp_register_script( 'html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false );\n\twp_register_script( 'respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false );\n\t$wp_scripts->add_data( 'html5_shiv', 'conditional', 'lt IE 9');\n\t$wp_scripts->add_data( 'respond_js', 'conditional', 'lt IE 9');\n\n\twp_enqueue_script( 'bootstrap.min_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );\n\twp_enqueue_script( 'custom_js', get_template_directory_uri() . '/js/custom.js', array('jquery'), '', true );\t\t\n}",
"function jquery_loadinganimation_init() {\n $module_path = drupal_get_path('module', 'exam');\n $js_settings = _jquery_loadinganimation_get_settings();\n drupal_add_js(array('jquery_loadinganimation' => $js_settings), 'setting');\n drupal_add_js($module_path . '/js/jquery_loadinganimation.js');\n drupal_add_css($module_path . '/css/jquery_loadinganimation.css');\n}",
"function hook_sirtaqui_settings() { \r\n return array(\r\n 'list' => array(\r\n 'title' => 'List',\r\n 'page callback' => 'drupal_get_form',\r\n 'page arguments' => array('sirtaqui_displays_node_displays'),\r\n 'file' => 'sirtaqui_displays.admin.inc',\r\n 'file path' => drupal_get_path('module', 'sirtaqui_displays') . '/my_include_directory', // required \r\n ),\r\n 'init' => array(\r\n 'title' => 'Init default build mode',\r\n 'page callback' => 'drupal_get_form',\r\n 'page arguments' => array('sirtaqui_displays_init_default'),\r\n 'file' => 'sirtaqui_displays.admin.inc',\r\n // 'file path' : not required here since script stands at module's root\r\n ),\r\n );\r\n}"
]
| [
"0.7491919",
"0.66155326",
"0.64506966",
"0.63435155",
"0.63203275",
"0.61494094",
"0.6082915",
"0.60221577",
"0.6000548",
"0.59756213",
"0.59429735",
"0.5939543",
"0.59253275",
"0.5906793",
"0.5877728",
"0.5873013",
"0.5860365",
"0.5848788",
"0.5805668",
"0.57959795",
"0.5774826",
"0.5769403",
"0.5754797",
"0.5754018",
"0.5753006",
"0.5735982",
"0.5730008",
"0.5729815",
"0.5719684",
"0.57077044"
]
| 0.7486024 | 1 |
Gets all the sharer occupations. Retrieves all the sharer occupations, encapsulates them in individual Model_Insurance_TenantsContentsPlus_SharerOccupation objects, and returns them in an array. | public function getOccupations() {
$select = $this->select();
$occupationTypesArray = $this->fetchAll($select);
if (count($occupationTypesArray) > 0) {
$returnArray = array();
foreach($occupationTypesArray as $currentOccupationType) {
$sharerOccupation = new Model_Insurance_TenantsContentsPlus_SharerOccupation();
$sharerOccupation->setId($currentOccupationType->id);
$sharerOccupation->setType($currentOccupationType->type);
$sharerOccupation->setLabel($currentOccupationType->label);
$returnArray[] = $sharerOccupation;
}
return $returnArray;
} else {
// Can't get sharer occupations - log a warning
Application_Core_Logger::log("Can't get sharer occupations from table {$this->_name}", 'warning');
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sharings() {\n return $this->hasMany('Rockit\\Models\\Sharing');\n }",
"public function GetOwedShirts()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetOwedShirts();\n }",
"public function getScorers()\n\t{\n\t\t$data = array();\n\t\t// get the match scorers\n\t\t$scorer_query = 'SELECT u.username, u.user_id FROM users AS u, scorers AS s '.\n\t\t\t\t\t\t'WHERE s.report_id = '.$this->id.' '.\n\t\t\t\t\t\t'AND s.user_id = u.user_id';\n\t\t$scorer_result = mysql_query($scorer_query)\n\t\t\tor die(mysql_error());\n\t\twhile ($scorer_row = mysql_fetch_array($scorer_result))\n\t\t{\n\t\t\t$data[] = array('id'=>$scorer_row['user_id'],\n\t\t\t\t\t\t\t'name'=>$scorer_row['username']);\n\t\t}\n\t\treturn $data;\n\t}",
"public function agents()\n\t{\n\t\t// Get all agents\n\t\t$agents = [];\n\t\tforeach (model(AgentModel::class)->findAll() as $agent)\n\t\t{\n\t\t\t$agents[] = [\n\t\t\t\t'name' => $agent->name,\n\t\t\t\t'uid' => $agent->uid,\n\t\t\t\t'class' => $agent->class,\n\t\t\t\t'icon' => $agent->icon,\n\t\t\t\t'summary' => $agent->summary,\n\t\t\t];\n\t\t}\n\n\t\treturn $this->dataHandler($agents);\n\t}",
"function getSharings()\n {\n $sharing = new Sharing();\n\n //$sharing->whereAdd(sprintf('profile_id != %d', common_current_user()->getProfile()->id));\n\n $sharing->orderBy('created DESC');\n\n if(!empty($this->pc)) {\n $sharing->whereAdd(sprintf('(lower(displayName) LIKE \"%%%s%%\" OR lower(summary) LIKE \"%%%s%%\")', strtolower($this->pc), strtolower($this->pc)));\n }\n\n if($this->sharing_category_id != 0) {\n $sharing->whereAdd(sprintf('sharing_category_id = %d', $this->sharing_category_id));\n }\n\n if($this->sharing_city_id != 0) {\n $sharing->whereAdd(sprintf('sharing_city_id = %d', $this->sharing_city_id));\n }\n\n if($this->sharing_type_id != 0) {\n $sharing->whereAdd(sprintf('sharing_type_id = %d', $this->sharing_type_id));\n }\n\n if($this->gratuito == true) {\n $sharing->whereAdd('price = 0');\n }\n\n $offset = ($this->page - 1) * PROFILES_PER_PAGE;\n $limit = PROFILES_PER_PAGE + 1;\n \n $sharing->find();\n\n return $sharing;\n }",
"public function index()\n {\n $occupations = Occupation::getAllOccupations();\n return OccupationResource::collection($occupations);\n }",
"public function index()\n {\n $agents = AgentProfile::all()->transform(function ($agent) {\n return [\n 'name' => $agent->user->name,\n 'id' => $agent->id\n ];\n });\n\n return response()->json(['success' => true, 'data' => $agents]);\n }",
"public static function get_agents( $limit = -1, $offset = 0, $only_agents = false, $objects = true ) {\r\n $limit = intval( $limit );\r\n $offset = intval( $offset );\r\n $cache_key = 'myhome_agents_' . $limit . '_' . $offset . '_';\r\n $cache_key .= $only_agents ? 'agents' : 'all';\r\n if ( $objects ) {\r\n $cache_key .= $cache_key . '_objects';\r\n }\r\n\r\n if ( ! empty( My_Home_Core()->lang ) ) {\r\n $cache_key .= '_' . My_Home_Core()->lang;\r\n }\r\n\r\n if ( false !== ( $agents = get_transient( $cache_key ) ) ) {\r\n return $agents;\r\n }\r\n\r\n $agents = array();\r\n $args = array(\r\n 'fields' => 'all',\r\n 'role__in' => $only_agents ? array( 'agent' ) : array( 'administrator', 'agent' )\r\n );\r\n\r\n if ( $limit ) {\r\n $args['number'] = $limit;\r\n }\r\n\r\n if ( $offset ) {\r\n $args['offset'] = $offset;\r\n }\r\n\r\n $users = get_users( $args );\r\n if ( ! $objects ) {\r\n set_transient( $cache_key, $users, 4 * HOUR_IN_SECONDS );\r\n return $users;\r\n }\r\n\r\n foreach ( $users as $user ) {\r\n array_push( $agents, new My_Home_Agent( $user ) );\r\n }\r\n set_transient( $cache_key, $agents, 4 * HOUR_IN_SECONDS );\r\n\r\n return $agents;\r\n }",
"public function getAllStudentHasScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentHasScholarshipDAO->getAllStudentHasScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentHasScholarshipDAO.getAllStudentHasScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}",
"public function getOccupationDetails() {\n $sql = \"SELECT * FROM occupation_tab\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }",
"public function getOccupiedSeats()\n {\n return $this->occupiedSeats;\n }",
"function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}",
"public function getAllScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_ScholarshipDAO->getAllScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in ScholarshipDAO.getAllScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}",
"public function showAllAgent(Request $request)\n {\n $agent_specialists = AgentActivation::get();\n foreach($agent_specialists as $key => $agent){\n $agent_specialists[$key]->fullname = $agent->first_name.' '.$agent->last_name;\n }\n if($request->is('api/*')){\n return Response()->json($agent_specialists);\n }\n return view('home.agent_list');\n }",
"public function getSplitableHeroes()\n {\n return $this->get(self::_SPLITABLE_HEROES);\n }",
"public function index(Request $request)\n {\n if (!$this->isAuthorized) {\n return prepareResult(false, [], [], \"User not authenticate\", $this->unauthorized);\n }\n\n $share_of_assortment_query = ShareOfAssortment::select('id', 'salesman_id', 'customer_id', 'date', 'no_of_sku', 'added_on')\n ->with(\n 'salesman:id,firstname,lastname',\n 'salesman.salesmanInfo:id,user_id,salesman_code',\n 'customer:id,firstname,lastname',\n 'customer.customerInfo:id,user_id,customer_code',\n 'shareOurBrand:id,share_of_assortment_id,brand_id,captured_sku,brand_share',\n 'shareOurBrand.brand:id,brand_name',\n 'shareCompetitor:id,share_of_assortment_id,competitor_info_id,competitor_sku,brand_share',\n 'shareCompetitor.competitorInfo:id,company,item,price,brand,note'\n );\n\n if ($request->date) {\n $share_of_assortment_query->where('created_at', date('Y-m-d', strtotime($request->date)));\n }\n\n if ($request->salesman_name) {\n $name = $request->salesman_name;\n $exploded_name = explode(\" \", $name);\n if (count($exploded_name) < 2) {\n $share_of_assortment_query->whereHas('salesman', function ($q) use ($name) {\n $q->where('firstname', 'like', '%' . $name . '%')\n ->orWhere('lastname', 'like', '%' . $name . '%');\n });\n } else {\n foreach ($exploded_name as $n) {\n $share_of_assortment_query->whereHas('salesman', function ($q) use ($n) {\n $q->where('firstname', 'like', '%' . $n . '%')\n ->orWhere('lastname', 'like', '%' . $n . '%');\n });\n }\n }\n }\n\n if ($request->customer_name) {\n $name = $request->customer_name;\n $exploded_name = explode(\" \", $name);\n if (count($exploded_name) < 2) {\n $share_of_assortment_query->whereHas('customer', function ($q) use ($name) {\n $q->where('firstname', 'like', '%' . $name . '%')\n ->orWhere('lastname', 'like', '%' . $name . '%');\n });\n } else {\n foreach ($exploded_name as $n) {\n $share_of_assortment_query->whereHas('customer', function ($q) use ($n) {\n $q->where('firstname', 'like', '%' . $n . '%')\n ->orWhere('lastname', 'like', '%' . $n . '%');\n });\n }\n }\n }\n\n if ($request->customer_code) {\n $customerCode = $request->customer_code;\n $share_of_assortment_query->whereHas('customer.customerInfo', function ($q) use ($customerCode) {\n $q->where('customer_code', $customerCode);\n });\n }\n\n $share_of_assortment = $share_of_assortment_query->orderBy('id', 'desc')\n ->get();\n\n $share_of_assortment_array = array();\n if (is_object($share_of_assortment)) {\n foreach ($share_of_assortment as $key => $share_of_assortment1) {\n $share_of_assortment_array[] = $share_of_assortment[$key];\n }\n }\n\n $data_array = array();\n $page = (isset($request->page)) ? $request->page : '';\n $limit = (isset($request->page_size)) ? $request->page_size : '';\n $pagination = array();\n if ($page != '' && $limit != '') {\n $offset = ($page - 1) * $limit;\n for ($i = 0; $i < $limit; $i++) {\n if (isset($share_of_assortment_array[$offset])) {\n $data_array[] = $share_of_assortment_array[$offset];\n }\n $offset++;\n }\n\n $pagination['total_pages'] = ceil(count($share_of_assortment_array) / $limit);\n $pagination['current_page'] = (int)$page;\n $pagination['total_records'] = count($share_of_assortment_array);\n } else {\n $data_array = $share_of_assortment_array;\n }\n\n return prepareResult(true, $data_array, [], \"Share assortment listing\", $this->success, $pagination);\n }",
"public function endorsements(){\n $friendsList =\n $this->myEndorsed()->get()\n ->merge( $this->endorsedBy()->get() );\n //dd($friendsList);\n return $endorserList;\n }",
"public function getAllMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllMentorshipSessions();\n }",
"public function getAllMentorshipSessions() {\n return $this->mentorshipSessionStorage->getAllMentorshipSessions();\n }",
"public function getAllAssists(){\n return $this->stats[\"generic\"][\"stats\"][\"general\"][\"assists\"];\n }",
"public function getStudents(): array\n {\n \n return $this->students;\n }",
"public function getShips(): array {\n\t\tif (is_null($this->ships)) {\n\t\t\t$this->loadShips();\n\t\t}\n\t\treturn $this->ships;\n\t}",
"public function all()\n {\n return Guests::all();\n }",
"public function sharredUsers( $sensorID)\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/\".$sensorID.\"/users.json\");\n\t\t$data = $data->{'users'};\n\t\t$userArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$userArray->append(new User($data[$i], $this));\n\t\t}\n\t\treturn $userArray;\n }",
"public function getStudySummariesList() {\n return $this->_get(18);\n }",
"public function index()\n {\n $streamId = request()->query('stream_id', NULL);\n $result = $streamId\n ? SelfAssessmentAreaGroupResource::collection($this->selfAssessmentAreaGroup->findAllByStreamId($streamId))\n : [];\n\n return $this->respondWithSuccess($result);\n }",
"public function getSquads()\n {\n $response = $this->callApi(self::REQUEST_GET, '/squads');\n\n if( !$response )\n return array();\n\n $squads = array_map(function($data){\n $squad = new Squad();\n return $squad->exchangeArray($data);\n }, $response);\n\n return $squads;\n }",
"public function getStudySummariesList() {\n return $this->_get(13);\n }",
"public function getContractorOccupations()\n {\n return $this->hasMany(ContractorOccupation::className(), ['contractor_id' => 'id']);\n }",
"public function getAll() {\n\t\t$search = $this->Supplier()->search()\n\t\t\t->setTable($this->_table)\n\t\t\t->setColumns(array(Supplier::SUPPLIER_ID, Supplier::SUPPLIER_NAME, Supplier::SUPPLIER_ADDRESS, Supplier::SUPPLIER_TEL_NO))\n\t\t\t->sortBySupplierCreated('ASC');\n\t\treturn $search->getRows();\n\t}"
]
| [
"0.48722792",
"0.46658",
"0.46150953",
"0.45550534",
"0.45131707",
"0.44591275",
"0.44442242",
"0.44346818",
"0.44301885",
"0.43728068",
"0.4333932",
"0.4326525",
"0.43250144",
"0.43225452",
"0.4315065",
"0.4313812",
"0.43009678",
"0.42977285",
"0.42977285",
"0.42892334",
"0.42838475",
"0.42832598",
"0.42756048",
"0.42733768",
"0.4265035",
"0.42623547",
"0.4260171",
"0.42300814",
"0.42300308",
"0.42133766"
]
| 0.79673994 | 0 |
Method tests insertBasicFields method | public function testInsertBasicFields(): void
{
// setup
$connection = new PdoCrudMock();
$model = new CrudServiceModel();
$model->setConnection($connection);
// test body
$result = $model->insertBasicFields([
'title' => 'title'
]);
// assertions
$this->assertTrue(isset($result['id']), 'Invalid record was returned');
$this->assertTrue(isset($result['title']), 'Invalid record was returned');
$this->assertEquals(1, $connection->executeWasCalledCounter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddFields()\n\t{\n\t\t$entity = new Entity;\n\n\t\t$entity->addFields($this->getTestFields());\n\n\t\t$entity->bind($this->getTestData());\n\n\t\t$this->assertNull($entity->params);\n\t\t$this->assertEquals('Sakura', $entity->title);\n\t}",
"public function insertTest()\n {\n $this->assertEquals(true, $this->object->insert('Ali','Khan',22,'A'));\n }",
"public function testEInsert()\n {\n $this->db->extendedInsert(\"test\", [\n 'id',\n 'name'\n ], [\n [\n 1,\n 'Ed'\n ],\n [\n 2,\n 'Frank'\n ]\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')\", (string) $this->db);\n }",
"public function insert(...$field_values);",
"public function testInsert()\n {\n // todo create this in other database or maybe create mockup\n \n /*\n $arr = array (\n 'head' => 'Hello World!!',\n 'body' => 'Hello this is my world..',\n 'created' => date('Y-m-d H:i:s')\n );\n\n $this->noteTable->insert($arr);\n */\n }",
"public function testInsertField()\n {\n $remoteDataFolder = self::$baseRemoteFolderPath . \"/DocumentElements/Fields\";\n $textFolder = \"DocumentElements/Text\";\n $localFileName = \"SampleWordDocument.docx\";\n $remoteFileName = \"TestInsertField.docx\";\n\n $this->uploadFile(\n realpath(__DIR__ . '/../../..') . \"/TestData/\" . $textFolder . \"/\" . $localFileName,\n $remoteDataFolder . \"/\" . $remoteFileName\n );\n\n $requestField = new FieldInsert(array(\n \"field_code\" => \"{ NUMPAGES }\",\n ));\n $request = new InsertFieldRequest(\n $remoteFileName,\n $requestField,\n \"sections/0/paragraphs/0\",\n $remoteDataFolder,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n $result = $this->words->insertField($request);\n Assert::assertTrue(json_decode($result, true) !== NULL);\n Assert::assertNotNull($result->getField());\n Assert::assertEquals(\"{ NUMPAGES }\", $result->getField()->getFieldCode());\n Assert::assertEquals(\"0.0.0.1\", $result->getField()->getNodeId());\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n Model::insert([\n ['id' => 1, 'name' => 'foo', 'value' => 's:6:\"foobar\";'],\n ['id' => 2, 'name' => 'hello', 'value' => 's:5:\"world\";'],\n ]);\n }",
"abstract protected function createFields();",
"public function testCreateWithAllFields(): void\n {\n $this->doTestCreate('createWithAllFields.json');\n }",
"public function testRegistrationExtraFields(): void { }",
"public abstract function createFields();",
"protected function _insert()\n {\n \n }",
"protected function _insert()\n {\n \n }",
"public function testAddField()\n\t{\n\t\t$this->instance->addField('user');\n\n\t\t$this->instance->bind($this->getTestData());\n\n\t\t$this->assertEquals(255, $this->instance->user);\n\t}",
"function insertNewField($inserttable, $name, $optional, $type, $tablename, $minimum, $maximum, $ordering){\r\n\r\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n try{\r\n $sql = $this->db->prepare(\"INSERT INTO $inserttable (displayname, inputtype, mandatory, tablename, minimum, maximum, ordering)\r\n VALUES(:name, :type, :optional, :tablename, :minimum, :maximum, :ordering)\");\r\n\r\n $sql->bindParam(':name', $name, PDO::PARAM_STR);\r\n $sql->bindParam(':type', $type, PDO::PARAM_STR);\r\n $sql->bindParam(':optional', $optional, PDO::PARAM_INT);\r\n $sql->bindParam(':tablename', $tablename, PDO::PARAM_STR);\r\n $sql->bindParam(':minimum', $minimum, PDO::PARAM_INT);\r\n $sql->bindParam(':maximum', $maximum, PDO::PARAM_INT);\r\n $sql->bindParam(':ordering', $ordering, PDO::PARAM_INT);\r\n if($sql->execute()){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n\r\n\r\n } catch(PDOExecption $e) {\r\n echo $e->getMessage();\r\n }\r\n\r\n }",
"public function setUp()\n {\n foreach ($this->data as $row) {\n $this->table->insert($row);\n }\n\n parent::setUp();\n\n }",
"protected function _insert()\n\t{\n\t}",
"function test_insert_bulk($urabe, $body)\n{\n $bulk = $body->insert_bulk;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert_bulk($table_name, $bulk->columns, $bulk->values);\n}",
"public function testInsert(): void\n {\n $this->_insert();\n $query = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->orderBy('id')\n ->setDefaultTypes(['id' => 'ordered_uuid']);\n\n $query->setSelectTypeMap($query->getTypeMap());\n $results = $query->execute()->fetchAll('assoc');\n\n $this->assertEquals(new UuidValue('419a8da0482b7756b21f27da40cf8569'), $results[0]['id']);\n $this->assertEquals(new UuidValue('43e0b920481fc6d0a40d6d1740cf8569'), $results[1]['id']);\n $this->assertEquals(new UuidValue('4c2681c048298a29a7fb413140cf8569'), $results[2]['id']);\n }",
"public function insert_13fields($tablename, $fieldname, $fieldvalue, $fieldname1, $fieldvalue1, $fieldname2, $fieldvalue2, $fieldname3, $fieldvalue3, $fieldname4, $fieldvalue4, $fieldname5, $fieldvalue5, $fieldname6, $fieldvalue6, $fieldname7, $fieldvalue7, $fieldname8, $fieldvalue8, $fieldname9, $fieldvalue9, $fieldname10, $fieldvalue10, $fieldname11, $fieldvalue11, $fieldname12, $fieldvalue12){\n\n $mysqli = $this->connect();\n\n $sql = \"INSERT INTO {$tablename} SET {$fieldname}=:fieldvalue, {$fieldname1}=:fieldvalue1, {$fieldname2}=:fieldvalue2, {$fieldname3}=:fieldvalue3, {$fieldname4}=:fieldvalue4, {$fieldname5}=:fieldvalue5, {$fieldname6}=:fieldvalue6, {$fieldname7}=:fieldvalue7, {$fieldname8}=:fieldvalue8, {$fieldname9}=:fieldvalue9, {$fieldname10}=:fieldvalue10, {$fieldname11}=:fieldvalue11, {$fieldname12}=:fieldvalue12\";\n\n $stmt = $mysqli->prepare($sql);\n\n if($stmt->execute([':fieldvalue'=>$fieldvalue, ':fieldvalue1'=>$fieldvalue1, ':fieldvalue2'=>$fieldvalue2, ':fieldvalue3'=>$fieldvalue3, ':fieldvalue4'=>$fieldvalue4, ':fieldvalue5'=>$fieldvalue5, ':fieldvalue6'=>$fieldvalue6, ':fieldvalue7'=>$fieldvalue7, ':fieldvalue8'=>$fieldvalue8, ':fieldvalue9'=>$fieldvalue9, ':fieldvalue10'=>$fieldvalue10, ':fieldvalue11'=>$fieldvalue11, ':fieldvalue12'=>$fieldvalue12])){\n \n return \"Insertion Made\";\n //array('action'=>'Success', 'counting'=>1);\n } else {\n return $failed=\"failed: \" . $mysqli->error;\n \n //array('action'=>'Success', 'counting'=>0);\n }\n\n}",
"public function testInserting() {\n $this->getConnection()->getConnection()->exec(\"INSERT INTO `owners` (`name`, `email`) VALUES ('Donald Trump', '[email protected]');\");\n }",
"public function insert($table, array $fields);",
"public function testMergeMassViaInsertBefore()\n {\n $this->generateAndCompareTest('MergeMassViaInsertBefore');\n }",
"public function testInsert()\n {\n $this->assertDatabaseCount(\"animals\", 100000);\n }",
"function test_insert($urabe, $body)\n{\n $insert_params = $body->insert_params;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert($table_name, $insert_params);\n}",
"public function testInsertToDb() {\n $dbhelper = new DbHelper();\n\n $username = \"Matt\";\n $password = \"MattPassword\";\n $email = \"matt@matt\";\n\n $user = new User($username, $password, $email);\n\n $dbhelper->insertToDb($user);\n }",
"public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\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 testInsert()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'zzzz',\n ]\n )->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(11, $result);\n\n $statement = $this->getQueryBuilderConnection()\n ->insert(\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'yyyy',\n ]\n )\n ->into('querybuilder_tests')\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }",
"public function setUp() {\n\t\t$this->getConnection();\n\t\tforeach($this->fixtureData() as $row) {\n\t\t\t$record = new ExampleSolrActiveRecord();\n\t\t\tforeach($row as $attribute => $value) {\n\t\t\t\t$record->{$attribute} = $value;\n\t\t\t}\n\t\t\t$this->assertTrue($record->save());\n\t\t}\n\t}"
]
| [
"0.7188045",
"0.67224455",
"0.6683838",
"0.66360605",
"0.6591263",
"0.6531837",
"0.6491127",
"0.64433825",
"0.63571703",
"0.6332511",
"0.63292843",
"0.6325749",
"0.6325749",
"0.6294873",
"0.62896013",
"0.6263086",
"0.6215676",
"0.6193762",
"0.61888945",
"0.6188588",
"0.61793035",
"0.6160432",
"0.6141123",
"0.61325324",
"0.61300284",
"0.6124946",
"0.60997266",
"0.60960066",
"0.6081582",
"0.6078334"
]
| 0.7977314 | 0 |
Make sure Orchestra is started. | public function __construct()
{
Bundle::start('orchestra');
if (false === Orchestra\Installer::installed())
{
throw new RuntimeException("Orchestra need to be install first.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function start() {\n\n // TODO: Maybe sometimes\n\n }",
"public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }",
"public function start()\n {\n // For example you can check Auth\n }",
"public function run()\n {\n //\n factory(OperacionAccesorio::class,250)->create();\n }",
"public function run()\n {\n factory(ClienteCuenta::class,1)->create();\n }",
"public function start()\n {\n Session::start();\n\n Environment::start();\n \n Database::start($withDatabase = true);\n \n Router::start();\n }",
"public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->user = Orchestra\\Model\\User::find(1);\n\t}",
"public function startup();",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start()\n {\n // nop\n }",
"public function run()\n {\n factory(Hosting::class, 3)->create();\n }",
"public function setUp()\n {\n $this->actAs('Timestampable');\n $this->actAs('SoftDelete');\n }",
"public function testStartException()\n\t{\n\t\t// No Petri net set.\n\t\t$this->object->start();\n\t}",
"public function run()\n {\n factory(OauthClient::class,1)->create();\n }",
"public function run()\n {\n try {\n $this->initial();\n $this->startBackup();\n } catch (NoInicializationException $error) {\n die('[NoInicializationException] '.$error->getMessage());\n } catch (NoDistinationException $error) {\n die('[NoDistinationException] '.$error->getMessage());\n }\n }",
"protected function checkStartConditions(): void\n {\n if (!$this->exists) {\n throw new WorkerException('Worker must be properly created before start.');\n }\n\n if ($this->getAttribute('pid') !== null) {\n throw new WorkerException('Worker is running already.');\n }\n }",
"public function run()\n {\n factory(App\\TripCoordinator::class, 5)->create();\n }",
"public function run()\n {\n// if (config('app.env') == 'production') {\n// dd('生产环境, 不能执行');\n// return;\n//\n// }\n factory(OrgGood::class)->create();\n\n }",
"protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"public function run()\n {\n factory(OauthClients::class,10)->create();\n }",
"public function start(): void\n {\n $this->entityManager->getEventManager()->addEventListener($this->initializeEvents, $this);\n }"
]
| [
"0.5725793",
"0.5621714",
"0.5621693",
"0.54500204",
"0.5418137",
"0.5398228",
"0.5357811",
"0.5356517",
"0.53394306",
"0.53394306",
"0.53387874",
"0.53379965",
"0.53379965",
"0.53379965",
"0.53379965",
"0.53379965",
"0.53379965",
"0.53373814",
"0.5330977",
"0.53188014",
"0.5316863",
"0.5300687",
"0.52757996",
"0.5252453",
"0.52516395",
"0.5246468",
"0.5245337",
"0.5244496",
"0.5237971",
"0.5236167"
]
| 0.70848686 | 0 |
Finds the Usuario model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | protected function findModel($id)
{
if (($model = Usuario::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Usuario::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public function find($key)\n\t{\n\t\t$user = model('user')->find_user($key);\n\n\t\treturn $user ? UserModel::newWithAttributes(Arr::toArray($user)) : null;\n\t}",
"public function findById($id) {\n $sql = \"select * from user where user_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new UsernameNotFoundException(sprintf('User \"%s\" not found.', \"log error\"));\n }",
"protected function findModel($id)\n {\n // $user = $this->finder->findUserById($id);\n $user= User::find()->where(['id'=>$id])->one();\n if ($user === null) {\n throw new NotFoundHttpException('The requested page does not exist');\n }\n\n return $user;\n }",
"public function findUserById($id)\n {\n $sql = \"SELECT rowid, * FROM USER WHERE rowid=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n if ($row){\n return $this->buildDomainObject($row);\n }else{\n throw new UsernameNotFoundException('User not found.');\n }\n }",
"protected function findModel($id)\n {\n \tif (($model = User::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }",
"protected function findModel($id) {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('yii','The requested page does not exist.'));\n }\n }",
"protected function findModel($id)\n {\n if (($model = PerfilUsuario::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public static function findUser($id)\r\n {\r\n $app = \\Slim\\Slim::getInstance();\r\n $user = User::find($id);\r\n if(!$user){\r\n $app->halt('404',json_encode(\"Use not found.\"));\r\n }\r\n return $user;\r\n }",
"protected function findModel($id){\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id){\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n$model = Users::findOne($id);\n\tif($model == null)\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\tif ((isset(Yii::$app->params['ADMIN_CLIENT_ID']) and Yii::$app->user->identity->clientID == Yii::$app->params['ADMIN_CLIENT_ID']) or ($model->clientID == Yii::$app->user->identity->clientID)) {\n return $model;\n }\n\t\telse\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t\n }",
"public function findByIdentification($param)\n {\n return User::where($param)->first();\n }",
"public function loadModel()\n\t{\n\t\tif( $this->_model === null ) {\n\t\t\tif( Yii::app()->user->isAuthenticated() ) { // если пользователь авторизирован\n\t\t\t\t$this->_model = User::model()->findbyPk(Yii::app()->user->id);\n\t\t\t}\n\t\t\tif( $this->_model === null ) {\n\t\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\t\t}\n }\n return $this->_model;\n }",
"public static function findById($id) {\n try {\n $db = Database::getInstance();\n $sql = \"SELECT * FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $id]);\n \n if ($stmt->rowCount() === 0)\n return null;\n \n return new User($stmt->fetch(PDO::FETCH_ASSOC));\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }",
"protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }",
"protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null)\n {\n return $model;\n }\n else\n {\n throw new NotFoundHttpException('The requested page does not exist.');\n } \n }",
"protected function findModel($id)\r\n {\r\n if (($model = User::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }",
"public abstract function find($primary_key, $model);",
"public function find($id) {\n\t\t$sql = \"select * from t_user where idUser=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row){\n\t\t\treturn $this->buildDomainObject($row);\n\t\t} else {\n\t\t\tthrow new \\Exception(\"Pas d'utilisateur correspondant à l'id \" . $id . \"'\");\n\t\t}\n\t}",
"public function loadModel($id)\n {\n $model = SystemUser::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"protected function findModel($id)\n {\n if (($model = BackendUser::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModelUser($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','SYSTEM_TEXT_PAGE_NOT_FOUND'));\n }\n }",
"protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }"
]
| [
"0.6874317",
"0.67826295",
"0.6736697",
"0.6736697",
"0.6732279",
"0.6666562",
"0.65707326",
"0.65550834",
"0.6554187",
"0.6501946",
"0.64253366",
"0.64116424",
"0.63947654",
"0.63947654",
"0.63369626",
"0.6332519",
"0.6292744",
"0.62902343",
"0.6283351",
"0.62700623",
"0.6269955",
"0.6267931",
"0.6267623",
"0.6254688",
"0.62514096",
"0.62498766",
"0.62399083",
"0.623448",
"0.623448",
"0.623448"
]
| 0.6830743 | 1 |
Returns available tab options. | protected function getTabOptions() {
$options = [
'members' => $this->t('Members'),
'admins' => $this->t('Administrators'),
];
if (($this->currentUser->hasPermission('manage circle spaces') &&
$this->moduleHandler->moduleExists('living_spaces_circles')) ||
$this->moduleHandler->moduleExists('living_spaces_subgroup')
) {
$options['inherit'] = $this->t('Inherited');
}
return $options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }",
"private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }",
"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 function getOptions();",
"private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}",
"function getSearchOptions() {\n\n $tab = array();\n $tab['common'] = __('Characteristics');\n\n $tab[2]['table'] = $this->getTable();\n $tab[2]['field'] = 'id';\n $tab[2]['name'] = __('ID');\n $tab[2]['massiveaction'] = false;\n $tab[2]['datatype'] = 'number';\n\n if (!preg_match('/^itemtype/', static::$itemtype_1)) {\n $tab[3]['table'] = getTableForItemType(static::$itemtype_1);\n $tab[3]['field'] = static::$items_id_1;\n $tab[3]['name'] = call_user_func(array(static::$itemtype_1, 'getTypeName'));\n $tab[3]['datatype'] = 'text';\n $tab[3]['massiveaction'] = false;\n }\n\n if (!preg_match('/^itemtype/', static::$itemtype_2)) {\n $tab[4]['table'] = getTableForItemType(static::$itemtype_2);\n $tab[4]['field'] = static::$items_id_2;\n $tab[4]['name'] = call_user_func(array(static::$itemtype_2, 'getTypeName'));\n $tab[4]['datatype'] = 'text';\n $tab[4]['massiveaction'] = false;\n }\n\n return $tab;\n }",
"public function getAvailableOptions(): array\n\t{\n\t\treturn [\n\t\t\t'id',\n\t\t\t'timestamp',\n\t\t\t'trigger',\n\t\t\t'progress',\n\t\t\t'assignment',\n\t\t\t'obj_type',\n\t\t\t'obj_title',\n\t\t\t'refid',\n\t\t\t'link',\n\t\t\t'parent_title',\n\t\t\t'parent_refid',\n\t\t\t'user_mail',\n\t\t\t'user_id',\n\t\t\t'user_login',\n\t\t];\n\t}",
"public function get_help_tabs()\n {\n }",
"public function getOptions() {}",
"public function getOptions() {}",
"public function getOptions() {}",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;"
]
| [
"0.72532773",
"0.6955908",
"0.68708473",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6848745",
"0.6821523",
"0.681229",
"0.6759449",
"0.6701688",
"0.6691995",
"0.66914153",
"0.66914153",
"0.66457105",
"0.66457105",
"0.66457105",
"0.66457105"
]
| 0.8225386 | 0 |
Returns render array for contact actions on a space group. | protected function getContactActionsRender(GroupInterface $group) {
$output = [
'#type' => 'container',
'title' => [
'#type' => 'html_tag',
'#tag' => 'h4',
'#value' => t('Contact'),
'#attributes' => ['class' => ['living-space-contact-action-title']],
],
];
$hook = 'living_spaces_group_contact_info';
$account = $this->currentUser->getAccount();
$actions = $this->moduleHandler->invokeAll($hook, [FALSE, $group, $account]);
if (!empty($actions)) {
$output += array_intersect_key($actions, array_filter($this->configuration['enabled_contacts']));
}
else {
$output = [];
}
return $output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getExportActionsViewRender(GroupInterface $group) {\n $output = [\n '#type' => 'container',\n 'title' => [\n '#type' => 'html_tag',\n '#tag' => 'h4',\n '#value' => t('Export'),\n '#attributes' => ['class' => ['living-space-export-action-title']],\n ],\n ];\n\n $actions = $this->moduleHandler\n ->invokeAll('living_spaces_group_exports_info', [FALSE, $group]);\n if (!empty($actions)) {\n $output += array_intersect_key($actions, array_filter($this->configuration['enabled_exports']));\n }\n else {\n $output = [];\n }\n return $output;\n }",
"public function actionGroup()\n {\n $query = $this->user->getContactGroups();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort'=> [\n 'defaultOrder' => [\n 'name' => SORT_ASC,\n ],\n ],\n ]);\n\n return $this->render('group/index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function getContactListAction($id_group) {\n\t\treturn $this->group->getContactArrayOf($id_group);\n\t}",
"public function action()\n {\n if (!$this->action) {\n $this->action = array();\n foreach (monsterToAction::where('mid', '=', $this->id)->get() as $a) {\n $this->action[] = array(\n 'name' => $a->name,\n 'desc' => $a->description,\n 'dc' => array(\n 'attr' => $a->dc,\n 'beat' => $a->dcv,\n 'success' => $a->dc_success,\n ),\n 'damage' => array(\n 'type' => $a->damage_type,\n 'damage' => $a->damage,\n 'roll_bonus' => $a->bonus,\n ),\n 'legendery_action' => ($a->legendery) ? TRUE : FALSE,\n );\n }\n }\n return $this->action;\n }",
"public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}",
"public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}",
"public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $contactGroups = $em->getRepository('AppBundle:ContactGroup')->findAll();\n\n return $this->render('contactgroup/index.html.twig', array(\n 'contactGroups' => $contactGroups,\n ));\n }",
"public function getActions(): array;",
"public function getGroupSequence()\n {\n $groups = ['Message'];\n $groups[] = $this->action;\n\n return $groups;\n }",
"public function getFrontEndActions();",
"function actions()\n {\n return[];\n }",
"public function &onGroupAreas()\n\t{\n\t\t$area = array(\n\t\t\t'name' => $this->_name,\n\t\t\t'title' => Lang::txt('PLG_GROUPS_ACTIVITY'),\n\t\t\t'default_access' => $this->params->get('plugin_access', 'members'),\n\t\t\t'display_menu_tab' => $this->params->get('display_tab', 1),\n\t\t\t'icon' => 'f056'\n\t\t);\n\t\treturn $area;\n\t}",
"protected function renderActionList() {}",
"public function actions()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\r\n\t\t\t'captcha'=>array(\r\n\t\t\t\t'class'=>'CCaptchaAction',\r\n\t\t\t\t'backColor'=>0xFFFFFF,\r\n\t\t\t),\r\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\r\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\r\n\t\t\t'page'=>array(\r\n\t\t\t\t'class'=>'CViewAction',\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function getActions();",
"public function getActions();",
"public function actions(): array;",
"public function get_actions(): array;",
"protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }",
"public function groupsAction()\n\t{\n\t\t$user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = UsersMobile::findFirst($user_id);\n\n $cms = $user->getCms([\n \t\"secured = 1 AND application_id = {$application_id}\"\n \t]);\n\n $data = [];\n\t\tforeach ($cms as $key => $chat) {\n\t\t\t$data[\"messages\"][$key][\"name\"] = $chat->title;\n\t\t\t$data[\"messages\"][$key][\"id\"] = $chat->id;\n\t\t\t$data[\"messages\"][$key][\"created_at\"] = $chat->datetime;\n\t\t}\n\n\t\t$final_array = $this->structureMessages($data[\"messages\"]);\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => $final_array\n ];\n\n return $this->sendJson($response);\n\t}",
"public function gestioncontactAction()\r\n {\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n\r\n $contacts = new Application_Model_DbTable_Contact();\r\n $contact = $contacts->getAllContactByGroup($userGroupId);\r\n $this->view->contacts = $contact;\r\n\r\n // Form for the creation of a contact\r\n $createForm = new Application_Form_CreateContactForm();\r\n $createForm->createForm();\r\n $createForm->setAction($this->_helper->url('createcontact', 'admin'));\r\n $this->view->form = $createForm;\r\n\r\n // Form for the edit of a contact\r\n $editForm = new Application_Form_EditContactForm();\r\n $editForm->createForm();\r\n $editForm->setAction($this->_helper->url('editcontact', 'admin'));\r\n $this->view->editform = $editForm;\r\n\r\n }",
"public function actions()\n { \n return array( \n // captcha action renders the CAPTCHA image displayed on the contact page\n 'captcha'=>array(\n 'class'=>'CCaptchaAction',\n 'backColor'=>0xFFFFFF, \n 'maxLength'=>'4', // 最多生成几个字符\n 'minLength'=>'4', // 最少生成几个字符\n 'height'=>'40'\n ), \n ); \n }",
"protected function getActions() {}",
"function getActionsByGroupId($groupId, $limit = NULL, $offset = NULL) {\n $sql = \"SELECT action_id, action_name\n FROM %s\n WHERE action_group = %d\n ORDER BY action_name ASC\";\n $sqlParams = array($this->tableActions, $groupId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['action_id']] = $row['action_name'];\n }\n }\n return $result;\n }",
"function getActionGroups($limit = NULL, $offset = NULL) {\n $sql = \"SELECT actiongroup_id, actiongroup_name\n FROM %s\n ORDER BY actiongroup_name ASC\";\n $sqlParams = array($this->tableGroups);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['actiongroup_id']] = $row['actiongroup_name'];\n }\n }\n return $result;\n }",
"public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }",
"public function sendAction()\n {\n return array();\n }",
"public function getBatchActions(): array;",
"protected function get_bulk_actions() {\n\n\t\t$actions = [];\n\n\t\tif ( current_user_can( wp_mail_smtp()->get_pro()->get_logs()->get_manage_capability() ) ) {\n\t\t\t$actions['delete'] = esc_html__( 'Delete', 'wp-mail-smtp-pro' );\n\t\t\t$actions['resend'] = esc_html__( 'Resend', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $actions;\n\t}"
]
| [
"0.5938471",
"0.5854643",
"0.5725198",
"0.55975497",
"0.55420315",
"0.55420315",
"0.55420315",
"0.55306005",
"0.550286",
"0.54723805",
"0.546748",
"0.54247445",
"0.54011554",
"0.53890795",
"0.53735965",
"0.53732735",
"0.53732735",
"0.5345275",
"0.5338938",
"0.53061503",
"0.52889806",
"0.5258824",
"0.5238365",
"0.52202356",
"0.5203883",
"0.51999897",
"0.5185044",
"0.5175849",
"0.51730627",
"0.51128745"
]
| 0.76027656 | 0 |
Returns render array for export actions on a space group. | protected function getExportActionsViewRender(GroupInterface $group) {
$output = [
'#type' => 'container',
'title' => [
'#type' => 'html_tag',
'#tag' => 'h4',
'#value' => t('Export'),
'#attributes' => ['class' => ['living-space-export-action-title']],
],
];
$actions = $this->moduleHandler
->invokeAll('living_spaces_group_exports_info', [FALSE, $group]);
if (!empty($actions)) {
$output += array_intersect_key($actions, array_filter($this->configuration['enabled_exports']));
}
else {
$output = [];
}
return $output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getContactActionsRender(GroupInterface $group) {\n $output = [\n '#type' => 'container',\n 'title' => [\n '#type' => 'html_tag',\n '#tag' => 'h4',\n '#value' => t('Contact'),\n '#attributes' => ['class' => ['living-space-contact-action-title']],\n ],\n ];\n\n $hook = 'living_spaces_group_contact_info';\n $account = $this->currentUser->getAccount();\n $actions = $this->moduleHandler->invokeAll($hook, [FALSE, $group, $account]);\n if (!empty($actions)) {\n $output += array_intersect_key($actions, array_filter($this->configuration['enabled_contacts']));\n }\n else {\n $output = [];\n }\n\n return $output;\n }",
"public function listActions() {\n return [\n new Action('Export', 'fa-download', URL::route('admin-'.$this->name().'-export'))\n ];\n }",
"public function getDashboardActions(): array;",
"public function export()\r\n {\r\n return array(\r\n 'i' => $this->id,\r\n 's' => $this->status\r\n );\r\n }",
"public function export() {\n $data = array();\n foreach ($this->elements as $element) {\n $data[$element->getName()] = $element->export();\n }\n return $data;\n }",
"protected function getGlobalActions()\n {\n $globalActions = [];\n\n if ($this->generateExportCsvLink()) {\n $csvArray = $this->generateExportCsvLink();\n $globalActions['csv'] = [\n 'label' => 'bigfoot_core.crud.actions.csv.label',\n 'route' => $csvArray['route'],\n 'parameters' => $csvArray['parameters'],\n 'icon' => 'icon-table',\n ];\n }\n\n if (method_exists($this, 'newAction')) {\n $globalActions['new'] = [\n 'label' => 'bigfoot_core.crud.actions.new.label',\n 'route' => $this->getRouteNameForAction('new'),\n 'parameters' => [],\n 'icon' => 'icon-plus-sign',\n ];\n }\n\n return $globalActions;\n }",
"function getActionsByGroupId($groupId, $limit = NULL, $offset = NULL) {\n $sql = \"SELECT action_id, action_name\n FROM %s\n WHERE action_group = %d\n ORDER BY action_name ASC\";\n $sqlParams = array($this->tableActions, $groupId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['action_id']] = $row['action_name'];\n }\n }\n return $result;\n }",
"public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//output\n\t\t\t\t'{\"Export\":{\"created_timestamp\":1414143865,\"created\":\"2014-10-24 12:44:25\"},\"Languages\":[],\"Messages\":[],\"References\":[],\"Translations\":[]}',\n\t\t\t\t//headers\n\t\t\t\tarray(\n\t\t\t\t\t'Content-Disposition' => 'attachment; filename=\"localization_export_2014-10-24 12:44:25.json\"'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"public function getGroupExportableFields()\n\t{\n\t\tforeach($this->definitions as $id => $definition)\n\t\t{\n\t\t\tif($definition['group_export'])\n\t\t\t{\n\t\t\t\t$cexp_definition[$id] = $definition;\n\t\t\t}\n\t\t}\n\t\treturn $cexp_definition ? $cexp_definition : array();\n\t}",
"public function get_bulk_actions() {\n\n\t\t\tif ( ! $this->bulk_actions_enabled ) {\n\t\t\t\t// Bulk actions disabled.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif ( empty( $this->wpda_list_columns->get_table_primary_key() ) ) {\n\t\t\t\t// Tables has no primary key: no bulk actions allowed!\n\t\t\t\t// Primary key is neccesary to ensure uniqueness.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$actions = [];\n\n\t\t\tif ( $this->allow_delete === 'on' ) {\n\t\t\t\t$actions = [\n\t\t\t\t\t'bulk-delete' => __( 'Delete Permanently', 'wp-data-access' ),\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$this->bulk_export_enabled && (\n\t\t\t\t\tWPDA::is_wpda_table( $this->table_name ) ||\n\t\t\t\t\tWPDA::get_option( WPDA::OPTION_BE_EXPORT_ROWS ) === 'on'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t$actions['bulk-export'] = __( 'Export to SQL', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-xml'] = __( 'Export to XML', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-json'] = __( 'Export to JSON', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-excel'] = __( 'Export to Excel', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-csv'] = __( 'Export to CSV', 'wp-data-access' );\n\t\t\t}\n\n\t\t\treturn $actions;\n\n\t\t}",
"protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }",
"protected function get_bulk_actions() {\n\n\t\t$actions = [];\n\n\t\tif ( current_user_can( wp_mail_smtp()->get_pro()->get_logs()->get_manage_capability() ) ) {\n\t\t\t$actions['delete'] = esc_html__( 'Delete', 'wp-mail-smtp-pro' );\n\t\t\t$actions['resend'] = esc_html__( 'Resend', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $actions;\n\t}",
"public function getActionData() {\r\n\t\treturn array(\r\n\t\t\t'packageID' => $this->packageID\r\n\t\t);\r\n\t}",
"public function actions()\n {\n return [\n 'index' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'home' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song' => ['class' => 'backend\\modules\\music\\actions\\MusicSongAction', 'checkAccess' => [$this, 'checkAccess']],\n 'playlist' => ['class' => 'backend\\modules\\music\\actions\\MusicPlaylistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'artist' => ['class' => 'backend\\modules\\music\\actions\\MusicArtistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song-download' => ['class' => 'backend\\modules\\music\\actions\\MusicSongDownloadAction', 'checkAccess' => [$this, 'checkAccess']],\n 'search' => ['class' => 'backend\\modules\\music\\actions\\SearchAction', 'checkAccess' => [$this, 'checkAccess']],\n 'feedback' => ['class' => 'backend\\modules\\music\\actions\\FeedbackAction', 'checkAccess' => [$this, 'checkAccess']],\n 'browse' => ['class' => 'backend\\modules\\music\\actions\\BrowseMusicAction', 'checkAccess' => [$this, 'checkAccess']],\n ];\n }",
"function actions()\n {\n return[];\n }",
"function getActionGroups($limit = NULL, $offset = NULL) {\n $sql = \"SELECT actiongroup_id, actiongroup_name\n FROM %s\n ORDER BY actiongroup_name ASC\";\n $sqlParams = array($this->tableGroups);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['actiongroup_id']] = $row['actiongroup_name'];\n }\n }\n return $result;\n }",
"public function export()\n {\n $exportFields = [\n 'id', 'title', 'slashtag', 'destination', 'shortUrl', \n 'status', 'createdAt', 'updatedAt', 'clicks', 'lastClickAt',\n 'favourite', 'forwardParameters'\n ];\n\n $linkArray= [];\n foreach ($exportFields as $fieldName) {\n $value = $this->$fieldName;\n if ($value) {\n $linkArray[$fieldName] = $value;\n }\n }\n\n if ($this->domain) {\n $linkArray['domain'] = $this->domain->export();\n }\n\n return $linkArray;\n }",
"public function getBatchActions(): array;",
"public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Language' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Language' => array(\n\t\t\t\t\t\t\t\t'Language Data'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Message' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Message' => array(\n\t\t\t\t\t\t\t\t'Message Data'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'MessageReference' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'MessageReference' => array(\n\t\t\t\t\t\t\t\t'MessageReference Data'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Translation' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Translation' => array(\n\t\t\t\t\t\t\t\t'Translation Data'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t//export\n\t\t\t\tarray(\n\t\t\t\t\t'Languages' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Language Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Messages' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Message Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'References' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'MessageReference Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Translations' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Translation Data'\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}",
"private function get_bulk_actions( $export_type ) {\n\n\t\t$bulk_actions = array(\n\t\t\t'mark_exported_to_csv' => __( 'Mark exported to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t\t'mark_not_exported_to_csv' => __( 'Mark not exported to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t\t'download_to_csv' => __( 'Download to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t);\n\n\t\t// add export to CSV via [method] action\n\t\tif ( $auto_export_method = $this->get_methods_instance()->get_auto_export_method( $export_type ) ) {\n\n\t\t\t$label = $this->get_methods_instance()->get_export_method_label( $auto_export_method );\n\n\t\t\t/* translators: Placeholders: %s - via [method], full example: Export to CSV via Email */\n\t\t\t$label = sprintf( __( 'Export to CSV %s', 'woocommerce-customer-order-csv-export' ), $label );\n\n\t\t\t$bulk_actions['export_to_csv_via_auto_export_method'] = $label;\n\t\t}\n\n\t\treturn $bulk_actions;\n\t}",
"public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }",
"public function alm_filters_export(){\n\n \tif( isset( $_POST[\"alm_filters_export\"] ) ) {\n\n $filename = 'alm-filters';\n \tif(!empty($_POST['filter_keys'])){\n \t$export_array = array();\n foreach($_POST['filter_keys'] as $name){\n $option = get_option($name);\n $export_array[] = unserialize($option);\n $filename .= '['. ALMFilters::alm_filters_replace_string($name) .']';\n }\n\n\t \t$filename = $filename .= '.json';\n\t \t\theader( \"Content-Description: File Transfer\" );\n\t \t\theader( \"Content-Disposition: attachment; filename={$filename}\" );\n\t \t\theader( \"Content-Type: application/json; charset=utf-8\" );\n\n\t \t\t// return\n\t \t\techo json_encode($export_array, JSON_PRETTY_PRINT);\n\n\t \t\tdie();\n\n \t\t} else {\n\n \t$this->alm_filters_add_admin_notice(__('No filter groups selected', 'ajax-load-more-filters'), 'error');\n\n \t\t}\n }\n \t}",
"public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }",
"public function actions()\n {\n return [\n 'grid-sort' => [\n 'class' => SortableGridAction::className(),\n 'modelName' => $this->modelClass,\n ],\n ];\n }",
"public function get_actions(): array;",
"public function actions()\n {\n return [\n 'subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\SubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n 'check_subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\CheckSubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n ];\n }",
"public function getActions(): array;",
"function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'g_id ASC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0, 6 ) ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t$r['g_icon'] = '';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'groups.xml', '', 0 );\n\t}",
"public function actions(): array;",
"function acf_prepare_field_group_for_export($field_group = array())\n{\n}"
]
| [
"0.64288974",
"0.6256333",
"0.60034233",
"0.5817994",
"0.5810293",
"0.5797827",
"0.57573223",
"0.5743704",
"0.57402873",
"0.5727694",
"0.565833",
"0.5654961",
"0.56274325",
"0.562369",
"0.56142485",
"0.56063426",
"0.5563493",
"0.5540996",
"0.55381507",
"0.5538053",
"0.5535479",
"0.551802",
"0.55143416",
"0.5507971",
"0.55068153",
"0.5504307",
"0.5499764",
"0.5449971",
"0.5434213",
"0.538841"
]
| 0.82140887 | 0 |
genera el contenido para insertar en codigo QR | private function MakeContentQR(){
$content = "{$this->Nombre} {$this->Apellidos}\n{$this->email}\n{$this->Carrera}\n
{$this->Semestre}\n{$this->ncontrol}\n{$this->FolioPago}\n{$this->F_Examen}";
return $content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generate(Request $request){ \n $data = $request->all();\n QRCode::text($data['code'])->png(); \n }",
"public static function getGenerateQrCode(Request $request){\n $title = \"Generate Qr Code\";\n $projectDetailObj = new \\App\\Project;\n $input = $request->all();\n $project = $projectDetailObj->find($input['id']);\n try{\n DB::beginTransaction();\n $explode_name = explode(' ',$project->name);\n\n $qrcode = mt_rand(1000000, 9999999).$explode_name[0].$project->id;\n // QrCode::size(500)->format('png')->generate($qrcode, public_path('storage/public/storage/user_images/'.$input['id'].'-code.png'));\n $project->update(['qrcode'=>$qrcode,'need_to_scan_qr'=>'enable']);\n DB::commit();\n /* Transaction successful. */\n }catch(\\Exception $e){ \n DB::rollback();\n /* Transaction failed. */\n }\n return \"1\" ;\n }",
"function encoder ($content) {\n $code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyAgaWYgKHN0cmxlbiAoJGtleSkgIT0gMTkpICB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSBlbHNlIHsgZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0pLUjJocVlqSlNiRWxFTUdkak0xWnBZek5TZVVsRFoydGhNbFkxVEVOQmVFNVRhemRKUTFKclNVUXdaMGxEYUdsWldFNXNUbXBTWmxwWE5XcGlNbEpzU1VOb2EyRllUbkpZTTFKMlpFZEdjMWd6VG5kWlYwNXNTME5TWmxVd1ZsTldhMVpUU1VaemJsSkZPVVJXVlRGR1ZHeFNabFZyT1ZCV1EyUmtTMU5yY0U5NVFXdGphVUU1U1VOQmIxbHRSbnBhVkZrd1dESldkVmt5T1d0YVUwRnZTa1k1VkZKV1NsZFNWa2xuVjNsa1JWUXdUbFpVVlZaUFZrWTVVMVF3T1ZWS01UQndTMVJ6WjBsSFZqSlpWM2R2V1cxR2VscFVXVEJZTWxKc1dUSTVhMXBUWjJsVGEyUlBaR3h3U0ZaWFpGRlZNRVp5VjJ0Tk1HRXlUbkZqTW1SS1VURktOVmRFU2pSaVIwcHdVVlJzU2xORk5IZFpNakUwWWtkS2NGRlhPVXRUUld4M1ZETnNRbUV5VFhsV2JteG9WakJhZWxOVlVYZGFNSEExV1hwa1NsRXhTbTlaYTJRMFpHMVJlVlp0ZEZsTk1EUXhXV3hrUzJSdFNrbFVWMlJSVlRCR2NGUlhjRTVOUlRWVlYxUk9VRkpIZUc5WFZ6RlBZVEZ3V0ZwSE9XaE5ha1l4V1RCb1IyVnRVbGxYYWxKc1YwYzVjRlF6YkVKaE1rMTZZa2hTV21KVWJIcFpla1UxWVcxSmVsWnVWbXRSTUVVMVUxVm9UMDFIVG5SbFIzaHBZVlZHZGxOclpFZGpNa3BJVDFST1lWWXhTbTFaZWs1elpFWnNkRTlZVG1wbFYzTXpVMVZPUTJKWFNYcFRWMlJNVVRGS2QxTlZVWGRhTURGRll6SmtTMUl5ZEc1VlJVNURaVzFTU1ZOdVRtRldlbEp1VXpCT1UyRnRTWGxWYlhoTVZraE9ibE5yWkhKYU1IUTFZek5DU2xOSVRtNVpWbVJhV2pCMFJGVnVRa3BSTVZadVZGZHNRazlXUWxSUldHUk1WVEJKTTFOVlRsTmpNWEJaVldwQ1lWZEZiRzVWUms1RFpHMU9kRlZYWkV4Uk1VcHhXV3BLVTJKR1pEVlZia0paVlRKek0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEpLU0ZacVFtdFNNVm8xVTFWT1Zsb3djRWxVYWxacFZqQndNbGxyYUU5YWJHdDVUMVJHYVdKc1JUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6TnZkMW93Y0VobFIzaHJVMFpLYzFreWJFSkxNVUp3VVZkMGFGVXdSbmxUVlU1VFkwVTVOVkZYWkV0U00yaHpXa1ZvVTJKSFRuQlJWR3hLVVRGS2VsZHNhRk5OUm5CWlUxZGtVV0ZxVW01VVYzQjZXakJ3U0dWSGVHdFRSa3B6V1RKc1FrOVZiRVJWYms1aFYwWkpkMWRzYUVwYU1XaHdVVlJHVGxaSFRUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6SnZkMW95U1hwVGJYUktVVEprY2xkVVNUVmhNWEJVVVcxS1MxSXllR3RUTVZKNldqSmFWRkZ0ZUdsVFJUVnpVMVZvZWxvd2NFaGxSM2hyVTBaS2Mxa3liRUpQVld4SVQxaHNZVkV3Um5aVGEyUlBaR3h3U0ZadFNrdFNNbmhyVXpGT1FtTnJiRWhQV0d4aFVUQkdkbE5yWkU5a2JIQklWbGRrV0dWV1NuZFVSbEpIV2tWMFZHSjZRbEJsVlVrMVUxVk9VMk14Y0ZsVmFrSmhWMFZzYmxWR1RrSmhNa3BJVm1wQ2ExSXhXalZUVlU1V1dqQndTVlJxVm1sV01IQXlXV3RvVDFwc2EzbFBWRVpwWW14Rk0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEZzV0dWSVRtbE5NbEp6VjJ0Wk5XVnRWbGhOVjJ4cFRXNW9ObE5WV25waE1rcElWbXBDYTFJeFdqVlhSbEo2V2pCd1NWUnRlR3BpVjNodldXdE9RbVJXUWxSUlYzUnBVakZaZDFwRlpGZGxWVGsxVVdwcmFVdFRhemRKUTBGcll6SldlV0ZYUm5OWU1qRm9aVVk1YzFwWE5HZFFVMEV3VDNsQlowcEhOV3hrTVRsNldsaEtjRmxYZDJkUVUwSm9ZMjVLYUdWVFFXOUxWSE5uU2toT2JHTnRiR2hpUmpseldsYzBaMUJUUW5wa1NFcHpXbGMwWjB0RFVucGFXRXB3V1ZkM2NFOTVRV2RhYlRsNVNVTm5hMkZUUVRsSlJFRTNTVU5TY0VsRWQyZEtTRTVzWTIxc2FHSkdPWE5hVnpRM1NVTlNjRWxEYzNKTFUwSTNTVWRzYlVsRFoydGhVMEU0U1VOU2VscFlTbkJaVjNobVlsZEdORmd5ZUd4aWFXdG5aWGxCYTJKdFZqTllNMDVzWTIxc2FHSkRRbUpLUjJ4a1NVUXdaMHBJVG14amJXeG9Za05DWWtwSGJHUlBlVUk1U1VkV2MyTXlWV2RsZVVGclltMVdNMWd6VG14amJXeG9Za05DWWtwSGEyeE9SakJuUzNvd1owcElUbXhqYld4b1lrTkNZa3BIYkdSUGVVSTVTVWd3WjBsSFduWmpiVlpvV1RKblowdERVblZhV0dSbVl6SldlV0ZYUm5OSlIwWjZTVU5TY0VsRU1DdEpRMWxuU2tkNGJHUklVbXhqYVd0blpYbEJhMkpIVmpCa1IxWjVTVVF3WjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblRGTkJlRWxETUdkS1IzaHNaRWhTYkdOcFFXeEpRMUo2WlZjeGFXSXllSHBZTWs1MlpGYzFNRTk1UVd0aVIxWXdaRWRXZVVsRU1HZEtSMFp6WWtjNU0xcFhVbVpqTTJ4MFdXMDVjMk41UW1KS1IzaHNaRWhTYkdOc01EZEpTREE5SWlrcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2dORHNnS3lzZ0pHa3BJSHNnSkc1bGQxOXpaWEpwWVd4YkpHbGRJRDBnSkhObGNtbGhiQ0JiSkdsZE95QjlJQ0FrWTI5a1pTQTlJR3B2YVc0Z0tDY25MQ0FrYm1WM1gzTmxjbWxoYkNrN0lDQWtZMjlrWlNBOUlITjFZbk4wY2lBb0pITmxjbWxoYkN3Z01Dd2dOQ2s3SUdsbUlDaHpkSEowYjJ4dmQyVnlJQ2drWTI5a1pTa2dJVDBnYzNSeWRHOXNiM2RsY2lBb0pHaGpiMlJsS1NrZ2V5QWdhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUI5SUdWc2MyVWdleUFrZEdocGN5MCtYM0psWkdseVpXTjBJQ2duTDJsdVpHVjRMMkZqZEdsMllYUmxKeWs3SUgwZ2ZTQmxiSE5sYVdZZ0tDUjFjMlZ5Y3p3ME9UVXBJSHNnSkhGMVpYSjVJRDBnSjFORlRFVkRWQ0JqYjNWdWRDaHBaQ2tnWVhNZ2JuVnRJRVpTVDAwZ1pHRmpiMjV6WDNWelpYSnpJRmRJUlZKRklHTjFjM1J2YldWeVgybGtJRDBnSnk1cGJuUjJZV3dvSkhSb2FYTXRQbk5sYzNOcGIyNHRQbU4xYzNSdmJXVnlYMmxrS1M0bklFRk9SQ0J5WldGa2IyNXNlVHcrTVNCQlRrUWdhWE5mWVdSdGFXNGdQU0F3SnpzZ0pISnZkeUE5SUNSMGFHbHpMVDVrWWkwK1ptVjBZMmhTYjNjZ0tDUnhkV1Z5ZVNrN0lHbG1JQ2drY205M0lGc25iblZ0SjEwZ1BpQWtkWE5sY25NcElIc2dhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUFrZEdocGN5MCtkbWxsZHkwK2QyVmZibVZsWkY5dGIzSmxYM1Z6WlhKeklEMGdkSEoxWlRzZ2ZTQmxiSE5sSUhzZ0pIUm9hWE10UGw5eVpXUnBjbVZqZENBb0p5OXBibVJsZUM5aFkzUnBkbUYwWlNjcE95QjlJSDBnWld4elpTQjdJQ1IwYUdsekxUNTJhV1YzTFQ1dGIyUmxJRDBnTWpzZ2ZTQjlJR1ZzYzJVZ2V5QWtkR2hwY3kwK2RtbGxkeTArYlc5a1pTQTlJREk3SUgwPSIpKTsgfSB9\"));';\n //$code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyBldmFsKGJhc2U2NF9kZWNvZGUoImFXWWdLSE4wY214bGJpQW9KR3RsZVNrZ0lUMGdNVGtwSUNCN0lDUjBhR2x6TFQ1ZmNtVmthWEpsWTNRZ0tDY3ZhVzVrWlhndllXTjBhWFpoZEdVbktUc2dmU0JsYkhObElIc2dKR2hqYjJSbElEMGdjM1ZpYzNSeUlDZ2thMlY1TENBeE5TazdJQ1JrSUQwZ0lDaGlZWE5sTmpSZlpXNWpiMlJsSUNoa2FYTnJYM1J2ZEdGc1gzTndZV05sS0NSZlUwVlNWa1ZTSUZzblJFOURWVTFGVGxSZlVrOVBWQ2RkS1NrcE95QWtjaUE5SUNBb1ltRnpaVFkwWDJWdVkyOWtaU0FvSkY5VFJWSldSVklnV3lkRVQwTlZUVVZPVkY5U1QwOVVKMTBwS1RzZ0lDUmpiMlJsSUQwZ0pHUXVKSEk3SUNBa2NsOXNaVzRnUFNCemRISnNaVzRnS0NSeUtUc2dKSE5sY21saGJDQTlJQ2NuT3lBa1lXeHNiM2RsWkY5emVXMWliMnh6SUQwZ0lqSXpORFUyTnpnNVlXSmpaR1ZuYUd0dGJuQnhjM1YyZUhsNklqc2dKSE41YldKdmJITmZZMjkxYm5RZ1BTQnpkSEpzWlc0Z0tDUmhiR3h2ZDJWa1gzTjViV0p2YkhNcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2djM1J5YkdWdUlDZ2tZMjlrWlNrN0lDUnBJQ3NyS1NCN0lHbG1JQ2drYVNBbElESWdQVDBnTUNrZ2V5QWtiR1YwZEdWeUlEMGdiM0prSUNna1kyOWtaVnNrYVYwcE95QWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlDczlJQ1JzWlhSMFpYSWdQajRnSkdrZ0t5QWthVHNnSUNSc1pYUjBaWElnUFNBa2JHVjBkR1Z5SUQ0K0lESTdJQ1JzWlhSMFpYSWdQU0FrYkdWMGRHVnlJRjRnTlRFM095QWtiR1YwZEdWeUlDbzlJRzl5WkNBb0pHTnZaR1VnV3lScFhTazdJSDBnWld4elpTQjdJQ1JzWlhSMFpYSWdQU0J2Y21RZ0tDUmpiMlJsV3lScFhTa2dLeUJ2Y21RZ0tDUmpiMlJsSUZza2FTMHhYU2txTkRzZ2ZTQWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlEMGdKR0ZzYkc5M1pXUmZjM2x0WW05c2N5QmJKR3hsZEhSbGNsMDdJQ1J6WlhKcFlXd2dMajBnSkd4bGRIUmxjanNnZlNBZ1pYWmhiQ2hpWVhObE5qUmZaR1ZqYjJSbEtDSmFXRnBvWWtOb2FWbFlUbXhPYWxKbVdrZFdhbUl5VW14TFEwcExVMFUxYzFreU1YTmhSMHBIVDFoU1dsZEhhRzFaYTJSWFpGVnNSVTFIWkU5U1NFNXVVMVZPVTJSV2NGbGFSMXBxVFd4YU5WbFdaRWRqTUd4RlRVZGtXbGRGY0RWWFZtaHlXakIwUkdGNlpFcFJNVW8yVjJ4b1MyTkdiRmhsUjFwcFVqRmFNVk5WVVhkYU1rMTZWVzVzYVZJeFdqRlRWVTV1WVRKTmVWWnViR2hXTUZwNlV6RlNlbG93YkVoWGJscHFZVlZHZGxOclpISmFNVUpVVVZoa1VHVlZSbkpaVms1Q1QwVnNSRlZ1Y0dGWFJYQjNWMVprTkZwdFNraFdibFpRWlZWR2NsbFdUa0pqYTNRMVlUSmtiR1ZWU25kWGJXeENZakJ3U0dFeVpGRlJNRVp5V1hwS1YyVlhSbGhTYms1WlRXcEdiMXBWV1RWak1YQllUa2hDU2xOSVRtNVRhMk14WWtkUmVFOVljR0ZYUlhCM1YxWmtNMW94WkRWVmJrSlpWVEJGTlZOVlRsTmxiSEJaVTI1Q1dsWXpaRzVXTTJ4VFkwWm9WV015WkcxVk1FcHpXV3RvVDJKRmJFbGpNbVJMVW5wV2MxcEVSVFZsYkhCWlUyNUNXbFl6Wkc1V00yeFRZMFZ3VlZWdFVrcFJNMDAxVTFWT1UyVnNjRmxUYmtKYVZqTmtibFl6YkZOalJtaFZZekprYlZVd1NUVlRWVTVEWWxkSmVsTnRlRnBXTURWMlUxVk9ibUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBFVVcxb2FtVlZSbkpaVms1Q1QxWkNjRkZYTVVwUk1VcDZWMnhvVTAxR2NGbFRXRUpLVTBoT2JsTnJaRFJpUjFKSlZXMTRhbUZWUlRWVFZVNVRaVzFXV0UxWGJHbE5ibWcyVjBSS1QyUnRVbGhPVkVKS1VYcENibFJXVGtKa1JXeEVWVzVPWVZkR1NYZFhiR2hLV2pCd1ZGRlhkR3BOTW5nd1YxY3dOV015VFhoUFYzQnBUVEZhTVZwRlVucGFNSEJJWlVkNGExTkdTbk5aTW14Q1QxVnNSRlZ0YUdsU00yZ3lXa1JLVjJFeFozcFVhbFpwVmpCd01sbHJhRTVhTVdRMVZXNU9ZVmRHU1hkWGJHaExXa1U1TlZGcWJFcFJNRXAwV1dwT1Nsb3dkRVJWYmtKS1VrUkNibFJWVW5wYU1IQklZVEprVVZFd1JYZFVNMnhDWTJ0ME5WRlhkR2hWTW5SdVdsaHNRbUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBIWXpKMGFGWnFRbTVWUms1Q1lUSk5lVlp1YkdoV01GcDZVMVZhZW1FeVJsZE5SR1JLVTBSQk9VbHBhM0JQZVVGblNrZE9kbHBIVldkUVUwSnhZakpzZFVsRFoyNUtlWGRuU2tjMWJHUXhPWHBhV0Vwd1dWZDNjRTk1UVdkS1IwNTJXa2RWWjFCVFFucGtWMHA2WkVoSlowdERVbnBhV0Vwd1dWZDNjMGxFUVhOSlJGRndUM2xDY0ZwcFFXOWpNMUo1WkVjNWMySXpaR3hqYVVGdlNrZE9kbHBIVlhCSlEwVTVTVWhPTUdOdVVuWmlSemt6V2xoSlowdERVbTlaTWpscldsTnJjRWxJYzJkSlIyeHRTVU5uYUVsSFZuUmpTRkkxU1VObmExZ3hRbEJWTVZGblYzbGthbUl5VW14S01UQndTMU5DTjBsRFVqQmhSMng2VEZRMU1tRlhWak5NVkRWMFlqSlNiRWxFTUdkTlZITm5abE5DYkdKSVRteEpTSE5uU2toU2IyRllUWFJRYkRsNVdsZFNjR050Vm1wa1EwRnZTbms1Y0dKdFVteGxRemxvV1ROU2NHUnRSakJhVTJOd1QzbENPVWxJTUdkYVYzaDZXbGRzYlVsRFoydGtXRTVzWTI1Tk9FNUVhekZMVTBJM1NVTlNlR1JYVm5sbFUwRTVTVU5rVkZKVmVFWlJNVkZuV1RJNU1XSnVVVzloVjFGd1NVZEdla2xITlRGaVUwSkhWV3M1VGtsSFVtaFpNamwxWXpFNU1XTXlWbmxqZVVKWVUwVldVMUpUUW1wa1dFNHdZakl4YkdOc09YQmFRMEU1U1VOamRXRlhOVEJrYlVaelMwTlNNR0ZIYkhwTVZEVjZXbGhPZW1GWE9YVk1WRFZxWkZoT01HSXlNV3hqYkRsd1drTnJkVXA1UWtKVWExRm5ZMjFXYUZwSE9YVmlTR3M0VUdwRloxRlZOVVZKUjJ4NldESkdhMkpYYkhWSlJEQm5UVU5qTjBsRFVubGlNMk5uVUZOQmEyUkhhSEJqZVRBcldrZEpkRkJ0V214a1IwNXZWVzA1TTBsRFoydGpXRlpzWTI1cmNFOTVRbkJhYVVGdlNraEtkbVI1UW1KS01qVXhZbE5rWkVsRU5HZEtTRlo2V2xoS2VrdFRRamRKUjJ4dFNVTm5hRWxIVm5SalNGSTFTVU5uYTFneFFsQlZNVkZuVjNsa2FtSXlVbXhLTVRCd1MxTkNOMGxEVWpCaFIyeDZURlExTW1GWFZqTk1WRFYwWWpKU2JFbEVNR2ROVkhOblNraFNiMkZZVFhSUWJscHdXbGhqZEZCdVpHeFlNalZzV2xkU1ptSlhPWGxhVmpreFl6SldlV041UVRsSlNGSjVaRmRWTjBsSU1HZGFWM2g2V2xOQ04wbERVakJoUjJ4NlRGUTFabU50Vm10aFdFcHNXVE5SWjB0RFkzWmhWelZyV2xobmRsbFhUakJoV0Zwb1pFZFZia3RVYzJkbVUwSTVTVWRXYzJNeVZXZGxlVUZyWkVkb2NHTjVNQ3RrYld4c1pIa3dLMkpYT1d0YVUwRTVTVVJKTjBsSU1HZG1VVDA5SWlrcE8zMD0iKSk7ICAgfQ==\"));\n\n $i = 0;\n while (($encoder_start = strpos ($content, \"//<encoder_start>\")) !== false) {\n $encoder_end = strpos ($content, \"//<encoder_end>\");\n $content_start = substr ($content, 0, $encoder_start);\n $content_to_encode = substr ($content, $encoder_start + strlen (\"//<encoder_start>\"), $encoder_end - $encoder_start - strlen (\"//<encoder_start>\"));\n $content_end = substr ($content, $encoder_end + strlen (\"//<encoder_end>\"));\n \n $content_to_encode = \"eval(base64_decode('\".base64_encode ($code.$content_to_encode).\"'));\";\n //$content_to_encode = $code;//.$content_to_encode;\n \n $content = $content_start . $content_to_encode . $content_end;\n //echo \"\\n\\n\\n\\ni : $i \\n\\n\\n\\n\".($content);\n $i ++;\n }\n return $content;\n}",
"function getQRCode( $qraddress, $size ) {\n $alt_text = 'Send VRSC to ' . $qraddress;\n return \"\\n\" . '<img src=\"https://chart.googleapis.com/chart?chld=H|2&chs='.$size.'x'.$size.'&cht=qr&chl=' . $qraddress . '\" alt=\"' . $alt_text . '\" />' . \"\\n\";\n}",
"public function example()\n {\n\n // header('Content-Type: ' . $qrCode->getContentType());\n // // $this->request->setHeader('Content-Endcoding', $qrCode->getContentType());\n // return $qrCode->writeString();\n return view('admin/code_divisi/example');\n\n // $qrCode = new QrCode();\n // $qrCode\n // ->setText('1111')\n // ->setSize(300)\n // ->setPadding(10)\n // ->setErrorCorrection('high')\n // ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))\n // ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))\n // ->setLabel('PT. PAL Indonesia (persero)')\n // ->setLabelFontSize(16)\n // ->setImageType(QrCode::IMAGE_TYPE_PNG);\n // echo '<img src=\"data:' . $qrCode->getContentType() . ';base64,' . $qrCode->generate() . '\" />';\n }",
"public function qrcodeSave() {\r\n $user_id = \\Yii::$app->user->getId();\r\n $baseimgurl = 'date/upload/wechat/qrcode/';\r\n $createpath=\\Yii::$app->basePath.'/web/'.$baseimgurl;\r\n ToolService::createdir($createpath);\r\n //生成随机文件名\r\n $basefilename = $user_id . '_' . time() . '_' . rand(1000, 9999);\r\n $this->s_img_url = $sfilename = $baseimgurl . 's' . $basefilename . '.' . $this->file->extension;\r\n $this->o_img_url = $ofilename = $baseimgurl . 'o' . $basefilename . '.' . $this->file->extension;\r\n $this->m_img_url = $mfilename = $baseimgurl . 'm' . $basefilename . '.' . $this->file->extension;\r\n $this->b_img_url = $bfilename = $baseimgurl . 'b' . $basefilename . '.' . $this->file->extension;\r\n $this->file->saveAs($bfilename);\r\n $image = \\Yii::$app->image->load($bfilename);\r\n //生成中图片\r\n $image->resize(100, 100, Image::NONE);\r\n $image->save($mfilename);\r\n //生成小图片\r\n $image->resize(64, 64, Image::NONE);\r\n $image->save($sfilename);\r\n //生成微略图\r\n $image->resize(48, 48, Image::NONE);\r\n $image->save($ofilename);\r\n\r\n\r\n $newpic = new Pic();\r\n $newpic->setAttributes([\r\n 'user_id' => $user_id,\r\n 'pic_type' => 3,\r\n 'pic_s_img' => '/' . $sfilename,\r\n 'pic_m_img' => '/' . $mfilename,\r\n 'pic_b_img' => '/' . $bfilename\r\n ]);\r\n if ($newpic->save()) {\r\n $this->id = \\Yii::$app->db->getLastInsertID();\r\n return true;\r\n }\r\n return FALSE;\r\n }",
"public function generateQRCode()\n {\n if (! $this->getUser()->loginSecurity || ! $this->getUser()->loginSecurity->google2fa_secret) {\n $this->generate2faSecret();\n $this->getUser()->refresh();\n }\n\n $g2faUrl = $this->googleTwoFaService->getQRCodeUrl(\n config('app.name'),\n $this->getUser()->email,\n $this->getUser()->loginSecurity->google2fa_secret\n );\n\n $writer = new Writer(\n new ImageRenderer(\n new RendererStyle(400),\n new ImagickImageBackEnd()\n )\n );\n\n return [\n 'image' => 'data:image/png;base64,' . base64_encode($writer->writeString($g2faUrl)),\n 'otp_url' => $g2faUrl,\n 'secret' => $this->getUser()->loginSecurity->google2fa_secret,\n ];\n }",
"public function executeExportQRCode() {\r\n\t\t$this->action_name = $this->getActionName();\r\n\t\t$object = $this->_getObjectOrCreate();\r\n\t\tif (!$object || $object->isNew()) { //Object is created if not retrieved by request parameters\r\n\t\t\t$objects = $this->getListObjects('list');\r\n\t\t\t$name = $this->getClassName() . 's-' . date('Ymd');\r\n\t\t} else {\r\n\t\t\t$objects[] = $object;\r\n\t\t\t$name = $this->getClassName() . '_' . $object->getByName($this->getPrimaryKey(), BasePeer::TYPE_FIELDNAME);\r\n\t\t}\r\n\t\t$component = $this->getGeneratorParameter('behaviors.qrcode.export.component', 'export_qrcode');\r\n\t\t$orientation = $this->getGeneratorParameter('behaviors.qrcode.export.orientation', 'L');\r\n\t\t$width = $this->getGeneratorParameter('behaviors.qrcode.export.width', 84);\r\n\t\t$height = $this->getGeneratorParameter('behaviors.qrcode.export.height', 35);\r\n\t\t$margin = $this->getGeneratorParameter('behaviors.qrcode.export.margin', 5);\r\n\r\n\t\tsfLoader::loadHelpers(array('Partial'));\r\n\t\t$content = get_partial('print_qrcode', array('objects' => $objects, 'module_name' => $this->getModuleName(), 'class_name' => $this->getClassName(), 'primary_key' => $this->getPrimaryKey(), 'component' => $component));\r\n\t\t//echo $content;exit;//DEBUG\r\n\t\t$pdf = $this->getHtml2PdfObject($orientation, array($width, $height), array($margin, $margin, $margin, $margin));\r\n\t\t$pdf->writeHTML($content);\r\n\t\t@ob_clean();\r\n\t\t$pdf->Output($name . '.pdf', 'D');\r\n\t\texit;\r\n\t}",
"function addQRCode() {\n?>\n<script src=\"https://cdn.rawgit.com/davidshimjs/qrcodejs/04f46c6a/qrcode.min.js\">\n</script>\n<script src=\"https://unpkg.com/[email protected]/distribution/globalinputmessage.min.js\">\n</script>\n<script>\n\tjQuery(document).ready(function(){\n\t\tjQuery( \".message\" ).append('12121212');\n\n\t});\t\t\n</script>\n<script type=\"text/javascript\">\n\n\t(function() {\n\n\t var formElement = document.getElementById(\"loginform\");\n\t qrCodeElement = document.createElement('p');\n\n\t qrCodeElement.style.padding = \"10px\";\n\t qrCodeElement.style.backgroundColor = \"#FFFFFF\";\n\n\t formElement.parentNode.insertBefore(qrCodeElement, formElement);\n\n\t var globalinput = {\n\t api: require(\"global-input-message\")\n\t };\n\n\n\t globalinput.config = {\n\t onSenderConnected: function() {\n\t qrCodeElement.style.display = \"none\";\n\t },\n\t onSenderDisconnected: function() {\n\t qrCodeElement.style.display = \"block\";\n\t },\n\t initData: {\n\t action: \"input\",\n\t dataType: \"form\",\n\t form: {\n\t id: \"###username###@\" + window.location.hostname + \".wordpress\",\n\t title: \"Wordpress login\",\n\t fields: [{\n\t label: \"Username\",\n\t id: \"username\",\n\t operations: {\n\t onInput: function(username) {\n\t document.getElementById(\"user_login\").value = username;\n\t }\n\t }\n\n\t }, {\n\t label: \"Password\",\n\t id: \"password\",\n\t type: \"secret\",\n\t operations: {\n\t onInput: function(password) {\n\t document.getElementById(\"user_pass\").value = password;\n\t }\n\t }\n\n\t }, {\n\t label: \"Login\",\n\t type: \"button\",\n\t operations: {\n\t onInput: function() {\n\t document.getElementById(\"wp-submit\").click();\n\t }\n\t }\n\n\t }]\n\t }\n\t }\n\n\t };\n\t \n\t globalinput.connector = globalinput.api.createMessageConnector();\n\t globalinput.connector.connect(globalinput.config);\n\t var codedata = globalinput.connector.buildInputCodeData();\n\t var qrcode = new QRCode(qrCodeElement, {\n\t text: codedata,\n\t width: 300,\n\t height: 300,\n\t colorDark: \"#000000\",\n\t colorLight: \"#ffffff\",\n\t correctLevel: QRCode.CorrectLevel.H\n\t });\n\n\t})();\n\n</script>\n<?php\n\t}",
"protected function _encode()\n {\n $barcode[] = self::$GUARD['start'];\n for($i=1;$i<=strlen($this->number)-1;$i++)\n {\n if($i < 7)\n $barcode[] = self::$LEFT_PARITY[$this->_key[$i-1]][substr($this->number, $i, 1)];\n else\n $barcode[] = self::$RIGHT_PARITY[substr($this->number, $i, 1)];\n if($i == 6)\n $barcode[] = self::$GUARD['middle'];\n }\n $barcode[] = self::$GUARD['end'];\n return $barcode;\n }",
"function qrcodeGenerate()\r\n\t {\r\n\t \t$selectedValue = JRequest::getVar('selectedValue');\r\n\t \t$selectedProductId = explode(\",\", $selectedValue);\r\n\t \tarray_pop($selectedProductId);\r\n\t \t$qrcodeId = implode(',',$selectedProductId);\r\n\t \t$qrcodeGenerateResult = $this->generateQrcode($selectedProductId);//function to generate qrcode for product.\r\n\t \t$path = urldecode(JRequest::getVar('redirectPath'));\r\n\t $this->setRedirect($path,$qrcodeGenerateResult);\r\n\t }",
"public function generateQrCode()\n {\n return $this->doRequest('GET', 'qr-code', []);\n }",
"public function genera_txt($param_final){\n\n\t\t$allrows = $param_final;\n\t\t\n\t\t$id_us = $this->session->userdata('session_id'); \n\n\t\t$archivo = fopen($_SERVER['DOCUMENT_ROOT'].'/reportes_villatours_v/referencias/archivos/archivos_egencia_lay_data_import_sp/udids_'.$id_us.'.txt', \"w+\");\n\t\t\n\t\t$header = ['Link_Key','BookingID','UdidNumber','UdidValue','UdidDefinitions'];\n\n\t\t$str_body = '';\n\t\tforeach ($header as $key => $value) {\n\t\t\t\n\t\t\t\t\t$str_body = $str_body . $value.\"\t\";\n\n\t\t\t\t}\n\n\n\t\tfwrite($archivo, $str_body);\n\t\t\t\n\n\t $nueva_plantilla = [];\n\n\t\tforeach ($allrows['rep'] as $key => $value) {\n\t\n\n\t\t\tarray_push($nueva_plantilla, $value);\n\t\t\t\n\n\t\t}\n\n\t\t\n\t foreach($nueva_plantilla as $key => $value) {\n\n\t \tfwrite($archivo,\"\\r\\n\");\n\t \t\n\t \t$str_body = '';\n\t \tforeach($value as $value2) {\n\n\t \t\t$str_body = $str_body . $value2.\"\t\";\n\n\t \t}\n\n\t \tfwrite($archivo, $str_body);\n\n\t\t}\n\n\t\t\n\n\t\tfclose($archivo);\n\n }",
"public function showTemplate(): string\n {\n $Qr = CoreFunctions::mostrar_qr($this);\n $firmas = CoreFunctions::mostrar_estado_proceso($this);\n $Service = $this->getService();\n $contenido = $this->getFieldValue('contenido');\n return <<<HTML\n <table style=\"width: 100%;border: 0\">\n <tbody>\n <tr>\n <td colspan=\"2\">{$Service->getFechaCiudad()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n\n <tr>\n <td>{$Service->getModel()->getFieldValue('destino')}</td>\n <td style=\"text-align:center\">$Qr<br/>No.{$Service->getRadicado()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n\n <tr>\n <td colspan=\"2\">ASUNTO: $this->asunto</td>\n </tr>\n\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n\n <tr>\n <td colspan=\"2\">Cordial saludo:</td>\n </tr>\n \n <tr>\n <td colspan=\"2\"> </td>\n </tr>\n </tbody>\n </table>\n $contenido\n <p>{$Service->getDespedida()}<br/><br/></p>\n $firmas\n <p>{$Service->getOtherData()}</p>\nHTML;\n\n }",
"public function actionGenerateBarcode() \n {\n\t\t$inputCode = Yii::app()->request->getParam(\"code\", \"\");\n\t\t$bc = new BarcodeGenerator;\n\t\t$bc->init('png');\n\t\t$bc->build($inputCode);\n }",
"function generateQRImageTag( $identifier){\n\n ob_start();\n QRCode::png($identifier,false,'L',9,2);\n $imageString = base64_encode(ob_get_clean());\n return '<img src =\"data:image/png;base64,'.$imageString.'\"/>';\n }",
"function generateQrcode($selectedProductId)\r\n \t{\r\n \t\t$ProductId = implode(',',$selectedProductId);\r\n \t\t$model\t\t= &$this->getModel();\r\n \t\t$productDetails = $model->getCategoryByProduct($ProductId);\r\n \t\t$qrcodeImagePath = JPATH_ROOT.DS . 'images'.DS.'qrcode';\r\n if ( !is_dir($qrcodeImagePath) )\r\n\t\t\t{\r\n\t\t\t\tmkdir($qrcodeImagePath,0777,true);\r\n\t\t\t}\r\n \t\tfor($i = 0;$i <count($productDetails);$i++)\r\n \t\t{\r\n \t\t\t$qrcodeProductId = $selectedProductId[$i];\r\n \t\t\t$qrcodeCategoryId = $productDetails[$i][0];\r\n \t\t\t$qrcodeImageContent = urlencode(JURI::root().(\"index.php?option=com_virtuemart&page=shop.product_details&product_id=$qrcodeProductId&category_id=$qrcodeCategoryId\"));\r\n \t\t\t$imageName = $qrcodeProductId.'.png';\r\n\t\t\t\t$qrcodeImage[] = $qrcodeProductId.'.png';\r\n\t\t\t\t// save image in configured image uploads folder \r\n\t\t\t\t$imagePath = $qrcodeImagePath . DS . $imageName;\r\n\t\t\t\t\t \r\n\t\t\t\t$size = \"500x500\";\r\n\t\t\t\t$image_url_qr = \"https://chart.googleapis.com/chart?cht=qr&chs=$size&chl=$qrcodeImageContent\";\r\n\t\t\t\t\r\n\t\t\t\tif(function_exists('curl_init'))\r\n\t\t\t\t{\r\n\t\t\t\t$curl_handle=curl_init();\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$image_url_qr);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,true);\r\n\t\t\t\tcurl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t\t\t$returnData = curl_exec($curl_handle);\r\n\t\t\t\tcurl_close($curl_handle);\r\n\t\t\t\t\r\n\t\t\t\t$imageContent = $returnData;\r\n\t\t\t\t\t\t\r\n\t\t\t\t$imageLocation = fopen($imagePath , 'w');\r\n\t\t\t\tchmod($imagePath , 0777);\r\n\t\t\t\t$fp = fwrite($imageLocation, $imageContent);\r\n\t\t\t\tfclose($imageLocation);\r\n\t\t\t\t$errorMessage = JText::_('COM_QRCODE_CONTROLLER_GENERATE_QRCODE_SUCCESS');\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t$errorMessage = JError::raiseWarning('',\"COM_QRCODE_CONTROLLER_ENABLE_CURL\");\r\n\t\t\t\t}\t\t\t\t\t\r\n \t\t}\r\n \t\tif($fp)//If image content write to folder, then store the value in database.\r\n\t\t\t$model->storeQrcodeDetails($selectedProductId,$qrcodeImage);\r\n\t\t\treturn $errorMessage;\r\n \t}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"public function CreateQR($cinema,$purchase,$number){\n $room=$cinema->getCinemaRoomList()[0];\n $function=$room->getFunctionList()[0];\n $movie=$function->getMovie();\n $QR=\"https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=\".$cinema->getCinemaName().\"/\".$cinema->getIdCinema().\"/\".$room->getRoomName().\"/\".$room->getIdCinemaRoom().\"/\".$function->getIdFunction().\"/\".$function->getDate().\"/\".$function->getTime().\"/\".$purchase->getIdPurchase().\"/\".$movie->getMovieName().\"/\".$movie->getIdMovie().\"/\".$number.\"&choe=UTF-8\";\n $QR=str_replace(\" \",\"-\",$QR);\n return $QR;\n }",
"public static function generarCodBarras()\n {\n $ultimocod = Producto::orderBy(\"codigobarra\", \"DESC\")->first()->codigobarra;\n if ($ultimocod == null && strlen($ultimocod) == 0) {\n $ultimocod = 0;\n }\n $ultimocod++;\n $lista = Producto::where(\"codigobarra\", \"=\", \"\")->orderBy(\"nombre\", \"ASC\")->get();\n foreach ($lista as $key => $producto) {\n $producto->codigobarra = str_pad($ultimocod, 5, '0', STR_PAD_LEFT);\n $producto->barcode = DNS1D::getBarcodeHTML($producto->codigobarra, 'C128', 2, 40, 'black');\n $producto->save();\n $ultimocod++;\n }\n }",
"public function run()\n {\n $htmlArray = [];\n $htmlArray[] = Html::tag('h1', $this->title, array_merge(['class'=>'contract'], $this->titleOptions));\n $marginTop = -33;\n if (!empty($this->subtitle)) {\n $htmlArray[] = Html::tag('h2', $this->subtitle, array_merge(['class'=>'contract'], $this->subTitleOptions));\n $marginTop = -60;\n }\n \n $barCodeId = \"{$this->_idPrefix}barcode_order_{$this->_autoId}\";\n \n $htmlArray[] = Html::beginTag('div', ['style'=>\"width:100%;height:66px;display:block;vertical-align:center;margin:{$marginTop}px 0px 0px 0px;float:left\"]);\n $htmlArray[] = Html::tag('div', Html::img($this->logoUrl, ['style'=>\"width:180px;vertical-align:center\"]), ['style'=>\"display:block;vertical-align:center;float:left;height:66px\"]);\n $htmlArray[] = Html::beginTag('div', ['style'=>\"display:block;align:center;float:center;text-align:center\"]);\n $htmlArray[] = Html::endTag('div');\n $htmlArray[] = Html::tag('div', '', ['id'=>$barCodeId, 'style'=>\"display:block;float:right;height:66px\"]);\n $htmlArray[] = Html::endTag('div');\n \n $htmlArray[] = \\common\\helpers\\BarcodeGenerator::widget([\n 'elementId' => $barCodeId,\n 'type' => 'code39',\n 'value' => $this->serial,\n ]);\n \n return implode(\"\\n\", $htmlArray);\n }",
"public function QRcode($kodenya)\n\t\t{\n\t\t QRcode::png(\n\t\t $kodenya,\n\t\t $outfile = false,\n\t\t $level = QR_ECLEVEL_H,\n\t\t $size = 6,\n\t\t $margin = 2\n\t\t );\n\t\t}",
"public function generateCerfiticateDrone($nomor_drone,$drones,$nama,$id_user) {\n $dompdf = new Dompdf();\n $qrCode = new QrCode();\n\n $url = url('/').'/drone/confirm/'.$nomor_drone;\n $qrCode\n ->setText($url)\n ->setSize(250)\n ->setPadding(10)\n ->setErrorCorrection('high')\n ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))\n ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))\n // ->setLabel('QR Code Remote Pilot')\n ->setLabelFontSize(16)\n ->setImageType(QrCode::IMAGE_TYPE_PNG)\n ;\n\n $dompdf->loadHtml('\n <div class=\"\">\n <img style=\"top:-50px; position: fixed; left:50px;\" width=\"100%\" height=\"10%\" src=\"'.public_path('sertif/1.png').'\" alt=\"\">\n <br>\n <div style=\"position: absolute; height: 80%; width: 80%; top: 20%; left: 10%;\">\n <center>\n <br>\n <h1>Certificate of Drones</h1>\n <br>\n\n <h2>'.$drones->serial_number.' <br> Registered To : '.$nama.'</h2>\n\n <br>\n <br>\n\n <p>Has successfully completed Qualification for Drone.</p>\n <br>\n <br>\n <img height=\"100px\" src=\"'.public_path('sertif/dju.png').'\" alt=\"\">\n </center>\n </div>\n <img style=\"position: absolute; top: 70%; left: 60%;\" width=\"100px\" src=\"'.public_path('sertif/nama.png').'\" alt=\"\">\n <img style=\"position: absolute; top: 71%; left: 58%;\" width=\"150px\" src=\"'.public_path('sertif/line.png').'\" alt=\"\">\n <img style=\"position: absolute; top: 71%; left: 60%;\" height=\"100px\" src=\"'.public_path('sertif/ttd.png').'\" alt=\"\">\n\n <img style=\"position: absolute; top: 68%; left: 30%;\" height=\"100px\" src=\"data:'.$qrCode->getContentType().';base64,'.$qrCode->generate().'\">\n\n <img style=\"position: absolute; bottom:0%; left:-50px; right:-50px; top: 87%;\" width=\"100%\" height=\"10%\" src=\"'.public_path('sertif/2.png').'\" alt=\"\">\n </div>\n ');\n\n $dompdf->setPaper('A4', 'landscape');\n\n $dompdf->set_option('isHtml5ParserEnabled', true);\n $dompdf->set_option('isRemoteEnabled', true);\n\n $dompdf->render();\n\n $pdf_gen = $dompdf->output();\n\n $tujuan_upload = public_path().'/sertifikasi/drone/'.$id_user;\n //make the folder :\n if (!is_dir($tujuan_upload)) {\n mkdir($tujuan_upload, 0777, true);\n }\n $nama_file = 'Sertifikat_'.$nomor_drone.'.pdf';\n\n if(!file_put_contents($tujuan_upload.'/'.$nama_file, $pdf_gen) ) {\n return 'false';\n }\n else{\n return url('/').'/sertifikasi/drone/'.$id_user.'/'.$nama_file;\n }\n }",
"public function getEncode()\n {\n\n //dd($zencoder->encode('aa975198d110f86880536cb33136790c216a8cf6.mp4'));\n\n $ffmpeg = new FFMPEG('4f7ef9683ea0df7eb4d07b4a415cbe94595e49c5.mp4');\n //$ffmpeg->encode();\n\n dd($ffmpeg->createThumbnail());\n }",
"public function generarBC($codigoProducto,$tipo){\n \t $barra = new DNS1D();\n \t $usuario=Auth::user()->name;\n \t $producto=Producto::where('codigo',$codigoProducto)->first();\n \t $codigo=$codigoProducto;\n\n $view = \\View::make('codigoBarras.vistaBC', compact('barra','codigo','usuario','producto'))->render();\n $pdf = \\App::make('dompdf.wrapper');\n $pdf->loadHTML($view);//->setPaper('a4', 'landscape');\n if ($tipo==1) {\n \treturn $pdf->stream('Codigo de barras');\n }elseif ($tipo==2) {\n \treturn $pdf->download('Codigo de barras');\n }\n \t //dd($producto);\n \t //return view('codigoBarras.vistaBC')->with('barra',$barra)->with('codigo',$codigoProducto)->with('usuario',$usuario)->with('nombre',$nombre)->with('producto',$producto);\n\n \t //echo DNS1D::getBarcodeHTML(\"4445\", \"EAN13\");\n \t //y si lo vamos a imprimir, ya no seria con getBarcodeHTML sino con getBarcodeSVG\n }",
"function phpfmg_formini(){\r\n return \"ZXNoX2Zvcm1tYWlsX2RvbWFpbm5hbWUJCmVzaF9mb3JtbWFpbF9kZXNjcmlwdGlvbgkKZXNoX2Zvcm1tYWlsX2Zvb3RlcgkKZXNoX2Zvcm1tYWlsX2ZpZWxkX251bXMJMTUKZXNoX2Zvcm1tYWlsX3JlY2lwaWVudAlzZWNyZXRhcmlhQGVpc3RlZGRmb2Qub3JnLmFyCmVzaF9wYXNzd29yZAkKZXNoX3lvdXJfbmFtZQkKZXNoX2Zvcm1tYWlsX2NjCXNlY3JldGFyaWFAZWlzdGVkZGZvZC5vcmcuYXIsIHdlYm1hc3RlckBlaXN0ZWRkZm9kLm9yZy5hcgplc2hfZm9ybW1haWxfYmNjCQplc2hfZm9ybW1haWxfc3ViamVjdAlJbnNjcmlwY2nDs24gZW50cmFudGUKZXNoX21haWxfdHlwZQlodG1sCmVzaF9mb3JtbWFpbF9yZWRpcmVjdAkKZXNoX2Zvcm1tYWlsX3JldHVybl9lbWFpbAkKZXNoX2Zvcm1tYWlsX3JldHVybl9tc2cJCmVzaF9mb3JtbWFpbF9jb25maXJtX21zZwnCoVNlIGhhIGVudmlhZG8gbGEgSW5zY3JpcGNpw7NuITwhLS1lc2hfbmV3bGluZS0tPk5vcyBjb211bmljYXJlbW9zIGVuIGxhcyBwcsOzeGltYXMgNzIgaG9yYXMgcGFyYSBjb25maXJtYXIgbGEgbWlzbWEgYWwgZW1haWwgcXVlIG5vcyBicmluZMOzLjwhLS1lc2hfbmV3bGluZS0tPk11Y2hhcyBncmFjaWFzITwhLS1lc2hfbmV3bGluZS0tPjwhLS1lc2hfbmV3bGluZS0tPi0tPCEtLWVzaF9uZXdsaW5lLS0+V2VibWFzdGVyPCEtLWVzaF9uZXdsaW5lLS0+RWlzdGVkZGZvZCBkZWwgQ2h1YnV0PCEtLWVzaF9uZXdsaW5lLS0+LS08IS0tZXNoX25ld2xpbmUtLT5MYSB2ZXJkYWQgZnJlbnRlIGFsIG11bmRvLgplc2hfZm9ybW1haWxfcmV0dXJuX3N1YmplY3QJCmVzaF9yZXR1cm5fbm9fYXR0YWNobWVudAkKZXNoX21haWxfdGVtcGxhdGUJCmVzaF9mb3JtbWFpbF9jaGFyc2V0CQplc2hfYWN0aW9uCW1haWxhbmRmaWxlCmVzaF9vbmVfZW50cnkJCmVzaF9vbmVfZW50cnlfbWV0aG9kCQplc2hfb25lX2VudHJ5X21zZwlXZSBmb3VuZCB5b3VyICVFbnRyeSUgaW4gb3VyIHJlY29yZHMuIE11bHRpcGxlIHN1Ym1pc3Npb25zIG5vdCBhY2NlcHRlZC4KZXNoX3RleHRfYWxpZ24JdG9wCmVzaF9zYXZlQXR0YWNobWVudHMJCmVzaF9ub19mcm9tX2hlYWRlcgkKZXNoX3NlY3VyaXR5X2ltYWdlCVkKZXNoX3VzZV9yZWNhcHRjaGEJCnNlbmRtYWlsX2Zyb20JCnNlbmRtYWlsX2Zyb20yCQplc2hfdXNlX3BocG1haWxlcgkKZXNoX3VzZV9zbXRwCQplc2hfc210cF9ob3N0CQplc2hfc210cF91c2VyCQplc2hfc210cF9wYXNzd29yZAkKZXNoX3NtdHBfcG9ydAkKZXNoX3NtdHBfc2VjdXJpdHkJCmVzaF9zbXRwX2RlYnVnX2xldmVsCQplc2hfYmxvY2tfaGFybWZ1bAkKZXNoX2hhcm1mdWxfZXh0cwkucGhwLCAuaHRtbCwgLmNzcywgLmpzLCAuZXhlLCAuY29tLCAuYmF0LCAudmIsIC52YnMsIHNjciwgLmluZiwgLnJlZywgLmxuaywgLnBpZiwgLmFkZSwgLmFkcCwgLmFwcCwgLmJhcywgLmNobSwgLmNtZCwgLmNwbCwgLmNydCwgLmNzaCwgLmZ4cCwgLmhscCwgLmh0YSwgLmlucywgLmlzcCwgLmpzZSwgLmtzaCwgLkxuaywgLm1kYSwgLm1kYiwgLm1kZSwgLm1kdCwgLm1kdywgLm1keiwgLm1zYywgLm1zaSwgLm1zcCwgLm1zdCwgLm9wcywgLnBjZCwgLnByZiwgLnByZywgLnBzdCwgLnNjZiwgLnNjciwgLnNjdCwgLnNoYiwgLnNocywgLnVybCwgLnZiZSwgLndzYywgLndzZiwgLndzaAplc2hfYWxsb3dfZXh0cwkuanBnLCAuZ2lmLCAucG5nLCAuYm1wCmVzaF91cGxvYWRfY29udHJvbAkKZXNoX2FudGlfaG90bGlua2luZwkKZXNoX3JlZmVyZXJzX2FsbG93CQplc2hfcmVmZXJlcnNfZGVuaWVkX21zZwkKZXNoX2ZpbGUybGlua19zaXplCQpOb21icmUsIFNldWRvbmltbywgbyBEZW5vbWluYWNpb24JZmllbGRfMAlTZW5kZXJGaXJzdE5hbWUJCVJlcXVpcmVkCUluZ3Jlc2Ugc3Ugbm9tYnJlCkFwZWxsaWRvCWZpZWxkXzEJU2VuZGVyTGFzdE5hbWUJCQlJbmdyZXNlIHN1IGFwZWxsaWRvIChlbiBjYXNvIGRlIHNlciBjb3JvLCBkZWphciBlbiBibGFuY28pCk5hY2lvbmFsaWRhZAlmaWVsZF8yCVRleHQJQ2hvaWNlIDF8Q2hvaWNlIDJ8Q2hvaWNlIDMJUmVxdWlyZWQJUGHDrXMgbyBFc3RhZG8gTmFjaW9uYWwgZGVsIHF1ZSBwcm92aWVuZQpQcm92aW5jaWEJZmllbGRfMwlUZXh0CQkJUHJvdmluY2lhIG8gRXN0YWRvIFByb3ZpbmNpYWwgKGludGVybWVkaW8pCkNpdWRhZAlmaWVsZF80CVRleHQJCVJlcXVpcmVkCUNpdWRhZCBvIE11bmljaXBpbyBhbCBxdWUgcGVydGVuZWNlCkROSQlmaWVsZF81CVRleHQJCQlTb2xvIGVuIGNhc28gZGUgc2VyIHVuYSBzb2xhIHBlcnNvbmEKRmVjaGEgZGUgTmFjaW1pZW50bwlmaWVsZF82CURhdGUJeyJzdGFydFllYXIiOiI5OSIsImVuZFllYXIiOiIwIiwiZm9ybWF0IjoiZGQvbW0veXl5eSIsInNlcGFyYXRvciI6Ii8iLCJtb250aCI6Ii1NTS0gPSx8MDF8MDJ8MDN8MDR8MDV8MDZ8MDd8MDh8MDl8MTB8MTF8MTIiLCJtbV9vcHQiOiJudW0iLCJkYXkiOiItREQtID0sfDAxfDAyfDAzfDA0fDA1fDA2fDA3fDA4fDA5fDEwfDExfDEyfDEzfDE0fDE1fDE2fDE3fDE4fDE5fDIwfDIxfDIyfDIzfDI0fDI1fDI2fDI3fDI4fDI5fDMwfDMxIiwiZGRfb3B0IjoibnVtIn0JCUZlY2hhIGVuIGxhIHF1ZSBuYWNpw7MgKGVuIGNhc28gZGUgc2VyIHVuYSBzb2xhIHBlcnNvbmEpClNlY3Rpb24gQnJlYWsgVGV4dCBHb2VzIEhlcmUJZmllbGRfNwlTZWN0aW9uQnJlYWsJCQkKVGVsZWZvbm8gZGUgcmVmZXJlbmNpYQlmaWVsZF84CVRleHQJCQkKRW1haWwJZmllbGRfOQlHZW5lcmljIGVtYWlsCQlSZXF1aXJlZAkKRGlyZWNjaW9uIFBvc3RhbAlmaWVsZF8xMAlUZXh0CU1yLnxNcnMufE1zLnxNaXNzCQkKQ29tcGV0ZW5jaWEgYSBpbnNjcmliaXJzZQlmaWVsZF8xMQlUZXh0CQlSZXF1aXJlZAkKQWxndW5hIG9ic2VydmFjaW9uCWZpZWxkXzEyCVRleHRBcmVhCQkJSW5ncmVzZSBzb2xvIGFxdWVsbG9zIGRhdG9zIHF1ZSBjb25zaWRlcmUgcmVsZXZhbnRlcwo=\";\r\n}",
"abstract protected function getTCPDFBarcode();",
"public function encode()\n {\n }",
"public function QRcode($kodenya){\n QRcode::png(\n $kodenya,\n $outfile = false,\n $level = QR_ECLEVEL_H,\n $size = 10,\n $margin = 1\n );\n }",
"public function codiceqr($testo,$larghezza=150){\n\t\t$testo=urlencode($testo);\n\t\treturn '<img src=\"https://chart.googleapis.com/chart?chs='.$larghezza.'x'.$larghezza.'&cht=qr&chl='.$testo.'&choe=UTF-8\" alt=\"codice QR\">';\n\t}"
]
| [
"0.6209538",
"0.59599036",
"0.58564454",
"0.57883894",
"0.57696843",
"0.5765846",
"0.5729959",
"0.5686736",
"0.5596861",
"0.5547655",
"0.55446106",
"0.5522725",
"0.5508945",
"0.5497635",
"0.5485846",
"0.5479005",
"0.5470509",
"0.5469289",
"0.54313016",
"0.537364",
"0.5369415",
"0.5367838",
"0.5363806",
"0.53197074",
"0.5312642",
"0.5311362",
"0.53027576",
"0.52842355",
"0.5280699",
"0.52697164"
]
| 0.71873707 | 0 |
This GLA computes the page ranks of a graph given the edge set as inputs. The algorithm runs with O(V) space and O(I E) time, where V is the total number of vertices; E, the total number of edges; and I, the number of iterations. The input should be two integers specifying source and target vertices. The output is vertex IDs and their page rank, expressed as a float. Template Args: adj: Whether the edge count and page rank of a given vertex should be stored adjacently. Doing so reduced random lookups but increases update time. Resources: armadillo: various data structures algorithm: max | function Page_Rank($t_args, $inputs, $outputs)
{
// Class name is randomly generated.
$className = generate_name('PageRank');
// Initializiation of argument names.
$inputs_ = array_combine(['s', 't'], $inputs);
$vertex = $inputs_['s'];
// Processing of template arguments.
$adj = $t_args['adj'];
$debug = get_default($t_args, 'debug', 1);
// Construction of outputs.
$outputs_ = ['node' => $vertex, 'rank' => lookupType('float')];
$outputs = array_combine(array_keys($outputs), $outputs_);
$sys_headers = ['armadillo', 'algorithm'];
$user_headers = [];
$lib_headers = [];
$libraries = ['armadillo'];
$properties = [];
$extra = [];
$result_type = ['fragment'];
?>
using namespace arma;
using namespace std;
class <?=$className?>;
<? $constantState = lookupResource(
'statistics::Page_Rank_Constant_State',
['className' => $className]
); ?>
class <?=$className?> {
public:
// The constant state for this GLA.
using ConstantState = <?=$constantState?>;
// The current and final indices of the result for the given fragment.
using Iterator = std::pair<int, int>;
// The value of the damping constant used in the page rank algorithm.
static const constexpr float kDamping = 0.85;
// The number of iterations to perform, not counting the initial set-up.
static const constexpr int kIterations = 20;
// The work is split into chunks of this size before being partitioned.
static const constexpr int kBlock = 32;
// The maximum number of fragments to use.
static const constexpr int kMaxFragments = 64;
private:
<? if ($adj) { ?>
// The edge weighting and page rank are stored side-by-side. This will make
// updating the page ranks more costly but reduces random lookups. The weight
// is the precomputed inverse of the number of edges for that vertex.
static arma::mat info;
<? } else { ?>
// The edge weighting for each vertex. The weight is the precomputed inverse
// of the number of edges for that vertex.
static arma::rowvec weight;
// The page-rank for each vertex.
static arma::rowvec rank;
<? } ?>
// The value of the summation over adjacent nodes for each vertex.
static arma::rowvec sum;
// The typical constant state for an iterable GLA.
const ConstantState& constant_state;
// The number of unique nodes seen.
long num_nodes;
// The current iteration.
int iteration;
// The number of fragmetns for the result.
int num_fragments;
public:
<?=$className?>(const <?=$constantState?>& state)
: constant_state(state),
num_nodes(state.num_nodes),
iteration(state.iteration) {
auto state_copy = const_cast<<?=$constantState?>&>(state);
cout << "Time taken for iteration: " << iteration << ": " << state_copy.timer.toc() << endl;
}
void AddItem(<?=const_typed_ref_args($inputs_)?>) {
if (iteration == 0) {
num_nodes = max((long) max(s, t), num_nodes);
return;
} else if (iteration == 1) {
<? if ($adj) { ?>
info(1, s)++;
<? } else { ?>
weight(s)++;
<? } ?>
} else {
<? if ($adj) { ?>
sum(t) += prod(info.col(s));
<? } else { ?>
sum(t) += weight(s) * rank(s);
<? } ?>
}
}
void AddState(<?=$className?> &other) {
if (iteration == 0)
num_nodes = max(num_nodes, other.num_nodes);
}
// Most computation that happens at the end of each iteration is parallelized
// by performing it inside Finalize.
bool ShouldIterate(ConstantState& state) {
state.iteration = ++iteration;
<? if ($debug > 0) { ?>
cout << "finished iteration " << iteration << endl;
<? } ?>
if (iteration == 1) {
// num_nodes is incremented because IDs are 0-based.
state.num_nodes = ++num_nodes;
<? if ($debug > 0) { ?>
cout << "num_nodes: " << num_nodes << endl;
<? } ?>
// Allocating space can't be parallelized.
sum.set_size(num_nodes);
<? if ($adj) { ?>
info.set_size(2, num_nodes);
info.row(0).fill(1);
<? } else { ?>
rank.set_size(num_nodes);
weight.set_size(num_nodes);
rank.fill(1);
<? } ?>
return true;
} else {
<? if ($debug > 1) { ?>
cout << "weights: " << accu(info.row(1)) << endl;
cout << "sum: " << accu(sum) << endl;
cout << "pr: " << accu(info.row(0)) << endl;
<? } ?>
return iteration < kIterations + 1;
}
}
int GetNumFragments() {
long size = (num_nodes - 1) / kBlock + 1; // num_nodes / kBlock rounded up.
num_fragments = (iteration == 0) ? 0 : min(size, (long) kMaxFragments);
<? if ($debug > 0) { ?>
cout << "# nodes: " << num_nodes << endl;
cout << "kBlock: " << kBlock << endl;
cout << "# fragments: " << size << endl;
cout << "Returning " << num_fragments << " fragments" << endl;
<? } ?>
return num_fragments;
}
// The fragment is given as a long so that the below formulas don't overflow.
Iterator* Finalize(long fragment) {
long count = num_nodes;
// The ordering of operations is important. Don't change it.
long first = fragment * (count / kBlock) / num_fragments * kBlock;
long final = (fragment == num_fragments - 1)
? count - 1
: (fragment + 1) * (count / kBlock) / num_fragments * kBlock - 1;
<? if ($debug > 0) { ?>
printf("Fragment %ld: %ld - %ld\n", fragment, first, final);
<? } ?>
if (iteration == 2) {
<? if ($adj) { ?>
info.row(0).subvec(first, final).fill(1);
info.row(1).subvec(first, final) = pow(info.row(1).subvec(first, final), -1);
<? } else { ?>
rank.subvec(first, final).fill(1);
weight.subvec(first, final) = 1 / weight.subvec(first, final);
<? } ?>
sum.subvec(first, final).fill(0);
} else {
<? if ($adj) { ?>
info.row(0).subvec(first, final) = (1 - kDamping)
+ kDamping * sum.subvec(first, final);
<? } else { ?>
rank.subvec(first, final) = (1 - kDamping)
+ kDamping * sum.subvec(first, final);
<? } ?>
sum.subvec(first, final).zeros();
}
return new Iterator(first, final);
}
bool GetNextResult(Iterator* it, <?=typed_ref_args($outputs_)?>) {
if (iteration < kIterations + 1)
return false;
if (it->first > it->second)
return false;
node = it->first;
<? if ($adj) { ?>
rank = info(0, it->first);
<? } else { ?>
rank = rank(it->first);
<? } ?>
it->first++;
return true;
}
};
// Initialize the static member types.
<? if ($adj) { ?>
arma::mat <?=$className?>::info;
<? } else { ?>
arma::rowvec <?=$className?>::weight;
arma::rowvec <?=$className?>::rank;
<? } ?>
arma::rowvec <?=$className?>::sum;
typedef <?=$className?>::Iterator <?=$className?>_Iterator;
<?
return [
'kind' => 'GLA',
'name' => $className,
'system_headers' => $sys_headers,
'user_headers' => $user_headers,
'lib_headers' => $lib_headers,
'libraries' => $libraries,
'properties' => $properties,
'extra' => $extra,
'iterable' => true,
'intermediates' => true,
'input' => $inputs,
'output' => $outputs,
'result_type' => $result_type,
'generated_state' => $constantState,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function galaxy_show_ranking_ally() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval, $pub_suborder;\n\n\tif (!check_var($pub_order_by, \"Char\") || !check_var($pub_date, \"Num\") || !check_var($pub_interval, \"Num\") || !check_var($pub_suborder, \"Char\")) {\n\t\tredirection(\"index.php?action=message&id_message=errordata&info\");\n\t}\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (isset($pub_suborder) && $pub_suborder == \"member\") $pub_order_by2 = \"points_per_member desc\";\n\telse $pub_order_by2 = \"rank\";\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by \".$pub_order_by2;\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $ally;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where ally = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $ally;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}",
"public function getPageNumbers();",
"function getPageNavigation($hits, $page, $max, $min=1) {\n $nav = \"<a href='\" . getQueryString(array('page' => $min)) . \"'><<</a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . \"'><</a> \";\n \n for($i=$min; $i<=$max; $i++) {\n $nav .= \"<a href='\" . getQueryString(array('page' => $i)) . \"'>$i</a> \";\n }\n \n $nav .= \"<a href='\" . getQueryString(array('page' => ($page < $max ? $page + 1 : $max) )) . \"'>></a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => $max)) . \"'>>></a> \";\n return $nav;\n}",
"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 linkRgaa($matches) {\n\t$rgaa = array(\n'1.1' => 'http://rgaa.net/1-1-Absence-de-cadres-non-titres.html',\n'1.2' => 'http://rgaa.net/Pertinence-des-titres-donnes-aux.html',\n'2.1' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la.html',\n'2.2' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,4.html',\n'2.3' => 'http://rgaa.net/Presence-d-un-moyen-de.html',\n'2.4' => 'http://rgaa.net/Presence-d-un-moyen-de,6.html',\n'2.5' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du.html',\n'2.6' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,8.html',\n'2.7' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,9.html',\n'2.8' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,10.html',\n'2.9' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,11.html',\n'2.10' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,12.html',\n'2.11' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,13.html',\n'2.12' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,14.html',\n'2.13' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,15.html',\n'2.14' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,16.html',\n'2.15' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,17.html',\n'2.16' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,18.html',\n'3.1' => 'http://rgaa.net/Possibilite-d-identifier-les.html',\n'3.2' => 'http://rgaa.net/Presence-d-information-prealable.html',\n'3.3' => 'http://rgaa.net/Positionnement-correct-des.html',\n'3.4' => 'http://rgaa.net/Regroupement-d-elements-de.html',\n'3.5' => 'http://rgaa.net/Absence-d-element-fieldset-sans.html',\n'3.6' => 'http://rgaa.net/Pertinence-du-contenu-de-l-element.html',\n'3.7' => 'http://rgaa.net/Regroupement-d-elements-option.html',\n'3.8' => 'http://rgaa.net/Presence-d-un-attribut-label-sur-l.html',\n'3.9' => 'http://rgaa.net/Pertinence-du-contenu-de-l.html',\n'3.10' => 'http://rgaa.net/Absence-d-element-de-formulaire.html',\n'3.11' => 'http://rgaa.net/Absence-d-element-de-formulaire,29.html',\n'3.12' => 'http://rgaa.net/Pertinence-des-etiquettes-d.html',\n'3.13' => 'http://rgaa.net/Presence-d-informations-ou-de.html',\n'3.14' => 'http://rgaa.net/Presence-de-mecanismes-permettant.html',\n'3.15' => 'http://rgaa.net/Presence-de-mecanismes-permettant,33.html',\n'3.16' => 'http://rgaa.net/Presence-d-une-page-d-aide-ou-d-un.html',\n'4.1' => 'http://rgaa.net/Presence-de-l-attribut-alt.html',\n'4.2' => 'http://rgaa.net/Pertinence-de-l-alternative.html',\n'4.3' => 'http://rgaa.net/Pertinence-de-l-alternative,37.html',\n'4.4' => 'http://rgaa.net/Pertinence-de-l-alternative,38.html',\n'4.5' => 'http://rgaa.net/Pertinence-de-l-alternative-vide.html',\n'4.6' => 'http://rgaa.net/Longueur-du-contenu-des.html',\n'4.7' => 'http://rgaa.net/Existence-d-une-description-longue.html',\n'4.8' => 'http://rgaa.net/Pertinence-de-la-description.html',\n'4.9' => 'http://rgaa.net/Presence-de-l-attribut-longdesc.html',\n'4.10' => 'http://rgaa.net/Presence-d-une-information-de.html',\n'4.11' => 'http://rgaa.net/Coherence-dans-l-identification.html',\n'5.1' => 'http://rgaa.net/Acces-a-une-information.html',\n'5.2' => 'http://rgaa.net/Presence-de-la-transcription.html',\n'5.3' => 'http://rgaa.net/Pertinence-de-la-transcription.html',\n'5.4' => 'http://rgaa.net/Presence-d-une-description-audio.html',\n'5.5' => 'http://rgaa.net/Pertinence-de-la-description-audio.html',\n'5.6' => 'http://rgaa.net/Possibilite-de-controler-l.html',\n'5.7' => 'http://rgaa.net/Presence-d-une-description-audio,52.html',\n'5.8' => 'http://rgaa.net/Presence-d-une-description-audio,53.html',\n'5.9' => 'http://rgaa.net/Presence-du-sous-titrage.html',\n'5.10' => 'http://rgaa.net/Pertinence-du-sous-titrage.html',\n'5.11' => 'http://rgaa.net/Presence-d-une-alternative-aux.html',\n'5.12' => 'http://rgaa.net/Presence-d-une-alternative-aux,57.html',\n'5.13' => 'http://rgaa.net/Absence-d-elements-provoquant-des.html',\n'5.14' => 'http://rgaa.net/Absence-de-code-javascript,59.html',\n'5.15' => 'http://rgaa.net/Absence-de-mise-en-forme.html',\n'5.16' => 'http://rgaa.net/Compatibilite-des-elements.html',\n'5.17' => 'http://rgaa.net/Absence-totale-de-changements.html',\n'5.18' => 'http://rgaa.net/Presence-du-sous-titrage,63.html',\n'5.19' => 'http://rgaa.net/Absence-de-l-element-blink.html',\n'5.20' => 'http://rgaa.net/Absence-d-elements-provoquant-des,65.html',\n'5.21' => 'http://rgaa.net/Absence-de-code-javascript,66.html',\n'5.22' => 'http://rgaa.net/Absence-de-mise-en-forme,67.html',\n'5.23' => 'http://rgaa.net/Absence-d-element-marquee.html',\n'5.24' => 'http://rgaa.net/Absence-d-elements-affichant-des.html',\n'5.25' => 'http://rgaa.net/Absence-de-code-javascript,70.html',\n'5.26' => 'http://rgaa.net/Absence-de-mise-en-forme,71.html',\n'5.27' => 'http://rgaa.net/Independance-du-peripherique-d.html',\n'5.28' => 'http://rgaa.net/Presence-d-une-alternative-aux,73.html',\n'5.29' => 'http://rgaa.net/Absence-d-elements-declenchant-la.html',\n'5.30' => 'http://rgaa.net/Absence-d-element-bgsound.html',\n'5.31' => 'http://rgaa.net/Presence-de-version-en-langue-des.html',\n'5.32' => 'http://rgaa.net/Pertinence-de-la-version-en-langue.html',\n'5.33' => 'http://rgaa.net/Niveau-sonore-de-la-piste-de.html',\n'5.34' => 'http://rgaa.net/Presence-d-un-mecanisme-pour.html',\n'6.1' => 'http://rgaa.net/Acces-aux-liens-textuels-doublant.html',\n'6.2' => 'http://rgaa.net/Presence-d-un-avertissement.html',\n'6.3' => 'http://rgaa.net/Presence-d-un-avertissement,82.html',\n'6.4' => 'http://rgaa.net/Presence-d-un-avertissement,83.html',\n'6.5' => 'http://rgaa.net/Absence-d-ouverture-de-nouvelles.html',\n'6.6' => 'http://rgaa.net/Absence-de-piege-lors-de-la.html',\n'6.7' => 'http://rgaa.net/Absence-d-element-meta-provoquant.html',\n'6.8' => 'http://rgaa.net/Absence-de-code-javascript.html',\n'6.9' => 'http://rgaa.net/Absence-d-elements-provoquant-un.html',\n'6.10' => 'http://rgaa.net/Absence-d-element-meta-provoquant,89.html',\n'6.11' => 'http://rgaa.net/Absence-de-code-javascript,90.html',\n'6.12' => 'http://rgaa.net/Absence-d-elements-provoquant-une.html',\n'6.13' => 'http://rgaa.net/Possibilite-d-identifier-la.html',\n'6.14' => 'http://rgaa.net/Possibilite-d-identifier-la,93.html',\n'6.15' => 'http://rgaa.net/Coherence-de-la-destination-ou-de.html',\n'6.16' => 'http://rgaa.net/Absence-de-liens-sans-intitule.html',\n'6.17' => 'http://rgaa.net/Presence-d-une-page-contenant-le.html',\n'6.18' => 'http://rgaa.net/Coherence-du-plan-du-site.html',\n'6.19' => 'http://rgaa.net/Presence-d-un-acces-a-la-page.html',\n'6.20' => 'http://rgaa.net/Presence-d-un-fil-d-ariane.html',\n'6.21' => 'http://rgaa.net/Presence-de-menus-ou-de-barres-de.html',\n'6.22' => 'http://rgaa.net/Coherence-de-la-position-des-menus.html',\n'6.23' => 'http://rgaa.net/Coherence-de-la-presentation-des.html',\n'6.24' => 'http://rgaa.net/Navigation-au-clavier-dans-un.html',\n'6.25' => 'http://rgaa.net/Presence-d-un-avertissement,104.html',\n'6.26' => 'http://rgaa.net/Presence-des-informations-de.html',\n'6.27' => 'http://rgaa.net/Presence-des-informations-de-poids.html',\n'6.28' => 'http://rgaa.net/Presence-des-informations-de,107.html',\n'6.29' => 'http://rgaa.net/Presence-de-regroupement-pour-les.html',\n'6.30' => 'http://rgaa.net/Presence-d-un-balisage-permettant.html',\n'6.31' => 'http://rgaa.net/Presence-de-liens-d-evitement-ou-d.html',\n'6.32' => 'http://rgaa.net/Coherence-des-liens-d-evitement-ou.html',\n'6.33' => 'http://rgaa.net/Ordre-des-liens-d-evitement-ou-d.html',\n'6.34' => 'http://rgaa.net/Presence-d-un-moteur-de-recherche.html',\n'6.35' => 'http://rgaa.net/Possibilite-de-naviguer-facilement.html',\n'6.36' => 'http://rgaa.net/Presence-d-une-indication-de-la.html',\n'7.1' => 'http://rgaa.net/Absence-de-generation-de-contenus.html',\n'7.2' => 'http://rgaa.net/Absence-d-alteration-de-la.html',\n'7.3' => 'http://rgaa.net/Lisibilite-des-informations.html',\n'7.4' => 'http://rgaa.net/Absence-d-espaces-utilises-pour.html',\n'7.5' => 'http://rgaa.net/Absence-de-definition-d-une.html',\n'7.6' => 'http://rgaa.net/Possibilite-de-remplacer-les.html',\n'7.7' => 'http://rgaa.net/Possibilite-de-remplacer-les,122.html',\n'7.8' => 'http://rgaa.net/Absence-d-attributs-ou-d-elements.html',\n'7.9' => 'http://rgaa.net/Absence-d-elements-HTML-utilises-a.html',\n'7.10' => 'http://rgaa.net/Maintien-de-la-distinction.html',\n'7.11' => 'http://rgaa.net/Absence-de-suppression-de-l-effet.html',\n'7.12' => 'http://rgaa.net/Absence-de-justification-du-texte.html',\n'7.13' => 'http://rgaa.net/Lisibilite-du-document-en-cas-d.html',\n'7.14' => 'http://rgaa.net/Absence-d-unites-absolues-ou-de.html',\n'7.15' => 'http://rgaa.net/Absence-d-apparition-de-barre-de.html',\n'7.16' => 'http://rgaa.net/Largeur-des-blocs-de-textes.html',\n'7.17' => 'http://rgaa.net/Valeur-de-l-espace-entre-les.html',\n'7.18' => 'http://rgaa.net/Restitution-correcte-dans-les.html',\n'8.1' => 'http://rgaa.net/Mise-a-jour-des-alternatives-aux.html',\n'8.2' => 'http://rgaa.net/Universalite-du-gestionnaire-d.html',\n'8.3' => 'http://rgaa.net/Universalite-des-gestionnaires-d.html',\n'8.4' => 'http://rgaa.net/Possibilite-de-desactiver-toute.html',\n'8.5' => 'http://rgaa.net/Absence-de-changements-de-contexte.html',\n'8.6' => 'http://rgaa.net/Ordre-d-acces-au-clavier-aux.html',\n'8.7' => 'http://rgaa.net/Utilisation-correcte-du-role-des.html',\n'8.8' => 'http://rgaa.net/Presence-d-une-alternative-au-code.html',\n'8.9' => 'http://rgaa.net/Absence-de-suppression-du-focus.html',\n'8.10' => 'http://rgaa.net/Absence-de-limite-de-temps-pour.html',\n'8.11' => 'http://rgaa.net/Absence-de-perte-d-informations.html',\n'8.12' => 'http://rgaa.net/Presence-d-une-alternative-au-code,145.html',\n'8.13' => 'http://rgaa.net/Accessibilite-des-contenus.html',\n'9.1' => 'http://rgaa.net/Presence-de-la-declaration-d.html',\n'9.2' => 'http://rgaa.net/Conformite-de-la-position-de-la.html',\n'9.3' => 'http://rgaa.net/Conformite-syntaxique-de-la.html',\n'9.4' => 'http://rgaa.net/Validite-du-code-HTML-XHTML-au.html',\n'9.5' => 'http://rgaa.net/Absence-de-composants-obsoletes.html',\n'9.6' => 'http://rgaa.net/Presence-d-un-titre-dans-la-page.html',\n'9.7' => 'http://rgaa.net/Pertinence-du-titre-de-la-page.html',\n'9.8' => 'http://rgaa.net/Presence-d-une-langue-de.html',\n'10.1' => 'http://rgaa.net/Presence-d-au-moins-un-titre-de.html',\n'10.2' => 'http://rgaa.net/Pertinence-du-contenu-des-titres.html',\n'10.3' => 'http://rgaa.net/Absence-d-interruption-dans-la.html',\n'10.4' => 'http://rgaa.net/Presence-d-une-hierarchie-de.html',\n'10.5' => 'http://rgaa.net/Absence-de-simulation-visuelle-de.html',\n'10.6' => 'http://rgaa.net/Utilisation-systematique-de-listes.html',\n'10.7' => 'http://rgaa.net/Balisage-correct-des-listes-de.html',\n'10.8' => 'http://rgaa.net/Balisage-correct-des-citations.html',\n'10.9' => 'http://rgaa.net/Balisage-correct-des-abreviations.html',\n'10.10' => 'http://rgaa.net/Balisage-correct-des-acronymes.html',\n'10.11' => 'http://rgaa.net/Pertinence-de-la-version-non.html',\n'10.12' => 'http://rgaa.net/Pertinence-de-la-version-complete.html',\n'10.13' => 'http://rgaa.net/Accessibilite-des-documents.html',\n'11.1' => 'http://rgaa.net/Presence-des-balises-th-pour.html',\n'11.2' => 'http://rgaa.net/Presence-d-une-relation-entre-les.html',\n'11.3' => 'http://rgaa.net/Presence-d-une-relation-entre-les,170.html',\n'11.4' => 'http://rgaa.net/Absence-des-elements-propres-aux.html',\n'11.5' => 'http://rgaa.net/Absence-de-tableaux-de-donnees-ou.html',\n'11.6' => 'http://rgaa.net/Linearisation-correcte-des.html',\n'11.7' => 'http://rgaa.net/Presence-d-un-titre-pour-les.html',\n'11.8' => 'http://rgaa.net/Presence-d-un-resume-pour-les.html',\n'11.9' => 'http://rgaa.net/Pertinence-du-titre-du-tableau-de.html',\n'11.10' => 'http://rgaa.net/Pertinence-du-resume-du-tableau-de.html',\n'12.1' => 'http://rgaa.net/Presence-de-l-indication-des.html',\n'12.2' => 'http://rgaa.net/Presence-de-l-indication-des,179.html',\n'12.3' => 'http://rgaa.net/Equivalence-de-l-information-mise.html',\n'12.4' => 'http://rgaa.net/Presence-de-liens-ou-de.html',\n'12.5' => 'http://rgaa.net/Absence-de-syntaxes-cryptiques-par.html',\n'12.6' => 'http://rgaa.net/Presence-d-informations-sur-les.html',\n'12.7' => 'http://rgaa.net/Presence-d-un-moyen-de,184.html',\n'12.8' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,185.html',\n'12.9' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,186.html',\n'12.10' => 'http://rgaa.net/Utilisation-d-un-style-de.html'\n);\n\n\treturn $matches[1].'<a href=\"'.$rgaa[$matches[2]].'\">'.$matches[2].'</a>';\n}",
"function _fourD_analysis_calculate_project_goal_weight( $nid, $uid=0, $goals, $project ) {\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); <br>----------------------------<br>' );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $goals: '.print_r($goals, true) );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $project: '.print_r($project, true) );\n \n if( !count($goals) || !$project ){\n return 0.0;\n }\n \n $weight = 0;\n $indirectParents = array();\n if( isset($project['project_goal']) ){\n foreach( $goals as $gid=>$g ){\n\n $goal = fourD_analysis_goal_entry_get($gid, $uid);\n// fourD_analysis_debug('----- _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($goal, true) );\n\n if($goal && isset($goal['goal_weight']) ){\n if( isset($project['project_goal'][$gid]['rating']) ){\n \n// fourD_analysis_debug('+++++ _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($project['project_goal'][$gid], true) );\n\n\n /* Direct parent and top-level are G1*W1 */\n if( _fourD_analysis_is_goal_applicable_to_project_input($nid, $g) ){\n $weight += ( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; INPUT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); INPUT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n /* Indirect parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n// elseif( _fourD_analysis_is_goal_applicable_to_project($nid, $g) ){\n// $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; APPLICABLE: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n// }\n \n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n \n \n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n }\n\n else{\n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($g, true) );\n }\n }\n }\n\n\n }\n\n /* Finally, factor in any indirect parents */\n foreach($indirectParents as $nid=>$w){\n $weight = ($weight*$w);\n }\n }\n \n return $weight;\n}",
"public function get_number_of_rel_ids($rel_id = 0, $rel_page = '')\n {\n }",
"function _iwps_get_ranks_in_bout_rotation($bid, $rotation, $type = 'array') {\n $scores = array();\n $query = new EntityFieldQuery();\n\n $query\n ->entityCondition('entity_type', 'node', '=')\n ->propertyCondition('type', 'individual_performance', '=')\n ->fieldCondition('field_rotation', 'value', $rotation)\n ->fieldCondition('field_bout', 'tid', $bid, '=', 0);\n\n $result = $query->execute();\n\n $pids = array();\n\n if ( array_key_exists('node', $result) ) {\n foreach ($result['node'] as $record) {\n $pids[] = $record->nid;\n }\n }\n\n $performances = entity_load('node', $pids);\n $poets = array();\n foreach ($performances as $perf) {\n $poet_id = $perf->field_individual_performer[$perf->language][0]['target_id'];\n $poets[] = $poet_id;\n }\n\n $poet_nodes = user_load_multiple($poets);\n\n\n foreach ($performances as $perf) {\n $poet_id = $perf->field_individual_performer[$perf->language][0]['target_id'];\n $scores[] = array(\n 'rank' => 0,\n 'performer' => $poet_nodes[$poet_id]->name,\n 'rotation' => $perf->field_rotation['und'][0]['value'],\n 'score' => $perf->field_score['und'][0]['value'],\n 'bout_term' => $perf->field_bout['und'][0]['tid'],\n 'uid' => $poet_id,\n 'nid' => $perf->nid,\n );\n }\n\n // sort by score high to low, DEPENDANCY scorecreep module\n usort($scores, \"array_sort_by_score\");\n\n // set ranks\n $scores = _scorecreep_get_performance_ranks($scores);\n if ($type == 'ASSOC') {\n $assoc = array();\n for ( $i = 0; $i < count($scores); $i++) {\n $assoc[$scores[$i]['uid']] = $scores[$i];\n }\n return $assoc;\n }\n return $scores;\n}",
"public function rank();",
"function getIndicesImpact($list_agence) {\n\n global $dbHandler,$global_id_agence;\n $db = $dbHandler->openConnection();\n $DATA['general']['nombre_moyen_gs']=0;\n $DATA['clients']['pp'] = 0;\n $DATA['clients']['homme'] = 0;\n $DATA['clients']['femme'] = 0;\n $DATA['clients']['pm'] = 0;\n $DATA['clients']['gi'] = 0;\n $DATA['clients']['gs'] = 0;\n $DATA['clients']['total']=0;\n $DATA['epargnants']['pp'] = 0;\n $DATA['epargnants']['homme'] = 0;\n $DATA['epargnants']['femme'] = 0;\n $DATA['epargnants']['pm'] = 0;\n $DATA['epargnants']['gi'] = 0;\n $DATA['epargnants']['gs'] = 0;\n $DATA['epargnants']['total']=0;\n $DATA['emprunteurs']['pp'] = 0;\n $DATA['emprunteurs']['homme'] = 0;\n $DATA['emprunteurs']['femme'] = 0;\n $DATA['emprunteurs']['pm'] = 0;\n $DATA['emprunteurs']['gi'] = 0;\n $DATA['emprunteurs']['gs'] = 0;\n $DATA['general']['total_membre_empr_gi'] = 0;\n $DATA['general']['total_membre_empr_gs'] = 0;\n $DATA['general']['nombre_moyen_gi'] =0;\n $DATA['general']['nombre_moyen_gs'] =0;\n $DATA['general']['gi_nbre_membre'] =0;\n $DATA['general']['gs_nbre_membre'] =0;\n $DATA['general']['gs_nbre_hommes'] =0;\n $DATA['general']['gs_nbre_femmes'] =0;\n $nb_agence=0;\n foreach($list_agence as $key_id_ag =>$value) {\n //Parcours des agences\n setGlobalIdAgence($key_id_ag);\n $nb_agence++;\n // Nombre de clients\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND etat = 2 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['clients']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['clients']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['clients']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['clients']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['clients']['femme'] += $row['count'];\n }\n }\n\n $DATA['clients']['pp'] += $DATA['clients']['homme'] + $DATA['clients']['femme'];\n $DATA['clients']['total'] += $DATA['clients']['pp'] + $DATA['clients']['pm'] + $DATA['clients']['gi'] + $DATA['clients']['gs'];\n\n if ($DATA['clients']['pp'] == 0) {\n $DATA['clients']['pourcentage_homme'] = 0;\n $DATA['clients']['pourcentage_femme'] = 0;\n } else {\n $DATA['clients']['pourcentage_homme'] = $DATA['clients']['homme'] / $DATA['clients']['pp'];\n $DATA['clients']['pourcentage_femme'] = $DATA['clients']['femme'] / $DATA['clients']['pp'];\n }\n\n // Nombre d'épargnants\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND (SELECT count(*) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_client = id_titulaire AND id_prod <> 2 AND id_prod <> 3 AND solde <> 0) > 0 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['epargnants']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['epargnants']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['epargnants']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['epargnants']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['epargnants']['femme'] += $row['count'];\n }\n }\n\n $DATA['epargnants']['pp'] += $DATA['epargnants']['homme'] + $DATA['epargnants']['femme'];\n $DATA['epargnants']['total'] += $DATA['epargnants']['pp'] + $DATA['epargnants']['pm'] + $DATA['epargnants']['gi'] + $DATA['epargnants']['gs'];\n\n if ($DATA['epargnants']['pp'] == 0) {\n $DATA['epargnants']['pourcentage_homme'] = 0;\n $DATA['epargnants']['pourcentage_femme'] = 0;\n } else {\n $DATA['epargnants']['pourcentage_homme'] = $DATA['epargnants']['homme'] / $DATA['epargnants']['pp'];\n $DATA['epargnants']['pourcentage_femme'] = $DATA['epargnants']['femme'] / $DATA['epargnants']['pp'];\n }\n\n\n // Nombre d'emprunteurs\n $sql = \"SELECT statut_juridique, pp_sexe, count(ad_cli.id_client) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['emprunteurs']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['emprunteurs']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['emprunteurs']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['emprunteurs']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['emprunteurs']['femme'] += $row['count'];\n }\n }\n\n $DATA['emprunteurs']['pp'] += $DATA['emprunteurs']['homme'] + $DATA['emprunteurs']['femme'];\n $DATA['emprunteurs']['total'] += $DATA['emprunteurs']['pp'] + $DATA['emprunteurs']['pm'] + $DATA['emprunteurs']['gi'] + $DATA['emprunteurs']['gs'];\n\n if ($DATA['emprunteurs']['pp'] == 0) {\n $DATA['emprunteurs']['pourcentage_homme'] = 0;\n $DATA['emprunteurs']['pourcentage_femme'] = 0;\n } else {\n $DATA['emprunteurs']['pourcentage_homme'] = $DATA['emprunteurs']['homme'] / $DATA['emprunteurs']['pp'];\n $DATA['emprunteurs']['pourcentage_femme'] = $DATA['emprunteurs']['femme'] / $DATA['emprunteurs']['pp'];\n }\n\n // Nombre total de membres emprunteurs par groupe informel\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gi'] += round($row[0]);\n\n // Nombre total de membres emprunteurs par groupe solidaire\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gs'] += round($row[0]);\n\n // Nombre total d'hommes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 1 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_homme_gs'] = round($row[0]);\n // Nombre total de femmes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 2 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_femme_gs'] = round($row[0]);\n\n // Nombre moyen de membres par groupe informel\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gi'] += round($row[0]);\n\n // Nombre moyen de membres par groupe solidaire\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gs'] += round($row[0]);\n }\n $DATA['general']['nombre_moyen_gi']=$DATA['general']['nombre_moyen_gi']/$nb_agence;\n $DATA['general']['nombre_moyen_gs']=$DATA['general']['nombre_moyen_gs']/$nb_agence;\n $dbHandler->closeConnection(true);\n return $DATA;\n}",
"function find_gaps()\n\t{\n\t\t// Get all lfts and rgts and sort them in a list\n\t\tee()->db->select('lft, rgt');\n\t\tee()->db->order_by('lft','asc');\n\t\t$table = ee()->db->get( $this->tree_table );\n\n\t\t$nums = array();\n\n\t\tforeach($table->result() as $row)\n\t\t{\n\t\t\t$nums[] = $row->{'lft'};\n\t\t\t$nums[] = $row->{'rgt'};\n\t\t}\n\t\t\n\t\tsort($nums);\n\t\t\n\t\t// Init vars for looping\n\t\t$old = array();\n\t\t$current = 1;\n\t\t$foundgap = 0;\n\t\t$gaps = array();\n\t\t$current = 1;\n\t\t$i = 0;\n\t\t$max = max($nums);\n\t\twhile($max >= $current)\n\t\t{\n\t\t\t$val = $nums[$i];\n\t\t\tif($val == $current)\n\t\t\t{\n\t\t\t\t$old[] = $val;\n\t\t\t\t$foundgap = 0;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// have gap or duplicate\n\t\t\t\tif($val > $current)\n\t\t\t\t{\n\t\t\t\t\tif(!$foundgap)$gaps[] = array('start'=>$current,'size'=>1);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$gaps[count($gaps) - 1]['size']++;\n\t\t\t\t\t}\n\t\t\t\t\t$foundgap = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$current++;\n\t\t}\n\t\treturn count($gaps) > 0 ? $gaps : false;\n\t}",
"function sortRel($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) { return 0; }\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}",
"public function add_neighbor($uid, $neighbor_ip){\n $ngh_id = $this->get_uid($neighbor_ip);\n if(!$ngh_id)\n $ngh_id = $this->add_user($neighbor_ip);\n \n if(!$ngh_id)\n return NULL;\n\n $edge_exists = $this->edge_exists($uid, $ngh_id);\n \n\t\t$query = \"INSERT INTO edges(\n src_id,\n\t\t\ttarget_id) \n\t\t\tVALUES(?, ?)\n ON DUPLICATE KEY UPDATE src_id = src_id;\n\t\t\";\n\t\t\t\n\t\t$stmt = $this->prepare_statement($query);\n if(!$stmt)\n return NULL;\n\t\t$bind = $stmt->bind_param(\"ii\", $uid, $ngh_id);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\n /* duplicate edges */\n\t\t$bind = $stmt->bind_param(\"ii\", $ngh_id, $uid);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\t\t\t\n\t\treturn array(\n \"neighbor_id\" => $ngh_id,\n \"edge_exists\" => $edge_exists\n );\n }",
"public abstract function get_rank();",
"private function getSinglePageRank($cid, $ipp, $user)\n\t{\n\t\tif ( ($user === false) || ($user->getCountryID() !== $cid) )\n\t\t{\n\t\t\treturn array(Common::getGet('page', 1), 1);\n\t\t}\n\t\t\n\t\t# Requested a page, so use it\n\t\tif (false !== ($page = Common::getGet('page')))\n\t\t{\n\t\t\treturn array($page, 1);\n\t\t}\n\t\t\n\t\t# Oh, auto-page detection for the user!\n\t\t$rank = WC_RegAt::calcExactCountryRank($user);\n\t\t$page = GWF_PageMenu::getPageForPos($rank, $ipp);\n\t\treturn array($page, $rank);\n\t}",
"function ml_compute_ranking($r_id){\n\tglobal $dbh1, $dbh2; // Global variables for database connections\n\t$sql = 'SELECT student_id FROM student_recruiter WHERE recruiter_id='.$r_id;\n\t$result = mysql_query($sql, $dbh1);\n\t$rank_dist = [];\n\t\n\twhile ($data = mysql_fetch_array($result)){\n\t\t$s_id = $data['student_id'];\n\t\t// Extract feature vector from s_id\n\t\t$sql1 = 'SELECT feature FROM ml_feature_vectors WHERE recruiter_id='.$r_id.' AND student_id='.$s_id;\n\t\t$result1 = mysql_query($sql1, $dbh2);\n\t\t$data1 = mysql_fetch_array($result1);\n\t\t$feature = $data1['feature'];\n\t\t\n\t\t// Convert feature vector string to array of integers\n\t\t$feature_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$feature_array[$i] = (int)$feature[$i];\n\t\t}\n\t\t\n\t\t// Create best array --> For Comparison\n\t\t$best_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$best_array[$i] = 5;\n\t\t}\n\t\t// Calculate distance between feature vector and best vector based on Cosine similarity distance\n\t\t$cdist = cosinus($feature_array, $best_array);\n\t\t$rank_dist[$s_id] = $cdist;\n\t\t\t\n\t} //while (student)\n\t\n\t// Sort $rank_dist array\n\tarsort($rank_dist);\n\t$rank_dist_keys = array_keys($rank_dist);\n\t\n\t$rank_id = '';\n\tfor($i=0; $i<count($rank_dist_keys); $i++){\n\t\tif($i==(count($rank_dist_keys)-1) )\n\t\t\t$rank_id = $rank_id.$rank_dist_keys[$i];\n\t\telse $rank_id = $rank_id.$rank_dist_keys[$i].',';\n\t}\n\t\n\t$sql2 = 'SELECT * FROM ml_rank WHERE recruiter_id='.$r_id; \n\t$result2 = mysql_query($sql2, $dbh2);\n\t$count2 = mysql_num_rows($result2);\n\t\n\tif ($count2==0)\n\t\t$sql3 = 'INSERT INTO ml_rank VALUES('.$r_id.',\"'.$rank_id.'\")';\n\telse\n\t\t$sql3 = 'UPDATE ml_rank SET rank_id=\"'.$rank_id.'\" WHERE recruiter_id='.$r_id;\n\tmysql_query($sql3, $dbh2);\n\t\t\n\n}",
"public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}",
"function countScores($graph, $node, $nodesArray, $finish)\n{\n\tglobal $successArray;\n\n\tforeach ($graph[$node] as $key => $value) {\n\t\t\n\t\t$key1 = array_search($key, $nodesArray['node']);\n\n\t\tif ($nodesArray[$key1]['score'] == 100000) {\n\t\t\t$nodesArray[$key1]['score'] = 0;\n\t\t}\n\n\t\t$nodesArray[$key1]['score'] += $value; // this wont do in cases of the shorter routes \n\t\t$nodesArray[$key1]['route'] .= \"->\" . $node . \"->\" . $key;\n\n\t\tif ($key == $finish) {\n\t\t\tarray_push($successArray, $nodesArray[$key1]); // check this\n\t\t}\n\t}\n\n\treturn $nodesArray;\n}",
"function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}",
"function getLabel($data, $neighbors)\n{\n $results = array();\n $neighbors = array_keys($neighbors);\n print_r($neighbors);\n foreach ($neighbors as $neighbor) {\n $results[] = $data[$neighbor][2];\n }\n $values = array_count_values($results);\n $values = array_flip($values);\n ksort($values);\n return array_pop($values);\n}",
"function ros_get_grades_average($grads)\n{\n $povprecje = array();\n $cnt = count($grads);\n $povprecje['mistakes'] = 0;\n $povprecje['timeinseconds'] = 0;\n $povprecje['hitsperminute'] = 0;\n $povprecje['precision'] = 0;\n foreach($grads as $grade)\n {\n $povprecje['mistakes'] = $povprecje['mistakes'] + $grade->mistakes; \n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] + $grade->timeinseconds;\n }\n if($cnt != 0){\n $povprecje['mistakes'] = $povprecje['mistakes'] / $cnt;\n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] / $cnt;\n }\n return $povprecje;\n}",
"function setup_vertices($cnt, $max_weight) {\n\n $vertices = array();\n\n for ($i = 0; $i < $cnt; $i++) {\n $vertex = new Vertex();\n $vertex->index = $i;\n $vertices[] = $vertex;\n }\n\n for ($i = 0; $i < $cnt; $i++) {\n\n for ($j = 0; $j < $cnt; $j++) {\n\n $vertex_b = rand(0, $cnt - 1);\n\n if ($vertex_b != $i) {\n $edge = new Edge();\n $edge->vertex_a = $vertices[$i];\n $edge->vertex_b = $vertices[$vertex_b];\n $edge->weight = rand(1, $max_weight);\n $vertices[$i]->edges[] = $edge;\n }\n }\n }\n\n return $vertices;\n}",
"public function getAgentRank( Request $request )\n {\n\n $repositories = new UsersRepositories;\n\n $ranks = $repositories->getAgentRank( $request->id );\n\n return response()->json($ranks);\n }",
"public function generatePagination($total_pages, $limit, $page, $baseUrl){ $adjacents = 3;\n if($page) \n $start = ($page - 1) * $limit; \t\t\t//first item to display on this page\n else\n $start = 0;\t\t\t\t\t\t\t\t//if no page var is given, set start to 0\n \n /* Setup page vars for display. */\n if ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n $prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n $next = $page + 1;\t\t\t\t\t\t\t//next page is page + 1\n $lastpage = ceil($total_pages/$limit);\t\t//lastpage is = total pages / items per page, rounded up.\n $lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n \n /* \n Now we apply our rules and draw the pagination object. \n We're actually saving the code to a variable in case we want to draw it more than once.\n */\n $pagination = \"\";\n if($lastpage > 1)\n {\t\n $pagination .= \"<ul class=\\\"pagination pagination-sm\\\">\";\n //previous button\n if ($page > 1) \n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"\" . $baseUrl . \"?page=$prev\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">«</span>\n </a>\n </li>\";\n // <a href=\\\"diggstyle.php?page=$prev\\\">« previous</a>\";\n else\n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"#\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">«</span>\n </a>\n </li>\";\t\n \n //pages\t\n if ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n {\t\n for ($counter = 1; $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n }\n elseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n {\n //close to beginning; only hide later pages\n if($page < 1 + ($adjacents * 2))\t\t\n {\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n //\"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //in middle; hide some front and some back\n elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //close to end; only hide early pages\n else\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n }\n }\n }\n \n //next button\n if ($page < $counter - 1) \n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $next . '\"><span aria-hidden=\"true\">»</span></a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$next\\\">next »</a>\";\n else\n // $pagination.= \"<span class=\\\"disabled\\\">next »</span>\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"#\"><span aria-hidden=\"true\">»</span></a></li>';\n $pagination.= \"</ul>\\n\";\t\t\n }\n return $pagination;\n }",
"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 static function pages($total_pages, $adjacents, $targetpage, $limit, $page, $start, $scroll, $met)\n\t{\n\n if ($page == 0) $page = 1; //if no page var is given, default to 1.\n $prev = $page - 1; //previous page is page - 1\n $next = $page + 1; //next page is page + 1\n $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.\n $lpm1 = $lastpage - 1;\n\n\t\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\t*/\n\n $pagination = self::$main_tag_start.\"\";\n\n if($lastpage > 1)\n {\n\n\t\t\t//previous button\n\n\t\t\tif ($page > 1):\n\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$prev.$scroll.\"'>\".self::$prev.\"</a>\".self::$after_a;\n\t\t\telse:\n\t\t\t\t$pagination.= self::show_disabled(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_disabled().\"' href='#' >\".self::$prev.\"</a>\".self::$after_a;\n\t\t\tendif;\n\n\n\t\t\t//pages\n\n\t\t\tif ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page):\n\t\t\t\t\t\t$pagination.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\telse:\n\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\tendif;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some\n\t\t\t{\n\n\t\t\t//close to beginning; only hide later pages\n\n\t\t\t\tif($page < 1 + ($adjacents * 2))\n\t\t\t\t{\n\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($counter == $page):\n\t\t\t\t\t\t\t$pagination.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lpm1.$scroll.\"'>\".$lpm1.\"</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lastpage.$scroll.\"'>\".$lastpage.\"</a>\".self::$after_a;\n\t\t\t\t}\n else if($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n\t\t\t\t{\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"1\".$scroll.\"'>1</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"2\".$scroll.\"'>2</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($counter == $page):\n\t\t\t\t\t\t\t$pagination.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lpm1.$scroll.\"' >\".$lpm1.\"</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lastpage.$scroll.\"'>\".$lastpage.\"</a>\".self::$after_a;\n\t\t\t\t}\n\n\t\t\t\t//close to end; only hide early pages\n\n\t\t\t\telse\n\t\t\t\t{\n $pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"1\".$scroll.\"'>1</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"2\".$scroll.\"'>2</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($counter == $page):\n\t\t\t\t\t\t\t$pagination.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//next button\n\n\t\t\tif ($page < $counter - 1):\n\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$next.$scroll.\"'>\".self::$next.\"</a>\".self::$after_a;\n\t\t\telse:\n\t\t\t\t$pagination.= self::show_disabled(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_disabled().\"' href='#' >\".self::$next.\"</a>\".self::$after_a;\n\t\t\tendif;\n }\n $pagination .= self::$main_tag_end.\"\";\n\t\treturn $pagination;\n }",
"public function rank() : int\n {\n $a = $this->rref()->a()->asArray();\n\n $pivots = 0;\n\n foreach ($a as $rowA) {\n foreach ($rowA as $valueA) {\n if ($valueA != 0) {\n ++$pivots;\n\n continue 2;\n }\n }\n }\n\n return $pivots;\n }",
"function search_own_router($all_nodes, $own_nodes)\n{\n # Deklariere Array\n $own_router_index = array();\n $i = 0;\n foreach ($all_nodes as $node) {\n $node_id = $node['node_id'];\n foreach ($own_nodes as $own_id) {\n if ($own_id == $node_id) {\n array_push($own_router_index, $i);\n }\n }\n $i = $i + 1;\n }\n return $own_router_index;\n}",
"function crawl_report_per_games($recap_link, $team, $sort_report = NULL) {\n\t\n\t$html_recap = file_get_html($recap_link);\n\tforeach($html_recap->find('div[class=contentPad article] p') as $recap_paragraph){\n\t\t$report_paragraphs[] = $recap_paragraph->plaintext;\n\t}\n\n\t// Some Recap reports doesn't seem to contain <p> tags.\n\t// In this case we get all the div in a string and compile it further.\n\t// The sorting algorithim can handle strings and arrays as well. \n\tif(empty($report_paragraphs)) {\n\t\tforeach($html_recap->find('div[class=contentPad article]') as $recap_paragraph){\n\t\t\t$report_paragraphs_empty[] = $recap_paragraph->plaintext;\n\t\t}\n\t\t\n\t\tif($sort_report) {\t\t\n\t\t\tfor($i=0; $i<count($report_paragraphs_empty); $i++){\n\t\t\t\t$report_paragraphs_empty[$i] = html_entity_decode($report_paragraphs_empty[$i]);\n\t\t\t}\n\t\t\t$report_paragraphs = $report_paragraphs_empty[0];\n\t\t\t$report_to_evaluate = sort_report($report_paragraphs, $team);\n\t\t} else {\n\t\t\t$report_to_evaluate = $report_paragraphs_empty[0];\n\t\t}\n\t\t\n\n\t} else {\n\t\n\t\tif($sort_report) {\n\t\t\t// If <p> tags found continue with decoding tags.\n\t\t\tfor($i=0; $i<count($report_paragraphs); $i++){\n\t\t\t\t$report_paragraphs[$i] = html_entity_decode($report_paragraphs[$i]);\n\t\t\t}\n\t\t\t$report_to_evaluate = sort_report($report_paragraphs, $team);\n\t\t} else {\n\t\t\t$report_to_evaluate = '';\n\t\t\tforeach ($report_paragraphs as $paragraph) {\n\t\t\t$report_to_evaluate .= $paragraph; \n\t\t\t}\n\t\t}\n\t\n\t}\n\n\t//print_r($report_paragraphs);\n\t\n\treturn $report_to_evaluate;\n\t\n\t/*\n\t$query = \"INSERT INTO $team(id, report) VALUES(NULL, $report_to_evaluate)\";\n\t\n\tif(mysqli_query(DBi::$conn, $query)) {\n\t\techo 'Updated';\n\t} else {\n\t\techo mysqli_error(DBi::$conn);\n\t}\n\t*/\n}",
"function getRankingsTableString($user_id, $viewmore = true, $viewresults = 10, $viewlink, $page=0, $filter=null, $filterparam=null)\n{\n $rankings_results = contest_query(\"select_rankings\");\n // If query fails\n if (!$rankings_results) {\n return \"<p>Rankings are not available at the moment. Check back soon!</p>\";\n }\n\n $table = \"\";\n if ($filter != NULL) {\n $table .= \"<a href=\\\"rankings.php\\\">« Back to Main Leaderboard</a>\";\n }\n\n$table .= <<<EOT\n<table class=\"leaderboard\">\n<thead>\n<tr>\n <th>Rank</th>\n <!--<th>Score</th>-->\n <th>Username</th>\n <th>Country</th>\n <th>Organization</th>\n <th>Language</th>\n <th>Skill</th>\n <!--<th>Wins</th>-->\n <!--<th>Losses</th>-->\n <!--<th>Draws</th>-->\n</tr>\n</thead>\n<tbody>\nEOT;\n $old_score = 999999;\n $old_rank = -1;\n for ($i = 1; $row = mysql_fetch_assoc($rankings_results); $i += 1) {\n $username = htmlentities($row[\"username\"], ENT_COMPAT, 'UTF-8');\n $programming_language = $row[\"programming_language\"];\n\t$score = $row[\"skill\"];\n $programming_language_link = urlencode($row[\"programming_language\"]);\n $rank = $row[\"rank\"];\n\tif ($score == $old_score) {\n\t $rank = $old_rank;\n\t}\n\t$old_score = $score;\n\t$old_rank = $rank;\n $rank = ($filter == null)? $rank : ($i + $offset) . \" <span title='Global Rank'>($rank)</span>\";\n $rank_percent = $row[\"rank_percent\"];\n $wins = $row[\"wins\"];\n $losses = $row[\"losses\"];\n $draws = $row[\"draws\"];\n $flag_filename = $row[\"flag_filename\"];\n $country_id = $row[\"country_id\"];\n $country_name = $row[\"country_name\"];\n $country_name = $country_name == NULL ? \"Unknown\" : htmlentities($country_name, ENT_COMPAT, 'UTF-8');\n $org_name = htmlentities($row[\"org_name\"], ENT_COMPAT, 'UTF-8');\n $org_id = $row[\"org_id\"];\n $user_id = $row[\"user_id\"];\n $row_class = $i % 2 == 0 ? \"even\" : \"odd\";\n $flag_filename = $flag_filename == NULL ? \"unk.png\" : $flag_filename;\n $flag_filename = \"<img alt=\\\"$country_name\\\" width=\\\"16\\\" height=\\\"11\\\" title=\\\"$country_name\\\" src=\\\"flags/$flag_filename\\\" />\";\n if (current_username() == $username) {\n $table .= \" <tr class=\\\"$row_class, user\\\">\\n\";\n } else {\n $table .= \" <tr class=\\\"$row_class\\\">\\n\";\n }\n $table .= \" <td>$rank</td>\\n\";\n //$table .= \" <td>$rank_percent</td>\\n\";\n $table .= \" <td><a href=\\\"profile.php?user= $user_id\\\">$username</a></td>\\n\";\n $table .= \" <td><a href=\\\"country_profile.php?country=$country_id\\\">$flag_filename</a></td>\";\n $table .= \" <td><a href=\\\"organization_profile.php?org=$org_id\\\">$org_name</a></td>\";\n $table .= \" <td><a href=\\\"language_profile.php?language=$programming_language_link\\\">$programming_language</a></td>\";\n\t$table .= \" <td>$score</td>\";\n //$table .= \" <td>$wins</td>\";\n //$table .= \" <td>$losses</td>\";\n //$table .= \" <td>$draws</td>\";\n $table .= \" </tr>\\n\";\n }\n $table .= \"</tbody></table>\";\n if (!$viewmore) {\n $table .= $pagination;\n }\n if ($viewmore && $rowcount > $viewresults) {\n $table .= \"<a href=\\\"$viewlink\\\">View More</a>\";\n }\n return $table;\n}"
]
| [
"0.40276578",
"0.39606708",
"0.39383328",
"0.3934288",
"0.3888219",
"0.38683745",
"0.3815064",
"0.3810539",
"0.37966835",
"0.37458992",
"0.3711539",
"0.37087935",
"0.36667502",
"0.36576584",
"0.3639627",
"0.36095986",
"0.3601433",
"0.35954937",
"0.3587483",
"0.3584192",
"0.35553887",
"0.35520867",
"0.35514587",
"0.35257593",
"0.35244107",
"0.35208732",
"0.35131198",
"0.35094202",
"0.35075167",
"0.35067698"
]
| 0.6190208 | 0 |
Get paging view for a collection of events. | private function getView(Collection $collection) {
$view = [];
foreach (['first', 'previous', 'next', 'last'] as $key) {
$url = $collection->get($key);
if ($url) {
$info = parse_url($url);
if (!empty($info['query'])) {
parse_str($info['query'], $query);
$view[$key] = Url::fromRoute('event_database_pull.events_list', $query);
}
}
}
return $view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n $events = Event::whereDate('date', '>=', Carbon::now())\n ->orderBy('date', 'desc')->paginate(15);\n\n return view('event.index', compact('events'))\n ->with('i', (request()->input('page', 1) -1) *15);\n }",
"function loadEvents() {\n $events = Event::orderBy('date', 'desc')->paginate(10);\n \n return view('cms.events', ['events' => $events]);\n }",
"private function get_list_pageinfo($event) {\n global $config, $database;\n \n // get the amount of images per page\n $images_per_page = $config->get_int('index_images');\n \n // this occurs when viewing post/list without page number\n if ($event->get_arg(0) == null) {// no page listed\n $prefix = \"\"; \n $page_number = 1;\n $total_pages = ceil($database->get_one(\n \"SELECT COUNT(*) FROM images\") / $images_per_page);\n }\n \n // if there are no tags, use default\n else if ($event->get_arg(1) == null){\n $prefix = \"\"; \n $page_number = (int)$event->get_arg(0);\n $total_pages = ceil($database->get_one(\n \"SELECT COUNT(*) FROM images\") / $images_per_page);\n }\n \n else { // if there are tags, use pages with tags\n $prefix = $event->get_arg(0).\"/\";\n $page_number = (int)$event->get_arg(1);\n $total_pages = ceil($database->get_one(\n \"SELECT count FROM tags WHERE tag=:tag\", \n array(\"tag\"=>$event->get_arg(0))) / $images_per_page);\n }\n \n // creates previous & next values \n // When previous first page, go to last page\n if ($page_number <= 1) $prev = $total_pages;\n else $prev = $page_number-1;\n if ($page_number >= $total_pages) $next = 1;\n else $next = $page_number+1;\n \n // Create return array\n $pageinfo = array(\n \"prev\" => $prefix.$prev.$after,\n \"next\" => $prefix.$next.$after,\n );\n \n return $pageinfo;\n }",
"public function index()\n\t{\n $events = $this->events->paginate(10);\n $no = $events->getFrom();\n return $this->view('events.index', compact('events', 'no'));\n\t}",
"public function index()\n {\n $programEvents = ProgramEvent::orderBy(\"begin_at\")->paginate();\n\n return view('program-event.index', compact('programEvents'))\n ->with('i', (request()->input('page', 1) - 1) * $programEvents->perPage());\n }",
"public function indexAction(Request $request)\n {\n $page = $request->query->get('page', 1);\n $em = $this->getDoctrine()->getManager();\n\n $qb = $em->getRepository(Event::class)->findListQueryBuilder();\n\n $events = new Pagerfanta(new DoctrineORMAdapter($qb));\n $events->setMaxPerPage(30);\n $events->setCurrentPage($page);\n\n return $this->render('event/index.html.twig', array(\n 'events' => $events,\n ));\n }",
"public function index()\n {\n $events = Event::latest()->paginate(5);\n return view('events',compact('events'));\n }",
"public function getTotalPages_events($howmany) {\r\n$total_row = $this->getRowCount_events();\r\n$pages = ceil($total_row / $howmany);\r\nreturn $pages;\r\n}",
"public function index()\n {\n $list = Event::paginate(3);\n return view('events.index', compact('list'));\n\n }",
"public function run($collection)\n {\n return view(\"admin.widgets.pagination\", [\n 'config' => $this->config,\n 'collection' => $collection\n ]);\n }",
"public function index()\n {\n $event = ModelEvent::paginate(9);\n \treturn view('index', ['event' => $event]);\n \n }",
"public function index()\n {\n $events = Event::latest()->paginate(10);\n return view('event.events', compact('events'));\n }",
"public function index()\n\t{\n\t\t$events = Event::orderBy('id', 'desc')->paginate(10);\n\n\t\treturn view('events.index', compact('events'));\n\t}",
"public function getPages();",
"public function index()\n {\n $results = Event::with('participants')->orderBy('start_date')->paginate(10);\n return view('adm.events.index')->with(compact('results'));\n }",
"public function events()\n {\n //search query\n $query = Input::get('query');\n\n if ($query == 'latest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n elseif ($query == 'oldest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'asc')->paginate(5);\n }\n else\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n return View::make('/events', ['exhibitions' => $exhibitions]);\n }",
"public function getPage($pageNumber = 0);",
"public function getPerPage();",
"public function eventos(){\n \t\n $eventos = Evento::paginate(3);\n $fotos = Foto::all();\n\n return view('eventos', compact('eventos', 'fotos'));\n }",
"public function getPaginated();",
"public function index()\n {\n $filters = request()->only('date', 'region');\n\n $events = $this->event\n ->when(isset($filters['date']), function ($query) use ($filters) {\n return $query->whereDate('date', $filters['date']);\n })\n ->when(isset($filters['region']), function ($query) use ($filters) {\n return $query->where('place', 'LIKE', \"%{$filters['region']}%\");\n })\n ->paginate(10);\n\n return response()->json([\n 'error' => false,\n 'message' => '',\n 'data' => [\n 'current_page' => $events->currentPage(),\n 'last_page' => $events->lastPage(),\n 'per_page' => $events->perPage(),\n 'path' => $events->path(),\n 'data' => new EventCollection($events)\n ]\n ], 200);\n }",
"public function eventsList()\n {\n $alumniId = session('alumni_id');\n $alumni = AlumniBasicInfo::find($alumniId);\n $events = Event::where('dept_info_id',$alumni->dept_info_id)->latest()->paginate(3);\n return view('frontend.events.events-list',compact('events'));\n }",
"public function index(Event $event, EventClass $eventClass)\n {\n // Return the event class fleets\n return $eventClass->fleets->paginate(config('pagination.api.limit'));\n }",
"public function paginated_list(Request $request){\n $max_per_paginate = 8;\n\n if($request->filter_mode == true || $request->filter_mode == 'true'){\n $filter = $request->filter;\n $data = Event::orderByDesc('started_date')->where('type', '1')->where('name', 'like', \"%$filter%\");\n } else {\n $data = Event::orderByDesc('started_date')->where('type', '1');\n }\n \n $count = $data->count();\n $paginate_count = ceil( $count / $max_per_paginate );\n\n $res = $data->skip( ($request->paginate_position-1)*$max_per_paginate )->take( $max_per_paginate )->get();\n\n return response()->json(['data' => $res, 'paginate_count' => $paginate_count]);\n }",
"public function getPages() {}",
"public function getPaginationDataSource();",
"public function index()\n\t{\n\n\t\t$data['events'] = Event_Manager::paginate(15);\n\t\t$data['page_title'] = 'Events';\n\t\treturn View::make('clientside.events.index',$data);\n\t\t\n\t}",
"public function getPageViews()\n {\n return $this->get('PageViews');\n }",
"function paginate($collection_or_array, $per_page = 100) {\n if (is_array($collection_or_array)) {\n $collection = collect($collection_or_array);\n } else {\n $collection = $collection_or_array;\n }\n $current_page = \\Illuminate\\Pagination\\LengthAwarePaginator::resolveCurrentPage();\n $paginated_collection = new \\Illuminate\\Pagination\\LengthAwarePaginator($collection->slice(($current_page - 1) * $per_page, $per_page), $collection->count(), $per_page);\n $paginated_collection->setPath(\\Illuminate\\Support\\Facades\\Request::url());\n\n return $paginated_collection;\n }",
"public function getItemsPerPage();"
]
| [
"0.59467393",
"0.5766378",
"0.57551855",
"0.5740196",
"0.572459",
"0.5712482",
"0.5679925",
"0.56694716",
"0.5604403",
"0.55985415",
"0.5577331",
"0.54963076",
"0.5469232",
"0.5458774",
"0.54540366",
"0.5449997",
"0.54391867",
"0.54272145",
"0.54230356",
"0.542053",
"0.54171365",
"0.5411331",
"0.54050505",
"0.54048973",
"0.5402995",
"0.53991646",
"0.53818184",
"0.5379845",
"0.53791463",
"0.5375526"
]
| 0.5808819 | 1 |
Funcion que llamos desde Paso2Listaprecios > Tareas > Funcion contador En donde realizamos RESUMEN, es decir comprueba cuantos registros hay y cuantos son nuevo o existentes. | function contador($nombretabla, $BDImportRecambios,$ConsultaImp) {
// Inicializamos array
$Tresumen['n'] = 0; //nuevo
$Tresumen['t'] = 0; //total
$Tresumen['e'] = 0; //existe
$Tresumen['v'] = 0; //existe
// Contamos los registros que tiene la tabla
$total = 0;
$whereC = '';
$total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);
$Tresumen['t'] = $total; // total registros
// Obtenemos lineas de registro en blanco y contamos cuantas
$whereC = " WHERE trim(Estado) = ''";
$campo[1]= 'RefFabPrin';
$campo[2]= 'linea';
$RegistrosBlanco = $ConsultaImp->registroLineas($BDImportRecambios,$nombretabla,$campo,$whereC);
// Como queremos devolver javascript los creamos
$Tresumen['v'] = $RegistrosBlanco['NItems'];
$Tresumen['LineasRegistro'] = $RegistrosBlanco; //Registros en blanco
// Contamos los registros que tiene la tabla nuevo
$total = 0;
$whereC = " WHERE Estado = 'nuevo'";
$total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);
$Tresumen['n'] = $total; //nuevo
// Contamos los registros que tiene la tabla existente
$total = 0;
$whereC = " WHERE Estado = 'existe'";
$total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);
$Tresumen['e'] = $total; //existe
return $Tresumen;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 comprobanteEstaRepetido($cuie, $periodo, $prestacionid, $idprestacion, $idrecepcion, $datosnomenclador, $elcomprobante, $fechaprestacion, $beneficiario, $idfactura, $idvacuna) {\r\n // repitiendo el id de prestacion interno, cosa que no sucede casi nunca\r\n $query = \"SELECT fc.cuie as cuie, ff.recepcion_id AS idrecepcion, id_debito,fp.id_prestacion\r\n FROM facturacion.factura ff \r\n INNER JOIN facturacion.comprobante fc ON (ff.id_factura = fc.id_factura) \r\n INNER JOIN facturacion.prestacion fp ON (fc.id_comprobante = fp.id_comprobante) \r\n LEFT JOIN facturacion.debito d ON (fc.id_comprobante=d.id_comprobante)\r\n WHERE fc.cuie='$cuie' \r\n AND ff.periodo='$periodo' \r\n AND fc.idprestacion='$prestacionid'\r\n AND fp.id_prestacion<>$idprestacion\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $ctrl_repetido['debito'] = false;\r\n $yadebitado = $resultado->fields['id_debito'];\r\n $recibidodespues = $resultado->fields['id_prestacion'] < $prestacionid;\r\n if (($resultado->RecordCount() > 0) && !($yadebitado) && $recibidodespues) {\r\n //$var['existe_id'] = 'si';\r\n $idrecepcion_idb = $resultado->fields['idrecepcion'];\r\n if ($idrecepcion_idb != $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el sistema';\r\n $ctrl_repetido['id_error'] = 73;\r\n }\r\n if ($idrecepcion_idb == $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el archivo';\r\n $ctrl_repetido['id_error'] = 74;\r\n }\r\n $ctrl_repetido['debito'] = true;\r\n } else {\r\n if (esNomencladorVacuna($datosnomenclador)) {\r\n\r\n //Controles para los nomencladores que son vacuna\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n AND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n AND fc.idvacuna='$idvacuna'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n } else {\r\n\r\n //Controles para los nomencladores que no son de vacu\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n\t\tAND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n }\r\n }\r\n return $ctrl_repetido;\r\n}",
"function controlPracticasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n\r\n $ctrl['debito'] = false;\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=1 and\r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n\r\n if ($res_origen->RecordCount() > 0) {\r\n $ctrl['msj_error'] = \"\";\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $anexo = $res_origen->fields['anexopracrel'];\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n //busca si ese afiliado se realiza la practica relacionada\r\n $comprobantedelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante, $anexo);\r\n if ($comprobantedelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $limite_dias_time = dias_time($limite_dias);\r\n $fecha_comprobante_time = strtotime(date($fecha_comprobante));\r\n $comprobantedelarelacionada_time = strtotime(date($comprobantedelarelacionada));\r\n $resta_time = $fecha_comprobante_time - $comprobantedelarelacionada_time;\r\n if ($resta_time <= $limite_dias_time) {\r\n //una vez que esta comprobado que se realizo la practica dentro de los 30 dias,\r\n //comprueba si existe otra condicion, o si no es obligatoria y sale. \r\n //TODO: no existe while para otras practicas obligatorias\r\n if (($res_origen->fields['otras'] == 'N') || ($res_origen->fields['tipo'] == 'OR')) {\r\n $ctrl['debito'] = false;\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n }\r\n return $ctrl;\r\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 }",
"function evt__form_cargo__modificacion($datos)\r\n\t{\r\n $res=0;\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){//es una modificacion\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n \r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con($car['id_cargo'],$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']);\r\n }\r\n if($res==1){//hay otro puesto \r\n toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar(); \r\n }\r\n }else{//es un alta\r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con(0,$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']); \r\n }\r\n if($res==1){//hay otro puesto \r\n throw new toba_error('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos');\r\n // toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $pers=$this->controlador()->dep('datos')->tabla('persona')->get(); \r\n $datos['generado_x_pase']=0;\r\n $datos['id_persona']=$pers['id_persona'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar();\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $cargo['id_cargo']=$car['id_cargo'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->cargar($cargo);\r\n } \r\n }\r\n\t}",
"function setRetiro($monto, $cheque = DEFAULT_CHEQUE,\t$tipo_de_pago = \"cheque\", $recibo_fiscal = DEFAULT_RECIBO_FISCAL,\n\t\t\t\t\t\t$observaciones = \"\", $grupo = DEFAULT_GRUPO, $fecha = false, $recibo = false){\n\t\t$iduser\t\t= getUsuarioActual();\n\n\t\t/**\n\t\t * verifica el maximo Retirable\n\t\t * Si forzar es VERDADERO, el Maximo retirable es igual al SALDO\n\t\t */\n\t\t if ( $this->mForceOperations == true){\n\t\t \t$maximo_ret\t\t\t= $this->mSaldoActual;\n\t\t \t$this->mMessages \t.= \"WARN\\tLa Operacion sera FORZADA \\r\\n\";\n\t\t } else {\n\t\t\t$maximo_ret\t= $this->getMaximoRetirable($fecha);\n\t\t }\n\t\tif ( $monto > $maximo_ret) {\n\t\t\t$this->mMessages \t.= \"ERROR\\tEl Monto a Retirar($monto) es Mayor al Retirable($maximo_ret) \\r\\n\";\n\t\t\t$monto\t= 0;\n\t\t\t$recibo\t= false;\n\t\t}\n\t\tif ( $monto > 0){\n\t\t\t\tif ( in_array($this->mEstatusActual, $this->mEstatusNoOperativos) == true OR ($monto > $this->mSaldoActual) ){\n\n\t\t\t\t\t$this->mMessages \t.= \"ERROR\\tLa Cuenta no esta permitida para recibir Operacion, tiene estatus \" . $this->mEstatusActual .\" \";\n\t\t\t\t\t$this->mMessages \t.= \"o su saldo(\" . $this->mSaldoActual . \") es Mayor al Monto a retirar($monto) \\r\\n\";\n\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( setNoMenorQueCero($this->mPeriodoCuenta) == 0 ){ $this->mPeriodoCuenta\t= 1; }\n\t\t\t\t\tif ( setNoMenorQueCero($this->mSocioTitular) <= DEFAULT_SOCIO){\t$this->init();\t}\n\n\t\t\t\t\tif ($fecha == false ){\n\t\t\t\t\t\tif ( isset($this->mFechaOperacion) AND ($this->mFechaOperacion != false)) {\n\t\t\t\t\t\t\t$fecha = $this->mFechaOperacion;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$fecha = fechasys();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$fecha\t\t\t\t\t= setFechaValida($fecha);\n\t\t\t\t\t$this->mFechaOperacion\t= $fecha;\n\t\t\t\t\t$socio\t\t\t\t\t= $this->mSocioTitular;\n\n\t\t\t\t\t$CRecibo = new cReciboDeOperacion(8, true);\n\t\t\t\t\t//Set a Mvto Contable\n\t\t\t\t\t//Agregar recibo si no hay\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) == 0 ){\n\t\t\t\t\t\t$recibo = $CRecibo->setNuevoRecibo($socio, $this->mNumeroCuenta,\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mFechaOperacion, $this->mPeriodoCuenta, 8,\n\t\t\t\t\t\t\t\t\t\t\t\t$observaciones, $cheque, $tipo_de_pago, $recibo_fiscal, $grupo );\n\t\t\t\t\t\tif (setNoMenorQueCero( $recibo ) == 0 ){\n\t\t\t\t\t\t\t$this->mMessages\t.= \"OK\\tSe Agrego Exitosamente el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t\t$this->mSucess\t\t= true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tSe Fallo al Agregar el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) > 0 ){\n\t\t\t\t\t//Agregar el Movimiento\n\t\t\t\t\t\t$CRecibo->setNumeroDeRecibo($recibo);\n\t\t\t\t\t\t$CRecibo->setNuevoMvto($fecha, $monto, $this->mOperacionRetiro, $this->mPeriodoCuenta, $observaciones, -1, TM_CARGO, $socio, $this->mNumeroCuenta);\n\t\t\t\t\t\t$CRecibo->setFinalizarRecibo(true);\n\t\t\t\t\t\t$CRecibo->setFinalizarTesoreria();\n\t\t\t\t\t\t$this->mNuevoSaldo\t= $this->mSaldoAnterior - $monto;\n\n\t\t\t\t\t\t$this->mSucess\t= true;\n\t\t\t\t\t\t///Actualizar el recibo\n\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t//Actualizar la Cuenta\n\t\t\t\t\t\t$this->setUpdateSaldo();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tNo Existe Recibo con el cual trabajar($recibo) \\r\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mMessages\t.= $CRecibo->getMessages();\n\t\t\t\t\t$this->mORec\t\t= $CRecibo;\n\t\t\t\t}\n\t\t}\n\n\t\treturn $recibo;\n\t}",
"public function avisoSubirRecibo()\n {\n if (Auth::user()->paymenttype->tipopago !== 'Domiciliación a mi cuenta') {\n if (!Auth::user()->corrientepago) {\n $fecha = Carbon::now()->format('Y-m-d');\n $codigo = 'WIMPRECI';\n $aviso = 'Por favor, Ud. debe hacernos llegar el recibo o justificante del pago de\n su cuota de socio.';\n $solucion = 'Escanéelo en formato pdf y realice una de las siguientes acciones: a)\n Súbalo a esta aplicación. Si desea optar por esta solución abra el desplegable con su\n nombre en la parte superior de la página y acceda a su perfil donde encontrará la opción\n correspondiente. b) Deposítelo en nuestro buzón. c) Entréguelo personalmente en nuestro\n despacho sito en la planta superior sobre la secretaría del colegio. Le recomendamos que\n domicilie el pago de su cuota, así se evitará recibir este aviso en sucesivas ocasiones.';\n $user_id = Auth::user()->id;\n\n return $this->avisos->crearAviso($codigo, $fecha, $aviso, $solucion, $user_id);\n }\n }\n }",
"function VerificarRegistrosNuevos(){\n $obCon = new Backups($_SESSION['idUser']);\n $sql=\"SHOW FULL TABLES WHERE Table_type='BASE TABLE'\";\n $consulta=$obCon->Query($sql);\n $i=0;\n $RegistrosXCopiar=0;\n $TablasLocales=[];\n \n while ($DatosTablas=$obCon->FetchArray($consulta)){\n $Tabla=$DatosTablas[0];\n if($Tabla<>'precotizacion' and $Tabla<>'preventa'){\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n if($TotalRegistros>0){ \n $RegistrosXCopiar=$RegistrosXCopiar+$TotalRegistros;\n $TablasLocales[$i][\"Nombre\"]=$Tabla;\n $TablasLocales[$i][\"Registros\"]=$TotalRegistros;\n $i++; \n }\n }\n }\n\n print(\"OK;$RegistrosXCopiar;\".json_encode($TablasLocales, JSON_FORCE_OBJECT));\n }",
"function REMUNERACION_DIARIA($_ARGS) {\r\n\t$sueldo_normal_diario = REDONDEO(($_ARGS['ASIGNACIONES']/30), 2);\r\n\t$sql = \"SELECT SUM(tnec.Monto) AS Monto\r\n\t\t\tFROM\r\n\t\t\t\tpr_tiponominaempleadoconcepto tnec\r\n\t\t\t\tINNER JOIN pr_concepto c ON (tnec.CodConcepto = c.CodConcepto AND\r\n\t\t\t\t\t\t\t\t\t\t\t c.Tipo = 'I' AND\r\n\t\t\t\t\t\t\t\t\t\t\t c.FlagBonoRemuneracion = 'S')\r\n\t\t\tWHERE\r\n\t\t\t\ttnec.CodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\ttnec.Periodo = '\".$_ARGS['PERIODO'].\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) $field = mysql_fetch_array($query);\r\n\t$remuneracion_diaria = REDONDEO(($field['Monto']/30), 2);\r\n\t$monto = $sueldo_normal_diario + $remuneracion_diaria;\r\n\treturn $monto;\r\n}",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"public function procesar_relatorio($factura, $consultores, $costo_fijo, $co_usuario){\n \t$respuesta = false;\n\t\tif( $factura && $consultores && $co_usuario && $costo_fijo);\n\t {\n\t\t\t// Se hacen cero todos los totales\n\t\t\t$total_ganacias_netas = 0;\n\t\t\t$total_costo_fijo = 0;\n\t\t\t$total_comision = 0;\n\t\t\t$total_beneficio = array();\n\n\t\t\t// return resumen\n\t\t\t$resumen = array();\n\t\t\t// Para obtener los nombres completos\n\t\t\t$listado_nombre = $this->listado_no_usuario($co_usuario);\t\t\t\t \t\n\n\t\t\t// facturas agrupadas consultor-fecha\t\n\t\t\tforeach ($consultores as $i_consultor => $v_consultor) \n\t\t\t{\n\t\t\t\t// arreglo relatorio\n\t\t\t\t$l_relatorio = array();\n\t\t\t\t$total_beneficio = array();\n\t\t\t\t$fijo = 0;\n\t\t\t\t$nombre = '';\n\n\t\t\t\t// COSTO FIJO (Custo Fixo)\n\t\t\t\t$fijo = $this->costo_fijo($costo_fijo, $v_consultor['co_usuario']);\n\n\t\t\t\t// COSTO FIJO (Custo Fixo)\t\n\t\t\t\tif ($listado_nombre[$i_consultor]['co_usuario'] == $v_consultor['co_usuario']) \n\t\t\t\t{\n\t\t\t\t\t$nombre = $listado_nombre[$i_consultor]['no_usuario'];\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t// facturas agrupadas por fechas\t\n\t\t\t\tforeach ($v_consultor['data_emissao'] as $i_periodo => $v_periodo) \n\t\t\t\t{\n\t\t\t\t\t// se hacen cero\n\t\t\t\t\t$ganancias_netas = 0;\n\t\t\t\t\t$comision = 0;\n\n\t\t\t\t\t$total_ganacias_netas = 0;\n\t\t\t\t\t$total_costo_fijo = 0;\n\t\t\t\t\t$total_comision = 0;\n\n\t\t\t\t\t// lista de todas las facturas del consultor\n\t\t\t\t\t$lista_facturas = $factura[$i_consultor]['fatura'];\n\t\t\t\t\t\n\t\t\t\t\t// facturas\n\t\t\t\t\tforeach ($lista_facturas as $i_factura => $v_factura) \n\t\t\t\t\t{\n\t\t\t\t\t\t// CALCULO DE GANACIAS NETAS ( Receita Liquida )\n\t\t\t\t\t\t$valor_neto = $this->calcular_valor_neto($v_factura['valor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['total_imp_inc']);\n\t\t\t\t\t\t// CALCULO DE COMISIONES ( Comissão )\n\t\t\t\t\t\t$valor_comision = $this->calcular_valor_comision( $v_factura['valor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['total_imp_inc'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['comissao_cn']);\n\t\t\t\t\t \t// FACTURAS DEL MISMO PERIODO \n\t\t\t\t\t\tif ($v_factura[\"data_emissao\"] == $v_periodo)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GANACIAS NETAS ( Receita Liquida )\n\t\t\t\t\t\t\t$ganancias_netas = $this->calcular_ganancia_neta( $ganancias_netas, $valor_neto );\t\n\t\t\t\t\t\t\t// se suman todas las comisiones por mes de referencia\n\t\t\t\t\t\t\t$comision = ($comision + $valor_comision);\n\t\t\t\t\t\t\t// CALCULO DE BENEFICIO (Lucro)\n\t\t\t\t\t\t\t$beneficio = $this->calcular_beneficios($ganancias_netas, $fijo, $comision);\t\t\t\t\t\n\t\t\t\t\t\t\t// total beneficios\n\t\t\t\t\t\t\t$total_beneficio[$i_periodo] = $beneficio;\n\t\t\t\t\t\t \t// relatorio\n\t\t\t\t\t\t \t$l_relatorio[$i_periodo] = array('periodo' => $v_factura[\"data_emissao\"],\n\t\t\t\t\t\t \t\t\t\t\t\t\t 'ganacia-neta' => round($ganancias_netas, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'costo-fijo' => round($fijo, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'comision' => round($comision, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'beneficio' => round($beneficio, 3)\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// FIN FACTURAS DEL MISMO PERIODO \n\n\t\t\t\t\t\t\t// se suman todas las ganacias netas\n\t\t\t\t\t\t\t$total_ganacias_netas = ( $total_ganacias_netas + $valor_neto);\n\n\t\t\t\t\t\t\t// se suman todas las comisiones\n\t\t\t\t\t\t\t$total_comision = ( $total_comision + $valor_comision );\n\t\t\t\t\t}\n\t\t\t\t\t// fin facturas \n\n\t\t\t\t\t// se suman todos los costos fijos\n\t\t\t\t\t$total_costo_fijo = ($fijo * ($i_periodo+1));\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// fin facturas agrupadas por fechas\t\t\t\t\t\n\n\t\t\t// Se agrega el bloque completo de acuerdo al indice fecha del consultor\n\t\t\t$resumen[$i_consultor]['co_usuario'] = $v_consultor['co_usuario'];\n\t\t\t$resumen[$i_consultor]['no_usuario'] = $nombre;\t\t\t\t \n\t\t\t$resumen[$i_consultor]['periodos'] = $l_relatorio;\n\t\t\t$resumen[$i_consultor]['ganancias-netas'] = round( $total_ganacias_netas, 3);\n\t\t\t$resumen[$i_consultor]['costo-fijo'] = round( $total_costo_fijo, 3);\n\t\t\t$resumen[$i_consultor]['comision'] = round( $total_comision, 3);\n\t\t\t$resumen[$i_consultor]['beneficio'] = round( array_sum($total_beneficio), 3);\t\n\t\t\t$resumen[$i_consultor]['estado'] = $v_factura['co_fatura'];\n\n\t\t\t$total_ganacias_netas = 0;\n\t\t\t$total_costo_fijo = 0;\n\t\t\t$total_comision = 0;\n\n\t\t\t}\n\t\t\t// fin facturas agrupadas consultor-fecha\t\t\n\n\t\t$respuesta = $resumen;\n\t\t}\n\t return $respuesta;\n }",
"public function atualizarUsuarios($idusuario, $nome, $email, $senha, $senha_confirma, $telefone, $dtnascimento, $habilitado, $idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT count(*) as total from tbusuarios WHERE email = '$email' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n \n if($senha != $senha_confirma){\n return 2;\n }elseif ($senha == '' || $senha == null && $senha_confirma == '' || $senha_confirma == null ) {\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n echo $this->conexao->query($sql);\n }else{\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', senha='$senha', senha_confirma='$senha_confirma' dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n\n echo $this->conexao->query($sql);\n }\n }",
"public function modificarCantidadMerma($idProducto,$cantidadNueva){\n\t\t//obtenermos el producto caducado del inventario\n\t\t$this->db->where('idProducto',$idProducto);\n\t\t$query =$this->db->query(\"Select * \n\t\t\tfrom productos where idProducto = \". $idProducto .\" \");\n\n\t\t$canActual = 0;\n\t\t$query2 = \"\";\n\t\tif($query -> num_rows() > 0) :\n\t\t\tforeach ($query->result() as $prodCaducado) :\n\t\t\t\t//hacemos una consulta para buscar en el inventario del chofer, \n\t\t\t\t//si tenemos ese producto, le cambiamos uno\n\t\t\t\t$query2 =$this->db->query(\"\n\t\t\t\t\tselect \n\t\t\t\t\t\tp.idProducto as idProducto,\n\t\t\t\t\t\tdse.cantidadLleva as cantidad\n\t\t\t\t\tfrom \t\n\t\t\t\t\t\tdetalle_salidas_entradas as dse\n\t\t\t\t\tinner join \n\t\t\t\t\t\tsalidas_entradas as se on se.idSalidas_entradas = dse.idSalidas_entradas\n\t\t\t\t\tinner join \n\t\t\t\t\t\tproductos as p on p.idProducto = dse.idProducto \n\t\t\t\t\twhere \n\t\t\t\t\t\tp.nombre_producto = \". $prodCaducado->nombre_producto .\" and \n\t\t\t\t\t\tp.presentacion = \". $prodCaducado->presentacion .\" and\n\t\t\t\t\t\tp.precio_fabrica = \". $prodCaducado->precio_fabrica .\" and \n\t\t\t\t\t\tp.precio_publico = \". $prodCaducado->precio_publico .\" and \n\t\t\t\t\t\tp.status = 1 and \n\t\t\t\t\t\tp.fecha_caducidad > (SELECT CURRENT_DATE())\n\t\t\t\t\t\tlimit 1; \n\t\t\t\t\");\n\t\t\t\t//obtenemos la cantidad y la restamos \n\t\t\t\tif($query2 -> num_rows() > 0) :\n\t\t\t\t\t//si se encuentra ese producto en nuestro camion (inventario chofer)\n\t\t\t\t\tforeach ($query2->result() as $prodNuevo) :\n\t\t\t\t\t\t$idProducto = $prodNuevo->idProducto; \n\n\t\t\t\t\t\t$canActual = $prodNuevo->cantidad; \n\n\t\t\t\t\t\t//restamos la cantidad actual menos la que se vendio\n\t\t\t\t\t\tif($cantidadNueva > $canActual){\n\t\t\t\t\t\t\t//la cantidad es mayor que la q se tiene en inventario\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$cantidadNueva = $canActual - $cantidadNueva;\n\t\t\t\t\t\t\t$this->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \n\t\t\t\t\t\t\t\t\tdetalle_salidas_entradas \n\t\t\t\t\t\t\t\t\tSET cantidadRegreso = \". $cantidadNueva .\"\n\t\t\t\t\t\t\t\tWHERE idProducto = \". $idProducto .\";\n\t\t\t\t\t\t\t\");\n\t\t\t\t\t\t}\n\t\t\t\t\tendforeach;\n\t\t\t\telse: \n\t\t\t\t\treturn false;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\telse:\n\t\t\treturn false;\n\t\tendif;\n\t\t\n\t}",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_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_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_baja','fecha_baja','date');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('fecha_alta','fecha_alta','date');\n\t\t$this->setParametro('id_institucion','id_institucion','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('denominacion','denominacion','varchar');\n\t\t$this->setParametro('centro','centro','varchar');\n\t\t\n\t\t$this->setParametro('id_finalidads','id_finalidads','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}",
"static public function ctrEliminarReceta($receta){\n\n $idReceta = $receta;\n $tabla = \"Receta\";\n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n //ELIMINAMOS PRIMERO EL DETALLE DE LA VENTA\n\n $eliminoDetalle = ModeloRecetas::mdlEliminarDetalleReceta($tablaRecetaDetalle, $idReceta);\n\n //ELIMINAMOS LA RECETA\n\n $respuesta = ModeloRecetas::mdlEliminarReceta($tabla, $idReceta); \n\n if($respuesta==\"ok\"){\n\n echo 0;\n\n }else{\n\n echo 1;\n\n }\n }",
"public function atualizarClientes($reg,$nome,$rg,$cpf,$cnpj,$telefone,$dtnascimento,$habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n $_SESSION['nomeAnterior'] = $nome;\n\n $sql = \"SELECT reg,rg FROM tbclientes c WHERE reg = '$reg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($rg != $row['rg']){\n $sql = \"SELECT count(*) as existe FROM tbclientes c WHERE rg = '$rg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if ($row['existe'] >= 1 ) {\n return 0;\n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj', telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n }\n \n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj',telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n\n }\n\n \n\n }",
"function actualizarDeuda($acceso,$id_contrato){\n\treturn;\n\t/*\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select sum(cant_serv * costo_cobro) as deuda from contrato_servicio_deuda where id_contrato='$id_contrato' and status_con_ser='DEUDA'\");\n\t\t\t\t\tif($fila=row($acceso)){\n\t\t\t\t\t\t$deuda = trim($fila['deuda']);\n\t\t\t\t\t\t//echo \"<br>Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\";\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\");\n\t\t\t\t\t}\n\t\t\t\t\t*/\n}",
"static public function ctrRegistrarReceta(){\n\n if(isset($_POST[\"productoReceta\"])){\n\n if (preg_match('/^[0-9]+$/', $_POST[\"productoReceta\"])){\n\n $tabla = \"Receta\";\n $idProducto = $_POST[\"productoReceta\"];\n $listaInsumos = json_decode($_POST[\"listadoInsumos\"], true);\n\n $idReceta = ModeloRecetas::mdlRegistrarReceta($tabla, $idProducto);\n\n if ($idReceta != \"error\") {\n \n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n foreach ($listaInsumos as $key => $value) {\n \n $idInsumo = $value[\"idInsumo\"]; \n $Cantidad = $value[\"cantidadInsumo\"];\n \n $respuesta = ModeloRecetas::mdlRegistrarDetalleReceta($tablaRecetaDetalle, $idReceta, $idInsumo, $Cantidad);\n\n }\n\n if($respuesta = \"ok\"){\n\n echo'<script>\n swal({\n title:\"¡Registro Exitoso!\",\n text:\"¡La receta se registró correctamente!\",\n type:\"success\",\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }else{\n\n echo'<script>\n swal({\n title:\"¡Registro Fallido!\",\n text:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n type:\"error\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm: false\n });\n </script>';\n\n }\n\n }// fin if receta error\n\n\n } else {\n\n echo '<script>\n swal({\n title:\"¡Error!\",\n text:\"¡No ingrese caracteres especiales!\",\n type:\"warning\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm:false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }\n\n } //if isset\n \n }",
"function RegistrarNotasAnticipo($tipoCambioFac = 0,$montoAnticipo=0,$tagref, $monedaFactura, $fechaemision, $DebtorNo, $DebtorTransIDFactura, $tieneIVA,$idAnticipo,$ivaFactura, $db, $puntoVenta = 0, $nocuentaPuntoVenta = '', $nomClientePuntoVenta = ''){\n // *********************************************** //\n // ********************************************** //\n // ******** No dejar echo en la funcion *********//\n // ******** Declarar Variables a usar ******** //\n // ******** Afecta al punto de venta ********* //\n // ****************************************** //\n // ***************************************** //\n \n //global $db;\n $systype_doc = 13;\n /*$tipocambio = $_SESSION['Items' . $identifier]->CurrencyRate;\n $montoAnticipo = $LineAnticipo->Monto;\n $moneda = $_SESSION['Items' . $identifier]->CurrAbrev;\n $fecha = split(\"-\", $fechaemision) ;\n $DebtorNo = $_SESSION['Items' . $identifier]->DebtorNo;\n $tagref = $_SESSION['Items' . $identifier]->Tagref;\n $tieneIVA = $tieneIVA;\n $idAnticipo = $LineAnticipo->TransID;*/\n\n //echo \"<br> AnticipoIVA: \".$tieneIVA;\n $tipocambio = $tipoCambioFac;\n $montoAnticipo = $montoAnticipo;\n $monto = $montoAnticipo;\n $moneda = $monedaFactura;\n $fecha = explode(\"-\", $fechaemision) ;\n $DebtorNo = $DebtorNo;\n $tagref = $tagref;\n $tieneIVA = $tieneIVA;\n $idAnticipo = $idAnticipo;\n $ErrMsg = '';\n $DbgMsg = '';\n\n $InputError = 0;\n\n $FromDia = $fecha [2];\n $FromMes = $fecha [1];\n $FromYear = $fecha [0];\n $_POST['aplparcial'] = 2; // PARA TIMBRAR\n $_POST['cmbUsoCfdi'] = 'G02'; \n $_POST['cmbTipoComprobante'] = 'E';\n $_POST['cmbMetodoPago'] = 'PUE';\n $_POST['cmbTipoRelacion'] = '07';\n $_POST['paymentname'] = 'Aplicacion de anticipos';\n $vrcodepay = utf8_decode('Aplicacion de anticipos');\n $concepto = utf8_decode('Aplicacion de anticipos'); \n $vrcodeasat = '30';\n //$idSaldoAnticipo = $LineAnticipo->TransID;\n $DebtorTransID = $DebtorTransIDFactura ;\n\n $SQLDatosFactura= \"SELECT debtortrans.*, name FROM debtortrans\n INNER JOIN debtorsmaster ON debtortrans.debtorno = debtorsmaster.debtorno\n WHERE id =\" .$DebtorTransIDFactura;\n $resultFactura = DB_query($SQLDatosFactura, $db);\n $myrowFactura = DB_fetch_array($resultFactura);\n $TotalFactura = $myrowFactura['ovamount'] + $myrowFactura['ovgst'];\n $typeFactura = $myrowFactura['type'];\n $nombrecliente= $myrowFactura['name'];\n \n\n //echo \"<br> Tipo cambio BIEN\".$tipoCambioFacBIEN;\n\n $_POST ['TaxCat'] = 2;\n if($tieneIVA == '1'){\n $_POST ['TaxCat'] = 4;\n }\n\n $nocuenta = '';\n if ($puntoVenta == 1) {\n $nocuenta = $nocuentaPuntoVenta;\n } else {\n if (isset($_POST ['nocuenta'])) {\n $nocuenta = $_POST ['nocuenta'];\n }\n }\n\n $nomCliente = '';\n if ($puntoVenta == 1) {\n $nomCliente = $nomClientePuntoVenta;\n } else {\n if (isset($nombrecliente)) {\n $nomCliente = $nombrecliente;\n }\n }\n\n $_POST ['nocuenta'] = $nocuenta;\n\n $nombrecliente = $nomCliente;\n\n $SQLSaldoANT = \"SELECT debtortrans.*, bien.rate as cambiobien FROM debtortrans \n INNER JOIN debtortrans bien ON bien.id = debtortrans.ref1\n WHERE debtortrans.id ='\".$idAnticipo.\"'\"; \n\n //echo \"<br> saldo\".$SQLSaldoANT;\n $resultSaldoANT = DB_query($SQLSaldoANT, $db);\n $rowSaldoANT = DB_fetch_array($resultSaldoANT);\n $monedaSaldoANT = $rowSaldoANT['currcode'];\n $rateSaldoANT = $rowSaldoANT['rate'];\n $ivaSaldoANT = $rowSaldoANT['ovgst'];\n $tipoCambioFacBIEN= $rowSaldoANT['cambiobien'];\n \n\n //echo \"<br> Pruebas: \".$rowSaldoANT;\n //echo \"<br> saldo ANt: \".$rateSaldoANT;\n if ($InputError != 1) {\n $Result = DB_Txn_Begin($db);\n \n // Obtiene el trans no que le corsesponde en base al tagref y al $systype_doc\n $transno = GetNextTransNo($systype_doc, $db);\n \n $taxrate = 0;\n $montoiva = 0;\n $rate = ( $tipocambio);\n $DefaultDispatchDate = $FromDia . '/' . $FromMes . '/' . $FromYear;\n $fechaini = rtrim($FromYear) . '-' . rtrim($FromMes) . '-' . rtrim($FromDia);\n $diae = rtrim($FromDia);\n $mese = rtrim($FromMes);\n $anioe = rtrim($FromYear);\n $horax = date('H:i:s');\n $horax = strtotime($horax);\n $hora = date('H');\n $minuto = date('i');\n $segundo = date('s');\n $fechainic = mktime($hora, $minuto, $segundo, rtrim($mese), rtrim($diae), rtrim($anioe));\n $fechaemision = date(\"Y-m-d H:i:s\", $fechainic);\n $PeriodNo = GetPeriod($DefaultDispatchDate, $db, $tagref);\n $DefaultDispatchDate = FormatDateForSQL($DefaultDispatchDate);\n \n if (isset($_POST ['TaxCat']) and $_POST ['TaxCat'] != \"\") {\n $sqliva = \"SELECT taxrate,taxglcode,taxglcodepaid\n FROM taxauthrates, taxauthorities\n WHERE taxauthrates.taxauthority=taxauthorities.taxid\n AND taxauthrates.taxcatid =\" . $_POST ['TaxCat'];\n\n //echo \"<br> SQL IVA\".$sqliva;\n\n $result = DB_query($sqliva, $db);\n $myrow = DB_fetch_row($result);\n $taxrate = $myrow [0];\n $taxglcode = $myrow [1];\n $taxglcodepaid = $myrow [2];\n }\n\n // calcula iva y desglosa de iva\n // $montosiniva = $monto / (1 + $taxrate);\n // $montoiva = $monto - $montosiniva;\n\n $mntIVA = 0;\n if (isset($_POST['mntIVA'])) {\n $mntIVA = $_POST['mntIVA'];\n }\n\n // calcula iva y desglosa de iva\n if (($mntIVA == 0 || empty($mntIVA))) {\n //Iva del categoria impuestos\n $montosiniva = $monto / (1 + $taxrate);\n $montoiva = $monto - $montosiniva;\n }else{\n //Iva agregado manual\n $_SESSION['IvaManualAbonoDirectoClientes'] = 1;\n //\n $montosiniva = $monto - $mntIVA;\n //$montosiniva = $monto;\n $montoiva = $mntIVA;\n } \n // se valida ya que debe de acuerdo al iva de l factura\n //echo \"<br> ivaFactura2: \".$ivaFactura;\n if( (Round($TotalFactura,2) - Round($monto,2) < -.01) AND $tieneIVA ==1 AND $ivaFactura == 0){\n $monto = $montosiniva;\n $montoiva = $montosiniva - ($montosiniva/1.16);\n $montosiniva = ($montosiniva/1.16);\n $montoAnticipo = $monto;\n }\n \n // Datos del Periodo y fecha ***\n // $DefaultDispatchDate=Date($_SESSION['DefaultDateFormat'],CalcEarliestDispatchDate());\n // $PeriodNo = GetPeriod($DefaultDispatchDate, $db);\n \n // $DefaultDispatchDate = FormatDateForSQL($DefaultDispatchDate);\n // *****************************\n if ($_SESSION['MostrarCuentaNC']=='1') {\n $SQL=\"SELECT accountcode,\n concept AS accountname\n FROM chartbridge\n WHERE accountcode='\".$_POST['GLCode'].\"'\n ORDER BY accountcode\";\n $ResultR=DB_query($SQL, $db);\n $rowR=DB_fetch_array($ResultR);\n $concepto.=' '.$rowR['accountname'];\n }\n // Realiza el insert en la tabla de debtortrans\n $SQL = \"INSERT INTO debtortrans (`tagref`,\n `transno`,`type`,\n `debtorno`,`branchcode`,\n `origtrandate`,`trandate`,`prd`,\n `settled`,`reference`,`tpe`,`order_`,\n `rate`,`ovamount`,`ovgst`,`ovfreight`,\n `ovdiscount`,`diffonexch`,`alloc`,`invtext`,\n `shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,paymentname,nocuenta,userid)\";\n $SQL .= \" VALUES (\" . $tagref . \",\n \" . $transno . \",\" . $systype_doc . \",\n '\" . $DebtorNo . \"', '\" . $DebtorNo . \"','\" . $fechaemision . \"','\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rate . \"',\" . ($montosiniva * - 1) . \",\" . ($montoiva * - 1) . \",'0','0','0','0','','1','0','', 'FANT','NCR','NCR','\" . $moneda . \"','\" . $_POST ['paymentname'] . \"','\" . $_POST ['nocuenta'] . \"','\".$_SESSION['UserID'].\"')\";\n // echo '<pre>sql NC:'.$SQL;\n $result = DB_query($SQL, $db);\n \n $DebtorTransIDND = DB_Last_Insert_ID($db, 'debtortrans', 'id');\n\n // ***************************************************************************************************\n // **** CFDI Relacionados ****\n // ***************************************************************************************************\n // \n //******************GENERAR NOTA DE CARGO Y SE HACE LA APLICACION YA QUE ES SIN CONTABILIDAD****************** \n $systype_docN = 21;\n $transnoN = GetNextTransNo($systype_docN, $db); \n $SQLN = \"INSERT INTO debtortrans (`tagref`,\n `transno`,`type`,\n `debtorno`,`branchcode`,\n `origtrandate`,`trandate`,`prd`,\n `settled`,`reference`,`tpe`,`order_`,\n `rate`,`ovamount`,`ovgst`,`ovfreight`,\n `ovdiscount`,`diffonexch`,`alloc`,`invtext`,\n `shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,paymentname,nocuenta,userid)\";\n $SQLN .= \" VALUES (\" . $tagref . \",\n \" . $transnoN . \",\" . $systype_docN . \",\n '\" . $DebtorNo . \"', '\" . $DebtorNo . \"','\" . $fechaemision . \"','\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rateSaldoANT . \"',\" . ($montosiniva) . \",\" . ($montoiva) . \",'0','0','0','0','','1','0','', 'FANT','NCR','NCR','\" . $moneda . \"','\" . $_POST['paymentname'] . \"','\" . $_POST ['nocuenta'] . \"','\".$_SESSION['UserID'].\"')\";\n //echo '<pre>sql NC:'.$SQLN;\n $result = DB_query($SQLN, $db);\n $DebtorTransIDCargo = DB_Last_Insert_ID($db, 'debtortrans', 'id');\n\n $ISQL = \"INSERT INTO custallocns (datealloc,transid_allocfrom,amt,transid_allocto, rate_to,currcode_to, rate_from, currcode_from)\n VALUES ( NOW(),\" . $idAnticipo . ',' . abs($montoAnticipo) . ',' . $DebtorTransIDCargo . ',\"'.$tipocambio.'\", \"'.$moneda.'\", \"'.$rate.'\", \"'.$moneda.'\" )';\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".($montoAnticipo * -1 ).\" WHERE id = '\".$idAnticipo.\"' \" ;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".abs($montoAnticipo).\", settled=1 WHERE id = '\".$DebtorTransIDCargo.\"' \" ;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n //********************GENERAR NOTA DE CARGO Y SE HACE LA APLICACION YA QUE ES SIN CONTABILIDAD********************\n $percentDescription=\"\";\n if ($_SESSION['FacturaVersion']==\"3.3\") {\n\n $queryInsert=\"INSERT INTO notesorders_invoice(transid,transid_relacion,monto, tiporelacion_relacion, trandate)\";\n $queryInsert.=\" VALUES ('\".$DebtorTransIDND.\"','\".$DebtorTransID.\"',\".str_replace(\",\", \"\", $monto ).\", '\".$_POST['cmbTipoRelacion'].\"', NOW())\";\n\n\n // echo \" Consulta: <br> notesordes: \".$queryInsert;\n $result = DB_query($queryInsert, $db);\n\n // SE HACE LA RELACION DE FACTURA CON NOTA DE CREDITO\n $ISQL = \"INSERT INTO custallocns (datealloc,transid_allocfrom,amt,transid_allocto, rate_to,currcode_to, rate_from, currcode_from )\n VALUES (NOW(),\" . $DebtorTransIDND . ',' . abs($monto ) . ',' . $DebtorTransID . ', \"'.$tipocambio.'\", \"'.$moneda.'\", \"'.$rate.'\", \"'.$moneda.'\")';\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \". (abs($monto ) * -1 ).\", settled=1 WHERE id = '\".$DebtorTransIDND.\"' \" ;\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".abs($monto).\" WHERE id = '\".$DebtorTransID.\"' \" ;\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n // SE HACE LA RELACION DE FACTURA CON NOTA DE CREDITO\n \n \n if ($result && 1 == 2) {\n $banderaEx = 0;\n if ($banderaEx > 0) {\n while ($rse = DB_fetch_array($rrr)) {\n $queryFolio=\"SELECT REPLACE(folio,'|','') as folio FROM debtortrans WHERE id = '\".$rse['transid_relacion'].\"'\";\n $resultFolio = DB_query($queryFolio, $db);\n $myrowFolio = DB_fetch_array($resultFolio);\n $percentDescription .= \", aplicado al folio: \" .$myrowFolio['folio'] ;// \", \" . number_format((($rse['monto']/$monto) * 100), '0', '.', '') .\" % al saldo del folio: \" .$myrowFolio['folio'] ;\n }\n } else {\n $queryFolio=\"SELECT REPLACE(folio,'|','') as folio FROM debtortrans WHERE id = '\".$_POST['InvoiceTransId_'.$index].\"'\";\n $resultFolio = DB_query($queryFolio, $db);\n $myrowFolio = DB_fetch_array($resultFolio);\n $percentDescription .= \", aplicado al folio: \" .$myrowFolio['folio'] ;//$percentDescription .= \", \" . number_format((( str_replace(\",\", \"\", $_POST['InvoiceAmount_'.$index])/$monto) * 100), '0', '.', '') .\" % al saldo del folio: \" .$myrowFolio['folio'] ;\n }\n }\n //SE CREA INSERT PARA REGISTRAR LA RELACION DE LA FACTURA CON EL ANTICIPO\n $SQLAnt = \"UPDATE salesinvoiceadvance SET transidncredito = '\".$DebtorTransIDND.\"' , montoncredito = '\".str_replace(\",\", \"\", $monto).\"', transidncargo = '\".$DebtorTransIDCargo.\"' WHERE transidinvoice = '\".$DebtorTransID.\"' AND transidanticipo = '\".$idAnticipo.\"';\";\n $resultado = DB_query($SQLAnt, $db);\n\n //SE CREA INSERT PARA REGISTRAR LA RELACION DE LA FACTURA CON EL ANTICIPO\n\n $querySelect=\"select notesorders_invoice.transid_relacion,(abs(notesorders_invoice.monto)) AS ovamount ,codesat,c_paymentid,paymentname\n from notesorders_invoice\n left join debtortrans on notesorders_invoice.transid_relacion = debtortrans.id\n where notesorders_invoice.transid='\".$DebtorTransIDND.\"'\n order by notesorders_invoice.monto desc limit 1;\";\n $resultSelect = DB_query($querySelect, $db);\n\n if (DB_num_rows($resultSelect)) {\n $myrowResult=DB_fetch_array($resultSelect);\n\n if ($myrowResult['codesat']==null or $myrowResult['codesat']=='') {\n $queryGetCod=\"SELECT debtortrans.paymentname, paymentmethods.codesat\n FROM debtortrans \n INNER JOIN paymentmethods ON paymentmethods.paymentname= debtortrans.paymentname\n WHERE id='\".$myrowResult['transid_relacion'].\"'\n LIMIT 1\";\n $resultGetc = DB_query($queryGetCod, $db);\n if (DB_num_rows($resultGetc)) {\n $myrowGet=DB_fetch_array($resultGetc);\n\n //$vrcodeasat=$myrowGet['codesat'];\n //$vrcodepay=$myrowGet['paymentname'];\n }\n if ($_SESSION['UserID'] == 'desarrollo') {\n //echo '<pre> paymentname:'.$queryGetCod;\n //echo htmlentities($arrayGeneracion['xml']);\n }\n } else {\n //$vrcodeasat=$myrowResult['codesat'];\n //$vrcodepay=$myrowResult['paymentname'];\n }\n\n $vrcodepayid= $_POST['cmbMetodoPago'];\n \n \n $percentDescription = \"\"; // se deja vacio ya que la descripción solo permite 1000 caracteres, si no se timbra, se agrega solo en PDF\n\n $queryUpdate=\"UPDATE debtortrans SET paymentname='\".$vrcodepay.\"',codesat='\".$vrcodeasat.\"',c_TipoDeComprobante='E',c_paymentid='\".$vrcodepayid.\"',c_UsoCFDI='\".$_POST['cmbUsoCfdi'] .\"',invtext=concat(invtext,' ', '\".$percentDescription.\"') WHERE id='\".$DebtorTransIDND.\"'\";\n //echo \"<br>sqlUpdate:<pre>\".$queryUpdate;\n\n $result = DB_query($queryUpdate, $db);\n } else {\n $percentDescription = \"\"; // se deja vacio ya que la descripción solo permite 1000 caracteres, si no se timbra, se agrega solo en PDF\n\n $queryUpdate=\"UPDATE debtortrans SET paymentname='\".$_POST['paymentname'].\"',codesat='\".$vrcodeasat.\"',c_TipoDeComprobante='E',c_paymentid='\".$_POST['cmbMetodoPago'].\"',c_UsoCFDI='\".$_POST['cmbUsoCfdi'] .\"',invtext=concat(invtext,' ', '\".$percentDescription.\"') WHERE id='\".$DebtorTransIDND.\"'\";\n //echo \"<br>sqlUpdate:<pre>\".$queryUpdate;\n\n $result = DB_query($queryUpdate, $db);\n }\n }\n \n \n // ***************************************************************************************************\n // **** AFECTACIONES CONTABLES ****\n // ***************************************************************************************************\n $rmontosiniva = ($montosiniva / $rate);\n $rmontosinivaANT = ($montosiniva / $tipoCambioFacBIEN);\n $rmontoiva = ($montoiva / $rate);\n $rmontoivaP = ($montoiva / $rateSaldoANT);\n $rmonto = ($monto / $rate);\n\n /*echo \"<br> MONTO; TOTAL total: \".$monto.\" \".$rate.\" \".($monto/$rate);\n echo \"<br> MONTO; TOTAL montoiva : \".$montoiva.\" \".$rateSaldoANT.\" \".($montoiva/$rateSaldoANT);\n echo \"<br> MONTO; TOTAL MONTO SIN IVA : \".$montosiniva.\" \".$rate.\" \".($montosiniva/$rate);\n echo \"<br> MONTO; TOTAL MONTO SIN IVA tipoCambioFacBIEN : \".$montosiniva.\" \".$tipoCambioFacBIEN.\" \".($montosiniva/$tipoCambioFacBIEN);*/\n //$montoiva = $ivaNotaCredito/$rate;\n //$rmonto = $montoNotaCredito/$rate;\n \n // Obtiene la cuentas contables que se afectaran\n // *****************************************\n // Se afecta la cuenta de CxC\n // *****************************************\n // $cuenta_cxc=$_SESSION['CompanyRecord']['debtorsact'];\n $SQLClient = \"SELECT typeid FROM debtorsmaster WHERE debtorno='\" . $DebtorNo . \"'\";\n $result_typeclient = DB_query($SQLClient, $db, $ErrMsg, $DbgMsg, true);\n \n if (DB_num_rows($result_typeclient) == 1) {\n $myrowtype = DB_fetch_array($result_typeclient);\n $tipocliente = $myrowtype ['typeid'];\n }\n \n if ($typeFactura == 110 ) {\n \n $cuenta_cxc = ClientAccount($tipocliente, 'gl_accountcontado', $db);\n }else{\n $cuenta_cxc = ClientAccount($tipocliente, 'gl_accountsreceivable', $db);\n }\n\n \n\n $diferenciCambiariaTotal = 0;\n $diferenciCambiariaIVA = 0;\n if($monedaSaldoANT== $moneda aND $moneda!=$_SESSION ['CountryOfOperation'] ){\n\n $diferenciCambiaria=Round( abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n\n $diferenciCambiariaIVA =Round( abs($montosiniva) /$rateSaldoANT - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n }elseif($monedaSaldoANT!=$_SESSION ['CountryOfOperation'] AND $moneda!=$_SESSION ['CountryOfOperation']){\n\n $diferenciCambiaria=Round(abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n $diferenciCambiariaIVA =Round( abs($montoiva) /$rateSaldoANT - (str_replace(\",\", \"\", $montoiva)/$rate),8) ;\n }elseif($monedaSaldoANT!=$_SESSION ['CountryOfOperation'] AND $moneda==$_SESSION ['CountryOfOperation']){\n\n $diferenciCambiaria=Round(abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n $diferenciCambiariaIVA =Round( abs($montoiva) /$rateSaldoANT - (str_replace(\",\", \"\", $montoiva)/$rate),8) ;\n }\n \n \n if ($montoiva != 0) {\n\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $taxglcode . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno . \" @\" . $nombrecliente . \" ',\n '\" . ($rmontoiva) . \"',\n '\" . $tagref . \"'\n )\";\n \n $result = DB_query($SQL, $db);\n\n if( abs($ivaSaldoANT) ==0 ){\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $taxglcodepaid . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno .' @TC:' . (1 / $rateSaldoANT). \" @\" . $nombrecliente . \" ',\n '\" . ($rmontoivaP *-1) . \"',\n '\" . $tagref . \"'\n )\";\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $result = DB_query($SQL, $db);\n\n }else{\n //$diferenciCambiaria = $diferenciCambiaria + $diferenciCambiariaIVA;\n }\n\n\n \n }\n \n // Obtiene la cuentas contables que se afectar�n\n // $cuenta_notacredito=$_SESSION['CompanyRecord']['creditnote'];\n\n $cuenta_notacredito= ClientAccount($tipocliente, 'gl_debtoradvances', $db);\n\n // *****************************************\n // Se afecta la cuenta de CxC\n // *****************************************\n \n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $cuenta_cxc . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno .' @TC:' . (1 / $tipoCambioFacBIEN). \" @\" . $nombrecliente . \" ',\n '\" . ($rmonto * - 1) . \"',\n '\" . $tagref . \"'\n )\";\n // echo $SQL;\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $result = DB_query($SQL, $db);\n\n\n\n if(abs($diferenciCambiaria)>0){\n if (($diferenciCambiaria) >= 0) {\n $ctautilidadperdida = $_SESSION ['CompanyRecord'] ['exchangediffact'];\n } else {\n $ctautilidadperdida = $_SESSION ['CompanyRecord'] ['gllink_exchangediffactutil'];\n }\n \n // $PeriodNo = GetPeriod($_SESSION['AllocCustomer']->TransDate, $db, $_SESSION['AllocCustomer']->tagref);\n \n $reference = $DebtorNo . \"@UTIL/PERD CAMBIARIA@\" . $diferenciCambiaria . ' @TC:' . (1 / $rateSaldoANT).' cliente:'.($nombrecliente);\n // extrae porcentaje de iva\n \n //echo \"<br> diferencia cambiaria \".$diferenciCambiaria;\n \n $SQL = \"INSERT INTO gltrans (type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES ('\" . $systype_doc . \"',\n '\" . $transno. \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $ctautilidadperdida . \"',\n '\" . $reference . \"',\n '\" . ($diferenciCambiaria)*(-1) . \"',\n '\" . $tagref . \"')\";\n //echo \"<br>gltrans 510: \".$SQL;\n $ErrMsg = _ ( 'CRITICAL ERROR' ) . '! ' . _ ( 'NOTE DOWN THIS ERROR AND SEEK ASSISTANCE' ) . ': ' . _ ( 'The GL entry for the difference on exchange arising out of this allocation could not be inserted because' );\n $DbgMsg = _ ( 'The following SQL to insert the GLTrans record was used' );\n $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True);\n\n }\n \n \n // *****************************************\n // Se afecta la cuenta de Notas de Credito\n // *****************************************\n \n $DebtorTransIDGL = DB_Last_Insert_ID($db, 'gltrans', 'counterindex');\n \n $SQL = \"INSERT INTO debtortransmovs (`tagref`,`transno`,`type`,`debtorno`,`branchcode`,`origtrandate`,`trandate`,`prd`,`settled`,`reference`,`tpe`,`order_`,`rate`,`ovamount`,`ovgst`,`ovfreight`,`ovdiscount`,`diffonexch`,`alloc`,`invtext`,`shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,`idgltrans`,`userid`)\";\n $SQL .= \" VALUES (\" . $tagref . \", \" . $transno . \",\" . $systype_doc . \", '\" . $DebtorNo . \"', '\" . $DebtorNo . \"', now(), '\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rate . \"',\" . ($montosiniva * - 1) . \",\" . ($montoiva * - 1) . \",'0','0','0','0','','1','0','', 'NCR','NCR','NCR','\" . $moneda . \"',\" . $DebtorTransIDGL . \",'\" . $_SESSION ['UserID'] . \"')\";\n $result = DB_query($SQL, $db);\n \n // afecta cuentas de notas de credito\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $cuenta_notacredito . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno . \" @\" . $nombrecliente . \" ',\n '\" . $rmontosinivaANT . \"',\n '\" . $tagref . \"'\n )\";\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $msgexito = '<b>LA NOTA DE CREDITO SE HA GENERADO EXITOSAMENTE...';\n $result = DB_query($SQL, $db, $msgexito);\n \n if ($puntoVenta != 1) {\n prnMsg(_($msgexito), 'success');\n }\n $_SESSION['IvaManualAbonoDirectoClientes'] = 0;\n \n // imprimir datos de la nota de credito\n if (! isset($legaid) or $legaid == '' or ! isset($area) or $area == '') {\n $sql = \"Select legalid,areacode from tags where tagref=\" . $tagref;\n $result = DB_query($sql, $db);\n while ($myrow = DB_fetch_array($result, $db)) {\n $legaid = $myrow ['legalid'];\n $area = $myrow ['areacode'];\n }\n }\n \n // Consulta el rfc y clave de facturacion electronica\n $SQL = \" SELECT l.taxid,l.address5,t.tagname,t.typeinvoice, l.legalname\n FROM legalbusinessunit l, tags t\n WHERE l.legalid=t.legalid AND tagref='\" . $tagref . \"'\";\n \n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> SQL -> $SQL </pre>\";\n\n $Result = DB_query($SQL, $db);\n if (DB_num_rows($Result) == 1) {\n $myrowtags = DB_fetch_array($Result);\n $rfc = trim($myrowtags ['taxid']);\n $keyfact = trim($myrowtags ['address5']);\n $nombre = trim($myrowtags ['tagname']);\n $tipofacturacionxtag = $myrowtags ['typeinvoice'];\n $legalname = $myrowtags ['legalname'];\n // $nombre=\"SERVILLANTAS DE QUERETARO S.A. DE C.V.\";\n }\n\n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> tipofacturacionxtag -> $tipofacturacionxtag </pre>\";\n\n if ($tipofacturacionxtag == 0) {\n $InvoiceNoTAG = DocumentNext($systype_doc, $tagref, $area, $legaid, $db);\n } else {\n $InvoiceNoTAG = DocumentNext(11, $tagref, $area, $legaid, $db);\n }\n\n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> InvoiceNoTAG ->\". print_r($InvoiceNoTAG) .\"</pre>\";\n \n \n $separa = explode('|', $InvoiceNoTAG);\n $serie = $separa [1];\n $folio = $separa [0];\n // echo 'folio:'.$InvoiceNoTAG;\n \n $OrderNo = 0;\n $factelectronica = XSAInvoicingCreditdirect($transno, $OrderNo, $DebtorNo, $systype_doc, $tagref, $serie, $folio, $db);\n // Envia los datos al archivooooo\n $factelectronica = utf8_encode($factelectronica);\n \n if ($_SESSION['UserID'] == 'desarrollo') {\n echo '<pre> cadena de XSAInvoicingCreditdirect:'.$factelectronica;\n //echo htmlentities($arrayGeneracion['xml']);\n }\n \n $empresa = $keyfact . '-' . $rfc;\n $nombre = $nombre;\n $tipo = 'Notas de Credito';\n // if ($ambiente == \"desarrollo\") {\n // $tipo = 'NOTA DE CREDITO';\n // }\n \n // $tipo='NOTA DE CREDITO';\n $myfile = '';\n $factelectronica = $factelectronica;\n // echo '<pre><br>'.$factelectronica;\n $param = array (\n 'in0' => $empresa,\n 'in1' => $nombre,\n 'in2' => $tipo,\n 'in3' => $myfile,\n 'in4' => $factelectronica\n );\n \n // Seccion para validar si selecciono la opcion de timbrar o no\n if ($typeFactura == 119 ) {\n $flagsendfiscal = 0;\n }else{\n $flagsendfiscal = 1;\n }\n \n $ligaN = '';\n\n // Si se va a timbrar el documento entra a esta condicion\n //echo \"<br>tipofacturacionxtag:\". $tipofacturacionxtag;\n if ($flagsendfiscal == 1) {\n if ($tipofacturacionxtag == 1) {\n //echo \"entra1\";\n try {\n $client = new SoapClient($_SESSION ['XSA'] . \"xsamanager/services/FileReceiverService?wsdl\");\n $codigo = $client->guardarDocumento($param);\n } catch (SoapFault $exception) {\n $errorMessage = $exception->getMessage();\n }\n $liga = $_SESSION ['XSA'] . \"xsamanager/downloadCfdWebView?serie=\" . $serie . \"&folio=\" . $folio . \"&tipo=PDF&rfc=\" . $rfc . \"&key=\" . $keyfact;\n $liga = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $liga . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 2) {\n echo \"entra2\";\n $arrayGeneracion = generaXML($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n $XMLElectronico = $arrayGeneracion [\"xml\"];\n // Se agrega la generacion de xml_intermedio\n\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, ($arrayGeneracion [\"cadenaOriginal\"]), utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n $xmlImpresion = ( $array [\"xmlImpresion\"] );\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&\", $xmlImpresion);\n \n // Almacenar XML\n $XMLElectronico = str_replace(\"<?xml version='1.0' encoding='UTF-8'?>\", '<?xml version=\"1.0\" encoding=\"UTF-8\"?>', $XMLElectronico);\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n // $liga = \"PDFCreditDirect.php\";\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Type=13&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 3) {\n // $XMLElectronico=generaXML($factelectronica,'egreso',$tagref,$serie,$folio,$DebtorTransIDND,'NCreditoDirect',$OrderNo,$db);\n \n $ligaN = \"PDFNoteCreditDirectTemplate.php\";\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '&tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 4) {\n $success = false;\n $config = $_SESSION;\n //echo \"<br>---\".$_SESSION['FacturaVersion'];\n if ($_SESSION['FacturaVersion'] == \"3.3\") {\n //echo \"<br>generaXMLCFDI3_3:\";\n $arrayGeneracion = generaXMLCFDI3_3($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n } else {\n $arrayGeneracion = generaXMLCFDI($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n }\n \n $XMLElectronico = $arrayGeneracion [\"xml\"];\n $XMLElectronico = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\"?>', '', $XMLElectronico);\n\n if ($_SESSION['UserID'] == 'aenriquez' or $_SESSION['UserID'] == 'desarrollo') {\n //echo '<pre>'.$factelectronica;\n //echo '<br>XMLElectronico: <br><pre>'.htmlentities($XMLElectronico);\n }\n \n //require_once '../../.././' .'timbradores/TimbradorFactory.php';\n //include_once 'timbradores/TimbradorFactory.php';\n $timbrador = TimbradorFactory::getTimbrador($config);\n if ($timbrador != null) {\n $timbrador->setRfcEmisor($rfc);\n $timbrador->setDb($db);\n $cfdi = $timbrador->timbrarDocumento($XMLElectronico);\n $success = ($timbrador->tieneErrores() == false);\n foreach ($timbrador->getErrores() as $error) {\n if ($puntoVenta != 1) {\n prnMsg($error, 'error');\n }\n }\n } else {\n if ($puntoVenta != 1) {\n prnMsg(_('No hay un timbrador configurado en el sistema'), 'error');\n }\n }\n \n if ($success) {\n if ($_SESSION['UserID'] == \"desarrollo\") {\n echo '<br>success';\n }\n // leemos la informacion del cfdi en un arreglo\n $DatosCFDI = TraeTimbreCFDI($cfdi);\n if (strlen($DatosCFDI ['FechaTimbrado']) > 0) {\n //$cadenatimbre = '||1.1|' . $DatosCFDI ['UUID'] . '|' . $DatosCFDI ['FechaTimbrado'] . '|' . $DatosCFDI ['selloCFD'] . '|' . $DatosCFDI ['noCertificadoSAT'] . '||';\n $cadenatimbre = '||1.1|' . $DatosCFDI ['UUID'] . '|' . $DatosCFDI ['FechaTimbrado'] .'|' . $DatosCFDI ['RfcProvCertif']. '||' . $DatosCFDI ['SelloCFD'] . '|' . $DatosCFDI ['NoCertificadoSAT'] . '||';\n \n // guardamos el timbre fiscal en la base de datos para efectos de impresion de datos\n $sql = \"UPDATE debtortrans\n SET fechatimbrado='\" . $DatosCFDI ['FechaTimbrado'] . \"',\n uuid='\" . $DatosCFDI ['UUID'] . \"',\n timbre='\" . $DatosCFDI ['SelloSAT'] . \"',\n cadenatimbre='\" . $cadenatimbre . \"'\n where id=\" . $DebtorTransIDND;\n \n $ErrMsg = _('El Sql que fallo fue');\n $DbgMsg = _('No se pudo actualizar el sello y cadena del documento');\n $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, true);\n $XMLElectronico = $cfdi;\n // Guardamos el XML una vez que se agrego el timbre fiscal\n \n $legalname= caracteresEspecialesFactura($legalname);\n \n $carpeta = 'NCreditoDirect';\n\n $dir = \"/var/www/html\" . dirname($_SERVER ['PHP_SELF']) . \"/companies/\" . $_SESSION ['DatabaseName'] . \"/SAT/\" . utf8_decode(addslashes((str_replace('.', '', str_replace(' ', '', $legalname))))) . \"/XML/\" . $carpeta . \"/\";\n\n //$dir=\"/var/www/html/erpdistribucion/companies/\".$_SESSION ['DatabaseName'].\"/SAT/\".utf8_decode(addslashes((str_replace ( '.', '', str_replace ( ' ', '', $legalname ) )))).\"/XML/NCreditoDirect/\";\n \n if ($puntoVenta == 1) {\n // Si es punto de venta quitar carpetas\n $dir = str_replace('mvc/api/v1/', '', $dir);\n }\n\n \n $nufa = $serie . $folio;\n $mitxt = $dir . $nufa . \".xml\";\n if ($puntoVenta != 1) {\n unlink($mitxt);\n }\n \n //echo \"<br>\".$mitxt;\n // Se modifico la fucion\n $fp = fopen($mitxt, \"w\");\n fwrite($fp, $XMLElectronico);\n fclose($fp);\n\n \n $fp = fopen($mitxt . '.COPIA', \"w\");\n fwrite($fp, $XMLElectronico);\n fclose($fp);\n //Se agrega la generacion de xml_intermedio\n \n $XMLElectronico_Impresion=\"\";\n if ($_SESSION['FacturaVersion'] == \"3.3\") {\n $XMLElectronico_Impresion = generaXMLCFDI_Impresion($factelectronica, $XMLElectronico, $tagref, $db);\n }\n \n\n if (!empty($XMLElectronico_Impresion)) {\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico_Impresion, $cadenatimbre, utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $OrderNo, $db, 13, $tagref, $systype_doc, $transno);\n } else {\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, $cadenatimbre, utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n }\n \n\n //$array = generaXMLIntermedio ( $factelectronica, $XMLElectronico, $cadenatimbre, utf8_encode ( $arrayGeneracion [\"cantidadLetra\"] ), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno );\n\n $xmlImpresion = ( $array [\"xmlImpresion\"] );\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&\", $xmlImpresion);\n\n if ($_SESSION['UserID']=='desarrollo') {\n echo '<br>XMLElectronico: <br><pre>'.htmlentities($XMLElectronico);\n echo '<br>xmlImpresion: <br><pre>'.htmlentities($xmlImpresion);\n }\n\n // Almacenar XML//\n $XMLElectronico = str_replace(\"<?xml version='1.0' encoding='UTF-8'?>\", '<?xml version=\"1.0\" encoding=\"UTF-8\"?>', $XMLElectronico);\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n \n if ($puntoVenta != 1) {\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?Type=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n }\n } else {\n prnMsg(_('No fue posible realizar el timbrado del documento, verifique con el administrador; el numero de error es:') . $cfdi, 'error');\n // exit;\n }\n }\n } else {\n $ligaN = GetUrlToPrintNu($tagref, $area, $legaid, $systype_doc, $db);\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '&tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n }\n } else {\n //echo \"<br> flagsendfiscal\";\n // Documento No Fiscal\n $arrayGeneracion = generaXMLCFDI($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n $XMLElectronico = $arrayGeneracion [\"xml\"];\n \n // Se agrega la generacion de xml_intermedio\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, $arrayGeneracion [\"cadenaOriginal\"], utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n $xmlImpresion = utf8_decode($array [\"xmlImpresion\"]);\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&\", $xmlImpresion);\n\n \n // Insertar el registro en la tabla de XMLS\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n \n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n \n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?Type=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n \n /*$PrintDispatchNote = $rootpath . '/' . $liga . '?OrderNo=' . $OrderNo . '&TransNo=' . $BatchNo . '&Type=' . $tipodefacturacion;\n \n echo '<p class=\"page_title_text\">';\n echo '<img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _ ( 'Imprimir Recibo ' ) . '\" alt=\"\">' . ' ';\n echo '<a href=\"' . $PrintDispatchNote . '\" target=\"_blank\">';\n echo _ ( 'Imprimir Recibo PDF ' ) . '</a></p>';*/\n } // Fin de condicion para timbrar el documento o no\n \n // Actualizar el documento para folio\n $SQL = \"UPDATE debtortrans\n SET folio='\" . $serie . '|' . $folio . \"',\n flagfiscal= '\" . $flagsendfiscal . \"' \n WHERE transno=\" . $transno . \" and type=\" . $systype_doc;\n \n $ErrMsg = _('ERROR CRITICO') . '! ' . _('ANOTE EL ERROR') . ': ' . _('La Actualizacion para saldar la factura, no se pudo realizar');\n $DbgMsg = _('El SQL utilizado para el registro de la fatura es:');\n $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true);\n $Result = DB_Txn_Commit($db);\n\n if ($puntoVenta != 1) {\n echo '<p><div align=\"center\">';\n echo $ligaN;\n echo '</div>';\n }\n\n if (function_exists(\"updateGlTransAccountingInfo\")) {\n $valued = updateGlTransAccountingInfo($systype_doc, $transno, $db);\n }\n \n if ($puntoVenta != 1) {\n echo '<p><div align=\"center\">';\n echo '<a href=\"ReportCustomerInqueryV3.php?CustomerID=' . $DebtorNo . '\">';\n echo '<font size=2 face=\"arial\"><b>';\n echo _('IR AL ESTADO DE CUENTA DEL CLIENTE');\n echo '</b></font>';\n echo '</a>';\n echo '</div>';\n }\n }\n \n // ***************************************************************************************************\n // ***************************************************************************************************\n // ***************************************************************************************************\n}",
"function ProjetosRealizadosCliente($empresa = null) {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos WHERE id_projetos_empresas_id = {$empresa}\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd2 = 1;\n }else{\n $qtd2 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd2);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}",
"function actualizarDinero($operacion, $cantidadDeposito, $cantidadRetirada){\n include (__ROOT__.'/backend/comprobaciones.php');\n global $db;\n $id = $_SESSION['loggedIn'];\n\n if($operacion === \"depositarDinero\"){\n //compruebo que las cantidades son un entero positivo\n if($cantidadDeposito >= 0){\n //comprobar que la cantidad que quiero retirar no supera la cantidad que tengo ingresada enBanco\n $miDinero = comprobarDinero();\n if($miDinero[0]['cash'] >= $cantidadDeposito){\n $sql = \"UPDATE personajes SET enBanco=enBanco + $cantidadDeposito, cash=cash-$cantidadDeposito WHERE id='$id'\";\n $stmt = $db->query($sql);\n header(\"location: ?page=zona&message=Exito\");\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n elseif ($operacion === \"retirarDinero\") {\n //compruebo que las cantidades son un entero positivo\n if($cantidadRetirada >= 0){\n //comprobar que la cantidad que quiero retirar no supera la cantidad que tengo ingresada enBanco\n $miDinero = comprobarDinero();\n if($miDinero[0]['enBanco'] >= $cantidadRetirada){\n $sql = \"UPDATE personajes SET cash=cash+$cantidadRetirada*0.95, enBanco=enBanco-$cantidadRetirada WHERE id='$id'\";\n $stmt = $db->query($sql);\n header(\"location: ?page=zona&message=Exito\");\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n \n}",
"function updateLevanteCabeza($arregloDatos) {\n if($arregloDatos[parcial]) {\n $arregloDatos[num_grupo] = $this->datos->ultimoGrupoCreado($arregloDatos) + 1;\n $this->datos->updateConteoParciales($arregloDatos);\n } else { // si no marco como parcial se hace de nuevo el conteo y se actualiza\n $gruposcreados = $this->datos->ultimoGrupoCreado($arregloDatos);\n $grupossolicitados = $this->datos->ultimoGrupo($arregloDatos);\n if(grupossolicitados > $gruposcreados) { // se decidio no crear el parcial\n $arregloDatos[num_grupo] = $gruposcreados; // se actualiza el numero real de grupos\n $this->datos->updateConteoParciales($arregloDatos);\n }\n }\n $arregloDatos[mostrar] = 1;\n $this->datos->setCabezaLevante($arregloDatos);\n $arregloDatos[plantilla] = 'levanteCabeza.html';\n $arregloDatos[thisFunction] = 'getCabezaLevante';\n $this->pantalla->setFuncion($arregloDatos,$this->datos);\n }",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_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_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('moneda','moneda','int4');\n\t\t$this->setParametro('cuenta','cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','bpchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado_cuenta','estado_cuenta','bpchar');\n\t\t$this->setParametro('banco','banco','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 imprimirRegistrosDeDistribuidores() {\n $distribuidores = $this->db\n ->select('di_id,di_usuario,di_direita,di_esquerda')\n ->where('cb_data_hora >=', '2014-02-22')\n ->join('conta_bonus', 'cb_distribuidor=di_id')\n ->group_by('di_id')\n ->get('distribuidores')->result();\n\n $dataInicio = '2014-02-26';\n $dataFinal = '2014-04-08';\n\n $dias = $this->getArrayDias($dataInicio, $dataFinal);\n\n echo \"<table width='800px' cellpadding='5' border='1' cellspacing='0'>\";\n\n foreach ($distribuidores as $distribuidor) {\n echo \"<tr>\";\n echo \"<td colspan='4' style='color:blue'><br><br><b>\" . $distribuidor->di_usuario . \"</b></td>\";\n echo \"</tr>\";\n foreach ($dias as $dia) {\n $plPaga = $this->plFoiPaga($dia, $distribuidor->di_id);\n\n if ($plPaga) {\n foreach($plPaga as $k=> $plP){\n echo \"<tr>\";\n echo \"<td>\" . $this->dataPersonalizada($dia) . \"</td>\";\n echo \"<td>\" . $plP->cb_id . \"</td>\";\n echo \"<td>\" . $plP->cb_descricao . \"</td>\";\n echo \"<td>\" . $plP->cb_credito . \"</td>\";\n echo \"<td>p-\" . count($k+1) . \"</td>\";\n echo \"</tr>\";\n }\n } else {\n //new bonus_pl_nova($distribuidor, $dia);\n echo \"<tr>\";\n echo \"<td>\" . $this->dataPersonalizada($dia) . \"</td>\";\n echo \"<td>--</td>\";\n echo \"<td>--</td>\";\n echo \"<td>-,--</td>\";\n echo \"<td>-</td>\";\n echo \"</tr>\";\n }\n }\n }\n\n echo \"</table>\";\n }",
"function Recalcular_Saldo_Venta_AddCobro($idventa){\n\t$datosventa\t\t=\tregistro( runsql(\"select fecha, monto,saldo from ventas where id_venta='$idventa'\") ); \n\t$datoscobros\t=\trunsql(\"select id_cobro,fecha,monto,saldo,moneda from cobros where id_venta='$idventa' order by id_cobro desc LIMIT 1 OFFSET 0 ;\"); // AGARRA EL ULTIMO\n\t$tcUSD\t=\tTipoCambio('USD',$datosventa[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datosventa[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Pagado\t=\t0;\n\t$SubMonto\t\t=\t0;\n\t$Saldo_Anterior\t=\t$datosventa[saldo];\n\twhile($i=registro($datoscobros)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcUSD;\n\t\t\t\techo $Monto_Pagado;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcEUR;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcQUE;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t}\n\t$Saldo_Actual\t=\t$Saldo_Anterior\t - $Monto_Pagado;\n//\techo \"<br>**************\". $Saldo_Actual\t.\"=\".\t$Saldo_Anterior\t .\"-\". $Monto_Pagado.\" ****<br>\";exit();\n\t$campos=Array();\n $campos[saldo]\t=\t$Saldo_Actual;\n\t$ins=actualizar(\"ventas\",$campos,\"id_venta = '$idventa'\");\n\t//recalcular_saldo_venta($idventa);\n\t//echo \"<br>actualizar(ventas,\".$Saldo_Actual.\",id_venta = $idventa\"; \texit();\n\treturn $Saldo_Actual;\n}",
"function Recalcular_Monto_Compra($idcompra){\n//echo \"idcompra=\".$idcompra;\n\t$datoscompra\t\t=\tregistro( runsql(\"select fecha from compras where id_compra='$idcompra'\") );\n\t$datoscompradet\t\t=\trunsql(\"select total,moneda from compras_det where id_compra='$idcompra';\");\n\t$tcUSD\t=\tTipoCambio('USD',$datoscompra[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datoscompra[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Compra=0;$SubMonto=0;\n\twhile($i=registro($datoscompradet)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcUSD;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcEUR;\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcQUE;\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t\t$Monto_Compra\t=\t$Monto_Compra + $SubMonto;\n\t\t$SubMonto\t\t=\t0;\n\t}\n\t$campos3=Array();\n $campos3[monto]\t=\t$Monto_Compra;\n\t$ins=actualizar(\"compras\",$campos3,\"id_compra = '$idcompra'\");\n}",
"function practicasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=2 and \r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n if ($res_origen->RecordCount() > 0) {\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n\r\n $fechadelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante);\r\n if ($fechadelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $diff = GetCountDaysBetweenTwoDates($fecha_comprobante, $fechadelarelacionada);\r\n if ($diff > $limite_dias) {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n }\r\n } else {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n return $ctrl;\r\n }\r\n}",
"public function unidadReceptoraReal($correspondencia_id) {\n \n // BUSCAR UNIDADES DE RECEPTORES ESTABLECIDOS\n $unidades_receptoras = array();\n $unidad_recibe_id = '';\n $receptores_establecidos = Doctrine::getTable('Correspondencia_Receptor')->findByCorrespondenciaIdAndEstablecido($correspondencia_id, 'S');\n foreach ($receptores_establecidos as $receptor_establecido) {\n $unidades_receptoras[] = $receptor_establecido->getUnidadId();\n if($receptor_establecido->getFuncionarioId() == $this->getUser()->getAttribute('funcionario_id')){\n // SI EL FUNCIONARIO LOGUEADO ES ESTABLECIDO COMO RECEPTOR SE SELECCIONA LA UNIDAD POR LA CUAL RECIBE\n $unidad_recibe_id = $receptor_establecido->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // EN CASO DE NO ENCONTRAR LA UNIDAD, BUSCAR SI LE FUE ASIGANADA LA CORRESPONDENCIA COMO UNA TAREA\n $receptor_asignado = Doctrine::getTable('Correspondencia_Receptor')->findOneByCorrespondenciaIdAndFuncionarioIdAndEstablecido($correspondencia_id, $this->getUser()->getAttribute('funcionario_id'), 'A');\n\n if($receptor_asignado){\n $unidad_recibe_id = $receptor_asignado->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // BUSCAR LAS UNIDADES A LA QUE PERTENECE EL FUNCIONARIO CON PERMISO DE LEER\n $unidades_receptoras = array_unique($unidades_receptoras);\n \n $funcionario_unidades_leer = Doctrine::getTable('Correspondencia_FuncionarioUnidad')->funcionarioAutorizado($this->getUser()->getAttribute('funcionario_id'),'leer');\n\n foreach($funcionario_unidades_leer as $unidad_leer) {\n if(array_search($unidad_leer->getAutorizadaUnidadId(), $unidades_receptoras)>=0){\n $unidad_recibe_id = $unidad_leer->getAutorizadaUnidadId();\n }\n }\n }\n \n return $unidad_recibe_id;\n }",
"public function Registrar_Licencia_noRemunerada3(HojaVida $data) {\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n if($data->lic_id_tipo == 5) \n { // Licencia 3 meses\n $tiporegistro = \"Solicitud Licencia no Remunerada (3 Meses)\";\n }\n else\n {\n $tiporegistro = \"Solicitud Licencia no Remunerada hasta por 2 años\";\n }\n\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario']; // idusuario que registra la solicitud de licencia\n \n $per_DI_other = $_POST['cedula_other'];\n $per_name_other = $_POST['nombre_other'];\n if($per_DI_other != \"\" && $per_name_other != \"\")\n {\n $id_usuario_soli = $_POST['id_servidor']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_POST['cedula_other'];\n $nombre_solicitante = $_POST['nombre_other'];\n $cargo_solicitante = $_POST['cargo_servidor'];\n }\n else\n {\n $id_usuario_soli = $_SESSION['idUsuario']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_SESSION['nomusu'];\n $nombre_solicitante = $_SESSION['nombre'];\n $cargo_solicitante = $_SESSION['cargo'];\n }\n try {\n\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n \n $sql = \"INSERT INTO `th_licencias_no_remunerada`(\n `lic_no_rem_id_tipo_resolucion`, \n `lic_no_rem_fecha_solicitud`, \n `lic_no_rem_fecha_escrito`, \n `lic_no_rem_cedula_servidor`, \n `lic_no_rem_nombre_servidor`, \n `lic_no_rem_fecha_inicio`, \n `lic_no_rem_fecha_fin`, \n `lic_no_rem_motivo`, \n `lic_no_rem_id_user`, \n `lic_no_rem_estado`,\n `lic_no_rem_ruta_doc_escrito`, \n `lic_no_rem_id_user_registra`, \n `lic_no_rem_cargo_cs`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->lic_id_tipo,\n $fechalog,\n $data->fecha_escrito,\n $cedula_solicitante,\n $nombre_solicitante,\n $data->fechaInicio,\n $data->fechaFin,\n $data->comentario,\n $id_usuario_soli,\n 0,\n $data->ruta_doc_adjunto, \n $idusuario, \n $cargo_solicitante\n )\n );\n $this->pdo->exec(\"INSERT INTO log (fecha, accion, detalle, idusuario, idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }",
"function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }"
]
| [
"0.65585566",
"0.6494105",
"0.6490734",
"0.6412446",
"0.63329184",
"0.6311352",
"0.63040525",
"0.6265099",
"0.6230874",
"0.62259394",
"0.62103623",
"0.62041384",
"0.61919856",
"0.616504",
"0.6161417",
"0.6156595",
"0.61555076",
"0.61513865",
"0.614656",
"0.6111529",
"0.6094495",
"0.6086805",
"0.6085322",
"0.6061705",
"0.6055367",
"0.6054091",
"0.6025196",
"0.60207635",
"0.6009634",
"0.599612"
]
| 0.6567973 | 0 |
/ Load all of the config files in $dir in ascending alphabetical order. The config files must return an associative array of config values. This function returns the final config data after all of the individual files have been processed. | function load_config_array(string $dir) {
$tmp = [];
$files = scandir($dir, SCANDIR_SORT_ASCENDING);
if ($files !== FALSE) {
foreach (array_diff($files, ['.', '..']) as $f) {
$inc = include($dir.'/'.$f);
if (gettype($inc) === 'array') {
$tmp = array_merge($tmp, $inc);
} else {
throw new Exception(
"Invalid configuration file. An array wasn't returned."
);
}
}
}
return $tmp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }",
"public function loadConfigs($confdir = null) {\n if (!is_object($this->shared)) {\n $this->shared = \\Ease\\Shared::instanced();\n }\n\n foreach (glob($confdir . '/*.json') as $configFile) {\n $this->shared->loadConfig($configFile, true);\n }\n\n $this->debug = \\Ease\\Functions::cfg('debug');\n $this->apiurl = \\Ease\\Functions::cfg('FLEXIBEE_URL');\n }",
"public static function parse($dir = null)\n {\n self::$dir = ($dir != null ? rtrim($dir,'/').'/': dirname(dirname(dirname(__FILE__))).'/config/');\n\n $config = (object) array();\n // No configuration needed!\n if(!is_dir(self::$dir)){ return $config; }\n\n if(!is_readable(self::$dir.self::$default_config.'.php')){ return $config; }\n\n $cfg_arr = (array) require_once self::$dir.self::$default_config.'.php';\n\n if(self::$check_keys){\n\n if(!empty($_SERVER[self::$environment_key]) && is_readable(self::$dir.$_SERVER[self::$environment_key].'.php')){\n $env_arr = (array) require_once self::$dir.$_SERVER[self::$environment_key].'.php';\n $cfg_arr = array_replace($cfg_arr,$env_arr);\n }\n\n if(!empty($_SERVER[self::$developer_key]) && is_readable(self::$dir.$_SERVER[self::$developer_key].'.php')){\n $dev_arr = (array) require_once self::$dir.$_SERVER[self::$developer_key].'.php';\n $cfg_arr = array_replace($cfg_arr,$dev_arr);\n }\n\n $config = (object) $cfg_arr;\n }\n return $config;\n }",
"function getConfigFiles($config_dir) {\n $files = array();\n foreach (glob($config_dir . '/*.yaml') as $file) {\n $files[] = $file;\n }\n return $files;\n }",
"private function loadFilesFromDir($dir) {\r\n global $db;\r\n $this->files = array();\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n $sql = \"SELECT `description` FROM `forms_tracking_files` WHERE `trackingId` = \" . $this->trackingFormId . \" AND `name` = '\" . $file . \"'\";\r\n $description = $db->getRow($sql);\r\n $description = $description['description'];\r\n array_push($this->files, array('name'=>$file, 'size'=>$size, 'description'=>$description));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n }",
"function getFiles($dir)\r\n{\r\n\tglobal $types, $debug, $globalGetFiles;\r\n\tif ( !isset($globalGetFiles[$dir]) )\r\n\t{\r\n\t\t$dir = cleanPath($dir);\r\n\t\t$files = array();\r\n\t\t$list = array();\r\n\t\t\r\n\t\t// Loop through each of the files in this directory\r\n\t\t$files = glob($dir.'/*');\r\n\t\tforeach ( $files as $file )\r\n\t\t{\r\n\t\t\tif ( !empty($debug) && empty($log) )\r\n\t\t\t{\r\n\t\t\t\t$log = \"getFiles(\".$dir.\")\\n----------\\n\";\r\n\t\t\t}\r\n\t\t\t// Check each file against the list of types in config.php\r\n\t\t\tforeach ( $types as $type )\r\n\t\t\t{\r\n\t\t\t\t// Lower case the file extension to be sure\r\n\t\t\t\tif ( substr(strtolower($file),-3) == $type )\r\n\t\t\t\t{\r\n\t\t\t\t\t$list[] = $file;\r\n\t\t\t\t\tif ( !empty($debug) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$log .= \"list[] = \".$file.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tunset($files);\r\n\t\t// Alphabetize files in case insensitive order\r\n\t\tnatcasesort($list);\r\n\t\tif ( !empty($debug) )\r\n\t\t{\r\n\t\t\t$log .= \"\\n\";\r\n\t\t\tdebugLog($log);\r\n\t\t}\r\n\t\t$globalGetFiles[$dir] = $list;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$list = $globalGetFiles[$dir];\r\n\t}\r\n\treturn $list;\r\n}",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"function load_results($dir) {\n\n\t\t$data = array();\n\n\t\t$fs_dir = opendir($dir);\n\t\twhile ($fs = readdir($fs_dir)) {\n\n\t\t\tif ((! is_dir(\"$dir/$fs\")) || (in_array($fs,array('.','..')))) { continue; }\n\n\t\t\techo \"$dir/$fs\\n\";\n\n\t\t\t$data[$fs] = array();\n\n\t\t\t$pgbs_dir = opendir(\"$dir/$fs\");\n\t\t\twhile ($pgbs = readdir($pgbs_dir)) {\n\n\t\t\t\tif ($pgbs == '.' || $pgbs == '..') { continue; }\n\n\t\t\t\techo \"\\t$pgbs:\";\n\n\t\t\t\t$data[$fs][$pgbs] = array();\n\n\t\t\t\t$fsbs_dir = opendir(\"$dir/$fs/$pgbs\");\n\t\t\t\twhile ($fsbs = readdir($fsbs_dir)) {\n\n\t\t\t\t\tif ($fsbs == '.' || $fsbs == '..') { continue; }\n\n\t\t\t\t\techo \" $fsbs\";\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['hash'] = md5(\"$fs/$pgbs/$fsbs\" . microtime(true));\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench'] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['ro'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/ro\", 1);\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['rw'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/rw\", 9);\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['tpch'] = load_tpch(\"$dir/$fs/$pgbs/$fsbs/tpch\");\n\n\t\t\t\t}\n\t\t\t\tclosedir($fsbs_dir);\n\t\t\t\techo \"\\n\";\n\n\t\t\t}\n\t\t\tclosedir($pgbs_dir);\n\n\t\t}\n\t\tclosedir($fs_dir);\n\n\t\treturn $data;\n\t}",
"public function load_files($dir = '') {\n $dir = trailingslashit($dir);\n if (!empty($dir) && is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (( $file = readdir($dh) ) !== false) {\n if (!in_array($file, array('.', '..')) && is_file($dir . $file) && 'php' == pathinfo($dir . $file, PATHINFO_EXTENSION)) {\n include_once( $dir . $file );\n }\n }\n closedir($dh);\n }\n }\n }",
"public static function loadConfigs( $path )\n {\n $path = Sanitize::toPath( $path );\n $output = [];\n\n if( !empty( $path ) && is_dir( $path ) )\n {\n foreach( glob( $path.\"/*.php\" ) as $file )\n {\n $key = Sanitize::toKey( basename( $file, \".php\" ) );\n $value = include_once( $file );\n $output[ $key ] = $value;\n }\n }\n return $output;\n }",
"public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }",
"protected function _Recusive_Load_Dir($dir) {\r\n if (!is_dir($dir)) { return; }\r\n // Load each of the field shortcodes\r\n foreach (new DirectoryIterator($dir) as $FileInfo) {\r\n // If this is a directory dot\r\n if ($FileInfo->isDot()) { continue; }\r\n // If this is a directory\r\n if ($FileInfo->isDir()) { \r\n // Load the directory\r\n $this->_Recusive_Load_Dir($FileInfo->getPathname());\r\n } // Otherwise load the file\r\n else {\r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.tpl') !== false) { continue; } \r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.php') === false) { continue; } \r\n // Include the file\r\n require_once($FileInfo->getPathname());\r\n }\r\n }\r\n }",
"public function getFromDir($dir){\n $files = scandir($dir);\n\n $cfdis = [];\n foreach ($files as $file){\n if(file_exists($dir.$file) && mime_content_type($dir.$file) == self::FILE_TYPE_XML){\n dump($dir.$file);\n $cfdi = new CfdiParser\\Parser($dir.$file);\n $cfdis[] = $cfdi->getCfdiArray();\n }\n \n /*if(is_file($dir.$file)){\n rename($dir.$file, $this->getBackupDir().$file);\n }*/\n \n //TODO: if is folder\n }\n \n return $cfdis;\n }",
"function load_tpch($dir) {\n\t\t$out = array();\n\t\t$out['stats'] = load_stats($dir);\n\t\t$out['queries'] = load_queries($dir);\n\t\treturn $out;\n\t}",
"function dirList ($dir) \n{\n $results = array();\n\n\tif(file_exists($dir)){\n\t\t// create a handler for the directory\n\t\t$handler = opendir($dir);\n\n\t\t// keep going until all files in directory have been read\n\t\twhile ($file = readdir($handler)) {\n\n\t\t\t// if $file isn't this directory or its parent, \n\t\t\t// add it to the results array\n\t\t\tif ($file != '.' && $file != '..')\n\t\t\t\t$results[] = $file;\n\t\t}\n\n\t\t// tidy up: close the handler\n\t\tclosedir($handler);\n\n\t\trsort($results);\n\t}\n\n // done!\n return $results;\n}",
"protected function loadConfigurations(): array\n {\n $config = [];\n\n foreach ($this->getConfigurationFiles() as $key => $file) {\n $config[$key] = require $file;\n }\n\n return $config;\n }",
"protected function _findConfigs()\n {\n foreach (new DirectoryIterator($this->_configPath) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n if ($fileInfo->isDir()) {\n continue;\n }\n if ($fileInfo->getExtension() !== 'xml') {\n continue;\n }\n\n $name = str_replace('.' . $fileInfo->getExtension(), '', $fileInfo->getFilename());\n $this->_configFiles[$name] = [\n 'name' => $name,\n 'basename' => $fileInfo->getBasename(),\n 'pathname' => $fileInfo->getPathname(),\n ];\n }\n }",
"private function loadCss($dir)\n {\n $css = [];\n if(file_exists($dir.'objavi.css')){\n $css[] = file_get_contents($dir.'objavi.css');\n }\n if(file_exists($dir.'css/extra.css')){\n $css[] = file_get_contents($dir.'css/extra.css');\n }\n\n return $css;\n }",
"private function loadLanguageFile($dir)\n {\n if (is_file($f = \"{$dir}{$this->coreI18N->language}_{$this->charSet}.php\")\n ||\n is_file($f = \"{$dir}{$this->coreI18N->language}.php\")\n ||\n is_file($f = \"{$dir}en.php\")\n ) {\n @include $f;\n } else {\n $lan = array();\n }\n\n return $lan;\n }",
"public function loadAll()\n {\n $this->setAll(array());\n $d = dir($this->getPath());\n $this->load($d);\n $d->close();\n }",
"private function loadArray(){\n if(file_exists($this->fullPath.$this->arrayFile)){\n include_once($this->fullPath.$this->arrayFile);\n if(!empty($arCfg)){\n $this->loadConfigs($arCfg);\n }\n }\n }",
"protected function loadVersion($dir)\n {\n if (!defined('sugarEntry')) {\n define('sugarEntry', true);\n }\n\n $sugar_version = $sugar_flavor = null;\n include \"$dir/sugar_version.php\";\n $sugar_flavor = strtolower($sugar_flavor);\n return array($sugar_version, $sugar_flavor);\n }",
"private function _parse( $dir )\n {\n foreach ( scandir( $dir ) as $file )\n {\n if ( '.' === $file || '..' === $file )\n {\n continue;\n }\n\n if ( is_dir( $dir . DS . $file ) )\n {\n $this->_dirs[ ] = $dir . DS . $file;\n\n $this->dirHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'file' === filetype( $dir . DS . $file ) )\n {\n $this->fileHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'link' === filetype( $dir . DS . $file ) )\n {\n $this->linkHandles[ ] = $dir . DS . $file;\n }\n }\n }",
"protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }",
"public function readConfigFiles()\n {\n $sugar_config = array();\n if (is_readable('config.php')) {\n include 'config.php';\n }\n $oldConfig = $sugar_config;\n if (is_readable('config_override.php')) {\n include 'config_override.php';\n }\n return array($oldConfig, deepArrayDiff($sugar_config, $oldConfig));\n }",
"function &loadModules($dirName) {\n\t\t// Ensure modules/ is on include_path\n\t\tset_include_path(implode(PATH_SEPARATOR, array(\n\t\t\trealpath($dirName),\n\t\t\tget_include_path(),\n\t\t)));\n\n\t\t$modules = array();\n\t\t$modulesDir = dir($dirName);\n\n\t\twhile (false !== ( $directory = $modulesDir->read() )) {\n\t\t\tif ($directory == \".\" || $directory == \"..\" || $directory == \".svn\" || !is_dir($modulesDir->path . \"/\" . $directory) || !is_file ($modulesDir->path . \"/\" . $directory . \"/config.json\") )\n\t\t\t\tcontinue;\n\n\t\t\t$directory = realpath($modulesDir->path . \"/\" . $directory);\n\t\t\t/** basename of this module * */\n\t\t\t$bn = basename($directory);\n\t\t\t/** namespace of this module * */\n\t\t\t$ns = $bn;\n\n\t\t\t$modules[$ns] = array(\n\t\t\t\t\"namespace\" => $ns,\n\t\t\t\t\"basePath\" => $directory,\n\t\t\t\t\"config\" => new Zend_Config_Json($directory . '/config.json', 'production', true)\n\t\t\t);\n\t\t}\n\n\t\treturn $modules;\n\t}",
"public function getConfigFiles()\n {\n $configs = [];\n\n foreach ($this->getSearchPaths() as $alias) {\n $path = Yii::getAlias($alias);\n $files = FileHelper::findFiles($path, ['only' => ['*/' . self::CONFIG_FILE]]);\n\n foreach ($files as $file) {\n try {\n $config = require($file);\n $config['basePath'] = dirname($file);\n $configs[] = $config;\n } catch (Exception $e) {\n Yii::trace(\"Failed loading module config.php file for {$file}: {$e->getMessage()}\", __METHOD__);\n }\n }\n\n usort($configs, function ($configA, $configB) {\n if (isset($configA['weight'], $configB['weight'])) {\n return (int)$configA['weight'] > (int)$configB['weight'];\n }\n\n return 0;\n });\n }\n\n return $configs;\n }",
"private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}",
"static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }"
]
| [
"0.6625902",
"0.64870507",
"0.6368991",
"0.6287424",
"0.62823313",
"0.62162024",
"0.6165398",
"0.6092302",
"0.58190835",
"0.58100176",
"0.58020794",
"0.5790474",
"0.5781771",
"0.57182914",
"0.5700125",
"0.5699668",
"0.563929",
"0.5620406",
"0.559804",
"0.55779284",
"0.5550268",
"0.5540746",
"0.55358297",
"0.5506896",
"0.54953027",
"0.54851174",
"0.5477649",
"0.5430612",
"0.5429487",
"0.54265034"
]
| 0.74778056 | 0 |
Checks if a negotiation configuration node is valid. | protected function isValidNegotiationNode($node)
{
return isset($node['name']) && isset($node['values']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkConfig();",
"public function checkIfEssentialConfigurationExists() {}",
"public function validate() {\n\n if (empty($this->config['default_pool_read'])) {\n throw new neoform\\config\\exception('\"default_pool_read\" must be set');\n }\n\n if (empty($this->config['default_pool_write'])) {\n throw new neoform\\config\\exception('\"default_pool_write\" must be set');\n }\n\n if (empty($this->config['pools']) || ! is_array($this->config['pools']) || ! $this->config['pools']) {\n throw new neoform\\config\\exception('\"pools\" must contain at least one server');\n }\n }",
"protected function validate()\r\n {\r\n return ( is_array( $this->bot ) && !empty( $this->channel ) );\r\n }",
"public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }",
"public function validateConfig() {\n\t\t\t$two_step_id = $this->config['l_id'];\n\t\t\tif ( empty( $two_step_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$two_step = tve_leads_get_form_type( $two_step_id, array( 'get_variations' => false ) );\n\t\t\tif ( empty( $two_step ) || $two_step->post_status === 'trash' || $two_step->post_type != TVE_LEADS_POST_TWO_STEP_LIGHTBOX ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}",
"abstract public function isConfigurationValid(array $configuration): bool;",
"public function isValidNode();",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if (strlen($this->container['name']) > 100) {\n return false;\n }\n if ($this->container['nit'] === null) {\n return false;\n }\n if (strlen($this->container['nit']) > 15) {\n return false;\n }\n if ($this->container['inbound_configuration_username'] === null) {\n return false;\n }\n if ($this->container['outbound_configuration_contingency_email'] === null) {\n return false;\n }\n return true;\n }",
"public function isValid()\n {\n $params = array_filter(\n [\n $this->host,\n $this->name,\n $this->user,\n $this->password,\n $this->port\n ],\n function($item) {\n return ! empty($item);\n }\n );\n\n return count($params) === 5;\n }",
"public function isValid () {\n\tif ($this->doConnect()) return true;\n\treturn false;\n }",
"public abstract function validateConfig($config);",
"protected function isValidIntegration()\n {\n $this->write($_ENV['app_frontend_url'] . 'rest/V1/modules', [], CurlInterface::GET);\n $response = json_decode($this->read(), true);\n\n return (null !== $response) && !isset($response['message']);\n }",
"private function configurationChecks()\n {\n\n // Debug Check: If debug enabled, check that debug email is set\n if ($this->salesforceDebug && is_string($this->salesforceDebugEmail) && $this->salesforceDebugEmail != '') {\n throw new \\InvalidArgumentException('With debug mode enabled, you must set the debug email address.');\n }\n\n\n // OID Check: Make sure the unique Salesforce account identifier is set and is a string\n if (!$this->defaultFields['oid'] && is_string($this->defaultFields['oid']) && $this->defaultFields['oid'] != '') {\n throw new \\InvalidArgumentException('The unique Salesforce account ID (oid) must be set as a string.');\n }\n\n return true;\n }",
"protected function isValidConfiguration(/**\n * Checks to perform:\n * - width and/or height given, integer values?\n */\narray $configuration) {}",
"public function isValid()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['sphinx_searchd_server']) && !empty($modSettings['sphinxql_searchd_port']);\n\t}",
"private function check_conf() {\n ConfigChecker::check();\n }",
"static function areHandlerOptionsValid ()\n {\n // There is no option yet\n return true;\n }",
"protected function isNegotiationConfiguration($tag)\n {\n return $tag === 'types';\n }",
"private function valid() {\n\t\tforeach($this->config['checks'] as $key) {\n\t\t\tif(!array_key_exists($key, $this->config)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}",
"public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }",
"public function hasConfig();",
"private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}",
"public function isValid()\n {\n if (!file_exists($this->filename)) {\n $this->error = 'File does not exist';\n\n return false;\n }\n\n if (!is_readable($this->filename)) {\n $this->error = 'File is not readable';\n\n return false;\n }\n\n if (!$this->parseConfig()) {\n return false;\n }\n\n foreach ($this->connectionConfigRequired as $configKeyRequired) {\n if (!array_key_exists($configKeyRequired, $this->config->get('connection')) || is_null($this->config->get('connection.'.$configKeyRequired))) {\n $this->error = sprintf('Connection config key missing or null: %s', $configKeyRequired);\n }\n }\n\n $numberOfDatabases = count($this->get('databases', []));\n\n if ($numberOfDatabases === 0) {\n $this->error = 'No database configuration provided. Cannot continue.';\n\n return false;\n }\n\n if (!empty($this->error)) {\n return false;\n }\n\n return true;\n }",
"public function isValid()\n {\n if ($this->host) {\n if (strlen($this->path) > 0 && 0 !== strpos($this->path, '/')) {\n return false;\n }\n return true;\n }\n\n if ($this->userInfo || $this->port) {\n return false;\n }\n\n if ($this->path) {\n // Check path-only (no host) URI\n if (0 === strpos($this->path, '//')) {\n return false;\n }\n return true;\n }\n\n if (! ($this->query || $this->fragment)) {\n // No host, path, query or fragment - this is not a valid URI\n return false;\n }\n\n return true;\n }",
"public function isValid() {\n\t\t$isValid = true;\n\t\tif(ResponseValidator::isStringValid($this->contextCode) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if(ResponseValidator::isStringValid($this->ns) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if(ResponseValidator::isStringValid($this->pubContent) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}",
"public function valid()\n {\n\n if ($this->container['channel_catalog_id'] === null) {\n return false;\n }\n if ($this->container['channel_id'] === null) {\n return false;\n }\n if ($this->container['store_id'] === null) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n if ($this->container['brightness'] === null) {\n return false;\n }\n if ($this->container['contrast'] === null) {\n return false;\n }\n if ($this->container['gammaCorrection'] === null) {\n return false;\n }\n if ($this->container['grayscale'] === null) {\n return false;\n }\n return true;\n }",
"public function checkConfiguration() {\n\t\tif(empty($this->configuration['appKey'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['appSecret'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['accessType'])) {\n\t\t\t$this->error = '<div>You have to save this record first.</div>';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function checkConfig()\n\t{\n\t\t$confDefault = array(\n\t\t\t'effects',\n\t\t\t'effectsCoin',\n\t\t\t'nivoThemeFolder',\n\t\t\t'effectsNivo',\n\t\t\t'useSelectInsteadCheckbox',\n\t\t\t'allowedDbTypesForCaption',\n\t\t);\n\t\t$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['imagecycle']);\n\t\tforeach ($confDefault as $val) {\n\t\t\tif (! isset($confArr[$val]) && ! isset($_POST['data'][$val])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}"
]
| [
"0.5878896",
"0.5770419",
"0.57083994",
"0.56578624",
"0.56207883",
"0.56018627",
"0.55906296",
"0.5585302",
"0.5505117",
"0.5476201",
"0.54346174",
"0.5431089",
"0.540532",
"0.5344221",
"0.5335364",
"0.5329896",
"0.53082013",
"0.5284131",
"0.5270382",
"0.5237624",
"0.5231939",
"0.5219296",
"0.52121055",
"0.51970184",
"0.51964444",
"0.5195824",
"0.5194857",
"0.5194088",
"0.5164305",
"0.516047"
]
| 0.7306595 | 0 |
Checks if the tag refers to a negotiation label inside the configuration. | protected function isNegotiationConfiguration($tag)
{
return $tag === 'types';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasLabel($label)\n {\n }",
"public function hasLabel()\n {\n return !empty($this->getLabel());\n }",
"protected function isValidNegotiationNode($node)\n {\n return isset($node['name']) && isset($node['values']);\n }",
"public function isLabel(){\n return $this->label;\n }",
"public function hasTag($name);",
"protected function hasLabels()\n {\n $showLabels = $this->getConfigParam('showLabels'); // plus abfrage $this-showLabels kombinieren.\n if ($this->autoPlaceholder && $showLabels !== ActiveForm::SCREEN_READER) {\n $showLabels = false;\n }\n\n return $showLabels;\n }",
"public function hasLabels(){\n return $this->_has(2);\n }",
"public function hasTag(): bool;",
"public function hasTag(){\n return $this->_has(1);\n }",
"public function hasLabel($fieldName) {\n\t\t$field = $this->getField($fieldName);\n\t\treturn empty($field['label']) ? FALSE : TRUE;\n\t}",
"public function hasLabels(){\n return $this->_has(6);\n }",
"public function exists($tag) { //+\n\t\treturn array_key_exists($tag, $this->arShortcodes);\n\t}",
"protected function check_label()\n {\n $regex = \"/^[a-zA-Z_\\-$&%*!?]{1}[a-zA-Z0-9_\\-$&%*!?]*$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <label> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }",
"public function is_tag($tag = '')\n {\n }",
"public function checkNeti()\n {\n $foundation = Shopware()->Models()->getRepository('Shopware\\Models\\Plugin\\Plugin')\n ->findOneBy(array('name' => 'NetiFoundation', 'active' => true));\n\n return $foundation && version_compare($foundation->getVersion(), self::getRequiredFoundation(), '>=');\n }",
"public function isValidTag(string $tag): bool;",
"public function hasTag($tag)\n {\n return in_array($tag, $this->getTags());\n }",
"public function has($label) {\n return array_key_exists($label, $this->_register);\n }",
"public function isValidTagName($tag) {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) && $matches[0] == $tag;\n }",
"private static function isValidTagName($tag)\n {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) && $matches[0] == $tag;\n }",
"public function is_tag_closer()\n {\n }",
"public function hasTagClass($name);",
"public static function isValidTagName($tag)\n {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) and $matches[0] == $tag;\n }",
"public function hasTagList()\n {\n return $this->tag !== null;\n }",
"protected function is_network_plugin($extension)\n {\n }",
"public function hasOptionalAutoLabel();",
"protected function isVersionTag($tag) {\n\t\t\t$property = $this->tagNameProperty;\n\t\t\treturn isset($tag->$property) && $this->looksLikeVersion($tag->$property);\n\t\t}",
"public function hasVariableLabel() {\n return $this->_has(8);\n }",
"function unilabel_supports($feature) {\n switch ($feature) {\n case FEATURE_IDNUMBER:\n return false;\n case FEATURE_GROUPS:\n return false;\n case FEATURE_GROUPINGS:\n return false;\n case FEATURE_MOD_INTRO:\n return true;\n case FEATURE_COMPLETION_TRACKS_VIEWS:\n return false;\n case FEATURE_GRADE_HAS_GRADE:\n return false;\n case FEATURE_GRADE_OUTCOMES:\n return false;\n case FEATURE_MOD_ARCHETYPE:\n return MOD_ARCHETYPE_RESOURCE;\n case FEATURE_BACKUP_MOODLE2:\n return true;\n case FEATURE_NO_VIEW_LINK:\n return true;\n\n default:\n return null;\n }\n}",
"function isTagExists($tag)\n {\n /*\n If creating an object the incorrect id was passed in to the category, then\n this method will return false of any tag.\n */\n if ($this->_fProductIDIsIncorrect == true)\n {\n return ($this->debugmode ? 'Product ID is incorrect' : false);\n }\n\n if ($this->_fProductAttributesInfo == null)\n {\n $this->_loadProductAttributesInfo();\n }\n\n # Check additional tag list\n if ( array_key_exists( $tag, $this->_fAdditionalTagList ) )\n {\n return true;\n }\n\n # Check artificial tag list\n if ( array_key_exists( strtolower($tag), $this->_fArtificialTagList ) )\n {\n return true;\n }\n\n # Check database attributes\n if ( strtolower($this->_findEntityValueInAtributeList('a_view_tag',$tag,'a_view_tag')) == strtolower($tag))\n {\n return true;\n }\n\n return false;\n }"
]
| [
"0.5808836",
"0.5628761",
"0.5506165",
"0.5444188",
"0.54050064",
"0.5356012",
"0.53442526",
"0.5320642",
"0.5267324",
"0.52647257",
"0.51848006",
"0.51029366",
"0.5055671",
"0.50329393",
"0.50117046",
"0.5006299",
"0.49748126",
"0.4946779",
"0.4939217",
"0.49230802",
"0.49106127",
"0.4910285",
"0.48919937",
"0.48832455",
"0.48690003",
"0.4855618",
"0.48484",
"0.48225278",
"0.48223197",
"0.4796819"
]
| 0.69135344 | 0 |
Creates an empty negotiation structure. | protected static function emptyNegotiationContext()
{
return [
'type' => []
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initialize()\n {\n if(!$this->initialized)\n {\n $configuration = $this->merge($this->raw,$this->defaultRawConfiguration());\n foreach($configuration['types'] as $type)\n {\n $this->parsed['type'][$type['name']] = $type['values'];\n $this->priorities['type'] = array_merge($this->priorities['type'],$type['values']);\n if(!isset($this->defaults['type']))\n {\n $this->defaults['type'] = new NegotiationResult($type['name'],$type['values'][0]);\n }\n }\n $this->parsed['headers'] = $configuration['headers'];\n $this->initialized = true;\n }\n return $this;\n }",
"public function createProtocol()\n {\n }",
"protected function constructEmpty()\r\n\t{\r\n\t\t$this->transitionCount = 0;\r\n\t\t$this->transitions = array();\r\n\t\t// TODO: this should probably contain at least one item\r\n\t\t$this->types = array();\r\n\t}",
"protected function _init() {\n\t\t$this->_render['negotiate'] = true; \n\t\tparent::_init(); \n\t}",
"public static function emptyResponse()\n {\n return new ServerResponse(['ok' => true, 'result' => true], null);\n }",
"public function createNone()\n {\n $o = new NoneSelector();\n $this->appendSelector($o);\n\n return $o;\n }",
"function createEmpty()\n\t{\n\t\t$data = array();\n\t\t$data['MexcGallery']['publishing_status'] = 'draft';\n\t\t\n\t\t$this->create();\n\t\treturn $this->save($data, false);\n\t}",
"public function newTunnel(){\n\t\t$this->buffer = '';\n\t\t$this->tunnel_type = null;\n\t\t$this->cipher = null;\n\t\t$this->server = null;\n\t\t$this->port = null;\n\t}",
"public static function createEmpty(): ResponseItem\n {\n return new static(new \\stdClass());\n }",
"protected function _getNewEmptyResponse()\n\t{\n\t\treturn $this->_getNewSdkInstance('Radial_RiskService_Sdk_Response');\n\t}",
"public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.iosVpnConfiguration');\n }",
"private function doContentNegotiation(){\n\tif(!isset($_SERVER['HTTP_ACCEPT']) && $this->default !== \"\"){\n $this->log->addInfo(\"server and default not set\");\n $this->stack = array(strtolower($this->default));\n\t}else if(!isset($_SERVER['HTTP_ACCEPT'])){\n $this->log->addInfo(\"accept not set, taking default\");\n $this->stack = array(\"html\");\n }else{\n $this->log->addInfo(\"accept is set, doing content negotiation\");\n $accept = $_SERVER['HTTP_ACCEPT'];\n $types = explode(',', $accept);\n //this removes whitespace from each type\n $types = array_map('trim', $types);\n foreach($types as $type){\n $q = 1.0;\n $qa = explode(\";q=\",$type);\n if(isset($qa[1])){\n $q = (float)$qa[1];\n }\n $type = $qa[0];\n //throw away the first part of the media type\n $typea = explode(\"/\", $type);\n if(isset($typea[1])){\n $type = $typea[1];\n }\n $type = strtolower($type);\n \n //default formatter for when it just doesn't care. Probably this is when a developer is just performing tests.\n if($type == \"*\" && $this->default !== \"\"){\n $type = strtolower($this->default);\n }else if($type == \"*\"){\n $type = \"html\";\n }\n //now add the format type to the array, if it hasn't been added yet\n if(!isset($stack[$type])){\n $stack[$type] = $q;\n }\n }\n //all that is left for us to do is sorting the array according to their q\n arsort($stack);\n $this->stack = array_keys($stack);\n }\n }",
"function __construct(ProtocolParser $parser, HandshakeMessage $handshake) {\n $this->parser = $parser;\n $this->handshake = $handshake;\n }",
"abstract protected function createDefaultBody();",
"public function Create()\n {\n parent::Create();\n \n //These lines are parsed on Symcon Startup or Instance creation\n //You cannot use variables here. Just static values.\n $this->RegisterPropertyString(\"IPAddress\", \"\");\n $this->RegisterPropertyInteger(\"DefaultVolume\", 15);\n $this->RegisterPropertyBoolean(\"GroupCoordinator\", false);\n $this->RegisterPropertyBoolean(\"GroupForcing\", false);\n $this->RegisterPropertyBoolean(\"MuteControl\", false);\n $this->RegisterPropertyBoolean(\"LoudnessControl\", false);\n $this->RegisterPropertyBoolean(\"BassControl\", false);\n $this->RegisterPropertyBoolean(\"TrebleControl\", false);\n $this->RegisterPropertyString(\"FavoriteStation\", \"\");\n $this->RegisterPropertyString(\"WebFrontStations\", \"<all>\");\n $this->RegisterPropertyString(\"RINCON\", \"\");\n \n }",
"public static function createEmpty(): self\n {\n return new self(null);\n }",
"protected static function createDefaultPacker(): PackerInterface\n {\n return new NopPacker();\n }",
"private function useGraphLibraryToCreateASimpleMixedGraph(): Graph\n {\n $graph = new Graph();\n\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[0]);\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[1]);\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[2]);\n\n $v1Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[0]);\n $v2Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[1]);\n $v3Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[2]);\n\n $v1Vertex->createEdge($v2Vertex);\n $v2Vertex->createEdgeTo($v3Vertex);\n\n return $graph;\n }",
"public function testCreateClientWithEmptyFields() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create')\n ->seeJson(['success' => false]);\n\n }",
"public function createEmptyMetadata();",
"protected function getDefaultStructureDefinition() {}",
"public function create(): ResponseInterface\n\t{\n\t\t$this->content = [];\n\t}",
"public function testCreateNoContent()\n {\n // Do Request\n $this->_request('POST', '/api/1.5.0/news-create',['token' => '123','title'=>'news'])\n ->_result(['error' => 'no-content']);\n }",
"private function __construct() {\n\t\t// set default values\n\t\t$this->allowedContentTypes = [ContentType::JSON];\n\t\t$this->httpsOnly = false;\n\t\t$this->whiteIPList = [];\n\t\t$this->blackIPList = [];\n\t}",
"public function create()\n {\n return \\Response::json('Not Implemented', 501);\n }",
"public function testInvalidConstructorParams1()\n {\n new AcceptMediaType(1, null, 'subtype');\n }",
"public static function createEmpty(): self\n {\n return new static([]);\n }",
"protected function getProtocol ()\n\t{\n\t\treturn new AenoaServerProtocol () ;\n\t}",
"public function testCloningCapabilities()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n $tmp = clone $protocol;\n\n $this->assertEquals($protocol, $tmp);\n $this->assertNotEmpty($tmp->generateExchangeRequestInformation());\n\n unset($tmp);\n $this->assertNotNull($protocol);\n }",
"public function create()\n {\n return $this->makeJSONResponse(true, 'This endpoint is not implemented', [], []);\n }"
]
| [
"0.54322267",
"0.54147947",
"0.5130342",
"0.50612366",
"0.4748651",
"0.47238803",
"0.47021398",
"0.45461985",
"0.45281282",
"0.44854885",
"0.44424853",
"0.4429355",
"0.4380007",
"0.43118957",
"0.43019816",
"0.42960608",
"0.4271581",
"0.42355886",
"0.42336273",
"0.4231805",
"0.42256194",
"0.42156953",
"0.4199102",
"0.41698408",
"0.41697887",
"0.41543597",
"0.4151825",
"0.41243628",
"0.4103209",
"0.41005516"
]
| 0.64437264 | 0 |
Returns the serializerenabled config option | public function isSerializerEnabled()
{
$this->initialize();
return $this->serializerEnabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSerializerOptions()\n {\n return $this->serializerOptions;\n }",
"public function getEnabled()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/enabled');\n }",
"public function getConfigToString() {\n return serialize($this->_options);\n }",
"public function get_enabled() \n {\n return $this->enabled;\n }",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getEnabled(): string\n {\n return $this->enabled;\n }",
"public function getEnabled()\r\n {\r\n return $this->enabled;\r\n }",
"function getEnabled() {\n\t\treturn $this->getData('enabled');\n\t}",
"public function getEnabled() {\n return $this->enabled;\n }",
"public function isEnabled()\n {\n return $this->_getConfig(self::XML_CONFIG_ENABLED);\n }",
"public function getConfigCacheEnabled()\n {\n return $this->configCacheEnabled;\n }",
"public function getEnabled()\n {\n return $this->_enabled;\n }",
"public function getEnabled() {\n\t\treturn $this->enabled;\n\t}",
"public function getEnabled()\n {\n if (array_key_exists(\"enabled\", $this->_propDict)) {\n return $this->_propDict[\"enabled\"];\n } else {\n return null;\n }\n }",
"public function get_enable()\n\t{\n\t\treturn $this->enable;\n\t}",
"public function getEnable()\n {\n return isset($this->enable) ? $this->enable : false;\n }",
"public function getIsEnabled()\n\t{\n\t\treturn Mage::getStoreConfig(self::XML_PATH_ENABLE);\n\t}",
"private function isEnabled()\n {\n return $this->getConfigBool('enable', false);\n }",
"public function getSectionStatus() {\r\n\t\t$config = $this->getConfig();\r\n return $config[\"enable\"];\r\n }",
"public function getEnabled()\n {\n return isset($this->enabled) ? $this->enabled : false;\n }",
"public function getEnabled()\n {\n return isset($this->enabled) ? $this->enabled : false;\n }",
"public function isEnabled()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_TRANSACTIONAL_API_ENABLED);\n }",
"public function getEnabled()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/enabled', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function is_enabled() {\n $settings = get_option('woocommerce_enda_bundle_rate_settings');\n return $settings['enabled'] == 'yes' ? true : false;\n }",
"private function getGiftOptionsConfigJson()\n {\n return $this->configProvider->getConfig();\n }",
"public function getIsEnable()\n {\n return $this->is_enable;\n }",
"public function isEnabled()\n {\n return $this->config->isEnabled();\n }",
"public function getSerializer()\n {\n return $this->serializer;\n }"
]
| [
"0.67596775",
"0.6099463",
"0.6087472",
"0.6060522",
"0.60290277",
"0.60290277",
"0.60290277",
"0.6019271",
"0.6005907",
"0.5986724",
"0.59724724",
"0.59395903",
"0.5935854",
"0.59177375",
"0.5900283",
"0.58769685",
"0.58379585",
"0.58076984",
"0.5799532",
"0.57948804",
"0.5793194",
"0.57832056",
"0.57832056",
"0.57735914",
"0.5743152",
"0.57110924",
"0.5653976",
"0.5652097",
"0.5625129",
"0.56133956"
]
| 0.695329 | 0 |
Returns the normalizerenabled config option | public function isNormalizerEnabled()
{
$this->initialize();
return $this->normalizerEnabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEnabled()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/enabled');\n }",
"public function getOptionsFlag() {\n return 'false';\n }",
"public function get() {\n\t\treturn (bool) $this->user_options->get( static::OPTION );\n\t}",
"public function getEnabled(): string\n {\n return $this->enabled;\n }",
"public function get_enabled() \n {\n return $this->enabled;\n }",
"protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}",
"public function get_enable()\n\t{\n\t\treturn $this->enable;\n\t}",
"function getEnabled() {\n\t\treturn $this->getData('enabled');\n\t}",
"public function getOptin()\n {\n return $this->optIn;\n }",
"public function getEnable()\n {\n return isset($this->enable) ? $this->enable : false;\n }",
"public function getConfigToString() {\n return serialize($this->_options);\n }",
"public function getEnabled()\n {\n if (array_key_exists(\"enabled\", $this->_propDict)) {\n return $this->_propDict[\"enabled\"];\n } else {\n return null;\n }\n }",
"public function optionStatsdEnabled() {\n\t\treturn $this->zap->request($this->zap->base . 'stats/view/optionStatsdEnabled/')->{'StatsdEnabled'};\n\t}",
"public function getIsEnabled()\n\t{\n\t\treturn Mage::getStoreConfig(self::XML_PATH_ENABLE);\n\t}",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getEnabled()\n {\n return $this->enabled;\n }",
"public function getSectionStatus() {\r\n\t\t$config = $this->getConfig();\r\n return $config[\"enable\"];\r\n }",
"public function getIsEnable()\n {\n return $this->is_enable;\n }",
"public function getEnabled()\r\n {\r\n return $this->enabled;\r\n }",
"private function isEnabled()\n {\n return $this->getConfigBool('enable', false);\n }",
"public function getExtraOptions()\n {\n return isset($this->extraOptions)?$this->extraOptions:false;\n }",
"public function getEnableSpellCorrection()\n {\n return $this->enable_spell_correction;\n }",
"public function getEnabled() {\n return $this->enabled;\n }",
"private function _getSendOrderConfirmationOption()\n {\n return (boolean) Mage::getStoreConfig('payment/paymentnetwork_pnsofortueberweisung/send_order_confirmation', Mage::app()->getStore()->getStoreId());\n }",
"public function isEnabled()\n {\n return Mage::getStoreConfig('refersion/refersion_settings/refersion_active');\n }",
"public function getEnabled()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/enabled', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function getConfigManual()\n {\n return $this->configParams['manual_link'];\n }",
"public function CLREnabled() {\n return $this->connection\n ->query_direct(\"SELECT CONVERT(int, [value]) as [enabled] FROM sys.configurations WHERE name = 'clr enabled'\")\n ->fetchField() !== 1;\n }",
"public function getEnableRestriction()\n {\n return $this->enable_restriction;\n }"
]
| [
"0.60544145",
"0.5957486",
"0.59372145",
"0.59096533",
"0.58029336",
"0.5756863",
"0.57092273",
"0.5690606",
"0.5678284",
"0.56735367",
"0.56711084",
"0.5665472",
"0.5621291",
"0.5603161",
"0.55934733",
"0.55934733",
"0.55934733",
"0.55867016",
"0.55810153",
"0.55666023",
"0.55499566",
"0.5533777",
"0.5533724",
"0.5532958",
"0.55211836",
"0.5506976",
"0.5506465",
"0.54709345",
"0.54701567",
"0.54690534"
]
| 0.6537807 | 0 |
END function load() FUNCTION: var_is_int() | private function var_is_int($value) {
// Returns TRUE if $value is an integer.
// Returns FALSE otherwise.
// This function will take any data type as input.
return ((string) $value) === ((string)(int) $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function my_is_int($var) {\n\treturn (is_numeric($var)&&(intval($var)==floatval($var)));\n}",
"function df_is_int($v):bool {return is_numeric($v) && ($v == (int)$v);}",
"function int_check($var) {\n\tif ( is_numeric($var) )\n\t\treturn $var;\n\treturn null;\n}",
"function o_isInt($value) {\n\t\t\treturn Obj::singleton()->isInt($value);\n\t\t}",
"function rest_is_integer($maybe_integer)\n {\n }",
"function isInteger ($value)\r\n{\r\n\treturn is_int ($value);\r\n}",
"function testForInt($data)\r\n\t{\r\n\t\tif (!filter_var($data, FILTER_VALIDATE_INT) === false)\r\n\t\t{\r\n\t\t\treturn intval($data);\r\n\t\t} \r\n\t\telse \r\n\t\t{\r\n\t\t\techo(\"Integer is not valid<br>\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private function isInt($int)\n {\n return is_numeric($int);\n }",
"public function isInt()\n {\n return \\is_int($this->value);\n }",
"function isInteger ($s) {\r\n return is_integer($s);\r\n }",
"function is_int_val( string $str )\n {\n return is_numeric( $str ) && \\intval( $str ) == $str;\n }",
"function isValidInt($var) {\n //Returns error message for an invalid integer string\n\n //Check for unsafe characters\n $msg = isSantizeString($var);\n if ($msg != \"\") {\n return $msg;\n }\n\n //Note: Special case for filter_var and zero values\n if (filter_var($var, FILTER_VALIDATE_INT) === 0 || !filter_var($var, FILTER_VALIDATE_INT) === false) {\n return \"\";\n } else {\n return \"Invalid Integer\";\n }\n}",
"function is_num($arg){ \n\tif (!(int)$arg) {\n\treturn false ;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}",
"public function isInteger()\n\t{\n\t\treturn $this->identifier(\n\t\t\tfunction($val){\n\t\t\t\treturn ctype_digit($val);\n\t\t\t}, 'Is not an integer.'\n\t\t);\n\t}",
"function is_type_int($typ)\n{\n\t$ints = @array(\"int\",\"serial\",\"bigserial\",\"oid\",\"float\",\"numeric\",\"real\",\"double\",\"smallint\");//\"date\",\"time\"\n\t$typ = @strtolower($typ);\n\tforeach ($ints as $v){\n\t\t$pos = @strpos($typ,$v);\n\t\tif ($pos!==false && !$pos) return 1;\n\t}\n}",
"private static function isInteger($entry) {\n return ctype_digit(strval($entry));\n }",
"static public function Integer( $var ) {\r\n\r\n\t\t$cleaned = filter_var( $var, FILTER_SANITIZE_NUMBER_INT);\r\n\t\treturn $cleaned == \"\" ? false : (int)$cleaned;\r\n\r\n\t}",
"public static function isInteger($int) {\n return is_int($int);\n\n }",
"function myisint($int)\n{\n if(is_numeric($int) === TRUE){\n \n // It's a number, but it has to be an integer\n if((int)$int == $int){\n\n return TRUE;\n \n // It's a number, but not an integer, so we fail\n }else{\n \n return FALSE;\n }\n \n // Not a number\n }else{\n \n return FALSE;\n }\n}",
"public function isInt()\n {\n return (is_numeric($this->_value) || is_int($this->_value));\n }",
"static function checkInteger($param) {\n \n if(isset($param) && is_numeric($param)) { \n return true;\n } else {\n return false;\n }\n }",
"function checkIfInt($checkMe){\n\tif(is_Int((int)$checkMe) == true){\n\t\treturn true;\n\t\t// an acceptable respne\n\t}else{\n\t\treturn false;\n\t}\n\t\n}",
"function checkInteger($var) {\r\n\r\n\tif(preg_match('!^\\d+$!', $var)) { return true; } else { return false; }\r\n\r\n}",
"function int1 ($var){\n\tif (preg_match(\"|^[\\(\\)\\-+\\ 0-9]+$|\",$var)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t\t}\n\t}",
"public function validIntegers() {}",
"function is_integer_val($value) {\n\treturn (!preg_match(\"/\\D/\", $value)) ? true : false;\n}",
"function if_not_int_throw_e($var) {\n if (!is_int($var)) {\n throw new Exception('Variable must be integer. Current value: '.$var);\n }\n}",
"function isInteger($v) {\n return is_int($v) || (is_string($v) && preg_match('/^[0-9]+$/', $v));\n}",
"public function integer($int) {\n if (is_numeric($int)):\n return TRUE;\n else:\n return FALSE;\n endif;\n }",
"function cp_str_isInt($str){\r\n return preg_match('/^[[:digit:]]+$/',$str);\r\n}"
]
| [
"0.7424979",
"0.73620176",
"0.72833264",
"0.72404426",
"0.70803565",
"0.7033291",
"0.6913651",
"0.68194425",
"0.6781262",
"0.6713603",
"0.6697197",
"0.66883296",
"0.6679003",
"0.66752994",
"0.66226435",
"0.661969",
"0.6568804",
"0.65596884",
"0.6539455",
"0.6516973",
"0.64887047",
"0.6483097",
"0.6462258",
"0.64188474",
"0.6416332",
"0.6386122",
"0.63667476",
"0.63636243",
"0.6350312",
"0.63225883"
]
| 0.7431175 | 0 |
/ Get pejabat by idpejabat | function get_pejabat($idpejabat)
{
return $this->db->get_where('pejabat',array('idpejabat'=>$idpejabat))->row_array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClanek($id){\n $sth = $this->db->prepare(\"SELECT * FROM PRISPEVKY\n WHERE id_prispevku = :id\");\n $sth->bindParam(':id', $id);\n $sth->execute();\n $data = $sth->fetch();\n return $data;\n }",
"public function selectById($id) {\n $conn = $this->conex->connectDatabase();\n $sql = \"select * from tbl_patrocinio where id_patrocinio= ?;\";\n $stm = $conn->prepare($sql);\n $stm->bindValue(1, $id);\n $success = $stm->execute();\n if ($success) {\n \n foreach ($stm->fetchAll(PDO::FETCH_ASSOC) as $result) {\n $Patrocinio = new Patrocinio();\n $Patrocinio->setId($result['id_patrocinio']);\n $Patrocinio->setNome($result['nome']);\n $Patrocinio->setDescricao($result['descricao']);\n $Patrocinio->setApagado($result['apagado']);\n $Patrocinio->setStatus($result['ativo']);\n return $Patrocinio;\n };\n $this->conex -> closeDataBase();\n }\n }",
"public function view_by($id){\n $this->db->where('id', $id);\n return $this->db->get('pegawai')->row();\n }",
"function ambil_syarat_usulan_by_id_proyek($id)\n\t{\n\t\t$sql = \"SELECT * FROM irena_view_sbsn_usulan_syarat WHERE id_proyek = '$id'\t\";\n\t\treturn $this->db->query($sql);\n\t}",
"function get_by_id($id)\n {\n $this->db->select('*');\n $this->db->join('pohon', 'pohon.id_pohon = penanaman.id_pohon');\n $this->db->join('users', 'users.id_user = penanaman.id_user');\n $this->db->join('petak', 'petak.id_petak = penanaman.id_petak');\n $this->db->join('pendaftaran', 'pendaftaran.id_pendaftaran = penanaman.nama_penanam');\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"public function getPesertaById($id){\n $q = $this->db->get_where('v_peserta', ['id_pendaftar' => $id]);\n return $q->row();\n }",
"function get_by_id($id)\n {\n /*$this->db->where($this->id, $id);*/\n $this->db->where('persediaan.id_persediaan', $id);\n $this->db->join('puskesmas', 'puskesmas.id_puskesmas=persediaan.id_puskesmas');\n $this->db->join('obat', 'obat.kode=persediaan.kode');\n $this->db->select('persediaan.id_persediaan');\n $this->db->select('nama_puskesmas');\n $this->db->select('kode');\n $this->db->select('nama_obat');\n $this->db->select('stok_awal');\n return $this->db->get($this->table)->row();\n }",
"function get_tahun_pelajaran($id)\n {\n return $this->db->get_where('tahun_pelajaran',array('id'=>$id))->row_array();\n }",
"public function pertanyaanId($id){\r\n $sql = \"SELECT * FROM tbl_pertanyaan where id=$id\";\r\n $query = mysql_query($sql);\r\n \t\t $row = mysql_fetch_array($query);\r\n return $row;\r\n }",
"public function find_by_id($punti_spesi_id)\n {\t\n return $this->db->get_where( 'punti_spesi' , array('punti_spesi_id' => $punti_spesi_id ))->row();\n }",
"function get_by_idpuskesmas($id)\n {\n $this->db->where('persediaan.id_puskesmas', $id);\n $this->db->join('puskesmas', 'puskesmas.id_puskesmas=persediaan.id_puskesmas');\n $this->db->join('obat', 'obat.kode=persediaan.kode');\n $this->db->select('id_persediaan');\n $this->db->select('persediaan.id_puskesmas');\n $this->db->select('persediaan.kode');\n $this->db->select('nama_obat');\n $this->db->select('stok_awal');\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n\t\t\t\n\t\t$id_patner = $this->session->userdata('DX_id_patner');\n\t\tif($id_patner > 0){\n\t\t\t$this->db->where('id_patner', $id_patner);\n\t\t}\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n\t\t$this->db->join('ppi_tb_infeksi', 'ppi_tb_infeksi.id_infeksi = ppi_tb_nilai.id_infeksi');\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"public function readById($id = 0){\r\n\t\t\t$pessoa = new Pessoa();\r\n\t\t\t$pessoa->setId($id);\t\t\t\r\n\t\t\t$this->pessoaModel->read($pessoa);\r\n\t\t}",
"public function get_one($id){\n // TODO: Modif bagian ini\n //$query = $this->db->get_where('pokemon', array('id' => $id));\n //return $query->result();\n return $this->db->get_where('pokemon',array('id' => $id))->result();\n }",
"function select($id){\n\t\t\t$data = $this->dbh->query(\"SELECT * FROM tbl_pegawai WHERE id =\".$id);\n\t\t\treturn $data->fetch();\n\t\t}",
"public function ambil_data($id_penjualan){\n $sql= \"Select * From penjualan WHERE id_penjualan=$id_penjualan\";\n $data=$this->konek->query($sql);\n $hasil=mysqli_fetch_array($data);\n return $hasil;\n }",
"public function data_petugas_doa($id_permohonan)\n {\n $this->db->select('petugas_doa.*');\n $this->db->from('permohonan_ptsp');\n $this->db->join('ptsp01', 'permohonan_ptsp.id_permohonan_ptsp = ptsp01.id_permohonan_ptsp', 'INNER');\n $this->db->join('petugas_doa', 'ptsp01.id_ptsp = petugas_doa.id_ptsp', 'INNER');\n $this->db->where('permohonan_ptsp.id_permohonan_ptsp', $id_permohonan);\n $this->db->where('permohonan_ptsp.status_delete', 0);\n\n $hasil = $this->db->get();\n return $hasil;\n }",
"public function getjabatan($id)\n {\n //Query untuk mengambil data jabtan berdasarkan id_jabatan untuk dilakukan edit\n $query = $this->db->query(\"SELECT * FROM jabatan WHERE id_jabatan = '$id'\");\n return $query;\n }",
"public function readOneExpByIdPaciente($id){\n $objH=new historiaDAO(); \n $resul=$objH->readOneByIdPaciente($id);\n return $resul;\n }",
"public function getById($id)\n {\n\n\n \n return $this->db->query(\"SELECT m_perizinan.kd_izin,\n nik_user,\n nama_karyawan,\n nama_dept,\n nama_sub_dept,\n nama_seksi,\n email_user,\n -- email_atasan,\n DATE_FORMAT(tanggal, '%d-%m-%Y') as tanggal,\n jam,\n jenis,\n alasan,\n status_atasan,\n status_hrd FROM m_perizinan \n LEFT JOIN m_karyawan on nik_karyawan = nik_user \n LEFT JOIN dept on dept_karyawan = id_dept\n LEFT JOIN sub_dept on subdept_karyawan = id_sub_dept\n LEFT JOIN seksi on position_karyawan = id_seksi\n LEFT JOIN m_atasan on m_atasan.kd_izin = m_perizinan.kd_izin\n WHERE m_perizinan.kd_izin ='\".$id.\"'\")->row();\n }",
"public function get($id)\n {\n return $this->run('GET', 'pedidovenda-rest/pessoas/'.$id);\n }",
"function get_by_id($id) {\r\n $params=array('pm_id'=>$id);\r\n $data = $this->create_mapper($this->table)->where($params)->find_by();\r\n $ret_status = $data ? 1 : 'op_no_data';\r\n //处理关联代码表\r\n //filter_fk_name($data, array('cp_createuser|osp_user_id','cp_updateuser|osp_user_id'));\r\n\r\n return $this->format_ret($ret_status, $data);\r\n }",
"public function pobierz($id)\n {\n $sql = \"SELECT * FROM uzytkownicy WHERE id = '\" . $this->_conn->escape($id) . \"'\";\n\n return $this->_conn->fetchRow($sql);\n }",
"function get_pelanggan($id_pelanggan)\n {\n return $this->db->get_where('pelanggan',array('id_pelanggan'=>$id_pelanggan))->row_array();\n }",
"public function getById4($id)\n {\n //$this->db->select('tabel_lapak.*, tabel_peminjaman.kd_pengguna as kd');\n $this->db->from('tabel_lapak');\n //$this->db->join('tabel_lapak', 'tabel_lapak.kd_lapak = tabel_peminjaman.kd_lapak');\n $this->db->join('tabel_pengguna', 'tabel_pengguna.kd_pengguna = tabel_lapak.kd_pengguna');\n $this->db->where('tabel_lapak.kd_lapak', $id);\n $query = $this->db->get();\n return $query->result();\n }",
"function get($idPlato) {\r\n $sql = \"select * from $this->tabla where idPlato= :idPlato\";\r\n $parametros[\"idPlato\"] = $idPlato;\r\n $r = $this->bd->setConsulta($sql, $parametros);\r\n if ($r) {\r\n $plato = new Plato();\r\n $plato->set($this->bd->getFila());\r\n return $plato;\r\n }\r\n return null;\r\n }",
"public function show($id)\n { \n $cirugia = Cirugias_x_paciente::findOrFail($id);\n return $this->showOne($cirugia, 200);\n }",
"public function getById($id){\n\t\t$row = $this->_model\n\t\t->getTable()\n\t\t->createQuery()\n\t\t->andWhere('poliza_id = ?',$id)\n\t\t->execute()\n\t\t->toArray();\n\t\treturn $row;\n\t}",
"public function show($id)\n {\n $detail = PembelianDetail::leftJoin('produk', 'produk,kode_produk', '-', 'pembelian_detail.kode_produk')\n ->where('id_pembelian', '=', $id)->get();\n }"
]
| [
"0.7301212",
"0.7216508",
"0.7182426",
"0.71363527",
"0.7055486",
"0.70145357",
"0.7007298",
"0.69727194",
"0.6953885",
"0.69471395",
"0.6904584",
"0.6896306",
"0.68918747",
"0.6874952",
"0.68428946",
"0.68396425",
"0.682469",
"0.67933637",
"0.6779113",
"0.6764388",
"0.6739182",
"0.6737417",
"0.67280304",
"0.67236686",
"0.6717366",
"0.6701902",
"0.668539",
"0.66766936",
"0.66684073",
"0.66632223"
]
| 0.81246346 | 0 |
/ Get all pejabat | function get_all_pejabat()
{
$result = $this->db->query("SELECT
`pejabat`.*,
`struktural`.`nm_struktural`,
`pegawai`.`Nama`
FROM
`pejabat`
LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai`
LEFT JOIN `struktural` ON `struktural`.`idstruktural` =
`pejabat`.`idstruktural`")->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function all_pemesan(){\r\n\r\n $all = $this->db->get(\"pemesan\")->result();\r\n $response['status']=200;\r\n $response['error']=false;\r\n $response['person']=$all;\r\n return $response;\r\n\r\n }",
"public function selectAll() {\n $conn = $this->conex->connectDatabase();\n $sql = \"select * from tbl_patrocinio where apagado = 0\";\n $stm = $conn->prepare($sql);\n $success = $stm->execute();\n if ($success) {\n //Criando uma lista com os dados\n $listPatrocinio = [];\n foreach ($stm->fetchAll(PDO::FETCH_ASSOC) as $result) {\n $Patrocinio = new Patrocinio();\n $Patrocinio->setId($result['id_patrocinio']);\n $Patrocinio->setNome($result['nome']);\n $Patrocinio->setDescricao($result['descricao']);\n $Patrocinio->setImagem($result['imagem']);\n $Patrocinio->setApagado($result['apagado']);\n $Patrocinio->setStatus($result['ativo']);\n array_push($listPatrocinio, $Patrocinio);\n };\n $this->conex -> closeDataBase();\n //retornando a lista\n return $listPatrocinio;\n } else {\n return \"Erro\";\n }\n }",
"function fetchPais() {\n\n $paises = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM pais\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $pais = new Pais($id, $nombre);\n array_push($paises, $pais);\n }\n\n return $paises;\n }",
"public function readAll(){\r\n\t\t\treturn $this->pessoaModel->readAll();\r\n\t\t}",
"public function get_all(){\n return $this->db->get('pokemon')->result();\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getAllPoliklinik()\n {\n return $this->findAll();\n }",
"public function getAll()\n\t{\n\t\t$query = $this->db->get('penumpang'); // SELECT * FROM mahasiswa\n\t\treturn $query->result(); // Object\n\n\t\t// Query Builder versi pendek\n\t\t// return $this->db->get('penumpang')->result();\n\t}",
"function get_pejabat($idpejabat)\n {\n return $this->db->get_where('pejabat',array('idpejabat'=>$idpejabat))->row_array();\n }",
"public function getAllPois(): array\n {\n $output = [];\n $items = $this->db->query(\"SELECT id FROM pois\")->fetchAll();\n foreach ($items as $item) {\n $output[] = $this->getPoiById($item->id);\n }\n return $output;\n }",
"public function getAllPetugas()\n {\n $query = $this->db->get('petugas');\n //untuk menampilkan isi dari query\n return $query->result_array();\n }",
"public function getPelatihans()\n {\n return $this->hasMany(Pelatihan::className(), ['pegawai_id' => 'id']);\n }",
"function get_all_pembayaran()\n {\n $this->db->order_by('ID_PEMBAYARAN', 'desc');\n return $this->db->get('PEMBAYARAN')->result_array();\n }",
"function getAllFromProizvod(){\n\t\treturn $this->ime . \" \" . $this->imeProizvođača . \" \" \n\t\t. $this->prezimeProizvođača . \" \" . $this->cijena;\n\t}",
"public function list_pais()\n {\n $listpais = DB::table('par_pais')->select('id','pai_nombre')->orderBy('pai_nombre')->get();\n\t\treturn $listpais;\n }",
"public function getPeoples(){\n $result = $this->mysqli->query('SELECT * FROM alumno');\n $peoples = $result->fetch_all(MYSQLI_ASSOC);\n $result->close();\n return $peoples;\n }",
"public function get_all ();",
"public function getAllPenerbit(){\n if(!$this->isLoggedIn()){\n return false;\n }\n\n try {\n // Ambil data user dari database\n $query = $this->db->prepare(\"SELECT * FROM penerbit \");\n $query->execute();\n return $query->fetchAll();\n } catch (PDOException $e) {\n echo $e->getMessage();\n return false;\n }\n }",
"function get_all_pelanggan($params = array())\n {\n $this->db->order_by('id_pelanggan', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('pelanggan')->result_array();\n }",
"public function getAllAMt() {\n $data = $this->db->query(\"select * from pegawai where (jabatan='SUPIR' or jabatan='KERNET')\");\n return $data;\n }",
"public static function findAll():array \r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"SELECT * FROM puesto;\");\r\n\r\n $datos=[];\r\n while ($puesto = $db->getObjeto(\"Puesto\")) {\r\n array_push($datos, $puesto); \r\n }\r\n\r\n return $datos;\r\n }",
"public function getAllDataPenyakit()\n {\n $query = $this->db->query('SELECT * FROM tb_penyakit');\n return $query->result();\n }",
"function getAll() {\n $this->getConnection();\n $request = \"SELECT P.ID_PRODUIT, P.DATE_CREATION, P.NOM, P.PRIX, P.DESCRIPTION, P.ID_CATEGORIE, P.IMAGE, C.NOM AS CATEGORIE \n FROM PRODUIT P INNER JOIN CATEGORIE C ON P.ID_CATEGORIE=C.ID_CATEGORIE\";\n $result = $this->select($request);\n return $result;\n }",
"public function all()\n {\n return $this->hatarakiKata\n ->get();\n }",
"public function getPolizas(){\n\t\t$this->_model_poliza = new Model_Poliza();\n\n\t\t$row = $this->_model_poliza\n\t\t->getTable()\n\t\t->createQuery()\n\t\t->andWhere('estado_id in ?',array(2))\n\t\t->andWhere('despachante_aduana_id = ?',$this->_model->despachante_aduana_id)\n\t\t->execute()\n\t\t->toArray();\n\n\t\treturn $row;\n\n\t}",
"public function get_all(){\n\t\t$this->db->select('ok,valorx,valory,teta,q1,q2,q3,q4,ftang,fnormal');\n\t\treturn $this->db->limit(1)->order_by('id','desc')->get('plataforma')->result_array();\n\t}",
"public function listsPepreasonget()\r\n {\r\n $response = Pepreason::all();\r\n return response()->json($response,200);\r\n }",
"public function getPraktikum()\n\t{\n\t\t$sql = \"SELECT * FROM praktikum WHERE\nstatus = 1\";\n\t $query = koneksi()->query($sql);\n\t $hasil = [];\n\t while ($data = $query->fecth_assoc())\n\t\t$hasil[] = $data;\n\t }",
"public static function getAll();",
"public static function getAll();"
]
| [
"0.720695",
"0.7148643",
"0.71315914",
"0.7056797",
"0.7040648",
"0.7035885",
"0.70065653",
"0.6960054",
"0.692627",
"0.6913165",
"0.6913136",
"0.6896919",
"0.68780184",
"0.685709",
"0.68477863",
"0.68319815",
"0.68293214",
"0.6803032",
"0.67976135",
"0.67862356",
"0.6776726",
"0.6727675",
"0.6724997",
"0.67012995",
"0.6688108",
"0.6675192",
"0.6668666",
"0.66432285",
"0.6608295",
"0.6608295"
]
| 0.7749476 | 0 |
/ function to delete pejabat | function delete_pejabat($idpejabat)
{
return $this->db->delete('pejabat',array('idpejabat'=>$idpejabat));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function delete() ;",
"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 delete();",
"public function delete_faseetapa($id_p){ \n\n $this->db->where('proy_id', $id_p);\n $this->db->delete('_proyectofaseetapacomponente');\n }",
"public static function delete() {\n\n\n\t\t}",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"abstract function delete();",
"function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}",
"public abstract function delete();",
"public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }",
"public function destroy(peserta $peserta)\n {\n //\n }",
"public static function delete() {\r\n\t\t\r\n\t}",
"function delete()\n {\n }"
]
| [
"0.73884976",
"0.73884976",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.7257584",
"0.6948544",
"0.69392365",
"0.6925347",
"0.6925347",
"0.6925347",
"0.6925347",
"0.6877556",
"0.67925835",
"0.67721504",
"0.67674595",
"0.67493194",
"0.67465264",
"0.67060596"
]
| 0.7658528 | 0 |
Add tagBeep's panel to the wp admin panel admin_menu action | function tb_addTagBeepToWpAdmin() {
//add in /settings manu
add_options_page("tagBeep uptime", "tagBeep uptime", 8, "tagBeepUptimeMonitor", "tb_load_tagBeepAdmin");
//add in the /plugins menu
add_plugins_page("tagBeep uptime", "tagBeep uptime", 8, "tagBeepUptimeMonitorPlugin", "tb_load_tagBeepAdmin");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function admin_actions() {\n\t\t$menutitle = '<img src=\"' . get_bloginfo('url') . '/wp-content/plugins/paywithafacebookpost/img/paywithfb.png\" alt=\"\" />' ;\n\t\tadd_options_page($menutitle . \" Pay With A Facebook Post\", $menutitle . \" Pay With A Facebook Post\", 8, basename(__FILE__), array(\"plgPayWithAFacebookPost\",\"admin\"));\n\t}",
"function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}",
"function admin_chartbeat_admin_actions() { \n\t add_options_page('Chartbeat Widget Options', 'Admin Chartbeat Widget', 'manage_options', 'admin-chartbeat-widget.php', 'admin_chartbeat_admin');\n\t add_action( 'admin_init', 'admin_chartbeat_register_settings' );\n\t}",
"public function custom_admin_menu() {\n\t\tadd_submenu_page(\n\t\t\tAdmin::PARENT_MENU_SLUG,\n\t\t\t_x( 'Playlists', '', 'wpp-youtube' ),\n\t\t\t_x( 'Playlists', '', 'wpp-youtube' ),\n\t\t\t'manage_options',\n\t\t\t'edit-tags.php?taxonomy=' . self::TAXONOMY,\n\t\t\tnull\n\t\t);\n\t}",
"public function add_plugin_admin_menu() {\n\n $this->plugin_screen_hook_suffix = add_options_page(\n 'WordPress Popular Posts',\n 'WordPress Popular Posts',\n 'manage_options',\n 'wordpress-popular-posts',\n array( $this, 'display_plugin_admin_page' )\n );\n\n }",
"public function addAdminPanel() {\n add_menu_page(\n __('LaterPay Plugin Settings', 'laterpay'),\n 'LaterPay',\n 'manage_options',\n 'laterpay/laterpay-admin.php',\n '',\n 'dashicons-laterpay-logo',\n 81\n );\n }",
"function thesis_openhooks_menu() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->add_menu(array(\n\t\t\t'id' => 'openhook',\n\t\t\t'title' => __('OpenHook'),\n\t\t\t'href' => admin_url('options-general.php?page=openhook&tab=tha')\n\t\t\t//'href' => $bloginfo('url')'/wp-admin/options-general.php?page=openhook&tab=tha'\n\t));\n}",
"public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}",
"public function admin_menu() {\n\t\t$intrusion_count = (int) Mute_Screamer::instance()->get_option( 'new_intrusions_count' );\n\t\t$intrusions_menu_title = sprintf( __( 'Intrusions %s', 'mute-screamer' ), \"<span class='update-plugins count-$intrusion_count' title='$intrusion_count'><span class='update-count'>\" . number_format_i18n( $intrusion_count ) . '</span></span>' );\n\t\tadd_dashboard_page( __( 'Mute Screamer Intrusions', 'mute-screamer' ), $intrusions_menu_title, 'activate_plugins', 'mscr_intrusions', array( $this, 'intrusions' ) );\n\t\tadd_options_page( __( 'Mute Screamer Configuration', 'mute-screamer' ), __( 'Mute Screamer', 'mute-screamer' ), 'activate_plugins', 'mscr_options', array( $this, 'options' ) );\n\n\t\t// Modify the Dashboard menu updates count\n\t\t$this->set_update_badge();\n\t}",
"function admin_menu(){\r\n //$level = 'manage-options'; // for wpmu sub blog admins\r\n $level = 'administrator'; // for single blog intalls\r\n $this->hook = add_options_page ( 'TwitterLink Settings', 'TwitterLink Settings', $level, $this->slug, array (&$this, 'options_page' ) );\r\n // load meta box script handlers\r\n add_action ('load-'.$this->hook, array(&$this,'queue_options_page_scripts'));\r\n }",
"function blendle_button_admin_menu() {\n add_options_page(\n 'Blendle Button Settings',\n 'Blendle Button',\n 'manage_options',\n 'blendle_button',\n 'blendle_button_options_page'\n );\n}",
"function pt_add_admin_menu()\n\t\t{ \n\t\t\t$page_title = __('Pretty Block Testimonials', 'ptlg');\n\t\t\t$menu_title = __('Pretty Block Testimonials', 'ptlg');\n\t\t\t$capability = 'manage_options';\n\t\t\t$menu_slug = 'pretty-testimonials';\n\t\t\t$function = array( &$this, 'pt_options_page');\n\t\t\tadd_options_page($page_title, $menu_title, $capability, $menu_slug, $function);\n\t\t}",
"function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}",
"function templ_add_admin_menu_()\r\n{\r\n\tdo_action('templ_add_admin_menu_');\r\n}",
"public function admin_bar($wp_admin_bar) {\n $wp_admin_bar->add_menu(array(\n 'parent' => 'new-content',\n 'id' => 'new-h5p-content',\n 'title' => __('H5P Content', $this->plugin_slug),\n 'href' => admin_url('admin.php?page=h5p_new')\n ));\n }",
"function tp_add_tools_menu() \n{\n\tadd_submenu_page('tools.php', 'WP Extension Manager', 'WP Extension Manager', 10, basename(__FILE__), 'show_index_page');\n\tadd_action('activate_plugin','em_activate_plugin');\n}",
"function tb_onPluginActivate() {\r\n add_option('tagBeep_redirect_to_plugin', 'true');\r\n}",
"public function register_admin_menu(){\r\n $all_modules = HW_TGM_Module_Activation::get_register_modules();\r\n $module = $this->_option('module');\r\n $name = $module->module_name;\r\n $label = isset($all_modules[$name])? $all_modules[$name]['name'] : $name;\r\n\r\n $this->add_help_content(self::load_settings_page_hook_slug(HW_Module_Settings_page::PAGE_SLUG) ,$name , $label);\r\n }",
"function hello_bar_setup() {\t\r\n\tadd_action( 'admin_init', 'hello_bar_admin_warnings' );\r\n}",
"public function admin_menu() \n\t{\n\t\tadd_options_page('Generuoti laiškus', 'Generuoti laiškus', 'manage_options', 'kd-letters', array($this, 'admin_menu_options'));\n\t}",
"public static function admin_menu() {\n\t\t$title = 'Micropub';\n\t\t// If the IndieWeb Plugin is installed use its menu.\n\t\tif ( class_exists( 'IndieWeb_Plugin' ) ) {\n\t\t\t$options_page = add_submenu_page(\n\t\t\t\t'indieweb',\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t} else {\n\t\t\t$options_page = add_options_page(\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t}\n\n\t}",
"function myplugin_Add_My_Admin_Link()\n{\n add_menu_page(\n 'Plugin TOTO Page', // Titre de la page\n 'Plugin TOTO', // Texte du lien dans le menu\n 'manage_options', // capacité nécessaire pour accéder au lien\n 'ShotcodeAndSEO/includes/toto-acp-page.php' // fichier à afficher quand on clique sur le lien\n );\n}",
"public function add_menu() {\n\n add_options_page('Форум phpbb3 :: администрирование', 'Форум phpbb3', 'manage_options', 'phpbb3', array($this, 'plugin_options'));\n }",
"function abc_admin_dashboard()\n{\n add_menu_page('Awesome BMI Dashboard', 'Awesome BMI', 'manage_options', 'awesome-bmi', 'abc_admin_dashboard_init');\n}",
"function bp_lb_plugin_menu() {\n\t\tadd_options_page( 'BuddyPress Update Email Reminder Lightbox Settings', 'BuddyPress Update Email Reminder Lightbox Settings', 'manage_options', 'lb-alerts-settings', 'bp_lb_alerts_options' );\n\t}",
"function mr_megaresult_admin_menu() {\n add_menu_page(\"MegaResult\", \"MegaResult\", \"manage_options\", \"megaresult-plugin\", \"mr_megaresult_admin_init\",\"dashicons-awards\");\n}",
"function handleAdminMenu ()\n\t{\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'post', 'normal' );\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'page', 'normal' );\n\t}",
"function tsuiseki_tracking_admin_menu() {\n add_menu_page('Tsuiseki Plugin Settings', 'Tsuiseki Settings', 'administrator', __FILE__, 'tsuiseki_tracking_settings_page');\n}",
"public function onWpAdminMenu() {\n\t}",
"function spsn_admin_tab() {\n\n add_menu_page('Share blog post with social network', 'Share blog post with social network', 'manage_options', __FILE__, 'spsn_admin_page');\n}"
]
| [
"0.7011635",
"0.6940231",
"0.68914056",
"0.687653",
"0.6766032",
"0.67465866",
"0.6713363",
"0.6699646",
"0.66678065",
"0.6623464",
"0.6600367",
"0.6585066",
"0.6566238",
"0.6527503",
"0.6513445",
"0.6494724",
"0.64945096",
"0.64941704",
"0.64812464",
"0.6476937",
"0.6474341",
"0.64700556",
"0.6464134",
"0.6462778",
"0.64618576",
"0.6455675",
"0.6454331",
"0.6435032",
"0.6427427",
"0.6426618"
]
| 0.814 | 0 |
On activate event set the option tagBeep_redirect_to_plugin to redirect | function tb_onPluginActivate() {
add_option('tagBeep_redirect_to_plugin', 'true');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function tb_tagBeep_plugin_redirect() {\r\n if (get_option('tagBeep_redirect_to_plugin') == 'true') {\r\n //we have the key tagBeep_redirect_to_plugin, we have to redirect to the plugin page\r\n update_option('tagBeep_redirect_to_plugin', 'false'); //set the key to false to not redirect each time\r\n wp_redirect('plugins.php?page=tagBeepUptimeMonitorPlugin');\r\n }\r\n}",
"public function plugin_activate_hook() {\r\n add_option( 'woolentor_do_activation_redirect', TRUE );\r\n add_option( 'woolentor_do_activation_library_cache', TRUE );\r\n }",
"public function activate() {\n\t\t/**\n\t\t * Fires when the plugin is being activated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action('audition_activate');\n\t}",
"public function activatePlugin();",
"function imbaf_redirection_activate($plugin){\n\n\n if(get_option('imbaf_license_key') == null){\n\n if( $plugin == plugin_basename(IMBAF_PLUGIN_PATH.'affilipus.php') ) {\n exit( wp_redirect( admin_url( 'admin.php?page=imbaf_settings_license' ) ) );\n }\n\n }\n\n }",
"abstract protected function activate_plugin();",
"public function activate() {\n add_option( 'wpb_js_composer_do_activation_redirect', true );\n }",
"public static function activate() {\n //delete_option( 'ptb_plugin_options' );\n }",
"function activation_redirect( $plugin ) {\n\t\t\n\t\t$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );\n\t\t if($plugin_data['Name'] == \"Landing Page Booster\")\n\t\t {\n\t\t\tdo_action( 'remove_license','' );\n\t\t\texit( wp_redirect( admin_url( 'admin.php?page=krSetup' ) ) );\n\t\t }\n \n}",
"static function onActivate() {\n $options = get_option(self::$optionsKey);\n if (!is_null($options)) {\n // write default options into database\n $options = array();\n $options['allowedTags'] = self::$allowedTags;\n $options['remoteStoreUrl'] = self::$remoteStoreUrl;\n $options['rteWebpackage'] = self::$rteWebpackage;\n add_option(self::$optionsKey, $options);\n }\n }",
"public function plugin_activate() {\r\n\t\tupdate_option( $this->options_name, $this->options);\r\n\t}",
"public function dahz_redirect_after_activate() {\n header( 'Location: ' . admin_url( esc_url_raw( 'admin.php?page=dahzframework&activated=true' ) ) );\n }",
"function activate() \n {\n // prepare the options\n $this->get_options();\n // set the WordPress hooks\n $this->wp_hooks();\n }",
"function hook_activate() {\r\n\r\n if (!current_user_can('activate_plugins'))\r\n return;\r\n $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';\r\n check_admin_referer(\"activate-plugin_{$plugin}\");\r\n }",
"function activate_plugin() {\n\t$logger = get_logger();\n\t$logger->activate();\n\n\t/**\n\t * Trigger custom capabilities required by the plugin to be registered.\n\t */\n\tdo_action( 'mcavoy_register_caps' );\n}",
"function activate_akvockan_plugin() {\n\tInc\\Base\\Activate::activate();\n}",
"public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}",
"function jft_assistant_activate() {\n\trequire_once JFT_ASSISTANT_DIR__ . '/classes/JftAssistant/Autoloader.php';\n\tJftAssistant_Autoloader::register();\n\tJftAssistant_Plugin::get_instance()->activate();\n}",
"public function plugin_activate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}",
"public function plugin_redirect_option_page() {\r\n if ( get_option( 'woolentor_do_activation_redirect', FALSE ) ) {\r\n delete_option('woolentor_do_activation_redirect');\r\n if( !isset( $_GET['activate-multi'] ) ){\r\n wp_redirect( admin_url(\"admin.php?page=woolentor-pro\") );\r\n }\r\n }\r\n }",
"public static function activate_plugin(){\n\t\t\tadd_option('breakingnews_area_title', __('Breaking news', 'text-domain'));\n\t\t\tadd_option('breakingnews_text_color', '#F0F0F0');\n\t\t\tadd_option('breakingnews_bg_color', '#333333');\n\t\t\tadd_option('breakingnews_autoinsert', '1');\n\t\t}",
"function activate() {\n $existing_blogname = $this->ext->get_option( 'livefyre_blogname', false );\n if ( $existing_blogname ) {\n $site_id = $existing_blogname;\n $existing_key = $this->ext->get_option( 'livefyre_secret', false );\n update_option('livefyre_apps-'. 'livefyre_site_id', $site_id );\n $this->ext->delete_option( 'livefyre_blogname' );\n update_option('livefyre_apps-'. 'livefyre_site_key', $existing_key );\n $this->ext->delete_option( 'livefyre_secret' );\n } else {\n $site_id = get_option('livefyre_apps-livefyre_site_id', false );\n }\n \n if ( !get_option('livefyre_apps-livefyre_domain_name', false) ) {\n // Initialize default profile domain i.e. livefyre.com\n $defaultDomainName = get_option('livefyre_apps-livefyre_domain_name', LF_DEFAULT_PROFILE_DOMAIN);\n update_option('livefyre_apps-'. 'livefyre_domain_name', $defaultDomainName );\n } \n if ( !get_option('livefyre_apps-livefyre_auth_delegate_name', false) ) {\n $defaultDelegate = get_option('livefyre_apps-livefyre_auth_delegate_name', '');\n update_option('livefyre_apps-'. 'livefyre_auth_delegate_name', $defaultDelegate );\n } \n if ( !get_option('livefyre_apps-livefyre_domain_key', false) ) {\n $defaultKey = get_option('livefyre_apps-livefyre_domain_key', ''); \n update_option('livefyre_apps-'. 'livefyre_domain_key', $defaultKey );\n }\n \n if ( !$this->ext->get_option( 'livefyre_v3_installed', false ) ) {\n // Set a flag to show the 'hey you just upgraded' (or installed) flash message\n // Set the timestamp so we know which posts use V2 vs V3\n if ( $site_id ) {\n $this->ext->update_option( 'livefyre_v3_installed', current_time('timestamp') );\n $this->ext->update_option( 'livefyre_v3_notify_upgraded', 1 );\n $this->run_backfill( $site_id ); //only run backfill on existing blogs\n } else {\n // !IMPORTANT\n // livefyre_v3_installed == 0 is used elsewhere to determine if this\n // installation was derived from a former V2 installation\n $this->ext->update_option( 'livefyre_v3_installed', 0 );\n $this->ext->update_option( 'livefyre_v3_notify_installed', 1 );\n $this->ext->update_option( 'livefyre_backend_upgrade', 'skipped' );\n }\n }\n }",
"function on_activate()\n\t{\n\t\t// Disable buggy sitewide activation in WPMU and WP 3.0\n\t\tif ((is_multisite() && isset($_GET['sitewide'])) || ($this->is_network_mode() && isset($_GET['networkwide'])))\n\t\t\t$this->network_activate_error();\n\t\t\n\t\t// Default options\n\t\tupdate_option('ld_http_auth', 'none');\n\t\tupdate_option('ld_hide_wp_admin', 'no');\n\t}",
"public function onActivation() {\n\n\t\t$this->options->initDefaultOptions();\n\t}",
"function affiliatewp_dlt_plugin_activate() {\n\tadd_option( 'affwp_dlt_activated', true );\n}",
"function activate_sitewide_plugin()\n {\n }",
"function activate() {\n\t\t\tadd_option('h2utp_options', json_encode($this->options));\n\t\t}",
"function activate(){\n\n\t\t//$this->deactivate();\n\n\t\t$current_version = FALSE;\n\t\t$general_options = $options[ WPC_OPTIONS ];\n\t\t\n\t\tif ( $general_options !== FALSE && isset( $general_options[ 'WPC_VERSION' ] ) ){\n\t\t\t$current_version = $general_options[ 'WPC_VERSION' ];\t\t\n\t\t}\n\t\t\n\t\tif ( $current_version === FALSE || version_compare( $current_version, \"2.0\" ) == -1 ){\n\t\t\t\n\t\t\t// get the options from the old version\n\t\t\t$options = WordpressConnect::getOldVersionOptions();\n\t\t\t// port the options into the new version\n\t\t\tWordpressConnect::setOptions( $options );\n\t\t\t\n\t\t}\t\t\n\t\telse {\n\n\t\t\t$options = WordpressConnect::getDefaultOptions();\n\t\t\t\n\t\t\t// apply the options from the current theme\n\t\t\t$options = apply_filters( 'wp_connect_options', $options );\n\t\t\tWordpressConnect::setOptions( $options );\n\t\t\t\n\t\t}\n\t}",
"public function activate()\n {\n if (Manager::getInstance()->isPluginActivated('Login') == true) {\n Manager::getInstance()->deactivatePlugin('Login');\n }\n }",
"public function action_admin_post_plugin_activate() {\n\t\tif ( $this->activation_disabled )\n\t\t\twp_die( __( 'Plugin activation via this UI has been disabled from within your theme.', 'wpcom-vip-plugins-ui' ) );\n\n\t\tif ( empty( $_GET['plugin'] ) )\n\t\t\twp_die( sprintf( __( 'Missing %s parameter', 'wpcom-vip-plugins-ui' ), '<code>plugin</code>' ) );\n\n\t\tif ( ! current_user_can( $this->capability ) )\n\t\t\twp_die( __( 'You do not have sufficient permissions to activate plugins for this site.' ) );\n\n\t\t$plugin_slug = sanitize_file_name( $_GET['plugin'] );\n\t\t$plugin_file = $plugin_slug . '/' . $plugin_slug . '.php';\n\n\t\tcheck_admin_referer( 'activate-' . $plugin_slug );\n\n\t\tif ( is_wp_error( $this->activate_plugin( $plugin_slug ) ) )\n\t\t\twp_die( __( \"Failed to activate plugin. Maybe it's already activated?\", 'wpcom-vip-plugins-ui' ) );\n\n\t\twp_safe_redirect( $this->get_menu_url( array( 'activated' => '1' ) ) );\n\t\texit();\n\t}"
]
| [
"0.7170224",
"0.71066463",
"0.656983",
"0.6524379",
"0.65230954",
"0.64989483",
"0.6357853",
"0.6248893",
"0.6221345",
"0.6124907",
"0.60982805",
"0.6097742",
"0.60708517",
"0.60234416",
"0.60038537",
"0.5995095",
"0.5951577",
"0.5896945",
"0.58967584",
"0.58636487",
"0.58061576",
"0.57815105",
"0.57376325",
"0.5725869",
"0.5710587",
"0.56659305",
"0.5656298",
"0.56560934",
"0.565234",
"0.56513375"
]
| 0.8776905 | 0 |
La fonction getID retourne l'ID du post | public function getID(){
return $this->id_post;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_id() {\n\t\treturn $this->_post->ID;\n\t}",
"public function id() { return $this->post->ID; }",
"public function getIdPost()\n {\n return $this->id_post;\n }",
"public function getIdPost()\n {\n return $this->idPost;\n }",
"public function getIdPost(): int\n {\n return $this->id_post;\n }",
"public function getPost_id()\n {\n return $this->post_id;\n }",
"public function getPostId()\n {\n return $this->postId;\n }",
"public function getPostId()\n {\n return $this->post_id;\n }",
"public function getPostID(){\n return $this->POST_ID;\n }",
"public function getPostId() {\n\t\treturn $this->post_id;\n\t}",
"public function get_post_ID() {\n\t\treturn $this->post_id;\n\t}",
"public function getPostId()\n {\n return $this->postId;\n }",
"public function getPostId()\n {\n return $this->postId;\n }",
"public function getPostId()\n {\n return $this->postId;\n }",
"public function getPostID()\n {\n return $this->postID;\n }",
"public function getPostId() {\n\t\treturn ($this->postId);\n\t}",
"public function getPostId() {\n\n\t\treturn $this->postId;\n\t}",
"public static function id()\n {\n // can't use facades to access properties unfortunately!\n return query()->post->ID ?? null;\n }",
"public function get_post_id() {\n\t\tglobal $post;\n\n\t\tif ( isset( $post ) && is_object( $post ) ) {\n\t\t\treturn $post->ID;\n\t\t}\n\n\t\tif ( ! empty( $_GET['post'] ) ) {\n\t\t\treturn absint( $_GET['post'] );\n\t\t}\n\n\t\tif ( ! empty( $_POST['ID'] ) ) {\n\t\t\treturn absint( $_POST['ID'] );\n\t\t}\n\n\t\tif ( ! empty( $_POST['post_ID'] ) ) {\n\t\t\treturn absint( $_POST['post_ID'] );\n\t\t}\n\n\t\treturn 0;\n\t}",
"public function getID();",
"public function getID();",
"public function getID();",
"function get_post_ID() {\n\t\treturn $this->get_data( 'comment_post_ID' );\n\t}",
"public function get_id();",
"public function get_id();",
"function get_id()\n\t{\n\t\treturn $this->id;\n\t}",
"function get_the_ID()\n {\n }",
"function get_id() {\n\t\treturn $this->id;\n\t}",
"function getID();",
"function get_id()\r\n {\r\n return $this->id;\r\n }"
]
| [
"0.8281698",
"0.79640985",
"0.785352",
"0.78039145",
"0.76513124",
"0.7552922",
"0.75360054",
"0.7522283",
"0.7509603",
"0.7485022",
"0.7454128",
"0.74435425",
"0.74435425",
"0.7416648",
"0.7396076",
"0.7393025",
"0.73314124",
"0.73260266",
"0.72828233",
"0.7266522",
"0.7266522",
"0.7266522",
"0.7233986",
"0.7192568",
"0.7192568",
"0.7133832",
"0.7127558",
"0.7106021",
"0.7099495",
"0.70877206"
]
| 0.84069896 | 0 |
La fonction afficherPost affiche le post sur la page en remplacant les valeurs dans template.post.html par celles de la classe | public function afficherPost(){
$gab = new Template("./");
$gab->set_filenames(array("body" => "template.post.html"));
$gab->assign_vars(array("user" => $this->user));
$gab->assign_vars(array("title" => $this->title_post));
$gab->assign_vars(array("text" => $this->text_post));
$gab->assign_vars(array("date" => $this->date_post));
$gab->assign_vars(array("id_post" => $this->id_post));
$gab->assign_vars(array("count_like" => $this->count_like));
$gab->assign_vars(array("count_answer" => $this->count_answer));
$gab->assign_vars(array("like_button" => $this->like_button));
$gab->assign_vars(array("like_value" => $this->like_value));
$gab->pparse("body");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function postPage(){\n require_once \"controller/Post.php\";\n $post = new Post();\n require_once \"controller/Comment.php\";\n $comment = new Comment();\n //gets the post id in URL\n $idPost = $this->_url[1];\n //adds post info\n $html_post = $post->getPost($idPost);\n $html = View::makeHtml($html_post, \"post_template\");\n $html .= \"<br/><div id=\\\"comments\\\"><h2>Commentaires</h2><ul>\";\n //count nb of comments for the post\n $nb_comments = $comment->countComments($idPost);\n //according to nb of comments\n switch ($nb_comments[\"nb_comments\"]){\n case 0:\n $html .= \"<p>Pas encore de commentaire</p>\";\n break;\n case 1:\n //adds comments infos\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeHtml($html_comments, \"comments_template\");\n break;\n default:\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeLoopHtml($html_comments, \"comments_template\");\n break;\n }\n //adds the \"leave a comment\" form\n $html .= \"</ul>\";\n $html .= View::makeHtml([\n \"{{ path }}\" => $GLOBALS[\"path\"],\n \"{{ idPost }}\" => $idPost\n ],\"add_comment_template\");\n $html .= \"</div>\";\n return [\n \"{{ pageTitle }}\" => $html_post[\"{{ post_title }}\"],\n \"{{ content }}\" => $html,\n \"{{ path }}\" => $GLOBALS[\"path\"]\n ];\n }",
"public function show(): void\n {\n $post = $this->model;\n $getArray = $post->collectInput('GET'); // collect global $_GET data\n $pageTitle = '';\n $style = 'success';\n $message = '';\n\n if(empty($getArray['id'])) // if no ID\n {\n $post->redirect('index.php?page=404-error');\n }\n\n if(!empty($getArray['id']))\n {\n $getId = (int) $getArray['id'];\n $DBpost = $post->find($getId); // search the post with this id in database and get it if it exists\n\n if (!$DBpost)\n {\n $post->redirect('index.php?page=404-error');\n }\n\n if (!empty($DBpost)) // if post exists in database\n {\n foreach ($DBpost as $k => $v) $post->$k = $v;\n\n if (($post->status != self::STATUS_APPROVED) OR (strtotime($post->publication_date) > time()))\n {\n $post->redirect('index.php?page=404-error');\n }\n\n if (isset($getArray['comment']))\n {\n $message = 'Votre commentaire a été envoyé. Il sera publié après modération par un administrateur.';\n \n if ($getArray['comment'] != 'submitted')\n {\n $message = 'Une erreur est survenue, le commentaire n\\'a pas pu être envoyé.';\n $style = 'danger';\n }\n \n }\n\n $comments = $post->getComments(true, false);\n $post->nb_comments = count($comments);\n\n $pageTitle = $post->title;\n }\n }\n\n $this->display('front', 'post', $pageTitle, compact('post','comments','message','style'));\n }",
"function aff_cont_post($id_post, $texte_post, $image_post, $id_post_relai, $id_auteur, $cas){\n ?>\n <div class=\"contenu_post_<?php echo $id_post; ?>\">\n <?php\n\t\tif($cas == 2) {\n\t\t\tif(strlen($texte_post) > 600) {\n\t\t\t\t$texte_post = substr($texte_post, 0, 600).' ...';\n\t\t\t}\n\t\t}\n\t\techo $texte_post;\n\t\t\t\n\t\tif( !empty($image_post)) {\n\t\t?>\n\t\t\t<div class=\"cadre_image_post\" >\n\t\t\t\t<img class=\"image_posts\" width=\"100%\" src=\"/ressources/images/posts/<?php echo $id_auteur.'/'.$image_post; ?>\" />\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\telse {\n\t\t}\n\t\t?>\n\t\t</div>\n <?php \n\t\tif(!empty($id_post_relai))\n\t\t{\n\t\t\t//$include('controleur-relai.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t}\n }",
"public function posts()\n\t{\n\t\t$this -> template = 'default_1';\n\t\t$url = $this -> basepath();\n\n\t\t$posts = \\App\\App::getInstance() -> getTable('postsManager');\n\t\t$posts = $posts -> getPosts();\n\t\t$categories = \\App\\App::getInstance() -> getTable('categoriesManager');\n\t\t$categories = $categories -> getCategories();\n\t\t$this -> page('posts/posts', compact('posts', 'categories', 'url'));\n\t}",
"public function display($post);",
"function show()\n\t{\n\t\t$this->process();\n\t\t\n\t\tif($this->topic_id)\n\t\t{\n\t\t\t$akt_topic = selectOne(\"SELECT * FROM `\".$this->prefix.\"topic` WHERE `topic_id`=\".$this->topic_id);\n\n\t\t\t$posts_str = \"\";\n\n\t\t\t$post_where = \"WHERE `post_topic`=\".$this->topic_id.($this->isHavePriv(FORUM_PRIV_POST_PUB)?\"\":\" AND `post_pub`=1\").\" ORDER BY `post_time` DESC\";\n\n\t\t\t$post_pager = new lapozo($this->prefix.'post',$post_where,$this->post_pager_get,$this->post_per_page); \n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"post` \".$post_where.\" \".$post_pager->getLimit()) as $post)\n\t\t\t{\n\t\t\t\t$post['post_body'] = nl2br($post['post_body']);\n\t\t\t\tforeach($this->smiles as $val)\n\t\t\t\t{\n\t\t\t\t\tif(is_array($val['short'])) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($val['short'] as $val2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$post['post_body'] = str_replace($val2,'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse $post['post_body'] = str_replace($val['short'],'<img src=\"'.$val['url'].'\" alt=\"'.$val['name'].'\" />',$post['post_body']);\n\n\t\t\t\t}\n\n\t\t\t\t$reply_to_v = 0;\n\t\t\t\tif($post['post_reply_to'])\n\t\t\t\t{\n\t\t\t\t\t$reply_to_v = selectOne(\"SELECT `post_time`,`post_sender` FROM `\".$this->prefix.\"post` WHERE `post_id`=\".$post['post_reply_to']);\n\t\t\t\t}\n\t\t\t\t$posts_str .= $this->templates[FORUM_TEMPLATE_POSTLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\tarray_merge($post,array(\n\t\t\t\t\t\t\t\t\t\"sender\"=>$this->getUserName($post['post_sender']),\n\t\t\t\t\t\t\t\t\t\"reply_to_user\"=>$reply_to_v?$this->getUserName(($reply_to_v['post_sender'])):\"\",\n\t\t\t\t\t\t\t\t\t\"reply_to_post_id\"=>$post['post_reply_to'],\n\t\t\t\t\t\t\t\t\t\"reply_to_post_time\"=>$reply_to_v?$reply_to_v['post_time']:0,\n\t\t\t\t\t\t\t\t\t\"reply_to_link\"=>addDelGET(array($this->reply_to_get=>$post['post_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\"pub\"=>$post['post_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"post_operation\"><input type=\"hidden\" name=\"post_id\" value=\"'.$post['post_id'].'\">',\n\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_POST_PUB)?1:0\n\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_POSTVIEW]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"body\"=>$posts_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pager\"=>$post_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to\"=>$this->getUserName($this->getUserFromPost($this->reply_to_id)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"reply_to_id\"=>$this->reply_to_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"forum_send\">',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"textarea\"=>'body',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_topic['topic_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"user_id\"=>isNumber($this->akt_user)?$this->akt_user:0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$akt_cat = selectOne(\"SELECT * FROM `\".$this->prefix.\"cat` WHERE `cat_id`=\".$this->cat_id);\n\n\n\t\t\t$cat_where = \"WHERE `cat_parent`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_CAT_PUB)?\"\":\" AND `cat_pub`=1\").\" ORDER BY `cat_name` \";\n\n\t\t\t$cat_pager = new lapozo($this->prefix.'cat',$cat_where,$this->cat_pager_get,$this->cat_per_page); \n\n\t\t\t$catlist_str = \"\";\n\t\t\t\n\t\t\t$cat_sorsz=0;\n\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"cat` \".$cat_where.\" \".$cat_pager->getLimit()) as $cat)\n\t\t\t{\n\t\t\t\t$catlist_str .= $this->templates[FORUM_TEMPLATE_CATLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\t\tarray_merge($cat,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->cat_get=>$cat['cat_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$cat['cat_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"cat_operation\"><input type=\"hidden\" name=\"cat_id\" value=\"'.$cat['cat_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$cat_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($cat['cat_created_by'])\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\n\n\t\t\t$topic_where = \"WHERE `topic_cat`=\".$this->cat_id.\" \".($this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?\"\":\" AND `topic_pub`=1\").\" ORDER BY `topic_name` \";\n\n\t\t\t$topic_pager = new lapozo($this->prefix.'topic',$topic_where,$this->topic_pager_get,$this->topic_per_page); \n\t\t\t\n\t\t\t$topic_sorsz = 0;\n\n\t\t\t$topiclist_str = \"\";\n\t\t\tforeach(doSelect(\"SELECT * FROM `\".$this->prefix.\"topic` \".$topic_where.\" \".$topic_pager->getLimit()) as $topic)\n\t\t\t{\n\t\t\t\t$topiclist_str .= $this->templates[FORUM_TEMPLATE_TOPICLIST_ELEM]->getTrans(\n\t\t\t\t\t\t\t\t\t\tarray_merge($topic,array(\n\t\t\t\t\t\t\t\t\t\t\"link\"=>addDelGET(array($this->topic_get=>$topic['topic_id']),array(\"rt\")),\n\t\t\t\t\t\t\t\t\t\t\"pub\"=>$topic['topic_pub']?\"unpub\":\"pub\",\n\t\t\t\t\t\t\t\t\t\t\"del\"=>\"del\",\n\t\t\t\t\t\t\t\t\t\t\"del_bizt\"=>\"del_bizt\",\n\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"topic_operation\"><input type=\"hidden\" name=\"topic_id\" value=\"'.$topic['topic_id'].'\">',\n\t\t\t\t\t\t\t\t\t\t\"del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\"sorszam\"=>$topic_sorsz++,\n\t\t\t\t\t\t\t\t\t\t\"created_by\"=>$this->getUserName($topic['topic_created_by']),\n\t\t\t\t\t\t\t\t\t\t\"last_msg\"=>selectMezo(\"SELECT max(`post_time`) as maxtime FROM `\".$this->prefix.\"post` WHERE `post_topic`=\".$topic['topic_id'],\"maxtime\")\n\t\t\t\t\t\t\t\t\t\t\t)));\n\t\t\t}\n\n\t\t\techo $this->templates[FORUM_TEMPLATE_CATVIEW]->getTrans(\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_pager\"=>$cat_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_body\"=>$catlist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_cnt\"=>$topic_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_cnt\"=>$cat_sorsz,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_del_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"cat_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_CAT_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_del_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_DEL)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pub_priv\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_PUB)?1:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_cat_form\"=>$this->isHavePriv(FORUM_PRIV_CAT_CREATE)?$this->templates[FORUM_TEMPLATE_NEWCAT_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"cat_name_input_name\"=>\"cat_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_cat\" />'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_pager\"=>$topic_pager->getButtons(),\n\t\t\t\t\t\t\t\t\t\t\t\t\"topic_body\"=>$topiclist_str,\n\t\t\t\t\t\t\t\t\t\t\t\t\"new_topic_form\"=>$this->isHavePriv(FORUM_PRIV_TOPIC_CREATE)?$this->templates[FORUM_TEMPLATE_NEWTOPIC_FORM]->getTrans(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"topic_name_input_name\"=>\"topic_name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden_zone\"=>'<input type=\"hidden\" name=\"action\" value=\"new_topic\" />'\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)):\"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"navigator\"=>$this->getPosition($this->cat_id),\n\t\t\t\t\t\t\t\t\t\t\t\t\"position\"=>$akt_cat['cat_name']\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t}\n\t}",
"public function the_post()\n {\n }",
"public function get_posti_disponibili(){\r\n $id_prenotazione = $this->getIdPrenotazione();\r\n Prenotazione::posti_disponibili($id_prenotazione);\r\n }",
"public function show()\n {\n\t\t//$_SESSION['p_id_actual'] = $_GET['id'];\n\n\t\t//If we are on index view posts and want to see one of them, we've got 'id'\n\t\t/* if(isset($_GET['id']))\n\t\t{\n\t\t\t$idToGo = $_GET['id'];\n\t\t}\n\t\t//If\n\t\telseif(!isset($_GET['id']))\n\t\t{\n\t\t\t$idToGo = $_SESSION['p_id_actual'];\n\t\t} */\n\t\t//Montrer un article\n\t\t$post = $this->model->findWithHisAuthor($_GET['id']);\n\t\t//$comments = $this->modelJoinded->findWithHisAuthor($_GET['id']);\n\t\t$totalComments = count($this->modelJoinded->findWithHisAuthor($_GET['id']));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $comments = $this->modelJoinded->countItems($start, $itemPerpage, $_GET['id']);\n\n\t\t//TODO refactoriser la jointure dans le parent\n\t\t$_SESSION['p_id'] = $post->p_id;\n\n\t\t//utilisateur actuellement connecté, pour comparaison utlérieur\n\t\t//$loggedUser = $_SESSION['u_nickname'];\t\t\n\t\t$pageTitle = $post->p_title; //head page (SEO)\n\t\t\n\t\t\n\t\t$description = $post->p_extract; //head page (SEO)\n\n\t\t$author = $post->p_author_name;\n\n\t\t//Enregistré en session l'auteur ça me servira plus tard pour le droit de modification de l'article, même chose pour les commentaires\n\t\t$_SESSION['p_author'] = $post->p_author_name;\n\t\t\t\t\n\t\t//Utiliser compact comme un array\n \\Renderer::render('post/post', compact('pageTitle', 'description', 'post', 'comments', 'author', 'totalPages'));\n\t}",
"function post()\n {\n $post = $this->postManager->getPost($_GET['id']);\n if ($post == true) {\n $comments = $this->commentManager->getComments($_GET['id']);\n require('view/frontend/postView.php');\n } else {\n require('view/backend/sbadmin2/404.php');\n }\n }",
"function publish($post)\r\n {\r\n \t // show the form if this is the first time the page is viewed\r\n \t $form = ob_get_clean(); \r\n \t if (!isset($post['submitted'])) {\r\n\t\t$GLOBALS['TEMPLATE']['content'] = $form;\r\n\t\techo $GLOBALS['TEMPLATE']['content'];\r\n\t }\t\t\r\n // otherwise process incoming data\r\n\t else\r\n\t {\r\n\t\t$publish = new Publish();\r\n\t\tif ($publish->parse($post)) {\r\n\t\t\t$publish->add();\r\n\t\t}\r\n }\r\n }",
"public function post()\n {\n $postId = $this->request->getParameter(\"id\"); /* le parametre disparait lors de l'annonce de \"public function post($postId)\". On l'annonce\n du coup en début de la méthode en faisant appel à la méthode getParameter de la class Request */\n $post = $this->post->getPost($postId); // va chercher la méthode GetPost($postId) dans le Model Post.php l.33\n $this->buildView(array('post' => $post));\n }",
"public function show(post $post)\n {\n //\n }",
"public function show(post $post)\n {\n //\n }",
"public function post()\n {\n $postsRepository = new PostsRepository();\n if (!empty($_SESSION['id'])) {\n $posts = $postsRepository->getOneById($_SESSION['id']); \n }\n\n require 'src/View/postView.php';\n }",
"function MyPosts() {\n\n\n\t// Ici je définis mes arguments\n\t$args = array(\n\t\t\t\t//\t'category__in' => array(1,2), // Publiés\n\t\t\t\t\t'post_type' \t\t=> 'project',\t\t// Type de post\n\t\t\t\t\t'post_status' => 'publish', // Publiés\n\t\t\t\t\t'orderby' => 'date', // Ordonnée par date\n\t\t\t\t\t'order' => 'ASC' // + grand au + petit\n\t\t\t\t);\n\t// J'effectue la requête\n\t$the_query = new WP_query ($args);\n\n\t// Je récupère mon template\n\t$i = 0;\n\twhile ( $the_query->have_posts() ) : $the_query->the_post();\n\t\trequire(TEMPLATEPATH.'/template-parts/loop-home.php');\n\t\t$i++;\n\tendwhile;\n\n\t// Je reste mes requêtes de post\n\twp_reset_postdata();\n}",
"function aff_post($id_post) {\n\n\t\t$req = $GLOBALS['bdd']->prepare('SELECT a.*, d.*, da.dazibao as sujet_dazibao, da.decapode as sujet_decapode, da.dessication as sujet_dessication, da.diatribe as sujet_diatribe\n\t\t\t\t\t\t\t\t\tFROM adenoide a\n\t\t\t\t\t\t\t\t\tINNER JOIN dactyle d\n\t\t\t\t\t\t\t\t\tON a.alcade = d.dazibao\n\t\t\t\t\t\t\t\t\tINNER JOIN dactyle da\n\t\t\t\t\t\t\t\t\tON a.ammonite = da.dazibao\n\t\t\t\t\t\t\t\t\tWHERE a.alezan = :id');\n\t\t$req->execute(array('id' =>$id_post));\n\t\t$GLOBALS['donnees'] = $req->fetch();\n\n\t}",
"public function all_post() {\n if($this->access_role->is_Admin() == false) show_404();\n \n $this->load->model('All_post_Model');\n $data = $this->All_post_Model->view_post();\n $this->load->view('admin/all_post_content',$data);\n }",
"function index_post() {\n $this->crud_post($this->post());\n }",
"public function showPosts() {\r\n\t\t$allposts = $this->renderPostTemplate();\r\n\t\tforeach($allposts as $post) {\r\n\t\t\techo $post;\r\n\t\t}\r\n\t}",
"public static function loadPost() {\n if($GLOBALS[\"CONFIG\"][\"basic\"][\"APP_MULTI_LANGUAGE_POSTS\"] == \"1\") {\n if(Route::getValue('LANGUAGE') === false) {\n $lang = $GLOBALS[\"request\"]->getMostPreferredLanguage();\n if($lang === null) {\n $lang = \"en\";\n }\n if(file_exists($_SERVER['DOCUMENT_ROOT'].\"/../template/posts/$lang/\".Route::getValue(\"ID\").\".php\")) {\n redirect('/post/'.$lang.'/'.Route::getValue('ID'));\n } else if (file_exists($_SERVER['DOCUMENT_ROOT'].\"/../template/posts/\".$GLOBALS[\"CONFIG\"][\"basic\"][\"APP_PRIMARY_POST_LANGUAGE\"].\"/\".Route::getValue(\"ID\").\".php\")) {\n redirect('/post/'.$GLOBALS[\"CONFIG\"][\"basic\"][\"APP_PRIMARY_POST_LANGUAGE\"].'/'.Route::getValue('ID'));\n }\n }\n }\n if(!file_exists($_SERVER['DOCUMENT_ROOT'].\"/../template/posts/\" . (Route::getValue('LANGUAGE') === false ? '' : Route::getValue('LANGUAGE').'/') . Route::getValue(\"ID\").\".php\")) {\n require $_SERVER['DOCUMENT_ROOT'].\"/../template/\" . Route::searchError(Route::ERROR_NOT_FOUND);\n return;\n }\n foreach (self::$HEADERS as $header) {\n require $_SERVER['DOCUMENT_ROOT']. \"/../template/\" . $header;\n }\n\n require $_SERVER['DOCUMENT_ROOT'].\"/../template/posts/\" . (Route::getValue('LANGUAGE') === false ? '' : Route::getValue('LANGUAGE').'/') . Route::getValue(\"ID\").\".php\";\n\n foreach (self::$FOOTERS as $footer) {\n require $_SERVER['DOCUMENT_ROOT']. \"/../template/\" . $footer;\n }\n }",
"function get_post(){\r\n\t\t\t\t\t\t\t\t\tglobal $con;\r\n\t\t\t\t\t\t\t\t\t$per_page=5;\r\n\t\t\t\t\t\t\t\t\tif(isset($_GET['page'])){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$page=$_GET['page'];\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t$page=1;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t$start_from=($page-1)*$per_page;\r\n\t\t\t\t\t\t\t\t\t$get_posts=\"select *from posts ORDER by 1 DESC LIMIT $start_from,$per_page\";\r\n\t\t\t\t\t\t\t\t\t$run_posts=mysqli_query($con,$get_posts);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile($row_posts=mysqli_fetch_array($run_posts)){\r\n\t\t\t\t\t\t\t\t\t\t$post_id=$row_posts['post_id'];\r\n\t\t\t\t\t\t\t\t\t\t$user_id=$row_posts['user_id'];\r\n\t\t\t\t\t\t\t\t\t\t$post_title=$row_posts['post_title'];\r\n\t\t\t\t\t\t\t\t\t\t$content=$row_posts['post_content'];\r\n\t\t\t\t\t\t\t\t\t\t$post_date=$row_posts['post_date'];\r\n\t\t\t\t\t\t\t\t\t\t//getting the user who has posted the content\r\n\t\t\t\t\t\t\t\t\t\t$user=\"select *from users where user_id='$user_id' AND posts='yes'\";\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$run_user=mysqli_query($con,$user);\r\n\t\t\t\t\t\t\t\t\t\t$row_user=mysqli_fetch_array($run_user);\r\n\t\t\t\t\t\t\t\t\t\t$user_name=$row_user['user_name'];\r\n\t\t\t\t\t\t\t\t\t\t$user_image=$row_user['user_image'];\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t//now displaying all at once\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\techo\"<div id='content' style='margin-left:0px;width:100%;height:80px;background-color:#eee;'>\r\n\t\t\t\t\t\t\t\t\t\t\t<p><img src='profile.jpg' width='50px' height='50'></p>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3><a href='user_profile.php?user_id=$user_id'>$user_name</a></h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<h3>$post_title</h3>\r\n\t\t\t\t\t\t\t\t\t\t\t<p>$post_date </p>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='single.php?post_id=$post_id' style='float:left;'><button>See replies\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\";\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tinclude(\"pagination.php\");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}",
"function aff_comm_post($id_post) {\n\n\t\t$req = $GLOBALS['bdd']->prepare('SELECT b.*, d.*\n\t\t\t\t\t\t\t\tFROM badin b\n\t\t\t\t\t\t\t\tINNER JOIN dactyle d\n\t\t\t\t\t\t\t\tON b.bigarade = d.dazibao\n\t\t\t\t\t\t\t\tWHERE b.balsamine = ? \n\t\t\t\t\t\t\t\tAND b.bouquetin = 2\n\t\t\t\t\t\t\t\tORDER BY b.brimade DESC');\n\t\t$req->execute(array($_POST['post_id']));\n\t\t\t\t\t\t\t\t\t\n\t\twhile ($donnees = $req->fetch())\n\t\t{\n\t\t?>\n\t\t\t<div id=\"<?php echo $donnees['baliverne'];?>\" >\n\t\t\t\t<div class=\"zone_comment\" id=\"zone_comment\">\n\t\t\t\t\t<div class=\"mini_profil_comment\">\n\t\t\t\t\t\t<img class=\"mini_profil_img\" src=\"/ressources/images/profil/<?php echo $donnees['dazibao'];?>/profil_<?php echo $donnees['dessication'];?>\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"auteur_et_date_comment\" >\n\t\t\t\t\t\t<a class=\"lien_nom_comment\" href=\"/<?php echo $donnees['diatribe'].'/'.$donnees['decapode'].'-'.$donnees['dazibao'].'/';?>\">\n\t\t\t\t\t\t\t<?php echo $donnees['decapode'];?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<div class=\"date_post\" >\n\t\t\t\t\t\t\tLe <?php echo $donnees['brimade'];?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"contenu_comment\">\n\t\t\t\t\t\t<?php echo $donnees['bryophite']; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\t$req->closeCursor();\n\n\t}",
"public function allPostsPage(){\n require_once \"controller/Post.php\";\n $post = new Post();\n $content = $post->getAllPosts();\n $html = \"<div class=\\\"page_all_chapters\\\"><h1>Tous les chapitres:</h1>\";\n $html .= View::makeLoopHtml($content, \"all_posts_template\");\n $html .= \"</div>\";\n return [\n \"{{ pageTitle }}\" => \"Tous les chapitres\",\n \"{{ content }}\" => $html,\n \"{{ path }}\" => $GLOBALS[\"path\"]\n ] ;\n }",
"public function getPostContent();",
"public function get_post_page(){\n\n global $wp_query;\n\n $post = $wp_query->posts[0];\n\n if( !post_password_required( $post->ID ) ){\n\n // TODO: PULL IN ALL THE $WM_posts FUNCTIONS AND DELETE THAT CLASS\n\n $dates = $this->get_raw_dates( $post->ID );\n $published = date_create_from_format( get_option('date_format'), $dates[0] );\n $published = $published->format('Y-m-d') . ' 00:00';\n\n $html = '<article class=\"wm-article-content\"><div id=\"wm-article-header-wrapper\"><div id=\"wm-article-header\"><div class=\"wm-article-title\">';\n $html .= $this->get_html_title( $post, false);\n $html .= '</div><div class=\"wm-article-meta\"><div>Published <time datetime=\"' . $published . '\" title=\"published\">' . $dates[0] . '</time>.';\n\n if( $dates[1] ){\n $updated = date_create_from_format( get_option('date_format'), $dates[1] );\n $updated = $updated->format('Y-m-d') . ' 00:00';\n\n $html .= ' Updated <time datetime=\"' . $updated . '\" title=\"updated\">' . $dates[1] . '</time>.';\n }\n\n $html .= '</div>';\n $html .= $this->get_author_meta( $post );\n $html .= '</div><canvas id=\"wm-article-qrcode\" width=\"100\" height=\"100\"></canvas></div></div>';\n $html .= apply_filters( 'the_content', $post->post_content );\n $html .= '</article>';\n } else {\n $html = '<article class=\"wm-article\" id=\"post-' . $post->ID . '\">' . $this->get_html_title( $post, false );\n $html .= get_the_password_form( $post->ID );\n $html .= '</article>';\n }\n\n return $html;\n }",
"public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }",
"public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }",
"public function euEstouNaPaginaDePostagens()\n {\n $this->amOnPage('/auth/postagens');\n }",
"public function show(Post $post)\n {\n \n }"
]
| [
"0.6882526",
"0.6864509",
"0.65965664",
"0.6531523",
"0.646463",
"0.64543164",
"0.6367002",
"0.63137335",
"0.63123596",
"0.63002473",
"0.6288412",
"0.6261182",
"0.6255973",
"0.6255973",
"0.62263983",
"0.6142176",
"0.61405116",
"0.6139373",
"0.6137133",
"0.613517",
"0.613013",
"0.6124135",
"0.6105319",
"0.6098497",
"0.6086757",
"0.60856074",
"0.6079467",
"0.6074672",
"0.6062219",
"0.60604686"
]
| 0.85225886 | 0 |
Initialize crowdtranslator plugin configuration Creates the database entries for the configuation if they don't already exist. Initial values will be taken from $_CROWDTRANSLATOR_DEFAULT. | function plugin_initconfig_crowdtranslator( )
{
global $_CROWDTRANSLATOR_CONF, $_CROWDTRANSLATOR_DEFAULT;
if ( is_array( $_CROWDTRANSLATOR_CONF ) && ( count( $_CROWDTRANSLATOR_CONF ) > 1 ) ) {
$_CROWDTRANSLATOR_DEFAULT = array_merge( $_CROWDTRANSLATOR_DEFAULT, $_CROWDTRANSLATOR_CONF );
}
$me = 'crowdtranslator';
$c = config::get_instance();
if ( !$c->group_exists( $me ) ) {
$c->add( 'sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, $me, 0 );
$c->add( 'tab_main', NULL, 'tab', 0, 0, NULL, 0, true, $me, 0 );
$c->add( 'fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, $me, 0 );
// The below two lines add two settings to Geeklog's config UI
$c->add( 'enabled', $_CROWDTRANSLATOR_DEFAULT[ 'enabled' ], 'select', 0, 0, 0, 10, true, $me, 0 ); // This adds a drop-down box
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init()\n {\n parent::init();\n //$this->_properties = $this->_privateConfig->properties->toArray();\n $this->_syncModelUri = $this->_privateConfig->syncModelUri;\n\n // Translation hack in order to enable the plugin to translate...\n $translate = OntoWiki::getInstance()->translate;\n $translate->addTranslation(\n $this->_pluginRoot . 'languages',\n null,\n array('scan' => Zend_Translate::LOCALE_FILENAME)\n );\n $translate->setLocale(OntoWiki::getInstance()->config->languages->locale);\n }",
"static public function init() {\n\t\tif (!file_exists(self::$sPathToConfig)) {\n\t\t\tself::$aErrors[] = self::WP_CONFIG_ERROR;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Load the wp-config.php\n\t\tself::$sWPConfig = file_get_contents(self::$sPathToConfig, null, null, 0);\n\n\t\t// Read content from wp-config.php\n\t\tself::$sDB_HOST = self::extractString(\"'DB_HOST'\");\n\t\tself::$sDB_USER = self::extractString(\"'DB_USER'\");\n\t\tself::$sDB_PASSWORD = self::extractString(\"'DB_PASSWORD'\");\n\t\tself::$sDB_NAME = self::extractString(\"'DB_NAME'\");\n\t\tself::$sTablePrefix = self::extractString(\"table_prefix\");\n\n\t\t// Check if all neccessary variables were found in the config.php.\n\t\tself::checkVariables();\n\n\t\tif (empty(self::$aErrors)) {\n\t\t\tself::openConnection();\n\t\t\tself::getBlogs();\n\t\t\tself::updateDomain();\n\t\t\tself::processUpdate();\n\t\t}\n\t}",
"public static function init(){\n self::$language = config::getMainIni('language');\n\n $system_lang = array();\n $db = new db();\n $system_language = $db->select(\n 'language',\n 'language',\n config::$vars['coscms_main']['language']\n );\n\n // create system lanugage for all modules\n if (!empty($system_language)){\n foreach($system_language as $key => $val){\n $module_lang = unserialize($val['translation']);\n $system_lang+= $module_lang;\n }\n } \n self::$dict = $system_lang;\n }",
"private function initialize() {\n $CI = get_instance();\n $CI->config->load('dwootemplate', TRUE);\n $config = $CI->config->item('dwootemplate');\n foreach ($config as $key => $val) {\n $this->$key = $val;\n }\n }",
"private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}",
"public static function Init()\n\t{\n\t\t$sql = 'SELECT\n\t\t\t\t\tid,\n\t\t\t\t\tlang_name,\n\t\t\t\t\tlang_name_en,\n\t\t\t\t\tabbreviation,\n\t\t\t\t\tlc_time_name,\n\t\t\t\t\tlang_dir,\n\t\t\t\t\ticon_image,\n\t\t\t\t\tpriority_order,\n\t\t\t\t\tused_on,\n\t\t\t\t\tis_default,\n\t\t\t\t\tis_active \n\t\t\t\tFROM '.TABLE_LANGUAGES;\n\t\t$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);\n\t\tfor($i=0; $i < $result[1]; $i++){\n\t\t\t$abbrev = $result[0][$i]['abbreviation'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_name'] = $result[0][$i]['lang_name'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_name_en'] = $result[0][$i]['lang_name_en'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['abbreviation'] = $result[0][$i]['abbreviation'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lc_time_name'] = $result[0][$i]['lc_time_name'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_dir'] = $result[0][$i]['lang_dir'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['icon_image'] = $result[0][$i]['icon_image'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['icon_image'] = $result[0][$i]['priority_order'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['used_on'] = $result[0][$i]['used_on'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['is_default'] = $result[0][$i]['is_default'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['is_active'] = $result[0][$i]['is_active'];\n\t\t}\n\t}",
"private function _init() {\r\n $config = array(\r\n 'gettext_locale_dir' => $this->CI->config->item('gettext_locale_dir'),\r\n 'gettext_text_domain' => $this->CI->config->item('gettext_text_domain'),\r\n 'gettext_catalog_codeset' => $this->CI->config->item('gettext_catalog_codeset'),\r\n 'gettext_locale' => $this->CI->config->item('gettext_locale'),\r\n 'gettext_nocache' => $this->CI->config->item('gettext_nocache'),\r\n );\r\n \r\n if ($this->CI->config->item('language') != $this->CI->config->item('default_language') || config_item('default_iso') != config_item('lang')) {\r\n if ($this->CI->config->item('gettext_nocache')) {\r\n $this->_bind_gettext_nocache($config);\r\n } else {\r\n $this->_bind_gettext($config);\r\n }\r\n }\r\n // Gettext locale\r\n setlocale(LC_ALL, $config['gettext_locale'] . '.' . $config['gettext_catalog_codeset']);\r\n putenv(\"LC_ALL=\" . $config['gettext_locale']);\r\n putenv('LANG=' . $config['gettext_locale'] . '.' . $config['gettext_catalog_codeset']);\r\n putenv('LANGUAGE=' . $config['gettext_locale'] . '.' . $config['gettext_catalog_codeset']);\r\n }",
"function initialize()\n\t{\n\t\t$this->_configure \t= $this->config->item('province_configure');\n\t\t$this->_pagination \t= $this->config->item('pagination');\n\t\t$this->_validation \t= $this->config->item('province_validation');\n\t}",
"private function init() {\n\t\t$GLOBALS[\"mlauto_db_version\"] = 1.0;\n\n\t\t//If SQL Table isn't initiated, initiate it\n\t\tClassificationModel::intializeTable();\n\t\tTermModel::intializeTable();\n\n\t\t$this->buildConfig();\n\n\t\tupdate_option(\"MLAuto_version\", $GLOBALS[\"mlauto_db_version\"]);\n\t}",
"public static function init()\r\n\t{\r\n\t\tglobal $CTM_SETTINGS;\r\n\t\t\r\n\t\tself::$settings = $CTM_SETTINGS;\r\n\t\tself::$URLData = CTM_URLEngine::URLData();\r\n\r\n\t\tself::$DB = new CTM_Driver();\r\n\t\tself::$output = new CTMCommand_Output();\r\n\t\tself::$lang = new CTMCommand_Language();\r\n\t\tself::$functions = new CTMCommand_Functions();\r\n\t\tself::$email = new CTMCommand_Email();\r\n\t\t\r\n\t\tself::$output->templateId = self::$settings['WEBPUBLIC']['DEFAULT']['TEMPLATE'];\r\n\t\tself::$lang->languageId = self::$settings['WEBPUBLIC']['DEFAULT']['LANGUAGE'];\r\n\t\t\r\n\t\tself::$output->template = self::$settings['WEBPUBLIC']['TEMPLATES'][self::$output->templateId][0];\r\n\t\tself::$lang->language = self::$settings['WEBPUBLIC']['LANGUAGES'][self::$lang->languageId][0];\r\n\t\t\r\n\t\tif(count($GLOBALS['_POST']) > 0)\r\n\t\t{\r\n\t\t\tforeach($GLOBALS['_POST'] as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$GLOBALS['_POST'][$key] = stripslashes($value);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static function init() {\n Cin::checkConfigVo();\n Cin::$manager->init();\n }",
"public function init()\n {\n // TODO: initialize by config ordering\n foreach ($this->plugins as $name => $plugin) {\n $plugin->init();\n }\n }",
"public function init() {\n //TODO override and put config intialization code here\n }",
"public function init()\n {\n\n $this->addWPConfigs();\n $this->addSPLConfigs();\n $this->addControllerConfigs();\n $this->addFieldGroupConfigs();\n $this->addFieldConfigs();\n $this->addImageSizeConfigs();\n $this->addLayoutConfigs();\n $this->addModelConfigs();\n $this->addPostTypeConfigs();\n $this->addTaxonomyConfigs();\n $this->addTemplateFunctionConfigs();\n $this->addHookableConfigs();\n $this->addSearchConfigs();\n $this->addBaseThemeConfigs();\n\n }",
"public static function init()\n\t{\n\t\tstatic $run;\n\n\t\t// This function can only be run once\n\t\tif ($run === TRUE)\n\t\t\treturn;\n\t\t\n\t\t// Load configuration object\n\t\tTC::$config = new TC_Config();\n\t\t\n\t\t// Load cache\n\t\tTC::$cache = new TC_Cache(TC::$config->get('tc.config_driver'));\n\t}",
"public static function init()\n\t{\n\t\tself::initSettings();\n\t\tself::setupSettings();\n\t\tself::validateSettings();\n\t}",
"public static function init()\r\n {\r\n self::$Data = get_option(self::OPT_SETTINGS);\r\n //when the plugin updated, this will be true\r\n if (empty(self::$Data) || empty(self::$Data['version']) || version_compare(DUPLICATOR_VERSION, self::$Data['version'], '>')) {\r\n self::SetDefaults();\r\n }\r\n }",
"private function init_config() {\n set_config('siteadmins', '');\n set_config('siteguest', '');\n set_config('defaultuserroleid', '');\n set_config('defaultfrontpageroleid', '');\n }",
"public function init() {\n\n\t\t\t// Set up localisation\n\t\t\t$this->load_plugin_textdomain();\n\t\t}",
"public function initialize()\n {\n $this->config = new \\Configs\\Core\\PasswordResetKeys();\n\n\n }",
"function initialize()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `config` (`key` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`key`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n CREATE TABLE IF NOT EXISTS `secureconfig` (`key` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`key`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n \";\n try {\n $db = Base_Database::getConnection();\n $db->exec($sql);\n } catch (PDOException $e) {\n error_log('Initialize Base_Config failed: ' . $e->getMessage());\n die(\"An error occurred creating the configuration tables\");\n }\n }",
"private function initialize() {\n // Lecture de la config du batch\n $this->load_config();\n $GLOBALS['config'] = $this->config;\n // Initialisation du logger\n if (strcasecmp(\"DEBUG\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::DEBUG;\n }\n else if(strcasecmp(\"INFO\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::INFO;\n }\n else if(strcasecmp(\"WARN\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::WARN;\n }\n else if(strcasecmp(\"ERROR\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::ERROR;\n }\n else if(strcasecmp(\"FATAL\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::FATAL;\n }\n else if(strcasecmp(\"OFF\", $this->config->debug_level) == 0) {\n $debug_const = KLogger::OFF;\n }\n $this->log = new KLogger ( $this->config->log_file , $debug_const );\n $GLOBALS['logger'] = $this->log;\n $this->check_conf();\n $this->log->LogDebug(\"Init...OK\");\n\n }",
"function initialize() {\n $this->_configure = $this->config->item('biz_listing_configure');\n $this->_pagination = $this->config->item('pagination');\n $this->_validation = $this->config->item('biz_listing_validation');\n }",
"protected static function init() {\r\n\t\tif (self::$cfg == null)\r\n\t\t\tself::$cfg = new config(factory::loadCfg(__CLASS__));\r\n\t}",
"public function initialize()\n {\n parent::initialize();\n\n // Create config strings\n $this->config = [\n 'models' => [\n 'Files' => __d('elabs', 'File'),\n 'Notes' => __d('elabs', 'Note'),\n 'Posts' => __d('elabs', 'Article'),\n 'Projects' => __d('elabs', 'Project'),\n 'Albums' => __d('elabs', 'Album'),\n ]\n ];\n\n // Load models\n foreach (array_keys($this->config['models']) as $model) {\n $this->$model = TableRegistry::get($model);\n }\n }",
"public function init() {\r\n\r\n\t\tini_set('max_execution_time', 300); //300 seconds = 5 minutes\r\n\r\n\t\t// Includes\r\n\t\t//https://github.com/parsecsv/parsecsv-for-php\r\n\t\trequire_once( 'parsecsv-for-php/parsecsv.lib.php' );\r\n\r\n\t\trequire_once( 'inc/csv-functions.php' );\r\n\r\n\t\t//execute data\r\n\t\trequire_once( 'inc/data-import.php' );\r\n\r\n\t\t//filter data\r\n\t\trequire_once( 'inc/data-filter.php' );\r\n\r\n\r\n\r\n\t\t// Localisation\r\n\t\tload_plugin_textdomain( 'csv-import-wpdatables', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\r\n\t}",
"public static function init( )\n {\n $config = \\Painless::load( 'system/common/config' );\n $triggers = $config->get( 'triggers.*' );\n \n if ( ! empty( $triggers ) )\n {\n foreach( $triggers as $name => $callback )\n {\n self::register( $name, $callback );\n }\n }\n }",
"function fsrmp_init()\n{\n global $conf;\n\n // load plugin language file\n load_language('plugin.lang', FSRMP_PATH);\n\n // prepare plugin configuration\n $conf['fsrmp'] = safe_unserialize($conf['fsrmp']);\n}",
"function qa_initialize_predb_plugins()\n{\n\tglobal $qa_pluginManager;\n\t$qa_pluginManager = new Q2A_Plugin_PluginManager();\n\t$qa_pluginManager->readAllPluginMetadatas();\n\n\t$qa_pluginManager->loadPluginsBeforeDbInit();\n\tqa_load_override_files();\n}",
"public function init() {\t\t\n\t\t$this->options = new NHP_Options(\r\n\t\t\tarray(), array(\r\n\t\t\t\t\t'opt_name' => $this->cpt_slug . '-configuration',\r\n\t\t\t\t\t'page_slug' => $this->cpt_slug . '-configuration',\r\n\t\t\t\t\t'menu_title' => __( 'Configuration', WPcpt::$domain ),\r\n\t\t\t\t\t'page_title' => __( 'Configuration', WPcpt::$domain ),\r\n\t\t\t\t\t'page_cap' => 'manage_options',\r\n\t\t\t\t\t'dev_mode' => WP_DEBUG,\r\n\t\t\t\t\t'show_import_export' => false,\r\n\t\t\t\t\t'page_type' => 'submenu',\r\n\t\t\t\t\t'page_parent' => 'edit.php?post_type=' . $this->cpt_slug,\r\n\t\t\t) );\n\t}"
]
| [
"0.6571638",
"0.6550483",
"0.63479686",
"0.63428783",
"0.63256496",
"0.63084775",
"0.62544197",
"0.61851615",
"0.61582184",
"0.6125157",
"0.6118933",
"0.6104888",
"0.6078163",
"0.6075971",
"0.60205436",
"0.5983641",
"0.5969798",
"0.59378016",
"0.5929856",
"0.5904895",
"0.5891929",
"0.58897364",
"0.58739424",
"0.5869909",
"0.58614683",
"0.58484775",
"0.58481646",
"0.58273",
"0.5818676",
"0.58179116"
]
| 0.69167745 | 0 |
Listens for a Paynow IPN requests and then sends to the processing function | function edd_listen_for_paynow_ipn() {
global $edd_options;
// Regular Paynow IPN
if ( isset( $_GET['edd-paynow-listener'] ) && $_GET['edd-paynow-listener'] == 'IPN' ) {
do_action( 'edd_verify_paynow_ipn' );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ipnAction() {\n $paymentService = $this->get('e2w_payment_service');\n $paymentService->ipnRequest($this->get('request')->request);\n die();\n }",
"private function processIPN()\n\t{\n\t\t$log = e107::getLog();\n\t\t$db = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\t$logging = (bool) $this->plugPrefs['logging_failed_ipn'];\n\t\t$validate_email = (bool) $this->plugPrefs['validate_email'];\n\n\t\t// Check whether the payment_status is Completed.\n\t\t$payment_status = vartrue($_POST['payment_status']);\n\n\t\tif(strtoupper($payment_status) != 'COMPLETED')\n\t\t{\n\t\t\tif($logging)\n\t\t\t{\n\t\t\t\t$log->add('Status is not completed', $_POST, E_LOG_INFORMATIVE, 'IPN');\n\t\t\t}\n\t\t\texit;\n\t\t}\n\n\t\t// Check that txn_id has not been previously processed.\n\t\t$txn_id = vartrue($_POST['txn_id'], 0);\n\t\t$exists = $db->count('paypal_donation_ipn', '(*)', 'pdi_txn_id = \"' . $tp->toDB($txn_id) . '\" ');\n\n\t\tif($exists > 0)\n\t\t{\n\t\t\tif($logging)\n\t\t\t{\n\t\t\t\t$log->add('Existing TXN ID', $_POST, E_LOG_INFORMATIVE, 'IPN');\n\t\t\t}\n\t\t\texit;\n\t\t}\n\n\t\t// Check that receiver_email is your Primary PayPal email.\n\t\tif($validate_email)\n\t\t{\n\t\t\t$receiver_email = vartrue($_POST['receiver_email']);\n\n\t\t\tif((int) $this->plugPrefs['sandbox_mode'] === 1)\n\t\t\t{\n\t\t\t\t$business = $this->plugPrefs['email_sandbox'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$business = $this->plugPrefs['email_live'];\n\t\t\t}\n\n\t\t\tif($receiver_email != $business)\n\t\t\t{\n\t\t\t\tif($logging)\n\t\t\t\t{\n\t\t\t\t\t$log->add('Invalid receiver email', $_POST, E_LOG_INFORMATIVE, 'IPN');\n\t\t\t\t}\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// Check that the \"custom\" value is a valid menu item.\n\t\t$custom = vartrue($_POST['custom'], '');\n\t\t$segments = explode('|', $custom);\n\n\t\t$pd_id = (int) $segments[0];\n\t\t$exists = $db->count('paypal_donation', '(*)', 'pd_id = ' . $pd_id . ' ');\n\n\t\tif($exists == 0)\n\t\t{\n\t\t\tif($logging)\n\t\t\t{\n\t\t\t\t$data = array(\n\t\t\t\t\t'POST' => $_POST,\n\t\t\t\t\t'SEGMENTS' => $segments,\n\t\t\t\t\t'PD_ID' => $pd_id,\n\t\t\t\t);\n\n\t\t\t\t$log->add('Invalid menu item', $data, E_LOG_INFORMATIVE, 'IPN');\n\t\t\t}\n\t\t\texit;\n\t\t}\n\n\t\t$pdi_user = vartrue($segments[1], 0);\n\t\t$pdi_mc_gross = vartrue($_POST['mc_gross'], 0);\n\t\t$pdi_mc_fee = vartrue($_POST['mc_fee'], 0);\n\t\t$pdi_mc_currency = vartrue($_POST['mc_currency'], '');\n\t\t$pdi_payment_date = vartrue($_POST['payment_date'], '');\n\t\t$pdi_serialized_ipn = serialize($_POST);\n\n\t\t// Process IPN.\n\t\t$data = array(\n\t\t\t'pdi_donation' => (int) $pd_id,\n\t\t\t'pdi_user' => (int) $pdi_user,\n\t\t\t'pdi_txn_id' => $tp->toDB($txn_id),\n\t\t\t'pdi_mc_gross' => (float) $pdi_mc_gross,\n\t\t\t'pdi_mc_fee' => (float) $pdi_mc_fee,\n\t\t\t'pdi_mc_currency' => $tp->toDB($pdi_mc_currency),\n\t\t\t'pdi_payment_date' => strtotime($pdi_payment_date),\n\t\t\t'pdi_cancelled' => 0,\n\t\t\t'pdi_serialized_ipn' => $pdi_serialized_ipn,\n\t\t);\n\n\t\t$id = $db->insert('paypal_donation_ipn', $data);\n\n\t\tif($id)\n\t\t{\n\t\t\t$event = e107::getEvent();\n\t\t\t$event->trigger('paypal-donation-ipn-insert', $id);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($logging)\n\t\t\t{\n\t\t\t\t$log->add('SQL Insert', $_POST, E_LOG_INFORMATIVE, 'IPN');\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t}",
"public static function processIPNrequest()\n {\n\n// STEP 1: read POST data\n// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST.\n// Instead, read raw POST data from the input stream. \n $raw_post_data = file_get_contents('php://input');\n $raw_post_array = explode('&', $raw_post_data);\n $myPost = array();\n foreach ($raw_post_array as $keyval)\n {\n $keyval = explode('=', $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n// read the IPN message sent from PayPal and prepend 'cmd=_notify-validate'\n $req = 'cmd=_notify-validate';\n if (function_exists('get_magic_quotes_gpc'))\n {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value)\n {\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1)\n {\n $value = urlencode(stripslashes($value));\n }\n else\n {\n $value = urlencode($value);\n }\n $req .= \"&$key=$value\";\n }\n\n\n// Step 2: POST IPN data back to PayPal to validate\n\n $ch = curl_init('https://www.paypal.com/cgi-bin/webscr');\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n// In wamp-like environments that do not come bundled with root authority certificates,\n// please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set \n// the directory path of the certificate as shown below:\n// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\n if (!($res = curl_exec($ch)))\n {\n error_log(\"Got \" . curl_error($ch) . \" when processing IPN data\");\n curl_close($ch);\n exit;\n }\n curl_close($ch);\n\n $status = array();\n $status['verified'] = null;\n\n if (strcmp($res, \"VERIFIED\") == 0)\n {\n // The IPN is verified, process it\n error_log('IPN VERIFIED (NOT ERROR):' . print_r($_POST,true)); \n\n // IPN message values depend upon the type of notification sent.\n // To loop through the &_POST array and print the NV pairs to the screen:\n foreach ($_POST as $key => $value)\n {\n $status[$key] = $value; \n }\n $status['verified'] = true;\n }\n else if (strcmp($res, \"INVALID\") == 0)\n {\n // IPN invalid, log for manual investigation\n error_log('INVALID VERIFIED:' . print_r($_POST,true));\n $status['verified'] = false;\n }\n\n return $status;\n }",
"public function IpnAction()\n {\n $this->log(\"----------- IPN request validation ------------\");\n if (!$this->getRequest()->isPost()) {\n $this->log(\"skip none POST requests\");\n return $this->returnForbidden();\n }\n $ip = long2ip(Mage::helper('core/http')->getRemoteAddr(true));\n $this->log(\"Start IPN request validation\");\n $this->log(\"IP Address of the sender {$ip}\");\n\n /* start to validate the signature */\n $request = $this->getRequest();\n $payload = $request->getRawBody();\n $public_key = $request->getHeader(\"API-Key\");\n $nonce = $request->getHeader(\"API-Nonce\");\n $request_signature = $request->getHeader(\"API-Sign\");\n //$this->log(\"API-KEY:{$public_key}\");\n //$this->log(\"API-Nonce:{$nonce}\");\n //$this->log(\"API-Sign:{$request_signature}\");\n $this->log(\"Received payload: \" . $payload);\n\n if (!$public_key || !$nonce || !$request_signature || !$payload) {\n $this->log(\"Credentials missing. Exiting.\");\n return $this->returnForbidden();\n }\n\n $private_key = Mage::helper('core')->decrypt(\n Mage::getModel(\"bitcoin/bitcoin\")->getConfiguration(\"private_key\")\n );\n $url = Mage::helper('core/url')->getCurrentUrl();\n $this->log(\"CURRENT IPN URL IS : \" .$url);\n\n $message = $nonce . $url . $payload;\n $current_signature = hash_hmac(\"sha256\", $message, $private_key, false);\n $this->log(\"Calculated signature: \" . $current_signature);\n\n if ($request_signature <> $current_signature) {\n $this->log(\"IPN VALIDATION FAILED\");\n $this->log(\"Returning 'page not found'\");\n $this->log(\"Your payment data is still safe\");\n $this->log(\"----------- IPN request processing will be skipped -----------\");\n return $this->returnForbidden();\n }\n $this->log(\"IPN signature validation succeeded\");\n /* end of validate the signature */\n /* by this the request has passed validation */\n try {\n /* need to check the ip address of the source from a whitelist list of ips , otherwise this might be used illegaly to update orders */\n $this->log(\"----------- IPN request processing ------------\");\n $id = base64_decode($this->getRequest()->getParam(\"id\"));\n //$data = file_get_contents('php://input');\n $body = json_decode($payload, true);\n //$this->log(\"current Id is: {$id}\");\n $this->log(\"Received payload: \" . $payload, $body[\"id\"]);\n $url = $body[\"url\"];\n $invoice_id = $body[\"id\"];\n /* simple validation check | might be changed later */\n $collection = Mage::getModel(\"bitcoin/ipn\")\n ->getCollection()\n ->getSelect()\n ->where(\"quote_id = ? OR order_id = ?\", $id)\n ->where(\"invoice_id =?\", $invoice_id);\n $yellow_log = $collection->query()->fetchAll();\n $from_order = $from_quote = false;\n if (count($yellow_log) == 1) {\n if ($yellow_log[0][\"quote_id\"] === $id) {\n $from_quote = true;\n $from_order = false;\n //$this->log(\"its a quote\", $body[\"id\"]);\n } elseif ($yellow_log[0][\"order_id\"] === $id) {\n $from_quote = false;\n $from_order = true;\n //$this->log(\"its an order\", $body[\"id\"]);\n }\n } else {\n $this->log(\"URL validation failed: {$url}\");\n $this->log(\"----------- IPN request processing will be skipped -----------\", $body[\"id\"]);\n return $this->_forward(\"no-route\");\n }\n if ($from_order) {\n $order = Mage::getModel('sales/order')->load($id);\n }\n if ($from_quote) {\n $order = Mage::getModel('sales/order')->load($id, \"quote_id\");\n }\n /* skip quote + authorizing state because the order hasn't been placed yet */\n if ($from_quote && $body[\"status\"] === \"authorizing\") {\n $this->log(\n \"Quote id {$id} will be skipped because the order hasn't been placed yet. IPN status: {$body[\"status\"]}\",\n $body[\"id\"]\n );\n echo json_encode(array(\"message\" => \"skipped\"));\n $this->log(\"----------- IPN request processing will be skipped -----------\", $body[\"id\"]);\n return;\n }\n if ($order->getPayment() instanceof Yellow_Bitcoin_Model_Bitcoin) {\n $payment = $order->getPayment()->getMethodInstance();\n if (!$order || $payment->getCode() <> \"bitcoin\" || $order->getState() <> Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW\n ) {\n $this->log(\"Either this order is not paid via Yellow, or it has an unallowed state\", $body[\"id\"]);\n $this->log(\"----------- IPN request processing will be skipped -----------\", $body[\"id\"]);\n return $this->_forward(\"no-route\");\n }\n }\n $this->log(\" invoice status : {$body[\"status\"]}\", $body[\"id\"]);\n switch ($body['status']) {\n case 'paid':\n $status = Mage::getModel(\"bitcoin/bitcoin\")->getSuccessStatus();\n $status_message = \"Payment confirmation received. Invoice Id: \" . $body['id']; // $invoice[\"message\"];\n $commentHistory = $order->addStatusHistoryComment($status_message,$status);\n $commentHistory->setIsVisibleOnFront(1);\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);\n $order->sendNewOrderEmail();\n $order->save();\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsPaid($body[\"id\"]);\n /* create an invoice */\n $invoiceModel = Mage::getModel('sales/order_invoice_api');\n $invoice_id = $invoiceModel->create($order->getIncrementId(), array());\n $invoiceModel->capture($invoice_id);\n $this->log(\"Magento Invoice created!\", $body[\"id\"]);\n break;\n case 'reissue':\n $status = Mage::getModel(\"bitcoin/bitcoin\")->getSuccessStatus(); /// this must bn changed when we had reissue / renew payment ready\n $status_message = \"Client re-issued the invoice. Invoice Id: \" . $body['id']; // $invoice[\"message\"];\n $commentHistory = $order->addStatusHistoryComment($status_message,$status);\n $commentHistory->setIsVisibleOnFront(1);\n $order->save();\n break;\n case 'partial':\n $status = Mage::getModel(\"bitcoin/bitcoin\")->getSuccessStatus(); /// this must bn changed when we had partial payment ready\n $status_message = \"Client made a partial payment. Invoice Id: \" . $body['id']; // $invoice[\"message\"];\n $commentHistory = $order->addStatusHistoryComment($status_message,$status);\n $commentHistory->setIsVisibleOnFront(1);\n $order->save();\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsPartial($body[\"id\"]);\n break;\n case 'failed':\n case 'invalid':\n $status = Mage::getModel(\"bitcoin/bitcoin\")->getFailedStatus();\n $status_message = \"Client failed to pay. Invoice Id: \" . $body['id']; // $invoice[\"message\"];\n $commentHistory = $order->addStatusHistoryComment($status_message,$status);\n $commentHistory->setIsVisibleOnFront(1);\n $order->setState(Mage_Sales_Model_Order::STATE_HOLDED);\n $order->cancel();\n $order->save();\n break;\n /// its just a new invoice | authorizing , I will never expect a post with new status , though I had created the block of it\n case 'authorizing':\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsAuthorizing($body[\"id\"]);\n break;\n case 'expired':\n /* this to update the ipn table when invoice expired */\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsExpired($body[\"id\"]);\n break;\n case 'refund_owed':\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsRefundOwed($body[\"id\"]);\n break;\n case 'refund_requested':\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsRefundRequested($body[\"id\"]);\n break;\n case 'refund_paid':\n Mage::getResourceModel(\"bitcoin/ipn\")->MarkAsRefundPaid($body[\"id\"]);\n break;\n case 'new':\n default:\n /// @todo : we need to log here\n break;\n }\n echo json_encode(array(\"message\" => \"done\"));\n $this->log(\"----------- IPN request processing complete -----------\", $body[\"id\"]);\n\n } catch (\\Exception $e) {\n $this->log(\"EXCEPTION:\" . $e->getMessage . \"|\" . $e->getLine(), $body[\"id\"]);\n }\n }",
"public function handleIpn()\n {\n if (!in_array(Yii::$app->request->getUserIP(), $this->ips) && !$this->module->sandbox) {\n Yii::info(\"Wrong ip\");\n throw new \\yii\\web\\NotFoundHttpException;\n }\n $this->post = Yii::$app->request->post();\n Yii::info(\"Got: \".var_export($this->post, true));\n if (isset($this->post['transactionType'])) {\n $this->status = null;\n switch ($this->post['transactionType']) {\n case \"CHARGE\":\n case \"AUTH_ONLY\":\n case \"RECURRING\":\n case \"REFUND\":\n case \"CHARGEBACK\":\n $this->status = Order::STATUS_COMPLETED;\n break;\n case \"CANCELLATION\":\n case \"DECLINE\":\n case \"CANCELLATION_REFUND\":\n case \"CANCEL_ON_RENEWAL\":\n $this->status = Order::STATUS_CANCELLED;\n break;\n }\n $this->handle();\n Event::trigger(IPN::class, $this->post['transactionType'], new Event(['sender' => $this]));\n }\n \n $dataProtectionKey = Yii::$app->getModule(Yii::$app->bluesnap->moduleName)->dataProtectionKey;\n Yii::$app->response->setStatusCode(200);\n Yii::$app->response->content = md5(\"OK$dataProtectionKey\");\n }",
"function ipn() {\n // is no output here. This is where you validate the IPN data and if it's\n // valid, update your database to signify that the user has payed. If\n // you try and use an echo or printf function here it's not going to do you\n // a bit of good. This is on the \"backend\". That is why, by default, the\n // class logs all IPN data to a text file.\n\n\n if ($_POST) {\n // Obtenemos los datos en formato variable1=valor1&variable2=valor2&...\n $raw_post_data = file_get_contents('php://input');\n // Los separamos en un array\n $raw_post_array = explode('&', $raw_post_data);\n\n // Separamos cada uno en un array de variable y valor\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode(\"=\", $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n\n // Nuestro string debe comenzar con cmd=_notify-validate\n $req = 'cmd=_notify-validate';\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n // Cada valor se trata con urlencode para poder pasarlo por GET\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n\n //Añadimos cada variable y cada valor\n $req .= \"&$key=$value\";\n }\n $ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'); // Esta URL debe variar dependiendo si usamos SandBox o no. Si lo usamos, se queda así.\n //$ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); // Si no usamos SandBox, debemos usar esta otra linea en su lugar.\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n if (!($res = curl_exec($ch))) {\n // Ooops, error. Deberiamos guardarlo en algún log o base de datos para examinarlo después.\n curl_close($ch);\n exit;\n }\n curl_close($ch);\n \n if (strcmp($res, \"VERIFIED\") == 0) {\n $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/ipn_'.$res.'_' . $myPost['item_number'] . \"_\" . $myPost['payment_status'] . \"_\" . date(\"YmdHis\") . '.log';\n $new_file = file_put_contents($fileDir, json_encode($myPost)); \n }\n \n $pagos = $this->stream->getRepository(\"stream\\stream_paypal_transactions\")->findBy(array(\n \"id_seguimiento\" => $myPost['item_number']\n ), array(\"id\" => \"desc\"));\n $pago = $pagos[0];\n \n \n $paypal_transaction = new stream\\stream_paypal_transactions();\n $paypal_transaction->txn_id=$myPost['txn_id'];\n $paypal_transaction->ipn_track_id=$myPost['ipn_track_id'];\n $paypal_transaction->type_payment = $pago->type_payment;\n $paypal_transaction->amount = $pago->amount;\n $paypal_transaction->id_producto = $pago->id_producto;\n $paypal_transaction->notes =$pago->notes;\n $paypal_transaction->id_seguimiento = $myPost['item_number'];\n $paypal_transaction->id_usuario = $pago->id_usuario;\n $paypal_transaction->type_user = $pago->type_user;\n $paypal_transaction->fecha_hora = date(\"Y-m-d H:i:s\");\n $paypal_transaction->estatus=$myPost['payment_status'];\n\n $this->stream->persist($paypal_transaction);\n $this->stream->flush();\n// \n $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/ipn_count_' . $myPost['item_number'] . \"_\" . $myPost['payment_status'] . \"_\" . date(\"YmdHis\") . '.log';\n \n $new_file = file_put_contents($fileDir, json_encode($pagos));\n// if ($myPost['payment_status'] == \"Completed\" && count($pagos)>0) {\n//\n// switch ($pago->type_payment) {\n// case \"notes\":\n// for ($i = 1; $i <= $pago->notes; $i++) {\n// $notes = new stream\\stream_notes();\n// $notes->id_user = $pago->id_usuario;\n// $notes->type_user = $pago->type_user;\n// $precio = $pago->amount / $pago->notes;\n// $notes->precio = number_format($precio, 2);\n// $notes->status = \"new\";\n// $notes->paypal_transaction_id = $pago->id;\n// $this->stream->persist($notes);\n// $this->stream->flush();\n// }\n// break;\n// }\n// }\n\n /**\n * A partir de aqui, deberiamos hacer otras comprobaciones rutinarias antes de continuar. Son opcionales, pero recomiendo al menos las dos primeras. Por ejemplo:\n *\n * * Comprobar que $_POST[\"payment_status\"] tenga el valor \"Completed\", que nos confirma el pago como completado.\n * * Comprobar que no hemos tratado antes la misma id de transacción (txd_id)\n * * Comprobar que el email al que va dirigido el pago sea nuestro email principal de PayPal\n * * Comprobar que la cantidad y la divisa son correctas\n */\n // Después de las comprobaciones, toca el procesamiento de los datos.\n\n /**\n * En este punto tratamos la información.\n * Podemos hacer con ella muchas cosas:\n *\n * * Guardarla en una base de datos.\n * * Guardar cada linea del pedido en una linea diferente en la base de datos.\n * * Guardar un log.\n * * Restar las cantidades de los artículos del stock.\n * * Enviar un mensaje de confirmcaión al cliente.\n * * Enviar un mensaje al encargado de pedidos para que lo prepare.\n * * Comprobar mediante complejas operaciones matemáticas si el cliente es el número un millon y notificarle de que ha ganado dos noches de hotel en Torrevieja.\n * * ¡Imaginación!\n */\n// } else if (strcmp($res, \"INVALID\") == 0) {\n// $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/force_brut_ipn_' . date(\"YmdHis\") . '.log';\n// $new_file = file_put_contents($fileDir, json_encode($_POST));\n// // El estado que devuelve es INVALIDO, la información no ha sido enviada por PayPal. Deberías guardarla en un log para comprobarlo después\n// }\n } else { // Si no hay datos $_POST\n $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/force_brut_ipn_no_post_' . date(\"YmdHis\") . '.log';\n $new_file = file_put_contents($fileDir, json_encode($myPost));\n // Podemos guardar la incidencia en un log, redirigir a una URL...\n }\n }",
"public function onIpn(Engine_Payment_Ipn $ipn) {\n\n //You can get the notification data from below code\n $rawData = $ipn->getData();\n\n $ordersTable = Engine_Api::_()->getDbtable('orders', 'payment');\n\n $order = null;\n\n //You need to fetch the order object using order id sent by this gateway in notification. For reference you can see the below code for Paynow: Transaction IPN - get order by subscription_id\n if (!$order && !empty($rawData['data']->object->id)) {\n $gateway_order_id = $rawData['data']->object->id;\n\n $order = $ordersTable->fetchRow(array(\n 'gateway_id = ?' => $this->_gatewayInfo->gateway_id,\n 'gateway_order_id = ?' => $gateway_order_id,\n ));\n }\n\n if ($order) {\n return $this->onResourceIpn($order);\n } else {\n $error_msg17 = Zend_Registry::get('Zend_Translate')->_('Unknown or unsupported IPN type, or missing transaction or order ID');\n throw new Engine_Payment_Plugin_Exception($error_msg17);\n }\n }",
"function actionIpn(){\n //LicenciaHelper::updatePaymentIfExist(1, 'I-V8CPTPJ0J3YE', 18);die;\n\n /*\n By default the IpnListener object is going to post the data back to PayPal\n using cURL over a secure SSL connection. This is the recommended way to post\n the data back, however, some people may have connections problems using this\n method.\n\n To post over standard HTTP connection, use:\n $listener->use_ssl = false;\n\n To post using the fsockopen() function rather than cURL, use:\n $listener->use_curl = false;\n */\n\n /*\n The processIpn() method will encode the POST variables sent by PayPal and then\n POST them back to the PayPal server. An exception will be thrown if there is\n a fatal error (cannot connect, your server is not configured properly, etc.).\n Use a try/catch block to catch these fatal errors and log to the ipn_errors.log\n file we setup at the top of this file.\n\n The processIpn() method will send the raw data on 'php://input' to PayPal. You\n can optionally pass the data to processIpn() yourself:\n $verified = $listener->processIpn($my_post_data);\n */\n\n $ipnListener = new IpnListener();\n //$ipnListener->use_sandbox = true;\n $ipnListener->use_sandbox = false;\n //$verified = true;\n Yii::info($_REQUEST, 'paypal');\n\n try {\n $ipnListener->requirePostMethod();\n $verified = $ipnListener->processIpn();\n } catch (Exception $e) {\n Yii::error($e->getMessage(), 'paypal');\n throw $e;\n //exit(0);\n }\n\n /*\n The processIpn() method returned true if the IPN was \"VERIFIED\" and false if it\n was \"INVALID\".\n */\n if ($verified) {\n /*\n Once you have a verified IPN you need to do a few more checks on the POST\n fields--typically against data you stored in your database during when the\n end user made a purchase (such as in the \"success\" page on a web payments\n standard button). The fields PayPal recommends checking are:\n\n 1. Check the $_POST['payment_status'] is \"Completed\"\n 2. Check that $_POST['txn_id'] has not been previously processed\n 3. Check that $_POST['receiver_email'] is your Primary PayPal email\n 4. Check that $_POST['payment_amount'] and $_POST['payment_currency']\n are correct\n\n Since implementations on this varies, I will leave these checks out of this\n example and just send an email using the getTextReport() method to get all\n of the details about the IPN.\n */\n\n $data = $_POST;\n //$data = $ipnListener->getPostData();\n\n\n //$licInstance = Licencia::find()->where(['token' => $user_id_lic_id[3]])->one();\n //if(!$licInstance){\n // Yii::info('No se ha creado la intancia licencia todavia puede ser que la repuesta demoro mas que el IPN en el proximo se creara');\n // return;\n //}\n\n\n $ipn_record = IpnNotification::find()->where([\n 'subscr_id' => isset($data['subscr_id']) ? $data['subscr_id'] : '',\n 'txn_type' => $data['txn_type']]\n )->one();\n\n if ($ipn_record != null) {\n Yii::warning('MENSAJE DUPLICADO ** ' . $ipnListener->getPostData(), 'paypal');\n return;\n }\n\n\n $licencia = Licencia::find()->where(['id' => $data['custom']])->one();\n if(!$licencia or count($licencia->salons) != 1){\n Yii::warning('Licencia no encontrada');\n return;\n }\n\n $salon = $licencia->salons[0];\n\n\n $update_salon_state = false;\n\n if ($data['txn_type'] == 'subscr_signup') {\n\n\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_SIGNUP;\n $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n $ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])) : '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n //$user_id_lic_id = explode('_', $data['custom']);\n $ipn_record->user_id = $salon->usuarioid;\n $ipn_record->licencia_id = $data['custom'];\n $licencia->estado = Licencia::ESTADO_ACTIVO;\n $licencia->save();\n $ipn_record->save();\n\n $update_salon_state = true;\n\n //LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n //} elseif ($data['txn_type'] == 'subscr_payment' and isset($data['txn_id'] ) and $data['payment_status']== 'Completed' ) {\n } elseif ($data['txn_type'] == 'subscr_payment' and isset($data['txn_id'] ) ) {\n\n $transaction = Yii::$app->db->beginTransaction();\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_PAYMENT;\n $ipn_record->txn_id = $data['txn_id'];\n $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n $ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])): '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n //$ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->payment_status = $data['payment_status'];\n $ipn_record->payment_type = $data['payment_type'];\n $ipn_record->mc_gross = $data['mc_gross'];\n //$user_id_lic_id = explode('_', $data['custom']);\n //$ipn_record->user_id = $user_id_lic_id[0];\n\n $ipn_record->user_id = $salon->usuarioid;\n $ipn_record->licencia_id = $data['custom'];\n $licencia->estado = Licencia::ESTADO_ACTIVO;\n $licencia->save();\n $ipn_record->save();\n\n $update_salon_state = true;\n\n /*if(!$salon = Salon::find()->where(['id' => $user_id_lic_id[2]])->one()){\n Yii::error('El salon que adquirió esa licencia no existe');\n return;\n }*/\n //$ipn_record->licencia_id = $salon->licenciaid;\n //$ipn_record->save();\n //$ipn_record\n //LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n $transaction->commit();\n\n }elseif($data['txn_type'] == IpnNotification::TNX_TYPE_EOT or $data['txn_type'] == IpnNotification::TNX_TYPE_CANCELLED){\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = $data['txn_type'];\n $ipn_record->subscr_id = $data['subscr_id'];\n\n if(!count($licencia->salons)){\n Yii::error('El salon que ha adquirido esa licencia no existe');\n return;\n }else{\n $ipn_record->licencia_id = $data['custom'];\n $ipn_record->user_id = $salon->usuarioid;\n $ipn_record->save();\n\n $licencia->detalles = 'El servicio de paypal fue cancelado o expiró';\n\n //obtener fecha de ultimo pago, adicionarle la duracion del tipo de licencia y setearlo\n // como fecha de fin para que el cliente luego de cancelar el servicio todavia pueda disfrutar del\n //periodo correspondiente de licencia, y no se le inhabilite inmediantamente la licencia\n\n $last_payment = IpnNotification::find()->where([\n 'licencia_id' => $licencia->id,\n 'txn_type' => IpnNotification::TNX_TYPE_PAYMENT\n ])->orderBy('msg_date DESC')->one();\n\n if ($last_payment) {\n $last_payment_date = date_create($last_payment->msg_date);\n $duracion = $licencia->licenciaSpec->duracion;\n $tipo_duracion = $licencia->licenciaSpec->tipo_duracion;\n\n if ($tipo_duracion == LicenciaSpec::TIPO_DURACION_DIA)\n $tipo_duracion_str = 'days';\n elseif ($tipo_duracion == LicenciaSpec::TIPO_DURACION_MES)\n $tipo_duracion_str = 'months';\n elseif ($tipo_duracion == LicenciaSpec::TIPO_DURACION_ANNO)\n $tipo_duracion_str = 'years';\n\n date_add($last_payment_date, date_interval_create_from_date_string($duracion . ' ' . $tipo_duracion_str));\n $licencia->fecha_fin = date_format($last_payment_date, 'Y-m-d H:i');\n }else {\n $licencia->estado = Licencia::ESTADO_INACTIVO;\n $salon->estado_sisitema = Salon::ESTADO_SISTEMA_INACTIVO;\n }\n\n $licencia->save();\n $salon->save();\n\n $update_salon_state = true;\n }\n\n } elseif($data['txn_type'] == IpnNotification::TNX_TYPE_WEB_ACEPT){\n\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_WEB_ACEPT;\n $ipn_record->txn_id = $data['txn_id'];\n // $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n //$ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])): '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n // $ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->payment_status = $data['payment_status'];\n $ipn_record->payment_type = $data['payment_type'];\n $ipn_record->mc_gross = $data['mc_gross'];\n // $ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->user_id = $salon->usuarioid;\n $ipn_record->licencia_id = $data['custom'];\n $licencia->estado = Licencia::ESTADO_ACTIVO;\n $licencia->save();\n $ipn_record->save();\n\n $update_salon_state = true;\n\n //LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n\n }\n\n if($update_salon_state)\n SalonHelper::actualizarEstadoSalon($salon->id);\n\n //DetallesPago::find()->where([]);\n\n\n mail('[email protected]', 'Verified IPN', $ipnListener->getTextReport());\n /*Yii::$app->mailer->compose()\n ->setFrom('[email protected]')\n ->setTo('[email protected]')\n ->setCc('[email protected]')\n ->setSubject('Reporte')\n ->setTextBody($ipnListener->getTextReport())\n //->setHtmlBody($h)\n //->setHtmlBody('<p>Html</p>')\n ->send();\n */\n // Yii::info($ipnListener->getPostData(), 'paypal');\n\n\n } else {\n /*\n An Invalid IPN *may* be caused by a fraudulent transaction attempt. It's\n a good idea to have a developer or sys admin manually investigate any\n invalid IPN.\n */\n mail('[email protected]', 'Invalid IPN', $ipnListener->getTextReport());\n }\n\n Yii::$app->request->enableCsrfValidation = TRUE;\n }",
"function _processIPN($commbank_data, $method) {\n $secure_post = $method->secure_post;\n $commbank_url = $this->_getURL($method);\n // read the post from PayPal system and add 'cmd'\n $post_msg = 'cmd=_notify-validate';\n foreach ($commbank_data as $key => $value) {\n if ($key != 'view' && $key != 'layout') {\n $value = urlencode($value);\n $post_msg .= \"&$key=$value\";\n }\n }\n\n $this->checkPaypalIps($commbank_data['ipn_test']);\n\n // post back to PayPal system to validate\n $header .= \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($post_msg) . \"\\r\\n\\r\\n\";\n\n if ($secure_post) {\n // If possible, securely post back to commbank using HTTPS\n // Your PHP server will need to be SSL enabled\n $fps = fsockopen('ssl://' . $commbank_url, 443, $errno, $errstr, 30);\n } else {\n $fps = fsockopen($commbank_url, 80, $errno, $errstr, 30);\n }\n\n if (!$fps) {\n $this->sendEmailToVendorAndAdmins(\"error with commbank\", JText::sprintf('VMPAYMENT_COMMBANK_ERROR_POSTING_IPN', $errstr, $errno));\n return JText::sprintf('VMPAYMENT_COMMBANK_ERROR_POSTING_IPN', $errstr, $errno); // send email\n } else {\n fputs($fps, $header . $post_msg);\n while (!feof($fps)) {\n $res = fgets($fps, 1024);\n\n if (strcmp($res, 'VERIFIED') == 0) {\n return '';\n } elseif (strcmp($res, 'INVALID') == 0) {\n $this->sendEmailToVendorAndAdmins(\"error with commbank IPN NOTIFICATION\", JText::_('VMPAYMENT_COMMBANK_ERROR_IPN_VALIDATION') . $res);\n return JText::_('VMPAYMENT_COMMBANK_ERROR_IPN_VALIDATION') . $res;\n }\n }\n }\n\n fclose($fps);\n return '';\n }",
"function ipn(){\n\t\t$paypalInfo\t= $this->input->post();\n\n\t\t$data['user_id'] = $paypalInfo['custom'];\n\t\t$data['product_id']\t= $paypalInfo[\"item_number\"];\n\t\t$data['txn_id']\t= $paypalInfo[\"txn_id\"];\n\t\t$data['payment_gross'] = $paypalInfo[\"payment_gross\"];\n\t\t$data['currency_code'] = $paypalInfo[\"mc_currency\"];\n\t\t$data['payer_email'] = $paypalInfo[\"payer_email\"];\n\t\t$data['payment_status']\t= $paypalInfo[\"payment_status\"];\n\n\t\t$paypalURL = $this->paypal_lib->paypal_url;\t\t\n\t\t$result\t= $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n\t\t\n\t\t//redirect(base_url());\n\t\t//check whether the payment is verified\n\t\tif(preg_match(\"/VERIFIED/i\",$result)){\n\t\t //insert the transaction data into the database\n\t\t\t//$this->product->insertTransaction($data);\n\t\t \n\t\t}\n }",
"public function process() {\n\t\t$this->log('Process accessed', 'paypal');\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->log('POST ' . print_r($_POST, true), 'paypal');\n\t\t}\n\t\tif ($this->InstantPaymentNotification->isValid($_POST)) {\n\t\t\t$this->log('POST Valid', 'paypal');\n\t\t\t$notification = $this->InstantPaymentNotification->buildAssociationsFromIPN($_POST);\n\n\t\t\t$existingIPNId = $this->InstantPaymentNotification->searchIPNId($notification);\n\t\t\tif ($existingIPNId !== false) {\n\t\t\t\t$notification['InstantPaymentNotification']['id'] = $existingIPNId;\n\t\t\t}\n\n\t\t\t$this->InstantPaymentNotification->saveAll($notification);\n\t\t\t$this->__processTransaction($this->InstantPaymentNotification->id);\n\t\t} else {\n\t\t\t$this->log('POST Not Validated', 'paypal');\n\t\t}\n\t\treturn $this->redirect('/');\n\t}",
"function ipnAction(){\n\t\t$this->_helper->layout->disableLayout();\n\t $this->_helper->viewRenderer->setNoRender(true);\n\t\t\n\t // check if this is a subscriber signup action, then ignore it since it is just confirming that \n\t // a recurring payment profile has been created \n\t if ($this->_getParam('txn_type') == 'subscr_signup') {\n\t \t// do not countinue\n\t \treturn; \n\t }\n\t \n\t $config = Zend_Registry::get(\"config\"); \n\t \n\t\t// below supported vals that paypal posts to us, this list is exhaustive..\n\t\t// NOTE: if a variable is not in this array, it is not going in the database. \n\t\t$paypal_vals = array(\"item_name\", \"item_number\", \"custom\", \n\t\t\t\"receiver_email\", \"receiver_id\", \"quantity\", \"memo\", \"payment_type\", \"payment_status\", \n\t\t\t\"payment_date\", \"payment_gross\", \"payment_fee\",\n\t\t\t\"mc_gross\", \"mc_fee\", \"mc_currency\", \"settle_amount\", \"settle_currency\", \"exchange_rate\",\n\t\t\t\"txn_id\", \"parent_txn_id\", \"txn_type\", \"first_name\", \"last_name\", \"payer_business_name\", \n\t\t\t\"address_name\", \"address_street\", \"address_city\", \"address_zip\", \"address_status\",\n\t\t\t\"address_country\", \"payer_email\", \"payer_id\", \"payer_status\",\"pending_reason\", \"reason_code\",\n\t\t\t\"notify_version\", \"verify_sign\"); \n\t\t\n\t\t// these are used later to verify validity of transaction\n\t\t$payment_status = $this->_getParam('payment_status');\n\t\t$txn_id = $this->_getParam('txn_id');\n\t\t$receiver_email = $this->_getParam('receiver_email');\n\t\t\n\t\t// read the post from PayPal system and add 'cmd'\n\t\t$req = 'cmd=_notify-validate';\n\t\t$addtosql = array();\n\t\t$params = $this->_getAllParams();\n\t\tforeach ($params as $key => $value) {\n\t\t\t$newvalue = urlencode(stripslashes($value));\t\t\n\t\t\t$req .= \"&\".$key.\"=\".$newvalue;\t\t\n\t\t\t// build insert statement to save papypal variables to database\n\t\t\tif ($key == 'payment_date') {\n\t\t\t\t// transform the paymentdate into a proper date for inserting into the database\n\t\t\t\t$addtosql[] = \" \".$key.\"='\".changeDateFromPageToMySQLFormat($value).\"'\"; \n\t\t\t} else {\n\t\t\t\t// process other fields \n\t\t\t\tif (in_array ($key, $paypal_vals)) { \n\t\t\t\t\tif (is_numeric($value)) { \n\t\t \t$addtosql[] = \" \".$key.\"=\".$value; \n\t\t \t} else { \n\t\t \t$addtosql[]= \" \".$key.\"='\".$value.\"'\"; \n\t\t \t} \n\t\t\t\t}\n\t\t\t} \n\t }\n\t\t$queryForPaypalInfo = \"INSERT INTO payment SET \".implode(\", \", $addtosql);\n\t\t\n\t\t// Check whether or not paypal txn_id is a duplicate before adding new paypal info\n\t\t// to the database\t\n\t\t$transactionIDValid = isTransactionIDValid($txn_id);\t\n\t\t// Save transaction details from Paypal to persistent store (file or database).\n\t\t//$result = mysql_query($queryForPaypalInfo);\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$result = $conn->execute($queryForPaypalInfo); \n\t\t$paymentid = $conn->lastInsertId();\n\t\tif (!$result) {\n\t\t\t# an error occured, log it and send a message\n\t\t\t$this->_logger->err(\"Error Inserting Paypal Transaction in Database. Query :\".$queryForPaypalInfo.\" - error \".mysql_error()); \n\t\t}\t\n\t\t\n\t\t// post back to PayPal system to verify the transaction \n\t\t$client = new Zend_Http_Client($config->paypal->serverurl);\n\t\t$client->setMethod(Zend_Http_Client::POST);\n\t\t$client->setParameterPost(array_merge(\n\t\t\t\t\t\t\t\t\t\tarray('cmd' => '_notify-validate'),\n\t\t\t\t\t\t\t\t\t\t$this->_getAllParams()\n\t\t\t\t\t\t\t\t )\n\t\t);\n\t\t$response = $client->request();\n\t\t\n\t\tif ($response->getBody() == 'VERIFIED'){\n\t\t\t// check the payment_status is Completed\n\t\t\tif ($payment_status != \"Completed\") {\t\t\t\t\t\n\t\t\t\t// payment not completed, just exit.\t\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t// check that txn_id has not been previously processed\n\t\t\tif ($transactionIDValid == false) {\n\t\t\t\treturn; \t\t\t\n\t\t\t}\n\t\t\t// check that receiver_email is your Primary PayPal email\n\t\t\tif ($receiver_email != $config->paypal->receiveremail) {\t\t\t\t\t\n\t\t\t\t// receiver email is not primary email, just exit.\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t\n\t\t\t// execute the custom login i.e. update the expiry date in the useraccount table and set the start and end dates in the payment table\n\t\t\texecuteCustomLogic($this->_getParam('custom'), $paymentid, $this->_getParam('item_number'));\n\t\t} else {\n\t\t\t// TODO: log for manual investigation\n\t\t\tsendTestMessage(\"Paypal POST BACK VERIFICATION failed: Log manual investigation\", \"Paypal POST BACK VERIFICATION failed: Log manual investigation\");\n\t\t\t$this->_logger->err(\"Paypal payment with Txn #\".$txn_id.\" is invalid, manual investigation required\");\n\t\t}\n\t}",
"public function process ()\n {\n $this->processInAppNotifications();\n }",
"private function readIPN()\n\t{\n\t\t$raw_post_data = file_get_contents('php://input');\n\t\t$raw_post_array = explode('&', $raw_post_data);\n\n\t\t$myPost = array();\n\t\tforeach($raw_post_array as $keyval)\n\t\t{\n\t\t\t$keyval = explode('=', $keyval);\n\t\t\tif(count($keyval) == 2)\n\t\t\t{\n\t\t\t\t$myPost[$keyval[0]] = urldecode($keyval[1]);\n\t\t\t}\n\t\t}\n\n\t\t// Read the IPN message sent from PayPal and prepend 'cmd=_notify-validate'.\n\t\t$req = 'cmd=_notify-validate';\n\n\t\tif(function_exists('get_magic_quotes_gpc'))\n\t\t{\n\t\t\t$get_magic_quotes_exists = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$get_magic_quotes_exists = false;\n\t\t}\n\n\t\tforeach($myPost as $key => $value)\n\t\t{\n\t\t\tif($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1)\n\t\t\t{\n\t\t\t\t$value = urlencode(stripslashes($value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = urlencode($value);\n\t\t\t}\n\t\t\t$req .= \"&$key=$value\";\n\t\t}\n\n\t\treturn $req;\n\t}",
"function actionIpnOLD(){\n //LicenciaHelper::updatePaymentIfExist(1, 'I-V8CPTPJ0J3YE', 18);die;\n\n /*\n By default the IpnListener object is going to post the data back to PayPal\n using cURL over a secure SSL connection. This is the recommended way to post\n the data back, however, some people may have connections problems using this\n method.\n\n To post over standard HTTP connection, use:\n $listener->use_ssl = false;\n\n To post using the fsockopen() function rather than cURL, use:\n $listener->use_curl = false;\n */\n\n /*\n The processIpn() method will encode the POST variables sent by PayPal and then\n POST them back to the PayPal server. An exception will be thrown if there is\n a fatal error (cannot connect, your server is not configured properly, etc.).\n Use a try/catch block to catch these fatal errors and log to the ipn_errors.log\n file we setup at the top of this file.\n\n The processIpn() method will send the raw data on 'php://input' to PayPal. You\n can optionally pass the data to processIpn() yourself:\n $verified = $listener->processIpn($my_post_data);\n */\n\n $ipnListener = new IpnListener();\n $ipnListener->use_sandbox = true;\n //$verified = true;\n try {\n $ipnListener->requirePostMethod();\n $verified = $ipnListener->processIpn();\n } catch (Exception $e) {\n Yii::error($e->getMessage(), 'paypal');\n throw $e;\n //exit(0);\n }\n\n /*\n The processIpn() method returned true if the IPN was \"VERIFIED\" and false if it\n was \"INVALID\".\n */\n if ($verified) {\n /*\n Once you have a verified IPN you need to do a few more checks on the POST\n fields--typically against data you stored in your database during when the\n end user made a purchase (such as in the \"success\" page on a web payments\n standard button). The fields PayPal recommends checking are:\n\n 1. Check the $_POST['payment_status'] is \"Completed\"\n 2. Check that $_POST['txn_id'] has not been previously processed\n 3. Check that $_POST['receiver_email'] is your Primary PayPal email\n 4. Check that $_POST['payment_amount'] and $_POST['payment_currency']\n are correct\n\n Since implementations on this varies, I will leave these checks out of this\n example and just send an email using the getTextReport() method to get all\n of the details about the IPN.\n */\n\n $data = $_POST;\n //$data = $ipnListener->getPostData();\n $user_id_lic_id = explode('_', $data['custom']);\n\n //$licInstance = Licencia::find()->where(['token' => $user_id_lic_id[3]])->one();\n //if(!$licInstance){\n // Yii::info('No se ha creado la intancia licencia todavia puede ser que la repuesta demoro mas que el IPN en el proximo se creara');\n // return;\n //}\n\n\n $ipn_record = IpnNotification::find()->where([\n 'subscr_id' => isset($data['subscr_id']) ? $data['subscr_id'] : '',\n 'txn_type' => $data['txn_type']]\n )->one();\n\n if ($ipn_record != null) {\n Yii::warning('MENSAJE DUPLICADO ** ' . $ipnListener->getPostData(), 'paypal');\n return;\n }\n\n\n if ($data['txn_type'] == 'subscr_signup') {\n\n\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_SIGNUP;\n $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n $ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])) : '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n //$user_id_lic_id = explode('_', $data['custom']);\n $ipn_record->user_id = $user_id_lic_id[0];\n\n\n LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n //} elseif ($data['txn_type'] == 'subscr_payment' and isset($data['txn_id'] ) and $data['payment_status']== 'Completed' ) {\n } elseif ($data['txn_type'] == 'subscr_payment' and isset($data['txn_id'] ) ) {\n\n $transaction = Yii::$app->db->beginTransaction();\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_PAYMENT;\n $ipn_record->txn_id = $data['txn_id'];\n $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n $ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])): '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n $ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->payment_status = $data['payment_status'];\n $ipn_record->payment_type = $data['payment_type'];\n $ipn_record->mc_gross = $data['mc_gross'];\n $user_id_lic_id = explode('_', $data['custom']);\n $ipn_record->user_id = $user_id_lic_id[0];\n\n /*if(!$salon = Salon::find()->where(['id' => $user_id_lic_id[2]])->one()){\n Yii::error('El salon que adquirió esa licencia no existe');\n return;\n }*/\n //$ipn_record->licencia_id = $salon->licenciaid;\n //$ipn_record->save();\n //$ipn_record\n LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n $transaction->commit();\n\n }elseif($data['txn_type'] == IpnNotification::TNX_TYPE_EOT or $data['txn_type'] == IpnNotification::TNX_TYPE_CANCELLED){\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = $data['txn_type'];\n $ipn_record->subscr_id = $data['subscr_id'];\n\n if(!$salon = Salon::find()->where(['id' => $user_id_lic_id[2]])->one()){\n Yii::error('El salon que adquirido esa licencia no existe');\n return;\n }else{\n $ipn_record->licencia_id = $salon->licenciaid;\n $ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->save();\n $salon->licencia->estado = Licencia::ESTADO_INACTIVO;\n $salon->licencia->detalles = 'El servicio de paypal fue cancelado o expiró';\n $salon->licencia->save();\n $salon->estado = Salon::ESTADO_INACTIVO;\n $salon->save();\n }\n\n } elseif($data['txn_type'] == IpnNotification::TNX_TYPE_WEB_ACEPT){\n\n $ipn_record = new IpnNotification();\n $ipn_record->txn_type = IpnNotification::TNX_TYPE_WEB_ACEPT;\n $ipn_record->txn_id = $data['txn_id'];\n // $ipn_record->subscr_id = $data['subscr_id'];\n $ipn_record->payer_email = $data['payer_email'];\n $ipn_record->receiver_email = $data['receiver_email'];\n //$ipn_record->msg_date = isset($data['subscr_date']) ? date('Y-m-d', strtotime($data['subscr_date'])): '';\n $ipn_record->item_name = $data['item_name'];\n $ipn_record->mc_currency = $data['mc_currency'];\n $ipn_record->user_id = $user_id_lic_id[0];\n $ipn_record->payment_status = $data['payment_status'];\n $ipn_record->payment_type = $data['payment_type'];\n $ipn_record->mc_gross = $data['mc_gross'];\n $ipn_record->user_id = $user_id_lic_id[0];\n\n LicenciaHelper::saveLicencia($data, $ipn_record, $user_id_lic_id[1]);\n\n }\n\n //DetallesPago::find()->where([]);\n\n\n mail('[email protected]', 'Verified IPN', $ipnListener->getTextReport());\n mail('[email protected]', 'Verified IPN', $ipnListener->getTextReport());\n /*Yii::$app->mailer->compose()\n ->setFrom('[email protected]')\n ->setTo('[email protected]')\n ->setCc('[email protected]')\n ->setSubject('Reporte')\n ->setTextBody($ipnListener->getTextReport())\n //->setHtmlBody($h)\n //->setHtmlBody('<p>Html</p>')\n ->send();\n */\n // Yii::info($ipnListener->getPostData(), 'paypal');\n\n\n } else {\n /*\n An Invalid IPN *may* be caused by a fraudulent transaction attempt. It's\n a good idea to have a developer or sys admin manually investigate any\n invalid IPN.\n */\n mail('[email protected]', 'Invalid IPN', $ipnListener->getTextReport());\n mail('[email protected]', 'Invalid IPN', $ipnListener->getTextReport());\n }\n\n Yii::$app->request->enableCsrfValidation = TRUE;\n }",
"public function postNotify(Request $request) {\n //Import the namespace Srmklive\\PayPal\\Services\\ExpressCheckout first in your controller.\n $provider = new ExpressCheckout;\n $response = (string) $provider->verifyIPN($request);\n if ($response === 'VERIFIED')\n\t\t{\n \n }\n }",
"public static function listen() {\n\t\tif ( filter_has_var( INPUT_GET, 'xml_notification' ) || filter_has_var( INPUT_GET, 'xml_notifaction' ) ) {\n\t\t\t$data = file_get_contents( 'php://input' );\n\n\t\t\t$xml = Pronamic_WP_Util::simplexml_load_string( $data );\n\n\t\t\tif ( ! is_wp_error( $xml ) ) {\n\t\t\t\t$notification = Pronamic_WP_Pay_Gateways_IDealBasic_XML_NotificationParser::parse( $xml );\n\n\t\t\t\t$purchase_id = $notification->get_purchase_id();\n\n\t\t\t\t$payment = get_pronamic_payment_by_meta( '_pronamic_payment_purchase_id', $purchase_id );\n\n\t\t\t\tif ( $payment ) {\n\t\t\t\t\t$payment->set_transaction_id( $notification->get_transaction_id() );\n\t\t\t\t\t$payment->set_status( $notification->get_status() );\n\n\t\t\t\t\tPronamic_WP_Pay_Plugin::update_payment( $payment );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function success() {\n // or what have you. The order information at this point is in POST \n // variables. However, you don't want to \"process\" the order until you\n // get validation from the IPN. That's where you would have the code to\n // email an admin, update the database with payment status, activate a\n // membership, etc. \n // echo \"<br/><p><b>Thank you for your Donation. </b><br /></p>\";\n //\n // foreach ($_POST as $key => $value) {\n // echo \"$key: $value<br>\";\n // }\n // You could also simply re-direct them to another page, or your own \n // order status page which presents the user with the status of their\n // order based on a database (which can be modified with the IPN code \n // below).\n // Primera comprobación. Cerraremos este if más adelante\n if ($_POST) {\n // Obtenemos los datos en formato variable1=valor1&variable2=valor2&...\n $raw_post_data = file_get_contents('php://input');\n // Los separamos en un array\n $raw_post_array = explode('&', $raw_post_data);\n\n // Separamos cada uno en un array de variable y valor\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode(\"=\", $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n\n // Nuestro string debe comenzar con cmd=_notify-validate\n $req = 'cmd=_notify-validate';\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n // Cada valor se trata con urlencode para poder pasarlo por GET\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n\n //Añadimos cada variable y cada valor\n $req .= \"&$key=$value\";\n }\n $ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'); // Esta URL debe variar dependiendo si usamos SandBox o no. Si lo usamos, se queda así.\n //$ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); // Si no usamos SandBox, debemos usar esta otra linea en su lugar.\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n if (!($res = curl_exec($ch))) {\n // Ooops, error. Deberiamos guardarlo en algún log o base de datos para examinarlo después.\n curl_close($ch);\n exit;\n }\n curl_close($ch);\n if (strcmp($res, \"VERIFIED\") == 0) {\n $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/success_' . $myPost['item_number'] . \"_\" . $myPost['payment_status'] . \"_\" . date(\"YmdHis\") . '.log';\n //$file= @file_get_contents($fileDir);\n //$file.=$res;\n $new_file = file_put_contents($fileDir, json_encode($myPost));\n\n \n $pagos = $this->stream->getRepository(\"stream\\stream_paypal_transactions\")->findBy(array(\n \"id_seguimiento\" => $myPost['item_number']\n ), array(\"id\" => \"desc\"));\n $pago = $pagos[0];\n $myPost['payment_status'] = \"Completed\";\n \n $paypal_transaction = new stream\\stream_paypal_transactions();\n $paypal_transaction->txn_id=$myPost['txn_id'];\n $paypal_transaction->ipn_track_id=$myPost['ipn_track_id'];\n $paypal_transaction->type_payment = $pago->type_payment;\n $paypal_transaction->amount = $pago->amount;\n $paypal_transaction->id_producto = $pago->id_producto;\n $paypal_transaction->notes =$pago->notes;\n $paypal_transaction->id_seguimiento = $myPost['item_number'];\n $paypal_transaction->id_usuario = $pago->id_usuario;\n $paypal_transaction->type_user = $pago->type_user;\n $paypal_transaction->fecha_hora = date(\"Y-m-d H:i:s\");\n $paypal_transaction->estatus=$myPost['payment_status'];\n\n $this->stream->persist($paypal_transaction);\n $this->stream->flush();\n// \n// \n \n \n \n /**\n * A partir de aqui, deberiamos hacer otras comprobaciones rutinarias antes de continuar. Son opcionales, pero recomiendo al menos las dos primeras. Por ejemplo:\n *\n * * Comprobar que $_POST[\"payment_status\"] tenga el valor \"Completed\", que nos confirma el pago como completado.\n * * Comprobar que no hemos tratado antes la misma id de transacción (txd_id)\n * * Comprobar que el email al que va dirigido el pago sea nuestro email principal de PayPal\n * * Comprobar que la cantidad y la divisa son correctas\n */\n // Después de las comprobaciones, toca el procesamiento de los datos.\n\n /**\n * En este punto tratamos la información.\n * Podemos hacer con ella muchas cosas:\n *\n * * Guardarla en una base de datos.\n * * Guardar cada linea del pedido en una linea diferente en la base de datos.\n * * Guardar un log.\n * * Restar las cantidades de los artículos del stock.\n * * Enviar un mensaje de confirmcaión al cliente.\n * * Enviar un mensaje al encargado de pedidos para que lo prepare.\n * * Comprobar mediante complejas operaciones matemáticas si el cliente es el número un millon y notificarle de que ha ganado dos noches de hotel en Torrevieja.\n * * ¡Imaginación!\n */\n } else if (strcmp($res, \"INVALID\") == 0) {\n // El estado que devuelve es INVALIDO, la información no ha sido enviada por PayPal. Deberías guardarla en un log para comprobarlo después\n }\n } else { // Si no hay datos $_POST\n // Podemos guardar la incidencia en un log, redirigir a una URL...\n }\n }",
"public function ipn(Request $request)\n {\n #Received all the payement information from the gateway\n if ($request->input('tran_id')) #Check transation id is posted or not.\n {\n\n $tran_id = $request->input('tran_id');\n\n #Check order status in order tabel against the transaction id or order id.\n $order_details = ProductOrder::where('tran_id', $tran_id)\n ->select('tran_id', 'payment_status', 'currency', 'total_amount')->first();\n\n if ($order_details->status == 'Pending') {\n $sslc = new SslCommerzNotification();\n $validation = $sslc->orderValidate($request->all(), $tran_id, $order_details->amount, $order_details->currency);\n if ($validation == TRUE) {\n /*\n That means IPN worked. Here you need to update order status\n in order table as Processing or Complete.\n Here you can also sent sms or email for successful transaction to customer\n */\n $update_product = ProductOrder::where('tran_id', $tran_id)\n ->update(['payment_status' => 'Processing']);\n\n return redirect()->route('frontend_customer_dashboard', '#orders')->with('success', 'Transaction is successfully Completed');\n } else {\n /*\n That means IPN worked, but Transation validation failed.\n Here you need to update order status as Failed in order table.\n */\n $update_product = ProductOrder::where('tran_id', $tran_id)\n ->update(['payment_status' => 'Failed']);\n\n echo \"validation Fail\";\n }\n\n } else if ($order_details->status == 'Processing' || $order_details->status == 'Complete') {\n\n #That means Order status already updated. No need to udate database.\n\n return redirect()->route('frontend_customer_dashboard', '#orders')->with('success', 'Transaction is successfully Completed');\n } else {\n #That means something wrong happened. You can redirect customer to your product page.\n\n echo \"Invalid Transaction\";\n }\n } else {\n echo \"Invalid Data\";\n }\n }",
"function validate_ipn() {\n $url_parsed=parse_url($this->paypal_url); \n\n // generate the post string from the _POST vars aswell as load the\n // _POST vars into an arry so we can play with them from the calling\n // script.\n $post_string = ''; \n foreach ($_POST as $field=>$value) { \n $this->ipn_data[\"$field\"] = $value;\n $post_string .= $field.'='.urlencode(stripslashes($value)).'&'; \n }\n $post_string.=\"cmd=_notify-validate\"; // append ipn command\n\n // open the connection to paypal\n $fp = fsockopen($url_parsed[host],\"80\",$err_num,$err_str,30); \n if(!$fp) {\n \n // could not open the connection. If loggin is on, the error message\n // will be in the log.\n $this->last_error = \"fsockopen error no. $errnum: $errstr\";\n $this->log_ipn_results(false); \n return false;\n \n } else { \n \n // Post the data back to paypal\n fputs($fp, \"POST $url_parsed[path] HTTP/1.1\\r\\n\"); \n fputs($fp, \"Host: $url_parsed[host]\\r\\n\"); \n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\"); \n fputs($fp, \"Content-length: \".strlen($post_string).\"\\r\\n\"); \n fputs($fp, \"Connection: close\\r\\n\\r\\n\"); \n fputs($fp, $post_string . \"\\r\\n\\r\\n\"); \n\n // loop through the response from the server and append to variable\n while(!feof($fp)) { \n $this->ipn_response .= fgets($fp, 1024); \n } \n\n fclose($fp); // close connection\n\n }\n \n if (preg_match(\"VERIFICATO\",$this->ipn_response)) {\n \n // Valid IPN transaction.\n $this->log_ipn_results(true);\n return true; \n \n } else {\n \n // Invalid IPN transaction. Check the log for details.\n $this->last_error = 'Validazione IPN Fallita.';\n $this->log_ipn_results(false); \n return false;\n \n }\n \n }",
"function validate_ipn() \n {\n $url_parsed=parse_url($this->paypal_url); \n\n // generate the post string from the _POST vars aswell as load the\n // _POST vars into an arry so we can play with them from the calling\n // script.\n $post_string = ''; \n foreach ($_POST as $field=>$value) \n\t { \n $this->ipn_data[\"$field\"] = $value;\n $post_string .= $field.'='.urlencode(stripslashes($value)).'&'; \n }\n $post_string.=\"cmd=_notify-validate\"; // append ipn command\n\n // open the connection to paypal\n $fp = fsockopen($url_parsed[host],\"80\",$err_num,$err_str,30); \n if(!$fp) \n\t {\n \n // could not open the connection. If loggin is on, the error message\n // will be in the log.\n $this->last_error = \"fsockopen error no. $errnum: $errstr\";\n $this->log_ipn_results(false); \n return false;\n \n } else \n\t { \n \n // Post the data back to paypal\n fputs($fp, \"POST $url_parsed[path] HTTP/1.1\\r\\n\"); \n fputs($fp, \"Host: $url_parsed[host]\\r\\n\"); \n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\"); \n fputs($fp, \"Content-length: \".strlen($post_string).\"\\r\\n\"); \n fputs($fp, \"Connection: close\\r\\n\\r\\n\"); \n fputs($fp, $post_string . \"\\r\\n\\r\\n\"); \n\n // loop through the response from the server and append to variable\n while(!feof($fp)) \n\t\t { \n $this->ipn_response .= fgets($fp, 1024); \n } \n\n fclose($fp); // close connection\n\n }\n \n if (eregi(\"VERIFIED\",$this->ipn_response)) \n\t {\n \n // Valid IPN transaction.\n $this->log_ipn_results(true);\n return true; \n \n } else \n\t {\n \n // Invalid IPN transaction. Check the log for details.\n $this->last_error = 'IPN Validation Failed.';\n $this->log_ipn_results(false); \n return false;\n \n }\n \n }",
"public static function stripe_notify()\n\t\t{\n\t\t\tglobal $current_site, $current_blog;\n\n\t\t\tif(!empty($_GET['s2member_pro_stripe_notify']) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_secret_key'])\n\t\t\t{\n\t\t\t\t$stripe = array(); // Initialize array of Webhook/IPN event data and s2Member log details.\n\t\t\t\t@ignore_user_abort(TRUE); // Continue processing even if/when connection is broken.\n\n\t\t\t\tif(!class_exists('Stripe'))\n\t\t\t\t\trequire_once dirname(__FILE__).'/stripe-sdk/lib/Stripe.php';\n\t\t\t\tStripe::setApiKey($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_secret_key']);\n\n\t\t\t\tif(is_object($event = c_ws_plugin__s2member_pro_stripe_utilities::get_event()) && ($stripe['event'] = $event))\n\t\t\t\t{\n\t\t\t\t\tswitch($event->type)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'invoice.payment_succeeded': // Subscription payments.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_invoice = $event->data->object) instanceof Stripe_Invoice\n\t\t\t\t\t\t\t && !empty($stripe_invoice->customer) && !empty($stripe_invoice->subscription)\n\t\t\t\t\t\t\t && ($stripe_invoice_total = number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount($stripe_invoice->total, $stripe_invoice->currency), 2, '.', '')) > 0\n\t\t\t\t\t\t\t && is_object($stripe_subscription = c_ws_plugin__s2member_pro_stripe_utilities::get_customer_subscription($stripe_invoice->customer, $stripe_invoice->subscription))\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_payment';\n\t\t\t\t\t\t\t\t$ipn['txn_id'] = $stripe_invoice->id;\n\t\t\t\t\t\t\t\t$ipn['txn_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = $stripe_invoice_total;\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_invoice->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = number_format(0, 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\n\t\t\t\t\t\t\t\tif(($maybe_end_subscription = self::_maybe_end_subscription_after_payment($stripe_invoice->customer, $stripe_subscription)))\n\t\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = $maybe_end_subscription;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'invoice.payment_failed': // Subscription payment failures.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_invoice = $event->data->object) instanceof Stripe_Invoice\n\t\t\t\t\t\t\t && !empty($stripe_invoice->customer) && !empty($stripe_invoice->subscription)\n\t\t\t\t\t\t\t && ($stripe_invoice_total = number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount($stripe_invoice->total, $stripe_invoice->currency), 2, '.', '')) > 0\n\t\t\t\t\t\t\t && is_object($stripe_subscription = c_ws_plugin__s2member_pro_stripe_utilities::get_customer_subscription($stripe_invoice->customer, $stripe_invoice->subscription))\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\n\t\t\t\t\t\t\t\tif(($maybe_end_subscription = self::_maybe_end_subscription_after_payment($stripe_invoice->customer, $stripe_subscription)))\n\t\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = $maybe_end_subscription;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Ignoring `'.$event->type.'`. s2Member does NOT respond to individual payment failures; only to subscription cancellations.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'You may control the behavior(s) associated w/ subscription payment failures from your Stripe Dashboard please.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'customer.deleted': // Customer deletions.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_customer = $event->data->object) instanceof Stripe_Customer\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_customer->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_eot';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'customer.subscription.deleted': // Customer subscription deletion.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_subscription = $event->data->object) instanceof Stripe_Subscription\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_eot';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'charge.refunded': // Customer refund (partial or full).\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_charge = $event->data->object) instanceof Stripe_Charge\n\t\t\t\t\t\t\t && !empty($stripe_charge->amount_refunded) && !empty($stripe_charge->customer)\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_charge->customer))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['payment_status'] = 'refunded';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['parent_txn_id'] = $ipn_signup_vars['subscr_id'];\n\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_fee'] = '-'.number_format('0.00', 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = '-'.number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount(abs($stripe_charge->amount_refunded), $stripe_charge->currency), 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_charge->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = '-'.number_format('0.00', 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'charge.dispute.created': // Customer dispute (chargeback).\n\n\t\t\t\t\t\t\tif(!empty($event->data->object->charge)\n\t\t\t\t\t\t\t && ($stripe_charge = c_ws_plugin__s2member_pro_stripe_utilities::get_charge($event->data->object->charge)) instanceof Stripe_Charge\n\t\t\t\t\t\t\t && !empty($stripe_charge->customer) // The charge that is being disputed must be associated with a customer that we know of.\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_charge->customer))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['payment_status'] = 'reversed';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['parent_txn_id'] = $ipn_signup_vars['subscr_id'];\n\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_fee'] = '-'.number_format('0.00', 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = '-'.number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount(abs($stripe_charge->amount), $stripe_charge->currency), 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_charge->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = '-'.number_format('0.00', 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\t\t\t\t\t}\n\t\t\t\t\tif(empty($processing)) $stripe['s2member_log'][] = 'Ignoring this Webhook/IPN. The event does NOT require any action on the part of s2Member.';\n\t\t\t\t}\n\t\t\t\telse // Extensive log reporting here. This is an area where many site owners find trouble. Depending on server configuration; remote HTTPS connections may fail.\n\t\t\t\t{\n\t\t\t\t\t$stripe['s2member_log'][] = 'Unable to verify Webhook/IPN event ID. This is most likely related to an invalid Stripe configuration. Please check: s2Member → Stripe Options.';\n\t\t\t\t\t$stripe['s2member_log'][] = 'If you\\'re absolutely SURE that your Stripe configuration is valid, you may want to run some tests on your server, just to be sure \\$_POST variables (and php://input) are populated; and that your server is able to connect to Stripe over an HTTPS connection.';\n\t\t\t\t\t$stripe['s2member_log'][] = 's2Member uses the Stripe SDK for remote connections; which relies upon the cURL extension for PHP. Please make sure that your installation of PHP has the cURL extension; and that it\\'s configured together with OpenSSL for HTTPS communication.';\n\t\t\t\t\t$stripe['s2member_log'][] = var_export($_REQUEST, TRUE).\"\\n\".var_export(json_decode(@file_get_contents('php://input')), TRUE);\n\t\t\t\t}\n\t\t\t\tc_ws_plugin__s2member_utils_logs::log_entry('stripe-ipn', $stripe);\n\n\t\t\t\tstatus_header(200);\n\t\t\t\theader('Content-Type: text/plain; charset=UTF-8');\n\t\t\t\twhile(@ob_end_clean()); exit();\n\t\t\t}\n\t\t}",
"abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);",
"public function process()\n {\n Phpfox::isUser(true);\n /**\n * LOCK this feature\n *\n if($iId = $this->request()->get('id'))\n {\n $aInvite = Phpfox::getService('customprofiles')->getInviteAnonymousMessage($iId);\n if(isset($aInvite['invite_id']) && Phpfox::getUserId() == $aInvite['invite_user_id'])\n {\n if (Phpfox::isModule('notification'))\n {\n $type_id = 'customprofiles_anonymousconfirm';\n Phpfox::getService('customprofiles.process')->addNotification($type_id, $aInvite['feed_id'], $aInvite['invite_user_id'],$aInvite['user_id']); \n Phpfox::getService('customprofiles.process')->removeInviteAnonymousMessage($iId); \n }\n }\n } \n **/\n \n $this->url()->send('');\n }",
"public function paymentnotifyAction()\n\t{\n\t\t// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST.\n\t\t// Instead, read raw POST data from the input stream.\n\t\t$raw_post_data = file_get_contents('php://input');\n\t\t$raw_post_array = explode('&', $raw_post_data);\n\t\t$myPost = array();\n\t\tforeach ($raw_post_array as $keyval) {\n\t\t$keyval = explode ('=', $keyval);\n\t\tif (count($keyval) == 2)\n\t\t$myPost[$keyval[0]] = urldecode($keyval[1]);\n\t\t}\n\t\t// read the IPN message sent from PayPal and prepend 'cmd=_notify-validate'\n\t\t$req = 'cmd=_notify-validate';\n\t\tif(function_exists('get_magic_quotes_gpc')) {\n\t\t$get_magic_quotes_exists = true;\n\t\t}\n\t\tforeach ($myPost as $key => $value) {\n\t\tif($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n\t\t$value = urlencode(stripslashes($value));\n\t\t} else {\n\t\t$value = urlencode($value);\n\t\t}\n\t\t$req .= \"&$key=$value\";\n\t\t}\n\t\t// Step 2: POST IPN data back to PayPal to validate\n\t\t$ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr');\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\t\t// In wamp-like environments that do not come bundled with root authority certificates,\n\t\t// please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and set\n\t\t// the directory path of the certificate as shown below:\n\t\t// curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\n\t\tif( !($res = curl_exec($ch)) ) {\n\t\t// error_log(\"Got \" . curl_error($ch) . \" when processing IPN data\");\n\t\tcurl_close($ch);\n\t\texit;\n\t\t}\n\t\tcurl_close($ch); \n\t\t\t\n\t\t\tif (strcmp ($res, \"VERIFIED\") == 0) {\n\t\t// The IPN is verified, process it:\n\t\t// check whether the payment_status is Completed\n\t\t// check that txn_id has not been previously processed\n\t\t// check that receiver_email is your Primary PayPal email\n\t\t// check that payment_amount/payment_currency are correct\n\t\t// process the notification\n\t\t// assign posted variables to local variables\n\t\t$custom = $_POST['custom'];\n\t\t$customArray = explode('#',$custom );\n\t\t$playerId = $customArray[0];\n\t\t$bankId = $customArray[1];\n\t\t$item_name = $_POST['item_name'];\n\t\t$item_number = $_POST['item_number'];\n\t\t$payment_status = $_POST['payment_status'];\n\t\t$payment_amount = $_POST['mc_gross'];\n\t\t$payment_currency = $_POST['mc_currency'];\n\t\t$txn_id = $_POST['txn_id'];\n\t\t$receiver_email = $_POST['receiver_email'];\n\t\t$payer_email = $_POST['payer_email'];\n\t\t// IPN message values depend upon the type of notification sent.\n\t\t// To loop through the &_POST array and print the NV pairs to the screen:\n\t\t$finalString = '';\n\t\tforeach($_POST as $key => $value) {\n\t\t$finalString .= $key.\" = \". $value.\"#\";\n\t\t}\n\t\t\t\t$payment = new Payment();\n\t\t\t\t$dataArr['player_id']\t\t=\t$playerId;\n\t\t\t\t$dataArr['bank_id']\t\t\t=\t$bankId;\n\t\t\t\t$dataArr['pay_amount']\t\t=\t$payment_amount;\n\t\t\t\t$dataArr['game_currency'] \t= \t1000 ;\n\t\t\t\t$dataArr['created_on'] \t\t= \ttime() ;\n\t\t\t\t$dataArr['status']\t\t\t= \t$payment_status;\t\n\t\t\t\t$dataArr['post_data']\t\t\t= \t$finalString;\t\t\t\t\t\t\t\n\t\t\t\t$payment->exchangeArray($dataArr);\n\t\t\t\t$this->getPaymentTable()->savePayment($payment);\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t} else if (strcmp ($res, \"INVALID\") == 0) {\n\t\t// IPN invalid, log for manual investigation\n\t\t\t//echo \"The ponse from IPN was: <b>\" .$res .\"</b>\";\n\t\t\t\t$payment = new Payment();\n\t\t\t\t$dataArr['player_id']\t\t=\t$playerId;\n\t\t\t\t$dataArr['bank_id']\t\t\t=\t$bankId;\n\t\t\t\t$dataArr['pay_amount']\t\t=\t$payment_amount;\n\t\t\t\t$dataArr['game_currency'] \t= \t10 ;\n\t\t\t\t$dataArr['created_on'] \t\t= \ttime() ;\n\t\t\t\t$dataArr['status']\t\t\t= \t$res;\t\n\t\t\t\t$dataArr['post_data']\t\t\t= \t\"The response from IPN was: <b>\" .$res .\"</b>\";\t\t\t\t\n\t\t\t\t$payment->exchangeArray($dataArr);\n\t\t\t\n\t\t\t\t$this->getPaymentTable()->savePayment($payment);\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} \n\t\n\n\t\t\texit;\n\t\t\t$result = new ViewModel();\n\t\t\t$result->setTerminal(true);\n\t}",
"function check_ipn_response() {\n\t\t@ob_clean();\n \t\tif ( ! empty( $_POST ) && $responce = $this->check_ipn_request_is_valid() ) {\n\n\t \t\theader( 'HTTP/1.1 200 OK' );\n\t \tdo_action( \"valid-payu-standard-ipn-request\", $_POST );\n\n\t\t\tif ($responce) {\n\t\t\t\techo $responce;\n\t\t\t\t@ob_flush();\n\t\t\t}\n\n\t\t} else {\n\n\t\t\twp_die( \"PayU IPN Request Failure\" );\n\n \t\t}\n\n\t}",
"public function processIpnRequest($data)\n {\n $this->post = $data;\n \n $recurringProfile = $this->getRecurringProfile();\n\n\n if (! $recurringProfile) {\n return;\n }\n\n if (! $this->_postBack()) {\n return;\n }\n\n try {\n if (isset($this->post['txn_type'])\n && 'recurring_payment_suspended_due_to_max_failed_payment' == $this->post['txn_type']\n ) {\n if ($lastInvoiceId = $recurringProfile->saas_subscription_invoice_id) {\n $this->invoiceRepository->update([\n 'status' => 'Failed',\n ], $lastInvoiceId);\n }\n\n $this->recurringProfileRepository->update([\n 'state' => $this->paypalHelper->getProfileState($this->post['profile_status']),\n 'payment_status' => 'Failed',\n ], $recurringProfile->id);\n\n //Send email to company\n } elseif (isset($this->post['txn_type'])\n && 'recurring_payment_suspended' == $this->post['txn_type']\n ) {\n $this->recurringProfileRepository->update([\n 'state' => $this->paypalHelper->getProfileState($this->post['profile_status']),\n ], $recurringProfile->id);\n } elseif (isset($this->post['txn_type'])\n && 'recurring_payment_profile_cancel' == $this->post['txn_type']\n ) {\n $this->recurringProfileRepository->update([\n 'state' => $this->paypalHelper->getProfileState($this->post['profile_status']),\n 'next_due_date' => null,\n ], $recurringProfile->id);\n } elseif (isset($this->post['txn_type'])\n && 'recurring_payment_skipped' == $this->post['txn_type']\n ) {\n // Recurring payment skipped; it will be retried up to 3 times, 5 days apart\n $days = 0;\n\n if ($recurringProfile->payment_method != 'Skipped') {\n $days = 5;\n\n $invoice = $this->subscriptionHelper->createInvoice([\n 'recurring_profile' => $recurringProfile,\n 'saas_subscription_purchased_plan_id' => $recurringProfile->purchased_plan->id,\n 'saas_subscription_recurring_profile_id' => $recurringProfile->id,\n 'grand_total' => $recurringProfile->amount,\n 'customer_email' => $recurringProfile->company->email,\n 'customer_name' => $recurringProfile->company->username,\n 'payment_method' => 'Paypal',\n 'status' => 'Skipped',\n ]);\n \n $this->recurringProfileRepository->update([\n 'payment_status' => 'Skipped',\n 'saas_subscription_invoice_id' => $invoice->id,\n ], $recurringProfile->id);\n }\n\n //send email to company\n } elseif (isset($this->post['txn_type'])\n && 'recurring_payment' == $this->post['txn_type']\n && $this->post['payment_status'] == \"Pending\"\n ) {\n if ($recurringProfile->payment_status != 'Skipped') {\n $invoice = $this->subscriptionHelper->createInvoice([\n 'recurring_profile' => $recurringProfile,\n 'saas_subscription_purchased_plan_id' => $recurringProfile->purchased_plan->id,\n 'saas_subscription_recurring_profile_id' => $recurringProfile->id,\n 'grand_total' => $this->post['mc_gross'],\n 'customer_email' => $recurringProfile->company->email,\n 'customer_name' => $recurringProfile->company->username,\n 'payment_method' => 'Paypal',\n 'status' => 'Pending',\n 'pending_reason' => $this->post['pending_reason'],\n ]);\n } else {\n $data = [\n 'status' => 'Pending',\n 'payment_method' => 'Paypal',\n ];\n\n if (isset($this->post['pending_reason'])) {\n $data['pending_reason'] = $this->post['pending_reason'];\n }\n \n $this->invoiceRepository->update($data, $recurringProfile->saas_subscription_invoice_id);\n }\n\n $this->recurringProfileRepository->update([\n 'payment_status' => 'Pending',\n 'saas_subscription_invoice_id' => isset($invoice)\n ? $invoice->id\n : $recurringProfile->saas_subscription_invoice_id,\n ], $recurringProfile->id);\n } elseif (isset($this->post['txn_type'])\n && 'recurring_payment' == $this->post['txn_type']\n ) {\n $invoice = $this->invoiceRepository->findOneByField('transaction_id', $this->post['txn_id']);\n\n if ($invoice) {\n return;\n }\n\n $nextDueDate = $this->subscriptionHelper->getNextDueDate($recurringProfile);\n\n if ($recurringProfile->payment_status != 'Skipped'\n && $recurringProfile->payment_status != 'Pending'\n ) {\n $invoice = $this->subscriptionHelper->createInvoice([\n 'recurring_profile' => $recurringProfile,\n 'saas_subscription_purchased_plan_id' => $recurringProfile->purchased_plan->id,\n 'saas_subscription_recurring_profile_id' => $recurringProfile->id,\n 'grand_total' => $this->post['mc_gross'],\n 'cycle_expired_on' => $nextDueDate,\n 'customer_email' => $recurringProfile->company->email,\n 'customer_name' => $recurringProfile->company->username,\n 'payment_method' => 'Paypal',\n 'status' => 'Success',\n 'transaction_id' => $this->post['txn_id'],\n ]);\n } else {\n $this->invoiceRepository->update([\n 'cycle_expired_on' => $nextDueDate,\n 'status' => 'Success',\n 'payment_method' => 'Paypal',\n ], $recurringProfile->saas_subscription_invoice_id);\n }\n \n $this->recurringProfileRepository->update([\n 'next_due_date' => $nextDueDate,\n 'cycle_expired_on' => $nextDueDate,\n 'payment_status' => 'Success',\n 'saas_subscription_invoice_id' => isset($invoice)\n ? $invoice->id\n : $recurringProfile->saas_subscription_invoice_id,\n ], $recurringProfile->id);\n }\n } catch (\\Exception $e) {\n }\n }",
"function ipn()\r\n {\r\n $paypalInfo = $this->input->post(); \r\n\t\t $order_id= $paypalinfo['custom'];\r\n\t\t $payment_status=$paypalinfo['payment_status'];\r\n $paypalURL = $this->paypal_lib->paypal_url; \r\n $result = $this->paypal_lib->curlPost($paypalURL,$paypalInfo); \r\n //check whether the payment is verified\r\n if(preg_match(\"/VERIFIED/\",$result)){\r\n //insert the transaction data into the database\r\n $this->Order_model->insertTransaction($paypalInfo); \r\n }\r\n }",
"public function ipn(Request $request)\n {\n // skrill data - get more fields from Skrill Quick Checkout Integration Guide 7.9 (page 23)\n $transaction_id = $request->transaction_id;\n $mb_transaction_id = $request->mb_transaction_id;\n $invoice_id = $request->invoice_id; // custom field\n $order_from = $request->order_from; // custom fieldcle\n $customer_email = $request->customer_email; // custom field\n $biller_email = $request->pay_from_email;\n $customer_id = $request->customer_id;\n $amount = $request->amount;\n $currency = $request->currency;\n $status = $request->status;\n\n // status message\n if ($status == '-2') {\n $status_message = 'Failed';\n } else if ($status == '2') {\n $status_message = 'Processed';\n } else if ($status == '0') {\n $status_message = 'Pending';\n } else if ($status == '-1') {\n $status_message = 'Cancelled';\n }\n\n // now store data to database\n $skrill_ipn = new SkrillPayment();\n $skrill_ipn->transaction_id = $transaction_id;\n $skrill_ipn->mb_transaction_id = $mb_transaction_id;\n $skrill_ipn->invoice_id = $invoice_id;\n $skrill_ipn->order_from = $order_from;\n $skrill_ipn->customer_email = $customer_email;\n $skrill_ipn->biller_email = $biller_email;\n $skrill_ipn->customer_id = $customer_id;\n $skrill_ipn->amount = $amount;\n $skrill_ipn->currency = $currency;\n $skrill_ipn->status = $status_message;\n $skrill_ipn->created_at = Date('Y-m-d H:i:s');\n $skrill_ipn->updated_at = Date('Y-m-d H:i:s');\n $skrill_ipn->save();\n }",
"function validate_ipn($key) {\n $url_parsed = parse_url($this->paypal_url);\n\n // generate the post string from the _POST vars as well as load the\n // _POST vars into an array so we can play with them from the calling\n // script.\n $post_string = 'cmd=_notify-validate';\n foreach ($_POST as $field=>$value) {\n $this->ipn_data[\"$field\"] = $value;\n $value = urlencode(stripslashes($value));\n $value = preg_replace('/(.*[^%^0^D])(%0A)(.*)/i','${1}%0D%0A${3}',$value);\n $post_string .= '&'.$field.'='.$value;\n }\n\n // open the connection to paypal\n $fp = fsockopen($this->secure_url,443,$err_num,$err_str,30);\n if(!$fp) {\n\n // could not open the connection. If logging is on, the error message\n // will be in the log.\n $this->last_error = \"fsockopen error no. $errnum: $errstr\";\n $this->log_ipn_results($key,false);\n return false;\n\n } else {\n\n // Post the data back to paypal\n fputs($fp, \"POST \".$url_parsed['path'].\" HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: \".$url_parsed['host'].\"\\r\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n\n fputs($fp, \"Content-length: \".strlen($post_string).\"\\r\\n\\r\\n\");\n //fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $post_string . \"\\r\\n\\r\\n\");\n\n // loop through the response from the server and append to variable\n while(!feof($fp)) {\n $this->ipn_response .= fgets($fp, 1024);\n }\n fclose($fp); // close connection\n }\n\n if (stristr($this->ipn_response,\"VERIFIED\")===false){\n // Invalid IPN transaction. Check the log for details.\n $this->last_error = 'IPN Validation Failed. '.$url_parsed['host'].'\\\\'.$url_parsed['path'];\n $this->log_ipn_results($key,false);\n return false;\n }\n else{\n // Valid IPN transaction.\n\n // check recievers e-mail\n $business = basket_plus::getBasketVar(PAYPAL_ACCOUNT);\n\n if ($this->ipn_data['receiver_email']!=$business){\n $this->last_error = 'receivers e-mail did not match '.$business;\n $this->log_ipn_results($key,false);\n return false;\n }\n\n // if confirmed check message has not been received already\n if ($this->ipn_data['payment_status'] == \"Completed\"){\n\n $message = ORM::factory(\"bp_ipn_message\")\n ->where('key',\"=\",$key)\n ->where('status',\"=\",'completed')\n ->where('txn_id',\"=\",$this->ipn_data['txn_id'])->find();\n\n if ($message->loaded()){\n $this->last_error = 'Message already received.';\n $this->log_ipn_results($key,false);\n return false;\n }\n }\n\n $this->log_ipn_results($key,true);\n return true;\n }\n }"
]
| [
"0.68548805",
"0.67803526",
"0.66869235",
"0.6686835",
"0.66722584",
"0.6596693",
"0.64150566",
"0.62891674",
"0.6204293",
"0.617671",
"0.6143743",
"0.6069307",
"0.5930139",
"0.59246874",
"0.59234166",
"0.59175444",
"0.58607924",
"0.5856941",
"0.5854594",
"0.5852827",
"0.5826254",
"0.5792597",
"0.57922804",
"0.57535213",
"0.57436746",
"0.5701262",
"0.5694089",
"0.56094795",
"0.5607804",
"0.560582"
]
| 0.71464956 | 0 |
Set the Page Style for Paynow Purchase page | function edd_get_paynow_page_style() {
global $edd_options;
$page_style = 'Paynow';
if ( isset( $edd_options['paynow_page_style'] ) )
$page_style = trim( $edd_options['paynow_page_style'] );
return apply_filters( 'edd_paynow_page_style', $page_style );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function set_page_properties(&$page){\n $page->add_css($page->skin_dir.'/../allpages/style.css');\n $page->add_css($page->skin_dir.'/style.css');\n }",
"function fiorello_mikado_page_custom_style() {\n\t\t$style = apply_filters( 'fiorello_mikado_filter_add_page_custom_style', $style = '' );\n\n\t\tif ( $style !== '' ) {\n\n\t\t\tif ( fiorello_mikado_is_woocommerce_installed() && fiorello_mikado_load_woo_assets() ) {\n\t\t\t\twp_add_inline_style( 'fiorello-mikado-woo', $style );\n\t\t\t} else {\n\t\t\t\twp_add_inline_style( 'fiorello-mikado-modules', $style );\n\t\t\t}\n\t\t}\n\t}",
"function uds_pricing_styles()\n{\n\tif(!uds_pricing_is_active()) return;\n\t\n\t$dir = UDS_PRICING_URL;\n\twp_enqueue_style( 'uds-pricing', $dir.'css/pricing.css');\n\t//wp_enqueue_style('uds-pricing', $dir.'css/pricing.css', false, false, 'screen');\n}",
"public function admin_style() {\n //Welcome page\n if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'sumopaymentplans-welcome-page' ) {\n $this->enqueue_style( 'sumo-pp-admin-welcome-page' , $this->get_asset_url( 'css/sumo-pp-admin-welcome-page.css' ) ) ;\n }\n\n if ( in_array( get_post_type() , array ( 'sumo_payment_plans' , 'sumo_pp_payments' ) ) ) {\n $this->enqueue_style( 'sumo-pp-admin-dashboard' , $this->get_asset_url( 'css/sumo-pp-admin-dashboard.css' ) ) ;\n }\n }",
"public function nyp_style() {\r\n\t\tif ( get_option( 'woocommerce_nyp_disable_css', 'no' ) !== 'yes' ) {\r\n\t\t\twp_enqueue_style( 'woocommerce-nyp', WC_Name_Your_Price()->plugin_url() . '/assets/css/name-your-price.css', false, WC_Name_Your_Price()->version );\r\n\t\t\twp_style_add_data( 'woocommerce-nyp', 'rtl', 'replace' );\r\n\t\t}\r\n\t}",
"function gtpress_overrideCSS(){\r\n\t$GTTabs_options=get_option(\"GTTabs\");\r\n\t?>\r\n\t<style type=\"text/css\">\r\n\t<?php require_once(\"GTPress_css.php\"); ?>\r\n\t</style>\r\n\t<?php\r\n\r\n}",
"public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }",
"public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }",
"public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n }",
"function prfx_admin_styles(){\r\n global $typenow;\r\n if( $typenow == 'page' ) {\r\n wp_enqueue_style( 'prfx_meta_box_styles', plugin_dir_url( __FILE__ ) . '/css/meta-box-style.css' );\r\n }\r\n}",
"public static function setSiteStyling()\n {\n $styling = SiteManagement::getMetaValue('settings');\n if (!empty($styling[0]['enable_theme_color']) && $styling[0]['enable_theme_color'] == 'true') {\n if (!empty($styling[0]['primary_color'])) {\n ob_start(); ?>\n <style>\n /* Theme Text Color */\n a,\n p a,\n p a:hover,\n a:hover,\n a:focus,\n a:active,\n .wt-navigation>ul>li:hover>a,\n .wt-navigation>ul>li.current-menu-item>a,\n .wt-navarticletab li:hover a,\n .wt-navarticletab li a.active,\n .wt-categoriescontent li a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-effectivecontent li:hover a,\n .wt-articlesingle-content .wt-description .wt-blockquotevone q,\n .wt-filtertag li:hover a,\n .wt-userlisting-breadcrumb li .wt-clicksave,\n .wt-clicksave,\n .wt-qrcodefeat h3 span,\n .wt-comfollowers ul li:hover a span,\n .wt-postarticlemeta .wt-following span,\n .tg-qrcodefeat h3 span,\n .active-category {\n color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Background Color */\n .wt-btn:hover,\n .wt-dropdowarrow,\n .navbar-toggle,\n .wt-btn,\n .wt-navigationarea .wt-navigation>ul>li>a:after,\n .wt-searchbtn,\n .wt-sectiontitle:after,\n .wt-navarticletab li a:after,\n .wt-pagination ul li a:hover,\n .wt-pagination ul li.wt-active a,\n .wt-widgettag a:hover,\n .wt-articlesingle-content .wt-description blockquote span i,\n .wt-searchgbtn,\n .wt-filtertagclear a,\n .ui-slider-horizontal .ui-slider-range,\n .wt-btnsearch,\n .wt-newnoti a em,\n .wt-notificationicon>a:after,\n .wt-rightarea .wt-nav .navbar-toggler,\n .wt-usersidebaricon span,\n .wt-usersidebaricon span i,\n .wt-filtertag .wt-filtertagclear a,\n .loader:before,\n .wt-offersmessages .wt-ad:after,\n .wt-btnsendmsg,\n .wt-tabstitle li a:before,\n .wt-tabscontenttitle:before,\n .wt-tablecategories thead tr th:first-child:before,\n .wt-tablecategories tbody tr td:first-child:before,\n .wt-slidernav .wt-prev:hover,\n .wt-slidernav .wt-next:hover,\n .vb>.vb-dragger>.vb-dragger-styler,\n .wt-pagination ul li span,\n .la-banner-settings .wt-location h5:after,\n .la-section-settings .wt-location h6:after,\n .wt-forgotpassword-holder .card .card-body form .form-group button[type=submit] {\n background: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Border Color */\n input:focus,\n .select select:focus,\n .form-control:focus,\n .wt-navigation>ul>li>.sub-menu,\n .wt-pagination ul li a:hover,\n .wt-widgettag a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-filtertag li:hover a,\n .wt-filtertag .wt-filtertagclear a,\n .wt-themerangeslider .ui-slider-handle,\n .wt-clicksavebtn,\n .wt-pagination ul li.wt-active a,\n .wt-usernav>ul,\n .wt-pagination ul li span {\n border-color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* RGBA Background Color */\n .loader{\n background: <?php echo $styling[0]['primary_color'] ?>;\n background: -moz-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -webkit-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -o-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -ms-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: linear-gradient(to right, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n }\n </style>\n <?php return ob_get_clean();\n }\n }\n }",
"public function add_profile_page_styling() {\n\t\twp_enqueue_style( 'itsec-two-factor-profile-page', plugins_url( 'css/profile-page.css', __FILE__ ), array(), ITSEC_Core::get_plugin_build() );\n\n\t\t$this->load_helper();\n\t\t$this->helper->get_enabled_provider_instances();\n\t}",
"public static function header_output() {\n\t\t\tglobal $post,$lipi_theme_options;\n\t\t\techo '<style type=\"text/css\">';\n\t\t\t\n\t\t\t/********\n\t\t\t* CONDITION\n\t\t\t********/\n\t\t\t\n\t\t\t// if bbpress active\n\t\t\tif ( class_exists('bbPress') && is_bbPress() ) {\n\t\t\t\tif ( bbp_is_forum_archive() ) {\n\t\t\t\t\tlipi__bbpress_wp_default_settings();\n\t\t\t\t} else {\n\t\t\t\t\tlipi__wp_default_settings();\n\t\t\t\t}\n\t\t\t} else \n\t\t\t// If Woo Active\n\t\t\tif(function_exists(\"is_woocommerce\") && (is_shop() || is_checkout() || is_account_page())){ \n\t\t\t\tif(is_shop() ){\n\t\t\t\t\t$page_id = get_option('woocommerce_shop_page_id');\n\t\t\t\t\tlipi__woo_shop_column_css_handler();\t\t\n\t\t\t\t} elseif(is_checkout()) {\n\t\t\t\t\t$page_id = get_option('woocommerce_pay_page_id'); \n\t\t\t\t} elseif(is_account_page()) {\n\t\t\t\t\t$page_id = get_option('woocommerce_myaccount_page_id'); \n\t\t\t\t} elseif(is_account_page()) {\n\t\t\t\t\t$page_id = get_option('woocommerce_edit_address_page_id'); \n\t\t\t\t} elseif(is_account_page()) {\n\t\t\t\t\t$page_id = get_option('woocommerce_view_order_page_id'); \n\t\t\t\t}\n\t\t\t\t$woopage = get_post( $page_id );\n\t\t\t\tif( isset($woopage->ID) && $woopage->ID != '' ) lipi__page_post_customizer( $woopage->ID );\n\t\t\t\telse {}\n\t\t\t\t\n\t\t\t} else if(function_exists(\"is_product\") && is_product()){\n\t\t\t\t\n\t\t\t\tif( $lipi_theme_options['shop_header_layout'] == true ) {\n\t\t\t\t\t$page_id = get_option('woocommerce_shop_page_id');\t\n\t\t\t\t\t$woopage = get_post( $page_id );\n\t\t\t\t\tlipi__page_post_customizer( $woopage->ID );\n\t\t\t\t} else {\n\t\t\t\t\tlipi__wp_default_settings();\n\t\t\t\t\tlipi__woo_replace_default_settings();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(function_exists(\"is_product_category\") && is_product_category()) {\t\n\t\t\t\t\t\n\t\t\t\t\tlipi__wp_default_settings();\n\t\t\t\t\tlipi__woo_replace_default_settings();\n\t\t\t\t\tlipi__woo_shop_column_css_handler();\t\n\t\t\t\t\t\n\t\t\t// Normal WordPress\t\n\t\t\t} else if( is_front_page() && is_home() ) {\n\t\t\t\tlipi__wp_default_settings();\n\t\t\t} else if( is_front_page() ) {\n\t\t\t\tlipi__page_post_customizer( get_the_ID() );\n\t\t\t} else if( is_home() ) {\n\t\t\t\t$blog_pgID = get_option('page_for_posts');\n\t\t\t\tlipi__page_post_customizer( $blog_pgID );\n\t\t\t} else {\n\t\t\t\tif( is_page() ) { \n\t\t\t\t\tlipi__page_post_customizer( get_the_ID() );\n\t\t\t\t} else if( is_archive() ) {\n\t\t\t\t\tlipi__wp_default_settings();\n\t\t\t\t} else if( is_single() ) { \n\t\t\t\t\tlipi__page_post_customizer( get_the_ID() );\n\t\t\t\t} else { \n\t\t\t\t\tlipi__wp_default_settings();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/********\n\t\t\t* ONE TIME :: CALL ONLY ONCE\n\t\t\t********/\n\t\t\tlipi__check_redux_plugin_install();\n\t\t\t\n\t\t\t/********\n\t\t\t* GLOBAL :: ALWAYS THIRD LAST\n\t\t\t********/\n\t\t\tlipi__dynamic_settings();\n\t\t\t\n\t\t\t/********\n\t\t\t* GLOBAL :: ALWAYS SECOND LAST\n\t\t\t********/\n\t\t\tlipi__vc_dynamic_css();\n\t\t\t\n\t\t\t/*****\n\t\t\t* ALWAYS AT THE END LINE\n\t\t\t******/\n\t\t\tif( isset($lipi_theme_options['theme-add-extra-css-code']) && $lipi_theme_options['theme-add-extra-css-code'] != '' ) { echo esc_html($lipi_theme_options['theme-add-extra-css-code']); }\n\t\t\techo '</style>';\n\t\t}",
"public function setStyle($style) {}",
"function fsnat_settings_page() {\n\trequire_once( get_template_directory() . '/inc/templates/fsnat-custom-css.php');\n}",
"public function enqueue_styles() {\n\n\t\tif ( ! is_cart() && ! $this->is_checkout_confirmation() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\n\t\t<style>\n\t\t\t.payment_box.payment_method_braintree_paypal {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\t.payment_box.payment_method_braintree_paypal fieldset {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.wc-braintree-paypal-cancel {\n\t\t\t\tdisplay: block;\n\t\t\t\ttext-align: center;\n\t\t\t\tpadding: 15px;\n\t\t\t}\n\t\t</style>\n\n\t\t<?php\n\t}",
"public function initPage( OutputPage $out ) {\n\t\tparent::initPage( $out );\n\t\t$styles = [];\n\t\tif ( $this->getSkinOption( self::OPTION_PRINT_STYLES ) ) {\n\t\t\t$styles[] = 'skins.minerva.print.styles';\n\t\t}\n\n\t\t$out->addModuleStyles( $styles );\n\t\t$out->addJsConfigVars( $this->getSkinConfigVariables() );\n\t}",
"public function theme()\n {\n }",
"function tev_listing_success_page()\r\n{\r\n\t\r\n\t$order_id = $_REQUEST['pid'];\r\n\tglobal $page_title,$wpdb;\r\n\t\r\n\t/* add background color and image set in customizer */\r\n\tadd_action('wp_head','show_background_color');\r\n\tif(!function_exists('show_background_color'))\r\n\t{\r\n\t\tfunction show_background_color()\r\n\t\t{\r\n\t\t/* Get the background image. */\r\n\t\t\t$image = get_background_image();\r\n\t\t\t/* If there's an image, just call the normal WordPress callback. We won't do anything here. */\r\n\t\t\tif ( !empty( $image ) ) {\r\n\t\t\t\t_custom_background_cb();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t/* Get the background color. */\r\n\t\t\t$color = get_background_color();\r\n\t\t\t/* If no background color, return. */\r\n\t\t\tif ( empty( $color ) )\r\n\t\t\t\treturn;\r\n\t\t\t/* Use 'background' instead of 'background-color'. */\r\n\t\t\t$style = \"background: #{$color};\";\r\n\t\t?>\r\n\t\t\t<style type=\"text/css\">\r\n\t\t\t\tbody.custom-background {\r\n\t\t\t\t\t<?php echo trim( $style );?>\r\n\t\t\t\t}\r\n\t\t\t</style>\r\n\t\t<?php\r\n\t\t}\r\n\t}\r\n\tglobal $wpdb;\r\n\tif($_REQUEST['pid']){\r\n\t\t$post_type = get_post_type($_REQUEST['pid']);\r\n\t\t$post_type_object = get_post_type_object($post_type);\r\n\t\t$post_type_label = ( @$post_type_object->labels->post_name ) ? @$post_type_object->labels->post_name : $post_type_object->labels->singular_name ;\r\n\t}\r\n\tif(isset($_REQUEST['renew']) && $_REQUEST['renew']!=\"\")\r\n\t{\r\n\t\t$page_title = __('Renew Successfully Information','templatic');\r\n\t}elseif($_REQUEST['action']=='edit'){\r\n\t\t\r\n\t\t$page_title = $post_type_label.' '.__('Updated Successfully','templatic');\r\n\t\tif(function_exists('icl_register_string')){\r\n\t\t\t$context = get_option('blogname');\r\n\t\t\ticl_register_string($context,$post_type_label.\" Updated\",$post_type_label.\" Updated\");\r\n\t\t\t$page_tile = icl_t($context,$post_type_label.\" Updated\",$post_type_label.\" Updated\");\r\n\t\t}\r\n\t}elseif(isset($_REQUEST['upgrade']) && $_REQUEST['upgrade']!=\"\"){\r\n\t\t\tif(function_exists('icl_register_string')){\r\n\t\t\t\ticl_register_string('templatic',$post_type_label.\"success\",$post_type_label);\r\n\t\t\t\t$post_type_label = icl_t('templatic',$post_type_label.\"success\",$post_type_label);\r\n\t\t\t}\r\n\t\t\t$page_title = $post_type_label.' '.__('Upgraded Successfully','templatic');\r\n\t\r\n\t}else{\r\n\t\tif(function_exists('icl_register_string')){\r\n\t\t\ticl_register_string('templatic',$post_type_label.\"success\",$post_type_label);\r\n\t\t\t $post_type_label = icl_t('templatic',$post_type_label.\"success\",$post_type_label);\r\n\t\t\t}\r\n\t\tif($_REQUEST['pid'] && !isset($_REQUEST['action_edit']))\r\n\t\t\t$page_title = $post_type_label.' '.__('Submitted Successfully','templatic');\r\n\t\telseif(isset($_REQUEST['action_edit']))\r\n\t\t\t$page_title = $post_type_label.' '.__('Updated Successfully','templatic');\r\n\t\telse\r\n\t\t\t$page_title = $post_type_label.' '.__('Thank you for purchasing a subscription plan','templatic');\r\n\t}\r\n\t//get_header(); \r\n\t//do_action('templ_before_success_container_breadcrumb');\r\n\t\r\n\t/* Success Form Security Code */\r\n\tglobal $wpdb,$current_user;\r\n\t\r\n\t$post_sql = $wpdb->get_row($wpdb->prepare(\"select post_author,ID from $wpdb->posts where post_author = '\".$current_user->ID.\"' and ID = %d\",$_REQUEST['pid']));\r\n\tif((count($post_sql) <= 0) && (isset($_REQUEST['pid']) && $_REQUEST['pid']!='') && !$current_user)\r\n\t{ \r\n\t\t?><div class=\"large-9 small-12 columns \"><?php _e('ERROR: Sorry, you are not allowed to view this post.','templatic');?></div><?php\r\n\t}\r\n\telse{\r\n\tif(isset($_REQUEST['paydeltype']) && $_REQUEST['paydeltype']=='prebanktransfer' && @$_REQUEST['upgrade'] =='')\r\n\t{\r\n\t\t/*MAIL SENDING TO CLIENT AND ADMIN START*/\r\n\t\tglobal $payable_amount,$last_postid,$stripe_options,$wpdb,$monetization,$sql_post_id;\r\n\t\t$transaction_tabel = $wpdb->prefix.\"transactions\";\r\n\t\t$user_id = $wpdb->get_var(\"select user_id from $transaction_tabel order by trans_id DESC limit 1\");\r\n\t\t$user_id = $user_id;\r\n\t\t$sql_transaction = \"select max(trans_id) as trans_id from $transaction_tabel where user_id = $user_id and status=0 \";\r\n\t\t$sql_data = $wpdb->get_var($sql_transaction);\r\n\t\t$sql_status_update = $wpdb->query(\"update $transaction_tabel set status=0 where trans_id=$sql_data\");\r\n\t\t$get_post_id = $wpdb->get_var(\"select post_id from $transaction_tabel where trans_id=$sql_data\");\r\n\t\t$tmpdata = get_option('templatic_settings');\r\n\t\t/*$post_default_status = $tmpdata['post_default_status_paid'];*/\r\n\t\t$post_default_status = 'draft'; /* if payment method = prebank transfer no option affected - listing shold be ib draft*/\r\n\t\r\n\t\t$wpdb->query(\"UPDATE $wpdb->posts SET post_status='\".$post_default_status.\"' where ID = '\".$get_post_id.\"'\");\r\n\t\t\r\n\t\t/*$trans_status = $wpdb->query(\"update $transaction_tabel SET status = 1 where post_id = '\".$get_post_id.\"'\");*/\r\n\t\t$pmethod = 'payment_method_'.$_REQUEST['paydeltype'];\r\n\t\t$payment_detail = get_option($pmethod,true);\r\n\t\t$bankname = $payment_detail['payOpts'][0]['value'];\r\n\t\t$account_id = $payment_detail['payOpts'][1]['value'];\r\n\t\t$sql_post_id = $wpdb->get_var(\"select post_id from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\tif($sql_post_id != '' && $sql_post_id > 0)\r\n\t\t{\r\n\t\t\t$suc_post = get_post($sql_post_id);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql_post_id = $wpdb->get_var(\"select package_id from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\t\t$suc_post = get_post($sql_post_id);\r\n\t\t}\r\n\t\t$payment_date = $wpdb->get_var(\"select payment_date from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\t$sql_payable_amt = $wpdb->get_var(\"select payable_amt from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\t$payforfeatured_h = $wpdb->get_var(\"select payforfeatured_h from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\t$payforfeatured_c = $wpdb->get_var(\"select payforfeatured_c from $transaction_tabel where user_id = $user_id and trans_id=$sql_data\");\r\n\t\t$sql_payable_amt = display_amount_with_currency_plugin(number_format($sql_payable_amt,2));\r\n\t\t$post_title = $suc_post->post_title;\r\n\t\t$post_content = $suc_post->post_content;\r\n\t\t$paid_amount = display_amount_with_currency_plugin(get_post_meta($sql_post_id,'paid_amount',true));\r\n\t\t$user_details = get_userdata( $user_id );\r\n\t\t$first_name = $user_details->user_login;\r\n\t\t$last_name = $user_details->last_name;\r\n\t\t$fromEmail = get_site_emailId_plugin();\r\n\t\t$fromEmailName = get_site_emailName_plugin(); \t\r\n\t\t$toEmail = apply_filters('client_booking_success_email',$user_details->user_email,$_REQUEST['pid']);\r\n\t\t$toEmailName = apply_filters('client_booking_success_name',$first_name,$_REQUEST['pid']);\r\n\t\t$theme_settings = get_option('templatic_settings');\r\n\t\t$store_name = '<a href=\"'.home_url().'\">'.get_option('blogname').'</a>';\r\n\t\t\r\n\t\t$submiited_id = $sql_post_id;\r\n\t\t$submitted_link = '<a href=\"'.get_permalink($sql_post_id).'\">'.$suc_post->post_title.'</a>';\r\n\t\t/*\tPayment success Mail to client END\t\t*/\r\n\t\t\r\n\t\tif(isset($_REQUEST['paydeltype']) && $_REQUEST['paydeltype'] == 'prebanktransfer'){\r\n\t\t\t$client_mail_subject = apply_filters('prebanktransfer_client_subject',$theme_settings['pre_payment_success_email_subject_to_user']);\r\n\t\t\t$client_mail_content = stripslashes($theme_settings['pre_payment_success_email_content_to_user']);\r\n\t\t}else{\r\n\t\t\t$client_mail_subject = apply_filters('prebanktransfer_client_subject',$theme_settings['payment_success_email_subject_to_client']);\r\n\t\t\t$client_mail_content = stripslashes($theme_settings['user_post_submited_success_email_content']);\r\n\t\t}\r\n\t\t\r\n\t\tif(@$client_mail_subject == '')\r\n\t\t{\r\n\t\t\t$client_mail_subject = __('Thank you for your submission!','templatic');\r\n\t\t}\r\n\t\tif(@$client_mail_content == '')\r\n\t\t{\r\n\t\t\t$client_mail_content = __(\"<p>Howdy [#to_name#],</p><p>You have submitted a new listing. Here are some details about it</p><p>[#information_details#]</p><p>Thank You,<br/>[#site_name#]</p>\",'templatic');\r\n\t\t}\r\n\t\t$pay_method = \"payment_method_\".$_REQUEST['paydeltype'];\r\n\t\t$paymentupdsql = \"select option_value from $wpdb->options where option_name=%s\";\r\n\t\t$paymentupdinfo = $wpdb->get_results($wpdb->prepare($paymentupdsql,$pay_method));\r\n\t\t$paymentInfo = unserialize($paymentupdinfo[0]->option_value);\r\n\t\t$payment_method_name = $paymentInfo['name'];\r\n\t\t$payOpts = $paymentInfo['payOpts'];\r\n\t\t$bankInfo = $payOpts[0]['value'];\r\n\t\t$accountinfo = $payOpts[1]['value'];\r\n\t\t/*if($tmpdata['post_default_status_paid'] == 'publish')\r\n\t\t{\r\n\t\t\t$payment_status = __(\"Approved\",'templatic');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$payment_status = __(\"Pending\",'templatic');\r\n\t\t}*/\r\n\t\t$payment_status = __(\"Pending\",'templatic'); /* Pre bank trasfer no option should be affected payment should be pending */\r\n\t\t$payment_type = $payment_detail['name'];\r\n\t\t$orderId = $sql_post_id?$sql_post_id:mt_rand(100000, 999999);\r\n\t\t$payment_date = date_i18n(get_option('date_format'),strtotime($payment_date));\r\n\t\t$transaction_details=\"\";\r\n\t\t$transaction_details .= \"<br/>\\r\\n-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Payment Details for','templatic').\": $post_title <br/>\\r\\n\";\r\n\t\t$transaction_details .= \"-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Status','templatic').\": $payment_status <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Type','templatic').\": $payment_type <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Date','templatic').\": $payment_date <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Total Price','templatic').\": $sql_payable_amt <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Bank Name','templatic').\": $bankInfo <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Account Number','templatic').\": $accountinfo <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Reference Number','templatic').\": $sql_data <br/>\\r\\n\";\r\n\t\t$transaction_details .= \"-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t$transaction_details = $transaction_details;\r\n\t\t$client_transaction_mail_content = '<p>'.__('Thank you for your cooperation with us.','templatic').'</p>';\r\n\t\t/*$client_transaction_mail_content .= '<p>You successfully completed your payment by Pre Bank Transfer.</p>';*/\r\n\t\t$client_transaction_mail_content .= \"<p>\".__('Your submitted id is','templatic').\" : \".$sql_post_id.\"</p>\";\r\n\t\t$client_transaction_mail_content .= '<p>'.__('View more detail from','templatic').' <a href=\"'.get_permalink($sql_post_id).'\">'.$suc_post->post_title.'</a></p>';\r\n\r\n\t\t$current_user_id = $current_user->ID;\r\n\t\t\r\n\t\t$uinfo = get_userdata($current_user_id);\r\n\t\t$user_fname = $uinfo->display_name;\r\n\t\t\r\n\t\t$store_login='';\r\n\t\t$store_login_link='';\r\n\t\tif(function_exists('get_tevolution_login_permalink')){\r\n\t\t\t$store_login = '<a href=\"'.get_tevolution_login_permalink().'\">'.__('Click Login','templatic').'</a>';\r\n\t\t\t$store_login_link = get_tevolution_login_permalink();\r\n\t\t}\r\n\t\r\n\t\t$search_array = array('[#to_name#]','[#payable_amt#]','[#transaction_details#]','[#site_name#]','[#admin_email#]','[#user_login#]','[#site_login_url#]','[#site_login_url_link#]');\r\n\t\t$replace_array = array($user_fname,$sql_payable_amt,$transaction_details,$store_name,get_option('admin_email'),$toEmailName,$store_login,$store_login_link);\r\n\t\t\r\n\r\n\t\t$client_message = apply_filters('prebanktransfer_client_message',str_replace($search_array,$replace_array,$client_mail_content),$toEmailName,$fromEmailName);\r\n\t\t\r\n\t\tif(isset($_REQUEST['upgrade']) && $_REQUEST['upgrade']!=''){\r\n\t\t\r\n\t\t}else{\r\n\t\t\ttempl_send_email($fromEmail,$fromEmailName,$toEmail,$toEmailName,$client_mail_subject,$client_message,$extra='');/*/To client email*/\r\n\t\t}\r\n\t\r\n\t\t$transaction_details=\"\";\r\n\t\t$transaction_details .= \"<br/>\\r\\n-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Payment Details for','templatic').\": $post_title <br/>\\r\\n\";\r\n\t\t$transaction_details .= \"-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Status','templatic').\": $payment_status <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Type','templatic').\": $payment_type <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Date','templatic').\": $payment_date <br/>\\r\\n\";\r\n\t\t$transaction_details .= __('Total Price','templatic').\":.$sql_payable_amt <br/>\\r\\n\";\t\r\n\t\t$transaction_details .= \t__('Bank Name','templatic').\": $bankInfo <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Account Number','templatic').\": $accountinfo <br/>\\r\\n\";\r\n\t\t$transaction_details .= \t__('Reference Number','templatic').\": $sql_data <br/>\\r\\n\";\r\n\t\t$transaction_details .= \"-------------------------------------------------- <br/>\\r\\n\";\r\n\t\t/* Check psot dedault status for paid listing is publish then listing and transction will be publish and approve */\r\n\t\tif($tmpdata['post_default_status_paid']=='publish'){\r\n\t\t\t\r\n\t\t\tif($payforfeatured_h == 1 && $payforfeatured_c == 1){\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_c', 'c');\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_h', 'h');\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_type', 'both');\t\t\t\r\n\t\t\t}elseif($payforfeatured_c == 1){\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_c', 'c');\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_type', 'c');\r\n\t\t\t}elseif($payforfeatured_h == 1){\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_h', 'h');\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_type', 'h');\r\n\t\t\t}else{\r\n\t\t\t\tupdate_post_meta($_REQUEST['pid'], 'featured_type', 'none');\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* $wpdb->query(\"UPDATE $wpdb->posts SET post_status='\".$tmpdata['post_default_status_paid'].\"' where ID = '\".$_REQUEST['pid'].\"'\");\r\n\t\t\t $trans_status = $wpdb->query(\"update $transaction_tabel SET status = 1 where post_id = \".$_REQUEST['pid']); this should not be here as this is prebank transfer. We need to approve manually from backend */\r\n\t\t\t\r\n\t\t}\r\n\t\t/*Payment success Mail to admin START*/\r\n\t\t$admin_mail_subject = apply_filters('prebanktransfer_admin_subject',__('Submission pending payment','templatic'));\r\n\t\t$admin_mail_content = $theme_settings['pre_payment_success_email_content_to_admin'];\r\n\t\tif(@$admin_mail_subject == '')\r\n\t\t{\r\n\t\t\t$admin_mail_subject = __('Submission pending payment','templatic');\r\n\t\t}\r\n\t\tif(@$admin_mail_content == '')\r\n\t\t{\r\n\t\t\t$admin_mail_content = \"<p>Dear [#to_name#],</p><p>A payment from username [#user_login#] is now pending on a submission or subscription to one of your plans.</p><p>[#transaction_details#]</p><p>Thanks!<br/>[#site_name#]</p>\";\r\n\t\t}\r\n\t\t\r\n\t\t$store_login='';\r\n\t\t$store_login_link='';\r\n\t\tif(function_exists('get_tevolution_login_permalink')){\r\n\t\t\t$store_login = '<a href=\"'.get_tevolution_login_permalink().'\">'.__('Click Login','templatic').'</a>';\r\n\t\t\t$store_login_link = get_tevolution_login_permalink();\r\n\t\t}\r\n\t\t\r\n\t\t$search_array = array('[#to_name#]','[#payable_amt#]','[#transaction_details#]','[#site_name#]','[#admin_email#]','[#user_login#]','[#site_login_url#]','[#site_login_url_link#]');\r\n\t\t$replace_array = array($fromEmailName,$sql_payable_amt,$transaction_details,$store_name,get_option('admin_email'),$toEmailName,$store_login,$store_login_link);\r\n\t\t$admin_message = apply_filters('prebanktransfer_admin_message',str_replace($search_array,$replace_array,$admin_mail_content),$fromEmailName,$toEmailName);\r\n\r\n\t\tif(isset($_REQUEST['upgrade']) && $_REQUEST['upgrade']!=''){\r\n\t\t\r\n\t\t}else{\r\n\t\t\ttempl_send_email($fromEmail,$fromEmailName,$fromEmail,$fromEmailName,$admin_mail_subject,$admin_message,$extra='');/* To admin email*/\r\n\t\t}\r\n\t\t\r\n\t\t/*Payment success Mail to admin FINISH*/\r\n\t}\r\n\t\r\n\t$amout= intval(get_post_meta($_REQUEST['pid'],'total_price',true));\r\n\tif($amout=='0' || $amout==''){\r\n\t\t\r\n\t\tglobal $wpdb;\r\n\t\t$transaction_tabel = $wpdb->prefix.\"transactions\";\r\n\t\t$tmpdata = get_option('templatic_settings');\r\n\t\t\r\n\t\tif($_SESSION['custom_fields']['last_selected_pkg'])\r\n\t\t{\r\n\t\t\t$get_last_trans_status = $wpdb->get_var(\"select status from $transaction_tabel t where post_id='\".$_SESSION['custom_fields']['user_last_postid'].\"' AND (t.package_type is NULL OR t.package_type=0) order by t.trans_id desc\");\r\n\t\t\tif($get_last_trans_status==2){\r\n\t\t\t\t$get_last_trans_status=0;\r\n\t\t\t}\r\n\t\t\tif(@$get_last_trans_status !='')\r\n\t\t\t\t$trans_status = $wpdb->query($wpdb->prepare(\"update $transaction_tabel SET status = \".$get_last_trans_status.\" where post_id = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$post_default_status = $tmpdata['post_default_status'];\r\n\t\t\t\r\n\t\t\t/* make status for subscription packages' listings status as per \"Default status for paid submissions\" from tevolution setting */\r\n\t\t\t$post_default_status_paid = $tmpdata['post_default_status_paid'];\r\n\t\t\t\r\n\t\t\t$transaction_tabel = $wpdb->prefix . \"transactions\";\r\n\t\t\t\r\n\t\t\tif(isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')\r\n\t\t\t\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t$transaction_details = $wpdb->get_results(\"SELECT * FROM $transaction_tabel where post_id = \".$_REQUEST['pid'].\" AND user_id=\".$current_user->ID.\" order by trans_id DESC LIMIT 1\");\r\n\r\n\t\t\t\t$selected_package_id = $transaction_details[0]->package_id;\r\n\t\t\t\t$package_amount = get_post_meta($selected_package_id,'package_amount',true);\r\n\t\t\t\t$package_type = get_post_meta($selected_package_id,'package_type',true);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif($package_type == 2 && $package_amount > 0){\r\n\t\t\t\t\t$wpdb->query(\"UPDATE $wpdb->posts SET post_status='\".$post_default_status_paid.\"' where ID = '\".wp_kses_post($_REQUEST['pid']).\"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* subscription packages' listings status end */\r\n\t\t\t\r\n\t\t\tif($tmpdata['post_default_status']=='publish' && !isset($_SESSION['custom_fields']['last_selected_pkg']) && $_SESSION['custom_fields']['last_selected_pkg'] == '' && (!isset($_REQUEST['upgrade']) && $_REQUEST['upgrade'] != 1) && (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')){\r\n\t\t\t\tif($amout == 0 && isset($_REQUEST['renew']) && $_REQUEST['renew'] ==1){\r\n\t\t\t\t\t$post_status = $tmpdata['post_default_status'];\r\n\t\t\t\t\t$post_default_status= ($post_status)? $post_status : 'draft';\r\n\t\t\t\t}elseif($amout > 0 && isset($_REQUEST['renew']) && $_REQUEST['renew'] ==1){\r\n\t\t\t\t\t$post_status = $tmpdata['post_default_status_paid'];\r\n\t\t\t\t\t$post_default_status= ($post_status)? $post_status : 'draft';\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif($post_default_status != 'publish'){\r\n\t\t\t\t\t\t$trans_status = $wpdb->query($wpdb->prepare(\"update $transaction_tabel SET status = 0 where post_id = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE $wpdb->posts SET post_status='\".$post_default_status.\"' where ID = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$trans_status = $wpdb->query($wpdb->prepare(\"update $transaction_tabel SET status = 1 where post_id = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE $wpdb->posts SET post_status='\".$post_default_status.\"' where ID = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$trans_status = $wpdb->query($wpdb->prepare(\"update $transaction_tabel SET status = 1 where post_id = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE $wpdb->posts SET post_status='\".$post_default_status.\"' where ID = %d\",wp_kses_post($_REQUEST['pid'])));\r\n\t\t\t}elseif(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){\r\n\t\t\t\t/* If the transaction status of the listing is \"Approved\" at backed and if you edit the listing from the front end, after editing the listing if you check the transaction status of that listing it is showing \"-\" if should be \"Approved\" */\r\n\t\t\t\t$status = 0;\r\n\t\t\t\tif(get_post_status( $_REQUEST['pid'] ) == 'publish' || $package_type == 2){\r\n\t\t\t\t\t$status = 1;\r\n\t\t\t\t}\r\n\t\t\t\t$trans_status = $wpdb->query(\"update $transaction_tabel SET status = $status where post_id = \".wp_kses_post($_REQUEST['pid']));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tglobal $wpdb;\r\n\t?>\t\t\r\n\t<style type=\"text/css\">\r\n\t.hentry .entry-title {\r\n\t display: none;\r\n\t}\r\n\t</style>\r\n\t\t\t<div class=\"large-9 small-12 columns <?php echo stripslashes(get_option('ptthemes_sidebar_left')); ?>\">\r\n\t\t\t <h1 class=\"page-title\"><?php echo $page_title; ?></h1>\r\n\t\t\t <div class=\"posted_successful\">\r\n\t\t\t <?php\r\n\t\t\t\tdo_action('tevolution_before_submition_success_msg');\r\n\t\t\t\tdo_action('tevolution_submition_success_msg');\r\n\t\t\t\tdo_action('tevolution_after_submition_success_msg');\r\n\t\t\t ?> \r\n\t\t\t</div>\r\n\t\t\t <?php if(!isset($_REQUEST['upgrade']) && $_REQUEST['upgrade'] =='' && (isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''))\r\n\t\t\t\t{\r\n\t\t\t\t\tdo_action('tevolution_submition_success_post_content'); \r\n\t\t\t\t}?>\r\n\t\t\t</div> <!-- content #end -->\r\n\t<?php \r\n\t}\r\n\t\tif(isset($_REQUEST['pid']) && $_REQUEST['pid']!=\"\"){\r\n\t\t\t$ptype = $wpdb->get_var($wpdb->prepare(\"select post_type from $wpdb->posts where $wpdb->posts.ID = %d\",$_REQUEST['pid']));\r\n\t\t\t$cus_post_type = apply_filters('success_page_sidebar_post_type',$ptype);\r\n\t\t}\r\n\t\r\n\t}",
"public static function getPageStyle()\n {\n return ( isset( $_COOKIE['styleDefCon'] ) && in_array( $_COOKIE['styleDefCon'], self::$pageStyles ) )\n ? $_COOKIE['styleDefCon']\n : self::$pageStyles[0];\n }",
"function mixtape_qodef_woocommerce_body_class( $classes ) {\n\t\tif(mixtape_qodef_is_woocommerce_page()) {\n\t\t\t$classes[] = 'qodef-woocommerce-page';\n\t\t\tif (is_singular('product')) {\n\t\t\t\t$classes[] = 'qodef-woocommerce-single-page';\n\t\t\t}\n\t\t}\n\t\treturn $classes;\n\t}",
"function receipt_page($order) {\n echo '<p>' . __('Gracias! - Tu orden ahora está pendiente de pago. Deberías ser redirigido automáticamente a la página de transbank.') . '</p>';\n\n echo $this->generate_webpayplus_form($order);\n }",
"public function pageBudgetmailer()\n {\n print new Template( 'options' );\n }",
"function wv_add_woocommerce_classs($classes) {\n $classes[] = \"woocommerce woocommerce-page\";\n return $classes;\n }",
"public function add_styles() {\n\n\t\t\t$current_page = isset( $_GET['page'] ) ? $_GET['page'] : null;\n\t\t\t$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : null;\n\n\t\t\t$page_ID = $this->translate_name_to_id( $this->page );\n\t\t\t$tab_ID = $this->translate_name_to_id( $this->tab );\n\t\t\t$settings_tab_ID = $this->translate_name_to_id( $this->settings_tab );\n\n\t\t\t// Only add style if on extension tab or on extension settings tab\n\t\t\tif ( ( $current_page == $page_ID && $current_tab == $tab_ID )\n\t\t\t || ( $current_page == 'cd_settings' && $current_tab == $settings_tab_ID )\n\t\t\t || ( $current_page == 'cd_account' && $current_tab == 'activity' )\n\t\t\t) {\n // Add stylesheet from this plugin\n\t\t\t\twp_enqueue_style( \"$this->ID-style\" );\n\n // Add Stream stuff\n wp_enqueue_style( 'wp-stream-admin', WP_STREAM_URL . 'ui/css/admin.css', array(), WP_Stream::VERSION );\n wp_enqueue_script( 'select2' );\n wp_enqueue_style( 'select2' );\n\n wp_enqueue_script( 'timeago' );\n wp_enqueue_script( 'timeago-locale' );\n\n wp_enqueue_script( 'wp-stream-admin', WP_STREAM_URL . 'ui/js/admin.js', array( 'jquery', 'select2' ), WP_Stream::VERSION );\n wp_enqueue_script( 'wp-stream-live-updates', WP_STREAM_URL . 'ui/js/live-updates.js', array( 'jquery', 'heartbeat' ), WP_Stream::VERSION );\n wp_localize_script(\n 'wp-stream-admin',\n 'wp_stream',\n array(\n 'i18n' => array(\n 'confirm_defaults' => __( 'Are you sure you want to reset all site settings to default? This cannot be undone.', 'stream' ),\n ),\n 'gmt_offset' => get_option( 'gmt_offset' ),\n )\n );\n wp_localize_script(\n 'wp-stream-live-updates',\n 'wp_stream_live_updates',\n array(\n 'current_screen' => $current_page,\n 'current_page' => $current_page,\n 'current_order' => isset( $_GET['order'] ) ? esc_js( $_GET['order'] ) : 'desc',\n 'current_query' => json_encode( $_GET ),\n )\n );\n }\n\t\t}",
"function eca_manage_woocommerce_styles(){\n\n\t//global $post;\n\t//$slug = get_post( $post )->post_name;\n\n\t//if($slug == 'my-account'){\n\twp_enqueue_style('eca-woocommerce-custom', constant( 'EVERSION_PLUGIN_URL' ).'woocommerce-custom.css', '', '1.01');\n\t//}\n}",
"function wpc_client_body_class_for_clientpages( $classes ) {\r\n global $post;\r\n\r\n if ( is_single() && 'clientspage' == $post->post_type ) {\r\n $page_template = get_post_meta( $post->ID, '_wp_page_template', true );\r\n\r\n if ( !$page_template || '__use_same_as_portal_page' == $page_template ) {\r\n $wpc_settings = get_option( 'wpc_settings' );\r\n if ( isset( $wpc_settings['pages']['portal_page_id'] ) && 0 < $wpc_settings['pages']['portal_page_id'] ) {\r\n $page_template = get_post_meta( $wpc_settings['pages']['portal_page_id'], '_wp_page_template', true );\r\n }\r\n }\r\n\r\n if ( 'page-templates/full-width.php' == $page_template )\r\n $classes[] = 'full-width';\r\n\r\n }\r\n\r\n return $classes;\r\n\r\n }",
"function eltdf_core_set_single_portfolio_style($style) {\n\t\t$id = mrseo_elated_get_page_id();\n\t\t$class_prefix = mrseo_elated_get_unique_page_class($id);\n\t\t\n\t\t$current_styles = '';\n\t\t$current_style = array();\n\t\t\n\t\t$current_selector = array(\n\t\t\t$class_prefix . ' .eltdf-portfolio-single-holder .eltdf-ps-info-holder'\n\t\t);\n\t\t\n\t\t$info_padding_top = get_post_meta($id, 'portfolio_info_top_padding', true);\n\t\t\n\t\tif(!empty($info_padding_top)) {\n\t\t\t$current_style['padding-top'] = mrseo_elated_filter_px($info_padding_top).'px';\n\t\t\t\n\t\t\t$current_styles .= mrseo_elated_dynamic_css($current_selector, $current_style);\n\t\t}\n\t\t\n\t\t$current_style = $current_styles . $style;\n\t\t\n\t\treturn $current_style;\n\t}",
"function admin_print_styles() {\r\n global $wpi_settings, $current_screen;\r\n\r\n wp_enqueue_style('wpi-custom-jquery-ui');\r\n wp_enqueue_style('wpi-admin-css');\r\n\r\n //** Prints styles specific for this page */\r\n wp_enqueue_style('wpi-this-page-css');\r\n wp_enqueue_style('wpi-ie7');\r\n }",
"function create_checkout_page() {\r\n\t\tglobal $current_site;\r\n\r\n\t //insert new page if not existing\r\n\t switch_to_blog( $current_site->blog_id );\r\n\t\t$page = get_post( $this->get_setting('checkout_page') );\r\n\t\tif ( !$page || $page->post_status == 'trashed' ) {\r\n\t $id = wp_insert_post( array('post_title' => $this->get_setting('rebrand'), 'post_status' => 'publish', 'post_type' => 'page', 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_content' => stripslashes(get_site_option('supporter_message'))) );\r\n\t\t\t$this->update_setting('checkout_page', $id);\r\n\t\t\t$this->update_setting('checkout_url', get_permalink($id));\r\n\t } else {\r\n\t\t\t$this->update_setting('checkout_url', get_permalink($this->get_setting('checkout_page')));\r\n\t\t}\r\n\t restore_current_blog();\r\n\t}"
]
| [
"0.5810297",
"0.5709264",
"0.56602395",
"0.548402",
"0.5387613",
"0.5381922",
"0.53450555",
"0.53450555",
"0.53161293",
"0.52960855",
"0.52850634",
"0.5261284",
"0.52545434",
"0.52000797",
"0.5161405",
"0.5146508",
"0.5127157",
"0.51163375",
"0.5094041",
"0.50908095",
"0.5083658",
"0.5082824",
"0.5071286",
"0.5066696",
"0.50657505",
"0.5046286",
"0.50316155",
"0.50138795",
"0.5008834",
"0.49794978"
]
| 0.67487097 | 0 |
Shows "Purchase Processing" message for Paynow payments are still pending on site return This helps address the Race Condition, as detailed in issue 1839 | function edd_paynow_success_page_content( $content ) {
if ( ! isset( $_GET['payment-id'] ) && ! edd_get_purchase_session() ) {
return $content;
}
$payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false;
if ( ! $payment_id ) {
$session = edd_get_purchase_session();
$payment_id = edd_get_purchase_id_by_key( $session['purchase_key'] );
}
$payment_id = get_post( $payment_id );
if ( $payment_id && 'pending' == $payment->post_status ) {
// Payment is still pending so show processing indicator to fix the Race Condition, issue #
ob_start();
edd_get_template_part( 'payment', 'processing' );
$content = ob_get_clean();
}
return $content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function dsf_protx_release_order($order_number){\n\nglobal $ReleaseURL, $Verify, $ProtocolVersion;\n\n\n// validate a protx direct item.\n $protx_query = dsf_db_query(\"select orders_id, vendortxcode, vpstxid, securitykey, txauthno from \" . DS_DB_SHOP . \".protx_direct_responses where orders_id='\" . (int)$order_number . \"'\");\n \n if (dsf_db_num_rows($protx_query) == 0){\n \n \t$problem_text = 'Order number ' . $order_number . ' has been marked as released however its' . \"\\n\";\n\t$problem_text .= 'transaction details can not be found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'If this is a valid protx direct payment order, please release the item manually';\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'Protx Item not Found';\n\tbreak;\n\t\n \t// not a protx order\n }elseif (dsf_db_num_rows($protx_query) > 1){\n \t// more than one item is listed - this is an error.\n \t$problem_text = 'Order number ' . $order_number . ' has been marked as released however there are' . \"\\n\";\n\t$problem_text .= 'more than one transaction item found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'Please release the item manually and check the logs to see why there is more' . \"\\n\";\n\t$problem_text .= 'than one transaction item.' . \"\\n\";\n\t\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'More than one protx item found';\n\tbreak;\n }\n \t\n\n\t$protx_user_account_number = MODULE_PAYMENT_PROTXCC_ID;\n\n// #########################\n\n\n\n\n\n // we must have a valid transaction item if we are here, get the array of items.\n \n $protx_items = dsf_db_fetch_array($protx_query);\n \n$TargetURL = $ReleaseURL;\n$VerifyServer = $Verify;\n\n// echo 'URL = ' . $TargetURL;\n$data = array (\n\t\t'VPSProtocol' => $ProtocolVersion, \t\t\t\t\t\t\t// Protocol version (specified in init-includes.php)\n\t\t'TxType' => 'RELEASE',\t\t\t\t\t\t\t\t\t\t\t\t\t// Transaction type \n\t\t'Vendor' => $protx_user_account_number,\t\t\t\t\t\t\t\t\t// Vendor name (specified in init-protx.php)\n\t\t'VendorTxCode' => $protx_items['vendortxcode'],\t\t\t\t\t// Unique refund transaction code (generated by vendor)\n\t\t'VPSTxId' => $protx_items['vpstxid'],\t\t\t\t\t\t\t\t\t\t// VPSTxId of order\n\t\t'SecurityKey' => $protx_items['securitykey'],\t\t\t\t\t\t// Security Key\n\t\t'TxAuthNo' => $protx_items['txauthno']\t\t\t\t\t\t\t\t\t// Transaction authorisation number\n\t);\n\n// Format values as url-encoded key=value pairs\n$data = formatData($data);\n\n$response ='';\n\n$response = requestPost($TargetURL, $data);\n\n$baseStatus = array_shift(split(\" \",$response[\"Status\"]));\n\nswitch($baseStatus) {\n\n\tcase 'OK':\n\t\n\t// payment has been released witin protx.\n\t\t\n\t\t// update the orders status\n\t\t\t\t\t\t\n\t\t$sql_data_array = array('orders_status' => '13');\n\t\tdsf_db_perform(DS_DB_SHOP . \".orders\",$sql_data_array,'update','orders_id=' . $order_number);\n\n\n\t// update status history.\n\t\t $sql_data_array = array('orders_id' => $order_number, \n\t\t\t\t\t\t\t\t 'orders_status_id' => '13', \n\t\t\t\t\t\t\t\t 'date_added' => 'now()');\n\t\t dsf_db_perform(DS_DB_SHOP . \".orders_status_history\", $sql_data_array);\n\n\t// log the reply.\n\t\t\n\t\t$write_notes = dsf_protx_shop_notes($order_number, \"RELEASE STATUS = OK\\n\");\n\n\t\treturn 'Complete';\n\t\tbreak;\n\t\n\t\n\t\n\t// all other cases\n\tcase 'MALFORMED':\n\tcase 'INVALID':\n\tcase 'ERROR':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as released however a problem' . \"\\n\";\n\t$problem_text .= 'has been returned from Protx, the error is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, \"RELEASE STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\tcase 'FAIL':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'with communication from Protx has occured, the error (if available) is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\t} // end of switch.\n\nreturn $response;\n}",
"public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }",
"public function processPayment(){\r\n return true;\r\n }",
"function dsf_protx_decline_order($order_number){\n\nglobal $VoidURL, $AbortURL, $Verify, $ProtocolVersion;\n\n// validate a protx direct item.\n $protx_query = dsf_db_query(\"select orders_id, vendortxcode, vpstxid, securitykey, txauthno from \" . DS_DB_SHOP . \".protx_direct_responses where orders_id='\" . (int)$order_number . \"'\");\n \n if (dsf_db_num_rows($protx_query) == 0){\n \n \t$problem_text = 'Order number ' . $order_number . ' has been marked as declined however its' . \"\\n\";\n\t$problem_text .= 'transaction details can not be found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'If this is a valid protx direct payment order, please decline the item manually';\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'invalid protx item';\n\tbreak;\n\t\n \t// not a protx order\n }elseif (dsf_db_num_rows($protx_query) > 1){\n \t// more than one item is listed - this is an error.\n \t$problem_text = 'Order number ' . $order_number . ' has been marked as declined however there are' . \"\\n\";\n\t$problem_text .= 'more than one transaction item found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'Please decline the item manually and check the logs to see why there is more' . \"\\n\";\n\t$problem_text .= 'than one transaction item.' . \"\\n\";\n\t\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'more than one protx item found';\n\tbreak;\n }\n \t\n\n // we must have a valid transaction item if we are here.\n \n // we therefore need to check our logs to see if the item has been previously charged.\n \n $check_history_query = dsf_db_query(\"select orders_id, orders_status_id from \" . DS_DB_SHOP . \".orders_status_history where orders_id='\" . $order_number . \"' and orders_status_id='90006'\");\n \n if (dsf_db_num_rows($check_history_query)==0){\n \t$TargetURL = $AbortURL; // never charged.\n\t$TxType = 'ABORT';\n }else{\n \t$TargetURL = $VoidURL; // has been charged\n\t$TxType = 'VOID';\n }\n \n \n \n $protx_items = dsf_db_fetch_array($protx_query);\n \n$VerifyServer = $Verify;\n\n\t$protx_user_account_number = MODULE_PAYMENT_PROTXCC_ID;\n\n// #########################\n\n\n\n\n$data = array (\n\t\t'VPSProtocol' => $ProtocolVersion, \t\t\t\t\t\t\t// Protocol version (specified in init-includes.php)\n\t\t'TxType' => $TxType,\t\t\t\t\t\t\t\t\t\t\t\t\t// Transaction type \n\t\t'Vendor' => $protx_user_account_number,\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Vendor name (specified in init-protx.php)\n\t\t'VendorTxCode' => $protx_items['vendortxcode'],\t\t\t\t\t// Unique refund transaction code (generated by vendor)\n\t\t'VPSTxId' => $protx_items['vpstxid'],\t\t\t\t\t\t\t\t\t\t// VPSTxId of order\n\t\t'SecurityKey' => $protx_items['securitykey'],\t\t\t\t\t\t// Security Key\n\t\t'TxAuthNo' => $protx_items['txauthno']\t\t\t\t\t\t\t\t\t// Transaction authorisation number\n\t);\n\n// Format values as url-encoded key=value pairs\n$data = formatData($data);\n\n$response = requestPost($TargetURL, $data);\n\n$baseStatus = array_shift(split(\" \",$response[\"Status\"]));\n\nswitch($baseStatus) {\n\n\tcase 'OK':\n\t\n\t// payment has been voided / aborted witin protx.\n\n\n\t\t// update the orders status\n\t\t\t\t\t\t\n\t\t$sql_data_array = array('orders_status' => '50005');\n\t\tdsf_db_perform(DS_DB_SHOP . \".orders\",$sql_data_array,'update','orders_id=' . $order_number);\n\n\n\t// update status history.\n\t\t $sql_data_array = array('orders_id' => $order_number, \n\t\t\t\t\t\t\t\t 'orders_status_id' => '50005', \n\t\t\t\t\t\t\t\t 'date_added' => 'now()');\n\t\t dsf_db_perform(DS_DB_SHOP . \".orders_status_history\", $sql_data_array);\n\n\t\t\n\t// log the reply.\n\t\t\n\t\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = OK\\n\");\n\n\t\treturn 'Complete';\n\t\tbreak;\n\t\n\t\n\t\n\t// all other cases except failed\n\tcase 'MALFORMED':\n\tcase 'INVALID':\n\tcase 'ERROR':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'has been returned from Protx, the error is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\tcase 'FAIL':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'with communication from Protx has occured, the error (if available) is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\t} // end of switch.\n\nreturn 'error';\n}",
"public function hookPaymentReturn()\n {\n }",
"function _wpsc_paycoingateway_return() {\n\n if ( !isset( $_REQUEST['wpsc_paycoingateway_return'] ) ) {\n return;\n }\n\n // paycoingateway order param interferes with wordpress\n unset($_REQUEST['order']);\n unset($_GET['order']);\n\n if (! isset( $_REQUEST['sessionid'] ) ) {\n return;\n }\n\n global $sessionid;\n\n $purchase_log = new WPSC_Purchase_Log( $_REQUEST['sessionid'], 'sessionid' );\n\n if ( ! $purchase_log->exists() || $purchase_log->is_transaction_completed() )\n return;\n\n $status = 1;\n\n if ( isset( $_REQUEST['cancelled'] ) ) {\n # Unsetting sessionid to show error\n do_action('wpsc_payment_failed');\n $sessionid = false;\n unset ( $_REQUEST['sessionid'] );\n unset ( $_GET['sessionid'] );\n } else {\n $status = WPSC_Purchase_Log::ORDER_RECEIVED;\n $purchase_log->set( 'processed', $status );\n $purchase_log->save();\n wpsc_empty_cart();\n }\n\n}",
"public function confirm() {\n if($this->request->server['REQUEST_METHOD'] == 'POST')\n {\n $order_id = $this->request->post['order_id'];\n\t\t\t\t\n\t\t\t\t$this->load->language('payment/paynow');\n\n $this->load->model('payment/paynow');\n $paynowInfo = $this->model_payment_paynow->getPaynowInfo($order_id);\n\n if($paynowInfo)\n {\n \t\n\t\t\t\t\t//close connection\n $msg = $this->request->post;\n\n $MerchantKey = $this->config->get('paynow_config_merchant_key');\n $validateHash = $this->CreateHash($msg, $MerchantKey);\n if($validateHash != $msg[\"hash\"]){\n $data['text_message'] = \"Paynow reply hashes do not match : \" . $validateHash . \" - \" . $msg[\"hash\"];\n }\n else\n {\n $this->model_payment_paynow->update($order_id\n , $paynowInfo['resulturl']\n , $msg[\"pollurl\"]\n , $msg[\"paynowreference\"]\n , $msg[\"amount\"]\n , $msg[\"status\"]\n );\n $this->load->model('checkout/order');\n\n if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_created_but_not_paid')){\n //$data['text_message'] = \"Transaction has not yet been paid on Paynow.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_cancelled')){\n //$data['text_message'] = \"Transaction was cancelled by the user. You will be redirected back to the checkout page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&', '&', $this->url->link('checkout/checkout'));\n $order = $this->model_checkout_order->getOrder($order_id);\n if($order[\"order_status_id\"] != 7){\n $this->model_checkout_order->confirm($order_id, 7, \"Cancelled by user.\", true);\n }\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_failed')){\n //$data['text_message'] = \"Transaction payment has failed on Paynow. You can still resume the payment.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_paid') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_awaiting_delivery') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_delivered')){\n //$data['text_message'] = \"Transaction Paid Successfully. You will be redirected to a confirmation page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&', '&', $this->url->link('checkout/success'));\n $order = $this->model_checkout_order->getOrder($order_id);\n\t\t\t\t\t\t\t$this->setClassData();\n\n if($order[\"order_status_id\"] != $this->final_order_status){\n $this->model_checkout_order->confirm($order_id, $this->final_order_status, \"Paynow ID: \" . $msg[\"PaynowReference\"], true);\n }\n }\n else {\n //$data['text_message'] = \"Invalid status in from Paynow, cannot continue.\";\n }\n }\n }\n else\n {\n //$data['text_message'] = \"Could not update order info from Paynow.\";\n }\n }\n else\n {\n //$data['text_message'] = \"paynow order info not found.\";\n }\n\t}",
"public function pendingAction()\n {\n $this->_layout->nav = 'payDue';\n }",
"public function isUnderpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNDERPAID;\n }",
"function appthemes_bank_transfer_pending_email( $post ) {\n\n\t$content = '';\n\n\t$content .= html( 'p', __( 'A new order is waiting to be processed. Once you receive payment, you should mark the order as completed.', APP_TD ) );\n\n\t$order_link = html_link( get_edit_post_link( $post ), __( 'Review this order', APP_TD ) );\n\n\t$all_orders = html_link(\n\t\tadmin_url( 'edit.php?post_status=tr_pending&post_type=transaction' ),\n\t\t__( 'review all pending orders', APP_TD ) );\n\n\t// translators: <Single Order Link> or <Link to All Orders>\n\t$content .= html( 'p', sprintf( __( '%1$s or %2$s', APP_TD ), $order_link, $all_orders ) );\n\n\t$blogname = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );\n\n\t$subject = sprintf( __( '[%1$s] Pending Order #%2$d', APP_TD ), $blogname, $post->ID );\n\n\tif( ! function_exists( 'appthemes_send_email' ) )\n\t\treturn false;\n\n\t$email = array( 'to' => get_option( 'admin_email' ), 'subject' => $subject, 'message' => $content );\n\t$email = apply_filters( 'appthemes_email_admin_bt_pending', $email, $post );\n\n\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n}",
"public function sellerConfirm() {\n\t\tLog::info ( 'Seller has confirmed the payment:' . $this->user_pk, array (\n\t\t\t\t'c' => '1' \n\t\t) );\n\t\tif (isset ( $_POST ['time'] ) && $_POST ['time'] != '') {\n\t\t\t$timePeriod = $_POST ['time'];\n\t\t\t$subscriptionStartsAt = date ( 'Y-m-d H:i:s' );\n\t\t\t$subscriptionEndsAt = '';\n\t\t\t\n\t\t\tif ($timePeriod == 'quarterPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+3 months' ) );\n\t\t\t} else if ($timePeriod == 'halfannualPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+6 months' ) );\n\t\t\t} else if ($timePeriod == 'annualPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+1 years' ) );\n\t\t\t} else if ($timePeriod == 'phantomPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+5 years' ) );\n\t\t\t} else if ($timePeriod == 'freeTrail') {\n\t\t\t\t$subscriptionEndsAt = date(\"2016-12-31 00:00:00\");\n\t\t\t}\n\t\t\t\n\t\t\t$userRecord = \\DB::table ( 'users' )->where ( 'id', '=', $this->user_pk )->first ();\n\t\t\t$is_business = $userRecord->is_business;\n\t\t\t\n\t\t\t// add subscription start and end date to seller\n\t\t\t$subscription = ThankyouController::addSubscription ( $subscriptionStartsAt, $subscriptionEndsAt, $is_business );\n\t\tif($subscription==1){\n\t\t\tCommonComponent::activityLog ( \"SELLER_CONFIRM_PAYMENT\", SELLER_CONFIRM_PAYMENT, 0, HTTP_REFERRER, CURRENT_URL );\n\t\t\t$stored_uid = $this->user_pk;\n\t\t\t\t\n\t\t\ttry{\n\t\t\t\tif(isset(Auth::User()->lkp_role_id) && (Auth::User()->lkp_role_id == '1')){\n\t\t\t\t\t\n\t\t\t\t\tDB::table ( 'users' )->where ( 'id', $this->user_pk )->update ( array (\n\t\t\t\t\t'is_active' => 1,\n\t\t\t\t\t'is_confirmed' => 1,\n\t\t\t\t\t'is_approved' => 1,\n\t\t\t\t\t'secondary_role_id'=>'2',\n\t\t\t\t\t'is_buyer_paid'=>1,\n\t\t\t\t\t'mail_sent' => 1\n\t\t\t\t\t) );\n\t\t\t\t\tSession::put('last_login_role_id','2');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\tDB::table ( 'users' )->where ( 'id', $this->user_pk )->update ( array (\n\t\t\t'lkp_role_id' => 2,\n\t\t\t'is_active' => 1,\n\t\t\t'is_confirmed' => 1,\n\t\t\t'is_approved' => 1,\n\t\t\t'is_buyer_paid'=>1,\n\t\t\t'mail_sent' => 1\n\t\t\t) );\n\t\t\t\t}\n\t\t\t}catch(Exception $ex){\n\t\t\t}\n\t\t\t// Information email to seller after payment\n\t\t\t\t\n\t\t\t$userData = DB::table ( 'users' )->where ( 'id', $this->user_pk )->select ( 'users.*' )->get ();\n\t\t\t\t\n\t\t\tCommonComponent::send_email ( SELLER_PAYMENT_INFO_MAIL, $userData );\n\t\t\t\n\t\t}\n\t\t\t\n\t\t}\n\t}",
"function mark_as_paid() {\n if (!$this->active_invoice->isLoaded()) {\n $this->response->notFound();\n } // if\n\n if($this->active_invoice->isNew()) {\n $this->response->notFound();\n } // if\n\n if(!$this->active_invoice->canEdit($this->logged_user)) {\n $this->response->forbidden();\n } // if\n\n try{\n if($this->request->isAsyncCall()) {\n $this->active_invoice->setStatus(INVOICE_STATUS_PAID);\n $this->active_invoice->save();\n $this->response->respondWithData($this->active_invoice, array(\n 'as' => 'invoice',\n 'detailed' => true,\n ));\n } else {\n $this->response->badRequest();\n } //if\n } catch (Exception $e) {\n $this->response->exception($e);\n } //try\n }",
"public function notifyPayment()\n {\n }",
"public function check_cointopay_response() {\n\t\t\tglobal $woocommerce;\n\t\t\t$woocommerce->cart->empty_cart();\n\t\t\t$orderid = ( !empty(intval($_REQUEST['CustomerReferenceNr'])) ) ? intval($_REQUEST['CustomerReferenceNr']) : 0;\n\t\t\t$ordstatus = ( !empty(sanitize_text_field($_REQUEST['status'])) ) ? sanitize_text_field($_REQUEST['status']) : '';\n\t\t\t$ordtransactionid = ( !empty(sanitize_text_field($_REQUEST['TransactionID'])) ) ? sanitize_text_field($_REQUEST['TransactionID']) : '';\n\t\t\t$ordconfirmcode = ( !empty(sanitize_text_field($_REQUEST['ConfirmCode'])) ) ? sanitize_text_field($_REQUEST['ConfirmCode']) : '';\n\t\t\t$notenough = ( isset($_REQUEST['notenough']) ) ? intval($_REQUEST['notenough']) : '';\n\n\t\t\t$order = new WC_Order($orderid);\n\t\t\t$data = array(\n\t\t\t\t'mid' => $this->merchantid,\n\t\t\t\t'TransactionID' => $ordtransactionid,\n\t\t\t\t'ConfirmCode' => $ordconfirmcode,\n\t\t\t);\n\t\t\t$transactionData = $this->validate_order($data);\n\t\t\tif(200 !== $transactionData['status_code']){\n\t\t\t\tget_header();\n\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">'.$transactionData['message'] .'</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br></div></div></div>';\n\t\t\t\t get_footer();\n\t\t\t\t\texit;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif($transactionData['data']['Security'] != $ordconfirmcode){\n\t\t\t\t\tget_header();\n\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">Data mismatch! ConfirmCode doesn\\'t match</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br></div></div></div>';\n\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telseif($transactionData['data']['CustomerReferenceNr'] != $orderid){\n\t\t\t\t\tget_header();\n\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">Data mismatch! CustomerReferenceNr doesn\\'t match</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br></div></div></div>';\n\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telseif($transactionData['data']['TransactionID'] != $ordtransactionid){\n\t\t\t\t\tget_header();\n\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">Data mismatch! TransactionID doesn\\'t match</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br></div></div></div>';\n\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telseif($transactionData['data']['Status'] != $ordstatus){\n\t\t\t\t\tget_header();\n\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">Data mismatch! status doesn\\'t match. Your order status is '. $transactionData['data']['Status'].'</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br></div></div></div>';\n\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (( 'paid' === $ordstatus ) && ( 0 === $notenough )) {\n\t\t\t\t\t// Do your magic here, and return 200 OK to Cointopay.\n\t\t\t\t\tif ('processing' === $order->status) {\n\t\t\t\t\t\t$order->update_status('processing', sprintf(__('IPN: Payment completed notification from Cointopay', 'woocommerce')));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\t$order->update_status('processing', sprintf(__('IPN: Payment completed notification from Cointopay', 'woocommerce')));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$order->save();\n\t\t\t\t\t\n\t\t\t\t\t$order->add_order_note( __( 'IPN: Update status event for Cointopay to status COMPLETED:', 'woocommerce' ) . ' ' . $orderid);\n\n\t\t\t\t\tget_header();\n\t\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#0fad00\">Success!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/check.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">The payment has been received and confirmed successfully.</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #0fad00;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br><br><br></div></div></div>';\n\t\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t} elseif ('failed' === $ordstatus && 1 === $notenough) {\n\t\t\t\t\t$order->update_status('on-hold', sprintf(__('IPN: Payment failed notification from Cointopay because notenough', 'woocommerce')));\n\t\t\t\t\tget_header();\n\t\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">The payment has been failed.</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color: #ff0000;border: none;color: white; padding: 15px 32px; text-align: center;text-decoration: none;display: inline-block; font-size: 16px;\" >Back</a><br><br><br><br></div></div></div>';\n\t\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t} else {\n\t\t\t\t\t$order->update_status('failed', sprintf(__('IPN: Payment failed notification from Cointopay', 'woocommerce')));\n\t\t\t\t\tget_header();\n\t\t\t\t\techo '<div class=\"container\" style=\"text-align: center;\"><div><div><br><br><h2 style=\"color:#ff0000\">Failure!</h2><img style=\"margin:auto;\" src=\"' . esc_url(plugins_url('images/fail.png', __FILE__)) . '\"><p style=\"font-size:20px;color:#5C5C5C;\">The payment has been failed.</p><a href=\"' . esc_url(site_url()) . '\" style=\"background-color:#ff0000;border:none;color: white;padding:15px 32px;text-align: center;text-decoration:none;display:inline-block;font-size:16px;\">Back</a><br><br><br><br></div></div></div>';\n\t\t\t\t\tget_footer();\n\t\t\t\t\texit;\n\t\t\t\t}//end if\n\t\t\t\n\n\t\t}",
"function bill_transition_placed_pending($billorid) {\n global $CFG, $SITE, $USER, $DB, $OUTPUT;\n\n $config = get_config('local_shop');\n\n /*\n * Scenario :\n * - the order is being payed offline.\n * - the operator needs to sold out manually the bill and realize all billitems production.\n */\n\n if (is_object($billorid)) {\n $bill = $billorid;\n } else {\n $bill = new Bill($billid);\n }\n\n if ($bill) {\n\n include_once($CFG->dirroot.'/local/shop/datahandling/production.php');\n\n $productiondata = produce_prepay($bill);\n shop_aggregate_production($bill, $productiondata, true);\n\n echo $OUTPUT->box_start();\n echo $productiondata->salesadmin;\n echo $OUTPUT->box_end();\n\n // Now notify user the order and all products have been activated.\n if (!empty($productiondata->private)) {\n\n // Notify end user.\n $billurl = new moodle_url('/local/shop/front/order.popup.php', array('billid' => $bill->id, 'transid' => $bill->transactionid));\n $customeruser = $DB->get_record('user', array('id' => $bill->customer->hasaccount));\n $ticket = ticket_generate($customeruser, 'delegated access', $billurl);\n\n // Feedback customer with mail confirmation.\n $vars = array('SERVER' => $SITE->shortname,\n 'SERVER_URL' => $CFG->wwwroot,\n 'SELLER' => $config->sellername,\n 'FIRSTNAME' => $bill->customer->firstname,\n 'LASTNAME' => $bill->customer->lastname,\n 'MAIL' => $bill->customer->email,\n 'CITY' => $bill->customer->city,\n 'COUNTRY' => $bill->customer->country,\n 'ITEMS' => count($bill->billItems),\n 'PAYMODE' => get_string($bill->paymode, 'local_shop'),\n 'AMOUNT' => $bill->amount,\n 'TICKET' => $ticket);\n $notification = shop_compile_mail_template('sales_feedback', $vars, '');\n $params = array('shopid' => $bill->shopid, 'view' => 'bill', 'billid' => $bill->id, 'transid' => $bill->transactionid);\n $customerbillviewurl = new moodle_url('/local/shop/front/view.php', $params);\n $seller = new StdClass;\n $seller->firstname = $config->sellername;\n $seller->lastname = '';\n $seller->email = $config->sellermail;\n $seller->maildisplay = 1;\n $title = $SITE->shortname.' : '.get_string('yourorder', 'local_shop');\n $sentnotification = str_replace('<%%PRODUCTION_DATA%%>', $productiondata->private, $notification);\n ticket_notify($customeruser, $seller, $title, $sentnotification, $sentnotification, $customerbillviewurl);\n }\n\n $message = \"[{$bill->transactionid}] Bill Controller :\";\n $message .= \" Delayed Transaction Activating Operations on seller behalf by $USER->username\";\n shop_trace($message);\n $bill->status = 'PENDING';\n $bill->save(true);\n } else {\n shop_trace(\"[ERROR] Transition error : Bad bill ID $billid\");\n }\n}",
"public function completed_process_message()\n\t{\n\t\tif( ! donate_has_notice( 'success' ) )\n\t\t{\n\t\t\tdonate_add_notice( 'success', __( 'Payment completed. We will send you email when payment method verify.', 'tp-donate' ) );\n\t\t}\n\t}",
"public function processPayment();",
"public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }",
"private function ThanksForYourOrder()\n\t\t{\n\t\t\t// Reload all fo the information about the order as there's a good chance\n\t\t\t// a fair bit of it has changed now\n\t\t\t$this->SetOrderData();\n\n\t\t\t$GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART');\n\t\t\t$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');\n\n\t\t\t$GLOBALS['HideError'] = \"none\";\n\t\t\t$GLOBALS['HidePaidOrderConfirmation'] = '';\n\t\t\t$GLOBALS['HideAwaitingPayment'] = \"none\";\n\n\t\t\t$GLOBALS['HideStoreCreditUse'] = 'none';\n\n\t\t\tif($this->pendingData['storecreditamount'] > 0) {\n\t\t\t\t$GLOBALS['HideStoreCreditUse'] = '';\n\t\t\t\t$GLOBALS['StoreCreditUsed'] = CurrencyConvertFormatPrice($this->pendingData['storecreditamount']);\n\n\t\t\t\t$GLOBALS['StoreCreditBalance'] = CurrencyConvertFormatPrice($GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerStoreCredit($this->pendingData['customerid']));\n\t\t\t\t$GLOBALS['ISC_LANG']['OrderCreditDeducted'] = sprintf(GetLang('OrderCreditDeducted'), GetConfig('CurrencyToken') . $GLOBALS['StoreCreditUsed']);\n\t\t\t}\n\n\t\t\t// If it was an offline payment method, show the post-purchase message and hide other messages\n\t\t\tif(is_object($this->paymentProvider) && $this->paymentProvider->GetPaymentType() == PAYMENT_PROVIDER_OFFLINE && method_exists($this->paymentProvider, 'GetOfflinePaymentMessage')) {\n\t\t\t\t$defaultCurrency = GetDefaultCurrency();\n\t\t\t\t$GLOBALS['OrderTotal'] = FormatPrice($this->pendingData['gatewayamount'], false, true, false, $defaultCurrency, true);\n\n\t\t\t\t$GLOBALS['HidePaidOrderConfirmation'] = \"none\";\n\t\t\t\t$GLOBALS['PaymentMessage'] = $this->paymentProvider->GetOfflinePaymentMessage();\n\t\t\t\t$GLOBALS['SNIPPETS']['OfflinePaymentMessage'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"OfflinePaymentMessage\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Was the order declined?\n\t\t\t\tif($this->pendingData['status'] == 6) {\n\t\t\t\t\t$GLOBALS['HideError'] = '';\n\t\t\t\t\t$GLOBALS['ErrorMessage'] = sprintf(GetLang('ErroOrderDeclined'), GetConfig('OrderEmail'), GetConfig('OrderEmail'));\n\t\t\t\t\t$GLOBALS['HidePaidOrderConfirmation'] = 'none';\n\t\t\t\t\t$GLOBALS['ISC_LANG']['ThanksForYourOrder'] = GetLang('YourPaymentWasDeclined');\n\t\t\t\t}\n\t\t\t\t// Order is still awaiting payment\n\t\t\t\telse if($this->pendingData['status'] == 7) {\n\t\t\t\t\t$GLOBALS['HidePaidOrderConfirmation'] = \"none\";\n\t\t\t\t\t$GLOBALS['HideAwaitingPayment'] = \"\";\n\t\t\t\t}\n\t\t\t\t// Otherwise, order was successful\n\t\t\t\telse {\n\t\t\t\t\t// Is it a physical or digital order?\n\t\t\t\t\tif($this->pendingData['isdigital'] == 100) {\n\n\t\t\t\t\t\t// If this order has no customer ID associated with it (guest checkout with no account creation) then display an alternative text with no download link\n\t\t\t\t\t\tif (!isId($this->pendingData['customerid'])) {\n\t\t\t\t\t\t\t$GLOBALS['DigitalOrderConfirmation'] = GetLang('DigitalOrderConfirmationGuestCheckout');\n\t\t\t\t\t\t\t$GLOBALS['HideDigitalOrderDownloadLink'] = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Otherwise display nthe normal text with the download link in it\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$GLOBALS['DigitalOrderConfirmation'] = GetLang('DigitalOrderConfirmation');\n\t\t\t\t\t\t\t$GLOBALS['HideDigitalOrderDownloadLink'] = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['HidePhysicalOrderConfirmation'] = \"none\";\n\t\t\t\t\t\t$GLOBALS['HidePhysicalViewOrderLink'] = \"none\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t// If this order has no customer ID associated with it (guest checkout with no account creation) then display an alternative text with no view order link\n\t\t\t\t\t\tif (!isId($this->pendingData['customerid'])) {\n\t\t\t\t\t\t\t$GLOBALS['PhysicalOrderConfirmation'] = GetLang('PhysicalOrderConfirmationGuestCheckout');\n\t\t\t\t\t\t\t$GLOBALS['HidePhysicalViewOrderLink'] = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Otherwise display nthe normal text with the download link in it\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$GLOBALS['PhysicalOrderConfirmation'] = GetLang('PhysicalOrderConfirmation');\n\t\t\t\t\t\t\t$GLOBALS['HidePhysicalViewOrderLink'] = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['HideDigitalOrderConfirmation'] = \"none\";\n\t\t\t\t\t\t$GLOBALS['HideDigitalOrderDownloadLink'] = \"none\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->CreateCupons();\n\t\t\t\n\t\t\t// Include the conversion code for each analytics module\n\t\t\t$GLOBALS['ConversionCode'] = '';\n\t\t\t$analyticsModules = GetAvailableModules('analytics', true, true);\n\t\t\tforeach($analyticsModules as $module) {\n\t\t\t\t$module['object']->SetOrderData($this->pendingData);\n\t\t\t\t$trackingCode = $module['object']->GetConversionCode();\n\t\t\t\tif($trackingCode != '') {\n\t\t\t\t\t$GLOBALS['ConversionCode'] .= \"\n\t\t\t\t\t\t<!-- Start conversion code for \".$module['id'].\" -->\n\t\t\t\t\t\t\".$trackingCode.\"\n\t\t\t\t\t\t<!-- End conversion code for \".$module['id'].\" -->\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Include the conversion tracking code for affiliates\n\t\t\tforeach($this->pendingData['orders'] as $order) {\n\t\t\t\tif(strlen(GetConfig('AffiliateConversionTrackingCode')) > 0) {\n\t\t\t\t\t$converted_code = GetConfig('AffiliateConversionTrackingCode');\n\t\t\t\t\t$subTotalColumn = 'subtotal_ex_tax';\n\t\t\t\t\t$totalColumn = 'total_inc_tax';\n\t\t\t\t\tif(getConfig('taxDefaultTaxDisplayOrders') == TAX_PRICES_DISPLAY_INCLUSIVE) {\n\t\t\t\t\t\t$subTotalColumn = 'subtotal_inc_tax';\n\t\t\t\t\t}\n\n\t\t\t\t\t$discountedSubTotal = $_SESSION['LAST_ORDER_DISCOUNTED_SUBTOTAL'];\n\t\t\t\t\tunset($_SESSION['LAST_ORDER_DISCOUNTED_SUBTOTAL']);\n\n\t\t\t\t\t$replacements = array(\n\t\t\t\t\t\t'%%ORDER_SUBTOTAL%%' => $order[$subTotalColumn] / 1,\n\t\t\t\t\t\t'%%ORDER_SUBTOTAL_IN_CENTS%%' => ($order[$subTotalColumn] / 1) * 100,\n\t\t\t\t\t\t'%%ORDER_SUBTOTAL_DISCOUNTED%%' => $discountedSubTotal / 1,\n\t\t\t\t\t\t'%%ORDER_SUBTOTAL_DISCOUNTED_IN_CENTS%%' => ($discountedSubTotal / 1) * 100,\n\t\t\t\t\t\t'%%ORDER_AMOUNT%%' => $order['total_inc_tax'] / 1,\n\t\t\t\t\t\t'%%ORDER_AMOUNT_IN_CENTS%%' => ($order['total_inc_tax'] / 1) * 100,\n\t\t\t\t\t\t'%%ORDER_ID%%' => $order['orderid'],\n\t\t\t\t\t);\n\t\t\t\t\t$converted_code = str_ireplace(array_keys($replacements), $replacements, $converted_code);\n\t\t\t\t\t$GLOBALS['ConversionCode'] .= $converted_code;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// leave this in for outdated templates: hide the product updates div\n\t\t\t$GLOBALS['HideProductUpdates'] = \"none\";\n\n\t\t\tif(method_exists($this->paymentProvider, 'ShowOrderConfirmation')) {\n\t\t\t\t$GLOBALS['OrderConfirmationDetails'] = $this->paymentProvider->ShowOrderConfirmation($this->pendingData);\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Show the order confirmation screen\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle(GetLang('ThanksForYourOrder'));\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"order\");\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t}",
"public function finishPurchase() {}",
"public function payment_status_pending()\n {\n return $this->payment_status_completed();\n }",
"public function license_key_notice() {\n\n\t\tif( !SPP_Core::is_paid_version() ) {\n\t ?>\n\t <div class=\"error\">\n\t <p style=\"line-height: 30px;\"><?php _e( 'Please enter your Smart Podcast Player license key to get updates and support! <a href=\"' . SPP_SETTINGS_URL . '\" class=\"button\" style=\"float: right;\">Go to Settings</a>', 'smart-podcast-player' ); ?></p>\n\t </div>\n\t <div class=\"notice\">\n\t <p style=\"line-height: 30px;\"><?php _e( $this->license_paid_notice_text() ) ?></p>\n\t </div>\n\t <?php\n\t\t}\n\t}",
"public function notificationAction() {\n global $CFG;\n\n // Full strength error logging\n error_reporting(E_ALL);\n ini_set('display_errors', 0);\n ini_set('log_errors', 1);\n\n // Library stuff\n $sagepay = new sagepayserverlib();\n $sagepay->setController($this);\n\n // POST data from SagePay\n $data = $sagepay->getNotification();\n\n // Log the notification data to debug file (in case it's interesting)\n $this->log(var_export($data, true));\n\n // Get the VendorTxCode and use it to look up the purchase\n $VendorTxCode = $data['VendorTxCode'];\n if (!$purchase = $this->bm->getPurchaseFromVendorTxCode($VendorTxCode)) {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('Purchase record not found');\n $this->log('SagePay notification: Purchase not found - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'Purchase record not found');\n die;\n }\n\n // Now that we have the purchase object, we can save whatever we got back in it\n $purchase = $this->bm->updateSagepayPurchase($purchase, $data);\n\n // Mailer\n $mail = new maillib();\n $mailpurchase = clone $purchase;\n $mail->initialise($this, $mailpurchase, $this->bm);\n $mail->setExtrarecipients($CFG->backup_email);\n\n // Check VPSSignature for validity\n if (!$sagepay->checkVPSSignature($purchase, $data)) {\n $purchase->status = 'VPSFAIL';\n $purchase->save();\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('VPSSignature not matched');\n $this->log('SagePay notification: VPS sig no match - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'VPSSignature not matched');\n die;\n }\n\n // Check Status.\n // Work out what next action should be\n $status = $purchase->status;\n if ($status == 'OK' || ($status == 'OK REPEATED')) {\n\n // Send confirmation email\n $url = $this->Url('booking/complete') . '/' . $VendorTxCode;\n $mail->confirm();\n $this->log('SagePay notification: Confirm sent - ' . $url);\n $sagepay->notificationreceipt('OK', $url, '');\n } else if ($status == 'ERROR') {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode($purchase->statusdetail);\n $this->log('SagePay notification: Booking fail - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n } else {\n $url = $this->Url('booking/decline') . '/' . $VendorTxCode;\n $this->log('SagePay notification: Booking decline - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n }\n\n $purchase->completed = 1;\n $purchase->save();\n\n die;\n }",
"public function isPaid(){\n return $this->status == \"SUCCESS\";\n }",
"function display_notice(){\r\n\t\t\tglobal $hook_suffix;\r\n\t\t\t$status = \"not-activated\";\r\n\t\t\t$ultimate_keys = get_option('ultimate_keys');\r\n\t\t\t$username = $ultimate_keys['envato_username'];\r\n\t\t\t$api_key = $ultimate_keys['envato_api_key'];\r\n\t\t\t$purchase_code = $ultimate_keys['ultimate_purchase_code'];\r\n\t\t\t$user_email = (isset($ultimate_keys['ultimate_user_email'])) ? $ultimate_keys['ultimate_user_email'] : '';\r\n\r\n\t\t\t$activation_check = get_option('ultimate_license_activation');\r\n\r\n\t\t\tif(false === ( get_transient( 'ultimate_license_activation' ) )){\r\n\t\t\t\tif(!empty($activation_check)){\r\n\t\t\t\t\t$get_activation_data = check_license_activation($purchase_code, $username, $user_email);\r\n\t\t\t\t\t$activation_check_temp = json_decode($get_activation_data);\r\n\t\t\t\t\t$val = array(\r\n\t\t\t\t\t\t'response' => $activation_check_temp->response,\r\n\t\t\t\t\t\t'status' => $activation_check_temp->status,\r\n\t\t\t\t\t\t'code' => $activation_check_temp->code\r\n\t\t\t\t\t);\r\n\t\t\t\t\tupdate_option('ultimate_license_activation', $val);\r\n\t\t\t\t\tdelete_transient( 'ultimate_license_activation' );\r\n\t\t\t\t\tset_transient( \"ultimate_license_activation\", true, 60*60*12);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$activation_check = get_option('ultimate_license_activation');\r\n\t\t\t$ultimate_constants = get_option('ultimate_constants');\r\n\t\t\t$builtin = get_option('ultimate_updater');\r\n\r\n\t\t\tif($activation_check !== ''){\r\n\t\t\t\t$status = isset($activation_check['status']) ? $activation_check['status'] : \"not-activated\";\r\n\t\t\t\t$code = $activation_check['code'];\r\n\t\t\t}\r\n\r\n\t\t\tif($status == \"Deactivated\" || $status == \"not-activated\" || $status == \"not-verified\"){\r\n\t\t\t\tif ( $hook_suffix == 'plugins.php' ){\r\n\t\t\t\t\tif( $builtin === 'disabled' || $ultimate_constants['ULTIMATE_NO_PLUGIN_PAGE_NOTICE'] === true || (is_multisite() == true && is_main_site() == false))\r\n\t\t\t\t\t\t$hide_notice = true;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$hide_notice = false;\r\n\t\t\t\t\t$reg_link = (is_multisite()) ? network_admin_url('index.php?page=bsf-dashboard') : admin_url('index.php?page=bsf-dashboard');\r\n\r\n\t\t\t\t\tif(!$hide_notice) :\r\n\t\t\t\t\t?>\r\n <div class=\"updated\" style=\"padding: 0; margin: 0; border: none; background: none;\">\r\n <style type=\"text/css\">\r\n .ult_activate{min-width:825px;background: #FFF;border:1px solid #0096A3;padding:5px;margin:15px 0;border-radius:3px;-webkit-border-radius:3px;position:relative;overflow:hidden}\r\n .ult_activate .ult_a{position:absolute;top:5px;right:10px;font-size:48px;}\r\n .ult_activate .ult_button{font-weight:bold;border:1px solid #029DD6;border-top:1px solid #06B9FD;font-size:15px;text-align:center;padding:9px 0 8px 0;color:#FFF;background:#029DD6;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px}\r\n .ult_activate .ult_button:hover{text-decoration:none !important;border:1px solid #029DD6;border-bottom:1px solid #00A8EF;font-size:15px;text-align:center;padding:9px 0 8px 0;color:#F0F8FB;background:#0079B1;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px}\r\n .ult_activate .ult_button_border{border:1px solid #0096A3;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px;background:#029DD6;}\r\n .ult_activate .ult_button_container{cursor:pointer;display:inline-block; padding:5px;-moz-border-radius:2px;border-radius:2px;-webkit-border-radius:2px;width:215px}\r\n .ult_activate .ult_description{position:absolute;top:8px;left:230px;margin-left:25px;color:#0096A3;font-size:15px;z-index:1000}\r\n .ult_activate .ult_description strong{color:#0096A3;font-weight:normal}\r\n </style>\r\n <div class=\"ult_activate\">\r\n <div class=\"ult_a\"><img style=\"width:1em;\" src=\"<?php echo plugins_url(\"img/logo-icon.png\",__FILE__); ?>\" alt=\"\"></div>\r\n <?php\r\n\r\n ?>\r\n <div class=\"ult_button_container\" onclick=\"document.location='<?php echo $reg_link; ?>'\">\r\n <div class=\"ult_button_border\">\r\n <div class=\"ult_button\"><span class=\"dashicons-before dashicons-admin-network\" style=\"padding-right: 6px;\"></span><?php __('Activate your license', 'ultimate_vc');?></div>\r\n </div>\r\n </div>\r\n <div class=\"ult_description\"><h3 style=\"margin:0;padding: 2px 0px;\"><strong><?php _e('Almost done!','ultimate_vc'); ?></strong></h3><p style=\"margin: 0;\"><?php _e('Please activate your copy of the Ultimate Addons for Visual Composer to receive automatic updates & get premium support','ultimate_vc'); ?></p></div>\r\n </div>\r\n </div>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tendif;\r\n\t\t\t\t} else if($hook_suffix == 'post-new.php' || $hook_suffix == 'edit.php' || $hook_suffix == 'post.php'){\r\n\t\t\t\t\tif( $builtin === 'disabled' || $ultimate_constants['ULTIMATE_NO_EDIT_PAGE_NOTICE'] === true || (is_multisite() == true && is_main_site() == false))\r\n\t\t\t\t\t\t$hide_notice = true;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$hide_notice = false;\r\n\t\t\t\t\tif(!$hide_notice) :\r\n\t\t\t\t\t?>\r\n\r\n <div class=\"updated fade\">\r\n\r\n <p><?php echo _e('Howdy! Please','ultimate_vc').' <a href=\"'.$reg_link.'\">'.__('activate your copy','ultimate_vc').' </a> '.__('of the Ultimate Addons for Visual Composer to receive automatic updates & get premium support.','ultimate_vc');?>\r\n <span style=\"float: right; padding: 0px 4px; cursor: pointer;\" class=\"uavc-activation-notice\">X</span>\r\n </p>\r\n </div>\r\n <script type=\"text/javascript\">\r\n jQuery(\".uavc-activation-notice\").click(function(){\r\n jQuery(this).parents(\".updated\").fadeOut(800);\r\n });\r\n </script>\r\n\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tendif;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public function isUnpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNPAID;\n }",
"public function process_gateway_notification() {\r\n\t\t$order_id = self::get_post_var( 'OrderID' );\r\n\t\t$message = self::get_post_var( 'Message' );\r\n\t\t$status_code = self::get_post_var( 'StatusCode' );\r\n\t\t$prev_status_code = self::get_post_var( 'PreviousStatusCode' );\r\n\t\t$session_id = explode( ' ', self::get_post_var( 'OrderDescription' ) );\r\n\r\n\t\tif ( is_numeric( $status_code ) ) {\r\n\t\t\t$processed = WPSC_Purchase_Log::INCOMPLETE_SALE;\r\n\t\t\tswitch ( $status_code ) {\r\n\t\t\t\tcase PS_TRX_RESULT_SUCCESS:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::ACCEPTED_PAYMENT;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_REFERRED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_DECLINED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_DUPLICATE:\r\n\t\t\t\t\t$processed = ( PS_TRX_RESULT_SUCCESS === $prev_status_code )\r\n\t\t\t\t\t\t? WPSC_Purchase_Log::ACCEPTED_PAYMENT\r\n\t\t\t\t\t\t: WPSC_Purchase_Log::PAYMENT_DECLINED;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase PS_TRX_RESULT_FAILED:\r\n\t\t\t\t\t$processed = WPSC_Purchase_Log::INCOMPLETE_SALE;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\twp_die( 'Unsupported StatusCode. Please contact support.',\r\n\t\t\t\t\t\t'Unsupported StatusCode',\r\n\t\t\t\t\t\tarray( 'response' => 400 )\r\n\t\t\t\t\t);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$data = array(\r\n\t\t\t\t'processed' => $processed,\r\n\t\t\t\t'transactid' => $order_id,\r\n\t\t\t\t'notes' => $message,\r\n\t\t\t\t'date' => time(),\r\n\t\t\t);\r\n\t\t\twpsc_update_purchase_log_details( $session_id[4], $data, 'sessionid' );\r\n\r\n\t\t\tswitch ( $processed ) {\r\n\t\t\t\tcase WPSC_Purchase_Log::ACCEPTED_PAYMENT:\r\n\t\t\t\t\ttransaction_results( $session_id, false, $order_id );\r\n\t\t\t\t\t// Thank you for purchasing.\r\n\t\t\t\t\t$this->go_to_transaction_results( $session_id[4] );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase WPSC_Purchase_Log::PAYMENT_DECLINED:\r\n\t\t\t\t\t// Sorry, your transaction was not accepted.\r\n\t\t\t\t\t$this->go_to_transaction_results( null );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t// Thank you, your purchase is pending.\r\n\t\t\t\t\t$this->go_to_transaction_results( $session_id[4] );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twp_die( 'Unexpected response from the payment gateway. Please contact support.',\r\n\t\t\t\t'Unexpected response from the payment gateway',\r\n\t\t\t\tarray( 'response' => 400 )\r\n\t\t\t);\r\n\t\t}\r\n\t}",
"private function btn_payments(){\n\n if ($not_my_case = (VM::outOfScope()\n\t\t\t|| !$this->isWritable() \n\t\t\t|| ($this->rec['v_type'] === VISIT_OUT_OF_SCOPE) \n\t\t\t|| ($this->rec['v_status']!= STATUS_YES) \n\t\t\t|| !in_array($this->doing,array('lists','budget',)) \n\t\t\t|| (is_object(VM::$e) && VM::$e->isEventEndorsed())\n\t\t\t)) $this->dbg('not_my_case '.$this->rec['av_lastname']);\n\n bTiming()->cpu(__function__);\n $reply = array();\n foreach(bForm_vm_Visit::_getPolicies($this->rec) as $p=>$descr){\n // The event policy has precedence over the visit policy\n if (!empty(VM::$e) && ($p_e = @VM::$E_V_policies[$p]) && !VM::$e->getPolicy($p_e)) continue;\n if (empty($descr['i'])) continue; \n\n $yes_no = (bool)bForm_vm_Visit::_getPolicy($p,$this->rec);\n $this->dbg(\"$p $descr[i] - \".var_export($yes_no,True),True);\n $icon = '';\n // don't draw useless button for the passed events\n if(!$not_my_case && (($yes_no || ($this->rec['v_end'] > time()-30*86400)))){\n\t$already_paid = Null;\n\tswitch($p){\n\t \n\tcase VM_V_provideOffice:\n\t if (myOrg()->eaMembers()->isMember($this->rec['av_id'])){\n\t $av = loader::getInstance_new('bForm_Avatar_vm',$this->rec['av_id'],array('fatal','nocache'));\n\t if ($av->isE(True) && $av->get_staffOffice()) break;\n\t }\n\t $already_paid = '';\n\t $hasRightTo = 'assign_offices';\n\t $paid = 'provided';\n\t break;\n\n\tcase VM_E_provideLunches:\n\tcase VM_E_conferenceDinner:\n\t if ($already_paid === Null){\n\t $already_paid = '';\n\t b_debug::var_dump($descr['i'],'already_paid===Null');\n\t }\n\t break;\n\n\tcase VM_V_payPerdiem:\n\t if ($already_paid === Null){\n\t $already_paid = (bool)(is_object($this->exp) && $this->exp->scholarshipP(False,False));\n\t $hasRightTo = 'setup_reimbursement';\n\t $paid = 'paid';\n\t }\n\t break;\n\n\tcase VM_V_payTrip:\n\t if ($already_paid === Null){\n\t $already_paid = (bool)(is_object($this->exp) && $this->exp->scholarshipT(False,False));\n\t $hasRightTo = 'setup_reimbursement';\n\t $paid = 'paid';\n\t }\n\t break;\n\n\tdefault:\n\t}\n\t \n\tif ($already_paid !== Null){\n\t // Show either a click-able button or just an icon\n\t $img = @$descr['i'] . ($yes_no ? '_on' : '_off');\n\t $icon = (!$already_paid && VM::hasRightTo($hasRightTo,$this->rec)\n\t\t ? bIcons()->getButton(array('class'=>'form-submit',\n\t\t\t\t\t 'i'=>$img,\n\t\t\t\t\t 'c'=>($yes_no ? 'only_online' : 'only_online opacity_on'),\n\t\t\t\t\t 'd'=>$descr['i'].($yes_no ? '' : ' not').\" to be $paid, click to change\",\n\t\t\t\t\t 'l'=>b_url::same(\"?resetcache_once=1&toggle_once=$p&v_id=\".$this->rec['v_id'],$this->anchor())))\n\t\t : bIcons()->get (array('i'=>$img,\n\t\t\t\t\t 'c'=>($yes_no ? 'only_online' : 'only_online opacity_on'),\n\t\t\t\t\t 'd'=>$descr['i'].($yes_no ? '' :' not').\" $paid\")));\n\t}\n }else{\n\t$this->dbg('too old visit '.$this->rec['av_lastname']);\n }\n $reply[] = $icon;\n }\n bTiming()->cpu();\n return $reply;\n }",
"function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }",
"public function check_paypal_return()\n {\n // Cancel payment\n if ( isset( $_GET['paypal_digital'] ) && $_GET['paypal_digital'] == 'cancel' ) {\n wp_print_scripts( 'jquery' );\n\n ?><script>\n jQuery(function() {\n var blocker = top.document.getElementById(\"PPDGFrame\");\n\n // Checkout button\n var button = top.document.getElementsByName('bundle_checkout')[0];\n jQuery(button).html('Checkout');\n jQuery(button).prop('disabled', false);\n\n // Tip button\n var button = top.document.getElementsByName('giveTip');\n jQuery(button[0]).html('Checkout');\n jQuery(button[0]).prop('disabled', false);\n jQuery(button[1]).html('Checkout');\n jQuery(button[1]).prop('disabled', false);\n\n jQuery(blocker).remove();\n });\n </script><?php\n\n exit;\n }\n\n // Returning from PayPal\n if ( isset( $_GET['PayerID'] ) && ( isset( $_GET['paypal_digital'] ) && $_GET['paypal_digital'] == 'paid' ) ) {\n EDD_PPDG_PayPal_IPN::load_block_ui();\n\n ?><script>\n jQuery(function() {\n var form = top.document.forms[\"bundle-checkout-form\"];\n // If it wasn't the bundle checkout, let's see which tip form it might be\n if (!form) {\n // First we try the sharing form\n form = top.document.forms[\"tipshare-form\"];\n var button = jQuery(form).find('[name=giveTip]');\n if (button.html() != 'Processing...') {\n // It wasn't the first tip form, so let's assume it's the second\n form = top.document.forms[\"tipster-form\"];\n }\n }\n var paypal_digital = jQuery('<input type=\"hidden\" name=\"paypal_digital\">').val('<?php echo $_GET[\"paypal_digital\"]; ?>');\n var payerid = jQuery('<input type=\"hidden\" name=\"PayerID\">').val('<?php echo $_GET[\"PayerID\"]; ?>');\n var token = jQuery('<input type=\"hidden\" name=\"token\">').val('<?php echo $_GET[\"token\"]; ?>');\n\n jQuery(form).append(paypal_digital);\n jQuery(form).append(payerid);\n jQuery(form).append(token);\n jQuery(form).submit();\n })\n </script><?php\n\n exit;\n }\n\n }"
]
| [
"0.6453546",
"0.62858564",
"0.62605643",
"0.6219712",
"0.62007767",
"0.61841303",
"0.61720276",
"0.61313844",
"0.61264557",
"0.61165595",
"0.60936517",
"0.60851777",
"0.60846955",
"0.60799176",
"0.6063436",
"0.60627943",
"0.60525197",
"0.60410714",
"0.6038925",
"0.60322726",
"0.59981316",
"0.59889305",
"0.59869677",
"0.59422594",
"0.5917225",
"0.59107107",
"0.58997846",
"0.5880575",
"0.5876566",
"0.5873406"
]
| 0.6445808 | 1 |
adds the settings to the Payment Gateways section | function pn_edd_add_settings( $settings ) {
$paynow_gateway_settings = array(
array(
'id' => 'paynow_gateway_settings',
'name' => '<strong>' . __( 'Paynow Gateway Settings', 'pw_edd' ) . '</strong>',
'desc' => __( 'Configure the gateway settings', 'pw_edd' ),
'type' => 'header'
),
array(
'id' => 'paynow_live_api_id',
'name' => __( 'Merchant API ID', 'pw_edd' ),
'desc' => __( 'Enter your live API ID, found in your gateway Account Settings', 'pw_edd' ),
'type' => 'text',
'size' => 'regular'
),
array(
'id' => 'paynow_live_api_secret_key',
'name' => __( 'Merchant API Key', 'pw_edd' ),
'desc' => __( 'Enter your live API key, found in your gateway Account Settings', 'pw_edd' ),
'type' => 'text',
'size' => 'regular'
)
);
return array_merge( $settings, $paynow_gateway_settings );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('sid', trim($settings['sid']));\n $this->set('secret', trim($settings['secret']));\n $this->serialize();\n }\n\n\n return true;\n }",
"function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('installation_id', trim($settings['installation_id']));\n $this->set('currency', $settings['currency']);\n $this->set('callback_password', trim($settings['callback_password']));\n $this->serialize();\n }\n\n\n return true;\n }",
"function init_payment_settings() {\n\t\t\t//\n\t\t\t// Initialize the section\n\t\t\t//\n\t\t\tadd_settings_section(\n\t\t\t\tself::PAYMENT_SECTION_ID,\n\t\t\t\t__( 'Payment Settings', 'link-linkid' ),\n\t\t\t\tarray( $this, 'render_payment_settings_info' ),\n\t\t\t\tself::LINKID_SETTINGS_PAGE_ID );\n\n\t\t}",
"public function settings($cs_gateways_id = '') {\n global $post;\n\n $cs_rand_id = CS_FUNCTIONS()->cs_rand_id();\n\n $on_off_option = array( \"show\" => esc_html__(\"on\", \"jobhunt\"), \"hide\" => esc_html__(\"off\", \"jobhunt\") );\n\n $cs_settings[] = array(\n \"name\" => esc_html__(\"Paypal Settings\", 'jobhunt'),\n \"id\" => \"tab-heading-options\",\n \"std\" => esc_html__(\"Paypal Settings\", \"jobhunt\"),\n \"type\" => \"section\",\n \"options\" => \"\",\n \"parrent_id\" => \"$cs_gateways_id\",\n \"active\" => true,\n );\n\n $cs_settings[] = array( \"name\" => esc_html__(\"Custom Logo \", \"jobhunt\"),\n \"desc\" => \"\",\n \"hint_text\" => \"\",\n \"id\" => \"paypal_gateway_logo\",\n \"std\" => wp_jobhunt::plugin_url() . 'payments/images/paypal.png',\n \"display\" => \"none\",\n \"type\" => \"upload logo\"\n );\n\n $cs_settings[] = array( \"name\" => esc_html__(\"Default Status\", \"jobhunt\"),\n \"desc\" => \"\",\n \"hint_text\" => esc_html__(\"If this switch will be OFF, no payment will be processed via Paypal. \", \"jobhunt\"),\n \"id\" => \"paypal_gateway_status\",\n \"std\" => \"on\",\n \"type\" => \"checkbox\",\n \"options\" => $on_off_option\n );\n\n $cs_settings[] = array( \"name\" => esc_html__(\"Paypal Sandbox\", \"jobhunt\"),\n \"desc\" => \"\",\n \"hint_text\" => esc_html__(\"Control PayPal sandbox Account with this switch. If this switch is set to ON, payments will be proceed with sandbox account.\", \"jobhunt\"),\n \"id\" => \"paypal_sandbox\",\n \"std\" => \"on\",\n \"type\" => \"checkbox\",\n \"options\" => $on_off_option\n );\n\n $cs_settings[] = array( \"name\" => esc_html__(\"Paypal Business Email\", \"jobhunt\"),\n \"desc\" => \"\",\n \"hint_text\" => esc_html__(\"Add your business Email address here to proceed PayPal payments.\", \"jobhunt\"),\n \"id\" => \"paypal_email\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\n $ipn_url = wp_jobhunt::plugin_url() . 'payments/listner.php';\n $cs_settings[] = array( \"name\" => esc_html__(\"Paypal Ipn Url\", \"jobhunt\"),\n \"desc\" => $ipn_url,\n \"hint_text\" => esc_html__(\"Here you can add your PayPal IPN URL.\", \"jobhunt\"),\n \"id\" => \"dir_paypal_ipn_url\",\n \"std\" => $ipn_url,\n \"type\" => \"text\"\n );\n\n\n\n return $cs_settings;\n }",
"public static function register_settings() {\n\t\t// Settings\n\t\t$settings = array(\n\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t'weight' => 124,\n\t\t\t\t'settings' => array(\n\t\t\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t\t\t'label' => self::__( 'Merchant Edit Profile Path' ),\n\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t'label' => trailingslashit( get_home_url() ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => self::$edit_path\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\tdo_action( 'gb_settings', $settings, Group_Buying_UI::SETTINGS_PAGE );\n\t}",
"public function add_settings() {\n if (self::$settings !== null) {\n $this->print_settings(self::$settings);\n }\n }",
"public function add_gateway( $gateways ) {\n\t\t$gateways[] = 'Paytwit_WC_gateway';\n\t\treturn $gateways;\n\t}",
"public function register_settings()\r\n\t{\t\r\n\t\t//options group declaration\r\n\t register_setting('bookingSearch_settings', 'dbs_client_id');\r\n\t register_setting('bookingSearch_settings', 'dbs_client_secret');\r\n\t register_setting('bookingSearch_settings', 'dbs_authorization');\r\n\r\n\t //sections\r\n\t add_settings_section('bookingSearch_section', __('Customer parameter','Booking-search'), array($this, 'section_html'), 'bookingSearch_settings');\r\n\r\n\t //fields\r\n\t add_settings_field('dbs_client_id', __('Client ID','Booking-search'), array($this, 'dbs_client_id_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\t add_settings_field('dbs_client_secret', __('Client secret','Booking-search'), array($this, 'dbs_client_secret_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\t add_settings_field('dbs_authorization', __('Authorization','Booking-search'), array($this, 'dbs_authorization_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\r\n\t}",
"function register_aftership_settings( $settings ) {\n\n\t$settings['aftership'] = array(\n\t\t'aftership' => array(\n\t\t\t'id' => 'aftership',\n\t\t\t'name' => '<strong>' . __( 'Aftership Settings', 'edd-tracking-info' ) . '</strong>',\n\t\t\t'type' => 'header',\n\t\t),\n\t\t'aftership_api_key' => array(\n\t\t\t'id' => 'aftership_api_key',\n\t\t\t'name' => __( 'Aftership API Key', 'edd-tracking-info' ),\n\t\t\t'desc' => sprintf( __( 'Found in your <a href=\"%s\">Aftership Account</a>', 'edd-tracking-info' ), 'https://www.aftership.com/apps/api' ),\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'regular',\n\t\t),\n\t);\n\n\treturn $settings;\n\n}",
"function cardknox_register_payment_gateway_sections( $sections ) {\r\n\t\r\n\t// `cardknox-settings` is the name/slug of the payment gateway section.\r\n\t$sections['cardknox-settings'] = __( 'cardknox', 'cardknox-for-give' );\r\n\r\n\treturn $sections;\r\n}",
"protected function _syncGatewayConfig() {\n if ($this->_gateway && $paymentGatewayCode = $this->getCurrentPaymentGateway()) {\n $gatewayConfiguration = $this->_gateway->configuration();\n if (isset($gatewayConfiguration['minimumAmount'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_total', $gatewayConfiguration['minimumAmount'], $this->config->get('config_store_id'));\n }\n if (isset($gatewayConfiguration['name'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_title', $gatewayConfiguration['name'], $this->config->get('config_store_id'));\n }\n if (isset($gatewayConfiguration['description'])) {\n $this->model_setting_setting->editSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_description', $gatewayConfiguration['description'], $this->config->get('config_store_id'));\n }\n }\n }",
"public function save_settings() {\n\t\tcheck_admin_referer( 'mylisting_update_mapservices' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\tdie;\n\t\t}\n\n\t\t$config = [];\n\t\t$config['provider'] = ! empty( $_POST['provider'] ) ? sanitize_text_field( $_POST['provider'] ) : 'google-maps';\n\n\t\t// google maps\n\t\t$config['gmaps_api_key'] = ! empty( $_POST['gmaps_api_key'] ) ? sanitize_text_field( $_POST['gmaps_api_key'] ) : '';\n\t\t$config['gmaps_lang'] = ! empty( $_POST['gmaps_lang'] ) ? sanitize_text_field( $_POST['gmaps_lang'] ) : 'default';\n\t\t$config['gmaps_types'] = ! empty( $_POST['gmaps_types'] ) ? sanitize_text_field( $_POST['gmaps_types'] ) : 'geocode';\n\t\t$config['gmaps_locations'] = ! empty( $_POST['gmaps_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['gmaps_locations'] )\n\t\t\t\t: [];\n\n\t\t// google maps skins\n\t\t$config['gmaps_skins'] = [];\n\t\tif ( ! empty( $_POST['gmaps_skins'] ) && ! empty( $_POST['gmaps_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['gmaps_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['gmaps_skinkeys'][$i] ) && ( $skinval = json_decode( stripslashes( $skin ) ) ) ) {\n\t\t\t\t\t$config['gmaps_skins'][ sanitize_text_field( $_POST['gmaps_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// mapbox\n\t\t$config['mapbox_api_key'] = ! empty( $_POST['mapbox_api_key'] ) ? sanitize_text_field( $_POST['mapbox_api_key'] ) : '';\n\t\t$config['mapbox_lang'] = ! empty( $_POST['mapbox_lang'] ) ? sanitize_text_field( $_POST['mapbox_lang'] ) : 'default';\n\t\t$config['mapbox_types'] = ! empty( $_POST['mapbox_types'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_types'] )\n\t\t\t\t: [];\n\t\t$config['mapbox_locations'] = ! empty( $_POST['mapbox_locations'] )\n\t\t\t\t? array_map( 'sanitize_text_field', (array) $_POST['mapbox_locations'] )\n\t\t\t\t: [];\n\n\t\t// mapbox skins\n\t\t$config['mapbox_skins'] = [];\n\t\tif ( ! empty( $_POST['mapbox_skins'] ) && ! empty( $_POST['mapbox_skinkeys'] ) ) {\n\t\t\tforeach ( (array) $_POST['mapbox_skins'] as $i => $skin ) {\n\t\t\t\tif ( ! empty( $skin ) && ! empty( $_POST['mapbox_skinkeys'][$i] ) ) {\n\t\t\t\t\tif ( $skinval = json_decode( stripslashes( $skin ) ) ) {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = json_encode( $skinval );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$config['mapbox_skins'][ sanitize_text_field( $_POST['mapbox_skinkeys'][$i] ) ] = $skin;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n \t$this->set_config( $config );\n\n\t\treturn wp_safe_redirect( admin_url( 'admin.php?page=theme-mapservice-settings&success=1' ) );\n\t}",
"public function ccpa_banner_configuration() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\techo esc_html( 'You do not have sufficient permissions to access this page.' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->save_banner_settings();\n\t\t$this->save_banner_behavior_settings();\n\t\t$this->save_settings();\n\t\t$this->cookiepro_ccpc_button_floatings = get_option( 'CookieProCCPAButtonFloatings' );\n\t\t$this->banner_settings_constant = array(\n\t\t\t'constant' => $this->get_constant_data_array(),\n\t\t\t'field' => $this->get_banner_setting_data_as_array(),\n\t\t\t'behavior' => $this->get_banner_behaviors_setting_data_as_array(),\n\t\t\t'Floating' => $this->cookiepro_ccpc_button_floatings,\n\t\t\t'publishstatus' => $this->display_status(),\n\t\t);\n\t\tinclude_once WP_PLUGIN_DIR . '/' . $this->plugin->name . '/views/settings.php';\n\t}",
"public function register_settings()\n {\n }",
"public function register_settings()\n {\n }",
"public function add_configuration() {\n\t\tENDA_Woocommerce_Bundle_Shipping::display_configuration_layer();\n\t\texit();\n\t}",
"public function register_settings() {\n\n\t\t// This include creates a variable called $settings.\n\t\t// TODO: Load this from a file instead ...\n\t\t$settings = array(\n\t\t\tarray(\n\t\t\t\t/*Sections*/\n\t\t\t\t'name'\t\t=> 'default',\n\t\t\t\t'title'\t\t=> __('General Settings','wpchaosclient'),\n\t\t\t\t'fields'\t=> array(\n\t\t\t\t\t/*Section fields*/\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-servicepath',\n\t\t\t\t\t\t'title' => __('Service Path','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-clientguid',\n\t\t\t\t\t\t'title' => __('Client GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-accesspoint-guid',\n\t\t\t\t\t\t'title' => __('Access Point GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-email',\n\t\t\t\t\t\t'title' => __('E-mail used for authentication','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-password',\n\t\t\t\t\t\t'title' => __('Password','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'password'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->settings = apply_filters('wpchaos-config', $settings);\n\n\t\tforeach($this->settings as $section) {\n\n\t\t\t//Validate\n\t\t\tif(!isset($section['name'],$section['title'],$section['fields']))\n\t\t\t\tcontinue;\n\n\t\t\t//Add section to WordPress\n\t\t\tadd_settings_section(\n\t\t\t\t$section['name'],\n\t\t\t\t$section['title'],\n\t\t\t\tnull,\n\t\t\t\t$this->menu_page\n\t\t\t);\n\n\t\t\tforeach($section['fields'] as $setting) {\n\t\t\t\t//Validate\n\t\t \t\tif(!isset($setting['title'],$setting['name'],$setting['type']))\n\t\t \t\t\tcontinue;\n\n\t\t \t\t//Are there any preconditions for this field to work properly?\n\t\t \t\tif(isset($setting['precond'])) {\n\t\t \t\t\tforeach($setting['precond'] as $precondition) {\n\t\t \t\t\t\tif(!$precondition['cond'])\n\t\t \t\t\t\t\tadd_action( 'admin_notices', function() use(&$precondition) { echo '<div class=\"error\"><p>'.$precondition['message'].'</p></div>'; },10);\n\t\t \t\t\t}\n\t\t \t\t}\n\n\t\t \t\t// Add field to section\n\t\t \t\tadd_settings_field($setting['name'],\n\t\t\t\t\t$setting['title'],\n\t\t\t\t\tarray(&$this,'create_setting_field'),\n\t\t\t\t\t$this->menu_page,\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$setting);\n\n\t\t \t\t// Register field to be manipulated with\n\t\t \t\tregister_setting($this->menu_page,$setting['name']);\n\t\t\t}\n\n\t\t}\n\n\t }",
"public function configure_merchant_settings() {\n\t\t$this->title = $this->get_option( 'title' );\n\t\t$this->enabled = $this->get_option( 'enabled' );\n\t\t$this->payment_action = $this->get_option( 'payment_action' );\n\t\t$this->txn_descriptor = $this->get_option( 'txn_descriptor' );\n\t\t$this->allow_card_saving = $this->get_option( 'allow_card_saving' ) === 'yes';\n\n\t\tforeach ( $this->get_gateway_form_fields() as $key => $options ) {\n\t\t\tif ( ! property_exists( $this, $key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$value = $this->get_option( $key );\n\n\t\t\tif ( 'checkbox' === $options['type'] ) {\n\t\t\t\t$value = 'yes' === $value;\n\t\t\t}\n\n\t\t\t$this->{$key} = $value;\n\t\t}\n\t}",
"function admin_display_payment_gateways()\n {\n $return = array (\n 'name' => $this->name,\n 'title' => 'CC - Manual Payment',\n );\n\n return $return;\n }",
"function bg_AddAdminSettings(){\n global $bg_optionGroup, $bg_optionName, $bg_page, $bg_sectionId, $bg_opts_apiKey;\n \n register_setting( $bg_optionGroup, $bg_optionName, 'bg_ValidateOptions' );\n add_settings_section($bg_sectionId, 'License Settings', 'bg_AddSettingsSectionHtml', $bg_page);\t\n add_settings_field($bg_opts_apiKey, 'Api Key', 'bg_AddApiKeySettingsFieldHtml', $bg_page, $bg_sectionId);\n}",
"function admin_custom_config()\n {\n $db = DataAccess::getInstance();\n\n $options = '';\n $current_currency = $this->get('currency');\n if (!$current_currency) {\n $current_currency = 'USD';\n $this->set('currency', 'USD');//default to USD\n }\n $count = 0;\n ksort(self::$_currency);\n foreach (self::$_currency as $key => $currency) {\n $selected = ($current_currency == $key) ? ' selected=\"selected\"' : '';\n $options .= \"\n\t\t\t\t<option value='$key'$selected>$key - $currency</option>\";\n }\n\n $tpl = new geoTemplate('admin');\n $tpl->assign('payment_type', self::gateway_name);\n\n $tooltips['installation_id'] = geoHTML::showTooltip('Worldpay Installation ID', 'This the id you were given by Worldpay. This id will identify a user you submit to Worldpay to collect funds from.');\n $tooltips['callback_password'] = geoHTML::showTooltip('Worldpay Callback Password', 'This is the password that you can optionally set at Worldpay to verify that Worldpay is the one returning an authorization. You can leave this field blank and the password will not be checked on any Worldpay callback procedures.');\n $tpl->assign('tooltips', $tooltips);\n\n $tpl->assign('commonAdminOptions', $this->_showCommonAdminOptions());\n\n $values['installation_id'] = geoString::specialChars($this->get('installation_id'));\n $tpl->assign('currency_options', $options);\n $values['callback_password'] = geoString::specialChars($this->get('callback_password'));\n $tpl->assign('values', $values);\n\n\n return $tpl->fetch('payment_gateways/worldpay.tpl');\n }",
"function estate_plus_settings_init(){\n\tsiteorigin_settings_add_field('general', 'footer_attribution', 'checkbox');\n\tsiteorigin_settings_add_field('general', 'logo_retina', 'media');\n\tsiteorigin_settings_add_field('general', 'ajax_comments', 'checkbox');\n\tsiteorigin_settings_add_field('layout', 'responsive', 'checkbox');\n\tsiteorigin_settings_add_field('layout', 'responsive_menu', 'checkbox');\n}",
"public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }",
"public function __construct() {\n \n $this->id = 'wcpg-pay-on-credit'; // payment gateway plugin ID\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->has_fields = true; // in case you need a custom credit card form\n $this->method_title = 'Pay On Credit Gateway';\n $this->method_description = 'Pay on credit gateway'; // will be displayed on the options page\n $this->domain = 'wcpg-pay-on-credit';\n \n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n\n\n // Define \"payment duration\" radio buttons options field\n $this->options = array(\n '4' => __( '4 Months Payment', $this->domain ),\n '6' => __( '6 Months Payment', $this->domain ),\n ); \n \n // Method with all the options fields\n $this->init_form_fields();\n \n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->instructions = $this->get_option( 'instructions' );\n $this->order_status = $this->get_option( 'order_status' );\n $this->status_text = $this->get_option( 'status_text' );\n $this->enabled = $this->get_option( 'enabled' );\n \n // This action hook saves the settings\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n add_action( 'woocommerce_checkout_create_order', array( $this, 'save_order_payment_type_meta_data' ), 10, 2 );\n add_filter( 'woocommerce_get_order_item_totals', array( $this, 'display_payment_duration_order_item_totals'), 10, 3 );\n add_action( 'woocommerce_admin_order_data_after_billing_address', array( $this, 'display_payment_type_order_edit_pages'), 10, 1 );\n add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );\n\n // Customer Emails\n add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); \n \n // We need custom JavaScript to obtain a token\n add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\n \n \n \t\t}",
"function bdpp_register_settings() {\n\tregister_setting( 'bdpp_settings', 'bdpp_opts', 'bdpp_validate_settings' );\n}",
"function janrain_capture_widget_add_settings($settings = array()) {\n // Widget settings\n $janrain_capture_main = variable_get('janrain_capture_main2', array());\n $janrain_capture_main = array_merge($janrain_capture_main, variable_get('janrain_capture_ui2', array()));\n $janrain_capture_optional = variable_get('janrain_capture_federate2', array());\n $janrain_capture_optional = array_merge($janrain_capture_optional, variable_get('janrain_capture_backplane2', array()));\n\n if (!empty($janrain_capture_optional['capture_sso_address'])) {\n $settings['janrainCapture']['sso_address'] = $janrain_capture_optional['capture_sso_address'];\n }\n\n if (isset($janrain_capture_optional['backplane_enabled'])\n && !empty($janrain_capture_optional['backplane_bus_name'])) {\n $settings['janrainCapture']['backplane_enabled'] = $janrain_capture_optional['backplane_enabled'];\n $settings['janrainCapture']['backplane_bus_name'] = $janrain_capture_optional['backplane_bus_name'];\n }\n\n // Add settings array into a JS variable\n drupal_add_js($settings, array('type' => 'setting', 'every_page' => TRUE, 'preprocess' => FALSE, 'weight' => 0, 'scope' => 'header',));\n}",
"public function admin_options()\n {\n ?>\n <h3><?php _e('PAYSTO', 'woocommerce'); ?></h3>\n <p><?php _e('Settings payment recieve from PAYSTO system.', 'woocommerce'); ?></p>\n\n <?php if ($this->is_valid_for_use()): ?>\n\n <table class=\"form-table\">\n\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n\n <?php else: ?>\n <div class=\"inline error\"><p>\n <strong><?php _e('Gate swich off', 'woocommerce'); ?></strong>:\n <?php _e('PAYSTO not support currency used in your store.', 'woocommerce'); ?>\n </p></div>\n <?php\n endif;\n\n }",
"function set_gateway($gateway_slug, $args) {\n\n // Set payments gateway\n md_set_gateway($gateway_slug, $args);\n \n }",
"function urlConfigForm()\r\n\t{\r\n\t\t/*\tAdd the field for the back link configuration\t*/\r\n\t\tadd_settings_field('wpklikandpay_payment_success', __('Url de retour pour un paiement accepté', 'wpklikandpay'), array('wpklikandpay_option', 'urlSuccess'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t\tadd_settings_field('wpklikandpay_payment_canceled', __('Url de retour pour un paiement annulé', 'wpklikandpay'), array('wpklikandpay_option', 'urlCanceled'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t\tadd_settings_field('wpklikandpay_payment_declined', __('Url de retour pour un paiement refusé', 'wpklikandpay'), array('wpklikandpay_option', 'urlDeclined'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t}",
"function storeConfigForm()\r\n\t{\r\n\t\t/*\tAdd the field for the store configuration\t*/\r\n\t\tadd_settings_field('wpklikandpay_store_tpe', __('Numéro de TPE de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeTpe'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_rang', __('Numéro de rang de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeRang'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_id', __('Identifiant de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeIdentifier'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\tadd_settings_field('wpklikandpay_environnement', __('Environnement de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'environnement'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t}"
]
| [
"0.6881864",
"0.68433183",
"0.6687855",
"0.66803366",
"0.6608726",
"0.6338715",
"0.6320049",
"0.6305798",
"0.62467486",
"0.617476",
"0.6163742",
"0.61316097",
"0.60536873",
"0.60492176",
"0.60489947",
"0.6018525",
"0.6011749",
"0.5989323",
"0.5943869",
"0.59336823",
"0.5922988",
"0.59112734",
"0.5903455",
"0.58961165",
"0.58902633",
"0.5853256",
"0.58438253",
"0.5843481",
"0.58213484",
"0.5815246"
]
| 0.7122651 | 0 |
Opens up a directory handle to be used in subsequent closedir, readdir, and rewinddir calls. | function opendir(string $directory, $context = null)
{
error_clear_last();
if ($context !== null) {
$safeResult = \opendir($directory, $context);
} else {
$safeResult = \opendir($directory);
}
if ($safeResult === false) {
throw DirException::createFromPhpError();
}
return $safeResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function open() {\n $this->setPointer(opendir($this->directory->getPath()));\n return parent::open();\n }",
"public function test_opendir_family() {\n $uri = 'test://opendir_test/dir1/dir2/dir3/dir4/dir5';\n\n mkdir($uri, 0777, true);\n // $this->assertTrue(mkdir($uri), 0777, true); // Whoa! This does not work for some reason\n $this->assertTrue(is_dir('test://opendir_test'));\n $this->assertFileExists($uri);\n\n $this->assertThat($dh = opendir('test://opendir_test/dir1/dir2'),\n $this->logicalNot(\n $this->EqualTo(false)\n )\n );\n\n $dirs = array();\n while (($d = readdir($dh)) !== false) {\n array_push($dirs, $d);\n }\n\n $this->assertEquals(3, count($dirs)); // Expecing: '.', '..', and 'dir3'\n $this->assertEquals('dir3', $dirs[2]); // $dir[2] should be 'dir3\n\n /**\n * Test rewinddir() call\n */\n $dirs = array();\n while (($d = readdir($dh)) !== false) {\n array_push($dirs, $d);\n }\n\n $this->assertEquals(0, count($dirs)); // Expecing: '.', '..', and 'dir3'\n\n rewinddir($dh);\n\n $dirs = array();\n while (($d = readdir($dh)) !== false) {\n array_push($dirs, $d);\n }\n\n $this->assertEquals(3, count($dirs)); // Expecing: '.', '..', and 'dir3'\n $this->assertEquals('dir3', $dirs[2]); // $dir[2] should be 'dir3\n\n closedir($dh);\n }",
"function openDirectory(){\n if (!file_exists(\"./data\")){ # If file doesn't exist return false\n $handleDir = false;\n return $handleDir;\n }\n else{\n $handleDir = opendir(\"./data\");\n /* I'm checking if the handleDir == returns false for some other reason in connection.php. This is part of validation.php,\n which allows me to present an error message above the form (nb if opendir can't connect it returns a boolean value of false) */\n return $handleDir;\n }\n}",
"function open_dir($dir, $newdir) {\n\t\tif( file_exists( $dir ) && file_exists( $newdir ) ) {\n\t\t\t$open_dir = opendir( $dir );\n\t\t\twhile ( false !== ($file = readdir( $open_dir )) ) {\n\t\t\t\tif( $file != \".\" && $file != \"..\" ) {\n\t\t\t\t\tif( @filetype( $dir . \"/\" . $file . \"/\" ) == \"dir\" ) {\n\t\t\t\t\t\tif( ! file_exists( $newdir . \"/\" . $file . \"/\" ) ) {\n\t\t\t\t\t\t\tmkdir( $newdir . \"/\" . $file . \"/\" );\n\t\t\t\t\t\t\t@chmod( $newdir . \"/\" . $file, 0777 );\n\t\t\t\t\t\t\topen_dir( $dir . \"/\" . $file . \"/\", $newdir . \"/\" . $file . \"/\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcopy( $dir . \"/\" . $file, $newdir . \"/\" . $file );\n\t\t\t\t\t\t@chmod( $newdir . \"/\" . $file, 0666 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function openDir($dir, $recursive = false) {\n if (!is_dir($dir))\n throw new InvalidArgumentException(\"Invalid directory provided: $dir\");\n if (is_resource($this->dir_handle))\n closedir($this->dir_handle);\n $this->dir_path = (string)$dir;\n $this->dir_handle = opendir($this->dir_path);\n if (!$this->dir_handle)\n throw new InvalidArgumentException(\"Unable to open $dir\");\n $this->recursive = ($recursive !== false);\n }",
"public function opendir(int $ino_dir): ?int {\n return PHP_INT_MAX; // stateless fh.\n }",
"public function directoryMan($closeFlag){\n if($closeFlag){\n @closedir($this->openDir);\n return;\n //directory closed by request\n }\n \n // if not trying to close the directory, continue\n if(is_resource($this->openDir)){\n closedir($this->openDir);\n $this->openDir = opendir($this->wrkDir);\n }\n else{\n $this->openDir = opendir($this->wrkDir); \n } \n //report error if it didn't work\n if(!is_resource($this->openDir)){\n return FALSE; //couldn't open the directory\n }\n else{\n return TRUE;\n }\n }",
"public function dir_rewinddir() {}",
"public function dir_rewinddir() {\n // We could be more efficient if the user calls opendir() followed by\n // rewinddir() but you just can't help some people.\n $this->next_marker = null;\n $this->current_file_list = null;\n return true;\n }",
"private function &__getDir()\n\t{\n\t\tif(is_null($this->__dir))\n\t\t{\n\t\t\t$this->__dir = new Directory(dirname($this->_path) . DIRECTORY_SEPARATOR, false);\n\t\t}\n\n\t\treturn $this->__dir;\n\t}",
"public function createDir()\n\t{\n\t\tif (!Core_File::isDir($this->_dir))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tCore_File::mkdir($this->_dir, CHMOD, TRUE);\n\t\t\t} catch (Exception $e) {}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public static function wrap(array $handles) {\n\t\t$context = stream_context_create(array(\n\t\t\t'dir' => array(\n\t\t\t\t'handles' => $handles)\n\t\t));\n\t\tstream_wrapper_register('oniondir', '\\OCA\\Files_External_Cache\\Wrapper\\OnionDir');\n\t\t$wrapped = opendir('oniondir://', $context);\n\t\tstream_wrapper_unregister('oniondir');\n\t\treturn $wrapped;\n\t}",
"public function dir_readdir() {}",
"public function __construct($dir = null, $recursive = false) {\n if ($dir !== null)\n $this->openDir($dir, $recursive);\n }",
"public function rewind()\n \t{\n \t\t$handle = $this->getHandle();\n \t\t$handle->current = rewinddir($handle->resource);\n\t\twhile (!isset($handle->current) || $handle->current == '.' || $handle->current == '..') $handle->current = readdir($handle->resource);\n \t}",
"function LocalDir($path) {\n parent::FileList($path);\n $this->handle = opendir($this->path);\n }",
"function dba_open($path, $mode, $handlername, $param4) {}",
"public function createDirectory(DirectoryInterface $directory, DirectoryInterface $parent): DirectoryInterface;",
"public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }",
"public function getDir();",
"protected function createDirectory() {}",
"public function mkDir($path);",
"function smarty_core_create_dir_structure($params, &$smarty)\n{\n if (!file_exists($params['dir'])) {\n $_open_basedir_ini = ini_get('open_basedir');\n\n if (DIRECTORY_SEPARATOR=='/') {\n /* unix-style paths */\n $_dir = $params['dir'];\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(':', $_open_basedir_ini);\n }\n\n } else {\n /* other-style paths */\n $_dir = str_replace('\\\\','/', $params['dir']);\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {\n /* leading \"//\" for network volume, or \"[letter]:/\" for full path */\n $_new_dir = $_root_dir[1];\n /* remove drive-letter from _dir_parts */\n if (isset($_root_dir[3])) array_shift($_dir_parts);\n\n } else {\n $_new_dir = str_replace('\\\\', '/', getcwd()).'/';\n\n }\n\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(';', str_replace('\\\\', '/', $_open_basedir_ini));\n }\n\n }\n\n /* all paths use \"/\" only from here */\n foreach ($_dir_parts as $_dir_part) {\n $_new_dir .= $_dir_part;\n\n if ($_use_open_basedir) {\n // do not attempt to test or make directories outside of open_basedir\n $_make_new_dir = false;\n foreach ($_open_basedirs as $_open_basedir) {\n if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {\n $_make_new_dir = true;\n break;\n }\n }\n } else {\n $_make_new_dir = true;\n }\n\n if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {\n $smarty->trigger_error(\"problem creating directory '\" . $_new_dir . \"'\");\n return false;\n }\n $_new_dir .= '/';\n }\n }\n}",
"static public function newdir($dir, $depth=0) \n {\n if (is_file($dir)) return unlink($dir);\n // attempt to create the folder we want empty\n if (!$depth && !file_exists($dir)) {\n mkdir($dir, 0775, true);\n @chmod($dir, 0775); // let @, if www-data is not owner but allowed to write\n return;\n }\n // should be dir here\n if (is_dir($dir)) {\n $handle=opendir($dir);\n while (false !== ($entry = readdir($handle))) {\n if ($entry == \".\" || $entry == \"..\") continue;\n self::newDir($dir.'/'.$entry, $depth+1);\n }\n closedir($handle);\n // do not delete the root dir\n if ($depth > 0) rmdir($dir);\n // timestamp newDir\n else touch($dir);\n return;\n }\n }",
"public function releasedir(int $ino_dir, ?int $fh) {\n // no-op, because stateless.\n }",
"public abstract function getDirectory();",
"public function setDir($dir);",
"protected function _initFilesystem() {\n $this->_createWriteableDir($this->getTargetDir());\n $this->_createWriteableDir($this->getQuoteTargetDir());\n\n // Directory listing and hotlink secure\n $io = new Varien_Io_File();\n $io->cd($this->getTargetDir());\n if (!$io->fileExists($this->getTargetDir() . DS . '.htaccess')) {\n $io->streamOpen($this->getTargetDir() . DS . '.htaccess');\n $io->streamLock(true);\n $io->streamWrite(\"Order deny,allow\\nAllow from all\");\n $io->streamUnlock();\n $io->streamClose();\n }\n }",
"public function directory();",
"function setCwd($cwd);"
]
| [
"0.6588751",
"0.64178926",
"0.6296397",
"0.6232029",
"0.6189276",
"0.5973493",
"0.5918654",
"0.5767356",
"0.56934524",
"0.5535896",
"0.5446926",
"0.5340607",
"0.52894855",
"0.5261072",
"0.5229033",
"0.5205237",
"0.5199592",
"0.5177099",
"0.5131683",
"0.5101084",
"0.50993997",
"0.50631905",
"0.50621283",
"0.50436115",
"0.5034107",
"0.502719",
"0.49905556",
"0.49616987",
"0.4948712",
"0.49419123"
]
| 0.6482354 | 1 |
Sets up up the RuntimeStepTester. The specified container should have a self::CONFIG_TIMEOUT and a self::CONFIG_RETRY_INTERVAL parameter. | private function loadRuntimeStepTester(ContainerBuilder $container)
{
RuntimeStepTester::$timeout = $container->getParameter(self::CONFIG_TIMEOUT);
RuntimeStepTester::$interval = $container->getParameter(self::CONFIG_RETRY_INTERVAL);
RuntimeStepTester::$strictKeywords = $container->getParameter(self::CONFIG_STRICT_KEYWORDS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {\n\t\t\t\t$timeLimit = $parameters[\"taskManager\"][\"timeLimit\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY DAYS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxDays\"])) {\n\t\t\t\t$this->maxHistoryDays = (int)$parameters[\"taskManager\"][\"history\"][\"maxDays\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY RECORDS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxRecords\"])) {\n\t\t\t\t$this->maxHistoryRecords = (int)$parameters[\"taskManager\"][\"history\"][\"maxRecords\"];\n\t\t\t}\n\t\t}\n\n\t\tset_time_limit($timeLimit);\n\t}",
"public function setUp(): void\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $this->setConfig(Robo::config());\n }",
"public function setUp() : void\n {\n Config::setCategory('paths', [\n 'configs' => realpath(__DIR__ . '/../../configs'),\n 'root' => realpath(__DIR__ . '/../../../../../..'),\n 'src' => realpath(__DIR__ . '/../../../../../../src')\n ]);\n // Purposely set this to a weird value so we can test that it gets overwritten with the \"test\" environment\n $this->environment = new Environment();\n $this->container = new Container();\n $this->container->bindInstance(Environment::class, $this->environment);\n $this->container->bindInstance(BootstrapperCache::class, $this->createMock(BootstrapperCache::class));\n $this->container->bindInstance(RouteCache::class, $this->createMock(RouteCache::class));\n $this->container->bindInstance(ViewCache::class, $this->createMock(ViewCache::class));\n $this->container->bindInstance(IMigrator::class, $this->createMock(IMigrator::class));\n $this->container->bindInstance(FixMigrationsCommand::class, $this->createMock(FixMigrationsCommand::class));\n $this->container->bindInstance(IContainer::class, $this->container);\n\n // Setup the bootstrappers\n $bootstrapperRegistry = new BootstrapperRegistry();\n $bootstrapperDispatcher = new BootstrapperDispatcher(\n $this->container,\n $bootstrapperRegistry,\n new BootstrapperResolver()\n );\n $bootstrapperRegistry->registerEagerBootstrapper(self::$bootstrappers);\n $bootstrapperDispatcher->dispatch(false);\n\n parent::setUp();\n }",
"protected function setUp(): void\n {\n $this->container = new Container();\n }",
"protected function setupContainer(Container $container)\n {\n $this->container = $container;\n\n if (! $this->container->bound('config')) {\n $this->container->instance('config', new Fluent);\n }\n }",
"public function setUp()\r\n {\r\n $this->config += [\r\n 'http_errors' => false,\r\n 'timeout' => 10.0,\r\n 'base_uri' => $this->description->getBaseUri(),\r\n 'apiKey' => 'XXX',\r\n 'projectId' => 000,\r\n ];\r\n }",
"public function setUp()\n {\n $this->client = static::createClient();\n $this->container = $this->client->getContainer();\n }",
"protected function setUp(): void\n {\n if (!self::TEST_ENABLE) {\n $this->markTestSkipped('Test disabled.');\n }\n $this->config = new Config(\n Config::ENV_CLI,\n __DIR__ . self::CONFIG_PATH\n );\n $this->container = new Container(\n $this->config->getSettings(Config::_SERVICES)\n );\n $this->userRepository = new Users($this->container);\n $this->instance = new Core($this->container);\n }",
"protected function setUp()\n {\n $container = include 'config/container.php';\n InsideConstruct::setContainer($container);\n }",
"protected function setUp()\n {\n $this->container = include './config/container.php';\n }",
"protected function setUp(): void\n {\n if (!class_exists(AbstractQueuedJob::class)) {\n static::$fixture_file = '';\n parent::setUp();\n $this->markTestSkipped(\"This test requires queuedjobs\");\n }\n parent::setUp();\n\n DBDatetime::set_mock_now('2014-01-05 12:00:00');\n\n // This doesn't play nicely with PHPUnit\n Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false);\n }",
"public function setUp()\n {\n $delegate = new \\Rougin\\Slytherin\\Container\\Container;\n\n $this->container = new \\Rougin\\Slytherin\\Container\\ReflectionContainer($delegate);\n }",
"protected function setUp(): void\n {\n parent::setup();\n\n $configurationManager = $this->objectManager->get(ConfigurationManager::class);\n $this->zoomAccountIdentifier = (string)$configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'PunktDe.Zoom.Api.zoomAccountIdentifier');\n\n if ($this->zoomAccountIdentifier === '') {\n $this->markTestSkipped('No zoom-api configuration present');\n }\n\n try {\n $this->meetingResource = $this->objectManager->get(MeetingResource::class);\n $this->meetingRegistrantResource = $this->objectManager->get(MeetingRegistrantResource::class);\n } catch (ZoomApiConfigurationException $e) {\n $this->markTestSkipped('No zoom-api configuration present');\n }\n }",
"public function setUp(): void {\n // Set API details in config.\n set_config('turnitinapiurl', 'http://www.example.com', 'plagiarism_turnitinsim');\n set_config('turnitinapikey', 1234, 'plagiarism_turnitinsim');\n set_config('turnitinenablelogging', 0, 'plagiarism_turnitinsim');\n }",
"protected function setContainer() {\n $router = $this->getMockBuilder(TestRouterInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n $router->expects($this->any())\n ->method('matchRequest')\n ->willReturn([\n '_raw_variables' => new ParameterBag([]),\n '_route' => 'test',\n ]);\n\n $validator = $this->createMock(PathValidatorInterface::class);\n\n $fsi = $this->getMockBuilder(FacetSourcePluginInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n $fsi->method('getPath')\n ->willReturn('/test');\n\n $manager = $this->getMockBuilder(FacetSourcePluginManager::class)\n ->disableOriginalConstructor()\n ->getMock();\n $manager->method('createInstance')\n ->willReturn($fsi);\n $manager->method('hasDefinition')\n ->with('facet_source__dummy')\n ->willReturn(TRUE);\n\n $facetentity = $this->getMockBuilder(Facet::class)\n ->disableOriginalConstructor()\n ->getMock();\n $facetentity->method('id')\n ->willReturn('king');\n\n $storage = $this->createMock(EntityStorageInterface::class);\n $storage->expects($this->any())\n ->method('loadByProperties')\n ->willReturn([$facetentity]);\n $em = $this->getMockBuilder(EntityTypeManagerInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n $em->expects($this->any())\n ->method('getStorage')\n ->willReturn($storage);\n $this->entityManager = $em;\n\n $container = new ContainerBuilder();\n $container->set('router.no_access_checks', $router);\n $container->set('plugin.manager.facets.facet_source', $manager);\n $container->set('entity_type.manager', $em);\n $container->set('path.validator', $validator);\n \\Drupal::setContainer($container);\n }",
"public function configureContainer(ContainerConfigurator $container): void;",
"public function setUp()\n {\n $configuration = $this->getMock('Lunr\\Core\\Configuration');\n\n $map = [\n [ 'default_webpath', '/path' ],\n [ 'default_domain', 'www.domain.com' ],\n [ 'default_port', 666 ],\n [ 'default_url', 'http://www.domain.com:666/path/' ],\n ];\n\n $configuration->expects($this->any())\n ->method('offsetGet')\n ->will($this->returnValueMap($map));\n\n $this->configuration = $configuration;\n\n $this->class = new ResqueRequest($this->configuration);\n $this->reflection = new ReflectionClass('Lunr\\Spawn\\ResqueRequest');\n }",
"public static function setUpBeforeClass()\n\t{\n\t\tif (is_null(static::$container))\n\t\t{\n\t\t\tstatic::$container = Container::getInstance('com_akeebasubs', [\n\t\t\t\t'platformClass' => 'Akeeba\\\\Subscriptions\\\\Tests\\\\Stubs\\\\CustomPlatform'\n\t\t\t]);\n\t\t}\n\n\t\t// Prime the component parameters\n\t\tstatic::$container->params->get('currency');\n\t}",
"public function load(array $config, ContainerBuilder $container)\n {\n $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/services'));\n $loader->load('core.xml');\n\n if (isset($config['tester']) && isset($config['tester']['step']) && isset($config['tester']['step']['class']))\n {\n $container->setParameter('behat.tester.step.class', $config['tester']['step']['class']);\n } else\n {\n $container->setParameter('behat.tester.step.class', $container->getParameter('behat.chained_steps_extension.tester.step.class'));\n }\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n // Clean up from old tests\n File::deleteDirectory($this->getTempDirectory());\n\n $this->setUpTempTestFiles();\n\n $this->artisan(GlideClear::class);\n\n config(['filesystems.disks.assets' => [\n 'driver' => 'local',\n 'root' => $this->getTempDirectory('assets'),\n 'url' => '/test',\n ]]);\n\n config()->set('statamic.assets.image_manipulation.secure', false);\n\n /** @var \\Statamic\\Assets\\AssetContainer $assetContainer */\n $this->assetContainer = (new AssetContainer)\n ->handle('test_container')\n ->disk('assets')\n ->save();\n }",
"private function init_checks() {\n\t\tif ( 'running' !== $this->docker::container_status( $this->proxy_type ) ) {\n\t\t\t/**\n\t\t\t * Checking ports.\n\t\t\t */\n\t\t\t@fsockopen( 'localhost', 80, $port_80_exit_status );\n\t\t\t@fsockopen( 'localhost', 443, $port_443_exit_status );\n\n\t\t\t// if any/both the port/s is/are occupied.\n\t\t\tif ( ! ( $port_80_exit_status && $port_443_exit_status ) ) {\n\t\t\t\tEE::error( 'Cannot create/start proxy container. Please make sure port 80 and 443 are free.' );\n\t\t\t} else {\n\n\t\t\t\tif ( ! is_dir( EE_CONF_ROOT . '/traefik' ) ) {\n\t\t\t\t\tEE::debug( 'Creating traefik folder and config files.' );\n\t\t\t\t\tmkdir( EE_CONF_ROOT . '/traefik' );\n\t\t\t\t}\n\n\t\t\t\ttouch( EE_CONF_ROOT . '/traefik/acme.json' );\n\t\t\t\tchmod( EE_CONF_ROOT . '/traefik/acme.json', 600 );\n\t\t\t\t$traefik_toml = new Site_Docker();\n\t\t\t\tfile_put_contents( EE_CONF_ROOT . '/traefik/traefik.toml', $traefik_toml->generate_traefik_toml() );\n\n\t\t\t\t$ee_traefik_command = 'docker run -d -p 8080:8080 -p 80:80 -p 443:443 -l \"traefik.enable=false\" -l \"created_by=EasyEngine\" -v /var/run/docker.sock:/var/run/docker.sock -v ' . EE_CONF_ROOT . '/traefik/traefik.toml:/etc/traefik/traefik.toml -v ' . EE_CONF_ROOT . '/traefik/acme.json:/etc/traefik/acme.json -v ' . EE_CONF_ROOT . '/traefik/endpoints:/etc/traefik/endpoints -v ' . EE_CONF_ROOT . '/traefik/certs:/etc/traefik/certs -v ' . EE_CONF_ROOT . '/traefik/log:/var/log --name ee_traefik easyengine/traefik';\n\n\t\t\t\tif ( $this->docker::boot_container( $this->proxy_type, $ee_traefik_command ) ) {\n\t\t\t\t\tEE::success( \"$this->proxy_type container is up.\" );\n\t\t\t\t} else {\n\t\t\t\t\tEE::error( \"There was some error in starting $this->proxy_type container. Please check logs.\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->site_root = WEBROOT . $this->site_name;\n\t\t$this->create_site_root();\n\t}",
"protected function setUp()\n {\n parent::setUp();\n $this->container = $this->createContainer();\n $this->compilerPass = new DecorateTranslatorCompilerPass();\n $this->container->addCompilerPass($this->compilerPass);\n }",
"public function setUp()\n {\n // Create a new Laravel container instance.\n $container = new Container;\n\n // Resolve the pricing calculator (and any type hinted dependencies)\n // and set to class attribute.\n $this->priceHolder = $container->make('PAMH\\\\PriceHolder');\n }",
"protected function setUp(): void\n {\n $this->container = new Container();\n $this->appBuilder = new ConsoleApplicationBuilder($this->container);\n $this->input = new Input('foo');\n $this->container->bindInstance(IServiceResolver::class, $this->container);\n $this->container->bindInstance(Input::class, $this->input);\n $this->container->bindInstance(IOutput::class, $this->createMock(IOutput::class));\n }",
"public function initialize() {\n\t\t$this->settings = $this->configurationManager->getConfiguration(\\F3\\FLOW3\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'FLOW3');\n\n\t\t$environment = new \\F3\\FLOW3\\Utility\\Environment();\n\t\t$environment->setContext($this->context);\n\t\t$environment->setTemporaryDirectoryBase($this->settings['utility']['environment']['temporaryDirectoryBase']);\n\t\t$environment->initializeObject();\n\n\t\t$this->staticObjectContainerPathAndFilename = $environment->getPathToTemporaryDirectory() . 'StaticObjectContainer.php';\n\n\t\tif ($this->settings['monitor']['detectClassChanges'] === FALSE && file_exists($this->staticObjectContainerPathAndFilename)) {\n\t\t\trequire_once($this->staticObjectContainerPathAndFilename);\n\t\t\tif (class_exists($this->staticObjectContainerClassName, FALSE)) {\n\t\t\t\t$this->objectContainer = new $this->staticObjectContainerClassName;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->objectContainer === NULL) {\n\t\t\t$rawFLOW3ObjectConfigurations = $this->configurationManager->getConfiguration(\\F3\\FLOW3\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_OBJECTS, 'FLOW3');\n\t\t\t$parsedObjectConfigurations = array();\n\t\t\tforeach ($rawFLOW3ObjectConfigurations as $objectName => $rawFLOW3ObjectConfiguration) {\n\t\t\t\t$parsedObjectConfigurations[$objectName] = \\F3\\FLOW3\\Object\\Configuration\\ConfigurationBuilder::buildFromConfigurationArray($objectName, $rawFLOW3ObjectConfiguration, 'FLOW3 Object Manager (pre-initialization)');\n\t\t\t}\n\t\t\t$this->objectContainer = new \\F3\\FLOW3\\Object\\Container\\DynamicObjectContainer();\n\t\t\t$this->objectContainer->setObjectConfigurations($parsedObjectConfigurations);\n\t\t}\n\n\t\t$this->objectContainer->injectSettings($this->configurationManager->getConfiguration(\\F3\\FLOW3\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS));\n\t\t$this->objectContainer->setInstance('F3\\FLOW3\\Object\\ObjectManagerInterface', $this);\n\t\t$this->objectContainer->setInstance('F3\\FLOW3\\Resource\\ClassLoader', $this->classLoader);\n\t\t$this->objectContainer->setInstance('F3\\FLOW3\\Utility\\Environment', $environment);\n\n\t\t$this->objectContainer->setInstance('F3\\FLOW3\\Configuration\\ConfigurationManager', $this->configurationManager);\n\t\t$this->configurationManager->injectEnvironment($environment);\n\t}",
"protected function prepareRealTestEnvironment() {}",
"private function prepareContainer() {\n $container_class = 'Drupal\\Core\\DependencyInjection\\Container';\n $methods = get_class_methods($container_class);\n /** @var ContainerInterface $container */\n $this->containerMock = $container = $this->getMockBuilder($container_class)\n ->disableOriginalConstructor()\n ->setMethods($methods)\n ->getMock();\n \\Drupal::setContainer($container);\n\n $this->containerMock->method('get')->willReturnCallback([\n $this,\n 'containerMockGetServiceCallback'\n ]);\n }",
"public static function setupDependencyInjection(Container $container)\n {\n\n }",
"public function setUp()\n {\n $this->app = new Container();\n }",
"public function setUp()\n {\n parent::setUp();\n\n $this->manager = $this->app->make(\\Arcanedev\\EmbedVideo\\Contracts\\ParserManager::class);\n }"
]
| [
"0.5324337",
"0.5171487",
"0.5152415",
"0.50935286",
"0.50864893",
"0.5072108",
"0.5022258",
"0.49559757",
"0.49261847",
"0.49105906",
"0.49076244",
"0.48853153",
"0.48548472",
"0.48278746",
"0.48096687",
"0.47865194",
"0.47707707",
"0.47438115",
"0.4732802",
"0.47180116",
"0.47111392",
"0.46883854",
"0.46806312",
"0.4668814",
"0.46623075",
"0.46430394",
"0.46395126",
"0.46278042",
"0.4625983",
"0.46227047"
]
| 0.73059136 | 0 |
Download images and replaces urls in the styles | function style_url_replace( $match ) {
global $snoopy, $download_path, $downloaded_files;
$relative = $match[1];
$image = convertLink( $match[1] );
if ( in_array( $image, array_keys( $downloaded_files ) ) ) {
$filename = $downloaded_files[$image];
} else {
$ext = end( explode( '.', $image ) );
$name = time();
$snoopy->fetch( $image );
$filename = $download_path.$name.'.'.$ext;
$downloaded_files[$image] = $filename;
// can we handle fwrite/fopen failures in a better way?
$fp = @fopen( $filename, 'wb' );
@fwrite( $fp, $snoopy->results, strlen( $snoopy->results ) );
@fclose( $fp );
}
return 'url('.$filename.')';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n $sImgUrl = PH7_URL_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n\n if ($this->isDataUriEligible($sImgPath)) {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . Optimization::dataUri($sImgPath, $this->oFile) . ')',\n $this->sContents\n );\n } else {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . $sImgUrl . ')',\n $this->sContents\n );\n }\n }\n }",
"function cdn_html_alter_image_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#((<img\\s+|<img\\s+[^>]*\\s+)src\\s*=\\s*[\\\"|\\'])($url_prefix_regex)([^\\\"|^\\']*)([\\\"|\\'])#i\";\n _cdn_html_alter_file_url($html, $pattern, 0, 4, 5, 1, '');\n}",
"function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}",
"protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}",
"function url_images(): string\n{\n return \\plugins_url(\"images/\", BOOKCLUBFILE);\n}",
"protected function combineImages() {}",
"function getImagesDownloadPage($imageUrls){\n ob_start();\n include_once('images-download-tpl.php');\n return ob_get_clean();\n}",
"public function getImages(string ...$options)\n {\n list($url, $dir) = $options;\n $this->code = $this->grabbingSite($url);\n $this->imageDirectory = !$dir ? $this->imageDirectory : $dir;\n $this->host = parse_url($url, PHP_URL_HOST);\n $this->scheme = parse_url($url, PHP_URL_SCHEME) . '://';\n\n $this->saveImages();\n }",
"public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}",
"public function getImageUrl();",
"function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}",
"public function actionImg(){\n if (!isset($_GET['f'])) exit;\n $size = 200;\n if (isset($_GET['s'])) $size = $_GET['s'];\n $filename = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"..\" . DIRECTORY_SEPARATOR . Yii::app()->params['coverPhotos'].substr($_GET['f'], 0, 2). DIRECTORY_SEPARATOR.$_GET['f'];\n if (!file_exists($filename)) exit;\n \n $type = exif_imagetype($filename);\n \n Yii::app()->clientScript->reset();\n $this->layout = 'none'; // template blank\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: header(\"Content-Type: image/jpg\"); break;\n\t\t\tcase IMAGETYPE_PNG: header(\"Content-Type: image/png\"); break;\n\t\t\tcase IMAGETYPE_GIF: header(\"Content-Type: image/gif\"); break;\n\t\t}\n\t\t\n header(\"Content-Description: Remote Image\");\n \n list($width, $height) = getimagesize($filename);\n $r = $width / $height;\n \n $oldMin = ($width > $height ? $height : $width);\n if ($oldMin > $size) {\n // don't do enything\n print file_get_contents($filename);\n exit;\n }\n \n if ($width > $height) {\n $newwidth = $size*$r;\n $newheight = $size;\n } else {\n $newheight = $size/$r;\n $newwidth = $size;\n }\n\t\t\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: $src = imagecreatefromjpeg($filename); break;\n\t\t\tcase IMAGETYPE_PNG: $src = imagecreatefrompng($filename); break;\n\t\t\tcase IMAGETYPE_GIF: $src = imagecreatefromgif($filename); break;\n\t\t}\n\t\t\n $dst = imagecreatetruecolor($newwidth, $newheight);\n fastimagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height, 2);\n \n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: @imagejpeg($dst); break;\n\t\t\tcase IMAGETYPE_PNG: @imagepng($dst); break;\n\t\t\tcase IMAGETYPE_GIF: @imagegif($dst); break;\n\t\t}\n\t\t\n imagedestroy($dst);\n exit;\n }",
"function cleanup_theme_images($old_url)\n{\n\t$files_referenced=collapse_1d_complexity('path',$GLOBALS['SITE_DB']->query_select('theme_images',array('DISTINCT path')));\n\n\t$themes=find_all_themes();\n\tforeach (array_keys($themes) as $theme)\n\t{\n\t\t$files_existing=get_image_paths(get_custom_base_url().'/themes/'.rawurlencode($theme).'/images_custom/',get_custom_file_base().'/themes/'.$theme.'/images_custom/');\n\n\t\tforeach (array_keys($files_existing) as $path)\n\t\t{\n\t\t\t$path=str_replace(get_custom_file_base().'/','',filter_naughty($path));\n\t\t\t$encoded_path=substr($path,0,strrpos($path,'/')+1).rawurlencode(substr($path,strrpos($path,'/')+1));\n\t\t\tif ((!in_array($path,$files_referenced)) && (!in_array($encoded_path,$files_referenced)) && (($old_url==$path) || ($old_url==$encoded_path)))\n\t\t\t{\n\t\t\t\t@unlink(get_custom_file_base().'/'.$path);\n\t\t\t\tsync_file($path);\n\t\t\t}\n\t\t}\n\t}\n}",
"function image_link($imagename) {\r\n if (is_null($this->imagepath[$imagename]))\r\n {\r\n\tif ($this->monda && ($imagename == \"rss\")) {\r\n\t $path = $this->siteurl . '/wp-includes/images/rss.png';\r\n\t} else {\r\n \t $path = $this->image_url . $imagename . '.png';\r\n\t}\r\n\tif (wp_remote_fopen($path)) {\r\n\t $this->imagepath[$imagename] = $path;\r\n\t}\r\n\telse {\r\n\t $this->imagepath[$imagename] = $this->image_url . 'unknown.png';\r\n\t}\r\n }\r\n return $this->imagepath[$imagename];\r\n }",
"function imageBook($url) {\n\tif (File::exists(base_path() . '/public/resourcebook/' . $url)) {\n\t\treturn Asset('resourcebook/' . $url);\n\t} else {\n\t\treturn Asset('resourcebook/question-mark.png');\n\t}\n}",
"function export_theme_images()\n{\n header('Content-Type: application/octet-stream' . '; authoritative=true;');\n header('Content-Disposition: attachment; filename=\"theme_images.tar\"');\n\n require_code('tar');\n require_code('files');\n $my_tar = tar_open(null, 'wb');\n $theme_images = $GLOBALS['SITE_DB']->query_select('theme_images', array('DISTINCT id'));\n foreach ($theme_images as $theme_image) {\n $path = rawurldecode(find_theme_image($theme_image['id'], true, true));\n if (($path != '') && (substr($path, 0, strlen('themes/default/images/')) != 'themes/default/images/')) {\n tar_add_file($my_tar, $theme_image['id'] . '.' . get_file_extension($path), $path, 0644, null, true);\n }\n }\n tar_close($my_tar);\n}",
"function file_replace( $match ) {\r\n global $snoopy;\r\n\r\n // Href was already converted to the proper server path\r\n preg_match( '/href\\s*=\\s*[\\'\\\"]?(.*?)[\\'\\\" >]/', $match[0], $m );\r\n $href = $m[1];\r\n\r\n $snoopy->fetch( $href );\r\n\r\n return \"<style>\\r\\n\".$snoopy->results.\"</style>\\r\\n\";\r\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 }",
"private function download()\n {\n $response = $this->httpClient->request('GET', env('PHOTO_ENDPOINT'));\n $content = json_decode($response->getBody()->getContents());\n\n if (! json_last_error() and property_exists($content, 'images')) {\n\n $requests = function ($images) {\n foreach ($images as $image) {\n yield new \\GuzzleHttp\\Psr7\\Request('GET', $image->url);\n }\n };\n\n $pool = new Pool($this->httpClient, $requests($content->images), [\n 'concurrency' => count($content->images),\n 'fulfilled' => function ($response, $index) use ($content) {\n $exp = explode('/', $content->images[$index]->url);\n\n $imageId = end($exp);\n\n $fileName = env('PHOTO_PATH') . $imageId;\n\n if (! Storage::exists($fileName)) {\n Storage::put($fileName, $response->getBody()->getContents(), 'public');\n }\n },\n 'rejected' => function ($reason, $index) {\n die('fail');\n },\n ]);\n\n $promise = $pool->promise();\n $promise->wait();\n }\n }",
"function getUrlImages($parser, $url) {\n global $alreadyFoundImages;\n\n $imageArray = $parser->getImgTags();\n foreach ($imageArray as $image) {\n $src = $image->getAttribute(\"src\");\n $alt = $image->getAttribute(\"alt\");\n $title = $image->getAttribute(\"title\");\n\n if (!$title && !$alt) {\n continue;\n }\n\n $src = convertRealtiveToAbsoluteUrl($src, $url);\n\n // avoiding to display images multiple times\n if (!in_array($src, $alreadyFoundImages)) {\n $alreadyFoundImages[] = $src;\n\n insertImageInDatabase($url, $src, $alt, $title);\n }\n }\n}",
"public function Download($comic)\n {\n if (!($comic['url'] && ($comic['active'] == 1)))\n return;\n\n $this->DebugMsg(\"Downloading {$comic['name']} (id: {$comic['comic_id']}; mode: {$comic['fetch_mode']})...\");\n\n switch($comic['fetch_mode'])\n {\n // generic comic fetch: download page, then find strip files.\n case 1:\n if (!$this->GetComic($comic['comic_id'], $comic['url'], $comic['file_path'], $comic['num_files'], $comic['min_size']))\n $this->NotFound($comic);\n\n break;\n\n // this is for comics where the main page has a bunch of links, and each link must be accessed separately. Never more than two pages deep.\n // the file_path field in the DB can contain 2 parts:\n // - match pattern for the script/image URLs (including one set of parens that denote the url to execute, prefixed by the base url) from the main page retrieved\n // - (optional) match pattern for any images that are to be retrieved from the second document retrieved (absolute or relative URLs)\n case 2:\n $script = $this->GetFile($comic['url']);\n\t$searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // prepend the base of the script URL if there was no http in the target (also below). assumes $m starts with a /\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $internalScript, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $internalReferer), $comic['comic_id'], FindTitleTag($im, $internalScript), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n // the Cheezburger sites. These pages have lots of images and lots of structure so it's not easy to haul stuff out without DOM manipulation.\n case 3:\n $url = $comic['url'];\n $stopImage = $comic['file_path'];\n $newStopImage = null;\n $foundStopImage = false;\n $count = 0;\n $page = 1;\n\n while((!$foundStopImage) && $count < $comic['num_files'])\n {\n if ($this->testing)\n $this->DebugMsg(\" - Loading {$url}...\");\n\n $dom = @DOMDocument::loadHTML($this->GetFile($url));\n $xp = new DOMXpath($dom);\n\n $item = $xp->evaluate(\"//div[@class = 'post-asset-inner']\");\n foreach($item as $i)\n {\n $srcArray = $title = $id = $src = null;\n\n $data = $i->getElementsByTagName('img');\n if ($data->length > 0)\n {\n $d = $data->item(0);\n $id = $d->getAttribute('id');\n $src = $d->getAttribute('src');\n $title = $d->getAttribute('title');\n\n // if we've handled this image before for this site, then stop.\n if ($id == $stopImage)\n {\n $foundStopImage = true;\n break;\n }\n\n // set the new \"last seen image\" id so the script knows where to stop\n if (!$newStopImage)\n $newStopImage = $id;\n\n // add this image to the database\n if (!$this->ProcessComic($this->GetFile($src, $url), $comic['comic_id'], $title))\n $this->NotFound($comic);\n\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n\n // if there wasn't an image in the div, then handle video.\n else\n {\n $data = $i->getElementsByTagName('div');\n if ($data->length > 0)\n {\n $id = $data->item(0)->getAttribute('id');\n $iframe = $i->getElementsByTagName('iframe');\n\n // if there was no iframe, then go to the next one.\n if (!$iframe->length)\n continue;\n\n $title = $i->parentNode->parentNode->parentNode->getElementsByTagName('h2')->item(0)->getElementsByTagName('a')->item(0)->nodeValue;\n\n // pass the video init stuff to the video class framework\n $src = $iframe->item(0)->getAttribute('src');\n if ($videoObj = Video::init($src, $this))\n {\n // some videos have no functionality; if that's the case, continue.\n if ($videoObj->noData())\n continue;\n\n // don't add when testing...\n if ($this->testing)\n $this->DebugMsg(\" - Iframe link found: {$src} - {$title} - {$videoObj->getLink()} - {$videoObj->getMode(true)}\");\n else\n {\n if($fileName = $this->SaveFile($videoObj->getThumbfile(), $videoObj->getMd5()))\n {\n $this->DebugMsg(\" - Adding iframe link: {$src} - {$title} - {$videoObj->getLink()}\");\n $this->db->Execute(\"CALL ADDCOMIC({$comic['comic_id']}, '{$videoObj->getMd5()}', '{$videoObj->getImageMimeType()}', '{$this->db->escape($title)}', '{$videoObj->getLink()}', {$videoObj->getMode()})\");\n }\n }\n }\n // if there was no thumbnail, the next part will fail horribly, so notify my and skip this.\n else\n {\n $this->DebugMsg(\" - No thumbFile found, skipping this video: Source: {$src}, Title: {$title}, ID: {$id}, URL: {$comic['url']}\");\n $this->AddError($comic, '- No thumbFile found');\n $this->AddError($comic, \" * Source: {$src}\");\n $this->AddError($comic, \" * Title: {$title}\");\n $this->AddError($comic, \" * ID: {$id}\");\n $this->AddError($comic, \" * URL: {$comic['url']}\");\n continue;\n }\n }\n }\n }\n\n // if we haven't found the last image yet, then go to the next page.\n if (!$foundStopImage)\n $url = $comic['url'].'page/'.++$page;\n }\n\n // we save the id of the first image we saw so the script knows where to stop next time.\n if ((!$this->testing) && $newStopImage)\n $this->db->Execute(\"update comics set file_path = '{$newStopImage}' where comic_id = {$comic['comic_id']}\");\n\n break;\n\n // Baby Blues. From their site, not the King Features syndicated newspaper sites, which are nearly impossible to navigate (nb: not currently used)\n case 4:\n $this->GetComic($comic['comic_id'], $comic['url']);\n $searchParams = explode('|', $comic['file_path']);\n\n if (!(grep($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$searchParams[0]}\", $searchParams[1], $matches) && $this->ProcessComic($this->GetFile($matches[0], $comic['url']), $comic['comic_id'])))\n $this->NotFound($comic);\n\n break;\n\n // Oglaf.com. Another weird structure: main page refers to first page of a story, but there could be more, have to follow links.\n case 5:\n // hit the page first to create the session cookie, and to accept the \"over 18\" thing.\n $cookie = $this->DOWNLOAD_DIR.'/oglaf.cookie.txt';\n $this->GetComic($comic['comic_id'], $comic['url'], null, null, null, true, null, $cookie, \"--post-data 'over18=%C2%A0'\");\n\n $parsed_url = parse_url($comic['url']);\n $url = $parsed_url['host'].'/';\n $searchParams = explode('|', $comic['file_path']);\n do\n {\n $this->GetComic($comic['comic_id'], 'http://'.$url, null, null, null, true, null, $cookie);\n if (preg_match($searchParams[0], file_get_contents($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$url}index.html\"), $newUrl))\n $url = preg_filter($searchParams[1], $parsed_url['host'].'/$1', $newUrl[0]);\n else\n $url = '';\n } while ($url);\n\n if (!$this->GetComic($comic['comic_id'], null, $searchParams[2]))\n $this->NotFound($comic);\n\n break;\n\n // - this is identical to case 2, except the next level of matching occurs on the result of the first level of matching (allowing nested regexp processing\n // - levels of regexps must be separated by a pipe.\n case 6:\n $script = $this->GetFile($comic['url']);\n $searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // each of these will be regexp'ed again for the actual URLs.fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $m, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $comic['url']), $comic['comic_id'], FindTitleTag($im, $script), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n // this should work like case 2 if no second search param is provided.\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n }\n\n $this->DebugMsg(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n }",
"protected function _downloadCss() {\n try {\n $url = 'http://www.janolaw.de/agb-service/shops/janolaw.css';\n\n $content = $this->_getHelper()->getRemoteContent($url);\n\n $file = 'agbdownloader.css';\n $cssDir = Mage::getBaseDir('skin') . DS . 'frontend' . DS . 'base' . DS . 'default' . DS . 'css';\n $cssFile = $cssDir . DS . $file;\n\n if (!is_dir($cssDir)) {\n mkdir($cssDir, true);\n chmod($cssDir, 0755);\n }\n\n if (!file_exists($cssFile)) {\n file_put_contents($cssFile, $content);\n chmod($cssFile, 0644);\n }\n } catch (Janolaw_Agb_Model_MissingConfigException $e) {\n return null; // ignore it, as we have logged that before...\n } catch (Zend_Http_Client_Exception $e) {\n return null; // ignore it, as we have logged that before...\n } catch (Janolaw_Agb_Helper_HttpStatusNotSuccessfulException $e) {\n return null; // ignore it, as we have logged that before...\n } // don't catch other exceptions (e.g. Zend_Pdf_Exception may occur)\n }",
"private function pvs_fetch_images($strextraction, $iscss, $cssfile=''){\n\t\t// fetch images\n\t\t$this->idcounter +=1;\n\t\t$img=array();\n\t\tif ($iscss==TRUE) {\n\t\t\t$img[1]=array();\n\t\t\t$strextractionarr= explode('url(', $strextraction);\n\t\t\t$j=0;\n\t\t\t$countstrextractionarr = count($strextractionarr);\n\t\t\tif ($countstrextractionarr > 0) {\n\t\t\t\tfor($i = 1; $i < $countstrextractionarr; $i++) {\n\t\t\t\t\t$strextractionarr2= explode(')', $strextractionarr[$i]);\n\t\t\t\t\t$strextractionarrcand=$strextractionarr2[0];\n\t\t\t\t\t$strextractionarrcand=str_replace('\"', '', $strextractionarrcand);\n\t\t\t\t\t$strextractionarrcand=str_replace(\"'\", '', $strextractionarrcand);\n\t\t\t\t\tif (!strstr($strextractionarrcand, '.css'))\t{\n\t\t\t\t\t\t$img[1][$j]=$strextractionarrcand;\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$cssfilebits=explode('/', $cssfile);\n\t\t\t$cssfilebits[count($cssfilebits)-1] = '';\n\t\t\t$cssfilepath=implode('/', $cssfilebits);\n\t\t\t$cssfilerelpatharr=explode('/', $cssfilepath);\n\t\t\t$cssfilerelpatharr[0]='';\n\t\t\t$cssfilerelpath='';\n\t\t\t$sizeofcssfilerelpatharr=sizeof($cssfilerelpatharr);\n\t\t\tfor($i = 0; $i < $sizeofcssfilerelpatharr; $i++) {\n\t\t\t\tif (($cssfilerelpatharr[$i] !='') && ($cssfilerelpatharr[$i] !=$this->urlsitestr)) {\n\t\t\t\t\t$cssfilerelpath.=$cssfilerelpatharr[$i].'/';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t$image_regex = '/<img[^>]*' . 'src=[\\\"|\\'](.*)[\\\"|\\']/Ui';\n\t\t\t$cssfilepath='';\n\t\t\tpreg_match_all($image_regex, $strextraction, $img, PREG_PATTERN_ORDER);\n\t\t}\n\n\t\t// handling of redirected subdirs\n\t\tif ($this->urlsubpath!=''){\n\t\t\tif (strpos($cssfilepath, $this->urlsubpath)===FALSE) {\n\t\t\t\t$cssfilepath=$cssfilepath . $this->urlsubpath;\n\t\t\t}\n\n\t\t}\n\n\t\t// handling of redirected subdirs end\n\t\t$images_array = array();\n\t\t$j = 0;\n\t\t$countimg1=count($img[1]);\n\t\tfor($i = 0; $i < $countimg1; $i++) {\n\t\t\tif (!strstr($img[1][$i], '.css'))\t{\n\t\t\t\t$imgfilenamearr= explode('/', $img[1][$i]);\n\t\t\t\t$imgfilename=$imgfilenamearr[count($imgfilenamearr)-1];\n\t\t\t\t$imgfilenamearr= explode('.', $imgfilename);\n\t\t\t\t$imgfilename=$imgfilenamearr[0];\n\n\t\t\t\t$hit=$this->checkimagepattern($imgfilename);\n\t\t\t\tif ($hit<2) {\n\t\t\t\t\t$images_array[$j] =$img[1][$i];\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$images_arrayout = array();\n\n\t\t$images_array_unique=array_unique($images_array);\n\t\t$k = 1;\n\t\tif (($this->selectedpics < $this->conf['attachments.']['webpagePreviewNumberOfImages']) || ($this->logofound == FALSE)) {\n\t\t\t$countimages_array=count($images_array);\n\t\t\tfor($i = 0; $i < $countimages_array; $i++) {\n\n\t\t\t\tif (isset($images_array_unique[$i])) {\n\t\t\t\t\tif ($images_array_unique[$i] != '') {\n\t\t\t\t\t\tif (strstr($images_array_unique[$i], 'http')) {\n\t\t\t\t\t\t\t$images_arrayout[$i]=$images_array_unique[$i];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($iscss==TRUE) {\n\t\t\t\t\t\t\t\t$images_array_unique[$i]=str_replace($cssfilerelpath, '', $images_array_unique[$i]);\n\t\t\t\t\t\t\t\tif (substr($images_array_unique[$i], 0, 1)=='/') {\n\t\t\t\t\t\t\t\t\t$images_arrayout[$i]=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$images_arrayout[$i]=$cssfilepath . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// handling of redirected subdirs\n\t\t\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $images_array_unique[$i]), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $this->urlsubpath . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// handling of redirected subdirs end\n\t\t\t\t\t\t\t\t$images_arrayout[$i]=$cssfilepath;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cssfilebits=explode('.', $images_arrayout[$i]);\n\t\t\t\t\t\t$extpic = $cssfilebits[count($cssfilebits)-1];\n\t\t\t\t\t\t$arrwrk = array();\n\t\t\t\t\t\t$arrwrk=explode('//', $images_arrayout[$i]);\n\t\t\t\t\t\tif (count($arrwrk)>1) {\n\t\t\t\t\t\t\t$arrwrkout='';\n\t\t\t\t\t\t\t$countarrwrk=count($arrwrk);\n\t\t\t\t\t\t\tfor($i2 = 0; $i2 < $countarrwrk; $i2++) {\n\t\t\t\t\t\t\t\tif ($i2==0) {\n\t\t\t\t\t\t\t\t\t$arrwrkout=$arrwrk[$i2] . '//';\n\t\t\t\t\t\t\t\t} elseif ($i2==count($arrwrk)-1) {\n\t\t\t\t\t\t\t\t\t$arrwrkout .=$arrwrk[$i2];\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t$arrwrkout .=$arrwrk[$i2] . '/';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$images_arrayout[$i]=$arrwrkout;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$filename=$this->saveAndResize($images_arrayout[$i], 50, 50, '/' . $this->savepath .'temp/temp .' . $extpic, $extpic);\n\n\t\t\t\t\t\tif ($filename) {\n\t\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->totalpicscans +=1;\n\t\t\t\t\t\tif (($this->selectedpics > $this->conf['attachments.']['webpagePreviewNumberOfImages']) && (($this->logofound == TRUE) ||\n\t\t\t\t\t\t\t\t(($this->selectedpics > $this->conf['attachments.']['webpagePreviewNumberOfImages']) && ($this->logofound == FALSE) &&\n\t\t\t\t\t\t\t\t\t\t($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScan'])))) {\n\t\t\t\t\t\t\tif ($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScansForLogo']) {\n\t\t\t\t\t\t\t\t$i=999999;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScansForLogo']) {\n\t\t\t\t\t\t\t\t$i=999999;\n\n\t\t\t\t\t\t\t}\n\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}\n\n\t\t\t$this->totalcounter +=$k-1;\n\t\t}\n\n\t\treturn $images_arrayout;\n\t}",
"function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}",
"function images_add_folder($image_data_url,$folder_name)\r\n{\r\n\t \r\n\t\r\n\t foreach($image_data_url as $file)\r\n {\r\n //get image contents\r\n $image = file_get_contents($file);\r\n\t\t\t\t\t $f_name=explode (\"?\",$file);\r\n\t\t\t\t $image_url=explode('/',$f_name[0]);\r\n $only_name=$image_url[count($image_url)-1];\r\n //put image contents\r\n file_put_contents($folder_name.\"/\".$only_name, $image);\r\n\t\t\t }\r\n}",
"function downlad_files($file, $manual_id, $cache) {\n // while (!empty($file)) {\n // remove each processed file, add the files to be processed for images\n // }\n foreach ($file as $key => $value) {\n // if ($key == 'inkscape-userinterface') {\n // debug('key', $key);\n // debug('value', $value);\n foreach ($value['published'] as $kkey => $vvalue) {\n // debug('vvalue', $vvalue);\n if (MANUAL_LOCAL_FILES_REQUEST) {\n // debug('vvalue', $vvalue);\n $content = file_get_contents(MANUAL_LOCAL_CONTENT_PATH.$vvalue['raw']);\n } elseif (!MANUAL_DEBUG_NO_HTTP_REQUEST) {\n // debug('http_request content', GITHUB_RAW_URL.$vvalue['raw']);\n $content = get_content_from_github(GITHUB_RAW_CONTENT_URL.$vvalue['raw']);\n } else {\n $content = \"# Introduction\";\n /*\n $content = \"\n## La fenêtre principale\n\nabcd (defgh) [blah]\n[test](image/inkscape-user_interface-fr.png)\n\n[test a](image/inkscape-user_interface-fr.png)\n \";\n */\n }\n // debug('content', $content);\n $matches = array();\n if (preg_match_all('/!\\[(.*?)\\]\\((.*?)\\)/', $content, $matches)) {\n // debug('matches', $matches);\n for ($i = 0; $i < count($matches[2]); $i++) {\n $item = $matches[2][$i];\n if (array_key_exists('content/'.$key.'/'.$item, $cache)) {\n // debug('url', GITHUB_RAW_CONTENT_URL.$key.'/'.$item);\n if (MANUAL_LOCAL_FILES_REQUEST) {\n $image = file_get_contents(MANUAL_LOCAL_CONTENT_PATH.$key.'/'.$item);\n } else {\n $image = get_content_from_github(GITHUB_RAW_CONTENT_URL.$key.'/'.$item);\n }\n put_cache($key.'/'.$item, $image, $manual_id);\n $content = str_replace('!['.$matches[1][$i].']('.$item.')', '!['.$matches[1][$i].'](cache/'.$manual_id.'/'.$key.'/'.$item.')', $content); // TODO: find a good way to correctly set the pictures and their paths\n } else {\n Manual_log::$warning[] = \"The \".$key.'/'.$item.\" is referenced but can't be found in the repository\";\n }\n }\n }\n $cache_filename = $vvalue['raw'];\n if (\n array_key_exists('render', $vvalue) &&\n ($vvalue['render']['source'] == 'md') && \n ($vvalue['render']['target'] == 'html')\n ) {\n $content = Markdown($content);\n $cache_filename = $vvalue['render']['filename'];\n }\n // debug('content', $content);\n put_cache($cache_filename, $content, $manual_id);\n }\n // }\n }\n}",
"function f_google_scrape_img_YAHOO($db_conn,$exm_url,$calendar_id,$list_title,$yyyy,$mm,$dd,$name,$order)\n{\n $html = file_get_html($exm_url);\n $img_cnt=0;\n //画像\n foreach ($html->find('img') as $element)\n {\n $rtn['img'][$img_cnt] = $element->src;\n if($img_cnt==0)\n {\n if($order>5)\n {\n\n }else{\n f_insert_ymd($db_conn,$calendar_id,$yyyy,$mm,$dd,$list_title,$rtn['img'][$img_cnt],$name,\"\",$order); \n }\n $img_cnt++; \n }\n }\n // 解放する\n $html->clear();\n unset($rtn);\n return \"ok\";\n}",
"function import_external_image($url){\n\n global $id;\n\n // get current source ( server ) path\n $L = preg_split( \"/\\//\", \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\");\n\n $path=\"\";\n\n for( $i=0; $i<count($L)-1; $i++ ){\n if( $path != \"\" ) $path.=\"/\";\n $path.=$L[$i];\n }\n\n\n if( $url == \"\" ){\n // if url of image is empty then remove file only and return\n unlink(\"icons/\".$id.\".*\"); return \"\";\n } else {\n // if file not exists then return without any action\n if( checkExternalFile($url) == false ) return \"\";\n }\n\n // get file extension from url\n $T=preg_split(\"/\\./\",$url);\n $file_extension = $T[ count($T)-1 ];\n\n // copy external image file into folder icons\n $ch = curl_init( $url );\n $fp = fopen(\"icons/\".$id.\".\".$file_extension , \"wb\");\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp);\n\n // return the new path of imported image\n return $path.\"/icons/\".$id.\".\".$file_extension;\n}",
"function download_image($image_url, $name = '', $alt = '', $title = '')\n{\n global $_CONFIG;\n \n $reply = file_get_contents($image_url);\n if (!$reply)\n return 0;\n\n $upload_path = global_conf()['absolute_root_path'] . 'i/';\n $new_filename = generate_unique_file_name($upload_path, $image_url);\n if (!$new_filename) {\n dump(\"ERROR FILE!: \");\n dump('$image_url = ' . $image_url);\n trigger_error('IMAGE Error');\n exit;\n }\n\n $rc = file_put_contents($upload_path . $new_filename, $reply);\n if (!$rc) {\n dump(\"ERROR FILE!: \");\n dump('$image_url = ' . $image_url);\n trigger_error('IMAGE Error: Permission denyed');\n exit;\n }\n\n list($img_width, $img_height) = getimagesize($upload_path . $new_filename);\n\n $img_id = db()->insert('images', array('name' => $name,\n 'alt' => $alt,\n 'title' => $title,\n 'enable' => '1',\n 'width' => $img_width,\n 'height' => $img_height,\n 'original_filename' => $image_url,\n 'files' => $new_filename));\n\n return $img_id;\n}",
"function GrabImage($url,$originname,$dir1, $dir2) {\n\tglobal $_SC;\n\tif($url==\"\"|| $originname==\"\") return false; \n\tchdir(dirname(dirname(dirname(__FILE__))));//change to the ihome dir.\n\tchdir($_SC['attachdir'].$dir1.'/'.$dir2);\n\t//echo $_SC['attachdir'].$dir1.'/'.$dir2;exit();\n\t$ext=strrchr($url,\".\"); \n\tif($ext!=\".gif\" && $ext!=\".jpg\" && $ext!=\".jpeg\" && $ext!=\".png\") return false; \n\t$filename=\"foreign\".$originname; \n\n\tob_start(); \n\treadfile($url); \n\t$img = ob_get_contents(); \n\tob_end_clean(); \n\t$size = strlen($img); \n\n\t$fp2=@fopen($filename, \"a\"); \n\tfwrite($fp2,$img); \n\tfclose($fp2); \n\n\treturn $filename; \n}"
]
| [
"0.688141",
"0.6373753",
"0.6367579",
"0.6001647",
"0.5999664",
"0.58871716",
"0.5839635",
"0.5802336",
"0.57954395",
"0.5688069",
"0.5661476",
"0.56460226",
"0.56087995",
"0.5605742",
"0.5588823",
"0.5578539",
"0.556012",
"0.5555235",
"0.5543404",
"0.5517085",
"0.5490574",
"0.54905564",
"0.54808944",
"0.5479418",
"0.5471784",
"0.5461865",
"0.5441166",
"0.5430039",
"0.5429395",
"0.53918207"
]
| 0.71879554 | 0 |
Lists all Follow models. | public function actionIndex() {
$searchModel = new FollowSearch ();
$dataProvider = $searchModel->search ( Yii::$app->request->queryParams );
return $this->render ( 'index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider
] );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOwnerFollows()\n {\n return $this->http->get('/users/%s/follows', 'self');\n }",
"public function followers()\n {\n return $this->hasMany(Models\\AccountFollower::class, 'account_id');\n }",
"public function followables()\n\t{\n\t\treturn $this->morphMany(Followable::class, 'follower');\n\t}",
"public function FollowingList()\n {\n return $this->belongsToMany('App\\User', 'user_following', 'user_id', 'following_id' );\n }",
"public static function getFollowers(){\n\n\t}",
"public function Followers()\n {\n return $this->belongsToMany('App\\User', 'user_following', 'following_id', 'user_id' );\n }",
"public function followers(){\n return $this->hasMany('App\\Models\\Follow','user_id_follower');\n }",
"public function followers() {\n return $this->belongsToMany(User::class);\n }",
"public function index()\n {\n $user = auth()->user();\n $test = $user->followings()->get();\n return UserResource::collection($test)\n ->additional(ResponseHelper::additionalInfo());\n }",
"public function follows() {\n return $this->belongsToMany(User::class, 'follows', 'user_id', 'following_user_id');\n }",
"public function index()\n {\n $title = 'Seguimiento';\n $follows = Auth::user()->follows()->with(['user'])->paginate(10);\n $followers = Auth::user()->followers()->with(['user'])->paginate(10);\n\n return view('app.follows.index', compact('follows','followers','title'));\n }",
"function listAll() {\n //$limit = 1000;\n //$offset = (max(1, $page) - 1) * $limit;\n $uid = userInfo('uid');\n $model = Model::load('FriendModel');\n $friends = $model->getAll($uid);\n// $db = Database::create();\n// $r = $db->read(\"select * from Users limit $offset, $limit\");\n// $c = $db->read(\"select count(*) as c from Users\");\n// $total = intval($c[0]['c']);\n//\n// $r = array_map([User::class, 'mapper_user_list'], $r);\n\n View::load('user_list', [\n 'total' => count($friends),\n //'total_page' => ceil($total / $limit),\n 'friend_list' => $friends\n ]);\n }",
"public function following()\n {\n return $this->hasMany(Models\\AccountFollower::class, 'follower_account_id');\n }",
"public function following() {\n // Need to explicitly state table name follows or else the table will look for user_users\n return $this->belongsToMany(User::class, 'follows');\n }",
"public function getFollowers()\n {\n return $this->followers;\n }",
"public static function getFollowers() {\n $db = Db::instance();\n $q = \"SELECT * FROM `\".self::DB_TABLE.\"`\";\n $result = $db->query($q);\n\n $followers = array();\n if($result->num_rows != 0) {\n while($row = $result->fetch_assoc()) {\n $followers[] = self::getFollower($row['id']);\n }\n }\n return $followers;\n }",
"public function getFollowers()\n {\n $data = [];\n \n foreach(Users::find(authApi()->user()->id)->followers()->get() as $user){\n $user->profile_pic = getImage($user->profile_pic);\n \n $user['isFollowed'] = authApi()->user() ? \n Follow::where('followed_id', $user->id)->where('user_id', authApi()->user()->id)->first() \n ? true : false : false;\n $data[] = $user;\n }\n \n $json['data']['followers'] = $data;\n\n return response()->json($json, 200);\n }",
"public function index(Request $request)\n {\n $following = $request->user()->following()->get();\n\n return response()->json(['data' => $following], 200);\n }",
"public function viewAll($params){\n $token = $this->require_authentication();\n\n if ($token == null) {\n $this->error404($params[0]);\n return;\n }\n $db = $this->getDBConn();\n\n // Fetch the user list\n $users = User::fetchAll($db);\n $currUser = $token->getUser();\n $follow = new Following();\n if ($users == null) {\n $this->addFlashMessage(\"Unable to fetch users: Unknown Error\", self::FLASH_LEVEL_SERVER_ERR);\n $this->redirect('/');\n }\n\n\n include_once \"app/views/user/users.phtml\";\n }",
"public function getFollowUpInfoList() {\n return $this->_get(3);\n }",
"public function getFollowedByList($perPage = null)\n {\n return $this->getOrPaginateFollowedBy($this->getFollowedByQueryBuilder(), $perPage);\n }",
"public function followers()\n {\n return $this->belongsToMany(User::class, 'followers', 'follower_id', 'user_id')->withTimestamps();\n }",
"public function getFollowings()\n {\n $data = [];\n \n foreach(Users::find(authApi()->user()->id)->followings()->get() as $user){\n $user->profile_pic = getImage($user->profile_pic);\n \n $user['isFollowed'] = authApi()->user() ? \n Follow::where('followed_id', $user->id)->where('user_id', authApi()->user()->id)->first() \n ? true : false : false;\n $data[] = $user;\n }\n \n $json['data']['followings'] = $data;\n\n return response()->json($json, 200);\n }",
"public function following(){\n return $this->belongsToMany('User', 'followers', 'user_id', 'follow_id')->withTimestamps();\n }",
"public function follows()\n {\n // a user can follow many users\n // because the relational table does not follow convention in this case ie. user_user we have to set it\n // we also have to specify the foreign id's\n return $this->belongsToMany(User::class, 'follows', 'user_id', 'following_user_id')->withTimestamps();\n }",
"public function actionFollowing()\n\t{\n\t\tif(!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$this->layout='front_layout';\n\t\t\tYii::app()->clientScript->registerCoreScript('jquery'); \n\t\t\t$id=Yii::app()->user->id;\n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->condition = \"t.user_id=$id and exists(select * from photos where user_id=t.follow_id)\";\n\t\t\t$criteria->limit=2;\n\t\t\t$allusersphotos=UsersFollow::model()->with('follow', 'follow.userDetails', 'follow.photos')->findAll($criteria); \n\t\t\t$this->render('following', array('photos'=>$allusersphotos));\n\t\t}\n\t\telse\n\t\tYii::app()->end();\n\t}",
"public function getFollowers()\n {\n $savedFollowers = $this->getSavedFollowers();\n \n if ($latestFollowers = $this->getUpdatedFollowers()) {\n $this->saveUnfollowers($savedFollowers, $latestFollowers);\n return $latestFollowers;\n }\n \n return $savedFollowers;\n }",
"public function followers(){\n return $this->belongsToMany('User', 'followers', 'follow_id', 'user_id')->withTimestamps();\n }",
"public function get_FollowingList($user_id){\r\n $this->db->select(\"followers.user_id,followers.follower_id,followers.created_at,users.full_name,users.user_name,users.picture\");\r\n $this->db->from('followers');\r\n $this->db->order_by(\"full_name\", \"asc\");\r\n $this->db->join('users','users.user_id = followers.user_id');\r\n $this->db->where('followers.follower_id',$user_id);\r\n $followinglist=$this->db->get();\r\n return $followinglist->result();\r\n }",
"public function timeline() {\n // Include all the user's posts\n $ids = $this->follows()->pluck('id');\n $ids->push($this->id);\n // And the posts from the people that he/she follows\n return Post::whereIn('user_id', $ids)\n ->withLikes()\n ->latest()\n ->paginate(10);\n }"
]
| [
"0.6755336",
"0.6454766",
"0.6379214",
"0.6374921",
"0.6249094",
"0.6215436",
"0.6192749",
"0.6173704",
"0.61356986",
"0.6090827",
"0.6070063",
"0.60652643",
"0.60426235",
"0.60274696",
"0.5995998",
"0.5931489",
"0.5927734",
"0.5917338",
"0.5889872",
"0.5874335",
"0.581647",
"0.57880163",
"0.5744713",
"0.56930614",
"0.5662203",
"0.56330854",
"0.5626791",
"0.56229526",
"0.56211066",
"0.5615032"
]
| 0.6554968 | 1 |
Creates a new Follow model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate() {
$model = new Follow ();
if ($model->load ( Yii::$app->request->post () ) && $model->save ()) {
return $this->redirect ( [
'view',
'id' => $model->followID
] );
} else {
return $this->render ( 'create', [
'model' => $model
] );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new ShareUser();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $user = User::findOne(['username' => $model->username ]) ;\n return $this->redirect(['site/view','id' => $user->id]);\n } else {\n return $this->render('knpr/create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n\n //显示创建资源表单页\n return view('/home/friend/create',['title'=>'添加友情链接']);\n }",
"public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function store()\n\t{\n\t\t$target_id = Input::get('target');\n\t\t$user_id = Auth::id();\n\t\t$params = array(\n\t\t\t'user_id' => Auth::id(),\n\t\t\t'target_id' => $target_id,\n\t\t);\n\t\t$follow = Follow::withTrashed($params)->where($params)->first();\n\n\t\tif ($follow === null) {\n\t\t\t$follow = new Follow($params);\n\t\t\t$follow->save();\n\t\t\tFeedManager::followUser($follow->user_id, $follow->target_id);\n\t\t} elseif ($follow->trashed()){\n\t\t\t$follow->restore();\n\t\t\tFeedManager::followUser($follow->user_id, $follow->target_id);\n\t\t}\n\t\treturn Redirect::to(Input::get('next'));\n\t}",
"public function actionCreate()\n {\n $model = new Cuenta();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new PerfilUsuario();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }",
"public function actionCreate()\n {\n $model = new News();\n $author = Yii::$app->user->identity->username;\n\n if ($model->load(Yii::$app->request->post())){\n $model->setAuthor($author);\n if($model->save()){\n return $this->redirect('index');\n }\n }\n else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function follow_user(){\n\n\t\t$follow_user_data=array(\n\t\t\t'user_id'=>$this->session->userdata('usr_id'),\n\t\t\t'follow_user_id' => $this->input->post('id')\n\t\t);\n\n\t\treturn $this->db->insert('friends', $follow_user_data);\n\n\t}",
"public function actionCreate()\n {\n $model = new UserFeeMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$this->paymentUMoney($model);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userid' => Yii::$app->user->id,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}",
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect([\"site/register\"]);\n /*$this->render('/site/register', [\n 'model' => $model,\n ]);*/\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Profile;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }",
"public function actionCreate()\n {\n $model=new User('create');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('/site/index'));\n }\n\n //Yii::app()->user->setFlash('success', Yii::t('user', '<strong>Congratulations!</strong> You have been successfully registered on our website! <a href=\"/\">Go to main page.</a>'));\n $this->render('create', compact('model'));\n }",
"public function actionCreate()\n {\n $model = new ActivityDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Member();\n $model->agreement = true;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) { //&& $model->save()\n// print_r($model->attributes);\n// exit();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function store(Request $request)\n {/*\n $input = $request->all();\n $user = auth()->user();\n $idfollowing = $request->input('idfollowing');\n $Follow = new Follow();\n $Follow->user_id = $user->id;\n $Follow->idfollowing = $idfollowing;\n $Follow->save();\n */\n auth()->user()->addfollow(new Follow($request->only(['idfollowing'])));\n return response()->json(['code' => '200', 'result' => 'true']);\n }",
"public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }",
"public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Users;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}"
]
| [
"0.6710494",
"0.6690616",
"0.66585654",
"0.66585654",
"0.66585654",
"0.66585654",
"0.65761834",
"0.6552931",
"0.65009594",
"0.6480906",
"0.64251155",
"0.64168197",
"0.63638544",
"0.6357716",
"0.6357716",
"0.62716305",
"0.6268399",
"0.6243951",
"0.62140715",
"0.6200901",
"0.6176654",
"0.61516",
"0.61505264",
"0.61483747",
"0.6129724",
"0.6125832",
"0.6096312",
"0.6091117",
"0.60843873",
"0.60813814"
]
| 0.8833359 | 0 |
Updates an existing Follow model. If update is successful, the browser will be redirected to the 'view' page. | public function actionUpdate($id)
{
$model = $this->findModel ( $id );
if ($model->load ( Yii::$app->request->post () ) && $model->save ()) {
return $this->redirect ( [
'view',
'id' => $model->followID
] );
} else {
return $this->render ( 'update', [
'model' => $model
] );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }",
"public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}",
"public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\n//\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// }\n }",
"public function actionUpdate()\n {\n $model = $this->loadModel();\n\n if (isset($_POST['User']))\n {\n $model->attributes = $_POST['User'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Данные обновлены!'));\n\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }",
"public function update()\r\n {\r\n if (isset($_POST[\"update\"])) {\r\n // Instance new Model (Song)\r\n $profile = new Profile();\r\n // do updateSong() from model/model.php\r\n $profile->breyta($_POST[\"nafn\"], $_POST[\"pass\"], $_POST[\"user\"]);\r\n }\r\n // where to go after song has been added\r\n header('location: ' . URL . 'profile/index');\r\n }",
"public function update()\n {\n $userId = Helper::getIdFromUrl('user');\n\n // Save post data in $user\n $user = $_POST;\n \n // Save record to database\n UserModel::load()->update($user, $userId);\n\n View::redirect('user/' . $userId);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function update() {\n if($this->id == 0)\n return null; // can't update something without an ID\n\n $db = Db::instance(); // connect to db\n $q = sprintf(\"UPDATE `followers` SET\n `username` = $db->escape($this->user),\n `follower` = $db->escape($this->follower)\n WHERE `id` = $db->escape($this->id);\");\n\n $db->query($q); // execute query\n return $db->id; // return this object's ID\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate() {\n Yii::import('bootstrap.widgets.TbEditableSaver'); //or you can add import 'ext.editable.*' to config\n $es = new TbEditableSaver('Donneur'); // 'User' is classname of model to be updated\n $es->update();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n /*if (isset($_POST['pk'])) {\n $model = $this->loadModel($_POST['pk']);\n $model->first_name = $_POST['first_name'];\n $model->save();\n // $this->redirect(array('view', 'id' => $model->id));\n }\n\n /* $this->render('update', array(\n 'model' => $model,\n ));*/\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update(User $model);",
"public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->teach_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $session = \\yii::$app->session;\n $user_type = $session->get('type',-1);\n $model = $this->findModel($id);\n $user = $this->findUser($id);\n\n if ($model->load(Yii::$app->request->post())) {\n $user->id = $model->user_id;\n if($user->save())\n {\n if($model->save())\n {\n return $this->redirect(['view', 'id' => $model->user_id]);\n }\n }\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}",
"public function follow($name) {\n\t\t$this->load->model('Users_model');\n\t\t$this->Users_model->follow($name);\n\t\tredirect('user/view/'.$name, 'refresh'); // Redirect\n\t}",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ref]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"protected function changeFollow()\n\t{\n\t\tif ( !\\IPS\\Member::loggedIn()->modPermission('can_modify_profiles') AND ( \\IPS\\Member::loggedIn()->member_id !== $this->member->member_id OR !$this->member->group['g_edit_profile'] ) )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'no_permission_edit_profile', '2C138/3', 403, '' );\n\t\t}\n\n\t\t\\IPS\\Session::i()->csrfCheck();\n\n\t\t\\IPS\\Member::loggedIn()->members_bitoptions['pp_setting_moderate_followers'] = ( \\IPS\\Request::i()->enabled == 1 ? FALSE : TRUE );\n\t\t\\IPS\\Member::loggedIn()->save();\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( 'OK' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( $this->member->url(), 'follow_saved' );\n\t\t}\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //$locationModel = Location::find()->where(['location_id' => $this->location->id])->one();\n $locationModel = $model->location ? $model->location : new Location;\n //TODO: проверить, рефакторинг\n $locationModel->save();\n //$locationModel->link('debtor', $model);\n $model->link('location', $locationModel);\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = $model->name ? $model->name : new Name;\n //TODO: проверить, рефакторинг\n $nameModel->save();\n $nameModel->link('debtor', $model);\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->start_date = date('d M Y', strtotime($model->start_date));\n if ($model->load(Yii::$app->request->post()) ) {\n\n if ($model->updateUser() ) {\n Yii::$app->session->setFlash('success', \"Investor has been updated\");\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n //var_dump($model->errors);die();\n Yii::$app->session->setFlash('error', \"Failed to update Investor\");\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n\n Yii::$app->session->setFlash('error', \"UserName/Email has already been taken\");\n return $this->render('create', [\n 'model' => $model,\n ]);\n\n\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->kamar_id]);\n // }\n if ($model->load(Yii::$app->request->post())) {\n // Yii::$app->creator->update($model);\n $model->updated_by = Yii::$app->user->identity->username;\n \t $model->updated_date = date(\"Y-m-d\");\n $model->save();\n return $this->redirect(['view', 'id' => $model->kamar_id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}"
]
| [
"0.6590642",
"0.64405555",
"0.643507",
"0.633781",
"0.6060133",
"0.6056863",
"0.60505575",
"0.5966403",
"0.5953536",
"0.5914776",
"0.5910345",
"0.58988976",
"0.58863664",
"0.58778346",
"0.58663815",
"0.5860015",
"0.5860015",
"0.5850847",
"0.5842669",
"0.5830864",
"0.58302057",
"0.58237416",
"0.5814482",
"0.58096534",
"0.58096534",
"0.58096534",
"0.5794193",
"0.5788689",
"0.57867295",
"0.5781405"
]
| 0.7714606 | 0 |
Finds the Follow model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | protected function findModel($id) {
if (($model = Follow::findOne ( $id )) !== null) {
return $model;
} else {
throw new NotFoundHttpException ( 'The requested page does not exist.' );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function find($id)\n {\n return $this->model->with(['followers','following'])->find($id);\n }",
"private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($id)\n {\n if (($model = PatientFollowUpDetails::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public abstract function find($primary_key, $model);",
"public function actionFind()\n\t{\n\t\t$requestedId = craft()->request->getParam('id');\n\t\t// build criteria to find model\n\t\t$criteria = craft()->elements->getCriteria(ElementType::Entry);\n\t\t$criteria->id = $requestedId;\n\t\t$criteria->limit = 1;\n\t\t\n\t\t// fire !\n\t\t$entries = $criteria->find();\n\t\t$entry = count($entries) > 0 ? $entries[0] : null;\n\n\t\t// redirect if possible\n\t\tif($entry && $entry->url) {\n\n\t\t\t// build new query, but remove id from query path\n\t\t\t$newLocation = $entry->url . ( craft()->request->getParam('L') ? '?L='.craft()->request->getParam('L') : '');\n\n\t\t\theader(\"HTTP/1.1 302 Found\"); \n\t\t\theader(\"Location: \" . $newLocation); \n\t\t\texit();\n\t\t}else{\n\t\t\theader(\"HTTP/1.1 404 Not Found\");\n\t\t\theader(\"Location: /404.html\"); \n\t\t\texit();\n\t\t}\n\n\t\tcraft()->end();\n\t}",
"protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}",
"public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}",
"public function findById() {\n // TODO: Implement findById() method.\n }",
"public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }",
"protected function findModel($id)\n {\n if (($model = Picture::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, \\Yii::t('The requested object does not exist or has been already deleted.'));\n }\n }",
"public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }",
"protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }",
"public function findById(string $modelId): ?Model;",
"public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}",
"function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}",
"public function find(int $id): ?Model;",
"public function find(int $id): ?Model;",
"protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }",
"public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}",
"public function find(DTO $dto): ?Model;",
"protected function findModel($id)\n\t{\n if (($model = UserLevel::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}",
"public function find($key)\n\t{\n\t\t$user = model('user')->find_user($key);\n\n\t\treturn $user ? UserModel::newWithAttributes(Arr::toArray($user)) : null;\n\t}",
"protected function findModel($id)\n {\n if (($model = PostKey::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Referraltrackreceiving::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public function find($id){\n return $this->model->query()->findOrFail($id);\n }",
"protected function findModel($id) {\n if (($model = Stakeholder::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = ShareUser::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public function find($model, $id);",
"public function findModel($class, $id)\n {\n $model = call_user_func([$class, 'findOne'], $id);\n if (!$model) {\n $this->raise404();\n }\n return $model;\n }",
"protected function findModel($id)\n {\n if (($model = CoachPosts::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }"
]
| [
"0.615055",
"0.6102527",
"0.6024297",
"0.59946686",
"0.5903707",
"0.5823651",
"0.5813569",
"0.5784466",
"0.5740782",
"0.5696516",
"0.56860465",
"0.5678777",
"0.5674011",
"0.565186",
"0.56242853",
"0.56193435",
"0.56193435",
"0.55957085",
"0.55911",
"0.55882806",
"0.5578549",
"0.5568008",
"0.55371124",
"0.55365217",
"0.5521743",
"0.5520893",
"0.55201966",
"0.5507465",
"0.55030906",
"0.5499705"
]
| 0.7197453 | 0 |
20060602 Renamed function from st_add_st_link() to st_add_feed_link() | function st_add_feed_link($content) {
if (is_feed()) {
$content .= st_link();
}
return $content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function the_feed_link($anchor, $feed = '')\n {\n }",
"function automatic_feed_links($add = \\true)\n {\n }",
"function addFeed($feed,$url,$return=true);",
"function comments_link_feed()\n {\n }",
"public function feed_link() {\n\t\t$post_title = self::feed_title();\n\t\t$feed_link = LivePress_Updater::instance()->get_current_post_feed_link();\n\n\t\tif ( count( $feed_link ) > 0 ) {\n\t\t\t$tag = '<link rel=\"alternate\" type=\"' . esc_attr( feed_content_type( 'rss2' ) ) . '\" ';\n\t\t\t$tag .= 'title=\"' . esc_attr( get_bloginfo( 'name' ) ) . ' » ' . esc_attr( $post_title ) . '\" ';\n\t\t\t$tag .= 'href=\"' . esc_url( $feed_link[0] ) . '\" />' . \"\\n\";\n\t\t\techo $tag;\n\t\t}\n\t}",
"function get_feed_link($feed = '')\n {\n }",
"function rsd_link()\n {\n }",
"function addLink($url)\n{\n $url = simplexml_load_file($url);\n return $url->channel;\n}",
"function feed_links_extra($args = array())\n {\n }",
"protected function addLinks()\n {\n }",
"public function set_link($link) \n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\t$this->add_element('link', $link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->add_element('link','',array('href'=>$link));\n\t\t\t$this->add_element('id', zajlib_feed::uuid($link,'urn:uuid:'));\n\t\t} \n\t\t\n\t}",
"function feed_process_link($feed, $camp) {\n\t\n\t//detect encoding mbstring\n\tif(! function_exists('mb_detect_encoding')){\n\t\t echo '<br><span style=\"color:red;\">mbstring PHP extension that is responsible for text encoding is not installed,Install it. You may get encoding problems.</span>';\t\t\n\t}\n\t\n\t//php-xml check\n\tif(! function_exists('simplexml_load_string')){\n\t\techo '<br><span style=\"color:red;\">php-xml PHP extension that is responsible for parsing XML is not installed. Please <a href=\"https://stackoverflow.com/questions/38793676/php-xml-extension-not-installed\">install it</a> and try again</span>';\n\t}\n\t\n\t// ini\n\tif( stristr($camp->camp_general, 'a:') ) $camp->camp_general=base64_encode($camp->camp_general);\n\t$camp_general=unserialize( base64_decode( $camp->camp_general));\n\t$camp_general=array_map('wp_automatic_stripslashes', $camp_general);\n\t$camp_opt = unserialize ( $camp->camp_options );\n\t\n\t// Feed extraction method old format adaption\n\tif(in_array('OPT_FEED_CUSTOM_R', $camp_opt)){\n\t\t$camp_general['cg_feed_custom_regex'] = array($camp_general['cg_feed_custom_regex'],$camp_general['cg_feed_custom_regex2']);\n\t}\n\t\n\tif(in_array('OPT_FEED_CUSTOM', $camp_opt)){\n\t\t\n\t\t$camp_general['cg_feed_extraction_method'] = 'css';\n\t\t\n\t\t$camp_general['cg_custom_selector'] = array($camp_general['cg_custom_selector'] , $camp_general['cg_custom_selector2'] , $camp_general['cg_custom_selector3'] );\n\t\t$camp_general['cg_feed_custom_id'] = array($camp_general['cg_feed_custom_id'] , $camp_general['cg_feed_custom_id2'] , $camp_general['cg_feed_custom_id3'] );\n\t\t\n\t\t$cg_feed_css_size = array();\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE', $camp_options) ? 'single' : 'all' ;\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE2', $camp_options) ? 'single' : 'all' ;\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE3', $camp_options) ? 'single' : 'all' ;\n\t\t$camp_general['cg_feed_css_size'] = $cg_feed_css_size;\n\t\t\n\t\t$cg_feed_css_wrap = array();\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER',$camp_options) ? 'inner' : 'outer' ;\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER2',$camp_options) ? 'inner' : 'outer' ;\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER3',$camp_options) ? 'inner' : 'outer' ;\n\t\t$camp_general['cg_feed_css_wrap'] = $cg_feed_css_wrap;\n\t\t\n\t}\n\t\n\t\n\tif(isset($camp_general['cg_feed_extraction_method'])){\n\t\tswitch ($camp_general['cg_feed_extraction_method']) {\n\t\t\t\n\t\t\tcase 'summary':\n\t\t\t\t$camp_opt[] = 'OPT_SUMARRY_FEED';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'css':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'auto':\n\t\t\t\t$camp_opt[] = 'OPT_FULL_FEED';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'regex':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM_R';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'visual':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM';\n\t\t\t\t$camp_general['cg_feed_extraction_method'] = 'css';\n\t\t\t\t\n\t\t\t\t$camp_general['cg_feed_custom_id'] = $camp_general['cg_feed_visual'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$cg_feed_css_size = array();\n\t\t\t\t$cg_feed_css_wrap = array();\n\t\t\t\t$cg_custom_selector = array();\n\t\t\t\t\n\t\t\t\tforeach ($camp_general['cg_feed_visual'] as $singleVisual){\n\t\t\t\t\t$cg_feed_css_size[] = 'single';\n\t\t\t\t\t$cg_feed_css_wrap[] = 'outer';\n\t\t\t\t\t$cg_custom_selector[] = 'xpath';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$camp_general['cg_feed_css_size'] = $cg_feed_css_size;\n\t\t\t\t$camp_general['cg_feed_css_wrap'] = $cg_feed_css_wrap;\n\t\t\t\t$camp_general['cg_custom_selector'] = $cg_custom_selector;\n\t\t\t\t\n\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}\n\t\n\tif(in_array('OPT_STRIP_CSS', $camp_opt) && ! is_array($camp_general['cg_feed_custom_strip_id'])){ \n\t\t\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id'];\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id2'];\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id3'];\n\t\t\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector'];\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector2'];\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector3'];\n\t\t\n\t\t$cg_feed_custom_strip_id = array_filter($cg_feed_custom_strip_id);\n\t\t$cg_custom_strip_selector = array_filter($cg_custom_strip_selector);\n\t\t\n\t\t$camp_general['cg_feed_custom_strip_id'] = $cg_feed_custom_strip_id;\n\t\t$camp_general['cg_custom_strip_selector'] = $cg_custom_strip_selector;\n\t\t\n\t}\n\n\t$feedMd5 = md5($feed);\n\t$isItemsEndReached = get_post_meta ( $camp->camp_id , $feedMd5.'_isItemsEndReached',1);\n\t$lastProcessedFeedUrl = get_post_meta ( $camp->camp_id , $feedMd5.'_lastProcessedFeedUrl',1);\n\t$lastFirstFeedUrl = get_post_meta ( $camp->camp_id , $feedMd5.'_lastFirstFeedUrl',1);\n\t\n\t// check last time adition\n\t$feed = trim ( $feed );\n\t$myfeed = addslashes ( $feed );\n\t\n\t//removed @ v3.24\n\t/*\n\t$query = \"select * from {$this->wp_prefix}automatic_feeds_list where feed='$myfeed' and camp_id = '$camp->camp_id' limit 1\";\n\t$feeds = $this->db->get_results ( $query );\n\t$feed_o = $feeds [0];\n\t*/\n\n\t// report processed feed\n\t$this->log ( 'Process Feed', '<a href=\"' . $feed . '\">' . $feed . '</a>' );\n\n\t// If force feed\n\t\n\tif(in_array('OPT_FEED_FORCE', $camp_opt)){\n\t\n\t\tif(! function_exists('wp_automatic_force_feed')){\n\t\t\tadd_action('wp_feed_options', 'wp_automatic_force_feed', 10, 1);\n\t\t\tfunction wp_automatic_force_feed($feed) {\n\t\t\t\t$feed->force_feed(true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Wrong feed length fix\n\tif( ! function_exists('wp_automatic_setup_curl_options') ){\n\t\t//feed timeout\n\t\tfunction wp_automatic_setup_curl_options( $curl ) {\n\t\t\tif ( is_resource( $curl ) ) {\n\t\t\t\t//curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Expect:' ) );\n\t\t\t}\n\t\t}\n\t}\n\n\t\n\t \n\t// loading SimplePie\n\tinclude_once (ABSPATH . WPINC . '/feed.php');\n\t\n\t\n\n\t// Add action to fix the problem of curl transfer closed without complete data\n\tadd_action( 'http_api_curl', 'wp_automatic_setup_curl_options' );\n\tif( ! function_exists('wp_automatic_wp_feed_options') ){\n\t\tfunction wp_automatic_wp_feed_options($args){\n\n\t\t\t$args->set_useragent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/41.0.2272.76 ');\n\t\t\t\t\n\t\t}\n\t\tadd_action('wp_feed_options','wp_automatic_wp_feed_options');\n\t}\n\n\t\n\t\n\t// Trim returned feed content because some feed add empty spaces before feed content \n\tif(!function_exists('wp_automatic_trim_feed_content')){\n\t\tfunction wp_automatic_trim_feed_content($args){\n\t\t\t\n\t\t\t \n\t\t\t$args['body'] = trim($args['body']);\n\t\t\t\n\t\t\t//$args['body'] = preg_replace('{article/(\\d+?)/}' , \"article/$1wpp/\", trim($args['body']) ) ; \n\t\t\t\n\t\t\treturn $args;\n\t\t}\n\t}\n\t\n\t\n\tadd_filter('http_response', 'wp_automatic_trim_feed_content');\n\n\tif(stristr($feed, 'news.google') && ! function_exists('wp_automatic_feed_options') ){\n\t\t\n\t\t// Fix Google news image stripped\n\t\t echo '<br>Google news feed found, disabling sanitization...';\n\t\t\n\t\tfunction wp_automatic_feed_options( $feed) {\n\t\t\n\t\t\t$feed->set_sanitize_class( 'SimplePie_Sanitize' );\n\t\t\t$feed->sanitize = new SimplePie_Sanitize;\n\t\t\n\t\t}\n\t\tadd_action( 'wp_feed_options', 'wp_automatic_feed_options' );\n\t}\n\t\n\t\n\t \n\t// If proxified download the feed content to a test file for\n\t//exclude multipage scraper as it is already a local feed /wp-content/uploads/277d7822fe5662e66d660a42eaae4910_837.xml\n\t$localFeed = '';\n\tif($this->isProxified && ! ( stristr( $feed , '.xml' ) && stristr( $feed , 'wp-content' ) ) ){\n\t\t//downloading the feed content \n\t\t//print_r( $this->download_file\n\t\t$downloadedFileUrl = $this->download_file($feed,'.html');\n\t\t\n\t\tif(trim($downloadedFileUrl) != ''){\n\t\t\t echo '<br>Feed downloaded using a proxy '.$downloadedFileUrl;\n\t\t\t$localFeed = $downloadedFileUrl.'?key='.md5(trim($feed));\n\t\t}\n\t\t\n\t\t\n\t}\n\t \n\t\n\t//fix ssl verification\n\tadd_filter( 'https_ssl_verify', '__return_false' );\n \n\t// Fetch feed content\n\tif(trim($localFeed) == ''){\n\t\t$rss = fetch_feed ( stripslashes( $feed ) );\n\t}else{\n\t\t echo '<br>Loaded locally';\n\t\t$rss = fetch_feed ($localFeed);\n\t}\n\t \n\tif(trim($rss->raw_data) == ''){\n\t\t echo '<br>Feed was loaded from cache';\n\t}else{\n\t\t echo '<br>Feed was freshly loaded from the source';\n\t}\n\t\n\t \n\t \n\t// Remove added filter\n\tremove_filter('http_response', 'wp_automatic_trim_feed_content');\n\n\tif (! is_wp_error ( $rss )){ // Checks that the object is created correctly\n\t\t// Figure out how many total items there are, but limit it to 5.\n\t\t$maxitems = $rss->get_item_quantity ();\n\t\t\n\t\t// Build an array of all the items, starting with element 0 (first element).\n\t\t$rss_items = $rss->get_items ( 0, $maxitems );\n\t\t\n\t\t//feed name \n\t\t$res['feed_name'] = $rss->get_title();\n\t\t \n\t\t//remove the expect again as it makes jetpack publicize to not work\n\t\tremove_action('http_api_curl', 'wp_automatic_setup_curl_options');\n\t\t\t\n\t\t\t\n\t}else{\n\t\t$error_string = $rss->get_error_message();\n\t\t echo '<br><strong>Error:</strong>' . $error_string ;\n\t}\n\t\n\tif (!isset($maxitems) || $maxitems == 0)\n\t\treturn false;\n\telse\n\t\t\t\n\t//reverse order if exists\n\tif(in_array('OPT_FEED_REVERSE', $camp_opt)){\n\t\t echo '<br>Reversing order';\n\t\t$rss_items = array_reverse($rss_items);\n\t}\n\n\t// Loop through each feed item and display each item as a hyperlink.\n\t$i = 0;\n\t$i2 = 0; // refer to items number in feed\n\t \n\tforeach ( $rss_items as $item ) :\n\t\n\t \n\t$url = esc_url ( $item->get_permalink () );\n\t$original_url = $url; // used for exclusion because the effective_url may change below\n\t\n\t//google news links correction \n\tif(stristr($url, 'news.google')){\n\t\t$urlParts = explode('url=', $url);\n\t\t$correctUrl = $urlParts[1];\n\t\t$url = $correctUrl;\n\t\t\n\t}\n\t\n\t//Google alerts links correction\n\tif(stristr($feed\t, 'alerts/feeds') && stristr($feed, 'google')){\n\t\tpreg_match('{url\\=(.*?)[&]}', $url,$urlMatches);\n\t\t$correctUrl = $urlMatches[1];\n\t\t\n\t\tif( trim($correctUrl) != '' ){\n\t\t\t$url =$correctUrl;\n\t\t}\n\t}\n\t\n\t//check if no new links: the last first url is the same\n\tif($i2 == 0){\n\t\t\n\t\tif($isItemsEndReached == 'yes'){\n\t\t\t\n\t\t\t//Last time there were no new links check if the case didn't change\n\t\t\tif( $lastFirstFeedUrl == md5($url) ){\n\t\t\t\t\n\t\t\t\t//still no new links stop checking now\n\t\t\t\t echo '<br>First url in the feed:'.$url;\n\t\t\t\t echo '<br>This link was the same as the last time we did not find new links so ... skipping till new posts get added <a href=\"#\" class=\"wp_automatic_ajax\" data-action=\"wp_automatic_ajax\" data-function=\"forget_lastFirstFeedUrl\" data-data=\"'.$feedMd5.'\" data-camp=\"'.$camp->camp_id.'\" >Forget this fact Now</a>.';\n\t\t\t\t\n\t\t\t\t//delete transient cache\n\t\t\t\tdelete_transient('feed_'.$feedMd5);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//new links found remove the isItemsEndReached flag\n\t\t\t\tdelete_post_meta($camp->camp_id,$feedMd5.'_isItemsEndReached');\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t//Record first feed url\n\tif($i2 == 0){\n\t\tupdate_post_meta ( $camp->camp_id , $feedMd5.'_lastFirstFeedUrl',md5($url));\n\t}\n\t\n\t// one more link, increase index2\n\t$i2++;\n\t\t\n\tif(trim($url) == ''){\n\t\t echo '<br>item have no url skipping';\n\t\tcontinue;\n\t}\n\n\t// current post url\t\n\t echo '<br>Post url: '.$url;\n\t\n\t// post date\n\t$wpdate= $item->get_date ( \"Y-m-d H:i:s\");\n\t$publish_date = get_date_from_gmt($wpdate);\n\t echo '<br>- Published: '.$wpdate ;\n\t\n\t// post categories \n\t$cats= ($item->get_categories());\n\n\t// separate categories with commas\t\n\t$cat_str = '';\n\tif(isset($cats)){\n\t\tforeach($cats as $cat ){\n\t\t\tif(trim($cat_str) != '') $cat_str.= ',';\n\t\t\t$cat_str.= $cat->term;\n\t\t}\n\t}\n\t\t\n\t// fix empty titles\n\tif(trim($item->get_title ()) == ''){\n\t\t echo '<--Empty title skipping';\n\t\tcontinue;\n\t}\n\t\n\t//&# encoded chars\n\tif(stristr($url, '&#')){\n\t\t$url = html_entity_decode($url);\n\t}\n\t\t\n\t// check if execluded link due to exact match does not exists\n\tif( $this->is_execluded($camp->camp_id, $url)){\n\t\t echo '<-- Excluded link';\n\t\tcontinue;\n\t}\n\t\t\n\t// check if older than minimum date\n\tif($this->is_link_old($camp->camp_id, strtotime($wpdate) )){\n\t\t echo '<--old post execluding...';\n\t\tcontinue;\n\t}\n\t\t\n\t// check media images\n\tunset($media_image_url);\n\t$enclosures = $item->get_enclosures();\n\t\n\t $i=0;\n\tforeach ($enclosures as $enclosure){\n\n\t\tif(trim($enclosure->type) != ''){\n\t\t\n\t\t\t$enclosure_link = $enclosure->link;\n\t\t\t\n\t\t\t$res ['enclosure_link_'.$i] = $enclosure_link;\n\t\t\t\n\t\t\tif(isset($enclosure->type) && stristr($enclosure->type, 'image') && isset($enclosure->link) ){\n\t\t\t\t$media_image_url = $enclosure->link;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$i++;\n\t}\n\t\n\t\n\t\n\t\n\t// Duplicate check\n\tif (! $this->is_duplicate($url) ) {\n\n\t\t echo '<-- new link';\n\t \n\t\t$title = strip_tags( $item->get_title () );\n\t\t\n\t\t//fix '\n\t\t$title = str_replace('&apos;', \"'\", $title);\n\t\t$title = str_replace(''', \"'\", $title);\n\t \n\t\t \n\t\t \n\t\t//check if there is a post published with the same title\n\t\tif(in_array('OPT_FEED_TITLE_SKIP',$camp_opt) ){\n\t\t\tif($this->is_title_duplicate($title,$camp->camp_post_type)){\n\t\t\t\t echo '<-- duplicate title skipping..';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\n\t\t$i ++;\n\t\t\n\t\t// Date\n\t\t$date = $item->get_date ( 'j F Y g:i a' );\n\t\t$wpdate= $item->get_date ( \"Y-m-d H:i:s\");\n \t\n\t\t// post content\n\t\t$html = $item->get_content ();\n \n\t\t$postAuthor = $item->get_author();\n\t\t@$authorName = $postAuthor->name;\n\t\t\n\t\tif(trim($authorName) == ''){\n\t\t\t@$authorName = $postAuthor->email;\n\t\t}\n\t\t\n\t\tif(trim($authorName) == ''){\n\t\t\t@$authorName = $postAuthor->link;\n\t\t}\n\t\t\n\t\t$res['author'] = $authorName;\n\t\t@$res['author_link'] = $postAuthor->link;\n \n\t\t//source domain\n\t\t$res['source_domain'] = $parse_url = parse_url($url, PHP_URL_HOST );\n\t \t\n\t\t//encoded URL\n\t\t$res['source_url_encoded'] = urlencode($url);\n\t\t\n\t\t// If empty content make content = title\n\t\tif(trim($html) == ''){\n\t\t\tif( trim($title) != '' ) $html =$title;\n\t\t}\n\t\t\n\t\t// loging the feeds \n\t\t$md5 = md5 ( $url );\n\t\t \n\n\t\t//if not image escape it\n\t\t$res ['cont'] = $html;\n\t\t$res ['original_content']=$html;\n\t\t$res ['title'] = $title;\n\t\t$res ['original_title'] = $title;\n\t\t$res ['matched_content'] = $html;\n\t\t$res ['source_link'] = $url;\n\t\t$res ['publish_date'] = $publish_date;\n\t\t$res ['wpdate']=$wpdate;\n\t\t$res ['cats'] = $cat_str;\n\t\t$res ['tags'] = '';\n\t\t$res ['enclosure_link'] = isset( $enclosure_link ) ? $enclosure_link : '' ;\n\t\t\n\t\t\n\t\t\n\t\t//custom atributes\n\t\t$arr=array();\n\t\t$arrValues = array_values($item->data['child']);\n\t\t\n\t\tforeach ($arrValues as $arrValue){\n\t\t\tif(is_array($arrValue)){\n\t\t\t\t$arr = array_merge($arr,$arrValue);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$res['attributes'] = $arr;\n\n\t\t$og_title_enabled = in_array('OPT_FEED_OG_TTL', $camp_opt) || ( isset($camp_general['cg_ml_ttl_method']) && trim($camp_general['cg_ml_ttl_method']) != 'auto' ) ;\n\t\t\n\t\t \n\t\t// original post content \n\t\tif ( in_array('OPT_FULL_FEED',$camp_opt) || in_array ( 'OPT_FEED_CUSTOM', $camp_opt ) || in_array ( 'OPT_FEED_CUSTOM_R', $camp_opt ) || in_array ( 'OPT_ORIGINAL_META', $camp_opt ) || in_array ( 'OPT_ORIGINAL_CATS', $camp_opt ) || in_array ( 'OPT_ORIGINAL_TAGS', $camp_opt ) || in_array ( 'OPT_ORIGINAL_AUTHOR', $camp_opt ) || in_array ( 'OPT_FEED_PTF', $camp_opt ) || in_array ( 'OPT_FEEDS_OG_IMG', $camp_opt ) || $og_title_enabled ) {\n\t\t\n\t\t\techo '<br>Loading original post content ...';\n\t\t\t\n\t\t\t//get content\n\t\t\t$x='error';\n\t\t\tcurl_setopt ( $this->ch, CURLOPT_HTTPGET, 1 );\n\t\t\tcurl_setopt ( $this->ch, CURLOPT_URL, trim ( html_entity_decode( $url ) ));\n\t\t\t\n\t\t\t//encoding\n\t\t\tif(in_array('OPT_FEED_ENCODING' , $camp_opt )){\n\t\t\t\techo '<br>Clearing encoding..';\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_ENCODING , \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Source page html\n\t\t\ttimer_start();\n\t\t\t$original_cont = $this->curl_exec_follow ( $this->ch );\n\t\t\t$x = curl_error ( $this->ch );\n\t\t \t\n\t\t\techo ' <--' . strlen($original_cont) . ' chars returned in ' . timer_stop() . ' seconds';\n\t\t\t\n\t\t\t//converting encoding\n\t\t\tif(in_array('OPT_FEED_CONVERT_ENC', $camp_opt) ){\n\t\t\t\techo '<br>Converting encoding from '.$camp_general['cg_feed_encoding']. ' to utf-8';\n\t\t\t\t$original_cont = iconv( trim($camp_general['cg_feed_encoding']).'//IGNORE' , \"UTF-8//IGNORE\", $original_cont );\n\t\t\t}\n\t\t\t\n\t\t\t//fix images\n\t\t\t$original_cont = $this->fix_relative_paths($original_cont, $url);\n\t\t\t\n\t\t\t//fix lazy loading\n\t\t\tif(in_array('OPT_FEED_LAZY',$camp_opt)){\n\t\t\t\t\n\t\t\t\t$cg_feed_lazy = trim($camp_general['cg_feed_lazy']);\n\t\t\t\t\n\t\t\t\tif( $cg_feed_lazy == '' ) $cg_feed_lazy = 'data-src';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpreg_match_all('{<img .*?>}s', $original_cont,$imgsMatchs);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$imgsMatchs = $imgsMatchs[0];\n\t\t\t\t\n\t\t\t\tforeach($imgsMatchs as $imgMatch){\n\t\t\t\t\t\n\t\t\t\t\tif(stristr($imgMatch,$cg_feed_lazy )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$newImg = $imgMatch;\n\t\t\t\t\t\t$newImg = preg_replace('{ src=\".*?\"}', '', $newImg);\n\t\t\t\t\t\t$newImg = str_replace($cg_feed_lazy, 'src', $newImg);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$original_cont = str_replace($imgMatch, $newImg, $original_cont);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$original_cont = $this->lazy_loading_auto_fix( $original_cont );\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}//end-content-extraction\n\t\t\n\t\t\n\n\t\t// FULL CONTENT\n\t\tif ( in_array ( 'OPT_FULL_FEED', $camp_opt ) ) {\n\t\t\t \t\n\t\t\t \n\t\t\t// test url\n\t\t\t//$url =\"http://news.jarm.com/view/75431\";\n\t\t\t\t \n\t\t\t\n\t\t\t//get scripts\n\t\t\t$postponedScripts = array();\n\t\t\tpreg_match_all('{<script.*?</script>}s', $original_cont , $scriptMatchs);\n\t\t\t$scriptMatchs = $scriptMatchs[0];\n\t\t\t\n\t\t\t\n\t\t\tforeach ($scriptMatchs as $singleScript){\n\t\t\t\tif( stristr($singleScript, 'connect.facebook')){\n\t\t\t\t\t$postponedScripts[] = $singleScript;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$original_cont = str_replace($singleScript, '', $original_cont);\n\t\t\t}\n \t\t\t\n \t\t\t \n\t\t\t$x = curl_error ( $this->ch );\n\t\t\t$url = curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t// Redability instantiate\n\t\t\trequire_once 'inc/wp_automatic_readability/wp_automatic_Readability.php';\n\t\t\t\n\t\t\t$wp_automatic_Readability = new wp_automatic_Readability ( $original_cont, $url );\n\t\t\t\n\t\t\t$wp_automatic_Readability->debug = false;\n\t\t\t$result = $wp_automatic_Readability->init ();\n\t\t\t\t\n\t\t\tif ($result) {\n\t\t\t\t\n\t\t\t\t// Redability title\n\t\t\t\t$title = $wp_automatic_Readability->getTitle ()->textContent;\n\t\t\t\t\n\t\t\t\t// Redability Content\n\t\t\t\t$content = $wp_automatic_Readability->getContent ()->innerHTML;\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//twitter embed fix\n\t\t\t\tif(stristr($content, 'twitter.com') && ! stristr($content, 'platform.twitter')){\n\t\t\t\t\t$content.='<script async src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>';\n\t\t\t\t}\n\n\t\t\t\t// Remove wp_automatic_Readability attributes\n\t\t\t\t$content = preg_replace('{ wp_automatic_Readability\\=\".*?\"}s', '', $content);\n\t\t\t\t\n\t\t\t\t// Fix iframe if exists\n\t\t\t\tpreg_match_all('{<iframe[^<]*/>}s', $content,$ifrMatches);\n\t\t\t\t$iframesFound = $ifrMatches[0];\n\t\t\t\t\n\t\t\t\tforeach ($iframesFound as $iframeFound){\n\t\t\t\t\t\n\t\t\t\t\t$correctIframe = str_replace('/>','></iframe>',$iframeFound);\n\t\t\t\t\t$content = str_replace($iframeFound, $correctIframe, $content);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//add postponed scripts \n\t\t\t\tif(count($postponedScripts) > 0 ){\n\t\t\t\t\t$content.= implode('', $postponedScripts);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// Cleaning redability for better memory\n\t\t\t\tunset($wp_automatic_Readability);\n\t\t\t\tunset($result);\n\t\t\t\t\t\n\t\t\t\t// Check existence of title words in the content\n\t\t\t\t$title_arr=explode(' ', $title);\n\n\t\t\t\t$valid='';\n\t\t\t\t$nocompare=array('is','Is','the','The','this','This','and','And','or','Or','in','In','if','IF','a','A','|','-');\n\t\t\t\tforeach($title_arr as $title_word){\n\t\t\t\t\t\n\t\t\t\t\tif(strlen($title_word) > 3){\n\t\t\t\t\t\n\t\t\t\t\t\tif(! in_array($title_word, $nocompare) && preg_match('/\\b'. preg_quote(trim($title_word),'/') .'\\b/ui', $content)){\n\t\t\t\t\t\t\t echo '<br>Word '.$title_word .' exists';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// echo $content;\n\t\t\t\t\t\t\t$valid='yeah';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t echo '<br>Word '.$title_word .' does not exists';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(trim($valid) != ''){\n\n\t\t\t\t\t$res ['cont'] = $content;\n\t\t\t\t\t$res ['matched_content'] = $content;\n\t\t\t\t\t$res ['og_img'] = '';\n\t\t\t\t\t\n\t\t\t\t\tif(! in_array('OPT_FEED_TITLE_NO', $camp_opt)){\n\t\t\t\t\t\t$res ['title'] = $title;\n\t\t\t\t\t\t$res['original_title'] = $title;\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t// let's find og:image may be the content we got has no image\n\t\t\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:image[\"|\\'][^<]*?>}s', $html,$plain_og_matches);\n\n\t\t\t\t\tif( isset($plain_og_matches[0]) && @stristr($plain_og_matches[0], 'og:image')){\n\t\t\t\t\t\tpreg_match('{content=[\"|\\'](.*?)[\"|\\']}s', $plain_og_matches[0],$matches);\n\t\t\t\t\t\t$og_img = $matches[1];\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($og_img) !=''){\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}// If og:image\n \t\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>Can not make sure if the returned content is the full content.. using excerpt instead.';\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t echo '<br>Looks like we couldn\\'t find the full content. :( returning summary';\n\t\t\t}\n\t\t\t\n\t\t// Class or ID extraction\n\t\t\n\t\t}elseif(in_array ( 'OPT_FEED_CUSTOM', $camp_opt )){\n\t\t\t\t \n\t\t\t\n\t\t\t// Load dom\n\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\n\t\t\t\n\t\t\t$cg_custom_selector=$camp_general['cg_custom_selector'];\n\t\t\t$cg_feed_custom_id =$camp_general['cg_feed_custom_id'];\n\t\t\t$cg_feed_custom_id=array_filter($cg_feed_custom_id);\n\t\t\t$cg_feed_css_size = $camp_general['cg_feed_css_size'];\n\t\t\t$cg_feed_css_wrap = $camp_general['cg_feed_css_wrap'];\n\n\t\t\techo '<br>Extracting content from original post for ';\n\t\t\t\n\t\t\t\t \n\t\t\t//test url\n\t\t\t//$url = \"http://news.jarm.com/view/75431\";\n\t\t\t$wholeFound = '';\n\t\t\tif(1){\n \t\t\t\t$i=0;\n\t\t\t\tforeach ($cg_feed_custom_id as $cg_selecotr_data){\n\t\t\t\t\t\n\t\t\t\t\t$cg_selector = $cg_custom_selector[$i];\n\t\t\t\t\t$cg_feed_css_size_s = $cg_feed_css_size[$i];\n\t\t\t\t\t$cg_feed_css_wrap_s = $cg_feed_css_wrap[$i];\n\t\t\t\t\t\n\t\t\t\t\techo '<br>'.$cg_selector . ' = \"'.$cg_selecotr_data.'\"';\n\t\t\t\t\t\n\t\t\t\t\tif( $cg_feed_css_wrap_s == 'inner' ){\n\t\t\t\t\t\t$inner = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$inner = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($cg_selector == 'xpath'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByXPath( stripslashes( $cg_selecotr_data ) ,$inner);\n\t\t\t\t\t\t \n\t\t\t\t\t}elseif($cg_selector == 'class'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByClass( $cg_selecotr_data,$inner);\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t}elseif($cg_selector== 'id'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByID( $cg_selecotr_data,$inner);\n\t\t\t\t\t}\n\t\n\t\t\t\t\t$extract='';\n\t\n\t\t\t\t\tforeach ($ret as $itm ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t $extract.= $itm;\n\t\n\t\t\t\t\t\tif( $cg_feed_css_size_s == 'single'){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t \n\t\t\t\t\t$rule_num = $i +1;\n\t\t\t\t\t$res['rule_'.$rule_num] = $extract;\n\t\t\t\t\t$res['rule_'.$rule_num.'_plain'] = strip_tags( $extract );\n\t\t\t\t\t\n\t\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t\t echo '<br>Nothing found to extract for this rule' ;\n\t\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\t\t echo ' <-- ' . strlen($extract) .' chars extracted';\n\t\t\t\t\t\t $wholeFound = (trim($wholeFound) == '' ) ? $extract : $wholeFound.'<br>'.$extract;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n \t\t\t\t\t$i++;\n\t\t\t\t}\t\n\t\t\t\tif(trim($wholeFound) != ''){\n\t\t\t\t\t$res ['cont'] = $wholeFound;\n\t\t\t\t\t$res ['matched_content'] = $wholeFound;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t echo '<br>could not parse the content returning summary' ;\n\t\t\t}\n\t\t\t\n\t\t// REGEX EXTRACT\t\n\t\t}elseif(in_array ( 'OPT_FEED_CUSTOM_R', $camp_opt )){\n\t\t\t\t\n\t\t\techo '<br>Extracting content using REGEX ';\n\t\t\t$cg_feed_custom_regex = $camp_general['cg_feed_custom_regex'];\n\t\t\t\n\t\t\t$finalmatch = '';\n\t\t\t\t\n\t\t\tforeach ($cg_feed_custom_regex as $cg_feed_custom_regex_single){\n\t\t\t\n\t\t\t$cg_feed_custom_regex_single = html_entity_decode( $cg_feed_custom_regex_single );\n \t\t\t\t\n\t\t\tif(trim($cg_feed_custom_regex_single) != '' ){\n\n\t\t\t\t$finalmatch2 = '';\n\n\t\t\t\t//we have a regex\n\t\t\t\techo '<br>Regex :'. htmlspecialchars($cg_feed_custom_regex_single);\n\n\n\t\t\t\t//extracting\n\t\t\t\tif(trim($original_cont) !=''){\n\t\t\t\t\tpreg_match_all('{'.$cg_feed_custom_regex_single.'}is', $original_cont,$matchregex);\n\t\t\t\t\t\t\n\t\t\t\t\tfor( $i=1 ; $i < count($matchregex);$i++ ){\n\n\t\t\t\t\t\tforeach($matchregex[$i] as $newmatch){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($newmatch) !=''){\n\t\t\t\t\t\t\t\tif(trim($finalmatch) !=''){\n\t\t\t\t\t\t\t\t\t$finalmatch.='<br>'.$newmatch;\n\t\t\t\t\t\t\t\t\t$finalmatch2.='<br>'.$newmatch;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$finalmatch.=$newmatch;\n\t\t\t\t\t\t\t\t\t$finalmatch2.=$newmatch;\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\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\techo '<-- '.strlen($finalmatch2) .' chars found';\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo '<br>Can not load original content.';\n\t\t\t\t}\n \n\n\t\t\t}//rule not empty\n\n\t\t\t}//foreach rule\n\t\t\t\n\t\t\tif(trim($finalmatch) != ''){\n\t\t\t\t//overwirte\n\t\t\t\techo '<br>'. strlen($finalmatch) . ' chars extracted using REGEX';\n\t\t\t\t$res ['cont'] = $finalmatch;\n\t\t\t\t$res ['matched_content'] = $finalmatch;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo '<br>Nothing extracted using REGEX using summary instead..';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// redirect_url tag finding\n\t\t$redirect = '';\n\t\t$redirect = curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t\t \n\t\tif(trim($redirect) != ''){\n\t\t\t$res ['redirect_url'] = $redirect;\n\t\t}\n\n\t\t// Stripping content using id or class from $res[cont]\n\t\tif(in_array('OPT_STRIP_CSS', $camp_opt)){\n\t\t\t\t\n\t\t\t echo '<br>Stripping content using:- ';\n\t\t\t\t\n\t\t\t$cg_selector = $camp_general['cg_custom_strip_selector'];\n\t\t\t$cg_selecotr_data = $camp_general['cg_feed_custom_strip_id'];\n\t\t\t$cg_selecotr_data = array_filter($cg_selecotr_data);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Load dom\n\t\t\t$final_doc = new DOMDocument();\n\t\t\t\n\t\t\t//getting encoding \n\t\t\t\n\t\t\tpreg_match_all('{charset=[\"|\\']([^\"]+?)[\"|\\']}', $original_cont,$encMatches);\n\t\t\t$possibleCharSet = $encMatches[1];\n\t\t\t\n\t\t \n\t\t\t\n\t\t\t$possibleCharSet = isset($possibleCharSet[0]) ? $possibleCharSet[0] : '';\n\t\t\t\n\t\t\tif(trim($possibleCharSet) == '') $possibleCharSet = 'UTF-8';\n\t\t\t\n\t\t\t$charSetMeta = '<meta http-equiv=\"content-type\" content=\"text/html; charset=' . $possibleCharSet . '\"/>';\n\t\t\t\n\t\t\t$full_html = '<head>'.$charSetMeta.'</head><body>'. $res['cont'] . '</body>' ;\n\t\t\t$html_to_count = $full_html;\n\t\t\t\n\t\t\t@$final_doc->loadHTML( $full_html );\n\t\t\t\n\t\t\t$selector = new DOMXPath($final_doc);\n\t\t\t\n\t\t\t\n\t\t\t$i=0;\n\t\t\t$inner = false;\n\t\t\tforeach ( $cg_selecotr_data as $cg_selector_data_single ){\n\t\t\t\t\n\t\t\t\techo '<br> - ' . $cg_selector[$i]. ' = \"'.$cg_selector_data_single.'\" ';\n\t\t\t\t\n\t\t\t\tif(trim($cg_selector_data_single) != '' ){\n\t\t\t\t\t\n\t\t\t\t\tif($cg_selector[$i] == 'class'){\n\t\t\t\t\t\t$query_final = '//*[contains(attribute::class, \"' . trim($cg_selector_data_single) . '\")]';\n\t\t\t\t\t}elseif( $cg_selector[$i] == 'id'){\n\t\t\t\t\t\t$query_final = \"//*[@id='\" . trim($cg_selector_data_single) .\"']\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$countBefore = $this->chars_count( $html_to_count );\n\t\t\t\t\t\n\t\t\t\t\tforeach($selector->query($query_final) as $e ) {\n\t\t\t\t\t\t$e->parentNode->removeChild($e);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t$html_to_count = $final_doc->saveHTML($final_doc->documentElement);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$countAfter = $this->chars_count($res['cont']);\n\t\t\t\t\t\n\t\t\t\t\techo '<-- '. ( $countBefore - $countAfter ) . ' chars removed';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$contentAfterReplacement = $final_doc->saveHTML($final_doc->documentElement);\n\t\t\t$contentAfterReplacement = str_replace( array('<html>' , '</html>' , '<body>' , '</body>' , $charSetMeta ) , '' , $contentAfterReplacement );\n\t\t\t$contentAfterReplacement = preg_replace('{<head>.*?</head>}','' , $contentAfterReplacement );\n\t\t\t\n\t\t\t$res['cont'] = trim( $contentAfterReplacement );\n\t\t\t\t \n\t\t\t\t//overwirte\n\t\t\t\t$res ['matched_content'] = $res ['cont'];\n \n\n\t\t\t \n\t\t\t\t\n\t\t}\n\n\t\t// Stripping content using REGEX\n\t\tif(in_array('OPT_STRIP_R', $camp_opt)){\n\t\t\t$current_content =$res ['matched_content'] ;\n\t\t\t$current_title=$res['title'];\n\t\t\t$cg_post_strip = html_entity_decode($camp_general['cg_post_strip']);\n\t\t\t\t\n\t\t\t$cg_post_strip=explode(\"\\n\", $cg_post_strip);\n\t\t\t$cg_post_strip=array_filter($cg_post_strip);\n\t\t\t\t\n\t\t\tforeach($cg_post_strip as $strip_pattern){\n\t\t\t\tif(trim($strip_pattern) != ''){\n\n\t\t\t\t\t//$strip_pattern ='<img[^>]+\\\\>';\n\n\t\t\t\t\t echo '<br>Stripping using REGEX:'.htmlentities($strip_pattern);\n\t\t\t\t\t\n\t\t\t\t\t $countBefore = $this->chars_count( $current_content );\n\t\t\t\t\t \n\t\t\t\t\t $current_content= preg_replace('{'.trim($strip_pattern).'}is', '', $current_content);\n\t\t\t\t\t\n\t\t\t\t\t $countAfter = $this->chars_count($current_content);\n\t\t\t\t\t \n\t\t\t\t\t echo ' <-- '. ( $countBefore - $countAfter ) . ' chars removed'; \n\t\t\t\t\t \n\t\t\t\t\t$current_title= preg_replace('{'.trim($strip_pattern).'}is', '', $current_title);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\tif(trim($current_content) !=''){\n\t\t\t\t$res ['matched_content'] =$current_content ;\n\t\t\t\t$res ['cont'] =$current_content ;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(trim($current_title) !=''){\n\t\t\t\t$res ['matched_title'] =$current_title ;\n\t\t\t\t$res ['original_title'] =$current_title ;\n\t\t\t\t$res ['title'] =$current_title ;\n\n\t\t\t}\n\t\t\t\t\n\t\t}// end regex replace\n\t\t\n\t\t// strip tags\n\t\tif(in_array('OPT_STRIP_T', $camp_opt)){\n\t\t\t\n\t\t\t echo '<br>Stripping html tags...';\n\t\t\t\n\t\t\t$cg_allowed_tags = trim($camp_general['cg_allowed_tags']);\n\t\t\t\n\t\t\tif(! stristr($cg_allowed_tags, '<script')){\n\t\t\t\t$res ['matched_content'] = preg_replace( '{<script.*?script>}s', '', $res ['matched_content'] );\n\t\t\t\t$res ['cont'] = preg_replace( '{<script.*?script>}s', '', $res ['cont'] );\n\t\t\t\t\n\t\t\t\t$res ['matched_content'] = preg_replace( '{<noscript.*?noscript>}s', '', $res ['matched_content'] );\n\t\t\t\t$res ['cont'] = preg_replace( '{<noscript.*?noscript>}s', '', $res ['cont'] );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$res ['matched_content'] = strip_tags(\t$res ['matched_content'] , $cg_allowed_tags) ;\n\t\t\t$res ['cont'] =strip_tags($res ['cont'] , $cg_allowed_tags) ;\n\t\t}\n\t\t\n\t\t// validate content size\n\t\t\n\t\t//MUST CONTENT\n\t\tif(in_array('OPT_MUST_CONTENT', $camp_opt)){\n\t\t\n\t\t\tif(trim($res['cont']) == ''){\n\t\t\t\t echo '<--No content excluding';\n\t\t\t\t$this->link_execlude( $camp->camp_id, $original_url );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t//limit content\n\t\tif(in_array('OPT_MIN_LENGTH', $camp_opt)){\n\t\t\n\t\t\t$contentTextual = strip_tags($res['cont']);\n\t\t\t$contentTextual = str_replace(' ', '', $contentTextual);\n\t\t\t\n\t\t\tif(function_exists('mb_strlen'))\n\t\t\t{\n\t\t\t\t$contentLength = mb_strlen($contentTextual);\n\t\t\t}else{\n\t\t\t\t$contentLength = strlen($contentTextual);\n\t\t\t}\n\t\t\t\n\t\t\tunset($contentTextual);\n\t\t\n\t\t\t echo '<br>Content length:'.$contentLength;\n\t\t\n\t\t\tif( $contentLength < $camp_general['cg_min_length'] ){\n\t\t\t\t echo '<--Shorter than the minimum... Excluding';\n\t\t\t\t$this->link_execlude( $camp->camp_id, $original_url );\n\t\t\t\tcontinue;\n\t\t\n\t\t\t}\n\t\t\n\t\t}\n \n\t\t// Entity decode \n\t\tif(in_array('OPT_FEED_ENTITIES', $camp_opt)){\n\t\t\t echo '<br>Decoding html entities';\n\t\t\t\t\n\t\t\t//php 5.3 and lower convert to invalid charchters that broke everything\n\t\t\t\t\n\t\t\t$res ['original_title'] = str_replace(' ', ' ', $res ['original_title']);\n\t\t\t$res ['matched_content'] = str_replace(' ', ' ', $res ['matched_content']);\n\t\t\t\t\n\t\t\t$res ['original_title'] = html_entity_decode($res ['original_title'] , ENT_QUOTES | ENT_HTML401);\n\t\t\t$res ['title'] = html_entity_decode($res ['title'] , ENT_QUOTES | ENT_HTML401) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t$res ['matched_content'] = html_entity_decode($res ['matched_content'],ENT_QUOTES | ENT_HTML401 );\n\t\t\t$res ['cont'] = $res ['matched_content'];\n\t\t\n\t\t}// end entity decode\n\t\t\n\t\t\n\t\t// Clean googleads and <script tag\n\t\t$res['cont'] = preg_replace('{<ins.*?ins>}s', '', $res['cont']);\n\t\t$res['cont'] = preg_replace('{<ins.*?>}s', '', $res['cont']);\n\t\t\n\t\tif(! in_array('OPT_FEED_SCRIPT', $camp_opt))\n\t\t$res['cont'] = preg_replace('{<script.*?script>}s', '', $res['cont']);\n\t\t\n\t\t$res['cont'] = preg_replace('{\\(adsbygoogle.*?\\);}s', '', $res['cont']);\n\t\t$res ['matched_content'] = $res['cont'];\n \n\t\t// meta tags\n\t\tif(in_array('OPT_ORIGINAL_META', $camp_opt)){\n\t\t\t\n\t\t \t\n\t\t\t//extract all metas \n\t\t\tpreg_match_all('{<meta.*?>}s', $original_cont,$metaMatches);\n\t\t\t\n\t\t\t$allMeta = $metaMatches[0];\n\t\t\t\n\t\t\tforeach ($allMeta as $singleMeta){\n\t\t\t\t\n\t\t\t\tif(stristr($singleMeta, 'keywords')){\n\t\t\t\t\t\n\t\t\t\t\tif(preg_match('{name[\\s]?=[\\s]?[\"\\']keywords[\"\\']}', $singleMeta) ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tpreg_match_all('{content[\\s]?=[\\s]?[\\'\"](.*?)[\\'\"]}s', $singleMeta,$realTagsMatches);\n\t\t\t\t\t\t$realTagsMatches = $realTagsMatches[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($realTagsMatches[0]) != ''){\n\t\t\t\t\t\t \n\t\t\t\t\t\t\techo '<br>Meta tags:'.$realTagsMatches[0];\n\t\t\t\t\t\t\t$res['tags'] = $realTagsMatches[0];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\n\t\t\t// Extract cats from original source\n\t\t\tif(in_array('OPT_ORIGINAL_CATS', $camp_opt) && trim($camp_general['cg_feed_custom_id_cat']) != ''){\n\t\t\t\t\n\t\t\t\techo '<br>Extracting original post categories ';\n\t\t\t\t\n\t\t\t\t$cg_selector_cat=$camp_general['cg_custom_selector_cat'];\n\t\t\t\t$cg_selecotr_data_cat=$camp_general['cg_feed_custom_id_cat'];\n\t\t\t\t$inner = false;\n\t\t\t\t\n\t\t\t\techo ' for '.$cg_selector_cat . ' = '.$cg_selecotr_data_cat;\n\t\t\t\t\n\t\t \n\t\t\t\t//dom class\n\t\t\t\tif(! isset($wpAutomaticDom)){\n\t\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$extract='';\n\t\t\t\t\t\n\t\t\t\t\tif ($cg_selector_cat == 'class') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_cat, $inner );\n\t\t\t\t\t} elseif ($cg_selector_cat == 'id') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_cat, $inner );\n\t\t\t\t\t} elseif ($cg_selector_cat == 'xpath') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_cat ), $inner );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_CAT', $camp_opt)){\n\t\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t\techo '<br>Nothing found to extract for this category rule';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<br>Cat Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t\t\n \n\t\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$cats_matches);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t$cats_founds = $cats_matches[1];\n\t\t\t\t\t\t\t$cat_founds = array_map('strip_tags', $cats_founds);\n\t\t\t\t\t\t\t$cats_str = implode(',', $cat_founds);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo ' found cats:'.$cats_str;\n\t\t\t\t\t\t\t$res['cats'] =$cats_str;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t \n\t\t// Extract tags from original source\n\t\tif(in_array('OPT_ORIGINAL_TAGS', $camp_opt) && trim($camp_general['cg_feed_custom_id_tag']) != ''){\n\t\t\t\t\n\t\t\t echo '<br>Extracting original post tags ';\n\t\t\t\t\n\t\t\t$cg_selector_tag=$camp_general['cg_custom_selector_tag'];\n\t\t\t$cg_selecotr_data_tag=$camp_general['cg_feed_custom_id_tag'];\n\t\t\t$inner = false;\n\t\t\t \n\n\t\t\techo ' for '.$cg_selector_tag . ' = '.$cg_selecotr_data_tag;\n\n\t\t\t//dom class\n\t\t\tif(! isset($wpAutomaticDom)){\n\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t}\n\t\t\t\n\t\t\t \n\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t \n\t\t\t\t$extract='';\n\t\t\t\t\t\n\t\t\t\tif ($cg_selector_tag == 'class') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_tag, $inner );\n\t\t\t\t} elseif ($cg_selector_tag == 'id') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_tag, $inner );\n\t\t\t\t} elseif ($cg_selector_tag == 'xpath') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_tag ), $inner );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\n\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_TAG', $camp_opt)){\n\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t \t\n\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t echo '<br>Nothing found to extract for this tag rule';\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>Tag Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$tags_matches);\n \n\t\t\t\t\t\t$tags_founds = $tags_matches[1];\n\t\t\t\t\t\t$tags_founds = array_map('strip_tags', $tags_founds); \n\t\t\t\t\t\t \n\t\t\t\t\t\t$tags_str = implode(',', $tags_founds);\n\n\t\t\t\t\t\t echo ' Found tags:'.$tags_str;\n\t\t\t\t\t\t $res['tags'] =$tags_str;\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t \n\t\t\t\t\n\t\t}elseif(in_array('OPT_ORIGINAL_TAGS', $camp_opt)){\n\t\t\t\n\t\t\t echo '<br>You must add a valid ID/Class to Extract tags, No tags will get extracted.';\n\t\t\t\n\t\t}//extract tags\n\n\t\t//extract author from original source\n\t\tif(in_array('OPT_ORIGINAL_AUTHOR', $camp_opt) && trim( $camp_general['cg_feed_custom_id_author'] ) != '' ){\n\n\t\t\t echo '<br>Extracting original post author ';\n\n\t\t\t$cg_selector_author=$camp_general['cg_custom_selector_author'];\n\t\t\t$cg_selecotr_data_author=$camp_general['cg_feed_custom_id_author'];\n\t\t\t$inner = false;\n\n\t\t\t echo ' for '.$cg_selector_author . ' = '.$cg_selecotr_data_author;\n \n\t\t\t\t \n\t\t\t //dom class\n\t\t\t if(! isset($wpAutomaticDom)){\n\t\t\t \trequire_once 'inc/class.dom.php';\n\t\t\t \t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t }\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$extract='';\n\t\t\t\t\n\t\t\t\tif ($cg_selector_author == 'class') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_author, $inner );\n\t\t\t\t} elseif ($cg_selector_author == 'id') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_author, $inner );\n\t\t\t\t} elseif ($cg_selector_author == 'xpath') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_author ), $inner );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\n\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_AUTHOR', $camp_opt)){\n\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Validate returned author\n\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t echo '<br>Nothing found to extract for this author rule';\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>author Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$author_matches);\n\n\t\t\t\t\t\t$author_founds = $author_matches[1];\n\t\t\t\t\t\t$author_str = strip_tags($author_founds[0]);\n\n\t\t\t\t\t\t echo ' Found author:'.$author_str;\n\t\t\t\t\t\t$res['author'] =$author_str;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\n\n\t\t}elseif(in_array('OPT_ORIGINAL_AUTHOR', $camp_opt)){\n\t\t\t\n\t\t\tif( trim($res['author']) == '' ){\n\t\t\t\n\t\t\t\t echo '<br>You must add a valid ID/Class to Extract Author, No Author will get extracted.';\n\t\t\t}\n\t\t\t\n\t\t}//extract author\n\n\n\t\tif(! in_array('OPT_ENCLUSURE', $camp_opt)){\n\t\t\tif( isset($media_image_url) && ! stristr($res['cont'], '<img') ){\n\t\t\t\t echo '<br>enclosure image:'.$media_image_url;\n\t\t\t\t$res['cont'] = '<img src=\"'.$media_image_url.'\" /><br>' . $res['cont'];\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Part to custom field OPT_FEED_PTF\n\t\t\n\t\t// Extracted custom fields ini\n\t\t$customFieldsArr = array();\n\t\t$ruleFields = array(); //fields names\n\t\t\n\t\tIf( in_array('OPT_FEED_PTF', $camp_opt) ){\n\t\t\t\n\t\t\techo '<br>Specific Part to custom field extraction';\n\t\t\t\n\t\t\t// Load rules\n\t\t\t$cg_part_to_field = trim( html_entity_decode( $camp_general['cg_part_to_field'] ) );\n\t\t\t$cg_part_to_field_parts = explode(\"\\n\", $cg_part_to_field);\n\t\t\t\n\t\t\t// Process rules\n\t\t\tforeach ( $cg_part_to_field_parts as $cg_part_to_field_part ){\n\t\t\t\t echo '<br>Rule:'.htmlentities($cg_part_to_field_part);\n\t\t\t\t\n\t\t\t\t// Validate format | \n\t\t\t\tif( ! stristr($cg_part_to_field_part, '|')){\n\t\t\t\t\t echo '<- Wrong format...';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Parse rule\n\t\t\t\t$rule_parts = explode('|', $cg_part_to_field_part);\n\t\t\t\t\n\t\t\t\t$rule_method = trim( $rule_parts[0] );\n\t\t\t\t$rule_value = trim( $rule_parts[1] );\n\t\t\t\t$rule_field = trim( $rule_parts[2] );\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$rule_single = 0;\n\t\t\t\t@$rule_single = $rule_parts[3];\n\t\t\t\t\n\t\t\t\t// Validate rule\n\t\t\t\tif(trim($rule_method) == '' || trim($rule_value) == '' || trim($rule_field) == ''){\n\t\t\t\t\t echo '<- Wrong format...';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ruleFields[] = $rule_field;\n\t\t\t\t\n\t\t\t\t// Validate rule method: class,id,regex,xpath\n\t\t\t\tif( $rule_method != 'id' && $rule_method != 'class' && $rule_method != 'regex' && $rule_method != 'xpath' ){\n\t\t\t\t\t echo '<- Wrong Method:'.$rule_method;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t \n\t\t\t\t\n\t\t\t \n\t\t\t\t \n\t\t\t\t// id,class,xPath\n\t\t\t\tif( $rule_method == 'id' || $rule_method == 'class' || $rule_method == 'xpath' ){\n\t\t\t\t\t\n\t\t\t\t\t// Dom object\n\t\t\t\t\t$doc = new DOMDocument;\n\t\t\t\t\t\n\t\t\t\t\t// Load Dom\n\t\t\t\t\t@$doc->loadHTML($original_cont);\n\t\t\t\t\t\n\t\t\t\t\t// xPath object\n\t\t\t\t\t$xpath = new DOMXPath($doc);\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t// xPath query\n\t\t\t\t\tif($rule_method != 'xpath'){\n\t\t\t\t\t\t$xpathMatches = $xpath->query(\"//*[@\".$rule_method.\"='\".$rule_value.\"']\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$xpathMatches = $xpath->query(\"$rule_value\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Single item ? \n\t\t\t\t\tif($rule_single){\n\t\t\t\t\t\t$xpathMatches = array($xpathMatches->item(0));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Rule result ini\n\t\t\t\t\t$rule_result = '';\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\tforeach ($xpathMatches as $xpathMatch){\n\t\t\t\t\t\n\t\t\t\t\t\tif($rule_field == 'tags' || $rule_field == 'categories' ){\n\t\t\t\t\t\t\t$rule_result.= ',' . $xpathMatch->nodeValue;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$rule_result.= $xpathMatch->nodeValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Store field to be added\n\t\t\t\t\tif(trim($rule_result) != ''){\n\t\t\t\t\t\t echo ' <--'.$this->chars_count($rule_result). ' chars extracted';\n\t\t\t\t\t\t\n\t\t\t\t\t\t if( $rule_field == 'categories' ){\n\t\t\t\t\t\t \t$res['cats'] = $rule_result;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t$customFieldsArr[] = array( $rule_field , $rule_result );\n\t\t\t\t\t\t }\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<-- nothing found';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t// Regex extract\n\t\t\t\t\t$matchregex = array();\n\t\t\t\t\t$finalmatch = '';\n\t\t\t\t\t\n\t\t\t\t\t// Match\n\t\t\t\t\tpreg_match_all('{'.trim($rule_value).'}is', $original_cont,$matchregex);\n\t\t\t\t\t\n\t\t\t\t\t$matchregex_vals = $matchregex[1];\n\t\t\t\t\t\n\t\t\t\t\tif(isset($matchregex[2])) $matchregex_vals = array_merge($matchregex_vals , $matchregex[2] );\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t//single match\n\t\t\t\t\tif($rule_single && count($matchregex_vals) > 1){\n\t\t\t\t\t\t$matchregex_vals = array($matchregex_vals[0]);\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Read matches\n\t\t\t\t\t\tforeach($matchregex_vals as $newmatch){\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($newmatch) !=''){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(trim($finalmatch) ==''){\n\t\t\t\t\t\t\t\t\t$finalmatch.=''.$newmatch;\n\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\tif($rule_field == 'tags' || $rule_field == 'categories' ){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$finalmatch.= ',' . $newmatch;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$finalmatch.=$newmatch;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Store field to be added\n\t\t\t\t\tif(trim($finalmatch) != ''){\n\t\t\t\t\t\t\n\t\t\t\t\t\t echo ' <--'.$this->chars_count($finalmatch). ' chars extracted';\n\t\t\t\t\t \t\n\t\t\t\t\t\t \n\t\t\t\t\t\t if( $rule_field == 'categories' ){\n\t\t\t\t\t\t \t$res['cats'] = $finalmatch;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t$customFieldsArr[] = array( $rule_field , $finalmatch );\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<-- Nothing found';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t}//foreach rule\n\t\t\t\n\t\t\t\n\t\t}//if part to field enabled\n\t\t \n\t\t$res['custom_fields'] = $customFieldsArr;\n\t\t\n\t\tforeach( $ruleFields as $field_name ){\n\t\t\t\n\t\t\t$field_value = ''; //ini\n\t\t\t\t\t\n\t\t\tforeach($customFieldsArr as $fieldsArray){\n\t\t\t\t\n\t\t\t\tif($fieldsArray[0] == $field_name ){\n\t\t\t\t\t$field_value = $fieldsArray[1] ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$res[$field_name] = $field_value;\n\t\t\t\n\t\t}\n\t\t \n\t \n\t\t\n\t\t//og:image check\n\n\t\t//$url=\"kenh14.vn/kham-pha/5-hoi-chung-benh-ky-quac-nghe-thoi-cung-toat-mo-hoi-hot-20151219200950753.chn\";\n\t\n\t\t$currentOgImage = '' ; // for og:image found check \n\t\t\n\t\tif( in_array('OPT_FEEDS_OG_IMG', $camp_opt)){\n \n\t\t\t\t\n\t\t\t//getting the og:image\n\t\t\t//let's find og:image\n\n\t\t\t// if no http\n\t\t\t$original_cont = str_replace('content=\"//', 'content=\"http://', $original_cont );\n\n\t\t\techo '<br>Extracting og:image :';\n\t\t\t\t\n\t\t\t//let's find og:image may be the content we got has no image\n\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:image[\"|\\'][^<]*?>}s', $original_cont,$plain_og_matches);\n\t\t\t\n\t\t\tif( isset($plain_og_matches[0]) && stristr($plain_og_matches[0], 'og:image')){\n\t\t\t\tpreg_match('{content=[\"|\\'](.*?)[\"|\\']}s', $plain_og_matches[0],$matches);\n\t\t\t\t$og_img = $matches[1];\n\t\t\t\t\n\t\t\t\tif(trim($og_img) !=''){\n\n\t\t\t\t\t$og_img_short = preg_replace('{http://.*?/}', '', $og_img);\n\t\t\t\t\techo $og_img_short ;\n\t\t\t\t\tif(trim($og_img_short) == ''){\n\t\t\t\t\t\t$og_img_short = $og_img;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// get og_title\n\t\t\t\t\tpreg_match_all('/<img .*>/', $original_cont,$all_images);\n\t\t\t\t\t\n\t\t\t\t\t$all_images = $all_images[0];\n\t\t\t\t\t$foundAlt = '';//ini\n\t\t\t\t\tforeach ($all_images as $single_image) {\n\t\t\t\t\t\tif(stristr( $single_image , $og_img_short)){\n\t\t\t\t\t\t\t//extract alt text\n\t\t\t\t\t\t\tpreg_match('/alt=[\"|\\'](.*?)[\"|\\']/', $single_image,$alt_matches) ;\n\t\t\t\t\t\t\t$foundAlt = (isset($alt_matches[1])) ? $alt_matches[1] : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t$res['og_alt'] = $foundAlt;\n\t\t\t\t\t$currentOgImage = $og_img;\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t//fix FB embeds\n\t\tif(stristr($res['cont'], 'fb-post') && ! stristr($res['cont'], 'connect.facebook') ){\n\t\t\techo '<br>Possible Facebook embeds found adding embed scripts';\n\t\t\t$res['cont'].= '<div id=\"fb-root\"></div>\n<script async defer src=\"https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2\"></script>';\n\t\t}\n\t\t\n\t\t//fix twitter embeds\n\t\tif(stristr($res['cont'], 'twitter.com') && ! stristr($res['cont'], 'platform.twitter') ){\n\t\t\techo '<br>Possible tweets found without twitter JS. adding JS';\n\t\t\t$res['cont'].= '<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>';\n\t\t}\n\t\t\n\t\t//fix instagram.com embeds\n\t\tif(stristr($res['cont'], 'instagram.com') && ! stristr($res['cont'], 'platform.instagram') ){\n\t\t\techo '<br>Possible Instagram embeds found without JS. adding JS';\n\t\t\t$res['cont'].= '<script async defer src=\"https://platform.instagram.com/en_US/embeds.js\"></script>';\n\t\t}\n\t\t\n\t\t//fix youtube no height embeds\n\t\tif(stristr($res['cont'], 'youtube.com/embed')){\n\t\t\t\n\t\t\tpreg_match_all('{<iframe[^>]*?youtube.com/embed/(.*?)\".*?>(?:</iframe>)?}',$res['cont'],$yt_matches);\n\t\t\t\n\t\t \n\t\t\t$yt_matches_full = $yt_matches[0];\n\t\t\t$yt_matches_ids = $yt_matches[1];\n\t\t\t\n\t\t\t\n\t\t\tif(count($yt_matches_full) > 0 ){\n\t\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($yt_matches_full as $embed){\n\t\t\t\t\t\n\t\t\t\t\techo '<br>Youtube video embed format changed to WordPress for video :'. $yt_matches_ids[$i] ;\n\t\t\t\t\t\n\t\t\t\t\t$res['cont'] = str_replace($embed , '[embed]https://www.youtube.com/watch?v=' . $yt_matches_ids[$i] . '[/embed]' , $res['cont'] ) ;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t \n\t\t}\n\t\t\t\n\t\t//check if image or not\n\t\tif( in_array ( 'OPT_MUST_IMAGE', $camp_opt ) && ! stristr($res['cont'], '<img') && trim($currentOgImage) == '' ) {\n\t\t\t\n\t\t\t echo '<br>Post contains no images skipping it ...';\n\t\t\t\n\t\t\t// Excluding it \n\t\t\t$this->link_execlude($camp->camp_id, $original_url);\n\n\t\t}else{\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t//og image fix\n\t\t\tif( isset( $res ['og_img'] ) && trim($res ['og_img']) !=''){\n\t\t\t\t\n\t\t\t\t//make sure it has the domain\n\t\t\t\tif(! stristr($og_img, 'http:')){\n\t\t\t\t\tif(stristr($og_img, '//')){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$og_img = 'http:'. $og_img;\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//no domain at all\n\t\t\t\t\t\t$og_img = '/'.$og_img;\n\t\t\t\t\t\t$og_img = str_replace('//', '/', $og_img);\n\t\t\t\t\t\t$og_img = 'http://'.$host.$og_img;\n\t\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//og title or custom title extraction method\n\t\t\tif( in_array('OPT_FEED_OG_TTL', $camp_opt) || ( isset($camp_general['cg_ml_ttl_method']) && trim($camp_general['cg_ml_ttl_method']) != 'auto' ) ){\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif( in_array('OPT_FEED_OG_TTL', $camp_opt) ){\n\t\t\t\t\t// let's find og:image may be the content we got has no image\n\t\t\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:title[\"|\\'][^<]*?>}s', $original_cont,$plain_og_matches);\n\t\t\t\t\t\n\t\t \n\t\t\t\t\t\n\t\t\t\t\tif(@stristr($plain_og_matches[0], 'og:title')){\n\t\t\t\t\t\tpreg_match('{content[\\s]*=[\\s]*\"(.*?)\"}s', $plain_og_matches[0],$matches);\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t$og_ttl = $matches[1];\n\t\t\t\t\t\n\t\t\t\t\t\techo '<br>og:title:'. html_entity_decode( htmlspecialchars_decode($og_ttl));\n\t\t\t\t\t\t \n\t\t\t\t\t\tif(trim($og_ttl) !=''){\n\t\t\t\t\t\t\t$og_ttl = htmlspecialchars_decode($og_ttl,ENT_QUOTES);\n\t\t\t\t\t\t\t$res ['title'] = html_entity_decode( $og_ttl) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}// If og:title\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t// custom extraction method\n\t\t\t\t\t$cg_ml_ttl_method = $camp_general['cg_ml_ttl_method'];\n\t\t\t\t\t\n\t\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\t\t\n\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\n\t\t\t\t\tif ($cg_ml_ttl_method == 'visual') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_visual = $camp_general ['cg_ml_visual'];\n\t\t\t\t\t\t$path = isset ( $cg_ml_visual [0] ) ? $cg_ml_visual [0] : '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (trim ( $path ) == '') {\n\t\t\t\t\t\t\techo '<br>No path found for pagination, please set the extraction rule for pagination if you want to make use of pagination.';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ( $cg_ml_visual as $xpath ) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\techo '<br>Getting link for XPath:' . $path;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$finalContent = $wpAutomaticDom->getContentByXPath ( $xpath, false );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (is_array ( $finalContent ))\n\t\t\t\t\t\t\t\t\t$finalContent = implode ( '', $finalContent );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<-- ' . strlen ( $finalContent ) . ' chars';\n\t\t\t\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t\t\t\techo '<br>Error:' . $e->getMessage ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($cg_ml_ttl_method == 'css') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_css_type = $camp_general ['cg_ml_css_type'];\n\t\t\t\t\t\t$cg_ml_css = $camp_general ['cg_ml_css'];\n\t\t\t\t\t\t$cg_ml_css_wrap = $camp_general ['cg_ml_css_wrap'];\n\t\t\t\t\t\t$cg_ml_css_size = $camp_general ['cg_ml_css_size'];\n\t\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\tforeach ( $cg_ml_css_type as $singleType ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($cg_ml_css_wrap [$i] == 'inner') {\n\t\t\t\t\t\t\t\t$inner = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$inner = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<br>Extracting content by ' . $cg_ml_css_type [$i] . ' : ' . $cg_ml_css [$i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($cg_ml_css_type [$i] == 'class') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByClass ( $cg_ml_css [$i], $inner );\n\t\t\t\t\t\t\t} elseif ($cg_ml_css_type [$i] == 'id') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByID ( $cg_ml_css [$i], $inner );\n\t\t\t\t\t\t\t} elseif ($cg_ml_css_type [$i] == 'xpath') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_ml_css [$i] ), $inner );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (is_array ( $content )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($cg_ml_css_size [$i] == 'single') {\n\t\t\t\t\t\t\t\t\t$content = $content [0];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$content = implode ( \"\\n\", $content );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$finalContent .= $content . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<-- ' . strlen ( $content ) . ' chars';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i ++;\n\t\t\t\t\t\t} // foreach rule\n\t\t\t\t\t} elseif ($cg_ml_ttl_method == 'regex') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_regex = $camp_general ['cg_ml_regex'];\n\t\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\tforeach ( $cg_ml_regex as $cg_ml_regex_s ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<br>Extracting content by REGEX : ' . htmlentities ( stripslashes ( $cg_ml_regex_s ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByRegex ( stripslashes ( $cg_ml_regex_s ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content = implode ( $content );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<-- ' . strlen ( $content ) . ' chars';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (trim ( $content ) != '') {\n\t\t\t\t\t\t\t\t$finalContent .= $content . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i ++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$possibleTitle = '';\n\t\t\t\tif(trim($finalContent) != ''){\n\t\t\t\t\t$possibleTitle = strip_tags($finalContent);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(trim($possibleTitle) != ''){\n\t\t\t\t\t$res ['original_title'] = html_entity_decode( $possibleTitle , ENT_QUOTES | ENT_HTML401);\n\t\t\t\t\t$res ['title'] = html_entity_decode($possibleTitle , ENT_QUOTES | ENT_HTML401) ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\t\t\t \n\t\t\treturn $res;\n\t\t}\n\n\t}else{\n\n\t\t//duplicated link\n\t\t echo ' <-- duplicate in post <a href=\"'. admin_url('post.php?post='.$this->duplicate_id.'&action=edit') .'\">#'.$this->duplicate_id.'</a>';\n\n\t}\n\tendforeach\n\t;\n\n\t echo '<br>End of feed items reached.';\n\t\n\t if(isset($camp->camp_sub_type) && $camp->camp_sub_type == 'Multi'){\n\t \t\n\t \tdelete_post_meta ( $camp->camp_id, 'wp_automatic_cache' );\n\t \t\n\t }else{\n\t \t\n\t \t// Set isItemsEndReached flag to yes\n\t \tupdate_post_meta($camp->camp_id,$feedMd5.'_isItemsEndReached' , 'yes' );\n\t }\n\t \n\t \n\t \n\t \n}",
"function post_comments_feed_link($link_text = '', $post_id = '', $feed = '')\n {\n }",
"function feed_links($args = array())\n {\n }",
"function rss_feed_links() {\n\tadd_theme_support( 'automatic-feed-links' );\n}",
"function broadcast_feed_links()\n{\n\tif ( get_option( 'permalink_structure' ) ) {\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' » ' . __( 'Feed', 'rabe' ) . '\" href=\"' . site_url( '/feed/' ) .'\" />';\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' » ' . get_broadcast_name() . ' ' . __( 'Broadcast Feed', 'rabe' ) . '\" href=\"' . site_url( '/broadcast/' . get_broadcast_slug() ) . '/feed/\" />';\n\t} else {\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' » ' . __( 'Feed', 'rabe' ) . '\" href=\"' . site_url( '/index.php?&feed=rss2' ) .'\" />';\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' » ' . get_broadcast_name() . ' ' . __( 'Broadcast Feed', 'rabe' ) . '\" href=\"' . site_url( '/index.php?broadcast=' . get_broadcast_slug() ) . '&feed=rss2\" />';\n\t}\n}",
"public function getFeedLink();",
"function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}",
"function permalink_single_rss($deprecated = '')\n {\n }",
"function get_search_feed_link($search_query = '', $feed = '')\n {\n }",
"function addFeedData($feedID,$url,$status=true,$update=0);",
"function salmon_get_feed_link() {\n return \"<link rel='salmon' href='\".salmon_generate_api_url().\"'/>\";\n}",
"function get_tag_feed_link($tag, $feed = '')\n {\n }",
"function addLink(& $story, & $pageElement) {\t\t\n\t\t$storyElement =& $this->_document->createElement('link');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('url');\n\t\t$storyElement->appendChild($longertext);\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField(\"url\"))));\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}",
"function CreateSiteLinksFeed(FeedService $feedService) {\n // Create attributes.\n $textAttribute = new FeedAttribute();\n $textAttribute->type = 'STRING';\n $textAttribute->name = 'Link Text';\n $urlAttribute = new FeedAttribute();\n $urlAttribute->type = 'URL';\n $urlAttribute->name = 'Link URL';\n\n // Create the feed.\n $sitelinksFeed = new Feed();\n $sitelinksFeed->name = 'Feed For Site Links';\n $sitelinksFeed->attributes = array($textAttribute, $urlAttribute);\n $sitelinksFeed->origin = 'USER';\n\n // Create operation.\n $operation = new FeedOperation();\n $operation->operator = 'ADD';\n $operation->operand = $sitelinksFeed;\n\n $operations = array($operation);\n\n // Add the feed.\n $result = $feedService->mutate($operations);\n\n $savedFeed = $result->value[0];\n $savedAttributes = $savedFeed->attributes;\n\n return array(\n 'feedId' => $savedFeed->id,\n 'textAttributeId' => $savedAttributes[0]->id,\n 'urlAttributeId' => $savedAttributes[1]->id,\n );\n}",
"function get_author_feed_link($author_id, $feed = '')\n {\n }",
"public function add_new_feed(){\n\t\tadd_feed( 'wptticsfeeds', array( $this, 'generate_feed' ) );\n\t}",
"function adjacent_post_link($format, $link, $in_same_term = \\false, $excluded_terms = '', $previous = \\true, $taxonomy = 'category')\n {\n }",
"function comments_rss_link($link_text = 'Comments RSS')\n {\n }",
"function df_store_url_link($s = null) {return df_store_url($s, S::URL_TYPE_LINK);}"
]
| [
"0.6778361",
"0.67182124",
"0.64651215",
"0.6393721",
"0.6378318",
"0.6240546",
"0.62273055",
"0.6194639",
"0.61402667",
"0.61052424",
"0.608226",
"0.6079509",
"0.59695506",
"0.5967263",
"0.59559053",
"0.5943738",
"0.594368",
"0.5939042",
"0.5911689",
"0.5880697",
"0.5873591",
"0.5872323",
"0.5845759",
"0.58321214",
"0.5812861",
"0.5807981",
"0.57733446",
"0.5772014",
"0.5758771",
"0.5737862"
]
| 0.7680712 | 0 |
///////// Accessors ///////// Service title. | public function title()
{
if ($this->contributor_service && $this->contributor_service->title) {
return $this->contributor_service->title;
}
return $this->service->title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getServiceTitle() {}",
"public function get_title()\n {\n }",
"public function get_title()\n {\n }",
"public function get_title() {\n return __( 'APR Heading', 'apr-core' );\n }",
"function title() {\n ?>\n <h2><?php _e(SCLNG_PUBLIC_PRODUCT_INFO, SC_DOMAIN); ?></h2>\n <?php\n }",
"function page_title(): string {\r\n\t\treturn sprintf('%s — %s: Scheduler', $this->module->space()->name(),\r\n\t\t\t$this->module->name());\r\n\t}",
"public function get_title() {\n\t\treturn esc_html__( 'Processes', 'tr-framework' );\n\t}",
"function MyApp_Interface_HEAD_Title()\n {\n $comps=preg_split('/::/',parent::MyApp_Interface_HEAD_Title());\n $keys=array(\"Initials\",\"Name\",\"Title\");\n \n $unit=$this->Unit();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($unit,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n \n $event=$this->Event();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($event,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n\n return join(\"::\",array_reverse($comps)); \n }",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"public function getTitle() {}",
"function get_title() \t{\n \t\treturn $this->title;\t\n \t}",
"function getTitle() {\r\n return $this->_title;\r\n }",
"function getTitle() {\r\n return $this->_title;\r\n }",
"public function get_title();",
"public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Account Information\");\n }",
"public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}",
"public function title()\n {\n return $this->resource->getName();\n }"
]
| [
"0.89144415",
"0.70879215",
"0.7087731",
"0.70124865",
"0.699948",
"0.6954333",
"0.6936192",
"0.69320995",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.6925719",
"0.692495",
"0.6923885",
"0.6923885",
"0.68900776",
"0.6884322",
"0.6884322",
"0.6858935",
"0.68560535",
"0.68517154",
"0.68300885"
]
| 0.7713792 | 1 |
/ set the current block to work with and later display $block = name $file = template file to use | public function block($block, $file = NULL)
{
if ($file == NULL)
{
$file = $this->last_file;
}
else if (!isset($this->files[$file]))
{
$this->load($file);
}
// assign this block a number
// block number is used rather than the block name as we could be looping through the same block multiple times (and don't want each block to have the same content)
$this->block++;
$pattern = '#\[block:\s*(' . $block . ')\](.*)\[/block:\s*(' . $block . ')\]#is';
// find the content of the wanted block from the selected template file
if(preg_match($pattern, $this->files[$file], $matches))
{
// put the blocks info into the merged array with the block number
$this->merged[$this->block] = $matches[2];
}
else
{
$this->core->message("Error cannot find block named ($block).", 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function page_render_block($block) {\n static $xtpl_block;\n \n if (!$xtpl_block) $xtpl_block = new XTemplate('html/block.xtpl');\n \n $xtpl_block->reset('block');\n $xtpl_block->assign('id', $block['id']);\n $xtpl_block->assign('title', $block['title']);\n $xtpl_block->assign('content', $block['content']);\n \n if (isset($block['links'])) {\n $xtpl_block->assign('links', $block['links']);\n $xtpl_block->parse('block.links');\n }\n \n $xtpl_block->parse('block');\n return $xtpl_block->text('block');\n}",
"function _build_block_template_result_from_file($template_file, $template_type)\n {\n }",
"function render_block_core_file($attributes, $content, $block)\n {\n }",
"function get_the_block_template_html()\n {\n }",
"public function blockStart() {\n\n $this->outputEditmode('<div class=\"pimcore_block_entry ' . $this->getName() . '\" key=\"' . $this->indices[$this->current] . '\">');\n $this->outputEditmode('<div class=\"pimcore_block_buttons_' . $this->getName() . ' pimcore_block_buttons\">');\n $this->outputEditmode('<div class=\"pimcore_block_amount_' . $this->getName() . ' pimcore_block_amount\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_plus_' . $this->getName() . ' pimcore_block_plus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_minus_' . $this->getName() . ' pimcore_block_minus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_up_' . $this->getName() . ' pimcore_block_up\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_down_' . $this->getName() . ' pimcore_block_down\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_clear\"></div>');\n $this->outputEditmode('</div>');\n\n $this->current++;\n }",
"function render_block($parsed_block)\n {\n }",
"public function block_store($block, $file = NULL)\n\t{\n\t\tif ($file == NULL)\n\t\t{\n\t\t\t$file = $this->last_file;\n\t\t}\n\n\t\t$pattern = '#\\[block:\\s*(' . $block . ')\\](.*)\\[/block:\\s*(' . $block . ')\\]#is';\n\n\t\t// find the content of the wanted block from the selected template file\n\t\tif(preg_match($pattern, $this->files[$file], $matches))\n\t\t{\n\t\t\t// put the blocks info into the merged array with the block number\n\t\t\treturn $matches[2];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t$this->core->message(\"Error cannot find block named ($block).\", 1);\n\t\t}\n\t}",
"function locate_block_template($template, $type, array $templates)\n {\n }",
"function _add_block_template_info($template_item)\n {\n }",
"public function setTemplate($file);",
"function block_template_part($part)\n {\n }",
"function get_block_file_template($id, $template_type = 'wp_template')\n {\n }",
"public function getBlockTemplate(array $params);",
"function display_block( $file )\r\n{\r\n\tglobal $ignore_file_list, $ignore_ext_list, $force_download;\r\n\t\r\n\t$file_ext = ext($file);\r\n\tif( !$file_ext AND is_dir($file)) $file_ext = \"dir\";\r\n\tif(in_array($file, $ignore_file_list)) return;\r\n\tif(in_array($file_ext, $ignore_ext_list)) return;\r\n\t\r\n\t$download_att = ($force_download AND $file_ext != \"dir\" ) ? \" download='\" . basename($file) . \"'\" : \"\";\r\n\t\r\n\t$rtn = \"<div class=\\\"block\\\">\";\r\n\t$rtn .= \"<a href=\\\"$file\\\" class=\\\"$file_ext\\\"{$download_att}>\";\r\n\t$rtn .= \"\t<div class=\\\"img $file_ext\\\"></div>\";\r\n\t$rtn .= \"\t<div class=\\\"name\\\">\";\r\n\t\r\n\tif ($file_ext === \"dir\") \r\n\t{\r\n\t\t$rtn .= \"\t\t<div class=\\\"file fs-1-2 bold\\\">\" . basename($file) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">\" . count_dir_files($file) . \"</span> files</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">Size:</span> \" . get_directory_size($file) . \"</div>\";\r\n\t\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$rtn .= \"\t\t<div class=\\\"file fs-1-2 bold\\\">\" . basename($file) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">Size:</span> \" . display_size(filesize($file)) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper modified fs-0-7\\\"><span class=\\\"bold\\\">Last modified:</span> \" . date(\"D. F jS, Y - h:ia\", filemtime($file)) . \"</div>\";\t\r\n\t}\r\n\r\n\t$rtn .= \"\t</div>\";\r\n\t$rtn .= \"\t</a>\";\r\n\t$rtn .= \"</div>\";\r\n\treturn $rtn;\r\n}",
"public function startBlock($name)\n\t{\n\t\t$this->blockStack[] = array($name, FALSE);\n\t\tob_start();\n\t}",
"function display_block($file){\n\tglobal $ignore_file_list, $ignore_ext_list, $force_download;\n\t\n\t$file_ext = is_dir($file) ? \"dir\" : getFileExt($file);\n\tif(in_array($file, $ignore_file_list)) return;\n\tif(in_array($file_ext, $ignore_ext_list)) return;\n\t\n\t$download_att = ($force_download AND $file_ext != \"dir\" ) ? \" download='\" . basename($file) . \"'\" : \"\";\n\t\n\t$rtn = \"<div class=\\\"block\\\">\";\n\t$rtn .= \"<a href=\\\"$file\\\" class=\\\"$file_ext\\\"{$download_att}>\";\n\t$rtn .= \"\t<div class=\\\"img file-icon\\\" data-type=\\\"$file_ext\\\"> </div>\";\n\tswitch ($file_ext) {\n\t\tcase \"zip\":\n\t\tcase \"7z\":\n\t\tcase \"rar\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"archive\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"htm\":\n\t\tcase \"html\":\n\t\tcase \"php\":\n\t\tcase \"js\":\n\t\tcase \"css\":\n\t\tcase \"xhtml\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"web\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"doc\":\n\t\tcase \"rtf\":\n\t\tcase \"txt\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"doc\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"cfg\":\n\t\tcase \"ini\":\n\t\tcase \"log\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"cfg\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"mp3\":\n\t\tcase \"m4a\":\n\t\tcase \"wma\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"audio\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"mp4\":\n\t\tcase \"m4v\":\n\t\tcase \"avi\":\n\t\tcase \"wmv\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"video\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"bmp\":\n\t\tcase \"jpg\":\n\t\tcase \"gif\":\n\t\tcase \"ico\":\n\t\tcase \"png\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"image\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tcase \"dir\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"dir\\\"></i>\\n\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\"></i>\\n\";\n\t\t\tbreak;\n\t}\n\t$rtn .= \"\t<div class=\\\"name\\\">\\n\";\n\tif ($file_ext === \"dir\") {\n\t\t$rtn .= \"\t\t<div class=\\\"file\\\"><strong>[ \" . basename($file) . \" ]</strong></div>\\n\";\n\t} else {\n\t\t$rtn .= \"\t\t<div class=\\\"file\\\">\" . basename($file) . \"</div>\\n\";\n\t}\t\n\t//$rtn .= \"\t\t<div class=\\\"file\\\">\" . basename($file) . \"</div>\\n\";\n\t$rtn .= \"\t\t<div class=\\\"date\\\">Size: \" . format_size($file) . \"<br />Last modified: \" . date(\"D. F jS, Y - h:ia\", filemtime($file)) . \"</div>\\n\";\n\t$rtn .= \"\t</div>\\n\";\n\t$rtn .= \"\t</a>\\n\";\n\t$rtn .= \"</div>\";\n\treturn $rtn;\n}",
"public function processBlockTemplate(Block $block)\n {\n $templateFileRawContents = $this->getThemeTemplateFileContents($block);\n $blockNameInTemplate = $this->addBlockToTheResultViewParamsSet($block);\n\n // Check if the required directive present in the template file\n if (!strstr($templateFileRawContents, self::BLOCK_TEMPLATE_DIRECTIVE)) {\n throw new \\Exception(\n \"There is no required directive {self::BLOCK_TEMPLATE_DIRECTIVE} in template {$block->getRoute()}\"\n );\n }\n $templateFileRawContents = str_replace(\n self::BLOCK_TEMPLATE_DIRECTIVE,\n \"\\$page->renderParam('$blockNameInTemplate')\",\n $templateFileRawContents\n );\n\n $this->content .= $templateFileRawContents . \"\\n\";\n }",
"function content($block, $default_content = NULL)\n\t{\n\t\t$ci =& get_instance();\n\t\tif($ci->template->block_exists($block)){\n\t\t\treturn $ci->template->data['template'][$block];\n\t\t} else {\n\t\t\treturn $default_content;\n\t\t}\n\t}",
"public function page_content__main() {\n\n echo '<h3>' . __('Blocks', 'wpucacheblocks') . '</h3>';\n foreach ($this->blocks as $id => $block) {\n echo '<p>';\n echo '<strong>' . $id . ' - ' . $block['path'] . '</strong><br />';\n $_expiration = (is_bool($block['expires']) ? __('never', 'wpucacheblocks') : $block['expires'] . 's');\n echo sprintf(__('Expiration: %s', 'wpucacheblocks'), $_expiration);\n\n $prefixes = $this->get_block_prefixes($id);\n\n foreach ($prefixes as $prefix) {\n echo $this->display_block_cache_status($id, $prefix);\n }\n\n echo '<br />';\n if (!apply_filters('wpucacheblocks_bypass_cache', false, $id)) {\n if (isset($block['callback_prefix'])) {\n submit_button(__('Clear', 'wpucacheblocks'), 'secondary', 'clear__' . $id, false);\n } else {\n submit_button(__('Reload', 'wpucacheblocks'), 'secondary', 'reload__' . $id, false);\n }\n } else {\n echo __('A bypass exists for this block. Regeneration is only available in front mode.', 'wpucacheblocks');\n }\n echo '</p>';\n echo '<hr />';\n }\n }",
"function setBlock($resource_name, $variable = NULL, $cache_id = null)\n\t{ \n if (strpos($resource_name, '.') === false) {\n\t\t\t$resource_name .= '.tpl';\n\t\t}\n \n if ($variable){\n $content = parent::fetch($theme.'/'.$resource_name, $cache_id);\n \n $this->_globals[$variable] = $content;\n \n parent::clear_all_assign();\n\n } else {\n\t\t\n\n return parent::fetch($resource_name, $cache_id);\n }\n\t}",
"function show_file_block($file, $block, $section = null)\n{\n global $cfg;\n\n if ($cfg['show'][$file]) {\n\n if (is_null($section)) {\n $section = strtoupper($file);\n }\n\n static $max_length = 1024;\n if (strlen($block) > $max_length) {\n $block = substr($block, 0, $max_length) . '...';\n }\n\n echo \"\\n========\" . $section . \"========\\n\";\n echo rtrim($block);\n echo \"\\n========DONE========\\n\";\n }\n}",
"public function loadTemplate()\n\t{\n\t\t$t_location = \\IPS\\Request::i()->t_location;\n\t\t$t_key = \\IPS\\Request::i()->t_key;\n\t\t\n\t\tif ( $t_location === 'block' and $t_key === '_default_' and isset( \\IPS\\Request::i()->block_key ) )\n\t\t{\n\t\t\t/* Find it from the normal template system */\n\t\t\tif ( isset( \\IPS\\Request::i()->block_app ) )\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( \\IPS\\Request::i()->block_app ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Plugin::load( \\IPS\\Request::i()->block_plugin ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\t\n\t\t\t$location = $plugin->getTemplateLocation();\n\t\t\t\n\t\t\t$templateBits = \\IPS\\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\t\t\t\n\t\t\tif ( ! isset( \\IPS\\Request::i()->noencode ) OR ! \\IPS\\Request::i()->noencode )\n\t\t\t{\n\t\t\t\t$templateBit['template_content'] = htmlentities( $templateBit['template_content'], ENT_DISALLOWED, 'UTF-8', TRUE );\n\t\t\t}\n\t\t\t\n\t\t\t$templateArray = array(\n\t\t\t\t'template_id' \t\t\t=> $templateBit['template_id'],\n\t\t\t\t'template_key' \t\t\t=> 'template_' . $templateBit['template_name'] . '.' . $templateBit['template_id'],\n\t\t\t\t'template_title'\t\t=> $templateBit['template_name'],\n\t\t\t\t'template_desc' \t\t=> null,\n\t\t\t\t'template_content' \t\t=> $templateBit['template_content'],\n\t\t\t\t'template_location' \t=> null,\n\t\t\t\t'template_group' \t\t=> null,\n\t\t\t\t'template_container' \t=> null,\n\t\t\t\t'template_rel_id' \t\t=> null,\n\t\t\t\t'template_user_created' => null,\n\t\t\t\t'template_user_edited' => null,\n\t\t\t\t'template_params' \t => $templateBit['template_data']\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( \\is_numeric( $t_key ) )\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key, 'template_id' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array( 'error' => true ) );\n\t\t\t}\n\n\t\t\tif ( $template !== null )\n\t\t\t{\n\t\t\t\t$templateArray = array(\n\t 'template_id' \t\t\t=> $template->id,\n\t 'template_key' \t\t\t=> $template->key,\n\t 'template_title'\t\t=> $template->title,\n\t 'template_desc' \t\t=> $template->desc,\n\t 'template_content' \t\t=> ( isset( \\IPS\\Request::i()->noencode ) AND \\IPS\\Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8', TRUE ),\n\t 'template_location' \t=> $template->location,\n\t 'template_group' \t\t=> $template->group,\n\t 'template_container' \t=> $template->container,\n\t 'template_rel_id' \t\t=> $template->rel_id,\n\t 'template_user_created' => $template->user_created,\n\t 'template_user_edited' => $template->user_edited,\n\t 'template_params' \t => $template->params\n\t );\n\t\t\t}\n\t\t}\n\n\t\tif ( \\IPS\\Request::i()->show == 'json' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $templateArray );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->sendOutput( \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \\IPS\\Theme::i()->getTemplate( 'templates', 'cms', 'admin' )->viewTemplate( $templateArray ) ), 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t}\n\t}",
"public function display(array $context, array $blocks = array())\n {\n if (!$this->debugFiles) {\n parent::display($context, $blocks);\n return null;\n }\n\n\n //Ok, debugging is activated for files\n $arrVars = array();\n $arrVars['backColor'] = self::random_color();\n $arrVars['foreColor'] = self::color_inverse($arrVars['backColor']);\n $arrVars['templateName'] = $this->getTemplateName();\n $arrVars['templatePath'] = $this->env->getLoader()->getCacheKey($arrVars['templateName']);\n $arrVars['uuid'] = uniqid();\n $arrVars['deep'] = self::$templateDeep;\n $arrVars['parent'] = self::$templateParent;\n\n\n\n $arrVars['stack'] = array_map(function($arr){\n if (isset($arr['class'])) {\n return \"{$arr['class']}::{$arr['function']}()\";\n } else {\n return \"{$arr['file']} at line {$arr['line']}\";\n }\n }, debug_backtrace());\n\n\n self::$arrTemplateHierarchy[] = array(\n 'template' => $this->getTemplateName(),\n 'parent' => self::$templateParent,\n 'deep' => self::$templateDeep,\n );\n\n\n //Pass the real content to the debug container.\n $oldParent = self::$templateParent;\n self::$templateParent = $this->getTemplateName();\n self::$templateDeep++;\n ob_start();\n parent::display($context, $blocks);\n $arrVars['content'] = ob_get_contents();\n ob_end_clean();\n self::$templateDeep--;\n self::$templateParent = $oldParent;\n $this->renderDebug('templateContainer.html.twig', $arrVars);\n\n\n if ($this->debugHierarchy && self::$templateParent == '') {\n $this->showTemplateHierarchy();\n\n }\n }",
"public function render(array $block): void\n {\n $template = $this->path . 'template.blade.php';\n\n if (file_exists($template) && file_exists(templatePath($template))) {\n $data = $this->parse($block);\n $this->loadAssets($data);\n echo template($this->path . 'template.blade.php', $data);\n }\n }",
"function custom_acf_display_blocks( $block ) {\n\t// Convert name \"acf/example\" into path friendly slug \"example\".\n\t$slug = str_replace( 'acf/', '', $block['name'] );\n\n\t// Include a template part from within the \"components/block\" folder.\n\tif ( file_exists( get_theme_file_path( \"/components/block-{$slug}.php\" ) ) ) {\n\t\tinclude get_theme_file_path( \"/components/block-{$slug}.php\" );\n\t}\n}",
"protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }",
"function action_init()\n\t{\n\n\t\t$this->allblocks = array(\n\t\t\t'recent_comments' => _t( 'Recent Comments' ),\n\t\t\t'recent_posts' => _t( 'Recent Posts' ),\n\t\t\t'monthly_archives' => _t( 'Monthly Archives' ),\n\t\t\t'tag_archives' => _t( 'Tag Archives' ),\n\t\t\t'meta_links' => _t( 'Meta Links' ),\n\t\t\t'search_form' => _t( 'Search Form' ),\n\t\t\t'text' => _t( 'Text' ),\n\t\t);\n\n\t\tforeach ( array_keys( $this->allblocks ) as $blockname ) {\n\t\t\t$this->add_template( \"block.$blockname\", dirname( __FILE__ ) . \"/block.$blockname.php\" );\n\t\t}\n\t\t$this->add_template( \"block.dropdown.tag_archives\", dirname( __FILE__ ) . \"/block.dropdown.tag_archives.php\" );\n\t\t$this->add_template( \"block.dropdown.monthly_archives\", dirname( __FILE__ ) . \"/block.dropdown.monthly_archives.php\" );\n\t}",
"function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }",
"function acf_block_render_callback( $block ) {\n\t\t$slug = str_replace( 'acf/', '', $block['name'] );\n\t\t$path = \"/inc/frontend/acf/blocks/{$slug}.php\";\n\n\t\t// include a template part from within the \"template-parts/block\" folder\n\t\tif ( file_exists( get_theme_file_path( $path ) ) ) {\n\t\t\tinclude( get_theme_file_path( $path ) );\n\t\t}\n\t}",
"function display($tpl = null) {\r\n if ($tpl != null) {\r\n $this->setTemplate($tpl);\r\n }\r\n if ($this->_raw == null) {\r\n $this->_smarty->assign('data', $this->_data);\r\n $this->_smarty->assign('tpl', $this->_tpl);\r\n $this->_smarty->assign('lang', $this->_lang);\r\n if ($this->_debug != null) {\r\n $this->_smarty->assign('debug', $this->_debug);\r\n }\r\n }\r\n else {\r\n foreach ($this->_raw as $key => $value) {\r\n $this->_smarty->assign($key, $value);\r\n }\r\n }\r\n $this->_smarty->assign('asblock', false);\r\n $this->_smarty->display($this->__tplfile);\r\n }"
]
| [
"0.66600776",
"0.6646311",
"0.6606878",
"0.6513419",
"0.6511392",
"0.648636",
"0.6381592",
"0.63603836",
"0.6325136",
"0.62895364",
"0.62880576",
"0.62793726",
"0.622952",
"0.619124",
"0.6180748",
"0.61159074",
"0.6114453",
"0.61027765",
"0.60709274",
"0.6066687",
"0.6059808",
"0.6052677",
"0.60334116",
"0.6030351",
"0.60212374",
"0.60083187",
"0.5980955",
"0.59691995",
"0.59647727",
"0.592988"
]
| 0.68324 | 0 |
set multiple values to be replaced | public function set_many($replaces)
{
foreach ($replaces as $key => $value)
{
$this->values[$this->block][$key] = $value;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setValues($values = []);",
"public function setValues($values);",
"public function replace(array $values = []): void\n {\n\t\t$this->values = $values;\n\t}",
"public function assignValues($values=[]) {\n }",
"public function setValues($values)\n {\n foreach ($this->entities as $entity) \n {\n $entity->setValues($values);\n }\n }",
"public function setValues(array $values);",
"function setInputValues( array $values );",
"public function setAll($values)\r\n {\r\n foreach ($values as $key => $value)\r\n $this->$key = $value;\r\n }",
"public function setValues($values){\n\t\tif(!is_array($values)) return;\n\t\t\n\t\tforeach($values as $field_name => $value){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->value = $value;\n\t\t\t}\n\t\t}\n\t}",
"function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t\tforeach($this->getOptions() as $option)\n\t\t{\n\t\t\tforeach($option->getSubItems() as $item)\n\t\t\t{\n\t\t\t\t$item->setValueByArray($a_values);\n\t\t\t}\n\t\t}\n\t}",
"public function replace(array $data);",
"public function setValues(array $values): void\n {\n $this->values = array_map(function ($value) {\n return ChunkRecommendationsValue::constructFromArray(['value' => $value]);\n }, $values);\n }",
"function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t}",
"public function replace($items);",
"function setValues($list) {\n global $params;\n if (count($list)) {\n\tforeach ($list as $k=>$v) {\n\t $params[$k] = $v;\n\t}\n }\n}",
"public function replace(array $values = [])/*# : ReplaceStatementInterface */;",
"protected function replaceValues()\n {\n foreach($this->formulasValue as $key=>$fvalue) \n {\n //$fvalue['value']=mb_strtoupper($fvalue['value'], 'utf-8');\n preg_match_all('/\\{([^}]+)\\}/', $fvalue['value'], $matches);\n foreach($this->sizeList as $size) \n {\n $this->replacement=array();\n //$stag=mb_strtoupper($size.'_'.substr(substr($fvalue['tag'],0,-1),1), 'utf-8');\n $stag=$size.'_'.substr(substr($fvalue['tag'],0,-1),1);\n foreach($matches[1] as $match) \n {\n //$match=mb_strtoupper($match, 'utf-8');\n if(isset($this->itemProperties[$size . '_' . $match])) \n $this->replacement[$size . '_' . $match]=$this->itemProperties[$size . '_' . $match];\n elseIf(isset($this->clientProperties[$match]))\n $this->replacement[$match]=$this->clientProperties[$match];\n elseIf(isset($this->resultArray[$size . '_' . $match]))\n $this->replacement[$size . '_' . $match]=$this->resultArray[$size . '_' . $match];\n else \n $this->errorReplacements[$size . '_' . $match]=$size . '_' . $match;\n }\n \n \n// echo 'errorReplacements START';\n// Helper::myPrint_r($this->errorReplacements);\n// echo 'errorReplacements END';\n //calculates the equitation. But it should not be called unless all the values are replaced\n $matches[0]=array_unique($matches[0]);\n $matches[1]=array_unique($matches[1]);\n// echo 'STAG: ' . $stag . \"<br />\";\n// echo 'Fvalue: ' . $fvalue['value'] . \"<br />\";\n// if($matches[1][0]=='РПЛ')\n// echo 'Yes РПЛ' . '<br />';\n if((isset($matches[1][1])) && $matches[1][1]=='РПЛИ') {\n// echo 'Yes РПЛИ' . '<br />'; \n// echo 'value:' . $this->replacement[$size . '_РПЛИ'];\n// \n// echo \"<br />\";\n// echo str_replace($matches[0], $this->replacement, $fvalue['value']);\n// echo \"<br />\";\n \n // foreach($matches[0] as $m)\n// {\n// echo 'ttt';\n// echo \"<br />\";\n// echo \"<br />\";\n //echo preg_replace('/'.$m.'/', 777, $fvalue['value']);\n// echo str_replace($matches[0], 777, $fvalue['value']);\n// echo \"<br />\";\n// }\n \n\n //$exp=preg_replace($matches[0], $this->replacement, $fvalue['value']);\n $exp=str_replace($matches[0], $this->replacement, $fvalue['value']);\n //echo 'ERROR COUNT: ' . count($this->errorReplacements) . '<br />';\n \n// if(count($this->errorReplacements) > 0) {\n// echo CJavaScript::encode($this->itemId);\n// Yii::app()->end();\n// }\n \n \n $this->resultArray[$stag]=(count($this->errorReplacements) > 0) \n ? str_replace($exp)\n : $this->calculate($exp);\n \n } else\n {\n $this->resultArray[$stag]=(count($this->errorReplacements) > 0) \n ? str_replace($matches[0], $this->replacement, $fvalue['value'])\n : $this->calculate(str_replace($matches[0], $this->replacement, $fvalue['value'])); \n }\n \n \n //echo '<br />' . \"STAG:\" . $this->resultArray[$stag] . '<br />';\n\n \n //preg_replace($matches[0], $this->replacement, $fvalue['value'])\n //str_replace($matches[0], $this->replacement, $fvalue['value'])\n\n// Helper::myPrint_r($matches[0]);\n// Helper::myPrint_r($matches[1]);\n// Helper::myPrint_r($this->replacement); \n// echo 'fvalue' . $fvalue['value'] . '<br />';\n// echo 'val: ' . preg_replace($matches[0], $this->replacement, $fvalue['value']). '<br />';\n// echo 'val: ' . str_replace($matches[1], $this->replacement, $fvalue['value']). '<br />';\n// echo '--------------------<br />'; \n }\n }\n //if formulas dependency order was not observed\n //$this->checkReplaceValues();\n \n// Helper::myPrint_r($this->clientProperties);\n// Helper::myPrint_r($this->itemProperties);\n// Helper::myPrint_r($this->rangeProperties);\n// Helper::myPrint_r($this->formulasValue);\n// Helper::myPrint_r($this->resultArray,true);\n\n }",
"public function setValues(array $values) {\n $this->_values = $values;\n $allowedValues = array();\n foreach ($values as $index => $group) {\n $groupValues = array_keys(isset($group['options']) ? $group['options'] : $group);\n $allowedValues = array_merge($allowedValues, $groupValues);\n }\n $this->setFilter(new PapayaFilterList($allowedValues));\n }",
"private function setValues($values)\n {\n //echo \"<pre>\";\n //print_r($values);\n //echo \"</pre>\";\n foreach ($values as $field => $value) {\n $this->$field = $value;\n }\n\n //echo \"<pre>\";\n //print_r($this);\n //echo \"</pre>\";\n //die();\n\n }",
"public function set_values( $values = array() ) {\n\t\t\n\t\t$this->values = $values;\n\t\t\n\t}",
"public function setValues($values)\n {\n $this->values = $values;\n }",
"public function setValues($values) {\n $this->values = $values;\n }",
"public function setItems(array $items)\n {\n static $map;\n\n if (!$map) {\n $map = $this->getMatchingNames();\n }\n\n foreach ($items as $key => $value) {\n if (isset($map[$key])) {\n $this->item[$map[$key]] = strtr($value, ',', '|');\n }\n }\n }",
"public function setMultiple($values) : bool;",
"public function setValue($entries) {}",
"public function bulkSet(array $args = array()) {\n foreach ($args as $argName => $arg) {\n $this->__set($argName, $arg);\n }\n }",
"function setValues($list) {\n global $params;\n if ( count($list )) {\n foreach ($list as $k => $v ) {\n $params[$k] = $v;\n }\n }\n}",
"public function setAll($values) {\n\t\tif (isset($values[self::$primaryKey[$this->table]])) {\n\t\t\t$this->originalData = $values;\n\t\t}\n\t\telse {\n\t\t\t$this->modifiedData = $values;\n\t\t}\n\t}",
"private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }",
"protected function _setFieldValues($values) {\n foreach ($this->getElements() as $key => $element) {\n if (count(explode('_', $key)) == 3) {\n list($parent_id, $option_id, $field_id) = explode('_', $key);\n if (isset($values[$field_id])) {\n $element->setValue($values[$field_id]);\n }\n }\n }\n }"
]
| [
"0.67728907",
"0.6759351",
"0.6603161",
"0.64762175",
"0.64360225",
"0.63805115",
"0.6378056",
"0.6340752",
"0.63164806",
"0.62891155",
"0.62593466",
"0.6239974",
"0.6231123",
"0.62022156",
"0.6181872",
"0.6173142",
"0.61052203",
"0.6094056",
"0.60896146",
"0.6050574",
"0.6020289",
"0.5976415",
"0.5970599",
"0.5967575",
"0.59541047",
"0.5945603",
"0.5935832",
"0.5901397",
"0.58990586",
"0.58826256"
]
| 0.7323282 | 0 |
this will replace the tags in the current block | public function do_tags()
{
foreach ($this->values as $id => $block)
{
foreach ($block as $name => $replace)
{
$find = "{:$name}";
$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function replaceBlockDocumentElements($content){\n\t\t//regular expression indiicating what a document block looks like\n\t\t$document_block_string = \"/\\{arch:document\\}(.*?)\\{\\/arch:document\\}/s\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($document_block_string, $content, $document_array);\n\t\t\n\t\t//parse document block array\n\t\tforeach($document_array[0] as $block){\n\t\t\t//start block content and fill it with all of the content in the block\n\t\t\t$block_content = $block;\n\n\t\t\t//array to hold elements in the block\n\t\t\t$element_array = array();\n\t\t\t\n\t\t\t//string to match document elements against\n\t\t\t$document_elements_string = \"/{arch:[a-zA-Z0-9\\s]*\\/}/\";\n\t\t\t\n\t\t\t//fill array\n\t\t\tpreg_match_all($document_elements_string, $block, $element_array);\n\t\t\t\n\t\t\t//parse element array\n\t\t\tforeach($element_array[0] as $element){\n\t\t\t\t//strip name out of the element string\n\t\t\t\t$element_name = explode(':', $element);\n\t\t\t\t$element_name = explode('/', $element_name[1]);\n\t\t\t\t//final element name\n\t\t\t\t$element_name = $element_name[0];\n\t\t\t\t\n\t\t\t\t//inline editing variables\n\t\t\t\t$element_editing_type = \"\";\n\t\t\t\t\n\t\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//document element name\n\t\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\t\t\n\t\t\t\t\t//grab tag parser\n\t\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\t\n\t\t\t\t\t//retrieve the rendered content\n\t\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t\t//http://php.net/eval\n eval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t\t$evaluated_content = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$element_content = $evaluated_content;\n\t\t\t\t}else{//if it is not a default element\n\t\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\n\t\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}//end non default element\n\n\t\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t\t$element_content = $element;\n\t\t\t\t\t}\n\t\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//grab content for element out of the database and replace it in the block\n\t\t\t\t$block_content = preg_replace(\"{\".$element.\"}\", $element_content, $block_content, 1);\n\t\t\t\t//echo $block_content;\n\t\t\t}\n\t\t\t\n\t\t\t//clean out document start and end tags\n\t\t\t$block_content = str_replace(\"{arch:document}\", \"\", $block_content);\n\t\t\t$block_content = str_replace(\"{/arch:document}\", \"\", $block_content);\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$block.\"}\", $block_content, $content, 1);\n\t\t}//end document block parsing\n\t\t\n\t\treturn $content;\n\t}",
"function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}",
"function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }",
"function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}",
"function customTagReplace($html)\r\n\t{\r\n\t\t//ensure all tags can be found\r\n\t\t$html = str_replace(\"<IMG\",\"<img\",$html);\r\n\t\t$html = str_replace(\"SRC=\",\"src=\",$html);\r\n\t\t$html = str_replace(\"ALT=\",\"alt=\",$html);\r\n\t\t$html = str_replace(\"<SPAN\",\"<span\",$html);\r\n\r\n\t\t$html = replaceIMG($html); //CSS format img tags\r\n\t\t$html = youtubeEmbed($html); //custom include youtube embeds\r\n\t\t$html = apostrapheFix($html); //apostraphe fix for sql INSERT statements\r\n\t\treturn $html;\r\n\t}",
"function replaceCommonTags( $currentData ) \n {\n // Replace Module Name\n $tagModuleName = ModuleCreator::TAG_MODULE_NAME;\n $moduleName = $this->values[ ModuleCreator::KEY_MODULE_NAME ];\n $currentData = str_replace($tagModuleName, $moduleName, $currentData );\n \n // Replace Creator Name\n $tagCreatorName = ModuleCreator::TAG_CREATOR_NAME;\n $creatorName = $this->values[ ModuleCreator::KEY_MODULE_CREATOR ];\n $currentData = str_replace($tagCreatorName, $creatorName, $currentData );\n \n // Replace Creation Date\n $tagCreationDate = ModuleCreator::TAG_CREATION_DATE;\n $creationDate = $this->getCurrentDate();\n $currentData = str_replace($tagCreationDate, $creationDate, $currentData );\n \n // Replace Template Path\n $tagTemplatePath = ModuleCreator::TAG_PATH_TEMPLATES;\n $path = ModuleCreator::PATH_TEMPLATES;\n $currentData = str_replace($tagTemplatePath, $path, $currentData );\n \n return $currentData;\n \n }",
"function p1base_theme_suggestions_block_alter(array &$suggestions, array $variables)\n{\n // block\n if (isset($variables['elements']['content']['#block_content'])) {\n array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());\n }\n}",
"public function addTagToPostInTheMiddle() {}",
"public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}",
"public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }",
"function replaceBlockContent($content,$className,$blockName,$bodyContent,$exClass)\n {\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Grid\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Grid\\Extended\";\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Form\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Form\\Generic\";\n if($exClass == \"Mage\\Core\\Helper\\Abstract\"){\n $exClass = \"Magento\\Framework\\App\\Helper\\AbstractHelper\" ; \n }\n $search = array(\n '/<ClassName>/',\n '/<BlockName>/',\n '/<BodyContent>/',\n '/<ExtendsClass>/',\n );\n\n $replace = array(\n $className,\n $blockName,\n $bodyContent,\n '\\\\'.$exClass,\n );\n //\n return preg_replace($search, $replace, $content);\n }",
"function excerpt_remove_blocks($content)\n {\n }",
"private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }",
"function do_shortcodes_in_html_tags($content, $ignore_html, $tagnames)\n {\n }",
"function single_product_content_replace() {\n\tthe_content();\n}",
"public function deleteAllBlocks()\n {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strpos(strip_tags($documentSymbolValue), 'BLOCK_') !== false) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p');\n $xpath = new DOMXPath($domDocument);\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n $query = 'w:r/w:t';\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n $deleteCurrent = false;\n if (\n strpos($entry->nodeValue,\n self::$_templateSymbol . 'BLOCK_'\n ) !== false\n ) {\n //when we find a placeholder, we delete it\n $deleteCurrent = true;\n break;\n }\n }\n if ($deleteCurrent) {\n $padre = $itemsWP[$i]->parentNode;\n $padre->removeChild($itemsWP[$i]);\n self::$_document = $domDocument->saveXML();\n }\n }\n }",
"function doTagStuff(){}",
"public function replaceInlineDocumentElements($content){\n\t\t//regular expression indicating what a document inline element looks like\n\t\t$inline_document_expression = \"/\\{arch:document:(.*)\\/\\}/\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($inline_document_expression, $content, $document_array);\n\t\t\n\t\t//parse inline document elements array\n\t\tforeach($document_array[0] as $element){\n\t\t\t//strip name out of the block string\n\t\t\t$element_name = explode(':', $element);\n\t\t\t$element_name = explode('/', $element_name[2]);\n\t\t\t//final block name\n\t\t\t$element_name = $element_name[0];\n\t\t\t\n\t\t\t//inline editing variables\n\t\t\t$element_editing_type = \"\";\n\t\t\t\n\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//document element name\n\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\n\t\t\t\t//grab tag parser\n\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\n\t\t\t\t//retrieve the rendered content\n\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\n\t\t\t\tob_start();\n\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t//http://php.net/eval\n\t\t\t\teval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t$evaluated_content = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t\t$element_content = $evaluated_content;\n\t\t\t}else{//if it is not a default element\n\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\n\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\n\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t$element_content = '';\n\t\t\t\t}\n\t\t\t}//end non default element\n\t\t\t\n\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t$element_content = $element;\n\t\t\t\t}\n\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$element.\"}\", $element_content, $content, 1);\n\t\t}//end inline document parsing\n\t\t\n\t\t//return parsed content\n\t\treturn $content;\n\t}",
"private static function _replace($source, $i, $options){\n\t\t$cache = new Cache();\n\t\t$cachePath = $cache->cacheDir().\"/template/\";\n\n\t\t$pattern = \"/{:(block) \\\"({:block})\\\"(?: \\[(.+)\\])?}(.*){\\\\1:}/msU\";\n\n\t\tpreg_match_all(static::$_terminals['T_BLOCK'], $source, $matches);\n\n\t\t$_blocks = null;\n\n\t\tforeach($matches[2] as $index => $block){\n\n\t\t\t$_pattern = String::insert($pattern, array('block' => $block));\n\n\t\t\t$_block = static::$_blocks->blocks(\"{$block}\");\n\n\t\t\t$_blocks = static::$_blocks;\n\n\t\t\t/**\n\t\t\t * Top level content for block\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$content = trim($_block->content());\n\n\t\t\t/**\n\t\t\t * The request for block content in the final template\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$request = $matches[4][$index];\n\n\t\t\t/**\n\t\t\t * Parent/child matches/replacement\n\t\t\t */\n\t\t\t$_parents = function($block) use (&$content, &$_parents, &$matches, &$index, &$_pattern){\n\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:parent:}/msU\", $content, $_matches)) { \n\n\t\t\t\t\tif($parent){\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", $parent->content(), $content);\n\t\t\t\t\t\t// go again\n\t\t\t\t\t\treturn $_parents($block->parent(), $content);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// no parent, remove the request\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", \"\", $content);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Parse the block and check to see if it's parents request it.\n\t\t\t * @var method\n\t\t\t */\n\t\t\t$_children = function($block, $content = null) use (&$_children, &$matches, &$index, &$_pattern, &$_blocks){\n\n\t\t\t\t$content = ($content == null) ? $block->content() : $content;\n\n\t\t\t\t$_block = $_blocks->blocks($block->name());\n\t\t\t\t/**\n\t\t\t\t * If the block has a child then we're not at the bottom of the chain.\n\t\t\t\t * We need to move up until we cant\n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$child = $block->child();\n\n\t\t\t\t/**\n\t\t\t\t * If the block has a parent then we cant be at the top of the chain.\n\t\t\t\t * As long as there's a parent we need to keep moving. \n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:child:}/msU\", $content)) { \n\t\t\t\t\t// Block doesn't have a child block\n\t\t\t\t\tif(!$child){\n\t\t\t\t\t\t// Also has no parent\n\t\t\t\t\t\tif(!$parent){\n\t\t\t\t\t\t\t// clear the entire block\n\t\t\t\t\t\t\t$content = \"\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Has a parent, still no child tho\n\t\t\t\t\t\t\t// just remove the call for child block\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", \"\", $content);\n\t\t\t\t\t\t\treturn $_children($block, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// not asking for a child\n\t\t\t\t} else {\n\n\t\t\t\t\t// Has a parent\n\t\t\t\t\tif($parent){\n\n\t\t\t\t\t\tif(preg_match(\"/{:child:}/msU\", $parent->content())){\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", $content, $parent->content());\n\t\t\t\t\t\t\treturn $_children($parent, $content);\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// must return content so we dont muck up parent\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t// parse children\n\t\t\t$content = $_children($_block);\n\t\t\t// parse parents\n\t\t\t$content = $_parents($_block);\n\n\t\t\t$source = preg_replace($_pattern, $content, $source);\n\n\t\t}\n\n\t\t// 0 should always be the final template\n\t\tif($i == 0){\n\t\t\tif($cacheable = $cache->write($source, static::$_blocks->templates(0), $_blocks, $options)){\n\t\t\t\tstatic::$_template = $cacheable;\n\t\t\t}\n\n\t\t}\n\n\t}",
"function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}",
"private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }",
"function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}",
"public static function replaceTagContent(EventData_IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT $data) {\n require_once (SENDSTUDIO_API_DIRECTORY . '/subscribers.php');\n $subsrciberApi = new Subscribers_API();\n $subscriberInfo = $data->info;\n\n foreach ($subscriberInfo as $subscriberInfoEntry) {\n $tagObject = new Addons_dynamiccontenttags();\n $subscriberList = $subsrciberApi->GetAllListsForEmailAddress($subscriberInfoEntry['emailaddress'], $data->lists);\n if (is_array($subscriberList)) {\n foreach($subscriberList as $listKey => $listVal) {\n $subscriberList[$listKey] = $listVal['listid'];\n }\n } else {\n $subscriberList = array($subscriberList);\n }\n\n // preload the array key value and customfield id\n $preloadCustomFieldLoc = array();\n if (is_array($subscriberInfoEntry['CustomFields'])) {\n foreach($subscriberInfoEntry['CustomFields'] as $customFieldKey => $customFieldVal) {\n $preloadCustomFieldLoc[$customFieldVal['fieldid']] = $customFieldKey;\n }\n }\n\n $tagObject->loadTagsByList($subscriberList);\n if ($tagObject->getTagObjectsSize()) {\n $tagsTobeReplaced = array();\n $tagsContentTobeReplaced = array();\n $permanentRulesMatches = array(\n 'email'=>'emailaddress',\n 'format'=>'format',\n 'confirmation'=>'confirmed',\n 'subscribe'=>'subscribedate',\n );\n foreach($tagObject->tags as $tagEntry) {\n $tagEntry->loadBlocks();\n $blocks = $tagEntry->getBlocks();\n $defaultBlock = null;\n foreach($blocks as $blockEntry) {\n $rulesPassed = true;\n $decodedRules = $blockEntry->getDecodedRules();\n foreach ($decodedRules->Rules[0]->rules as $ruleEntry) {\n $continue = false;\n $tempRuleValues = trim(strtolower($ruleEntry->rules->ruleValues));\n $tempActualValues = (isset ($permanentRulesMatches[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]]))?trim(strtolower($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]])):'';\n switch ($ruleEntry->rules->ruleName) {\n case 'email':\n case 'format':\n case 'confirmation':\n $continue = true;\n break;\n case 'status':\n $tempActualValues = array();\n $tempIndex = '';\n switch ($tempRuleValues) {\n case 'a':\n $tempIndex = 'notboth';\n break;\n case 'b':\n $tempIndex = 'bounced';\n break;\n case 'u':\n $tempIndex = 'unsubscribed';\n break;\n }\n\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && $subscriberInfoEntry[$tempIndex] == 0) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && !($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && !($subscriberInfoEntry[$tempIndex] == 0)) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && ($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n case 'subscribe':\n // date conversion\n $tempActualValues = strtotime(date('Y-m-d', $tempActualValues));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n $continue = true;\n break;\n case 'campaign':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!$subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n default:\n $continue = true;\n }\n if ($continue) {\n if ((int)$ruleEntry->rules->ruleName) {\n $tempActualValues = (isset ($preloadCustomFieldLoc[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data']))?trim(strtolower($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data'])):'';\n if ($ruleEntry->rules->ruleType == 'date') {\n $tempActualValues = split('/', $tempActualValues);\n $tempActualValues = strtotime(implode('-', array_reverse($tempActualValues)));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n }\n\n\n }\n switch ($ruleEntry->rules->ruleType) {\n case 'text':\n case 'textarea':\n case 'dropdown':\n case 'number':\n case 'radiobutton':\n case 'date':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!($tempActualValues == $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($tempActualValues == $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'like':\n if (!(strstr($tempActualValues, $tempRuleValues))) {\n $rulesPassed = false;\n }\n break;\n case 'notlike':\n if (strstr($tempActualValues, $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'greaterthan':\n if ($tempActualValues <= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'lessthan':\n if ($tempActualValues >= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n case 'checkbox':\n $tempActualValues = unserialize($tempActualValues);\n $tempRuleValues = explode(', ', $tempRuleValues);\n $tempRuleValues = (is_array($tempRuleValues)) ? $tempRuleValues : array() ;\n $tempActualValues = (is_array($tempActualValues)) ? $tempActualValues : array() ;\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) != sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) == sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n }\n }\n if ($blockEntry->isActivated()) {\n $defaultBlock = $decodedRules;\n }\n if ($rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $decodedRules->Content;\n break; // only get the first matched\n }\n }\n if (!$rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $defaultBlock->Content;\n }\n }\n }\n }\n }",
"function render_block_core_tag_cloud($attributes)\n {\n }",
"function clean_inside_tags($txt,$tags){\n\t\t\t$txt =removeemptytags($txt);\n\t\t\tpreg_match_all(\"/<([^>]+)>/i\",$tags,$allTags,PREG_PATTERN_ORDER);\n\t\t\n\t\t\tforeach ($allTags[1] as $tag){\n\t\t\t\t$txt = preg_replace(\"/<\".$tag.\"[^>]*>/i\",\"<\".$tag.\">\",$txt);\n\t\t\t}\n\t\t\treturn $txt;\n\t\t}",
"function register_block_core_site_tagline()\n {\n }",
"function remove_blocks() {\n if ( is_singular( 'webinar' ) && in_the_loop() && is_main_query() ) {\n //parse the blocks so they can be run through the foreach loop\n $blocks = parse_blocks( get_the_content() );\n foreach ( $blocks as $block ) {\n //look to see if your block is in the post content -> if yes continue past it if no then render block as normal\n \n echo $block['blockName'];\n \n if ( 'lazyblock/top-of-page' === $block['blockName'] ) {\n continue;\n } else {\n echo render_block( $block );\n }\n }\n }\n}",
"private function processContent(){\n\t\t$this->textEnd = strpos($this->raw,\"</{$this->tag}\");\n\t\t$this->text = trim(substr($this->raw, $this->textStart, $this->textEnd - $this->textStart));\n\t}",
"function block_plugin_my_block_view($delta) {\n return array(\n '#type' => 'markup',\n '#markup' => 'Yo block!'\n );\n}",
"public function replaceContent() {\n \treturn $this->_doReplacement();\n\t}"
]
| [
"0.645628",
"0.6428538",
"0.62610906",
"0.6064476",
"0.5979072",
"0.5914047",
"0.5882833",
"0.5852715",
"0.57815",
"0.57423013",
"0.57420915",
"0.5726671",
"0.5646644",
"0.5646053",
"0.56335765",
"0.56334096",
"0.5617191",
"0.56067884",
"0.559265",
"0.5555665",
"0.5551675",
"0.55498457",
"0.5529367",
"0.5527094",
"0.5524364",
"0.55192894",
"0.5497103",
"0.5487494",
"0.5487176",
"0.5472734"
]
| 0.7523821 | 0 |
/ Get inscripcion_materia by id | function get_inscripcion_materia($id)
{
return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_materia($materia_id)\n {\n $materia = $this->db->query(\"\n SELECT\n *\n\n FROM\n `materia`\n\n WHERE\n `materia_id` = ?\n \",array($materia_id))->row_array();\n\n return $materia;\n }",
"public function materia_get()\n {\n $idmateria = $this->get( 'idmateria' );\n\n if ( $idmateria !== null )\n {\n $materia = $this->ApiModel->obtenerMateria($idmateria);\n\n $this->response([\n 'error' => false,\n 'status' => \"encontrado\",\n 'data' => $materia\n ], 400 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materia no encontrada'\n ], 400 );\n }\n }",
"function MaterialId($id,$indice){\n //Construimos la consulta\n $sql=\"SELECT* FROM material_entregado\n WHERE materiales=$indice and empleado=$id order by id desc limit 1\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n }",
"public function consultMatricula( $id ) {\n $consulta = $this->db->prepare('SELECT * FROM matricula WHERE id = \"'.$id.'\"'); \n $consulta->execute();\n $matricula = $consulta->fetch(PDO::FETCH_ASSOC); \n return $matricula; \n }",
"function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }",
"public function getMateria(){\n\t\treturn $this->materia;\n }",
"function get_codigo_pre_requisito($materia_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_codigo\n\n FROM\n materia m\n\n WHERE\n `materia_id` = ?\n \",array($materia_id))->row_array();\n\n return $materia;\n }",
"public function materias(){\n\t\t\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripciones, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE tipo_usuario = \".Usuario::ESTUDIANTE.\" AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = $this->id AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = inscripciones.usuario_id AND \n\t\t\t\t\t\t\t\t\t\t grupos.id = inscripciones.grupo_id\");\n\t\t$res \t\t= array();\n\t\t\n\t\twhile ($id = pg_fetch_array($result)[0]){\n\t\t\t$res[] = new Materia($id);\n\t\t}\n\t\t\n\t\treturn $res;\n\t}",
"public static function getMateriasEquivalencias($idequivalencia,$idmateriaplan)\n {\n \t$q = Doctrine_Query::create()\n \t->select('*')\n \t->from('MateriasEquivalencias')\n \t->where('idequivalencia = '.$idequivalencia)\n \t->andWhere('idmateriaplan = '.$idmateriaplan);\n \n \treturn $q->fetchOne();\n }",
"function get_all_materia()\n {\n $materia = $this->db->query(\"\n SELECT\n m.*, a.*, n.*, e.*, t.materia_nombre as 'requisito', pa.carrera_id, ca.carrera_nombre\n\n FROM\n materia m\n LEFT JOIN area_materia a ON m.area_id=a.area_id\n LEFT JOIN nivel n ON m.nivel_id=n.nivel_id\n LEFT JOIN plan_academico pa ON pa.planacad_id=n.planacad_id\n LEFT JOIN carrera ca ON ca.carrera_id=pa.carrera_id\n LEFT JOIN estado e ON m.estado_id=e.estado_id\n LEFT JOIN materia t ON m.mat_materia_id=t.materia_id\n\n WHERE\n 1 = 1\n\n ORDER BY carrera_id, n.nivel_id ASC\n \")->result_array();\n\n return $materia;\n }",
"function get_all_materias_activo_plan($planacad_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo\n\n FROM\n materia m, nivel n\n\n WHERE\n m.estado_id = 1\n and m.nivel_id = n.nivel_id\n and n.planacad_id = $planacad_id\n\n ORDER BY `materia_id` ASC\n \")->result_array();\n\n return $materia;\n }",
"public function materia()\n {\n return $this->belongsTo(Materia::class);\n }",
"private function getMateriais() {\n\n $oDaoMaterial = new cl_matmater();\n $sCampos = \" m60_codmater as codigo, m60_descr as descricao, m61_descr as unidade\";\n\n $sCamposGrupo = \" , 0 as codigogrupo \";\n if ($this->lAgruparGrupoSubgrupo) {\n $sCamposGrupo = \" , m65_sequencial as codigogrupo \";\n }\n $sCampos .= $sCamposGrupo;\n\n $aOrdem = array();\n $aWhere = array();\n $aWhere[] = \" instit = {$this->iInstituicao} \";\n\n $aOrdem[] = \" m60_descr \";\n\n if ($this->sDepartamentos) {\n $aWhere[] = \" m70_coddepto in ({$this->sDepartamentos}) \";\n }\n\n if ($this->sGrupoSubgrupo) {\n $aWhere[] = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n }\n\n $sCampoDepartamento = \", 0 as depto, '' as departamento\";\n if ($this->iQuebraPagina == RelatorioDeDistribuicao::QUEBRA_PAGINA_DEPARTAMENTO) {\n $sCampoDepartamento = \", m70_coddepto as depto, descrdepto as departamento \";\n }\n $sCampos .= $sCampoDepartamento;\n $sWhere = \" where \" . implode(\" and \", $aWhere);\n $sOrdem = \" order by \" . implode(\", \", $aOrdem);\n\n $sql = \" select distinct {$sCampos} \";\n $sql .= \" from matmater \";\n $sql .= \" inner join matunid on m60_codmatunid = m61_codmatunid \";\n $sql .= \" inner join matmatermaterialestoquegrupo on m60_codmater = m68_matmater \";\n $sql .= \" inner join materialestoquegrupo on m68_materialestoquegrupo = m65_sequencial \";\n $sql .= \" inner join db_estruturavalor on db121_sequencial = m65_db_estruturavalor \";\n $sql .= \" inner join matestoque on m60_codmater = m70_codmatmater \";\n $sql .= \" inner join db_depart on coddepto = m70_coddepto \";\n\n\n $sql .= \"{$sWhere} {$sOrdem} \";\n\n $rsMateriais = $oDaoMaterial->sql_record($sql);\n\n $aMateriais = array();\n for ($i = 0; $i < $oDaoMaterial->numrows; $i++) {\n\n $oMaterial = db_utils::fieldsMemory($rsMateriais, $i);\n $oMaterial->totalPeriodo = 0.0;\n $oMaterial->mediaPeriodo = 0.0;\n $aMateriais[] = $oMaterial;\n\n if (!isset($this->aDepartamentos[$oMaterial->depto])) {\n\n $oDeptartamento = new stdClass();\n $oDeptartamento->codigo = $oMaterial->depto;\n $oDeptartamento->descricao = $oMaterial->departamento;\n $oDeptartamento->itens = array();\n $this->aDepartamentos[$oDeptartamento->codigo] = $oDeptartamento;\n }\n }\n return $aMateriais;\n }",
"public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getIdMatiere()\n {\n return $this->idMatiere;\n }",
"public function materias_get()\n {\n $iddocente = $this->get( 'iddocente' );\n\n if ( $iddocente !== null )\n {\n $materias = $this->ApiModel->obtenerMateriasDelDocente($iddocente);\n\n $this->response($materias, 200 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materias del Profesor no encontradas'\n ], 400 );\n }\n }",
"public function materias()\n {\n return $this->belongsTo('App\\Model\\PrimerSemestre\\PrimSemMateria', 'prim_sem_materia_id');\n }",
"function get($id) {\r\n //devuelve el objeto entero\r\n $parametros = array();\r\n $parametros[\"id\"] = $id;\r\n $this->bd->select($this->tabla, \"*\", \"id =:id\", $parametros);\r\n $fila = $this->bd->getRow();\r\n $mecanico = new Mecanico();\r\n $mecanico->set($fila);\r\n return $mecanico;\r\n }",
"public function edit($id)\n {\n //\n $materia=materiap::where('idmateria',$id)->first();\n return view('edit_materia',['materia'=>$materia]);\n }",
"public function show($id)\n {\n //\n $matricula=DB::table('matriculas')\n ->join('grados','grados.id','=','matriculas.grados_id')\n ->join('estudiantes','estudiantes.id','=','matriculas.estudiantes_id')\n ->join('turnos','turnos.id','=','grados.turnos_id')\n ->join('anios','anios.id','=','grados.anios_id')\n ->where('matriculas.id',$id)\n ->select( 'matriculas.fecha_matricula',//\n 'matriculas.tipoMatricula',//\n 'estudiantes.nombre',//\n 'estudiantes.apellido',//\n 'grados.grado',//\n 'grados.seccion',//\n 'turnos.nombre_turno',\n 'matriculas.id',\n 'anios.año')//\n ->get()->toArray();\n //dd($matricula[0]->id);\n\n //$matricula=matricula::findOrFail($id);\n //return view('matriculas.show', compact('matricula'));\n //return view('matriculas.show')->with('matricula',$matricula);\n return view('matriculas.show',['matricula' => $matricula[0]]);\n }",
"public function getMateris()\n {\n return $this->hasMany(Materi::className(), ['dosen_pengampuh_id' => 'id']);\n }",
"public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia', 'grado_materia')\n ->withPivot('grado_id')\n ->withTimestamps();\n }",
"function ConverseMaterial($id){\n //Construimos la consulta\n $sql= \"SELECT tipo_material from material where id=\".$id;\n //Realizamos la consulta\n $resultado = $this->realizarConsulta($sql);\n if($resultado!=false){\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n }",
"public static function find(string $id): Materia{\n return Materia::find($id)->load('correlativas_cursadas_cursadas','correlativas_cursadas_aprobadas','correlativas_aprobadas_aprobadas','correlativas_aprobadas_cursadas');\n }",
"static public function ctrMostrarUnidadMedida($id_inventario){\n\n\t\t$tabla = \"inventario_x_unidad_medida_salida\";\n\n\t\t$respuesta = ModeloInventario::mdlMostrarUnidadMedida($tabla , $id_inventario);\n\n\t\treturn $respuesta;\n\n\n\n}",
"public function indexTablaMateriales($id){\n return view('backend.bodega3.verificacion.materiales.index', compact('id'));\n }",
"public function getInformacionMujer($id) {\n $mujer = Mujer::findOrFail($id);\n \n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n return view('imprimir.informacion', compact(\"usuario\", \"mujer\"));\n }",
"public function ver_boleta($id_materia)\n {\n $boleta = BoletaModel::select('id_materia','id_alumno','promedio','aprobado')\n ->where('id_materia',$id_materia)->get();\n\n return $boleta;\n }",
"public function readOneByMedicoInOrden($id,$fecha){\n $objC=new citaDAO();\n $resul=$objC->readOneByMedicoInOrden($id,$fecha);\n return $resul;\n }",
"Public function info($id){\n return Paciente::where('id',$id)->first();\n }"
]
| [
"0.7759912",
"0.70723164",
"0.6887433",
"0.6764801",
"0.67504174",
"0.66065264",
"0.6471261",
"0.64213836",
"0.6419327",
"0.64173734",
"0.640201",
"0.63936853",
"0.6374128",
"0.63737464",
"0.63533664",
"0.6288632",
"0.62690294",
"0.626051",
"0.6246982",
"0.6238707",
"0.6188337",
"0.6142956",
"0.6133448",
"0.6130844",
"0.611181",
"0.6105125",
"0.6042277",
"0.6022342",
"0.6007558",
"0.60029167"
]
| 0.85556287 | 0 |
/ function to add new inscripcion_materia | function add_inscripcion_materia($params)
{
$this->db->insert('inscripcion_materia',$params);
return $this->db->insert_id();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addmateria(materia $object)\n {\n $this->materias[] = $object;\n }",
"function add_materia($params)\n {\n $this->db->insert('materia',$params);\n return $this->db->insert_id();\n }",
"function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }",
"function alta_material(){\n\t\t$u= new Material_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Material del Productos.\\\"); window.location='\".base_url().\"index.php/almacen/productos_c/formulario/list_materiales';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}",
"public function alta_materia(Request $request)\n {\n //Utilizaremos eloquent para la insercion de datos en la BD.\n //Guardamos en varibales lo que viene de nuestro HMTL.\n $nombre = $request->nombre;\n $clave = $request->clave;\n $semestre = $request->semestre;\n $aprobados = $request->aprobados;\n $reprobados = $request->reprobados;\n\n //Ocupando al Modelo.\n MateriaModel::create([\n 'nombre' => $nombre,\n 'clave' => $clave,\n 'semestre' => $semestre,\n 'aprobados' => $aprobados,\n 'reprobados'=>$reprobados]);\n\n return redirect()->to('/Sistema/registrarMateria');\n\n }",
"public function addMannequinAction(Request $request, $id)\n {\n \n $mannequin = new Mannequin();\n $em = $this->getDoctrine()->getManager();\n $produit_1 = $em->getRepository('KountacBundle:Produits_1')->find($id);\n $form = $this->createForm('Kountac\\KountacBundle\\Form\\MannequinType', $mannequin);\n $user = $this->getUser();\n $form->handleRequest($request);\n $mannequin->setMarque($user);\n $mannequin->setDateUpdate(new \\DateTime('now'));\n $mannequin->setDateAjout(new \\DateTime('now'));\n $em->persist($mannequin);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('success','Nouveau mannequin ajouté avec succès');\n return $this->redirectToRoute('adminProduits_new2', array('id' => $produit_1->getId()));\n }",
"function addFormation($bdd, $notheme, $nosalle, $libelle, $datedeb, $heuredeb, $datefin, $heurefin, $intervention, $objectif, $prerequis, $contenu, $prixrepas, $nbreplaces)\n\t\t{\n\t\tif($objectif!=\"\"){\n\t\t\ttry{\n\t\t\t//ENVOI DE LA REQUETE A LA BDD\n\t\t\t$req = $bdd->prepare('INSERT INTO formation(NO_THEME, NO_SALLE, LIBELLE, DATE_DEB, HEURE_DEB, DATE_FIN, HEURE_FIN, INTERVENTION, OBJECTIF, PREREQUIS, CONTENU, PRIX_REPAS, NOMBRE_PLACE) VALUES(:NO_THEME, :NO_SALLE, :LIBELLE, :DATE_DEB, :HEURE_DEB, :DATE_FIN, :HEURE_FIN, :INTERVENTION, :OBJECTIF, :PREREQUIS, :CONTENU, :PRIX_REPAS, :NOMBRE_PLACE)');\n\t\t\t\t\t\t$req->execute(array(\n\t\t\t\t\t\t\t'NO_THEME'=>$notheme,\n\t\t\t\t\t\t\t'NO_SALLE'=>$nosalle,\n\t\t\t\t\t\t\t'LIBELLE'=>$libelle,\n\t\t\t\t\t\t\t'DATE_DEB'=>$datedeb,\n\t\t\t\t\t\t\t'HEURE_DEB'=>$heuredeb,\n\t\t\t\t\t\t\t'DATE_FIN'=>$datefin,\n\t\t\t\t\t\t\t'HEURE_FIN'=>$heurefin,\n\t\t\t\t\t\t\t'INTERVENTION'=>$intervention,\n\t\t\t\t\t\t\t'OBJECTIF'=>$objectif,\n\t\t\t\t\t\t\t'PREREQUIS'=>$prerequis,\n\t\t\t\t\t\t\t'CONTENU'=>$contenu,\n\t\t\t\t\t\t\t'PRIX_REPAS'=>$prixrepas,\n\t\t\t\t\t\t\t'NOMBRE_PLACE'=>$nbreplaces\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t \n\t\t\t\t\t\techo \"<div id='principal' class='container_12'>La formation a bien été ajouté. cliquez <a href='./accueil.php'>ici</a> pour retourner a la page d'accueil.</div>\";\n\n\t\t\t}catch(Exception $e){echo \"<div id='principal' class='container_12'>Une erreur lié aux données saisie empéche l'ajout du membre.<a href='http://localhost/ppec/accueil.php?content=creerFormation'>ici</a> pour retourner remplir le formulaire.</div>\";}\n\t\t}else{echo \"<div id='principal' class='container_12'>Le formulaire est vide. cliquez <a href='./accueil.php?content=creerFormation'>ici</a> pour retourner remplir le formulaire.</div>\";}\n\t\t\n\t\t\n\t\t\n\t}",
"public function insert($maeMedico);",
"public function actionCreate()\n\t{\n\t\t$model=new Materia;\n\n\t\tif(isset($_POST['Materia']))\n\t\t{\n\t\t\t\n\t\t\t$model->attributes=$_POST['Materia'];\n\t\t\t$r = Materia::model()->find(\"cod_materia='\".$model->cod_materia.\"'\");\n\t\t\t\n\t\t\tif ($model->cod_materia == null)\t{ //Si el codigo de la materia es nulo \n\t\t\t\tYii::app()->user->setFlash('error', \"El código de la asignatura es obligatorio \");\n\t\t\t}\n\t\t\telse{\n\t\t\t\n\t\t\t if($r){ // Valida si el codigo ya fue usado por otra materia\n\t\t\t\t\tYii::app()->user->setFlash('error', \"Ya existe una Asignatura con el codigo \".$model->cod_materia);\n\t\t\t//\t\terror_log('codigo de materia repetido ');\t\n\t\t\t }else{\t\t\t\n\t\t\t\t\t$cod_p = false; // El codigo padre viene vacio \n\t\t\t\n\t\t\t\t\tif ($model->cod_materia_padre != null){\n\t\t\t\t\t\t$cod_p = true;\n\t\t\t\t\t\t$var = $model->cod_materia_padre;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$x = Materia::model()->find(\"cod_materia='\".$model->cod_materia_padre.\"'\");\n\t\t\t\t//\t\terror_log('el codigo padre viene con valor');\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!$x && $cod_p == true){ //Viene un codigo y el codigo no existe \n\t\t\t\t\t\t\tYii::app()->user->setFlash('error', \"El código de la Asignatura a relacionar no existe.\");\n\t\t\t\n\t\t\t\t\t\t}else if ($cod_p && $x) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($model->save()){\n\t\t\t\t\t//\t\t\terror_log('GUARDO LA MATERIA');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Si el codigo a relacionar viene nulo debe guardar \n\t\t\t\t\t\t\t\terror_log('agregar hijos');\n\t\t\t\t\t\t\t\t$cli = new MiCliente();\n\t\t\t\t\t\t\t\t$res = $cli->padres_materia($var);\n\t\t\t\t\t\t//\t\terror_log('codigo a buscar '.$var);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\terror_log($res);\n\t\t\t\t\t\t\t\tif($res){\n\t\t\t\t\t\t\t\t\t$res_js=json_decode($res);\n\t\t\t\t\t\t\t\t\tforeach( $res_js as $itb){\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$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$itb->id_materia_padre));\t\t\t\n\t\t\t\t\t\t\t\t\t\t$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$itb->id_materia_hija));\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//\t\terror_log('SALI del for');\n\t\t\t\t\n\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$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$x->id_materia));\n\t\t\t\t\t\t\t\t//\terror_log('No trajo informacion');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//error_log('ahora guardar materia');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$this->redirect(array('view','id'=>$model->id_materia));\n\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\n\t\t\t\t\t\t\t\t\tif($model->save()) // Si el codigo a relacionar viene nulo debe guardar \n\t\t\t\t\t\t\t\t\t$this->redirect(array('view','id'=>$model->id_materia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}// fin del segundo else. El codigo de la materia ya esta siendo usado \t\n\t\t} // fin del primer else \n\t} //fin del isset\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function store(MatriculacionRequest $request)\n {\n\n\n $date = Carbon::now();\n\n $matricular = new Matriculacion;\n $matricular->inscripcion_id = $request->inscripcion_id;\n $matricular->cedula = $request->cedula;\n $matricular->nombres = $request->nombres;\n $matricular->apellidos = $request->apellidos;\n $matricular->curso = $request->curso;\n $matricular->especialidad = $request->especialidad;\n $matricular->paralelo = $request->paralelo;\n $matricular->cedula_r = $request->cedula_r;\n $matricular->razon_social = $request->razon_social;\n $matricular->direccion_factura = $request->direccion_factura;\n $matricular->telefono_factura = $request->telefono_factura;\n $matricular->codigo = $request->codigo;\n $matricular->tipo_estudiante = $request->tipo_estudiante;\n $matricular->fecha_creacion = $date->format('Y-m-d');\n $matricular->save();\n return redirect()->route('matricular.index')->with('info', 'Se ha matriculado correctamente al estudiante');\n\n\n }",
"public function Nuevo(){\n\t\tDB::table(\"materia\")->insertGetId(array(\n\t\t\t\"periodo_idperiodo\" => $_POST[\"periodo\"],\n\t\t\t\"carrera_idcarrera\" => $_POST[\"carrera\"],\n\t\t\t\"nombre\" =>$_POST[\"nombre\"]));\n\t\t\n\t\treturn Redirect::to(\"/inicio\");\n\t}",
"public function addMaquinaAction(Request $request,$id)\n {\n \n $sublinia_repo = $this->getDoctrine()->getRepository('AppBundle:Sublinia');\n $Sublinia = $sublinia_repo->findById($id);\n\n\n $form = $this->createForm(new MaquinaToSubliniaType(), $Sublinia);\n\n\n // comprovem si el formulari ja ha sigut enviat\n // -----------------------------------------------------------\n $form->handleRequest($request);\n\n if ($form->isValid()) { \n // si el formulari es vàlid el guardem a la base de dades\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($Sublinia);\n $em->flush();\n\n }\n return $this->render(\n \t'AppBundle:content:add_Maquina.html.twig',\n \tarray(\n 'form' => $form->createView(), \n ));\n }",
"public function addMedallaParticipante($id_exist, $nuevaMedallaCompetitor)\n\t{\n\t\t$current_user = wp_get_current_user();\n\t\t$medallas_participante = get_user_meta($current_user->ID, 'medallas', true);\n\t\tif ($medallas_participante == '') $medallas_participante = [];\n\n\t\t$medallas_participante[$id_exist]['count'] = isset($medallas_participante[$id_exist]) ? $medallas_participante[$id_exist]['count'] + 1 : 1;\n\t\t$medallas_participante[$id_exist]['fecha_ultima_cargada'] = date('Y-m-d');\n\t\t$medallas_participante[$id_exist]['codigo'] = 1;\n\n\t\tupdate_user_meta($current_user->ID, 'medallas', $medallas_participante);\n\n\t\tif ( date('Y-m-d H:i:s') < '2017-01-05 14:00:00' ) {\n\t\t\t$this->saveTotalMedallasPArticipante($current_user->ID, count($medallas_participante));\n\t\t}\n\n\n\t}",
"function insertar(){\n $conexion = mysqli_connect(\"localhost\",\"root\",\"\",'dynasoft');\n $query= \"INSERT INTO Material (Id_Material,NOMBRE_MATERIAL,UNIDAD_MEDIDA,CANTIDAD_MATERIAL,DESCRIPCION,Fecha_Vencido)\n VALUES ('$this->id_material','$this->nombre','$this->unidad','$this->cantidad','$this->descripcion','$this->fecha_vencido')\";\n $resultado = mysqli_query($conexion,$query);\n\n mysqli_close($conexion);\n }",
"function get_inscripcion_materia($id)\r\n {\r\n return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array();\r\n }",
"public function create(Request $request)\n {\n $dd = new Demandeur();\n $materiel = new Materiel();\n $listdd = $dd->all();\n $imMat = $request->select_mat;\n //récupération des infos du matos\n $materiel = $materiel->where('numImmat',$imMat)\n ->orWhere('codeProduit',$imMat)\n ->first();\n $idMat = $materiel->id;\n return view('pagesGermac.Exploitation.createExp',compact('imMat','listdd','idMat'));\n }",
"function setNombre_materia($nombre_materia){\n\t\t\n\t\t$this->nombre_materia = $nombre_materia;\n\t\t$this->cambios = true;\n\t}",
"public function store(CreateMateria_PrimaRequest $request)\n {\n $input = $request->all();\n\n $input['nombre'] = strtoupper($input['nombre']);\n $input['unidad_medida'] = strtoupper($input['unidad_medida']);\n $materiaPrima = $this->materiaPrima->create($input);\n $materiaPrima->terceros()->attach($input['tercero_id']);\n Log::info('Materia_Prima, store, Se almaceno la materia prima: ' . $materiaPrima->id . ', con el tercero: ' . $input['tercero_id'], [$input]);\n\n Flash::success('Materia_Prima saved successfully.');\n\n return redirect(route('materiaPrima.show', [$materiaPrima->id]));\n }",
"public function add_itens_nota($id_nota) {\n\t\t$controle = $this->notas_model->add_item($id_nota);\n\t\tif ($controle === FALSE) {\n\t\t# Bloco de auditoria\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Tentativa de incluir novo item na nota fiscal ID n° $id_nota\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-danger', 'msg' => 'Erro ao adicionar o item a nota, por favor, verifique se o preenchimento do formulário está correto!'));\n\t\t}\n\t\telse {\n\t\t\t# Bloco de auditoria\n\t\t\t$info_nota = $this->notas_model->dados_notas($id_nota);\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Incluiu novo item($controle->modelo) na nota fiscal de n° $info_nota->numero, expedida pela $info_nota->empresa\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-success', 'msg' => 'Item adicionado com sucesso!'));\n\t\t}\n\t\tredirect(\"clog/notas/itens_nota/$id_nota\");\n\t}",
"function agregarMarca()\r\n\t{\r\n\t\t$mkNombre= $_POST['mkNombre'];\r\n\t\t$link = conectar();\r\n\t\t// EDITOR DE TEXTO al seleccionar $mkNombre y click en ' encierra entre '' idem click en \" al pulsarla\r\n\t\t// No puedo dejar así una variable dentro de las comillas (aunque funcione) PERO ademas debe tener el SQL\r\n\t\t// las comillas que encierren el string\r\n\t\t$sql = \"INSERT INTO marcas (mkNombre) VALUE ('\" . $mkNombre . \"')\"; \r\n\t\t$resultado = mysqli_query ($link, $sql)\r\n\t\t\t\t\t\tor die(mysqli_error($link));\r\n\t\treturn $resultado; \t// true si insertó, false si falló\r\n\r\n\t\t/* si quisiera id y otras cosas las meto en un array para el return y uso el array AFUERA\r\n\t\tif ($resultado){\r\n\t\t\t$id = mysql_insert_id($link);\r\n\t\t\t$salida = [$resultado, $id, $ mkNombre];\r\n\t\t}\r\n\t\treturn $salida; \r\n\t\t*/\r\n\t}",
"public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }",
"function setMateria($materia){\n\t\t\n\t\t$this->materia = $materia;\n\t\t$this->cambios = true;\n\t}",
"public function procesarmateria()\n\t{\n\t\t$valido = true;\n\t\t$id_usuario = $this->session->userdata('id_usuario');\n\t\t\n\t\t/////////////////////////// Captura de datos /////////////////////////////\n\t\t$id_profesor = $this->input->post('id_profesor');\n\t\t$id_materia = $this->input->post('materia_agregar');\n\t\t\n\t\t/////////////////////////// Validacion de datos //////////////////////////\n\t\tif ($this->Profesor_Materia_model->existe_relacion_profesor_materia($id_profesor, $id_materia))\n\t\t{\n\t\t\t$valido = false;\n\t\t\t$this->session->set_userdata('resultado_operacion','error');\n\t\t\t$this->session->set_userdata('mensaje_operacion','Profesor ya tiene asignada esa materia');\n\t\t}\n\t\t\n\t\t/////////////////////////// Ejecucion de logica //////////////////////////\n\t\tif ($valido)\n\t\t{\n\t\t\t$this->Profesor_Materia_model->insertar_detalle_materia_profesor($id_profesor, $id_materia);\n\t\t\t$this->session->set_userdata('resultado_operacion','exito');\n\t\t\t$this->session->set_userdata('mensaje_operacion','Se le ha asignado la materia al profesor exitosamente');\n\t\t}\n\t\t\n\t\tredirect('/editarprofesor/index/' . $id_profesor);\n\t}",
"function insertarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_INS';\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('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\t\t\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','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 imprimirMatricula($cedulaEstudiante) {\n $this->view->anio = $this->model->anio();\n $this->view->director = $this->model->director();\n $this->view->consultaDatosEstudiante = $this->model->consultaDatosEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de las enfermedades del Estudiante */\n $this->view->enfermedadEstudiante = $this->model->enfermedadEstudiante($cedulaEstudiante);\n \n /* Cargo informacion de la adecuacio del Estudiante */\n $this->view->adecuacionEstudiante = $this->model->adecuacionEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Becas */\n $this->view->becasEstudiante = $this->model->becasEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del encargado Legal del Estudiante */\n $this->view->encargadoLegal = $this->model->encargadoLegal($cedulaEstudiante);\n\n /* Cargo informacion de la Madre del Estudiante */\n $this->view->madreEstudiante = $this->model->madreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del Padre del Estudiante */\n $this->view->padreEstudiante = $this->model->padreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Persona en caso de Emergencia del Estudiante */\n $this->view->personaEmergenciaEstudiante = $this->model->personaEmergenciaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la poliza del Estudiante */\n $this->view->polizaEstudiante = $this->model->polizaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Condicion de Matricula */\n $this->view->infoCondicionMatricula = $this->model->infoCondicionMatricula($cedulaEstudiante);\n\n /* Cargo informacion de la especialidad del Estudiante */\n $this->view->especialidadEstudiante = $this->model->especialidadEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Adelanto/Arrastre */\n $this->view->infoAdelanta = $this->model->infoAdelanta($cedulaEstudiante);\n \n $this->view->render('matricula/imprimirMatricula');\n }",
"public function create()\n {\n return view('solicitacao_material_itens.create');\n }",
"public function create()\n {\n $materia = materia::all();\n $curso = curso::all();\n return view('materia.create', compact('materia'),compact('curso'));\n }",
"public function saveProfessorMaterias(){\n \tif (!isset(Request::all()['data'])) {\n \t\t$materias = [];\n \t}else{\n \t\t$materias = Request::all()['data']; \t\t\n \t}\n \t\n \t$oldMaterias = MateriasProfessor::where('professor_id', Auth::user()->professor->id)->get();\n\n \t//Check if as any materia to delete \t\n \t$this->checkMateriaToDelete($oldMaterias, $materias);\n\t\t\n\t\t//add new materias;\n \t$this->addNewMaterias($oldMaterias, $materias);\n\n \treturn 'true';\n }",
"#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/new', name: 'materiaux_new', methods: ['GET', 'POST'])]\n public function new(Request $request): Response\n {\n $entity = new Materiaux();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->managerRegistry->getManager();\n $em->persist($entity);\n $em->flush();\n $this->addFlash('success', 'Le matériaux a bien été ajouté');\n\n return $this->redirectToRoute('materiaux');\n }\n\n return $this->render(\n '@Sepulture/materiaux/new.html.twig',\n [\n 'entity' => $entity,\n 'form' => $form->createView(),\n ]\n );\n }",
"function editarMaterial($empleados, $pentalon,$fecha, $talla,$cantidad){\n //realizamos la consuta y la guardamos en $sql\n $sql=\"INSERT INTO material_entregado(id, empleado,materiales,fecha_entrega,talla,cantidad) VALUES (null, \".$empleados.\",'\".$pentalon.\"','\".$fecha.\"','\".$talla.\"', '\".$cantidad.\"')\";\n //Realizamos la consulta utilizando la funcion creada en db.php\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return true;\n }else{\n return null;\n }\n\n }"
]
| [
"0.6804768",
"0.6535714",
"0.61981285",
"0.61285955",
"0.6113647",
"0.6075961",
"0.59873056",
"0.59225047",
"0.5922358",
"0.5894869",
"0.58535343",
"0.5846425",
"0.58097756",
"0.57601804",
"0.57496643",
"0.5739368",
"0.5729696",
"0.57204163",
"0.56664705",
"0.5662113",
"0.56545645",
"0.5650439",
"0.5648045",
"0.5629711",
"0.5628783",
"0.5626147",
"0.5612104",
"0.5604492",
"0.5592786",
"0.55825686"
]
| 0.72243047 | 0 |
/ function to update inscripcion_materia | function update_inscripcion_materia($id,$params)
{
$this->db->where('id',$id);
return $this->db->update('inscripcion_materia',$params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function update_materia($materia_id,$params)\n {\n $this->db->where('materia_id',$materia_id);\n return $this->db->update('materia',$params);\n }",
"function modificar_material($id_material,$titulo,$descripcion,$objetivos,$estado,$autores,$ac,$dirigido,$edad,$nivel,$saa,$tipo,$archivos,$id_licencia,$subac,$idiomas) {\n\t\n\t$UpdateRecords = \"UPDATE materiales \n\t\tSET material_titulo='$titulo', material_descripcion='$descripcion', material_objetivos='$objetivos',\n\t\tmaterial_estado='$estado',material_autor='$autores',material_area_curricular='$ac',\n\t\tmaterial_dirigido='$dirigido',material_edad='$edad',material_nivel='$nivel',\n\t\tmaterial_saa='$saa',material_tipo='$tipo',material_archivos='$archivos',\n\t\tmaterial_licencia='$id_licencia', material_subarea_curricular='$subac',\n\t\tmaterial_idiomas='$idiomas'\n\t\tWHERE id_material='$id_material'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\t\n\t}",
"function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_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_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\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 update($maeMedico);",
"function editarMaterial($empleados, $pentalon,$fecha, $talla,$cantidad){\n //realizamos la consuta y la guardamos en $sql\n $sql=\"INSERT INTO material_entregado(id, empleado,materiales,fecha_entrega,talla,cantidad) VALUES (null, \".$empleados.\",'\".$pentalon.\"','\".$fecha.\"','\".$talla.\"', '\".$cantidad.\"')\";\n //Realizamos la consulta utilizando la funcion creada en db.php\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return true;\n }else{\n return null;\n }\n\n }",
"public function forActualizaMateria($materia,$cid,$plectivo){\n $nivelMateria = DB::connection('sqlsrv_bdacademico')\n ->table('TB_PENSUM as A')\n ->leftJoin('TB_PENSUMATE as B','A.COD_PENSUM','=','B.COD_PENSUM')\n ->leftJoin('TB_MATERIA as C','B.COD_MATERIA','=','C.COD_MATERIA')\n ->where('A.COD_PLECTIVO', '=', $plectivo)\n ->where('C.COD_MATERIA', '=', $materia)\n ->orderBy('C.NOMBRE')\n ->select('C.NIVEL')->pluck('C.NIVEL')->toArray();\n /**/\n $array_response=[];\n $array_response['status']=200;\n $array_response['message']='Materia '.$materia.' modificada correctamente';\n\n $docente_materia = tb_docente_materia::find($cid);\n if (is_null($docente_materia)) {\n $array_response['status']=404;\n $array_response['message']='Registro no encontrado. No se pudo guardar los cambios ['.$materia.']';\n }\n else{\n $docente_materia->COD_MATERIA=$materia;\n $docente_materia->NIVEL=$nivelMateria[0];\n $docente_materia->RESPONSA2 = \\Auth::user()->name;\n $docente_materia->FECSYS2 = Utils::getDateSQL();\n $docente_materia->save();\n }\n return $array_response;\n }",
"public function update_materias($id, Request $request)\n {\n \n if( auth()->user()->hasRole(['Estudiante']))\n {\n $user = User::findOrFail($id);\n \n \n\n //Definimos las reglas de validacion\n $validaciones = \\Validator::make($request->all(),\n [\n 'materias_aprobadas' => 'min:1|max:carreras,cantidad_materias|numeric',\n \n ]);\n\n \n //preguntamos si hay errores\n if ($validaciones->fails()) {\n //volvemos al formulario con los errorres cargados\n return redirect()\n ->back()\n ->withErrors($validaciones->errors())\n ->withInput(Input::all());\n\n }\n //Asignamos la persona del Usuario\n $persona = $user->persona;\n //Actualizamos a la Persona con los datos restantes del Request\n $persona->materias_aprobadas = $request->get('materias_aprobadas');\n\n $persona->save();\n \n \n\n //Finalizada la Creacion con el Request\n //volvemos al Index\n \n return redirect()->route('carrera.perfil');\n \n \n \n }\n abort(403);\n\n }",
"function setNombre_materia($nombre_materia){\n\t\t\n\t\t$this->nombre_materia = $nombre_materia;\n\t\t$this->cambios = true;\n\t}",
"public function updateMateriel(){\n \n // Vérifier que les informations envoyées par le formulaire sont correctes\n $validationAttributes = $this->validate();\n\n\n DemandeDps::find($this->editDps[\"id\"])->update($validationAttributes[\"editDps\"]);\n\n $this->dispatchBrowserEvent(\"showSuccessMessage\", [\"message\"=>\"dps mis à jour avec succès!\"]);\n }",
"function admin_modificar_alumno($codigo_anterior,$codigo,$nombres,$apellido_p,$apellido_m,$edad,$password,$id_padre,$grado,$nivel,$seccion,$disponible,$repitente){ \r\n\t\t$cn = $this->conexion();\t\t\t\r\n\t\t\r\n\t\tif($cn!=\"no_conexion\"){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t$sql=\"select * from $this->nombre_tabla_alumnos where codigo='$codigo' and codigo<>'$codigo_anterior'\"; \r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($rs)==0){\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n \t\t$sql=\"update $this->nombre_tabla_alumnos set \r\ncodigo='$codigo',nombres='$nombres',apellido_paterno='$apellido_p',apellido_materno='$apellido_m',edad='$edad',password='$password',id_padre='$id_padre',grado='$grado',nivel='$nivel',seccion='$seccion',disponible=$disponible,repitente='$repitente' where codigo='$codigo_anterior'\";\t\t\r\n\t\t\t $rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\t\tmysql_close($cn);\t\t \r\n\t\t\t\treturn \"mysql_si\";\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmysql_close($cn);\r\n\t\t\t\t\treturn \"existe\";\r\n\t\t\t\t\t}\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t\t\r\n\t}",
"public function update_materias_show(){\n \n if( auth()->user()->hasRole(['Estudiante'])){\n \n return view('update.materias_edit');\n }\n abort(403); \n }",
"public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }",
"public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }",
"function modificar(){\r\n\t\t\t$mysqli=$this->ConectarBD();\r\n\t\t\t\t$id=$_SESSION['idr'];\r\n\r\n\t\t\t$sql= \"UPDATE reservact SET FECHA ='\".$this->fecha.\"', DNI ='\".$this->dni.\"', COD_ACT='\".$this->codact.\"' WHERE COD_RES = '\".$id.\"'\";\r\n\r\n\r\n\r\n\t\t\t\tif (!($resultado = $mysqli->query($sql))){\r\n\t\t\t\treturn 'ERR_CONS_BD';\r\n\t\t\t\t}else{\r\n\t\t\t \treturn \"CONFIRM_EDIT_RESERVA\";\r\n\t\t\t\t}\r\n\r\n\t\t}",
"public function update(Request $request, materia $materia,$id)\n {\n $materia = materia::find($id);\n $materia->name = $request->name;\n $materia->contenido = $request->contenido;\n $materia->descripcion = $request->descripcion;\n $materia->curso_id = $request->curso_id;\n $materia->save();\n return redirect()->route('materia.show', $materia);\n }",
"function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }",
"static public function mdlEditarmunicipio($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET desc_municipio = :desc_municipio WHERE id_municipio = :id_municipio\");\n\n\t\t$stmt->bindParam(\":id_municipio\", $datos[\"id_municipio\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":desc_municipio\", $datos[\"desc_municipio\"], PDO::PARAM_STR);\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}",
"public function editarMateriaController(){\n $datosController = $_GET[\"idM\"];\n //Enviamos al modelo el id para hacer la consulta y obtener sus datos\n $respuesta = Datos::editarMateriaModel($datosController, \"materias\");\n //Recibimos respuesta del modelo e IMPRIMIMOS UNA FORM PARA EDITAR\n echo'\n <input type=\"hidden\" value=\"'.$respuesta[\"id\"].'\"\n name=\"idEditar\">\n <input type=\"text\" value =\"'.$respuesta[\"nombre\"].'\"\n name=\"nombrecarreraEditar\" required>\n <input type=\"text\" value =\"'.$respuesta[\"clave\"].'\"\n name=\"clavecarreraEditar\" required>';\n $respuesta2 = Datos::vistaCarreraModel(\"carreras\");\n echo '<select id=\"mi_select\" name=\"mi_select\">\n <option value=\"'.\">Seleccionar carrera</option>\";\n foreach($respuesta2 as $row => $item){\n echo '<option value=\"'.$item[\"id\"].'\">'.$item[\"nombre\"].'</option>';\n }\n echo '</select>\n <input type=\"submit\" value= \"Actualizar\">';\n }",
"function setMateria($materia){\n\t\t\n\t\t$this->materia = $materia;\n\t\t$this->cambios = true;\n\t}",
"public function editarMaterialesProyecto(Request $request){\n\n $regla = array(\n 'id' => 'required',\n 'identificador' => 'required|array',\n 'material' => 'required|array',\n 'precio' => 'required|array',\n 'cantidad' => 'required|array',\n );\n\n $validar = Validator::make($request->all(), $regla);\n\n if ($validar->fails()){return ['success' => 0];}\n\n // iniciar el try catch DB\n\n DB::beginTransaction();\n\n try {\n\n // editar ingreso_b3\n\n IngresosB2::where('id', $request->id)\n ->update(['id_equipo2' => $request->selectequipo,\n 'nota' => $request->nota,\n 'proveedorb2_id' => $request->proveedor\n ]);\n\n // recorrer cada material para actualizarlo\n for ($i = 0; $i < count($request->material); $i++) {\n\n IngresosDetalleB2::where('id', $request->identificador[$i])\n ->update(['nombre' => $request->material[$i],\n 'cantidad' => $request->cantidad[$i],\n 'preciounitario' => $request->precio[$i],\n 'codigo' => $request->codigo[$i]\n ]);\n }\n\n DB::commit();\n return ['success' => 1];\n\n }catch(\\Throwable $e){\n DB::rollback();\n\n return ['success' => 2];\n }\n }",
"function add_inscripcion_materia($params)\r\n {\r\n $this->db->insert('inscripcion_materia',$params);\r\n return $this->db->insert_id();\r\n }",
"function editar_marca($id_editar, $marca, $moneda){\r\n\r\n\t\t\r\n\t$sql_marca=\"SELECT marca FROM marcadeherramientas WHERE id=$id_editar \";\r\n\t$resultado_marca=mysql_query($sql_marca);\r\n\r\n\twhile($row_marca=mysql_fetch_array($resultado_marca)){\r\n\t\r\n\t$marca_anterior=$row_marca['marca'];\t\r\n\t\r\n\t}\r\n\tif($marca_anterior != $marca){\r\n\t\t// si cambia el nombre de la marca que tambien cambie el nombre de su tabla\r\n\t\t\t$sql_nombre_tabla=\"RENAME TABLE precio\".$marca_anterior.\" TO precio\".$marca.\"\";\r\n\t\t if(!$resultado = mysql_query($sql_nombre_tabla)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t\t}\r\n\r\n\r\n$sql_marca=\"UPDATE `marcadeherramientas` SET `marca` = '\".$marca.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t$sql_marca=\"UPDATE `marcadeherramientas` SET `moneda` = '\".$moneda.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar moneda de la marca ')</script>\";\t\r\n\tdie();\r\n } \r\n \r\n //Actualiza tabla Productos\r\n \r\n $sqlActualiza=\"UPDATE productos SET moneda='\".$moneda.\"' , marca='\".$marca.\"' \r\n WHERE IdMarca=\".$id_editar.\"\r\n \";\r\n \r\n\tif(!$resultado = mysql_query($sqlActualiza)) {\r\n\techo\"<script>alert('Error al editar tabla productos')</script>\";\t\r\n\tdie();\r\n } \r\n\t\t\r\n\t\t\r\necho\"<script>alert('Los registros fueron modificados')</script>\";\t\t\r\n\techo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=../precios.php\\\">\"; \t\r\n\t\r\n\t\t}",
"public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }",
"public function atualizarProdutos($idproduto, $idcategoria, $descricao, $referencia, $preco, $estoque, $habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n \n $preco = str_replace(\",\", \".\", $preco);\n\n if ($idcategoria == null || $descricao == \"\" || $referencia == \"\" || $preco == \"\" || $habilitado == \"\") {\n return 0;\n }else{\n\n $sql = \"UPDATE tbproduto SET referencia = '$referencia', idcategoria = '$idcategoria', preco = '$preco', descricao = '$descricao', habilitado = '$habilitado', estoque = '$estoque', modificado = NOW(), usuid = '$usuid' WHERE id = '$idproduto' \";\n\n echo $this->conexao->query($sql);\n }\n\n }",
"public function ajaxmaterias() { //Se le agrego idalumnocarrera\n $idCarrera = $_POST['carrera'];\n $idAlumno = $_POST['alumno'];\n $idAlumnoCarrera = $_POST['idalumnocarrera'];\n $dataIdModo = htmlentities($_POST['modo'], ENT_COMPAT | ENT_QUOTES, \"UTF-8\");\n $db = & $this->POROTO->DB;\n $db->dbConnect(\"matriculacion/ajaxmaterias/\" . $idCarrera . \"/\" . $idAlumno . \"/\" . $dataIdModo);\n\n include($this->POROTO->ControllerPath . '/correlativas.php');\n $claseCorrelativas = new correlativas($this->POROTO);\n\n if ($dataIdModo == 3) { //solo inscriptas (estadomateria=2)\n $sql = \"select m.idmateria, m.anio, m.materiacompleta as nombre,c.nombre as comision \";\n $sql .= \" from alumnomateria am inner join viewmaterias m on (am.idmateria=m.idmateria and m.idcarrera=\" . $idCarrera . \")\";\n $sql .= \" left join comisiones c on am.idcomision=c.idcomision \";\n $sql .= \" where am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") \";\n $sql .= \" and am.idpersona=\" . $idAlumno;\n $sql .= \" and am.idalumnocarrera=\" . $idAlumnoCarrera;\n $sql .= \" order by m.orden\";\n $arrMateriasOk = $db->getSQLArray($sql);\n }\n if ($dataIdModo == 1 || $dataIdModo == 2) { //1 Alumno 2 Administrativo.\t\t\t\t\t\t\t\t\t\t\n //levanto el listado de materias de la carrera. por un left join me \n //fijo si ya fue cursada (puede haber mas de un registro)\n //Si materia cursada aprobada o libre => solo_cursada>=1 y \n //la considero como ya cursada\n //si tuvo un estado 3,4 (aprobada,aprobada por equiv) => aprobada>1 y la considero como materia aprobada\n //elimino las materias que tienen estado CURSANDO (inscriptas) y las libres al menos una vez.\n $sql = \"select m.idmateria,m.anio,m.materiacompleta as nombre,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") then 1 else 0 end) solo_cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_nivelacion'] . \") then 1 else 0 end) cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_nivelacion'];\n $sql .= \") then 1 else 0 end) aprobada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \") then 1 else 0 end) inscripta \";\n $sql .= \" from viewmaterias m \";\n $sql .= \" left join alumnomateria am on am.idmateria=m.idmateria and am.idpersona=\" . $db->dbEscape($idAlumno);\n $sql .= \" and am.idalumnocarrera=\" . $db->dbEscape($idAlumnoCarrera);\n $sql .= \" where m.idcarrera=\" . $db->dbEscape($idCarrera);\n $sql .= \" and m.estado=1\";\n $sql .= \" group by m.idmateria\";\n $sql .= \" order by m.orden\";\n $arrMaterias = $db->getSQLArray($sql);\n\n $arrMateriasOk = array();\n\n foreach ($arrMaterias as $row) {\n if ($row['solo_cursada'] == \"0\") { //Solo traigo las que no estoy cursando aun o libre.\n //Busco las correlativas para este alumno.\n $resultados = $claseCorrelativas->getCorrelativasAlumno($idCarrera, $row['idmateria'], 0, $idAlumno, $idAlumnoCarrera);\n if ($dataIdModo == 1) { //Si es alumno, solo traigo materias sin correlativas\n $valida = true;\n foreach ($resultados as $regla) {\n if ($regla[\"idregla\"] != 6 && $regla[\"estado\"] == false)\n $valida = false;\n }\n if ($valida)\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }else { //Traigo todas, cumplan o no las correlatividades.\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }\n }\n }\n\n //busco en arrMateriasOk, las materia que tienen inscriptas>0\n foreach ($arrMateriasOk as $k => $item)\n foreach ($arrMaterias as $materia)\n if ($materia['idmateria'] == $item['idmateria'])\n if ($materia['inscripta'] > 0 || $materia['aprobada'] > 0)\n unset($arrMateriasOk[$k]);\n } // if ($dataIdModo == 1 || $dataIdModo == 2 {\n $db->dbDisconnect();\n echo json_encode($arrMateriasOk);\n }",
"function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}",
"static public function mdlAsignarMiembro($datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE miembros SET id_membresia = :id_membresia WHERE id_miembro = :id_miembro\");\n\n\t\t$stmt->bindParam(\":id_membresia\", $datos[\"id_membresia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_miembro\", $datos[\"id_miembro\"], 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\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n }",
"function actualizarConvenio(){\n \n $nombrePrograAca = $_POST['nombrePrograAca'];\n $fechaIni = $_POST['fechaIni'];\n $fechaFin = $_POST['fechaFin'];\n $codRecaudo = $_POST['codrecaudo'];\n $inversion = $_POST['inversion'];\n $id=$_POST[\"id\"];\n\n\t\t\t//Se consultan todos los convenios\n\t\t\t$conexion=Conexion::getInstance();\n\t\t\t$consulta=\"update programaacademico set `nomprogramaacademico`='$nombrePrograAca', \n `fechainicioprogaca`='$fechaIni', `fechafinprogaca`='$fechaFin', `codigorecaudo`='$codRecaudo', \n `inversion`='$inversion' where `idprogramaacademico`='$id'\";\n \n $res= $conexion->actualizar($consulta);\n if ($res==1){\n echo \"<h2><strong>Actualización exitosa!!!</strong></h2>\";\n }\n\t\t //fin de la funcion\n\t\t}",
"public function editarpersonal($datos){\n $c= new conectar();\n $conexion=$c->conexion();\n\n $sql=\"UPDATE personal set nombres='$datos[0]',ape_pat='$datos[1]',ape_mat='$datos[2]',dni='$datos[3]',celular='$datos[4]',correo='$datos[5]'\n where id_personal=$datos[6]\";\n return $result=mysqli_query($conexion,$sql);\n\n }",
"function imprimirMatricula($cedulaEstudiante) {\n $this->view->anio = $this->model->anio();\n $this->view->director = $this->model->director();\n $this->view->consultaDatosEstudiante = $this->model->consultaDatosEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de las enfermedades del Estudiante */\n $this->view->enfermedadEstudiante = $this->model->enfermedadEstudiante($cedulaEstudiante);\n \n /* Cargo informacion de la adecuacio del Estudiante */\n $this->view->adecuacionEstudiante = $this->model->adecuacionEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Becas */\n $this->view->becasEstudiante = $this->model->becasEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del encargado Legal del Estudiante */\n $this->view->encargadoLegal = $this->model->encargadoLegal($cedulaEstudiante);\n\n /* Cargo informacion de la Madre del Estudiante */\n $this->view->madreEstudiante = $this->model->madreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del Padre del Estudiante */\n $this->view->padreEstudiante = $this->model->padreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Persona en caso de Emergencia del Estudiante */\n $this->view->personaEmergenciaEstudiante = $this->model->personaEmergenciaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la poliza del Estudiante */\n $this->view->polizaEstudiante = $this->model->polizaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Condicion de Matricula */\n $this->view->infoCondicionMatricula = $this->model->infoCondicionMatricula($cedulaEstudiante);\n\n /* Cargo informacion de la especialidad del Estudiante */\n $this->view->especialidadEstudiante = $this->model->especialidadEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Adelanto/Arrastre */\n $this->view->infoAdelanta = $this->model->infoAdelanta($cedulaEstudiante);\n \n $this->view->render('matricula/imprimirMatricula');\n }"
]
| [
"0.64743924",
"0.63942826",
"0.62906104",
"0.61918455",
"0.6173816",
"0.61702365",
"0.61407834",
"0.6055277",
"0.60484153",
"0.589866",
"0.5897071",
"0.5888249",
"0.5888249",
"0.58809376",
"0.5860471",
"0.5855349",
"0.5839724",
"0.5834041",
"0.5831495",
"0.58230895",
"0.58229214",
"0.5821338",
"0.5801702",
"0.5757285",
"0.57247704",
"0.5714282",
"0.5706683",
"0.56936544",
"0.5690857",
"0.56891525"
]
| 0.7046177 | 0 |
/ function to delete inscripcion_materia | function delete_inscripcion_materia($id)
{
return $this->db->delete('inscripcion_materia',array('id'=>$id));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($id_materi);",
"function delete_materia($materia_id)\n {\n return $this->db->delete('materia',array('materia_id'=>$materia_id));\n }",
"public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\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 destroy(materia $materia,$id)\n {\n $materia = materia::find($id);\n $materia->delete();\n return redirect()->route('materia.index');\n }",
"public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }",
"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 }",
"public function deleteAction(Request $request, Materiel $materiel) {\n $form = $this->createDeleteForm($materiel);\n $form->handleRequest($request);\n \n $session = $request->getSession();\n\n if ($form->isSubmitted() && $form->isValid()) {\n \n \n \n $session->getFlashBag()->add('notification', \"le matériel \".$materiel->getMaterielNom().\" a été supprimé avec succès\");\n \n \n \n \n $em = $this->getDoctrine()->getManager();\n $em->remove($materiel);\n $em->flush();\n }\n\n return $this->redirectToRoute('materieladmin_index');\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 deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\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 delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }",
"function deletePreDetalle2()\n {\n $sql='DELETE FROM predetalle WHERE idPreDetalle = ?';\n $params=array($this->idPre);\n return Database::executeRow($sql, $params);\n }",
"public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}",
"function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }",
"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}",
"public function excluirMembrodaCelulaDao($codCelula,$matricula){\r\n \r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $objMembro = new objetoMembro();\r\n $ret=3;\r\n \r\n $string= \"Select Matricula,Nome from membros WHERE Matricula = '$matricula'\";\r\n $resul1 = mysql_query($string)or die (\"Nao foi possivel encontrar o membro\".mysql_error());\r\n \r\n if($resul1){ \r\n $reg = mysql_fetch_assoc($resul1);\r\n $objMembro->setMatricula($reg[\"Matricula\"]);\r\n $objMembro->setNome($reg[\"Nome\"]);\r\n }\r\n// $string=\"DELETE FROM `geracaopar1_1`.`celulamembro` WHERE `celulamembro`.`CodCelula` = 5 AND `celulamembro`.`CodMembro` = 7\";\r\n $resul = mysql_query(\"DELETE FROM celulamembro WHERE CodCelula = '$codCelula' AND CodMembro = '$matricula'\")or die (\"Nao foi possivel excluir membro\".mysql_error());\r\n \r\n if($resul){ \r\n \r\n $ret=1;\r\n }\r\n mysql_free_result($resul1);\r\n $obj->freebanco();\r\n return $objMembro;\r\n }",
"public function deletePartenaire($id){\n $partenaire = Partenaire::where('id','=',$id)->first();\n $partenaire->delete();\n \n return redirect('/admin/associations-partenaires')->with(['success'=>'Association partenaire correctement supprimée !']);\n\n }",
"static public function ctrEliminarMarca()\n {\n\n if (isset($_GET[\"idMarca\"])) {\n\n $tabla = \"marca\";\n $item = \"Id_Marca\";\n $dato = $_GET[\"idMarca\"];\n\n \n $borrar = ModeloMarca::mdlEliminarMarca($tabla, $item, $dato);\n \n if ($borrar == \"ok\") {\n #Pregunta si existe una imagen en la BD\n if ($_GET[\"fotoMarca\"] != \"\") {\n unlink($_GET[\"fotoMarca\"]);\n }\n \n #Borrar el directorio del usuario\n rmdir(\"views/img/Marcas/\" . $_GET[\"nombreMarca\"]);\n\n echo '<script>\n swal({\n title: \"Eliminación exitosa!\",\n text: \"La marca se eliminó correctamente.\",\n icon: \"success\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n } else if($borrar == \"errorPadres\"){\n echo '<script>\n swal({\n title: \"Error al intentar eliminar!\",\n text: \"No puedes borrar esta marca, ya que tienes productos registrados con esta.\",\n icon: \"warning\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n } else {\n echo '<script>\n swal({\n title: \"Error!\",\n text: \"Ha ocurrido un error con la conexión a la base de datos.\",\n icon: \"error\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n }\n }\n }",
"public function destroy($id)\n {\n if(!isset($_SESSION['ContraPass']) || !isset($_SESSION['usuarioUser'])){\n return view('interfazprincipal.Interfaz');\n }\n materia::where('Clave_M',$id)->delete();\n materia_grupo::where('Clave_M',$id)->delete();\n return redirect('materia')->with('msj','Materia Eliminada Correctamente');\n //return view('Alumnos.index',compact('alumnos'));\n //return view('materias.consulta');\n }",
"public function destroy($incidencia)\n {\n //\n Incidencies::find($incidencia)->delete();\n }",
"public function delete($idconvenio);",
"function delete_item($id,$id_documento){\n $db = new MySQL();\n $sql = \"DELETE FROM facturas_detalle WHERE id='$id'\";\n $db->consulta($sql);\n \n /*\n * actualizar nuevos saldos\n */\n $this->actualizar_totales($id_documento);\n }",
"public function excluirPermissao($idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbpermissao WHERE idpermissao = '$idpermissao' \";\n\n return $this->conexao->query($sql);\n\n\n }",
"final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }",
"public function deleting(Seguimiento $Seguimiento){\n \n }",
"function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }",
"function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }",
"public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }",
"#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/{id}/delete', name: 'materiaux_delete', methods: ['POST'])]\n public function delete(Request $request, $id): RedirectResponse\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->managerRegistry->getManager();\n $entity = $em->getRepository(Materiaux::class)->find($id);\n\n if (null === $entity) {\n throw $this->createNotFoundException('Unable to find Materiaux entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->addFlash('success', 'Le matériaux a bien été supprimé');\n }\n\n return $this->redirectToRoute('materiaux');\n }"
]
| [
"0.79497266",
"0.7891689",
"0.6674915",
"0.662337",
"0.660278",
"0.6595085",
"0.65855104",
"0.65684426",
"0.6567179",
"0.6505929",
"0.6486011",
"0.64351887",
"0.6427628",
"0.6361658",
"0.63563305",
"0.63341814",
"0.6287984",
"0.6270539",
"0.62647367",
"0.62555665",
"0.6245771",
"0.62455094",
"0.62342536",
"0.6222815",
"0.6218636",
"0.62149984",
"0.62149626",
"0.62030095",
"0.62027156",
"0.62026644"
]
| 0.84023994 | 0 |
Test case for making sure that XML_RSS extends from XML_Parser | function testIsXML_Parser() {
$rss = new XML_RSS();
$this->assertTrue(is_a($rss, "XML_Parser"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function html_type_rss()\n {\n }",
"function testBug2310() {\n $rss = new XML_RSS(\"\", null, \"utf-8\");\n $this->assertEquals($rss->tgtenc, \"utf-8\");\n\n $rss = new XML_RSS(\"\", \"utf-8\", \"iso-8859-1\");\n $this->assertEquals($rss->srcenc, \"utf-8\");\n $this->assertEquals($rss->tgtenc, \"iso-8859-1\");\n }",
"function do_feed_rss()\n {\n }",
"function XmlLoader($strXml) {\r\n\t$module = 'rssreader';\r\n\t//set_error_handler( 'HandleXmlError' );\r\n\tset_error_handler( $GLOBALS['modules'][$module]['functions']['HandleXmlError'] );\r\n\t$dom = new DOMDocument( );\r\n\t$dom->loadXml( $strXml );\r\n\trestore_error_handler();\r\n\treturn $dom;\r\n}",
"public function __construct() {\n\n\t\t$this->supportedFeedTypes = array('RSS1', 'RSS2', 'ATOM');\n\t\t$this->type = 'RSS2';\n\t\t\n\t\t$this->db = new DBCex();\n\t\t$this->parser = new Parser();\n\t\t\n\t\t$this->type = $type;\n\t\t$this->feedElements = array();\n\n\t\t//default values for channel\n\t\t$this->addChannelTag('title', $this->type . 'Feed');\n//\t\t$this->addChannelTag('link', 'http://www.buero-hahn.de');\n\n\t\t//Tag elements that we need to CDATA encode\n\t\t$this->feedElements['CDATAEncoded'] = array('description', 'content:encoded', 'summary');\n\t}",
"public function testXmlParser() {\n $xmlElement = new SimpleDOM('<?xml version=\"1.0\"?><test/>');\n $xml = $xmlElement->asXML();\n $this->assertNotFalse($xml);\n }",
"private static function provideRSSContent()\n\t{\n\t\treturn simplexml_load_file(self::RSS_FEED_URL);\n\t}",
"public function testRequestRssUrl()\n {\n $this->testRequestSearchUrl(self::RSS_URL);\n }",
"function CardinalXMLParser() {\n\t\t $this->xml_parser = xml_parser_create();\n\t\t}",
"function _init() {\n\t\t$total = $this->node->childCount;\n\t\t$itemCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\t\n\t\t\tswitch($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}",
"public static function detectType($feed, $specOnly = false)\n {\n if ($feed instanceof Zend_Feed_Reader_FeedInterface) {\n $dom = $feed->getDomDocument();\n } elseif($feed instanceof DOMDocument) {\n $dom = $feed;\n } elseif(is_string($feed) && !empty($feed)) {\n //$oldValue = libxml_disable_entity_loader(true);\n $dom = new DOMDocument;\n try {\n $dom = Zend_Xml_Security::scan($feed, $dom);\n } catch (Zend_Xml_Exception $e) {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\n $e->getMessage()\n );\n }\n //libxml_disable_entity_loader($oldValue);\n if (!$dom) {\n $err = error_get_last();\n $phpErrormsg = isset($err) ? $err['message'] : null;\n if (!isset($phpErrormsg)) {\n if (function_exists('xdebug_is_enabled')) {\n $phpErrormsg = '(error message not available, when XDebug is running)';\n } else {\n $phpErrormsg = '(error message not available)';\n }\n }\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\"DOMDocument cannot parse XML: $phpErrormsg\");\n }\n } else {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('Invalid object/scalar provided: must'\n . ' be of type Zend_Feed_Reader_FeedInterface, DomDocument or string');\n }\n $xpath = new DOMXPath($dom);\n\n if ($xpath->query('/rss')->length) {\n $type = self::TYPE_RSS_ANY;\n $version = $xpath->evaluate('string(/rss/@version)');\n\n if (strlen($version) > 0) {\n switch($version) {\n case '2.0':\n $type = self::TYPE_RSS_20;\n break;\n\n case '0.94':\n $type = self::TYPE_RSS_094;\n break;\n\n case '0.93':\n $type = self::TYPE_RSS_093;\n break;\n\n case '0.92':\n $type = self::TYPE_RSS_092;\n break;\n\n case '0.91':\n $type = self::TYPE_RSS_091;\n break;\n }\n }\n\n return $type;\n }\n\n $xpath->registerNamespace('rdf', self::NAMESPACE_RDF);\n\n if ($xpath->query('/rdf:RDF')->length) {\n $xpath->registerNamespace('rss', self::NAMESPACE_RSS_10);\n\n if ($xpath->query('/rdf:RDF/rss:channel')->length\n || $xpath->query('/rdf:RDF/rss:image')->length\n || $xpath->query('/rdf:RDF/rss:item')->length\n || $xpath->query('/rdf:RDF/rss:textinput')->length\n ) {\n return self::TYPE_RSS_10;\n }\n\n $xpath->registerNamespace('rss', self::NAMESPACE_RSS_090);\n\n if ($xpath->query('/rdf:RDF/rss:channel')->length\n || $xpath->query('/rdf:RDF/rss:image')->length\n || $xpath->query('/rdf:RDF/rss:item')->length\n || $xpath->query('/rdf:RDF/rss:textinput')->length\n ) {\n return self::TYPE_RSS_090;\n }\n }\n\n $type = self::TYPE_ATOM_ANY;\n $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_10);\n\n if ($xpath->query('//atom:feed')->length) {\n return self::TYPE_ATOM_10;\n }\n\n if ($xpath->query('//atom:entry')->length) {\n if ($specOnly == true) {\n return self::TYPE_ATOM_10;\n } else {\n return self::TYPE_ATOM_10_ENTRY;\n }\n }\n\n $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_03);\n\n if ($xpath->query('//atom:feed')->length) {\n return self::TYPE_ATOM_03;\n }\n\n return self::TYPE_ANY;\n }",
"public function __construct($start_article = 0) {\n parent::__construct(self::RSS_URI, $start_article);\n }",
"function customRSS() {\n add_feed('active_plugins', 'createPluginRssFeed');\n}",
"function _init() {\n\t\t$total = $this->node->documentElement->childCount;\n\t\t$itemCounter = 0;\n\t\t$channelCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->documentElement->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t\tswitch ($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\t\t\t\t\t\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CHANNEL:\n\t\t\t\t\t$this->domit_rss_channels[$channelCounter] =& new xml_domit_rss_channel($currNode);\n\t\t\t\t\t$channelCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($channelCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CHANNELS] =& $this->domit_rss_channels;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t\t\n\t\t$this->handleChannelElementsEmbedded();\n\t}",
"function _response_to_rss ($resp) {\n $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING );\n \n // if RSS parsed successfully \n if ( $rss and !$rss->ERROR) {\n \n // find Etag, and Last-Modified\n foreach($resp->headers as $h) {\n // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug \"Undefined offset: 1\"\n if (strpos($h, \": \")) {\n list($field, $val) = explode(\": \", $h, 2);\n }\n else {\n $field = $h;\n $val = \"\";\n }\n \n if ( $field == 'ETag' ) {\n $rss->etag = $val;\n }\n \n if ( $field == 'Last-Modified' ) {\n $rss->last_modified = $val;\n }\n }\n \n return $rss; \n } // else construct error message\n else {\n $errormsg = \"Failed to parse RSS file.\";\n \n if ($rss) {\n $errormsg .= \" (\" . $rss->ERROR . \")\";\n }\n error($errormsg);\n \n return false;\n } // end if ($rss and !$rss->error)\n}",
"function rssreader_lastnews($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&',str_replace('&','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tvar_dump( $valid );\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tsay( $where, $who, $allitems->item( 0 )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\treturn true;\r\n}",
"function wp_widget_rss_process($widget_rss, $check_feed = \\true)\n {\n }",
"public function init() {\n\t RSSFeed::linkToFeed($this->Link() . \"rss\"); \n\t parent::init();\n\t}",
"function rss()\n\t{\n\t\t// Header\n\t\theader(\"Content-Type: application/rss+xml\");\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n\t\t$xml .= \"\\n\".'<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">';\n\t\t$xml .= \"\\n\".'<channel>';\n\t\t$xml .= \"\\n\".'<atom:link href=\"'.SITEURL.'?rss\" rel=\"self\" type=\"application/rss+xml\" />';\n\n\t\t$last_edit = $this->find('page', null, null, 1, SORT_DESC, 'date', true);\n\t\t$last_edit = $this->get('page', $last_edit, 'date');\n\n\t\t// Channel description\n\t\t$xml .= \"\\n\".'<title>' . $this->setting('site_title') . '</title>';\n\t\t$xml .= \"\\n\".'<link>' . SITEURL . '</link>';\n\t\t$xml .= \"\\n\".'<description>' . $this->setting('site_description') . '</description>';\n\t\t$xml .= \"\\n\".'<lastBuildDate>' . date('r', intval($last_edit)) . '</lastBuildDate>';\n\t\t$xml .= \"\\n\".'<language>' . $this->language() . '</language>';\n\n\t\t// Items\n\t\tforeach($this->get('page') as $name => $page) {\n\t\t\t$url = $this->page_url($name);\n\n\t\t\t$content = $this->parse($page['content'], false);\n\t\t\t$content = $this->markup_del($content, false);\n\t\t\t$content = $this->excerpt($content, 300, '...');\n\t\t\t$content = html_entity_decode(strip_tags($content), ENT_QUOTES, 'UTF-8');\n\n\t\t\t$xml .= \"\\n\".'<item>';\n\t\t\t$xml .= \"\\n\\t\".'<title>' . html_entity_decode($this->page_title($name), ENT_QUOTES, 'UTF-8'). '</title>';\n\t\t\t$xml .= \"\\n\\t\".'<link>' . $url . '</link>';\n\t\t\t$xml .= \"\\n\\t\".'<guid>' . $url . '</guid>';\n\t\t\t$xml .= \"\\n\\t\".'<pubDate>' . $page['date'] . '</pubDate>';\n\t\t\t$xml .= \"\\n\\t\".'<description>' . $content . '</description>';\n\t\t\t$xml .= \"\\n\".'</item>';\n\t\t}\n\t\t$xml .= '</channel></rss>';\n\t\treturn $xml;\n\t}",
"private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }",
"private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }",
"function rssreader_last5news($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&',str_replace('&','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tfor($i = 0 ; $i < 5 && $i < $allitems->length ; $i++) {\r\n\t\tsay( $where, $who, $allitems->item( $i )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\t}\r\n\treturn true;\r\n}",
"public function __construct($uri = null, $element = null)\n {\n if (!($element instanceof DOMElement)) {\n if ($element) {\n // Load the feed as an XML DOMDocument object\n $doc = new DOMDocument();\n $doc = @Zend_Xml_Security::scan($element, $doc);\n\n if (!$doc) {\n $err = error_get_last();\n $phpErrormsg = isset($err) ? $err['message'] : null;\n // prevent the class to generate an undefined variable notice (ZF-2590)\n if (!isset($phpErrormsg)) {\n if (function_exists('xdebug_is_enabled')) {\n $phpErrormsg = '(error message not available, when XDebug is running)';\n } else {\n $phpErrormsg = '(error message not available)';\n }\n }\n\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\"DOMDocument cannot parse XML: $phpErrormsg\");\n }\n\n $element = $doc->getElementsByTagName($this->_rootElement)->item(0);\n if (!$element) {\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('No root <' . $this->_rootElement . '> element found, cannot parse feed.');\n }\n } else {\n $doc = new DOMDocument('1.0', 'utf-8');\n if ($this->_rootNamespace !== null) {\n $element = $doc->createElementNS(Zend_Feed::lookupNamespace($this->_rootNamespace), $this->_rootElement);\n } else {\n $element = $doc->createElement($this->_rootElement);\n }\n }\n }\n\n parent::__construct($element);\n }",
"function ting_openformat_feed_set_rss_items($xml,$query) {\n $items = ting_openformat_feed_parse_result($xml);\n $title = $query;\n $description = t('feed_from_bibliotek',array(),array('context'=>'feeds'));\n $url = url(NULL, array('absolute'=>TRUE));\n $link = $url;\n if(empty($items)){\n return NULL;\n }\n return theme('ting_openformat_rss_feed', array('items' => $items, 'title' => $title, 'description' => $description, 'link' => $link));\n}",
"private function newFeedClass()\n\t{\n\t\tif ( $this->feed_type == 'search' ){\n\t\t\ttry {\n\t\t\t\t$this->feed = new $this->feed_class;\t\n\t\t\t} catch ( \\Exception $e ){\n\t\t\t\treturn $this->sendError($e->getMessage());\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$this->feed = ( $this->feed_format == 'unformatted' ) ? new $this->feed_class($this->post_id) : new $this->feed_class('single', $this->post_id);\n\t\t\t} catch ( \\Exception $e ){\n\t\t\t\treturn $this->sendError($e->getMessage());\n\t\t\t}\n\t\t}\n\t}",
"private function initRss()\n\t{\n\t\t$config = Cms::GetInstance() -> GetConfiguration();\n\t\t$user = Cms::GetInstance() -> GetUser() -> GetProperties();\n\t\t$rssfile = new RSSBuilder(\t$config -> Get('newsfeed/encoding'), \n\t\t\t\t\t\t\t\t\t$this -> head_link, \n\t\t\t\t\t\t\t\t\t$this -> head_titel, \n\t\t\t\t\t\t\t\t\t$this -> head_description, \n\t\t\t\t\t\t\t\t\t$this -> head_image,\n\t\t\t\t\t\t\t\t\t'', \n\t\t\t\t\t\t\t\t\tfalse);\n\t\n\t\t$data = null;\n\t\ttry \n\t\t{\n\t\t\t$data = SqlManager::GetInstance() -> Select('modnews', array('name', 'text', 'id', 'time'), 'newsfeed=\\'1\\'');\n\t\t}\n\t\tcatch (SqlManagerException $ex)\n\t\t{\n\t\t\tthrow new CMSException('SQL-Abfrage der Newsfeed-Items fehlgeschlagen', CMSException::T_MODULEERROR, $ex );\n\t\t}\n\t\t\n\t\t$c = count($data);\n\t\tfor($i=0; $i<$c; $i++)\n\t\t{\n\t\t\t$rssfile -> addRSSItem(\t$this -> head_titel, \n\t\t\t\t\t\t\t\t\t$data[$i]['name'], \n\t\t\t\t\t\t\t\t\t$this->GetLink($data['id']), \n\t\t\t\t\t\t\t\t\t$data[$i]['text'], \n\t\t\t\t\t\t\t\t\t$data[$i]['name'], \n\t\t\t\t\t\t\t\t\t$data[$i]['time'], \n\t\t\t\t\t\t\t\t\t$user['name'], \n\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\tmd5($data[$i]['id']));\t\n\t\t}\n\n\t\tif($this -> rss091)\n\t\t{\n\t\t\t$rssfile->saveRSS('0.91', $this -> enddir . $this -> prefix . '091.xml');\n\t\t}\n\t\tif($this -> rss10)\n\t\t{\n\t\t\t$rssfile->saveRSS('1.0', $this -> enddir . $this -> prefix . '1.xml');\n\t\t}\n\t\tif($this -> rss20)\n\t\t{\n\t\t\t$rssfile->saveRSS('2.0', $this -> enddir . $this -> prefix . '2.xml');\n\t\t}\n\t}",
"public function testXmlUri()\n {\n $dom = Dom::createFromUri('http://localhost:1349/books.xml');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n }",
"public function isXml() {}",
"function create_rss(){\r\n global $sql;\r\n \t\t\t\t\t\t\tglobal $aj;\r\n\t\t\t\t\t\t\t\tif(!is_object($aj)) $aj = new textparse;\r\n setlocale (LC_TIME, CORE_LC);\r\n $pubdate = strftime(\"%a, %d %b %Y %I:%M:00 GMT\", time());\r\n $sitebutton = (strstr(SITEBUTTON, \"http:\") ? SITEBUTTON : SITEURL.str_replace(\"../\", \"\", e_IMAGE).SITEBUTTON);\r\n $sitedisclaimer = ereg_replace(\"<br />|\\n\", \"\", SITEDISCLAIMER);\r\n\r\n $rss = \"<?xml version=\\\"1.0\\\" encoding=\\\"\".CHARSET.\"\\\"?>\r\n<rss version=\\\"2.0\\\">\r\n<channel>\r\n <title>\".$this->make_xml_compatible(SITENAME).\"</title>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"index.php</link>\r\n <description>\".$this->make_xml_compatible(SITEDESCRIPTION).\"</description>\r\n <language>\".CORE_LC.\"-\".CORE_LC2.\"</language>\r\n <copyright>\".$this->make_xml_compatible($sitedisclaimer).\"</copyright>\r\n <managingEditor>\".$this->make_xml_compatible(SITEADMIN).\" - \".SITEADMINEMAIL.\"</managingEditor>\r\n <webMaster>\".SITEADMINEMAIL.\"</webMaster>\r\n <pubDate>$pubdate</pubDate>\r\n <lastBuildDate>$pubdate</lastBuildDate>\r\n <docs>http://backend.userland.com/rss</docs>\r\n <generator>e107 website system (http://e107.org)</generator>\r\n <ttl>60</ttl>\r\n\r\n <image>\r\n <title>\".$this->make_xml_compatible(SITENAME).\"</title>\r\n <url>\".$sitebutton.\"</url>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"index.php</link>\r\n <width>88</width>\r\n <height>31</height>\r\n <description>\".$this->make_xml_compatible(SITETAG).\"</description>\r\n </image>\r\n\r\n <textInput>\r\n <title>Search</title>\r\n <description>Search \".$this->make_xml_compatible(SITENAME).\"</description>\r\n <name>query</name>\r\n <link>\".SITEURL.(substr(SITEURL, -1) == \"/\" ? \"\" : \"/\").\"search.php</link>\r\n </textInput>\r\n \";\r\n\r\n $sql2 = new db;\r\n\r\n $sql -> db_Select(\"news\", \"*\", \"news_class=0 AND (news_start=0 || news_start < \".time().\") AND (news_end=0 || news_end>\".time().\") ORDER BY news_datestamp DESC LIMIT 0, 10\");\r\n while($row = $sql -> db_Fetch()){\r\n extract($row);\r\n $sql2 -> db_Select(\"news_category\", \"*\", \"category_id='$news_category' \");\r\n $row = $sql2 -> db_Fetch(); extract($row);\r\n $sql2 -> db_Select(\"user\", \"user_name, user_email\", \"user_id=$news_author\");\r\n $row = $sql2 -> db_Fetch(); extract($row);\r\n $tmp = explode(\" \", $news_body);\r\n unset($nb);\r\n for($a=0; $a<=100; $a++){\r\n $nb .= $tmp[$a].\" \";\r\n }\r\n if($tmp[($a-2)]){ $nb .= \" [more ...]\"; }\r\n //$nb = $this->make_xml_compatible($nb);\r\n // Code from Lisa\r\n //$search = array();\r\n //$replace = array();\r\n //$search[0] = \"/\\<a href=\\\"(.*?)\\\">(.*?)<\\/a>/si\";\r\n //$replace[0] = '\\\\2';\r\n //$search[1] = \"/\\<a href='(.*?)'>(.*?)<\\/a>/si\";\r\n //$replace[1] = '\\\\2';\r\n //$search[2] = \"/\\<a href='(.*?)'>(.*?)<\\/a>/si\";\r\n //$replace[2] = '\\\\2';\r\n //$search[3] = \"/\\<a href="(.*?)">(.*?)<\\/a>/si\";\r\n //$replace[3] = '\\\\2';\r\n //$news_title = preg_replace($search, $replace, $news_title);\r\n // End of code from Lisa\r\n $wlog .= strip_tags($aj -> tpa($news_title)).\"\\n\".SITEURL.\"comment.php?comment.news.\".$news_id.\"\\n\\n\";\r\n $itemdate = strftime(\"%a, %d %b %Y %I:%M:00 GMT\", $news_datestamp);\r\n\r\n $rss .= \"<item>\r\n <title>\".$this->make_xml_compatible(strip_tags($aj -> tpa($news_title))).\"</title>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</link>\r\n <description>\".$this->make_xml_compatible($nb).\"</description>\r\n <category domain=\\\"\".SITEURL.\"\\\">$category_name</category>\r\n <comments>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</comments>\r\n <author>\".$this->make_xml_compatible($user_name).\" - $user_email</author>\r\n <pubDate>$itemdate</pubDate>\r\n <guid isPermaLink=\\\"true\\\">http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</guid>\r\n </item>\r\n \";\r\n\r\n }\r\n\r\n\r\n $rss .= \"</channel>\r\n</rss>\";\r\n $rss = str_replace(\" \", \" \", $rss);\r\n $fp = fopen(e_FILE.\"backend/news.xml\",\"w\");\r\n @fwrite($fp, $rss);\r\n fclose($fp);\r\n $fp = fopen(e_FILE.\"backend/news.txt\",\"w\");\r\n @fwrite($fp, $wlog);\r\n fclose($fp);\r\n if(!fwrite){\r\n $text = \"<div style='text-align:center'>\".LAN_19.\"</div>\";\r\n $ns -> tablerender(\"<div style='text-align:center'>\".LAN_20.\"</div>\", $text);\r\n }\r\n}",
"function parseRSS($string)\n{\n //PARSE RSS FEED\n $parser = xml_parser_create();\n xml_parse_into_struct($parser, $string, $valueals, $index);\n xml_parser_free($parser);\n\n #return $valueals;\n\n //CONSTRUCT ARRAY\n foreach($valueals as $keyey => $valueal)\n {\n if($valueal['type'] != 'cdata')\n {\n $item[$keyey] = $valueal;\n }\n }\n\n $i = 0;\n\n foreach($item as $key => $value)\n {\n if($value['type'] == 'open')\n {\n $i++;\n $itemame[$i] = strtolower($value['tag']);\n\n }\n elseif($value['type'] == 'close')\n {\n $feed = $values[$i];\n $item = $itemame[$i];\n $i--;\n\n if(count($values[$i])>1)\n {\n $values[$i][$item][] = $feed;\n }\n else\n {\n $values[$i][$item] = $feed;\n }\n\n }\n else\n {\n $values[$i][strtolower($value['tag'])] = $value['value'];\n }\n }\n\n //RETURN ARRAY VALUES\n return $values[0];\n}"
]
| [
"0.6420601",
"0.6220844",
"0.61872935",
"0.61256105",
"0.6060497",
"0.6049352",
"0.6001759",
"0.5883809",
"0.5866639",
"0.58597237",
"0.5825549",
"0.5824453",
"0.581698",
"0.5805962",
"0.57808346",
"0.5771245",
"0.5729607",
"0.5678873",
"0.5668966",
"0.56379014",
"0.56379014",
"0.5625264",
"0.56157124",
"0.5591653",
"0.5584056",
"0.55798393",
"0.55240583",
"0.5522678",
"0.5521757",
"0.55140126"
]
| 0.79881847 | 0 |
Default component settings. Supported types: subscribe, newsletter Supported themes: light, medium, dark | public function default_settings() : array {
return [
'layout' => 'block',
'newsletter' => '',
'theme' => 'light',
'type' => 'subscribe',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setChannelTemplates(){\n if ($this->channel == self::$WTSORDER_SOURCE_SITE_MOBILE){\n $this->defaultStepTemplates = $this->mobileDefaultStepTemplates;\n } elseif($this->customerIsPro()){\n $this->defaultStepTemplates = $this->proDefaultStepTemplates;\n } \n }",
"function simplenews_admin_settings_newsletter($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_default_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Default newsletter options'),\n '#collapsible' => FALSE,\n '#description' => t('These options will be the defaults for new newsletters, but can be overridden in the newsletter editing form.'),\n );\n $links = array('!mime_mail_url' => 'http://drupal.org/project/mimemail', '!html_url' => 'http://drupal.org/project/htmlmail');\n $description = t('Default newsletter format. Install <a href=\"!mime_mail_url\">Mime Mail</a> module or <a href=\"!html_url\">HTML Mail</a> module to send newsletters in HTML format.', $links);\n $form['simplenews_default_options']['simplenews_format'] = array(\n '#type' => 'select',\n '#title' => t('Format'),\n '#options' => simplenews_format_options(),\n '#description' => $description,\n '#default_value' => variable_get('simplenews_format', 'plain'),\n );\n // @todo Do we need these master defaults for 'priority' and 'receipt'?\n $form['simplenews_default_options']['simplenews_priority'] = array(\n '#type' => 'select',\n '#title' => t('Priority'),\n '#options' => simplenews_get_priority(),\n '#description' => t('Note that email priority is ignored by a lot of email programs.'),\n '#default_value' => variable_get('simplenews_priority', SIMPLENEWS_PRIORITY_NONE),\n );\n $form['simplenews_default_options']['simplenews_receipt'] = array(\n '#type' => 'checkbox',\n '#title' => t('Request receipt'),\n '#default_value' => variable_get('simplenews_receipt', 0),\n '#description' => t('Request a Read Receipt from your newsletters. A lot of email programs ignore these so it is not a definitive indication of how many people have read your newsletter.'),\n );\n $form['simplenews_default_options']['simplenews_send'] = array(\n '#type' => 'radios',\n '#title' => t('Default send action'),\n '#options' => array(\n SIMPLENEWS_COMMAND_SEND_TEST => t('Send one test newsletter to the test address'),\n SIMPLENEWS_COMMAND_SEND_NOW => t('Send newsletter'),\n ),\n '#default_value' => variable_get('simplenews_send', 0),\n );\n $form['simplenews_test_address'] = array(\n '#type' => 'fieldset',\n '#title' => t('Test addresses'),\n '#collapsible' => FALSE,\n '#description' => t('Supply a comma-separated list of email addresses to be used as test addresses. The override function allows to override these addresses in the newsletter editing form.'),\n );\n $form['simplenews_test_address']['simplenews_test_address'] = array(\n '#type' => 'textfield',\n '#title' => t('Email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_test_address', $address_default),\n );\n $form['simplenews_test_address']['simplenews_test_address_override'] = array(\n '#type' => 'checkbox',\n '#title' => t('Allow test address override'),\n '#default_value' => variable_get('simplenews_test_address_override', 0),\n );\n $form['simplenews_sender_info'] = array(\n '#type' => 'fieldset',\n '#title' => t('Sender information'),\n '#collapsible' => FALSE,\n '#description' => t('Default sender address that will only be used for confirmation emails. You can specify sender information for each newsletter separately on the newsletter\\'s settings page.'),\n );\n $form['simplenews_sender_info']['simplenews_from_name'] = array(\n '#type' => 'textfield',\n '#title' => t('From name'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_from_name', variable_get('site_name', 'Drupal')),\n );\n $form['simplenews_sender_info']['simplenews_from_address'] = array(\n '#type' => 'textfield',\n '#title' => t('From email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => variable_get('simplenews_from_address', $address_default),\n );\n\n return system_settings_form($form);\n}",
"function createWidgetConfig() {\n // Add the emotion Komponent\n $component = $this->createEmotionComponent(\n array(\n 'name' => 'Social Media Widget',\n 'template' => 'emotion_socialmedia',\n 'description' => 'Bindet Socialmedia Buttons als Widget in den Einkaufswelten ein. Die URLs werden in der Pluginkonfiguration hinterlegt (Pluginmanager)'\n )\n );\n $component->createCheckboxField(\n array(\n 'name' => 'additional_styles',\n 'fieldLabel' => 'Border Box',\n 'supportText' => 'Zusätzliche Styles hinzufügen?',\n 'helpTitle' => 'Border Box',\n 'helpText' => 'Hier können sie dem widget einen optischen Rand verpassen um es optisch an das SW5 Responsive Theme anzupassen',\n 'defaultValue' => true\n ) \n );\n $component->createCheckboxField(\n array(\n 'name' => 'icons_round',\n 'fieldLabel' => 'Runde Icons',\n 'supportText' => 'Icons rund oder Eckig?',\n 'helpTitle' => 'Runde Icons',\n 'helpText' => 'Hier legen sie die Form der Socialmedia Icons fest: Rund oder Eckig',\n 'defaultValue' => true\n ) \n );\n // Facebook\n $component->createCheckboxField(\n array(\n 'name' => 'facebook_active',\n 'fieldLabel' => 'Facebook',\n 'supportText' => 'Facebook Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Google Plus\n $component->createCheckboxField(\n array(\n 'name' => 'google_active',\n 'fieldLabel' => 'GooglePlus',\n 'supportText' => 'GooglePlus Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Twitter\n $component->createCheckboxField(\n array(\n 'name' => 'twitter_active',\n 'fieldLabel' => 'Twitter',\n 'supportText' => 'Twitter Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Youtube\n $component->createCheckboxField(\n array(\n 'name' => 'youtube_active',\n 'fieldLabel' => 'YouTube',\n 'supportText' => 'YouTube Button anzeigen',\n 'defaultValue' => false\n )\n );\n }",
"function _bellcom_collect_theme_settings() {\n $settings = array();\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social links\n $settings['social_links']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social_links']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social_links']['facebook']['tooltip'] = t(theme_get_setting('facebook_tooltip'));\n $settings['social_links']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social_links']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social_links']['twitter']['tooltip'] = t(theme_get_setting('twitter_tooltip'));\n $settings['social_links']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social_links']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social_links']['googleplus']['tooltip'] = t(theme_get_setting('googleplus_tooltip'));\n $settings['social_links']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social_links']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social_links']['instagram']['tooltip'] = t(theme_get_setting('instagram_tooltip'));\n $settings['social_links']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social_links']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social_links']['linkedin']['tooltip'] = t(theme_get_setting('linkedin_tooltip'));\n $settings['social_links']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social_links']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social_links']['pinterest']['tooltip'] = t(theme_get_setting('pinterest_tooltip'));\n $settings['social_links']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social_links']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social_links']['vimeo']['tooltip'] = t(theme_get_setting('vimeo_tooltip'));\n $settings['social_links']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social_links']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social_links']['youtube']['tooltip'] = t(theme_get_setting('youtube_tooltip'));\n\n // Layout\n $settings['layout']['copyright'] = ($settings['contact_information']['business_startup_year'] < date('Y') AND $settings['contact_information']['business_startup_year'] !== NULL) ? $settings['contact_information']['business_startup_year'] . '-' . date('Y') : date('Y');\n $settings['layout']['footer']['show_social_links'] = theme_get_setting('footer_show_social_links');\n $settings['layout']['sidebar']['show_social_links'] = theme_get_setting('sidebar_show_social_links');\n\n return $settings;\n}",
"function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'News Ticker', 'publisher' ),\n\t\t\t\"id\" => $this->id,\n\t\t\t\"weight\" => 10,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/better-newsticker.png',\n\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t) );\n\t}",
"function defaultOptions() {\n $defaults = array(\n 'version' => WPXSMARTSHOP_VERSION,\n\n 'settings' => array(\n\n 'general' => array(\n 'shop_open' => 'n',\n 'shop_name' => '',\n 'shop_logo' => '',\n 'shop_address' => '',\n 'shop_country' => '',\n 'shop_email' => '',\n 'shop_info' => '',\n\n 'measures_weight' => 'gr',\n 'measures_size' => 'mm',\n 'measures_volume' => 'm'\n ),\n\n 'wp_integration' => array(\n 'checkout_permalink' => __( 'checkout', WPXSMARTSHOP_TEXTDOMAIN ),\n 'payment_permalink' => __( 'payment', WPXSMARTSHOP_TEXTDOMAIN ),\n 'receipt_permalink' => __( 'receipt', WPXSMARTSHOP_TEXTDOMAIN ),\n 'error_permalink' => __( 'error', WPXSMARTSHOP_TEXTDOMAIN ),\n\n\n 'store_permalink' => '',\n\n 'shopping_cart_display_for_user_logon_only' => 'y',\n 'shopping_cart_display_empty_button' => 'y',\n\n 'product_picker_post_types' => null,\n 'product_picker_hide_empty_product_type' => 'n',\n 'product_picker_number_of_items' => 10\n ),\n\n 'products' => array(\n 'tab-price' => 'y',\n // every visible\n 'tab-appearance' => 'y',\n 'tab-purchasable' => 'y',\n 'tab-shipping' => 'y',\n 'tab-warehouse' => 'y',\n 'tab-membership' => 'y',\n 'tab-coupons' => 'y',\n 'tab-digital' => 'y',\n 'price_includes_vat' => 'y',\n 'price_display_with_vat' => 'y',\n 'price_display_vat_information' => 'y',\n 'price_display_currency_simbol' => 'y',\n ),\n\n 'orders' => array(\n 'count_pending' => 'n',\n 'defunct_status' => WPXSMARTSHOP_ORDER_STATUS_DEFUNCT,\n 'defunct_status_after' => 1,\n 'defunct_status_after_type' => 'months'\n ),\n\n 'shipments' => array( 'default_carrier' => '', ),\n\n 'payment_gateways' => array(\n 'list_enabled' => WPSmartShopPaymentGateway::listPaymentGateways(),\n 'display_mode' => 'combo-menu'\n ),\n\n 'showcase' => array(\n 'theme_page' => 'page',\n // page | single | custom\n 'theme_header' => 'y',\n 'theme_footer' => 'y',\n 'theme_sidebar' => 'n',\n 'theme_sidebar_id' => '',\n 'theme_markup_header' => base64_encode( WPSmartShopShowcase::markupHeader() ),\n 'theme_markup_footer' => base64_encode( WPSmartShopShowcase::markupFooter() )\n ),\n\n 'product_card' => array(\n 'thumbnail' => 'y',\n 'thumbnail_size' => kWPSmartShopThumbnailSizeMediumKey,\n 'permalink' => 'y',\n 'display_permalink_button' => 'y',\n 'price' => 'y',\n 'excerpt' => 'n',\n 'display_add_to_cart' => 'n',\n 'product_types' => 'y',\n 'product_types_tree' => 'y',\n ),\n\n ),\n );\n return $defaults;\n }",
"function set_theme($params)\n\t{\n\n\t\t(object) $theme = array_to_object($params);\n\n \t/**\n \t * ----------------------------------------------------------------------\n\t\t * The YoteyoteUI Main Configuration data array.\n\t\t * ----------------------------------------------------------------------\n\t\t */\n/*\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => 'Yoteyote',\n\t\t\t 'version' => '1.0',\n\t\t\t 'author' => 'Yoteyote',\n\t\t\t 'title' => 'YoteyoteUI - Premium Web App and Admin Template',\n\t\t\t 'description' => 'YoteyoteUI is a Premium Web App and Admin Template',\n\t\t\t\t'keywords' => 'Yoteyote',\n\n\t\t\t // '' empty to remove full width from the page (< 992px: 100%, > 992px: 95%, 1440px max width)\n\t\t\t // 'full-width' for a full width page (100%, 1920px max width)\n\t\t\t 'page' => 'full-width',\n\n\t\t\t // 'navbar-default' for a light header\n\t\t\t // 'navbar-inverse' for a dark header\n\t\t\t 'header_navbar' => 'navbar-default',\n\n\t\t\t // 'navbar-fixed-top' for a top fixed header\n\t\t\t // 'navbar-fixed-bottom' for a bottom fixed header\n\t\t\t 'header' => 'navbar-fixed-top',\n\n\t\t\t // '' left sidebar will open only from the top left toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of left sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_left' => 'enable-hover',\n\n\t\t\t // '' right sidebar will open only from the top right toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of right sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_right' => '',\n\n\t\t\t // '' empty for default behavior\n\t\t\t // 'sidebar-left-pinned' for a left pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-right-pinned' for a right pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-left-pinned sidebar-right-pinned' for both sidebars pinned (always visible > 1200px)\n\t\t\t 'navigation' => '',\n\n\t\t\t // All effects apply in resolutions larger than 1200px width\n\t\t\t // 'fx-none' remove all effects from main content when one of the sidebars are open (better website performance)\n\t\t\t // 'fx-opacity' opacity effect\n\t\t\t // 'fx-move' move effect\n\t\t\t // 'fx-push' push effect\n\t\t\t // 'fx-rotate' rotate effect\n\t\t\t // 'fx-push-move' push-move effect\n\t\t\t // 'fx-push-rotate' push-rotate effect\n\t\t\t 'content_fx' => 'fx-opacity',\n\n\t\t\t // Available themes: 'river', 'amethyst' , 'dragon', 'emerald', 'grass' or '' leave empty for the default fresh orange\n\t\t\t 'theme' => 'dragon',\n\t\t\t //'theme' => $this->input->cookie('theme_cookie', TRUE),\n\n\t\t\t //'active_page' => basename($_SERVER['PHP_SELF']),\n\t\t\t 'active_page' => current_url($page), // To get the CI current page.\n\t\t\t),\n\t\t);\n*/\n\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => $theme->name,\n\t\t\t 'version' => $theme->version,\n\t\t\t 'author' => $theme->author,\n\t\t\t 'title' => $theme->title,\n\t\t\t 'description' => $theme->description,\n\t\t\t\t'keywords' => $theme->keywords,\n\t\t\t 'page' => $theme->page,\n\t\t\t 'header_navbar' => $theme->header_navbar,\n\t\t\t 'header' => $theme->header,\n\t\t\t 'sidebar_left' => $theme->sidebar_left,\n\t\t\t 'sidebar_right' => $theme->sidebar_right,\n\t\t\t 'navigation' => $theme->navigation,\n\t\t\t 'content_fx' => $theme->content_fx,\n\t\t\t 'theme' => $theme->theme,\n\t\t\t 'active_page' => $theme->active_page,\n\t\t\t),\n\t\t);\n\n\t\treturn $data;\n\t}",
"function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}",
"public function testAdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigur()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/Adaptive Form and Interactive Communication Web Channel Theme Configuration';\n\n $crawler = $client->request('POST', $path);\n }",
"function load_defaults(){\n\t\t\n\t\t$this->choices = array(\n\t\t\t'yes' => __('Enable', 'wa_wcc_txt'),\n\t\t\t'no' => __('Disable', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->loading_places = array(\n\t\t\t'header' => __('Header', 'wa_wcc_txt'),\n\t\t\t'footer' => __('Footer', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->tabs = array(\n\t\t\t'general-settings' => array(\n\t\t\t\t'name' => __('General', 'wa_wcc_txt'),\n\t\t\t\t'key' => 'wa_wcc_settings',\n\t\t\t\t'submit' => 'save_wa_wcc_settings',\n\t\t\t\t'reset' => 'reset_wa_wcc_settings',\n\t\t\t),\n 'configuration' => array(\n 'name' => __('Advanced', 'wa_wcc_txt'),\n 'key' => 'wa_wcc_configuration',\n 'submit' => 'save_wa_wcc_configuration',\n 'reset' => 'reset_wa_wcc_configuration'\n )\n\t\t);\n\t}",
"public function set_defaults() {\n\n\t\t// Retrieve the stylesheet option to set the proper defaults\n\t\t$style_option = tribe_get_option( 'stylesheetOption', 'tribe' );\n\n\t\tswitch ( $style_option ) {\n\t\t\tcase 'full': // Full styles\n\t\t\t\t$this->defaults = array(\n\t\t\t\t\t'table_bg_color' => '#fff',\n\t\t\t\t\t'highlight_color' => '#666',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'skeleton': // Skeleton styles\n\t\t\tdefault: // tribe styles is the default so add full and theme (tribe)\n\t\t\t\t$this->defaults = array(\n\t\t\t\t\t'table_bg_color' => '#f9f9f9',\n\t\t\t\t\t'highlight_color' => '#21759b',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }",
"function blueauthentic_theme_settings() {\n\tadd_settings_section(\n\t\t'social_section',\n\t\t'Social Media Account Links/URLs',\n\t\t'blueauthentic_social_section_description',\n\t\t'theme-options-section-social'\n\t);\n\n\tadd_option( 'social_facebook_option', 1 );\n\tadd_settings_field(\n\t\t'social_facebook_option',\n\t\t'Facebook Account',\n\t\t'social_facebook_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_facebook_option' );\n\n\tadd_option( 'social_twitter_option', 2 );\n\tadd_settings_field(\n\t\t'social_twitter_option',\n\t\t'Twitter Account',\n\t\t'social_twitter_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_twitter_option' );\n\n\tadd_option( 'social_youtube_option', 3 );\n\tadd_settings_field(\n\t\t'social_youtube_option',\n\t\t'Youtube Account',\n\t\t'social_youtube_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_youtube_option' );\n}",
"function bb_mystique_default_settings() {\r\n\t$defaults = array(\r\n\t\t'twitter_id' => '_GautamGupta_', // your twitter id\r\n\t\t'twitter_count' => '5', // number of tweets to display\r\n\t\t'background' => '', // background image url\r\n\t\t'background_color' => '000000', // background color\r\n\t\t'color_scheme' => 'green', // green or red or blue or grey\r\n\t\t'page_width' => 'fixed', // fixed or fluid\r\n\t\t'font_style' => 0, // check the codes in bb_mystique_font_styles function\r\n\t\t'logo' => '', // logo url\r\n\t\t'logo_size' => '', //eg 500x200 where 500 = width, 200 = height\r\n\t\t'user_css' => '', // custom css\r\n\t\t/* Don't change anything below this, for now */\r\n\t\t'theme_version' => BB_MYSTIQUE_THEME_VERSION,\r\n\t\t'jquery' => 1\r\n\t\t);\r\n\r\n\t$defaults = apply_filters( 'bb_mystique_default_settings', $defaults ); // check for new default setting entries from extensions\r\n\treturn $defaults;\r\n}",
"public function setDefaultDesignTheme();",
"function julia_kaya_customizer_settings() \r\n\t{\r\n\t\tadd_theme_page( esc_html__('Customizer Import','julia'), esc_html__('Customizer Import','julia'), 'edit_theme_options', 'import', array( $this,'julia_kaya_customize_import_option_page'));\r\n add_theme_page( esc_html__('Customizer Export','julia'), esc_html__('Customizer Export','julia'), 'edit_theme_options', 'export', array( $this,'julia_kaya_customize_export_option_page'));\r\n }",
"public static function getDefaultWidgetSettings(){\n return array(\n 'ChatBox' => array(\n 'chatboxHeight' => 300,\n 'chatmessageHeight' => 50,\n ),\n 'NoteBox' => array(\n 'noteboxHeight' => 200,\n 'notemessageHeight' => 50,\n ),\n 'DocViewer' => array(\n 'docboxHeight' => 200,\n ),\n 'TopSites' => array(\n 'topsitesHeight' => 200,\n 'urltitleHeight' => 10,\n ),\n 'MediaBox' => array(\n 'mediaBoxHeight' => 150,\n 'hideUsers' => array(),\n ),\n 'TimeZone' => array(\n 'clockType' => 'analog'\n ),\n 'SmallCalendar' => array(\n 'justMe' => 'false'\n ),\n 'FilterControls' => array(\n 'order' => array()\n )\n );\n }",
"protected function admin_fields_settings() {\n\n $settings_fields = array(\n\n 'wcsales_general_tabs' => array(),\n \n 'wcsales_settings_tabs' => array(\n\n array(\n 'name' => 'enableresalenotification',\n 'label' => __( 'Enable / Disable Sale Notification', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Enable', 'wc-sales-notification-pro' ),\n 'type' => 'checkbox',\n 'default' => 'off',\n 'class'=>'woolentor_table_row',\n ),\n\n array(\n 'name' => 'notification_content_type',\n 'label' => __( 'Notification Content Type', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Select Content Type', 'wc-sales-notification-pro' ),\n 'type' => 'radio',\n 'default' => 'actual',\n 'options' => array(\n 'actual' => __('Real','wc-sales-notification-pro'),\n 'fakes' => __('Fakes','wc-sales-notification-pro'),\n )\n ),\n\n array(\n 'name' => 'notification_pos',\n 'label' => __( 'Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Sale Notification Position on frontend.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'bottomleft',\n 'options' => array(\n 'topleft' =>__( 'Top Left','wc-sales-notification-pro' ),\n 'topright' =>__( 'Top Right','wc-sales-notification-pro' ),\n 'bottomleft' =>__( 'Bottom Left','wc-sales-notification-pro' ),\n 'bottomright' =>__( 'Bottom Right','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_layout',\n 'label' => __( 'Image Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Layout.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'imageleft',\n 'options' => array(\n 'imageleft' =>__( 'Image Left','wc-sales-notification-pro' ),\n 'imageright' =>__( 'Image Right','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real'\n ),\n\n array(\n 'name' => 'notification_loadduration',\n 'label' => __( 'Loading Time', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Loading duration.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '3',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '3' =>__( '3 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_time_int',\n 'label' => __( 'Time Interval', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Time between notifications.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '4',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_limit',\n 'label' => __( 'Limit', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Order Limit for notification.', 'wc-sales-notification-pro' ),\n 'min' => 1,\n 'max' => 100,\n 'default' => '5',\n 'step' => '1',\n 'type' => 'number',\n 'sanitize_callback' => 'number',\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_uptodate',\n 'label' => __( 'Order Upto', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Do not show purchases older than.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '7',\n 'options' => array(\n '1' =>__( '1 day','wc-sales-notification-pro' ),\n '2' =>__( '2 days','wc-sales-notification-pro' ),\n '3' =>__( '3 days','wc-sales-notification-pro' ),\n '4' =>__( '4 days','wc-sales-notification-pro' ),\n '5' =>__( '5 days','wc-sales-notification-pro' ),\n '6' =>__( '6 days','wc-sales-notification-pro' ),\n '7' =>__( '1 week','wc-sales-notification-pro' ),\n '10' =>__( '10 days','wc-sales-notification-pro' ),\n '14' =>__( '2 weeks','wc-sales-notification-pro' ),\n '21' =>__( '3 weeks','wc-sales-notification-pro' ),\n '28' =>__( '4 weeks','wc-sales-notification-pro' ),\n '35' =>__( '5 weeks','wc-sales-notification-pro' ),\n '42' =>__( '6 weeks','wc-sales-notification-pro' ),\n '49' =>__( '7 weeks','wc-sales-notification-pro' ),\n '56' =>__( '8 weeks','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_inanimation',\n 'label' => __( 'Animation In', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Enter Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeInLeft',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceIn' =>__( 'bounceIn','wc-sales-notification-pro' ),\n 'bounceInDown' =>__( 'bounceInDown','wc-sales-notification-pro' ),\n 'bounceInLeft' =>__( 'bounceInLeft','wc-sales-notification-pro' ),\n 'bounceInRight' =>__( 'bounceInRight','wc-sales-notification-pro' ),\n 'bounceInUp' =>__( 'bounceInUp','wc-sales-notification-pro' ),\n 'fadeIn' =>__( 'fadeIn','wc-sales-notification-pro' ),\n 'fadeInDown' =>__( 'fadeInDown','wc-sales-notification-pro' ),\n 'fadeInDownBig' =>__( 'fadeInDownBig','wc-sales-notification-pro' ),\n 'fadeInLeft' =>__( 'fadeInLeft','wc-sales-notification-pro' ),\n 'fadeInLeftBig' =>__( 'fadeInLeftBig','wc-sales-notification-pro' ),\n 'fadeInRight' =>__( 'fadeInRight','wc-sales-notification-pro' ),\n 'fadeInRightBig' =>__( 'fadeInRightBig','wc-sales-notification-pro' ),\n 'fadeInUp' =>__( 'fadeInUp','wc-sales-notification-pro' ),\n 'fadeInUpBig' =>__( 'fadeInUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipInX' =>__( 'flipInX','wc-sales-notification-pro' ),\n 'flipInY' =>__( 'flipInY','wc-sales-notification-pro' ),\n 'lightSpeedIn' =>__( 'lightSpeedIn','wc-sales-notification-pro' ),\n 'rotateIn' =>__( 'rotateIn','wc-sales-notification-pro' ),\n 'rotateInDownLeft' =>__( 'rotateInDownLeft','wc-sales-notification-pro' ),\n 'rotateInDownRight' =>__( 'rotateInDownRight','wc-sales-notification-pro' ),\n 'rotateInUpLeft' =>__( 'rotateInUpLeft','wc-sales-notification-pro' ),\n 'rotateInUpRight' =>__( 'rotateInUpRight','wc-sales-notification-pro' ),\n 'slideInUp' =>__( 'slideInUp','wc-sales-notification-pro' ),\n 'slideInDown' =>__( 'slideInDown','wc-sales-notification-pro' ),\n 'slideInLeft' =>__( 'slideInLeft','wc-sales-notification-pro' ),\n 'slideInRight' =>__( 'slideInRight','wc-sales-notification-pro' ),\n 'zoomIn' =>__( 'zoomIn','wc-sales-notification-pro' ),\n 'zoomInDown' =>__( 'zoomInDown','wc-sales-notification-pro' ),\n 'zoomInLeft' =>__( 'zoomInLeft','wc-sales-notification-pro' ),\n 'zoomInRight' =>__( 'zoomInRight','wc-sales-notification-pro' ),\n 'zoomInUp' =>__( 'zoomInUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n 'jackInTheBox' =>__( 'jackInTheBox','wc-sales-notification-pro' ),\n 'rollIn' =>__( 'rollIn','wc-sales-notification-pro' ),\n 'rollOut' =>__( 'rollOut','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_outanimation',\n 'label' => __( 'Animation Out', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Out Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeOutRight',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceOut' =>__( 'bounceOut','wc-sales-notification-pro' ),\n 'bounceOutDown' =>__( 'bounceOutDown','wc-sales-notification-pro' ),\n 'bounceOutLeft' =>__( 'bounceOutLeft','wc-sales-notification-pro' ),\n 'bounceOutRight' =>__( 'bounceOutRight','wc-sales-notification-pro' ),\n 'bounceOutUp' =>__( 'bounceOutUp','wc-sales-notification-pro' ),\n 'fadeOut' =>__( 'fadeOut','wc-sales-notification-pro' ),\n 'fadeOutDown' =>__( 'fadeOutDown','wc-sales-notification-pro' ),\n 'fadeOutDownBig' =>__( 'fadeOutDownBig','wc-sales-notification-pro' ),\n 'fadeOutLeft' =>__( 'fadeOutLeft','wc-sales-notification-pro' ),\n 'fadeOutLeftBig' =>__( 'fadeOutLeftBig','wc-sales-notification-pro' ),\n 'fadeOutRight' =>__( 'fadeOutRight','wc-sales-notification-pro' ),\n 'fadeOutRightBig' =>__( 'fadeOutRightBig','wc-sales-notification-pro' ),\n 'fadeOutUp' =>__( 'fadeOutUp','wc-sales-notification-pro' ),\n 'fadeOutUpBig' =>__( 'fadeOutUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipOutX' =>__( 'flipOutX','wc-sales-notification-pro' ),\n 'flipOutY' =>__( 'flipOutY','wc-sales-notification-pro' ),\n 'lightSpeedOut' =>__( 'lightSpeedOut','wc-sales-notification-pro' ),\n 'rotateOut' =>__( 'rotateOut','wc-sales-notification-pro' ),\n 'rotateOutDownLeft' =>__( 'rotateOutDownLeft','wc-sales-notification-pro' ),\n 'rotateOutDownRight' =>__( 'rotateOutDownRight','wc-sales-notification-pro' ),\n 'rotateOutUpLeft' =>__( 'rotateOutUpLeft','wc-sales-notification-pro' ),\n 'rotateOutUpRight' =>__( 'rotateOutUpRight','wc-sales-notification-pro' ),\n 'slideOutUp' =>__( 'slideOutUp','wc-sales-notification-pro' ),\n 'slideOutDown' =>__( 'slideOutDown','wc-sales-notification-pro' ),\n 'slideOutLeft' =>__( 'slideOutLeft','wc-sales-notification-pro' ),\n 'slideOutRight' =>__( 'slideOutRight','wc-sales-notification-pro' ),\n 'zoomOut' =>__( 'zoomOut','wc-sales-notification-pro' ),\n 'zoomOutDown' =>__( 'zoomOutDown','wc-sales-notification-pro' ),\n 'zoomOutLeft' =>__( 'zoomOutLeft','wc-sales-notification-pro' ),\n 'zoomOutRight' =>__( 'zoomOutRight','wc-sales-notification-pro' ),\n 'zoomOutUp' =>__( 'zoomOutUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n ),\n ),\n \n array(\n 'name' => 'background_color',\n 'label' => __( 'Background Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Background Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'heading_color',\n 'label' => __( 'Heading Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Heading Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'content_color',\n 'label' => __( 'Content Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Content Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'cross_color',\n 'label' => __( 'Cross Icon Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Cross Icon Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color'\n ),\n\n ),\n\n 'wcsales_fakes_data_tabs' => array(),\n 'wcsales_plugins_tabs' => array(),\n\n );\n \n return array_merge( $settings_fields );\n }",
"public function settings() {\n\n\t\tif (function_exists('acf_add_options_page')) {\n\t\t\tacf_add_options_page([\n\t\t\t\t'page_title' => 'Message Bar',\n\t\t\t\t'menu_title' => 'Message Bar',\n\t\t\t\t'menu_slug' => 'vtl-message-bar',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t\t'update_button' => 'Save',\n\t\t\t\t'updated_message' => 'Settings Saved.',\n\t\t\t\t'capability' => 'edit_posts',\n\t\t\t\t'redirect' => false,\n\t\t\t]);\n\t\t}\n\n\t\tif (function_exists('acf_add_local_field_group')) {\n\t\t\tacf_add_local_field_group([\n\t\t\t\t'key' => 'group_vtlmb_settings',\n\t\t\t\t'title' => 'Message Bar',\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_wuy83TqopJge',\n\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t'name' => 'vtlmb_tab1',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_UHSBFNxFi7NI',\n\t\t\t\t\t\t'label' => 'Active',\n\t\t\t\t\t\t'name' => 'vtlmb_active',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'default_value' => 0,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_YrDYLFOGn1G5',\n\t\t\t\t\t\t'label' => 'Message Text',\n\t\t\t\t\t\t'name' => 'vtlmb_msg_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_a8LoztxeAYk3',\n\t\t\t\t\t\t'label' => 'Message Link',\n\t\t\t\t\t\t'name' => 'vtlmb_msg_link',\n\t\t\t\t\t\t'type' => 'link',\n\t\t\t\t\t\t'return_format' => 'array',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_NkTXVtvoVfa7',\n\t\t\t\t\t\t'label' => 'Colors',\n\t\t\t\t\t\t'name' => 'vtlmb_tab2',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_87uUvYh0uao6',\n\t\t\t\t\t\t'label' => 'Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_p6oUdVBsfBGD',\n\t\t\t\t\t\t'label' => 'Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#000000',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_aLsZN5CX3Yrt',\n\t\t\t\t\t\t'label' => 'Link Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#000000',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_ewp2unznstTj',\n\t\t\t\t\t\t'label' => 'Link Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_2r9DHwtfnruQ',\n\t\t\t\t\t\t'label' => 'Link Hover/Focus Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_focus_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_2eED3wM93qki',\n\t\t\t\t\t\t'label' => 'Link Hover/Focus Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_focus_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#aaaaaa',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_pK7BL9moCKXY',\n\t\t\t\t\t\t'label' => 'Dismiss Button Color',\n\t\t\t\t\t\t'name' => 'vtlmb_dismiss_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_OTwWHHbPTAeL',\n\t\t\t\t\t\t'label' => 'Dismiss Button Hover/Focus Color',\n\t\t\t\t\t\t'name' => 'vtlmb_dismiss_focus_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#aaaaaa',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_czp6fHA6kG3T',\n\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t'name' => 'vtlmb_tab3',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_PuZcPuB3nIp7',\n\t\t\t\t\t\t'label' => 'Make bar sticky',\n\t\t\t\t\t\t'name' => 'vtlmb_sticky',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'instructions' => 'Pins bar to the top of the page when scrolling',\n\t\t\t\t\t\t'default_value' => 0,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t'label' => 'Allow bar to be dismissed?',\n\t\t\t\t\t\t'name' => 'vtlmb_dismissable',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'default_value' => 1,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_tt0f6K03EFHE',\n\t\t\t\t\t\t'label' => 'Cookie Expiration Time',\n\t\t\t\t\t\t'name' => 'vtlmb_cookie_expires',\n\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t'instructions' => 'Message bar dismissal cookie expiration time in seconds. Cookie will expire with browser session if left blank.',\n\t\t\t\t\t\t'default_value' => 86400,\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t\t'append' => 'seconds',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'location' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t'value' => 'vtl-message-bar',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'style' => 'seamless',\n\t\t\t\t'label_placement' => 'top',\n\t\t\t\t'instruction_placement' => 'label',\n\t\t\t\t'active' => 1,\n\t\t\t]);\n\t\t}\n\n\t}",
"function ac_nl_settings_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>Newsletter Subscription plugin settings</h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t <?php settings_fields( 'ac-nl-settings-group' ); ?>\n\t\t <?php do_settings_sections( 'ac-nl-settings-group' ); ?>\n\t\t <table class=\"form-table\">\n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">API Key</th>\n\t\t\t <td><input type=\"text\" name=\"ac_nl_api_key\" value=\"<?php echo esc_attr( get_option( 'ac_nl_api_key' ) ); ?>\" /></td>\n\t\t </tr> \n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">List ID</th>\n\t\t\t <td><input type=\"number\" name=\"ac_nl_list_id\" value=\"<?php echo esc_attr( get_option( 'ac_nl_list_id' ) ); ?>\" /></td>\n\t\t </tr>\n\t\t </table> \n\t\t <?php submit_button(); ?>\n\t\t</form>\n\t</div>\n<?php }",
"function theme_tvchat_admin_page($flags, $default_flags) \n{\n $output = '<p>' . t('TV Chat 프로그램에 대한 각종 설정을 관리합니다.').'</p>';\n\n $output .= drupal_get_form( 'tvchat_config_form');\n return $output;\n}",
"function tsc_theme_options() {\n\tadd_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'tsc_theme_options_page' );\n}",
"function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }",
"function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'Social Share Buttons', 'publisher' ),\n\t\t\t\"base\" => $this->id,\n\t\t\t\"weight\" => 1,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/shortcodes/bs-social-share.png',\n\t\t) );\n\t}",
"function kalmanhosszu_settings($saved_settings, $subtheme_defaults = array()) {\n\n $form = array();\n\n // Get the default values from the .info file.\n $themes = list_themes();\n $defaults = $themes['kalmanhosszu']->info['settings'];\n\n // Allow a subtheme to override the default values.\n $defaults = array_merge($defaults, $subtheme_defaults);\n\n // Merge the saved variables and their default values.\n $settings = array_merge($defaults, $saved_settings);\n\n // Create the form\n $form['community'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Community buttons'),\n '#description' => t('Header left side community buttons.'),\n );\n\n $form['community']['kalmanhosszu_rss_feed_url'] = array(\n '#type' => 'textfield',\n '#title' => t('RSS URL'),\n '#default_value' => $settings['kalmanhosszu_rss_feed_url'],\n );\n\n $form['community']['kalmanhosszu_linked_in_url'] = array(\n '#type' => 'textfield',\n '#title' => t('LinkedIn URL'),\n '#default_value' => $settings['kalmanhosszu_linked_in_url'],\n );\n\n $form['community']['kalmanhosszu_twitter_url'] = array(\n '#type' => 'textfield',\n '#title' => t('Twitter URL'),\n '#default_value' => $settings['kalmanhosszu_twitter_url'],\n );\n\n $form['share'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Share buttons'),\n );\n\n $form['share']['kalmanhosszu_show_facebook_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show facebook share button'),\n '#default_value' => $settings['kalmanhosszu_show_facebook_share'],\n );\n\n $form['share']['kalmanhosszu_show_iwiw_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show iwiw share button'),\n '#default_value' => $settings['kalmanhosszu_show_iwiw_share'],\n '#description' => t('IWIW is a Hungarian social media site like facebook.')\n );\n\n $form['share']['kalmanhosszu_show_twitter_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show twitter share button'),\n '#default_value' => $settings['kalmanhosszu_show_twitter_share'],\n );\n\n $form['share']['kalmanhosszu_twitter_acc'] = array(\n '#type' => 'textfield',\n '#title' => t('Twitter account'),\n '#default_value' => $settings['kalmanhosszu_twitter_acc'],\n '#description' => t('If You add yout twitter account name, it will shows in shared tweets.')\n );\n\n return $form;\n}",
"protected function applyCustomSettings()\n {\n $this->disable(array('read_counter', 'edit_counter', 'deleted_at', 'version', 'creator_user_id', 'created_at'));\n \n $this['updated_at']->setMetaWidgetClassName('ullMetaWidgetDate');\n \n //configure subject\n $this['subject']\n ->setLabel('Subject')\n ->setWidgetAttribute('size', 50)\n ->setMetaWidgetClassName('ullMetaWidgetLink');\n \n //configure body\n $this['body']\n ->setMetaWidgetClassName('ullMetaWidgetFCKEditor')\n ->setLabel('Text');\n \n // configure access level\n $this['ull_wiki_access_level_id']->setLabel(__('Access level', null, 'ullWikiMessages'));\n \n $this['is_outdated']->setLabel(__('Is outdated', null, 'ullWikiMessages'));\n \n // configure tags\n $this['duplicate_tags_for_search']\n ->setLabel('Tags')\n ->setMetaWidgetClassName('ullMetaWidgetTaggable');\n \n if ($this->isCreateOrEditAction())\n {\n $this->disable(array('id', 'updator_user_id', 'updated_at'));\n } \n\n if ($this->isListAction())\n {\n $this->disableAllExcept(array('id', 'subject'));\n $this->enable(array('updator_user_id', 'updated_at'));\n } \n }",
"private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}",
"function custom_theme_options()\n{\n\tif ( ! defined( 'UNCODE_SLIM' ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb, $uncode_colors, $uncode_post_types;\n\n\tif (!isset($uncode_post_types)) $uncode_post_types = uncode_get_post_types();\n\t/**\n\t * Get a copy of the saved settings array.\n\t */\n\t$saved_settings = get_option(ot_settings_id() , array());\n\n\t/**\n\t * Custom settings array that will eventually be\n\t * passes to the OptionTree Settings API Class.\n\t */\n\n\tif (!function_exists('ot_filter_measurement_unit_types'))\n\t{\n\t\tfunction ot_filter_measurement_unit_types($array, $field_id)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'px' => 'px',\n\t\t\t\t'%' => '%'\n\t\t\t);\n\t\t}\n\t}\n\n\tadd_filter('ot_measurement_unit_types', 'ot_filter_measurement_unit_types', 10, 2);\n\n\tfunction run_array_to($array, $key = '', $value = '')\n\t{\n\t\t$array[$key] = $value;\n\t\treturn $array;\n\t}\n\n\t$stylesArrayMenu = array(\n\t\tarray(\n\t\t\t'value' => 'light',\n\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t'src' => ''\n\t\t) ,\n\t\tarray(\n\t\t\t'value' => 'dark',\n\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t'src' => ''\n\t\t)\n\t);\n\n\t$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );\n\t$menus_array = array();\n\t$menus_array[] = array(\n\t\t'value' => '',\n\t\t'label' => esc_html__('Inherit', 'uncode')\n\t);\n\tforeach ($menus as $menu)\n\t{\n\t\t$menus_array[] = array(\n\t\t\t'value' => $menu->slug,\n\t\t\t'label' => $menu->name\n\t\t);\n\t}\n\n\t$uncodeblock = array(\n\t\t'value' => 'header_uncodeblock',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t);\n\n\t$uncodeblocks = array(\n\t\tarray(\n\t\t\t'value' => '','label' => esc_html__('Inherit', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'none','label' => esc_html__('None', 'uncode')\n\t\t)\n\t);\n\n\t$blocks_query = new WP_Query( 'post_type=uncodeblock&posts_per_page=-1&post_status=publish&orderby=title&order=ASC' );\n\n\tforeach ($blocks_query->posts as $block) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => $block->ID,\n\t\t\t'label' => $block->post_title,\n\t\t\t'postlink' => get_edit_post_link($block->ID),\n\t\t);\n\t}\n\n\tif ($blocks_query->post_count === 0) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('No Content Blocks found', 'uncode')\n\t\t);\n\t}\n\n\t$uncodeblock_404 = array(\n\t\t'id' => '_uncode_404_body',\n\t\t'label' => esc_html__('404 content', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'body_uncodeblock',\n\t\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t),\n\t\t),\n\t\t'section' => 'uncode_404_section',\n\t);\n\n\t$uncodeblocks_404 = array(\n\t\t'id' => '_uncode_404_body_block',\n\t\t'label' => esc_html__('404 Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_404_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_404_body:is(body_uncodeblock)',\n\t);\n\n\tif ( class_exists( 'RevSliderFront' ) )\n\t{\n\n\t\t$revslider = array(\n\t\t\t'value' => 'header_revslider',\n\t\t\t'label' => esc_html__('Revolution Slider', 'uncode') ,\n\t\t);\n\n\t\t$rs = $wpdb->get_results(\"SELECT id, title, alias FROM \" . $wpdb->prefix . \"revslider_sliders WHERE type != 'template' ORDER BY id ASC LIMIT 999\");\n\t\t$revsliders = array();\n\t\tif ($rs)\n\t\t{\n\t\t\tforeach ($rs as $slider)\n\t\t\t{\n\t\t\t\t$revsliders[] = array(\n\t\t\t\t\t'value' => $slider->alias,\n\t\t\t\t\t'label' => $slider->title,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=revslider&view=slider&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$revsliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No Revolution Sliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $revslider = $revsliders = '';\n\n\tif ( class_exists( 'LS_Config' ) )\n\t{\n\n\t\t$layerslider = array(\n\t\t\t'value' => 'header_layerslider',\n\t\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t);\n\n\t\t$ls = $wpdb->get_results(\"SELECT id, name FROM \" . $wpdb->prefix . \"layerslider WHERE flag_deleted != '1' ORDER BY id ASC LIMIT 999\");\n\t\t$layersliders = array();\n\t\tif ($ls)\n\t\t{\n\t\t\tforeach ($ls as $slider)\n\t\t\t{\n\t\t\t\t$layersliders[] = array(\n\t\t\t\t\t'value' => $slider->id,\n\t\t\t\t\t'label' => $slider->name,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=layerslider&action=edit&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$layersliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No LayerSliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $layerslider = $layersliders = '';\n\n\t$title_size = array(\n\t\tarray(\n\t\t\t'value' => 'h1',\n\t\t\t'label' => esc_html__('h1', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h2',\n\t\t\t'label' => esc_html__('h2', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h3',\n\t\t\t'label' => esc_html__('h3', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h4',\n\t\t\t'label' => esc_html__('h4', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h5',\n\t\t\t'label' => esc_html__('h5', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h6',\n\t\t\t'label' => esc_html__('h6', 'uncode'),\n\t\t),\n\t);\n\n\t$font_sizes = ot_get_option('_uncode_heading_font_sizes');\n\tif (!empty($font_sizes)) {\n\t\tforeach ($font_sizes as $key => $value) {\n\t\t\t$title_size[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_size_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_size[] = array(\n\t\t'value' => 'bigtext',\n\t\t'label' => esc_html__('BigText', 'uncode'),\n\t);\n\n\t$title_height = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$font_heights = ot_get_option('_uncode_heading_font_heights');\n\tif (!empty($font_heights)) {\n\t\tforeach ($font_heights as $key => $value) {\n\t\t\t$title_height[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_height_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_spacing = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$btn_letter_spacing = $title_spacing;\n\t$btn_letter_spacing[] = array(\n\t\t'value' => 'uncode-fontspace-zero',\n\t\t'label' => esc_html__('Letter Spacing 0', \"uncode\")\n\t);\n\n\t$font_spacings = ot_get_option('_uncode_heading_font_spacings');\n\tif (!empty($font_spacings)) {\n\t\tforeach ($font_spacings as $key => $value) {\n\t\t\t$btn_letter_spacing[] = $title_spacing[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_spacing_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$fonts = get_option('uncode_font_options');\n\t$title_font = array();\n\n\tif (isset($fonts['font_stack']) && $fonts['font_stack'] !== '[]')\n\t{\n\t\t$font_stack_string = $fonts['font_stack'];\n\t\t$font_stack = json_decode(str_replace('"', '\"', $font_stack_string) , true);\n\n\t\tforeach ($font_stack as $font)\n\t\t{\n\t\t\tif ($font['source'] === 'Font Squirrel')\n\t\t\t{\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$weight = array();\n\t\t\t\tforeach ($variants as $variant)\n\t\t\t\t{\n\t\t\t\t\tif (strpos(strtolower($variant) , 'hairline') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 100;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'light') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 200;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'regular') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'semibold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 500;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'bold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 600;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'black') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 800;\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$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $weight);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Google Web Fonts')\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ' . $font['variants'];\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Adobe Fonts' || $font['source'] === 'Typekit' )\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\tforeach ($variants as $key => $variant) {\n\t\t\t\t\tif ( $variants[$key] !== '' ) {\n\t\t\t\t\t\tpreg_match(\"|\\d+|\", $variants[$key], $weight);\n\t\t\t\t\t\t$variants[$key] = $weight[0] . '00';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $variants);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode(str_replace('\"', '', (string)$font['stub'])),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => (string)$font['family']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$title_font = array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No fonts activated.', \"uncode\"),\n\t\t\t)\n\t\t);\n\t}\n\n\t$title_font[] = array(\n\t\t'value' => 'manual',\n\t\t'label' => esc_html__('Manually entered','uncode')\n\t);\n\n\t$custom_fonts = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t)\n\t);\n\n\t$custom_fonts_array = ot_get_option('_uncode_font_groups');\n\tif (!empty($custom_fonts_array)) {\n\t\tforeach ($custom_fonts_array as $key => $value) {\n\t\t\t$custom_fonts[] = array(\n\t\t\t\t'value' => $value['_uncode_font_group_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_weight = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 100,\n\t\t\t'label' => '100',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 200,\n\t\t\t'label' => '200',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 300,\n\t\t\t'label' => '300',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 400,\n\t\t\t'label' => '400',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 500,\n\t\t\t'label' => '500',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 600,\n\t\t\t'label' => '600',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 700,\n\t\t\t'label' => '700',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 800,\n\t\t\t'label' => '800',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 900,\n\t\t\t'label' => '900',\n\t\t)\n\t);\n\n\t$menu_section_title = array(\n\t\t'id' => '_uncode_%section%_menu_block_title',\n\t\t'label' => ' <i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu = array(\n\t\t'id' => '_uncode_%section%_menu',\n\t\t'label' => esc_html__('Menu', 'uncode') ,\n\t\t'desc' => esc_html__('Override the primary menu created in \\'Appearance -> Menus\\'.','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $menus_array,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_width = array(\n\t\t'id' => '_uncode_%section%_menu_width',\n\t\t'label' => esc_html__('Menu width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the menu width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_opaque = array(\n\t\t'id' => '_uncode_%section%_menu_opaque',\n\t\t'label' => esc_html__('Remove transparency', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Override to remove the transparency eventually declared in \\'Customize -> Light/Dark skin\\'.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding',\n\t\t'label' => esc_html__('Remove menu content padding', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding_mobile = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding_mobile',\n\t\t'label' => esc_html__('Remove menu content padding on mobile', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header on mobile.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_activate = array(\n\t\t'id' => '_uncode_%section%_custom_title_activate',\n\t\t'label' => esc_html__('Activate custom title and subtitle', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate this to enable the custom title and subtitle.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_title_text',\n\t\t'label' => esc_html__('Custom title', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page title.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$subtitle_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_subtitle_text',\n\t\t'label' => esc_html__('Custom subtitle', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page subtitle.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$header_section_title = array(\n\t\t'id' => '_uncode_%section%_header_block_title',\n\t\t'label' => '<i class=\"fa fa-columns2\"></i> ' . esc_html__('Header', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_type = array(\n\t\t'id' => '_uncode_%section%_header',\n\t\t'label' => esc_html__('Type', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header type.', 'uncode'),\n\t\t'std' => 'none',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'none',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header_basic',\n\t\t\t\t'label' => esc_html__('Basic', 'uncode') ,\n\t\t\t) ,\n\t\t\t$uncodeblock,\n\t\t\t$revslider,\n\t\t\t$layerslider,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_uncode_block = array(\n\t\t'id' => '_uncode_%section%_blocks',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the Content Block.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'condition' => '_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_revslider = array(\n\t\t'id' => '_uncode_%section%_revslider',\n\t\t'label' => esc_html__('Revslider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the RevSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_revslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $revsliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_layerslider = array(\n\t\t'id' => '_uncode_%section%_layerslider',\n\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the LayerSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_layerslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $layersliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title = array(\n\t\t'label' => esc_html__('Title in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_title',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to show title in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_title_text = array(\n\t\t'id' => '_uncode_%section%_header_title_text',\n\t\t'label' => esc_html__('Custom text', 'uncode') ,\n\t\t'desc' => esc_html__('Add custom text for the header. Every newline in the field is a new line in the title.', 'uncode') ,\n\t\t'type' => 'textarea-simple',\n\t\t'rows' => '15',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_style = array(\n\t\t'id' => '_uncode_%section%_header_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header text skin.', 'uncode') ,\n\t\t'std' => 'light',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'choices' => $stylesArrayMenu\n\t);\n\n\t$header_width = array(\n\t\t'id' => '_uncode_%section%_header_width',\n\t\t'label' => esc_html__('Header width', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'desc' => esc_html__('Override the header width.', 'uncode') ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:contains(header)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_content_width = array(\n\t\t'id' => '_uncode_%section%_header_content_width',\n\t\t'label' => esc_html__('Content full width', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to expand the header content to full width.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_custom_width = array(\n\t\t'id' => '_uncode_%section%_header_custom_width',\n\t\t'label' => esc_html__('Custom inner width','uncode'),\n\t\t'desc' => esc_html__('Adjust the inner content width in %.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'type' => 'numeric-slider',\n\t\t'min_max_step' => '0,100,1',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_align = array(\n\t\t'id' => '_uncode_%section%_header_align',\n\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the text/content alignment.', 'uncode') ,\n\t\t'std' => 'center',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t)\n\t);\n\n\t$header_height = array(\n\t\t'id' => '_uncode_%section%_header_height',\n\t\t'label' => esc_html__('Height', 'uncode') ,\n\t\t'desc' => esc_html__('Define the height of the header in px or in % (relative to the window height).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'std' => array(\n\t\t\t'60',\n\t\t\t'%'\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_min_height = array(\n\t\t'id' => '_uncode_%section%_header_min_height',\n\t\t'label' => esc_html__('Minimal height', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a minimun height for the header in pixel.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'std' => '300',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_position = array(\n\t\t'id' => '_uncode_%section%_header_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the header content inside the container.', 'uncode') ,\n\t\t'std' => 'header-center header-middle',\n\t\t'type' => 'select',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-top',\n\t\t\t\t'label' => esc_html__('Left Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-center',\n\t\t\t\t'label' => esc_html__('Left Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-bottom',\n\t\t\t\t'label' => esc_html__('Left Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-top',\n\t\t\t\t'label' => esc_html__('Center Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-middle',\n\t\t\t\t'label' => esc_html__('Center Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-bottom',\n\t\t\t\t'label' => esc_html__('Center Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-top',\n\t\t\t\t'label' => esc_html__('Right Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-center',\n\t\t\t\t'label' => esc_html__('Right Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-bottom',\n\t\t\t\t'label' => esc_html__('Right Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_font = array(\n\t\t'id' => '_uncode_%section%_header_title_font',\n\t\t'label' => esc_html__('Title font family', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font for the title.', 'uncode') ,\n\t\t'std' => 'font-555555',\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $custom_fonts,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_size = array(\n\t\t'id' => '_uncode_%section%_header_title_size',\n\t\t'label' => esc_html__('Title font size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font size for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_size,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_height = array(\n\t\t'id' => '_uncode_%section%_header_title_height',\n\t\t'label' => esc_html__('Title line height', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the line height for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_height,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_spacing = array(\n\t\t'id' => '_uncode_%section%_header_title_spacing',\n\t\t'label' => esc_html__('Title letter spacing', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the letter spacing for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_spacing,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_weight = array(\n\t\t'id' => '_uncode_%section%_header_title_weight',\n\t\t'label' => esc_html__('Title font weight', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font weight for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_weight,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_italic = array(\n\t\t'id' => '_uncode_%section%_header_title_italic',\n\t\t'label' => esc_html__('Title italic', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the font style italic for the title.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_title_transform = array(\n\t\t'id' => '_uncode_%section%_header_title_transform',\n\t\t'label' => esc_html__('Title text transform', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the title text transformation.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default CSS', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'uppercase',\n\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'lowercase',\n\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'capitalize',\n\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t) ,\n\t\t)\n\t);\n\n\t$header_text_animation = array(\n\t\t'id' => '_uncode_%section%_header_text_animation',\n\t\t'label' => esc_html__('Text animation', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation of the title text.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'top-t-bottom',\n\t\t\t\t'label' => esc_html__('Top to bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left-t-right',\n\t\t\t\t'label' => esc_html__('Left to right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right-t-left',\n\t\t\t\t'label' => esc_html__('Right to left', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'bottom-t-top',\n\t\t\t\t'label' => esc_html__('Bottom to top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-in',\n\t\t\t\t'label' => esc_html__('Zoom in', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-out',\n\t\t\t\t'label' => esc_html__('Zoom out', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'alpha-anim',\n\t\t\t\t'label' => esc_html__('Alpha', 'uncode') ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_delay = array(\n\t\t'id' => '_uncode_%section%_header_animation_delay',\n\t\t'label' => esc_html__('Animation delay', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation delay of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1100',\n\t\t\t\t'label' => esc_html__('ms 1100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1200',\n\t\t\t\t'label' => esc_html__('ms 1200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1300',\n\t\t\t\t'label' => esc_html__('ms 1300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1400',\n\t\t\t\t'label' => esc_html__('ms 1400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1500',\n\t\t\t\t'label' => esc_html__('ms 1500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1600',\n\t\t\t\t'label' => esc_html__('ms 1600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1700',\n\t\t\t\t'label' => esc_html__('ms 1700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1800',\n\t\t\t\t'label' => esc_html__('ms 1800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1900',\n\t\t\t\t'label' => esc_html__('ms 1900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2000',\n\t\t\t\t'label' => esc_html__('ms 2000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_speed = array(\n\t\t'id' => '_uncode_%section%_header_animation_speed',\n\t\t'label' => esc_html__('Animation speed', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation speed of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default (400)', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_featured = array(\n\t\t'label' => esc_html__('Featured media in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_featured',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to use the featured image in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_background = array(\n\t\t'id' => '_uncode_%section%_header_background',\n\t\t'label' => esc_html__('Background', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the background media and color.', 'uncode') ,\n\t\t'type' => 'background',\n\t\t'std' => array(\n\t\t\t'background-color' => 'color-gyho',\n\t\t\t'background-repeat' => '',\n\t\t\t'background-attachment' => '',\n\t\t\t'background-position' => '',\n\t\t\t'background-size' => '',\n\t\t\t'background-image' => '',\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_parallax = array(\n\t\t'id' => '_uncode_%section%_header_parallax',\n\t\t'label' => esc_html__('Parallax', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate the background parallax effect.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_kburns = array(\n\t\t'id' => '_uncode_%section%_header_kburns',\n\t\t'label' => esc_html__('Zoom Effect', 'uncode') ,\n\t\t'desc' => esc_html__('Select the background zoom effect you prefer.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'on',\n\t\t\t\t'label' => esc_html__('Ken Burns', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom',\n\t\t\t\t'label' => esc_html__('Zoom Out', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color',\n\t\t'label' => esc_html__('Overlay color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the overlay background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color_alpha = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color_alpha',\n\t\t'label' => esc_html__('Overlay color opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Set the overlay opacity.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scroll_opacity = array(\n\t\t'id' => '_uncode_%section%_header_scroll_opacity',\n\t\t'label' => esc_html__('Scroll opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Activate alpha animation when scrolling down.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scrolldown = array(\n\t\t'id' => '_uncode_%section%_header_scrolldown',\n\t\t'label' => esc_html__('Scroll down arrow', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the scroll down arrow button.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:not(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_breadcrumb = array(\n\t\t'id' => '_uncode_%section%_breadcrumb',\n\t\t'label' => esc_html__('Show breadcrumb', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation breadcrumb.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$breadcrumb_align = array(\n\t\t'id' => '_uncode_%section%_breadcrumb_align',\n\t\t'label' => esc_html__('Breadcrumb align', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the breadcrumb alignment','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_breadcrumb:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_title = array(\n\t\t'id' => '_uncode_%section%_title',\n\t\t'label' => esc_html__('Show title', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the title in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$remove_pagination = array(\n\t\t'id' => '_uncode_%section%_remove_pagination',\n\t\t'label' => esc_html__('Remove pagination', 'uncode') ,\n\t\t'desc' => esc_html__('Activate this to remove the pagination (useful when you use a custom Content Block with Pagination or Load More options).', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$products_per_page = array(\n\t\t'id' => '_uncode_%section%_ppp',\n\t\t'label' => esc_html__('Number of products', 'uncode') ,\n\t\t'desc' => esc_html__('Set the number of items to display on product archives. \\'Inherit\\' inherits the WordPress Settings > Readings > Blog Number of Posts', 'uncode') ,\n\t\t'std' => '0',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_media = array(\n\t\t'id' => '_uncode_%section%_media',\n\t\t'label' => esc_html__('Show media', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the medias in the content area.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_featured_media = array(\n\t\t'id' => '_uncode_%section%_featured_media',\n\t\t'label' => esc_html__('Show featured image', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the featured image in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_media:not(on)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags = array(\n\t\t'id' => '_uncode_%section%_tags',\n\t\t'label' => esc_html__('Show tags', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the tags and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags_align = array(\n\t\t'id' => '_uncode_%section%_tags_align',\n\t\t'label' => esc_html__('Tags alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the tags alignment.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_tags:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_comments = array(\n\t\t'id' => '_uncode_%section%_comments',\n\t\t'label' => esc_html__('Show comments', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the comments and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_share = array(\n\t\t'id' => '_uncode_%section%_share',\n\t\t'label' => esc_html__('Show share', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the share module.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$image_layout = array(\n\t\t'id' => '_uncode_%section%_image_layout',\n\t\t'label' => esc_html__('Media layout', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the layout mode for the product images section.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'stack',\n\t\t\t\t'label' => esc_html__('Stack', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$media_size = array(\n\t\t'id' => '_uncode_%section%_media_size',\n\t\t'label' => esc_html__('Media layout size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the size of the media layout area.', 'uncode') ,\n\t\t'std' => '6',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$enable_sticky_desc = array(\n\t\t'id' => '_uncode_%section%_sticky_desc',\n\t\t'label' => esc_html__('Sticky content', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable sticky effect for product description.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is(stack)',\n\t);\n\n\t$enable_woo_zoom = array(\n\t\t'id' => '_uncode_%section%_enable_zoom',\n\t\t'label' => esc_html__('Zoom', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable drag zoom effect on product image.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$thumb_cols = array(\n\t\t'id' => '_uncode_%section%_thumb_cols',\n\t\t'label' => esc_html__('Thumbnails columns', 'uncode') ,\n\t\t'desc' => esc_html__('Specify how many columns to display for your product gallery thumbs.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => '3',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6',\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$enable_woo_slider = array(\n\t\t'id' => '_uncode_%section%_enable_slider',\n\t\t'label' => esc_html__('Thumbnails carousel', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable carousel slider when you click gallery thumbs.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$body_section_title = array(\n\t\t'id' => '_uncode_%section%_body_title',\n\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block = array(\n\t\t'id' => '_uncode_%section%_content_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use. NB. Select \"Inherit\" to use the default template.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_before = array(\n\t\t'id' => '_uncode_%section%_content_block_before',\n\t\t'label' => esc_html__('Content Block - Before Content', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after_pre = array(\n\t\t'id' => '_uncode_%section%_content_block_after_pre',\n\t\t'label' => esc_html__('After Content (ex: Author Profile)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after = array(\n\t\t'id' => '_uncode_%section%_content_block_after',\n\t\t'label' => esc_html__('After Content (ex: Related Posts)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width = array(\n\t\t'id' => '_uncode_%section%_layout_width',\n\t\t'label' => esc_html__('Content width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the content width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width_custom = array(\n\t\t'id' => '_uncode_%section%_layout_width_custom',\n\t\t'label' => esc_html__('Custom width', 'uncode') ,\n\t\t'desc' => esc_html__('Define the custom width for the content area in px or in %. This option takes effect with normal contents (not Page Builder).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'condition' => '_uncode_%section%_layout_width:is(limit)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_post_width = array(\n\t\t'id' => '_uncode_%section%_single_width',\n\t\t'label' => esc_html__('Single post width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the single post width from 1 to 12.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'std' => '4',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '1',\n\t\t\t\t'label' => '1' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '3',\n\t\t\t\t'label' => '3' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '7',\n\t\t\t\t'label' => '7' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '8',\n\t\t\t\t'label' => '8' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '9',\n\t\t\t\t'label' => '9' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '10',\n\t\t\t\t'label' => '10' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '11',\n\t\t\t\t'label' => '11' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '12',\n\t\t\t\t'label' => '12' ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_text_lenght = array(\n\t\t'id' => '_uncode_%section%_single_text_length',\n\t\t'label' => esc_html__('Single teaser text length', 'uncode') ,\n\t\t'desc' => esc_html__('Enter the number of words you want for the teaser. If nothing in entered the full content will be showed.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$sidebar_section_title = array(\n\t\t'id' => '_uncode_%section%_sidebar_title',\n\t\t'label' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_activate = array(\n\t\t'id' => '_uncode_%section%_activate_sidebar',\n\t\t'label' => esc_html__('Activate the sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_widget = array(\n\t\t'id' => '_uncode_%section%_sidebar',\n\t\t'label' => esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar.', 'uncode') ,\n\t\t'type' => 'sidebar-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_position = array(\n\t\t'id' => '_uncode_%section%_sidebar_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the sidebar.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_size = array(\n\t\t'id' => '_uncode_%section%_sidebar_size',\n\t\t'label' => esc_html__('Size', 'uncode') ,\n\t\t'desc' => esc_html__('Set the size of the sidebar.', 'uncode') ,\n\t\t'std' => '4',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_sticky = array(\n\t\t'id' => '_uncode_%section%_sidebar_sticky',\n\t\t'label' => esc_html__('Sticky sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to have a sticky sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_style = array(\n\t\t'id' => '_uncode_%section%_sidebar_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Override the sidebar text skin color.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'light',\n\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'dark',\n\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_bgcolor = array(\n\t\t'id' => '_uncode_%section%_sidebar_bgcolor',\n\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_fill = array(\n\t\t'id' => '_uncode_%section%_sidebar_fill',\n\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'std' => 'off',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_sidebar_bgcolor:not(),_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$navigation_section_title = array(\n\t\t'id' => '_uncode_%section%_navigation_title',\n\t\t'label' => '<i class=\"fa fa-location\"></i> ' . esc_html__('Navigation', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_activate = array(\n\t\t'id' => '_uncode_%section%_navigation_activate',\n\t\t'label' => esc_html__('Navigation bar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation bar.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_page_index = array(\n\t\t'id' => '_uncode_%section%_navigation_index',\n\t\t'label' => esc_html__('Navigation index', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the page you want to use as index.', 'uncode'),\n\t\t'type' => 'page-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_index_label = array(\n\t\t'id' => '_uncode_%section%_navigation_index_label',\n\t\t'label' => esc_html__('Index custom label', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a custom label for the index button.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_nextprev_title = array(\n\t\t'id' => '_uncode_%section%_navigation_nextprev_title',\n\t\t'label' => esc_html__('Navigation titles', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the next/prev post title.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$footer_section_title = array(\n\t\t'id' => '_uncode_%section%_footer_block_title',\n\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_uncode_block = array(\n\t\t'id' => '_uncode_%section%_footer_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Override the Content Block.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_width = array(\n\t\t'id' => '_uncode_%section%_footer_width',\n\t\t'label' => esc_html__('Footer width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the footer width.' ,'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_section_title = array(\n\t\t'id' => '_uncode_%section%_cf_title',\n\t\t'label' => '<i class=\"fa fa-pencil3\"></i> ' . esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_list = array(\n\t\t'id' => '_uncode_%section%_custom_fields',\n\t\t'class' => 'uncode-custom-fields-list',\n\t\t'label' => esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => esc_html__('Create here all the custom fields that can be used inside the posts module.', 'uncode') ,\n\t\t'type' => 'list-item',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'settings' => array(\n\t\t\tarray(\n\t\t\t\t'id' => '_uncode_cf_unique_id',\n\t\t\t\t'class' => 'unique_id',\n\t\t\t\t'std' => 'detail-',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__('Unique custom field ID','uncode') ,\n\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t),\n\t\t)\n\t);\n\n\t$portfolio_cpt_name = ot_get_option('_uncode_portfolio_cpt');\n\tif ($portfolio_cpt_name == '') $portfolio_cpt_name = 'portfolio';\n\n\t$cpt_single_sections = array();\n\t$cpt_index_sections = array();\n\t$cpt_single_options = array();\n\t$cpt_index_options = array();\n\n\tif (count($uncode_post_types) > 0) {\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_obj = get_post_type_object($value);\n\n\t\t\t\tif ( is_object($cpt_obj) ) {\n\t\t\t\t\t$cpt_name = $cpt_obj->labels->name;\n\t\t\t\t\t$cpt_sing_name = $cpt_obj->labels->singular_name;\n\t\t\t\t\t$cpt_single_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($cpt_sing_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($cpt_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t} elseif ( $value == 'author' ) {\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Authors', 'uncode') . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product' && $value !== 'author') {\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_opaque);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_type);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_revslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_layerslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_min_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_content_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_custom_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_font);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_spacing);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_weight);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_transform);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_italic);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_text_animation);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_speed);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_delay);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_featured);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_background);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_parallax);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_kburns);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color_alpha);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scroll_opacity);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scrolldown);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width_custom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_breadcrumb);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $breadcrumb_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, run_array_to($show_title, 'std', 'on'));\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_featured_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_comments);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_share);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $image_layout);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $media_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_sticky_desc);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_zoom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $thumb_cols);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_slider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after_pre);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_widget);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_sticky);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_bgcolor);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_fill);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_page_index);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_index_label);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_nextprev_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_list);\n\t\t\t}\n\t\t}\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_opaque);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($header_type, 'std', 'header_basic'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_revslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_layerslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_min_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_content_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_custom_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_font);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_spacing);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_weight);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_transform);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_italic);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_text_animation);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_speed);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_delay);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_featured);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_background);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_parallax);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_kburns);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color_alpha);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scroll_opacity);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scrolldown);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding_mobile);\n\t\t\t\tif ($value !== 'author') {\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_activate);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_text);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $subtitle_archive_custom_text);\n\t\t\t\t}\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_breadcrumb);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $breadcrumb_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_layout_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_post_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_text_lenght);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $remove_pagination);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($sidebar_activate, 'std', 'on'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_widget);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_sticky);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_bgcolor);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_fill);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_width);\n\t\t\t}\n\t\t}\n\t}\n\n\t$custom_settings_section_one = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_header_section',\n\t\t\t'title' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Navbar', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t\t'group_icon' => 'fa-layout'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_main_section',\n\t\t\t'title' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t) ,\n\t\t// array(\n\t\t// \t'id' => 'uncode_header_section',\n\t\t// \t'title' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode'),\n\t\t// \t'group' => esc_html__('General', 'uncode')\n\t\t// ) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_footer_section',\n\t\t\t'title' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_post_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Post', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t'group_icon' => 'fa-file2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Page', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($portfolio_cpt_name) . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_single_sections );\n\n\t$custom_settings_section_two = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_post_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Posts', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t'group_icon' => 'fa-archive2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Pages', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($portfolio_cpt_name) . 's</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_two );\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_index_sections );\n\n\t$custom_settings_section_three = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_search_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Search', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_404_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-help\"></i> ' . esc_html__('404', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_colors_section',\n\t\t\t'title' => '<i class=\"fa fa-drop\"></i> ' . esc_html__('Palette', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode'),\n\t\t\t'group_icon' => 'fa-eye2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_typography_section',\n\t\t\t'title' => '<i class=\"fa fa-font\"></i> ' . esc_html__('Typography', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_customize_section',\n\t\t\t'title' => '<i class=\"fa fa-box\"></i> ' . esc_html__('Customize', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_extra_section',\n\t\t\t'title' => esc_html__('Extra', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_sidebars_section',\n\t\t\t'title' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebars', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode'),\n\t\t\t'group_icon' => 'fa-cog2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_connections_section',\n\t\t\t'title' => '<i class=\"fa fa-share2\"></i> ' . esc_html__('Socials', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_gmaps_section',\n\t\t\t'title' => '<i class=\"fa fa-map-o\"></i> ' . esc_html__('Google Maps', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_redirect_section',\n\t\t\t'title' => '<i class=\"fa fa-reply2\"></i> ' . esc_html__('Redirect', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_cssjs_section',\n\t\t\t'title' => '<i class=\"fa fa-code\"></i> ' . esc_html__('CSS & JS', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_performance_section',\n\t\t\t'title' => '<i class=\"fa fa-loader\"></i> ' . esc_html__('Performance', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_three );\n\n\t$custom_settings_one = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'desc' => '',\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_width',\n\t\t\t'label' => esc_html__('Site width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter the width of your site.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\t'1200',\n\t\t\t\t'px'\n\t\t\t) ,\n\t\t\t'type' => 'measurement',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_align',\n\t\t\t'label' => esc_html__('Site layout align', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the alignment of the content area when is less then 100% width.', 'uncode') ,\n\t\t\t'std' => 'center',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_boxed',\n\t\t\t'label' => esc_html__('Boxed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate for the boxed layout.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border',\n\t\t\t'label' => esc_html__('Body frame', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the thickness of the frame around the body', 'uncode') ,\n\t\t\t'std' => '0',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border_color',\n\t\t\t'label' => esc_html__('Body frame color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body frame color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off),_uncode_body_border:not(0)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($header_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_header_full',\n\t\t\t'label' => esc_html__('Container full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the header container to full width.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($body_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_body_full',\n\t\t\t'label' => esc_html__('Content area full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the content area to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_logo_block_title',\n\t\t\t'label' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Logo', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_switch',\n\t\t\t'label' => esc_html__('Switchable logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for each skin.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo',\n\t\t\t'label' => esc_html__('Logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_light',\n\t\t\t'label' => esc_html__('Logo - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_dark',\n\t\t\t'label' => esc_html__('Logo - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_switch',\n\t\t\t'label' => esc_html__('Different Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for mobile devices.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile',\n\t\t\t'label' => esc_html__('Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for mobile. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_light',\n\t\t\t'label' => esc_html__('Logo Mobile - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_dark',\n\t\t\t'label' => esc_html__('Logo Mobile - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height',\n\t\t\t'label' => esc_html__('Logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height_mobile',\n\t\t\t'label' => esc_html__('Logo height mobile', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px for mobile version.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers',\n\t\t\t'desc' => esc_html__('Specify the menu layout.', 'uncode') ,\n\t\t\t'label' => '' ,\n\t\t\t'std' => 'hmenu-right',\n\t\t\t'type' => 'radio-image',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_hmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_v_position',\n\t\t\t'label' => esc_html__('Menu vertical alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the vertical alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'middle',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'top',\n\t\t\t\t\t'label' => esc_html__('Top', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'middle',\n\t\t\t\t\t'label' => esc_html__('Middle', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'bottom',\n\t\t\t\t\t'label' => esc_html__('Bottom', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_align',\n\t\t\t'label' => esc_html__('Menu horizontal alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_width',\n\t\t\t'label' => esc_html__('Vertical menu width','uncode') ,\n\t\t\t'desc' => esc_html__('Vertical menu width in px', 'uncode') ,\n\t\t\t'std' => '252',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'rows' => '',\n\t\t\t'post_type' => '',\n\t\t\t'taxonomy' => '',\n\t\t\t'min_max_step' => '108,504,12',\n\t\t\t'class' => '',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_accordion_active',\n\t\t\t'label' => esc_html__('Vertical menu open', 'uncode') ,\n\t\t\t'desc' => esc_html__('Open the accordion menu at the current item menu on page loading.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_full',\n\t\t\t'label' => esc_html__('Menu full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the menu to full width. (Only for the horizontal menus).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_visuals_block_title',\n\t\t\t'label' => '<i class=\"fa fa-eye2\"></i> ' . esc_html__('Visuals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shadows',\n\t\t\t'label' => esc_html__('Menu divider shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu divider shadow.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the shadow effect on menu dropdown on desktop view. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'std' => '',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xs',\n\t\t\t\t\t'label' => esc_html__('Extra Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sm',\n\t\t\t\t\t'label' => esc_html__('Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'std',\n\t\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lg',\n\t\t\t\t\t'label' => esc_html__('Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xl',\n\t\t\t\t\t'label' => esc_html__('Extra Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t),\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_darker_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown darker shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the dark shadow effect on menu dropdown on desktop view.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_submenu_shadows:not()',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_borders',\n\t\t\t'label' => esc_html__('Menu borders', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu borders.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_arrows',\n\t\t\t'label' => esc_html__('Hide dropdown arrows', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the dropdow arrows.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_transparency',\n\t\t\t'label' => esc_html__('Menu mobile transparency', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the menu transparency when possible.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding',\n\t\t\t'label' => esc_html__('Custom vertical padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate custom padding above and below the logo.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_desktop',\n\t\t\t'label' => esc_html__('Padding on desktop', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on desktop devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_mobile',\n\t\t\t'label' => esc_html__('Padding on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on mobile devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_animation_block_title',\n\t\t\t'label' => '<i class=\"fa fa-fast-forward2\"></i> ' . esc_html__('Animation', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t// 'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t// 'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky',\n\t\t\t'label' => esc_html__('Menu sticky', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky_mobile',\n\t\t\t'label' => esc_html__('Menu sticky mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu on mobile devices. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_centered',\n\t\t\t'label' => esc_html__('Menu centered mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the centered style for mobile menu. NB. You need to have the Menu Sticky Mobile active.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide',\n\t\t\t'label' => esc_html__('Menu hide', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide_mobile',\n\t\t\t'label' => esc_html__('Menu hide mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu on mobile devices. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shrink',\n\t\t\t'label' => esc_html__('Menu shrink', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the shrink menu. This is a menu where the logo shrinks after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_li_animation',\n\t\t\t'label' => esc_html__('Menu sub-levels animated', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the animation for menu sub-levels. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_animation',\n\t\t\t'label' => esc_html__('Menu open items animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu items animation when opening.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on),_uncode_menu_hide_mobile:is(on)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'scale',\n\t\t\t\t\t'label' => esc_html__('Scale', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_overlay_animation',\n\t\t\t'label' => esc_html__('Menu overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_min_logo',\n\t\t\t'label' => esc_html__('Minimum logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the minimal height of the shrinked logo in <b>px</b>.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_shrink:is(on),_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_secondary',\n\t\t\t'label' => esc_html__('Hide secondary menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the secondary menu.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_cta',\n\t\t\t'label' => esc_html__('Hide Call To Action menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the Call To Action menu.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_padding',\n\t\t\t'label' => esc_html__('Secondary menu padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to increase secondary menu padding.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_no_secondary:is(off)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_socials',\n\t\t\t'label' => esc_html__('Social icons', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the social connection icons in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search',\n\t\t\t'label' => esc_html__('Search icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the search icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search_animation',\n\t\t\t'label' => esc_html__('Search overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the search overlay animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t\t'condition' => '_uncode_menu_search:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart',\n\t\t\t'label' => esc_html__('Woocommerce cart', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Woocommerce icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_desktop',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on desktop mode (only for Overlay and Offcanvas menu).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_mobile',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar for mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on mobile mode.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bloginfo',\n\t\t\t'label' => esc_html__('Top line text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert additional text on top of the menu.','uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center),_uncode_headers:is(hmenu-center-split)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\t//////////////////////\n\t\t// Post Single\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post', $menu_section_title),\n\t\tstr_replace('%section%', 'post', $menu),\n\t\tstr_replace('%section%', 'post', $menu_width),\n\t\tstr_replace('%section%', 'post', $menu_opaque),\n\t\tstr_replace('%section%', 'post', $header_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post', $header_uncode_block),\n\t\tstr_replace('%section%', 'post', $header_revslider),\n\t\tstr_replace('%section%', 'post', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post', $header_width),\n\t\tstr_replace('%section%', 'post', $header_height),\n\t\tstr_replace('%section%', 'post', $header_min_height),\n\t\tstr_replace('%section%', 'post', $header_title),\n\t\tstr_replace('%section%', 'post', $header_style),\n\t\tstr_replace('%section%', 'post', $header_content_width),\n\t\tstr_replace('%section%', 'post', $header_custom_width),\n\t\tstr_replace('%section%', 'post', $header_align),\n\t\tstr_replace('%section%', 'post', $header_position),\n\t\tstr_replace('%section%', 'post', $header_title_font),\n\t\tstr_replace('%section%', 'post', $header_title_size),\n\t\tstr_replace('%section%', 'post', $header_title_height),\n\t\tstr_replace('%section%', 'post', $header_title_spacing),\n\t\tstr_replace('%section%', 'post', $header_title_weight),\n\t\tstr_replace('%section%', 'post', $header_title_transform),\n\t\tstr_replace('%section%', 'post', $header_title_italic),\n\t\tstr_replace('%section%', 'post', $header_text_animation),\n\t\tstr_replace('%section%', 'post', $header_animation_speed),\n\t\tstr_replace('%section%', 'post', $header_animation_delay),\n\t\tstr_replace('%section%', 'post', $header_featured),\n\t\tstr_replace('%section%', 'post', $header_background),\n\t\tstr_replace('%section%', 'post', $header_parallax),\n\t\tstr_replace('%section%', 'post', $header_kburns),\n\t\tstr_replace('%section%', 'post', $header_overlay_color),\n\t\tstr_replace('%section%', 'post', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'post', $body_section_title),\n\t\tstr_replace('%section%', 'post', $body_layout_width),\n\t\tstr_replace('%section%', 'post', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'post', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post', $breadcrumb_align),\n\t\t// str_replace('%section%', 'post', $body_uncode_block_before),\n\t\tstr_replace('%section%', 'post', $show_title),\n\t\tstr_replace('%section%', 'post', $show_media),\n\t\tstr_replace('%section%', 'post', $show_featured_media),\n\t\tstr_replace('%section%', 'post', $show_comments),\n\t\tstr_replace('%section%', 'post', $show_share),\n\t\tstr_replace('%section%', 'post', $show_tags),\n\t\tstr_replace('%section%', 'post', $show_tags_align),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after_pre),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'post', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post', $sidebar_widget),\n\t\tstr_replace('%section%', 'post', $sidebar_position),\n\t\tstr_replace('%section%', 'post', $sidebar_size),\n\t\tstr_replace('%section%', 'post', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post', $sidebar_style),\n\t\tstr_replace('%section%', 'post', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post', $sidebar_fill),\n\n\t\tstr_replace('%section%', 'post', $navigation_section_title),\n\t\tstr_replace('%section%', 'post', $navigation_activate),\n\t\tstr_replace('%section%', 'post', $navigation_page_index),\n\t\tstr_replace('%section%', 'post', $navigation_index_label),\n\t\tstr_replace('%section%', 'post', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'post', $footer_section_title),\n\t\tstr_replace('%section%', 'post', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post', $footer_width),\n\t\tstr_replace('%section%', 'post', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'post', $custom_fields_list),\n\t\t///////////////\n\t\t// Page\t\t///\n\t\t///////////////\n\t\tstr_replace('%section%', 'page', $menu_section_title),\n\t\tstr_replace('%section%', 'page', $menu),\n\t\tstr_replace('%section%', 'page', $menu_width),\n\t\tstr_replace('%section%', 'page', $menu_opaque),\n\t\tstr_replace('%section%', 'page', $header_section_title),\n\t\tstr_replace('%section%', 'page', $header_type),\n\t\tstr_replace('%section%', 'page', $header_uncode_block),\n\t\tstr_replace('%section%', 'page', $header_revslider),\n\t\tstr_replace('%section%', 'page', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page', $header_width),\n\t\tstr_replace('%section%', 'page', $header_height),\n\t\tstr_replace('%section%', 'page', $header_min_height),\n\t\tstr_replace('%section%', 'page', $header_title),\n\t\tstr_replace('%section%', 'page', $header_style),\n\t\tstr_replace('%section%', 'page', $header_content_width),\n\t\tstr_replace('%section%', 'page', $header_custom_width),\n\t\tstr_replace('%section%', 'page', $header_align),\n\t\tstr_replace('%section%', 'page', $header_position),\n\t\tstr_replace('%section%', 'page', $header_title_font),\n\t\tstr_replace('%section%', 'page', $header_title_size),\n\t\tstr_replace('%section%', 'page', $header_title_height),\n\t\tstr_replace('%section%', 'page', $header_title_spacing),\n\t\tstr_replace('%section%', 'page', $header_title_weight),\n\t\tstr_replace('%section%', 'page', $header_title_transform),\n\t\tstr_replace('%section%', 'page', $header_title_italic),\n\t\tstr_replace('%section%', 'page', $header_text_animation),\n\t\tstr_replace('%section%', 'page', $header_animation_speed),\n\t\tstr_replace('%section%', 'page', $header_animation_delay),\n\t\tstr_replace('%section%', 'page', $header_featured),\n\t\tstr_replace('%section%', 'page', $header_background),\n\t\tstr_replace('%section%', 'page', $header_parallax),\n\t\tstr_replace('%section%', 'page', $header_kburns),\n\t\tstr_replace('%section%', 'page', $header_overlay_color),\n\t\tstr_replace('%section%', 'page', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page', $header_scrolldown),\n\t\tstr_replace('%section%', 'page', $body_section_title),\n\t\tstr_replace('%section%', 'page', $body_layout_width),\n\t\tstr_replace('%section%', 'page', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'page', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'page', $show_media),\n\t\tstr_replace('%section%', 'page', $show_featured_media),\n\t\tstr_replace('%section%', 'page', $show_comments),\n\t\tstr_replace('%section%', 'page', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'page', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page', $sidebar_activate),\n\t\tstr_replace('%section%', 'page', $sidebar_widget),\n\t\tstr_replace('%section%', 'page', $sidebar_position),\n\t\tstr_replace('%section%', 'page', $sidebar_size),\n\t\tstr_replace('%section%', 'page', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page', $sidebar_style),\n\t\tstr_replace('%section%', 'page', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page', $sidebar_fill),\n\t\tstr_replace('%section%', 'page', $footer_section_title),\n\t\tstr_replace('%section%', 'page', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page', $footer_width),\n\t\tstr_replace('%section%', 'page', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'page', $custom_fields_list),\n\t\t///////////////////////////\n\t\t// Portfolio Single\t\t///\n\t\t///////////////////////////\n\t\tstr_replace('%section%', 'portfolio', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio', $menu),\n\t\tstr_replace('%section%', 'portfolio', $menu_width),\n\t\tstr_replace('%section%', 'portfolio', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio', $header_type),\n\t\tstr_replace('%section%', 'portfolio', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio', $header_width),\n\t\tstr_replace('%section%', 'portfolio', $header_height),\n\t\tstr_replace('%section%', 'portfolio', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title),\n\t\tstr_replace('%section%', 'portfolio', $header_style),\n\t\tstr_replace('%section%', 'portfolio', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio', $header_align),\n\t\tstr_replace('%section%', 'portfolio', $header_position),\n\t\tstr_replace('%section%', 'portfolio', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio', $header_featured),\n\t\tstr_replace('%section%', 'portfolio', $header_background),\n\t\tstr_replace('%section%', 'portfolio', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'portfolio', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'portfolio', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'portfolio', $show_media),\n\t\tstr_replace('%section%', 'portfolio', $show_featured_media),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_comments, 'std', 'off')),\n\t\tstr_replace('%section%', 'portfolio', $show_share),\n\t\tstr_replace('%section%', 'portfolio', $body_uncode_block_after),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . esc_html__('Details', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Create here all the %s details label that you need.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_portfolio_detail_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'detail-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => sprintf(esc_html__('Unique %s detail ID','uncode') , $portfolio_cpt_name) ,\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_position',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details layout', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Specify the layout template for all the %s posts.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_top',\n\t\t\t\t\t'label' => esc_html__('Details on the top', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t\t'label' => esc_html__('Details on the right', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_bottom',\n\t\t\t\t\t'label' => esc_html__('Details on the bottom', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t\t'label' => esc_html__('Details on the left', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_size',\n\t\t\t'label' => esc_html__('Sidebar size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set the sidebar size.', 'uncode') ,\n\t\t\t'std' => '4',\n\t\t\t'min_max_step' => '1,12,1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t) ,\n\t\tstr_replace('%section%', 'portfolio', run_array_to($sidebar_sticky, 'condition', '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar text skin color.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_bgcolor',\n\t\t\t'label' => esc_html__('Sidebar color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_fill',\n\t\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'std' => 'off',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_sidebar_bgcolor:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t),\n\t\tstr_replace('%section%', 'portfolio', $navigation_section_title),\n\t\tstr_replace('%section%', 'portfolio', $navigation_activate),\n\t\tstr_replace('%section%', 'portfolio', $navigation_page_index),\n\t\tstr_replace('%section%', 'portfolio', $navigation_index_label),\n\t\tstr_replace('%section%', 'portfolio', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $footer_width),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_list),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_single_options );\n\n\t$custom_settings_two = array(\n\t\t///////////////////\n\t\t// Page 404\t\t///\n\t\t///////////////////\n\t\tstr_replace('%section%', '404', $menu_section_title),\n\t\tstr_replace('%section%', '404', $menu),\n\t\tstr_replace('%section%', '404', $menu_width),\n\t\tstr_replace('%section%', '404', $menu_opaque),\n\t\tstr_replace('%section%', '404', $header_section_title),\n\t\tstr_replace('%section%', '404', $header_type),\n\t\tstr_replace('%section%', '404', $header_uncode_block),\n\t\tstr_replace('%section%', '404', $header_revslider),\n\t\tstr_replace('%section%', '404', $header_layerslider),\n\n\t\tstr_replace('%section%', '404', $header_width),\n\t\tstr_replace('%section%', '404', $header_height),\n\t\tstr_replace('%section%', '404', $header_min_height),\n\t\tstr_replace('%section%', '404', $header_title),\n\t\tstr_replace('%section%', '404', $header_title_text),\n\t\tstr_replace('%section%', '404', $header_style),\n\t\tstr_replace('%section%', '404', $header_content_width),\n\t\tstr_replace('%section%', '404', $header_custom_width),\n\t\tstr_replace('%section%', '404', $header_align),\n\t\tstr_replace('%section%', '404', $header_position),\n\t\tstr_replace('%section%', '404', $header_title_font),\n\t\tstr_replace('%section%', '404', $header_title_size),\n\t\tstr_replace('%section%', '404', $header_title_height),\n\t\tstr_replace('%section%', '404', $header_title_spacing),\n\t\tstr_replace('%section%', '404', $header_title_weight),\n\t\tstr_replace('%section%', '404', $header_title_transform),\n\t\tstr_replace('%section%', '404', $header_title_italic),\n\t\tstr_replace('%section%', '404', $header_text_animation),\n\t\tstr_replace('%section%', '404', $header_animation_speed),\n\t\tstr_replace('%section%', '404', $header_animation_delay),\n\t\tstr_replace('%section%', '404', $header_background),\n\t\tstr_replace('%section%', '404', $header_parallax),\n\t\tstr_replace('%section%', '404', $header_kburns),\n\t\tstr_replace('%section%', '404', $header_overlay_color),\n\t\tstr_replace('%section%', '404', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', '404', $header_scroll_opacity),\n\t\tstr_replace('%section%', '404', $header_scrolldown),\n\n\t\tstr_replace('%section%', '404', $body_section_title),\n\t\tstr_replace('%section%', '404', $body_layout_width),\n\t\tstr_replace('%section%', '404', $uncodeblock_404),\n\t\tstr_replace('%section%', '404', $uncodeblocks_404),\n\t\tstr_replace('%section%', '404', $footer_section_title),\n\t\tstr_replace('%section%', '404', $footer_uncode_block),\n\t\tstr_replace('%section%', '404', $footer_width),\n\t\t//////////////////////\n\t\t// Posts Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post_index', $menu_section_title),\n\t\tstr_replace('%section%', 'post_index', $menu),\n\t\tstr_replace('%section%', 'post_index', $menu_width),\n\t\tstr_replace('%section%', 'post_index', $menu_opaque),\n\t\tstr_replace('%section%', 'post_index', $header_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $header_revslider),\n\t\tstr_replace('%section%', 'post_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post_index', $header_width),\n\t\tstr_replace('%section%', 'post_index', $header_height),\n\t\tstr_replace('%section%', 'post_index', $header_min_height),\n\t\tstr_replace('%section%', 'post_index', $header_title),\n\t\tstr_replace('%section%', 'post_index', $header_style),\n\t\tstr_replace('%section%', 'post_index', $header_content_width),\n\t\tstr_replace('%section%', 'post_index', $header_custom_width),\n\t\tstr_replace('%section%', 'post_index', $header_align),\n\t\tstr_replace('%section%', 'post_index', $header_position),\n\t\tstr_replace('%section%', 'post_index', $header_title_font),\n\t\tstr_replace('%section%', 'post_index', $header_title_size),\n\t\tstr_replace('%section%', 'post_index', $header_title_height),\n\t\tstr_replace('%section%', 'post_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'post_index', $header_title_weight),\n\t\tstr_replace('%section%', 'post_index', $header_title_transform),\n\t\tstr_replace('%section%', 'post_index', $header_title_italic),\n\t\tstr_replace('%section%', 'post_index', $header_text_animation),\n\t\tstr_replace('%section%', 'post_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'post_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'post_index', $header_featured),\n\t\tstr_replace('%section%', 'post_index', $header_background),\n\t\tstr_replace('%section%', 'post_index', $header_parallax),\n\t\tstr_replace('%section%', 'post_index', $header_kburns),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'post_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'post_index', $body_section_title),\n\t\tstr_replace('%section%', 'post_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'post_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $body_layout_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'post_index', $show_title),\n\t\tstr_replace('%section%', 'post_index', $remove_pagination),\n\t\tstr_replace('%section%', 'post_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'post_index', $sidebar_position),\n\t\tstr_replace('%section%', 'post_index', $sidebar_size),\n\t\tstr_replace('%section%', 'post_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post_index', $sidebar_style),\n\t\tstr_replace('%section%', 'post_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'post_index', $footer_section_title),\n\t\tstr_replace('%section%', 'post_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $footer_width),\n\t\t//////////////////////\n\t\t// Pages Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'page_index', $menu_section_title),\n\t\tstr_replace('%section%', 'page_index', $menu),\n\t\tstr_replace('%section%', 'page_index', $menu_width),\n\t\tstr_replace('%section%', 'page_index', $menu_opaque),\n\t\tstr_replace('%section%', 'page_index', $header_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'page_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $header_revslider),\n\t\tstr_replace('%section%', 'page_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page_index', $header_width),\n\t\tstr_replace('%section%', 'page_index', $header_height),\n\t\tstr_replace('%section%', 'page_index', $header_min_height),\n\t\tstr_replace('%section%', 'page_index', $header_title),\n\t\tstr_replace('%section%', 'page_index', $header_style),\n\t\tstr_replace('%section%', 'page_index', $header_content_width),\n\t\tstr_replace('%section%', 'page_index', $header_custom_width),\n\t\tstr_replace('%section%', 'page_index', $header_align),\n\t\tstr_replace('%section%', 'page_index', $header_position),\n\t\tstr_replace('%section%', 'page_index', $header_title_font),\n\t\tstr_replace('%section%', 'page_index', $header_title_size),\n\t\tstr_replace('%section%', 'page_index', $header_title_height),\n\t\tstr_replace('%section%', 'page_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'page_index', $header_title_weight),\n\t\tstr_replace('%section%', 'page_index', $header_title_transform),\n\t\tstr_replace('%section%', 'page_index', $header_title_italic),\n\t\tstr_replace('%section%', 'page_index', $header_text_animation),\n\t\tstr_replace('%section%', 'page_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'page_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'page_index', $header_featured),\n\t\tstr_replace('%section%', 'page_index', $header_background),\n\t\tstr_replace('%section%', 'page_index', $header_parallax),\n\t\tstr_replace('%section%', 'page_index', $header_kburns),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding_mobile),\n\n\t\tstr_replace('%section%', 'page_index', $body_section_title),\n\t\tstr_replace('%section%', 'page_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $body_layout_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'page_index', $show_title),\n\t\tstr_replace('%section%', 'page_index', $remove_pagination),\n\t\tstr_replace('%section%', 'page_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'page_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'page_index', $sidebar_position),\n\t\tstr_replace('%section%', 'page_index', $sidebar_size),\n\t\tstr_replace('%section%', 'page_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page_index', $sidebar_style),\n\t\tstr_replace('%section%', 'page_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'page_index', $footer_section_title),\n\t\tstr_replace('%section%', 'page_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $footer_width),\n\t\t////////////////////////\n\t\t// Archive Index\t\t///\n\t\t////////////////////////\n\t\tstr_replace('%section%', 'portfolio_index', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $menu),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_width),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio_index', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'portfolio_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio_index', $header_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title),\n\t\tstr_replace('%section%', 'portfolio_index', $header_style),\n\t\tstr_replace('%section%', 'portfolio_index', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_align),\n\t\tstr_replace('%section%', 'portfolio_index', $header_position),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio_index', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio_index', $header_featured),\n\t\tstr_replace('%section%', 'portfolio_index', $header_background),\n\t\tstr_replace('%section%', 'portfolio_index', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio_index', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'portfolio_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'portfolio_index', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'portfolio_index', $show_title),\n\t\tstr_replace('%section%', 'portfolio_index', $remove_pagination),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_position),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_size),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_style),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_width),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_two );\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_index_options );\n\n\t$custom_settings_three = array(\n\t\t///////////////////////\n\t\t// Search Index\t\t///\n\t\t///////////////////////\n\t\tstr_replace('%section%', 'search_index', $menu_section_title),\n\t\tstr_replace('%section%', 'search_index', $menu),\n\t\tstr_replace('%section%', 'search_index', $menu_width),\n\t\tstr_replace('%section%', 'search_index', $menu_opaque),\n\t\tstr_replace('%section%', 'search_index', $header_section_title),\n\t\tstr_replace('%section%', 'search_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'search_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $header_revslider),\n\t\tstr_replace('%section%', 'search_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'search_index', $header_width),\n\t\tstr_replace('%section%', 'search_index', $header_height),\n\t\tstr_replace('%section%', 'search_index', $header_min_height),\n\t\tstr_replace('%section%', 'search_index', $header_title),\n\t\tstr_replace('%section%', 'search_index', $header_title_text),\n\t\tstr_replace('%section%', 'search_index', $header_style),\n\t\tstr_replace('%section%', 'search_index', $header_content_width),\n\t\tstr_replace('%section%', 'search_index', $header_custom_width),\n\t\tstr_replace('%section%', 'search_index', $header_align),\n\t\tstr_replace('%section%', 'search_index', $header_position),\n\t\tstr_replace('%section%', 'search_index', $header_title_font),\n\t\tstr_replace('%section%', 'search_index', $header_title_size),\n\t\tstr_replace('%section%', 'search_index', $header_title_height),\n\t\tstr_replace('%section%', 'search_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'search_index', $header_title_weight),\n\t\tstr_replace('%section%', 'search_index', $header_title_transform),\n\t\tstr_replace('%section%', 'search_index', $header_title_italic),\n\t\tstr_replace('%section%', 'search_index', $header_text_animation),\n\t\tstr_replace('%section%', 'search_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'search_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'search_index', $header_background),\n\t\tstr_replace('%section%', 'search_index', $header_parallax),\n\t\tstr_replace('%section%', 'search_index', $header_kburns),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'search_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'search_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'search_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'search_index', $body_section_title),\n\t\tstr_replace('%section%', 'search_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $body_layout_width),\n\t\tstr_replace('%section%', 'search_index', $remove_pagination),\n\t\tstr_replace('%section%', 'search_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'search_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'search_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'search_index', $sidebar_position),\n\t\tstr_replace('%section%', 'search_index', $sidebar_size),\n\t\tstr_replace('%section%', 'search_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'search_index', $sidebar_style),\n\t\tstr_replace('%section%', 'search_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'search_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'search_index', $footer_section_title),\n\t\tstr_replace('%section%', 'search_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $footer_width),\n\n\t\tarray(\n\t\t\t'id' => '_uncode_sidebars',\n\t\t\t'label' => esc_html__('Site sidebars', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the sidebars you will need. A default sidebar is already defined.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_sidebars_section',\n\t\t\t'class' => 'list-item',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_sidebar_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'sidebar-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique sidebar ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_groups',\n\t\t\t'label' => esc_html__('Custom fonts', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the fonts you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'Font Default',\n\t\t\t\t\t'_uncode_font_group_unique_id' => 'font-555555',\n\t\t\t\t\t'_uncode_font_group' => 'manual',\n\t\t\t\t\t'_uncode_font_manual' => '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'font-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group',\n\t\t\t\t\t'label' => esc_html__('Uncode font', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify a font.', 'uncode') ,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => $title_font,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_manual',\n\t\t\t\t\t'label' => esc_html__('Font family', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter a font family.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '_uncode_font_group:is(manual)',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_size',\n\t\t\t'label' => esc_html__('Default font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for p,li,dt,dd,dl,address,label,small,pre in px.', 'uncode') ,\n\t\t\t'std' => '15',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_large_text_size',\n\t\t\t'label' => esc_html__('Large text font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for large text in px.', 'uncode') ,\n\t\t\t'std' => '18',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h1',\n\t\t\t'label' => esc_html__('Font size H1', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H1 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '35',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h2',\n\t\t\t'label' => esc_html__('Font size H2', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H2 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '29',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h3',\n\t\t\t'label' => esc_html__('Font size H3', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H3 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '24',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h4',\n\t\t\t'label' => esc_html__('Font size H4', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H4 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h5',\n\t\t\t'label' => esc_html__('Font size H5', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H5 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '17',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h6',\n\t\t\t'label' => esc_html__('Font size H6', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H6 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '14',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_sizes',\n\t\t\t'label' => esc_html__('Custom font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font sizes you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontsize-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font size ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size',\n\t\t\t\t\t'label' => esc_html__('Font size', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Font size in <b>px</b>.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_heights',\n\t\t\t'label' => esc_html__('Custom line height', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font line heights you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontheight-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font height ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height',\n\t\t\t\t\t'label' => esc_html__('Font line height', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Insert a line height.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_spacings',\n\t\t\t'label' => esc_html__('Custom letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the letter spacings you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontspace-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique letter spacing ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing',\n\t\t\t\t\t'label' => esc_html__('Letter spacing', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Letter spacing with the unit (em or px). Ex. 0.2em', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_colors_list',\n\t\t\t'label' => esc_html__('Color palettes', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define all the colors you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Black','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-jevc',\n\t\t\t\t\t'_uncode_custom_color' => '#000000',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-nhtu',\n\t\t\t\t\t'_uncode_custom_color' => '#101213',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wayh',\n\t\t\t\t\t'_uncode_custom_color' => '#141618',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-rgdb',\n\t\t\t\t\t'_uncode_custom_color' => '#1b1d1f',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-prif',\n\t\t\t\t\t'_uncode_custom_color' => '#303133',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('White','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-xsdn',\n\t\t\t\t\t'_uncode_custom_color' => '#ffffff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-lxmt',\n\t\t\t\t\t'_uncode_custom_color' => '#f7f7f7',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-gyho',\n\t\t\t\t\t'_uncode_custom_color' => '#eaeaea',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-uydo',\n\t\t\t\t\t'_uncode_custom_color' => '#dddddd',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wvjs',\n\t\t\t\t\t'_uncode_custom_color' => '#777',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Cerulean','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-vyce',\n\t\t\t\t\t'_uncode_custom_color' => '#0cb4ce',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Blue Ribbon','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-210407',\n\t\t\t\t\t'_uncode_custom_color' => '#006cff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_colors_section',\n\t\t\t'class' => 'list-colors',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_unique_id',\n\t\t\t\t\t'std' => 'color-',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique color ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_regular',\n\t\t\t\t\t'label' => esc_html__('Monochrome', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to assign a monochromatic color, otherwise a gradient will be used.', 'uncode') ,\n\t\t\t\t\t'std' => 'on',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'section' => 'uncode_customize_section',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color',\n\t\t\t\t\t'label' => esc_html__('Colorpicker', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the color for this palette. You can also define a color with the alpha value.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(on)',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_gradient',\n\t\t\t\t\t'label' => esc_html__('Gradient', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the gradient color for this palette. NB. You can use a gradient color only as a background color.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'gradientpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(off)',\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_light_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-o\"></i> ' . esc_html__('Light skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_light',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_light',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_light',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-gyho',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_light',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_light',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_light',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-wvjs',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_light',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_dark_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square\"></i> ' . esc_html__('Dark skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_dark',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_dark',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-rgdb',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_dark',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_dark',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_dark',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_dark',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_background',\n\t\t\t'label' => esc_html__('HTML body background', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body background color and media.', 'uncode') ,\n\t\t\t'type' => 'background',\n\t\t\t'std' => array(\n\t\t\t\t'background-color' => 'color-lxmt',\n\t\t\t\t'background-repeat' => '',\n\t\t\t\t'background-attachment' => '',\n\t\t\t\t'background-position' => '',\n\t\t\t\t'background-size' => '',\n\t\t\t\t'background-image' => '',\n\t\t\t),\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_accent_color',\n\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the accent color.', 'uncode') ,\n\t\t\t'std' => 'color-210407',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_link_color',\n\t\t\t'label' => esc_html__('Links color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the color of links in page textual contents.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'accent',\n\t\t\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_family',\n\t\t\t'label' => esc_html__('Body font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_weight',\n\t\t\t'label' => esc_html__('Body font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font weight.', 'uncode') ,\n\t\t\t'std' => '400',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_family',\n\t\t\t'label' => esc_html__('UI font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_weight',\n\t\t\t'label' => esc_html__('UI font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_family',\n\t\t\t'label' => esc_html__('Headings font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_weight',\n\t\t\t'label' => esc_html__('Headings font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Headings font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Headings letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs.', 'uncode') ,\n\t\t\t'std' => '0.00',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_input_underline',\n\t\t\t'label' => esc_html__('Input text underlined', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to style all the input text with the underline.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_fallback_font',\n\t\t\t'label' => esc_html__('Fallback font', 'uncode') ,\n\t\t\t'desc' => esc_html__('Select a font to use as fallback when Google Fonts import is not available.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_overlay_menu_style',\n\t\t\t'label' => esc_html__('Overlay menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_hover',\n\t\t\t'label' => esc_html__('Menu highlight color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu active and hover effect color (If not specified an opaque version of the menu color will be used).', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_menu_style',\n\t\t\t'label' => esc_html__('Primary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_submenu_style',\n\t\t\t'label' => esc_html__('Primary submenu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_menu_style',\n\t\t\t'label' => esc_html__('Secondary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu skin.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_size',\n\t\t\t'label' => esc_html__('Menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size. NB: the Overlay menu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_font_size',\n\t\t\t'label' => esc_html__('Submenu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the submenu font size. NB: the Overlay submenu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_font_size',\n\t\t\t'label' => esc_html__('Mobile menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size for mobile (when the Navbar > Animation > is not Menu Centered Mobile).', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_family',\n\t\t\t'label' => esc_html__('Menu font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_weight',\n\t\t\t'label' => esc_html__('Menu font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Menu letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs (the default value is 0.05).', 'uncode') ,\n\t\t\t'std' => '0.05',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_first_uppercase',\n\t\t\t'label' => esc_html__('Menu first level uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform the first menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_other_uppercase',\n\t\t\t'label' => esc_html__('Menu other levels uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform all the others menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_bg_color',\n\t\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom content background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_buttons_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Buttons and Forms', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_family',\n\t\t\t'label' => esc_html__('Buttons font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_weight',\n\t\t\t'label' => esc_html__('Buttons font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_text_transform',\n\t\t\t'label' => esc_html__('Buttons text transform', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons text transform.', 'uncode') ,\n\t\t\t'std' => 'uppercase',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'initial',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'uppercase',\n\t\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lowercase',\n\t\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'capitalize',\n\t\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_letter_spacing',\n\t\t\t'label' => esc_html__('Buttons letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing value.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $btn_letter_spacing,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_border_width',\n\t\t\t'label' => esc_html__('Button and form fields border', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the width of the borders for buttons and form fields', 'uncode') ,\n\t\t\t'std' => '1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,5,1',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_button_hover',\n\t\t\t'label' => esc_html__('Button hover effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify an effect on hover state.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Outlined', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'full-colored',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_style',\n\t\t\t'label' => esc_html__('Copyright area skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the copyright area skin color.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_bg_color',\n\t\t\t'label' => esc_html__('Copyright area custom background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom copyright area background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_extra_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Scroll & Parallax', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant',\n\t\t\t'label' => esc_html__('ScrollTo constant speed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to always have a constant speed when scrolling to point.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant_factor',\n\t\t\t'label' => esc_html__('ScrollTo constant speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the constant scroll speed factor. Default 2', 'uncode') ,\n\t\t\t'std' => '2',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,15,0.25',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_speed_value',\n\t\t\t'label' => esc_html__('ScrollTo speed fixed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the scroll speed time in milliseconds.', 'uncode') ,\n\t\t\t'std' => '1000',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_parallax_factor',\n\t\t\t'label' => esc_html__('Parallax speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the parallax speed factor. Default 2.5', 'uncode') ,\n\t\t\t'std' => '2.5',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0.5,3,0.5',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_portfolio_block_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT label', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type label.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt_slug',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT slug', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type slug.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t)\n\t);\n\n\tif (class_exists('WooCommerce')) {\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_block_title',\n\t\t\t'label' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_cart_icon',\n\t\t\t'label' => esc_html__('Cart icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the cart icon', 'uncode') ,\n\t\t\t'std' => 'fa fa-bag',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'button_icon_container',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_hooks',\n\t\t\t'label' => esc_html__('Enable Hooks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable default WooCommerce hooks on product loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_enhanced_atc',\n\t\t\t'label' => esc_html__('Enhance Add To Cart Button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable the enhanced Add To Cart button on loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\t}\n\n\t$custom_settings_four = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_admin_block_title',\n\t\t\t'label' => '<i class=\"fa fa-dashboard\"></i> ' . esc_html__('Admin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_admin_help',\n\t\t\t'label' => esc_html__('Help button in admin bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Uncode help button in the WP admin bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t);\n\n\t$custom_settings_five = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_layout_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_full',\n\t\t\t'label' => esc_html__('Footer full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Expand the footer to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-cog2\"></i> ' . esc_html__('Widget area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_block',\n\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Content Block to use as a footer content.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'custom-post-type-select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'post_type' => 'uncodeblock',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_block_title',\n\t\t\t'label' => '<i class=\"fa fa-copyright\"></i> ' . esc_html__('Copyright area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_copy_hide',\n\t\t\t'label' => esc_html__('Hide Copyright Area', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'desc' => esc_html__('Activate this to hide the Copyright Area.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_copyright',\n\t\t\t'label' => esc_html__('Automatic copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use an automatic copyright text.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_text',\n\t\t\t'label' => esc_html__('Custom copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert a custom text for the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_footer_copyright:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_position',\n\t\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the footer copyright text alignment.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_social',\n\t\t\t'label' => esc_html__('Social links', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to have the social icons in the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow',\n\t\t\t'label' => esc_html__('Scroll up button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow_mobile',\n\t\t\t'label' => esc_html__('Scroll up button on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer for mobile devices.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'condition' => '_uncode_footer_uparrow:is(on)',\n\t\t\t'operator' => 'and',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_social_list',\n\t\t\t'label' => esc_html__('Social Networks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the social networks you will need.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_connections_section',\n\t\t\t'class' => 'list-social',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'social-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique social ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social',\n\t\t\t\t\t'label' => esc_html__('Social Network Icon', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the social network icon.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'class' => 'button_icon_container',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_link',\n\t\t\t\t\t'label' => esc_html__('Social Network Link', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter your social network link.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_menu_hidden',\n\t\t\t\t\t'label' => esc_html__('Hide In The Menu', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to hide the social icon in the menu (if the social connections in the menu is active).', 'uncode') ,\n\t\t\t\t\t'std' => 'off',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_gmaps_api',\n\t\t\t'label' => esc_html__('Google Maps API KEY', 'uncode') ,\n\t\t\t'desc' => sprintf( wp_kses(__( 'To use Uncode custom styled Google Maps you need to create <a href=\"%s\" target=\"_blank\">here the Google API KEY</a> and paste it in this field.', 'uncode' ), array( 'a' => array( 'href' => array(),'target' => array() ) ) ), 'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key' ),\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_gmaps_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_css',\n\t\t\t'label' => esc_html__('CSS', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom CSS.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'css',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_js',\n\t\t\t'label' => esc_html__('Javascript', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Javacript code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_tracking',\n\t\t\t'label' => esc_html__('Tracking', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Tracking code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive',\n\t\t\t'label' => esc_html__('Adaptive images', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to take advantage of the Adaptive Images system. Adaptive Images detects your visitor\\'s screen size and automatically delivers device appropriate re-scaled images.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async',\n\t\t\t'label' => esc_html__('Asynchronous adaptive image system', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to load the adaptive images asynchronously, this will improve the loading performance and it\\'s necessary if using an aggresive caching system.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async_blur',\n\t\t\t'label' => esc_html__('Asynchronous loading blur effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use a bluring effect when loading the images.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_async:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_mobile_advanced',\n\t\t\t'label' => esc_html__('Mobile settings', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to set specific mobile options.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_use_orientation_width',\n\t\t\t'label' => esc_html__('Use current mobile orientation width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use the current mobile orientation width (portrait or landscape) instead of the max device\\'s width (landscape).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_limit_density',\n\t\t\t'label' => esc_html__('Limit device density', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to limit the pixel density to 2 when generating the most appropriate image for high pixel density displays.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_quality',\n\t\t\t'label' => esc_html__('Image quality', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the images compression quality.', 'uncode') ,\n\t\t\t'std' => '90',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '60,100,1',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_sizes',\n\t\t\t'label' => esc_html__('Image sizes range', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter all the image sizes you want use for the Adaptive Images system. NB. The values needs to be comma separated.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'std' => '258,516,720,1032,1440,2064,2880',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_htaccess',\n\t\t\t'label' => esc_html__('Apache Server Configs', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the enhanced .htaccess, this will improve the web site\\'s performance and security.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_production',\n\t\t\t'label' => esc_html__('Production mode', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to switch to production mode, the CSS and JS will be cached by the browser and the JS minified.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect',\n\t\t\t'label' => esc_html__('Activate page redirect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to redirect all the website calls to a specific page. NB. This can only be visible when the user is not logged in.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect_page',\n\t\t\t'label' => esc_html__('Redirect page', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the redirect page. NB. This page will be presented without menu and footer.', 'uncode') ,\n\t\t\t'type' => 'page_select',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t\t'post_type' => 'page',\n\t\t\t'condition' => '_uncode_redirect:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_three );\n\n\tif ( ! defined('ENVATO_HOSTED_SITE') )\n\t\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_four );\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_five );\n\n\t$custom_settings = array(\n\t\t'sections' => $custom_settings_section_one,\n\t\t'settings' => $custom_settings_one,\n\t);\n\n\tif (class_exists('WooCommerce'))\n\t{\n\n\t\t$woo_section = array(\n\t\t\t// array(\n\t\t\t// \t'id' => 'uncode_woocommerce_section',\n\t\t\t// \t'title' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode')\n\t\t\t// ),\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Product', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_index_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Products', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t) ,\n\t\t);\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Select…', 'uncode')\n\t\t);\n\t\t$menu_array = array();\n\t\t$nav_menus = get_registered_nav_menus();\n\n\t\tforeach ($nav_menus as $location => $description)\n\t\t{\n\n\t\t\t$menu_array['value'] = $location;\n\t\t\t$menu_array['label'] = $description;\n\t\t\t$menus_array[] = $menu_array;\n\t\t}\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => 'social',\n\t\t\t'label' => esc_html__('Social Menu', 'uncode')\n\t\t);\n\n\t\t$woocommerce_post = array(\n\t\t\t/////////////////////////\n\t\t\t// Product Single\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product', $menu),\n\t\t\tstr_replace('%section%', 'product', $menu_width),\n\t\t\tstr_replace('%section%', 'product', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product', $header_section_title),\n\t\t\tstr_replace('%section%', 'product', $header_type),\n\t\t\tstr_replace('%section%', 'product', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $header_revslider),\n\t\t\tstr_replace('%section%', 'product', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product', $header_width),\n\t\t\tstr_replace('%section%', 'product', $header_height),\n\t\t\tstr_replace('%section%', 'product', $header_min_height),\n\t\t\tstr_replace('%section%', 'product', $header_title),\n\t\t\tstr_replace('%section%', 'product', $header_style),\n\t\t\tstr_replace('%section%', 'product', $header_content_width),\n\t\t\tstr_replace('%section%', 'product', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product', $header_align),\n\t\t\tstr_replace('%section%', 'product', $header_position),\n\t\t\tstr_replace('%section%', 'product', $header_title_font),\n\t\t\tstr_replace('%section%', 'product', $header_title_size),\n\t\t\tstr_replace('%section%', 'product', $header_title_height),\n\t\t\tstr_replace('%section%', 'product', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product', $header_featured),\n\t\t\tstr_replace('%section%', 'product', $header_background),\n\t\t\tstr_replace('%section%', 'product', $header_parallax),\n\t\t\tstr_replace('%section%', 'product', $header_kburns),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product', $header_scrolldown),\n\n\t\t\tstr_replace('%section%', 'product', $body_section_title),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width_custom),\n\t\t\tstr_replace('%section%', 'product', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product', $show_title),\n\t\t\tstr_replace('%section%', 'product', $show_share),\n\t\t\tstr_replace('%section%', 'product', $image_layout),\n\t\t\tstr_replace('%section%', 'product', $media_size),\n\t\t\tstr_replace('%section%', 'product', $enable_sticky_desc),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_zoom),\n\t\t\tstr_replace('%section%', 'product', $thumb_cols),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_slider),\n\t\t\tstr_replace('%section%', 'product', $body_uncode_block_after),\n\t\t\tstr_replace('%section%', 'product', $navigation_section_title),\n\t\t\tstr_replace('%section%', 'product', $navigation_activate),\n\t\t\tstr_replace('%section%', 'product', $navigation_page_index),\n\t\t\tstr_replace('%section%', 'product', $navigation_index_label),\n\t\t\tstr_replace('%section%', 'product', $navigation_nextprev_title),\n\t\t\tstr_replace('%section%', 'product', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $footer_width),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_section_title),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_list),\n\t\t\t/////////////////////////\n\t\t\t// Products Index\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product_index', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $menu),\n\t\t\tstr_replace('%section%', 'product_index', $menu_width),\n\t\t\tstr_replace('%section%', 'product_index', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product_index', $header_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\t\tstr_replace('%section%', 'product_index', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $header_revslider),\n\t\t\tstr_replace('%section%', 'product_index', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product_index', $header_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_min_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title),\n\t\t\tstr_replace('%section%', 'product_index', $header_style),\n\t\t\tstr_replace('%section%', 'product_index', $header_content_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_align),\n\t\t\tstr_replace('%section%', 'product_index', $header_position),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_font),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_size),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product_index', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product_index', $header_featured),\n\t\t\tstr_replace('%section%', 'product_index', $header_background),\n\t\t\tstr_replace('%section%', 'product_index', $header_parallax),\n\t\t\tstr_replace('%section%', 'product_index', $header_kburns),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product_index', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product_index', $header_scrolldown),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding_mobile),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_activate),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_text),\n\t\t\tstr_replace('%section%', 'product_index', $subtitle_archive_custom_text),\n\n\t\t\tstr_replace('%section%', 'product_index', $body_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product_index', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product_index', $body_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product_index', $body_single_post_width),\n\t\t\tstr_replace('%section%', 'product_index', $show_title),\n\t\t\tstr_replace('%section%', 'product_index', $remove_pagination),\n\t\t\tstr_replace('%section%', 'product_index', $products_per_page),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_widget),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_position),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_size),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_sticky),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_style),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_bgcolor),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_fill),\n\t\t\tstr_replace('%section%', 'product_index', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $footer_width),\n\t\t);\n\n\t\t$custom_settings['sections'] = array_merge( $custom_settings['sections'], $woo_section );\n\t\t// array_push($custom_settings['settings'], $woocommerce_cart_icon);\n\t\t// array_push($custom_settings['settings'], $woocommerce_hooks);\n\t\t$custom_settings['settings'] = array_merge( $custom_settings['settings'], $woocommerce_post );\n\n\t}\n\n\t$custom_settings['settings'] = array_filter( $custom_settings['settings'], 'uncode_is_not_null' );\n\n\t/* allow settings to be filtered before saving */\n\t$custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);\n\n\t/* settings are not the same update the DB */\n\tif ($saved_settings !== $custom_settings)\n\t{\n\t\tupdate_option(ot_settings_id() , $custom_settings);\n\t}\n\n\t/**\n\t * Filter on layout images.\n\t */\n\tfunction filter_layout_radio_images($array, $layout)\n\t{\n\n\t\t/* only run the filter where the field ID is my_radio_images */\n\t\tif ($layout == '_uncode_headers')\n\t\t{\n\t\t\t$array = array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-right.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-justify',\n\t\t\t\t\t'label' => esc_html__('Justify', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-justify.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-left.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-split',\n\t\t\t\t\t'label' => esc_html__('Center Split', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-splitted.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-double',\n\t\t\t\t\t'label' => esc_html__('Center Double', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center-double.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu',\n\t\t\t\t\t'label' => esc_html__('Lateral', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/vmenu.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu-offcanvas',\n\t\t\t\t\t'label' => esc_html__('Offcanvas', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/offcanvas.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay',\n\t\t\t\t\t'label' => esc_html__('Overlay', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay-center',\n\t\t\t\t\t'label' => esc_html__('Overlay Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay-center.jpg'\n\t\t\t\t) ,\n\t\t\t);\n\t\t}\n\t\treturn $array;\n\t}\n\tadd_filter('ot_radio_images', 'filter_layout_radio_images', 10, 2);\n}",
"function customizer_extension( $wp_customize ){\n\n\t$wp_customize->add_section( 'contato_networking', array(\n\t\t 'title' => __( 'Contato Menu', 'styled-store' ),\n\t\t 'priority' => 50,\n\t ) );\n\n\n\n\t// Setting for hiding the social bar\n\t$wp_customize->add_setting( 'show_contato', array(\n\t\t'sanitize_callback' => 'styledstore_sanitize_checkbox',\n\t));\n\n\n\t// Control for hiding the social bar\n\t$wp_customize->add_control( 'show_contato', array(\n\t\t'label' => __( 'Mostrar contato', 'styled-store' ),\n\t\t'type' => 'checkbox',\n\t\t'section' => 'contato_networking',\n\t\t'priority' => 1,\n\t) );\n\n\n\t\t// Setting group for Facebook\n\t\t$wp_customize->add_setting( 'sac_uid', array(\n\t\t\t'sanitize_callback' => 'esc_html',\n\t\t) );\n\n\t\t$wp_customize->add_control( 'sac_uid', array(\n\t\t\t'settings' => 'sac_uid',\n\t\t\t'label' => __( 'SAC', 'styled-store' ),\n\t\t\t'section' => 'contato_networking',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 1,\n\t\t) );\n\t//Setting group for e-mail\n\t$wp_customize->add_setting( 'email_uid', array(\n\t\t'sanitize_callback' => 'esc_html',\n\t) );\n\n\t$wp_customize->add_control( 'email_uid', array(\n\t\t'settings' => 'email_uid',\n\t\t'label' => __( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'label' => esc_html__( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'section' => 'contato_networking',\n\t\t'type' => 'text',\n\t\t'priority' => 1,\n\t) );\n}",
"static function register_default_settings() {\n\t\tself::register_setting( 'builder_access', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Builder Access', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have access to the builder for editing posts, pages, and CPTs.', 'fl-builder' ),\n\t\t\t'order' => '1',\n\t\t) );\n\n\t\tself::register_setting( 'unrestricted_editing', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Unrestricted Editing', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have unrestricted access to all editing features within the builder.', 'fl-builder' ),\n\t\t\t'order' => '2',\n\t\t) );\n\t}"
]
| [
"0.6433837",
"0.60070544",
"0.6003427",
"0.5977585",
"0.5955388",
"0.5907726",
"0.5903883",
"0.58484674",
"0.5843911",
"0.58338296",
"0.58061206",
"0.57994074",
"0.57885665",
"0.5757142",
"0.5728515",
"0.57258457",
"0.5705115",
"0.5659023",
"0.5658147",
"0.5649024",
"0.56438136",
"0.5635949",
"0.56287867",
"0.56143475",
"0.5602088",
"0.56003463",
"0.55948126",
"0.55769116",
"0.5554575",
"0.5544819"
]
| 0.7264607 | 0 |
Return an array of Call to Action type options. | public function get_type_options() : array {
/**
* Filters Call to Action type options.
*
* @param array Type options to be filtered.
*/
return apply_filters(
'cta_type_options', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
[
'subscribe' => __( 'Subscribe', 'civil-first-fleet' ),
'newsletter' => __( 'Newsletter Sign up', 'civil-first-fleet' ),
]
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_action_options() {\n return array(\n 'c' => get_string('create', 'logstore_database'),\n 'r' => get_string('read', 'logstore_database'),\n 'u' => get_string('update', 'logstore_database'),\n 'd' => get_string('delete')\n );\n }",
"public function optionsAction()\n {\n return ['GET', 'POST', 'PATCH', 'DELETE'];\n }",
"protected function getOptions()\n\t{\n\t\treturn array_merge(parent::getOptions(),array(\n\t\t\tarray('action', 'a', InputOption::VALUE_NONE, 'Show only next actions.', null),\n\t\t\tarray('skip-done', 'x', InputOption::VALUE_NONE, 'Skip completed actions.', null),\n\t\t));\n\t}",
"public function toOptionArray()\r\n {\r\n $paymentActions = array();\r\n\r\n foreach ($this->_allowedActions as $_action) {\r\n if (!array_key_exists($_action, $this->_actions)) {\r\n continue;\r\n }\r\n\r\n $paymentActions[] = array(\r\n 'value' => $_action,\r\n 'label' => Mage::helper('realex')->__($this->_actions[$_action])\r\n );\r\n }\r\n\r\n return $paymentActions;\r\n }",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"protected function getOptions(): array\n {\n return [\n ['url', null, InputOption::VALUE_OPTIONAL, 'Optional url that will be used to fetch xml for call.', null],\n ['from', null, InputOption::VALUE_OPTIONAL, 'Optional from number that will be used.', null],\n ];\n }",
"public function options()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }",
"public function getOptions() : array;",
"public function getActions(): array;",
"public function actions(): array\n {\n /**\n * @var string\n */\n $cmd = request('cmd', '');\n\n return [\n // new Actions\\FullcalendarAction(),\n // new Actions\\TestAction(),\n new ArtisanAction($cmd),\n ];\n }",
"#[Pure]\n public function getActionArguments() : array\n {\n return $this->actionArguments;\n }",
"protected function getOptions(): array\n {\n return [\n ['json', null, InputOption::VALUE_NONE, 'Output the route list as JSON'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'Only show routes matching the given path pattern'],\n ['except-path', null, InputOption::VALUE_OPTIONAL, 'Do not display the routes matching the given path pattern'],\n ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'],\n ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (uri, view) to sort by', 'uri'],\n ];\n }",
"function get_bulk_actions() {\n\t\t//bulk action combo box parameter\n\t\t//if you want to add some more value to bulk action parameter then push key value set in below array\n\t\t$actions = array();\n\t\treturn $actions;\n }",
"public function getOptions()\n {\n return array();\n }",
"public function options() : array\n {\n return $this->input->getOptions();\n }",
"public function get(): array\n {\n return $this->actions->toArray();\n }",
"public function actions(): array;",
"protected function getOptions() : array\n {\n return [];\n }",
"public function getAvailableOptions(): array\n\t{\n\t\treturn [\n\t\t\t'id',\n\t\t\t'timestamp',\n\t\t\t'trigger',\n\t\t\t'progress',\n\t\t\t'assignment',\n\t\t\t'obj_type',\n\t\t\t'obj_title',\n\t\t\t'refid',\n\t\t\t'link',\n\t\t\t'parent_title',\n\t\t\t'parent_refid',\n\t\t\t'user_mail',\n\t\t\t'user_id',\n\t\t\t'user_login',\n\t\t];\n\t}",
"public function getHttpMethodOptions()\n {\n return $this->getOptionArray(Mage::helper('mp_debug/filter')->getHttpMethodValues());\n }",
"protected function getOptions(): array\n {\n return [];\n }",
"protected function getOptions(): array\n {\n return [];\n }",
"protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }",
"public function get_actions(): array;"
]
| [
"0.67643094",
"0.6639785",
"0.6434818",
"0.62135303",
"0.6212376",
"0.6212376",
"0.6212376",
"0.6212376",
"0.6212376",
"0.6212376",
"0.6212376",
"0.618919",
"0.61701673",
"0.61453754",
"0.61074096",
"0.6103989",
"0.6098876",
"0.6053197",
"0.6031527",
"0.6031157",
"0.60117716",
"0.5990957",
"0.59784085",
"0.5966842",
"0.5963906",
"0.59625816",
"0.5949205",
"0.5949205",
"0.593106",
"0.59204537"
]
| 0.7321445 | 0 |
Return an array of Mailchimp newsletter options. | public function get_newsletter_options() : array {
$newsletters = [];
$newsletter_lists = (array) $this->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_lists', 'lists' );
// Loop through lists and build array.
foreach ( $newsletter_lists as $list ) {
$list = wp_parse_args(
$list,
[
'id' => '',
'name' => '',
]
);
// Validate both properties.
if (
! empty( $list['name'] )
&& ! empty( $list['id'] )
) {
$newsletters[ sanitize_title( $list['name'] ) ] = $list['name'];
}
}
return $newsletters;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function mailchimpOptions()\n {\n if (!$this->mailchimpOptions) {\n return $this->defaultOptions();\n }\n\n return $this->mailchimpOptions;\n }",
"public function get_newsletter_options_for_gutenberg() {\n\n\t\t// Format newsletters for Gutenberg.\n\t\t$newsletters = [];\n\t\tforeach ( (array) $this->get_newsletter_options() as $value => $label ) {\n\t\t\t$newsletters[] = [\n\t\t\t\t'value' => $value,\n\t\t\t\t'label' => $label,\n\t\t\t];\n\t\t}\n\n\t\treturn $newsletters;\n\t}",
"public function provide_newsletter_options() {\n\t\twp_add_inline_script(\n\t\t\t'civil-first-fleet-admin-js',\n\t\t\tsprintf(\n\t\t\t\t'var civilNewsletterOptions = %1$s;',\n\t\t\t\twp_json_encode( $this->get_newsletter_options_for_gutenberg() )\n\t\t\t)\n\t\t);\n\t}",
"public function get_options(): array\n {\n $options = empty($this->options) ? [] : $this->options;\n return array_merge([\n self::FIELD_MESSAGE => $this->get_option_default(self::FIELD_MESSAGE),\n ], $options);\n }",
"public function getActiveNotificationChannelsOptions()\n {\n \treturn $this->getChannelOptions();\n }",
"public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }",
"function optinpanda_subscription_services_options( $options ) {\r\n \r\n // mailchimp\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailchimp-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'mailchimp_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your MailChimp account.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mailchimp_welcome',\r\n 'title' => __( 'Send \"Welcome\" Email', 'optinpanda' ),\r\n 'default' => true,\r\n 'hint' => __( 'Sends the Welcome Email configured in your MailChimp account after subscription (works only if the Single Opt-In set).', 'optinpanda' )\r\n ) \r\n )\r\n );\r\n\r\n // aweber\r\n\r\n if( !get_option('opanda_aweber_consumer_key', false) ) {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ),\r\n array(\r\n 'type' => 'textarea',\r\n 'name' => 'aweber_auth_code',\r\n 'title' => __( 'Authorization Code', 'optinpanda' ),\r\n 'hint' => __( 'The authorization code you will see after log in to your Aweber account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n\r\n } else {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ) \r\n )\r\n );\r\n }\r\n\r\n // getresponse\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-getresponse-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'getresponse_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://support.getresponse.com/faq/where-i-find-api-key' ),\r\n 'hint' => __( 'The API key of your GetResponse account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n // mymail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mymail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_mymail_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mymail_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => sprintf( __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the MyMail will redirect the user to the page specified in the option <a href=\"%s\" target=\"_blank\">Newsletter Homepage</a>.', 'optinpanda' ), admin_url('options-general.php?page=newsletter-settings&settings-updated=true#frontend') )\r\n )\r\n )\r\n );\r\n\r\n // mailpoet\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailpoet-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opnada_show_mailpoet_html'\r\n ) \r\n )\r\n );\r\n\r\n // acumbamail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-acumbamail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_customer_id',\r\n 'title' => __( 'Customer ID', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get ID & Token</a>', 'optinpanda' ), 'https://acumbamail.com/apidoc/' ),\r\n 'hint' => __( 'The customer ID of your Acumbamail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_api_token',\r\n 'title' => __( 'API Token', 'optinpanda' ),\r\n 'hint' => __( 'The API token of your Acumbamail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // knews\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-knews-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_knews_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'knews_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the K-news will redirect the user to the home page.', 'optinpanda' )\r\n ) \r\n )\r\n ); \r\n\r\n // freshmail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-freshmail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Keys</a>', 'optinpanda' ), 'https://app.freshmail.com/en/settings/integration/' ),\r\n 'hint' => __( 'The API Key of your FreshMail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apisecret',\r\n 'title' => __( 'API Secret', 'optinpanda' ),\r\n 'hint' => __( 'The API Sercret of your FreshMail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // sendy\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendy-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your Sendy application, available in Settings.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_url',\r\n 'title' => __( 'Installation', 'optinpanda' ),\r\n 'hint' => __( 'An URL for your Sendy installation, <strong>http://your_sendy_installation</strong>', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // smartemailing\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-smartemailing-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_username',\r\n 'title' => __( 'Username', 'optinpanda' ),\r\n 'hint' => __( 'Enter your username on SmartEmailing. Usually it is a email.', 'optinpanda' ),\r\n ), \r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.smartemailing.cz/userinfo/show/api' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your SmartEmailing account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // sendinblue\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendinblue-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendinblue_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://my.sendinblue.com/advanced/apikey' ),\r\n 'hint' => __( 'The API Key (version 2.0) of your Sendinblue account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n \r\n // activecampaign\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-activecampaign-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apiurl',\r\n 'title' => __( 'API Url', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Url</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Url of your ActiveCampaign account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Key of your ActiveCampaign account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n \r\n // sendgrid\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendgrid-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendgrid_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.sendgrid.com/settings/api_keys' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'Your SendGrid API key. Grant <strong>Full Access</strong> for <strong>Mail Send</strong> and <strong>Marketing Campaigns</strong> in settings of your API key.', 'optinpanda' ),\r\n ) \r\n )\r\n );\r\n \r\n // sg autorepondeur\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sgautorepondeur-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get Code</a>', 'optinpanda' ), 'http://sg-autorepondeur.com/membre_v2/compte-options.php' ),\r\n 'title' => __( 'Activation Code', 'optinpanda' ),\r\n 'hint' => __( 'The Activation Code from your SG Autorepondeur account (<i>Mon compte -> Autres Options -> Informations administratives</i>).', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_memberid',\r\n 'title' => __( 'Member ID', 'optinpanda' ),\r\n 'hint' => __( 'The Memeber ID of your SG Autorepondeur account (<i>available on the home page below the SG logo, for example, 9059</i>).', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n return $options;\r\n}",
"private static function default_options()\n\t{\n\t\t$options = array(\n\t\t\t'jambo__send_to' => $_SERVER['SERVER_ADMIN'],\n\t\t\t'jambo__subject' => _t('[CONTACT FORM] %s', 'jambo'),\n\t\t\t'jambo__show_form_on_success' => 1,\n\t\t\t'jambo__success_msg' => _t('Thank you for your feedback. I\\'ll get back to you as soon as possible.', 'jambo'),\n\t\t\t);\n\t\treturn Plugins::filter('jambo_default_options', $options);\n\t}",
"public function getActiveListenableChannelsOptions ()\n {\n \treturn $this->getChannelOptions(true, $description=false); \n }",
"public static function get_options() {\n\t\treturn get_option( 'omnimailer' ) ?: self::get_default_options();\n\t}",
"protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"public function getOptions(): array;",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"public static function getOptionsList()\n {\n $optionsArray = [\n 'banner_content' => Yii::t('app', 'Homepage banner content'),\n 'mid_content' => Yii::t('app', 'Homepage mid page content'),\n 'footer_about_us' => Yii::t('app', 'Footer About us'),\n 'footer_address' => Yii::t('app', 'Footer Address'),\n ];\n\n return $optionsArray;\n }",
"protected function getOptions()\n {\n return array(\n );\n }",
"protected function getOptions()\n {\n return array(\n );\n }"
]
| [
"0.7125456",
"0.70712036",
"0.6891936",
"0.6391974",
"0.6320785",
"0.6318037",
"0.62442356",
"0.6193153",
"0.6085702",
"0.6072265",
"0.6070981",
"0.60334027",
"0.60334027",
"0.60334027",
"0.60334027",
"0.60334027",
"0.60334027",
"0.60334027",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006714",
"0.6006076",
"0.59964854",
"0.59964854"
]
| 0.7950536 | 0 |
Get a newsletter list id by the slugified name. | public function get_newsletter_list_id_by_slug( string $slug = '' ) : string {
$newsletter_lists = (array) $this->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_lists', 'lists' );
// Return the list id that corresponds to this slug.
foreach ( $newsletter_lists as $list ) {
if ( sanitize_title( $list['name'] ) === $slug ) {
return $list['id'];
}
}
// Return first value as a default value.
return $newsletter_lists[0]['id'] ?? '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_id_from_blogname($slug)\n {\n }",
"public function getListId();",
"protected function getListId($strList)\n\t{\n\n\t\t$arrLists = $this->api->lists();\n\t\tforeach($arrLists['data'] as $list)\n\t\t{\n\t\t\tif ($list['name']==$strList)\n\t\t\t\treturn $list['id'];\n\t\t}\n\t\treturn null;\n\n\t}",
"public function getListID()\n\t{\n\t\treturn $this->get('ListID');\n\t}",
"public abstract static function getListID();",
"public function list_id()\n\t{\n\t\treturn $this->list;\n\t}",
"static function getListID($pm_list_name_or_id) {\n\t\tif (ca_lists::$s_list_id_cache[$pm_list_name_or_id]) {\n\t\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id];\n\t\t}\n\t\tif (is_numeric($pm_list_name_or_id)) {\n\t\t\t$vn_list_id = intval($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$t_list = new ca_lists();\n\t\t\tif (!$t_list->load(array('list_code' => $pm_list_name_or_id))) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t$vn_list_id = $t_list->getPrimaryKey();\n\t\t}\n\t\t\n\t\treturn ca_lists::$s_list_id_cache[$pm_list_name_or_id] = $vn_list_id;\n\t}",
"function get_id_from_blogname( $slug ) {\n\t$current_network = get_network();\n\t$slug = trim( $slug, '/' );\n\n\tif ( is_subdomain_install() ) {\n\t\t$domain = $slug . '.' . preg_replace( '|^www\\.|', '', $current_network->domain );\n\t\t$path = $current_network->path;\n\t} else {\n\t\t$domain = $current_network->domain;\n\t\t$path = $current_network->path . $slug . '/';\n\t}\n\n\t$site_ids = get_sites( array(\n\t\t'number' => 1,\n\t\t'fields' => 'ids',\n\t\t'domain' => $domain,\n\t\t'path' => $path,\n\t) );\n\n\tif ( empty( $site_ids ) ) {\n\t\treturn null;\n\t}\n\n\treturn array_shift( $site_ids );\n}",
"public function get_site_list_id() {\n $list = $this->get_site_list();\n if ( isset( $list->id ) ) {\n return $list->id;\n }\n return false;\n }",
"function get_item_id($item_name) {\n $item_list = make_get_call(\"items\");\n \n foreach ($item_list as $key => $value) {\n if (strtolower($value) == $item_name) return $key;\n }\n \n return $item_list;\n }",
"public function get_id_by_slug( $name = false ){\n\n\t\tif( $name ){\n\t\t\tglobal $wpdb;\n\n\t\t\t$query = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type = 'wp_simple_flexslider' AND post_title = %s\", $name );\n\n\t\t\t$post = $wpdb->get_row( $query );\n\n\t\t\tif( isset( $post->ID ) ){\n\n\t\t\t\treturn $post->ID;\n\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function sanitize_list_id( $maybe_list_id = '' ) {\n if ( ! $maybe_list_id ) {\n return $this->get_site_list_id();\n }\n $lists = $this->get_lists();\n foreach ( $lists->lists as $list ) {\n if ( ! $list || ! isset( $list->id ) ) {\n continue;\n }\n if ( $maybe_list_id == $list->id || $maybe_list_id == $list->name ) {\n return $list->id;\n }\n }\n\n return $maybe_list_id;\n }",
"public abstract function get_default_list_id();",
"public function getId()\n {\n return $this->_list->getId();\n }",
"public function get_id_from_blogname() {\n global $json_api;\n\n $this->_verify_admin();\n\n extract( $_REQUEST );\n\n if(!isset($blogname))\n $json_api->error(__(\"You must send the 'blogname' parameter.\"));\n\n $blog_id = get_id_from_blogname( $blogname );\n\n return array( \"blog_id\" => $blog_id );\n }",
"protected function idNameList($nombreLista)\n {\n $lista = Model_Listas::find('all', array\n (\n 'where' => array\n (\n array('titulo'=>$nombreLista) \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 }",
"static function getIdOf ($name)\n {\n return array_search ($name, self::$NAMES);\n }",
"public function getId() {\n \n $contact = $this->registry->registry('news');\n return $contact ? $contact->getId() : null;\n \n }",
"public function getIdByName($name)\n {\n $arr = $this->listing();\n if (!isset($arr[$name])) {\n return false;\n }\n\n return $arr[(string) $name];\n }",
"public function getIdentifier()\n {\n return $this->slug ?: $this->id;\n }",
"function getItemIDByName($name)\r\n\t{\r\n\t\t// storage for the output\r\n\t\t$retVal = \"\";\r\n\r\n\t\t// for each item returned\r\n\t\tforeach($this->UserNameList as $item)\r\n\t\t{\r\n\t\t\t// is this the one we are looking for\r\n\t\t\tif($item[2] == $name)\r\n\t\t\t{\r\n\t\t\t\t// save the value\r\n\t\t\t\t$retVal = $item[0];\r\n\r\n\t\t\t\t// no need to continue\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// return to the caller\r\n\t\treturn $retVal;\r\n\t}",
"static function findIdByName($name) {\n $campaign = self::findByName($name);\n if (count($campaign)>0) return $campaign['id'];\n return 0;\n }",
"public static function nameToId($name) {\n return DB::queryFirstField(\"SELECT id FROM users WHERE username=%s \", $name);\n }",
"public function getWishlistId();",
"public function getNewsletterRecipientIDs();",
"function getIdFromSlug($slug='') {\n\t\tif(!$slug) return 0;\n\t\t$result = $this->select('id',\"`store_id` = '\".$this->store_id.\"' AND slug = '$slug'\");\n\t\tif($result) return $result[0]['id'];\n\t\treturn 0;\n\t}",
"public function getId() {\n return $this->get('id', 'news');\n }",
"function get_english_post_id( string $slug )\n{\n\n return [\n\n\t\t'agile-framework' => 54907,\n\t\t'blog' => 16636,\n\t\t'cta-building-bricks' => 60772,\n\t\t'customer-success-metrics-continental' => 60849,\n\t\t'customer-success-metrics-dubai' => 60859,\n\t\t'customer-success-metrics-nc-state' => 60860,\n\t\t'customer-success-metrics-solomon-group' => 60847,\n\t\t'events' => 29360,\n\t\t'hero-newsroom' => 61349,\n\t\t'hero-cloud' => 61349,\n\t\t'homepage-block-ctas' => 54984,\n\t\t'homepage' => 12357, \n\t\t'insurance' => 60943,\n\t\t'logo-ticker-mx-world-2020' => 57127,\n\t\t'low-code-guide' => 59648,\n\t\t'low-code-news' => 59151,\n\t\t'makeshift' => 56033,\n\t\t'media-coverage' => 30061,\n\t\t'mendix-values' => 56025,\n\t\t'mxw-agenda' => 56708,\n\t\t'mxw-home' => 56707,\n\t\t'press-releases' => 30062,\n\t\t'you-build-with-mendix' => 60894,\n\n\t][$slug];\n}",
"public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }",
"function get_room_id($name) {\n global $DB;\n\n return $DB->get_record('roomscheduler_rooms', array('name' => $name));\n}"
]
| [
"0.63937783",
"0.6365867",
"0.6194987",
"0.60476315",
"0.6009202",
"0.6006033",
"0.59316283",
"0.58851385",
"0.5818528",
"0.5762376",
"0.5753282",
"0.5641002",
"0.5600172",
"0.5552371",
"0.54814565",
"0.5470993",
"0.53987837",
"0.53985",
"0.53564936",
"0.5345052",
"0.52916986",
"0.5245078",
"0.5231553",
"0.5229686",
"0.5219383",
"0.5209626",
"0.52040124",
"0.5198864",
"0.5182302",
"0.51107734"
]
| 0.7455327 | 0 |
Expose newsletter options for CTA block | public function provide_newsletter_options() {
wp_add_inline_script(
'civil-first-fleet-admin-js',
sprintf(
'var civilNewsletterOptions = %1$s;',
wp_json_encode( $this->get_newsletter_options_for_gutenberg() )
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function optinpanda_subscription_services_options( $options ) {\r\n \r\n // mailchimp\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailchimp-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'mailchimp_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your MailChimp account.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mailchimp_welcome',\r\n 'title' => __( 'Send \"Welcome\" Email', 'optinpanda' ),\r\n 'default' => true,\r\n 'hint' => __( 'Sends the Welcome Email configured in your MailChimp account after subscription (works only if the Single Opt-In set).', 'optinpanda' )\r\n ) \r\n )\r\n );\r\n\r\n // aweber\r\n\r\n if( !get_option('opanda_aweber_consumer_key', false) ) {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ),\r\n array(\r\n 'type' => 'textarea',\r\n 'name' => 'aweber_auth_code',\r\n 'title' => __( 'Authorization Code', 'optinpanda' ),\r\n 'hint' => __( 'The authorization code you will see after log in to your Aweber account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n\r\n } else {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ) \r\n )\r\n );\r\n }\r\n\r\n // getresponse\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-getresponse-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'getresponse_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://support.getresponse.com/faq/where-i-find-api-key' ),\r\n 'hint' => __( 'The API key of your GetResponse account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n // mymail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mymail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_mymail_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mymail_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => sprintf( __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the MyMail will redirect the user to the page specified in the option <a href=\"%s\" target=\"_blank\">Newsletter Homepage</a>.', 'optinpanda' ), admin_url('options-general.php?page=newsletter-settings&settings-updated=true#frontend') )\r\n )\r\n )\r\n );\r\n\r\n // mailpoet\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailpoet-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opnada_show_mailpoet_html'\r\n ) \r\n )\r\n );\r\n\r\n // acumbamail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-acumbamail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_customer_id',\r\n 'title' => __( 'Customer ID', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get ID & Token</a>', 'optinpanda' ), 'https://acumbamail.com/apidoc/' ),\r\n 'hint' => __( 'The customer ID of your Acumbamail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_api_token',\r\n 'title' => __( 'API Token', 'optinpanda' ),\r\n 'hint' => __( 'The API token of your Acumbamail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // knews\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-knews-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_knews_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'knews_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the K-news will redirect the user to the home page.', 'optinpanda' )\r\n ) \r\n )\r\n ); \r\n\r\n // freshmail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-freshmail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Keys</a>', 'optinpanda' ), 'https://app.freshmail.com/en/settings/integration/' ),\r\n 'hint' => __( 'The API Key of your FreshMail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apisecret',\r\n 'title' => __( 'API Secret', 'optinpanda' ),\r\n 'hint' => __( 'The API Sercret of your FreshMail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // sendy\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendy-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your Sendy application, available in Settings.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_url',\r\n 'title' => __( 'Installation', 'optinpanda' ),\r\n 'hint' => __( 'An URL for your Sendy installation, <strong>http://your_sendy_installation</strong>', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // smartemailing\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-smartemailing-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_username',\r\n 'title' => __( 'Username', 'optinpanda' ),\r\n 'hint' => __( 'Enter your username on SmartEmailing. Usually it is a email.', 'optinpanda' ),\r\n ), \r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.smartemailing.cz/userinfo/show/api' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your SmartEmailing account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // sendinblue\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendinblue-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendinblue_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://my.sendinblue.com/advanced/apikey' ),\r\n 'hint' => __( 'The API Key (version 2.0) of your Sendinblue account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n \r\n // activecampaign\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-activecampaign-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apiurl',\r\n 'title' => __( 'API Url', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Url</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Url of your ActiveCampaign account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Key of your ActiveCampaign account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n \r\n // sendgrid\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendgrid-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendgrid_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.sendgrid.com/settings/api_keys' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'Your SendGrid API key. Grant <strong>Full Access</strong> for <strong>Mail Send</strong> and <strong>Marketing Campaigns</strong> in settings of your API key.', 'optinpanda' ),\r\n ) \r\n )\r\n );\r\n \r\n // sg autorepondeur\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sgautorepondeur-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get Code</a>', 'optinpanda' ), 'http://sg-autorepondeur.com/membre_v2/compte-options.php' ),\r\n 'title' => __( 'Activation Code', 'optinpanda' ),\r\n 'hint' => __( 'The Activation Code from your SG Autorepondeur account (<i>Mon compte -> Autres Options -> Informations administratives</i>).', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_memberid',\r\n 'title' => __( 'Member ID', 'optinpanda' ),\r\n 'hint' => __( 'The Memeber ID of your SG Autorepondeur account (<i>available on the home page below the SG logo, for example, 9059</i>).', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n return $options;\r\n}",
"function cs_contact_options( $contactoptions ) {\n\t$contactoptions['twitter'] = 'Twitter';\n\treturn $contactoptions;\n}",
"private static function default_options()\n\t{\n\t\t$options = array(\n\t\t\t'jambo__send_to' => $_SERVER['SERVER_ADMIN'],\n\t\t\t'jambo__subject' => _t('[CONTACT FORM] %s', 'jambo'),\n\t\t\t'jambo__show_form_on_success' => 1,\n\t\t\t'jambo__success_msg' => _t('Thank you for your feedback. I\\'ll get back to you as soon as possible.', 'jambo'),\n\t\t\t);\n\t\treturn Plugins::filter('jambo_default_options', $options);\n\t}",
"public function updateOptions()\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] !== 'POST')\r\n return;\r\n\r\n update_option('ohs_newsletter_sendgrid_api', $_POST['ohs_newsletter_sendgrid_api']);\r\n update_option('ohs_newsletter_sendgrid_list', $_POST['ohs_newsletter_sendgrid_list']);\r\n update_option('ohs_newsletter_redirect', $_POST['ohs_newsletter_redirect']);\r\n }",
"static public function setSendAsNewsletter()\n\t{\n\t\tself::$_sendAsNewsletter = true;\n\t}",
"function simplenews_admin_settings_newsletter($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_default_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Default newsletter options'),\n '#collapsible' => FALSE,\n '#description' => t('These options will be the defaults for new newsletters, but can be overridden in the newsletter editing form.'),\n );\n $links = array('!mime_mail_url' => 'http://drupal.org/project/mimemail', '!html_url' => 'http://drupal.org/project/htmlmail');\n $description = t('Default newsletter format. Install <a href=\"!mime_mail_url\">Mime Mail</a> module or <a href=\"!html_url\">HTML Mail</a> module to send newsletters in HTML format.', $links);\n $form['simplenews_default_options']['simplenews_format'] = array(\n '#type' => 'select',\n '#title' => t('Format'),\n '#options' => simplenews_format_options(),\n '#description' => $description,\n '#default_value' => variable_get('simplenews_format', 'plain'),\n );\n // @todo Do we need these master defaults for 'priority' and 'receipt'?\n $form['simplenews_default_options']['simplenews_priority'] = array(\n '#type' => 'select',\n '#title' => t('Priority'),\n '#options' => simplenews_get_priority(),\n '#description' => t('Note that email priority is ignored by a lot of email programs.'),\n '#default_value' => variable_get('simplenews_priority', SIMPLENEWS_PRIORITY_NONE),\n );\n $form['simplenews_default_options']['simplenews_receipt'] = array(\n '#type' => 'checkbox',\n '#title' => t('Request receipt'),\n '#default_value' => variable_get('simplenews_receipt', 0),\n '#description' => t('Request a Read Receipt from your newsletters. A lot of email programs ignore these so it is not a definitive indication of how many people have read your newsletter.'),\n );\n $form['simplenews_default_options']['simplenews_send'] = array(\n '#type' => 'radios',\n '#title' => t('Default send action'),\n '#options' => array(\n SIMPLENEWS_COMMAND_SEND_TEST => t('Send one test newsletter to the test address'),\n SIMPLENEWS_COMMAND_SEND_NOW => t('Send newsletter'),\n ),\n '#default_value' => variable_get('simplenews_send', 0),\n );\n $form['simplenews_test_address'] = array(\n '#type' => 'fieldset',\n '#title' => t('Test addresses'),\n '#collapsible' => FALSE,\n '#description' => t('Supply a comma-separated list of email addresses to be used as test addresses. The override function allows to override these addresses in the newsletter editing form.'),\n );\n $form['simplenews_test_address']['simplenews_test_address'] = array(\n '#type' => 'textfield',\n '#title' => t('Email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_test_address', $address_default),\n );\n $form['simplenews_test_address']['simplenews_test_address_override'] = array(\n '#type' => 'checkbox',\n '#title' => t('Allow test address override'),\n '#default_value' => variable_get('simplenews_test_address_override', 0),\n );\n $form['simplenews_sender_info'] = array(\n '#type' => 'fieldset',\n '#title' => t('Sender information'),\n '#collapsible' => FALSE,\n '#description' => t('Default sender address that will only be used for confirmation emails. You can specify sender information for each newsletter separately on the newsletter\\'s settings page.'),\n );\n $form['simplenews_sender_info']['simplenews_from_name'] = array(\n '#type' => 'textfield',\n '#title' => t('From name'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_from_name', variable_get('site_name', 'Drupal')),\n );\n $form['simplenews_sender_info']['simplenews_from_address'] = array(\n '#type' => 'textfield',\n '#title' => t('From email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => variable_get('simplenews_from_address', $address_default),\n );\n\n return system_settings_form($form);\n}",
"public function describe_client_options() {\n echo '<p>The following options configure what URL to access when a post is published in this blog.</p>';\n }",
"public function add_chanel_options()\n\t{\n\t\tlist($river, $user, $keywords) = Swiftriver_Event::$data;\n\t\t\n\t\t// Add a twitter channel\n\t\t$channel_filter = $river->create_channel_filter('twitter', $user->id, TRUE);\n\t\t$channel_filter->add_option('keyword', array(\n\t\t\t 'label' => 'Keyword',\n\t\t\t 'type' => 'text',\n\t\t\t 'value' => trim($keywords)\n\t\t));\n\t}",
"function offerEmail() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll());\n\t}",
"public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}",
"public function admin_options() {\n?>\n\t\t<h3><?php _e('Authorize SIM', WC_Authorize_SIM::TEXT_DOMAIN); ?></h3>\n \t<p><?php _e('Authorize SIM works by sending the user to Authorize to enter their payment information.', WC_Authorize_SIM::TEXT_DOMAIN); ?></p>\n \t<div class=\"updated\"><p>\n \t\t<strong><?php _e('Authorize.Net config:', WC_Authorize_SIM::TEXT_DOMAIN) ?></strong>\n \t\t<?php _e( 'Please login to Authorize and go to Account >> Settings >> Response/Receipt URLs' ); ?>\n \t\t<ol>\n\t \t\t<li><?php _e( 'Click \"Add URL\", and set this value for URL textbox: ') ?><strong><?php echo $this->notify_url ?></strong></li>\n\t \t\t<li><?php _e( 'Click \"Submit\" to complete', WC_Authorize_SIM::TEXT_DOMAIN ) ?></li>\n \t\t</ol>\n \t</p></div>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table><!--/.form-table--> \t\n<?php\n }",
"function postfixadmin_optpage_register_block() {\n global $optpage_blocks;\n global $AllowVacation;\n global $AllowChangePass;\n\n // if ( !soupNazi() ) {\n\n bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');\n textdomain('postfixadmin');\n $optpage_blocks[] = array(\n 'name' => _(\"Forwarding\"),\n 'url' => '../plugins/postfixadmin/postfixadmin_forward.php',\n 'desc' => _(\"Here you can create and edit E-Mail forwards.\"),\n 'js' => false\n );\n bindtextdomain('squirrelmail', SM_PATH . 'locale');\n textdomain('squirrelmail');\n\n bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');\n textdomain('postfixadmin');\n if ($AllowVacation) {\n $optpage_blocks[] = array(\n 'name' => _(\"Auto Response\"),\n 'url' => '../plugins/postfixadmin/postfixadmin_vacation.php',\n 'desc' => _(\"Set an OUT OF OFFICE message or auto responder for your mail.\"),\n 'js' => false\n );\n bindtextdomain('squirrelmail', SM_PATH . 'locale');\n textdomain('squirrelmail');\n }\n bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');\n textdomain('postfixadmin');\n if ($AllowChangePass) {\n $optpage_blocks[] = array(\n 'name' => _(\"Change Password\"),\n 'url' => '../plugins/postfixadmin/postfixadmin_changepass.php',\n 'desc' => _(\"Change your mailbox password.\"),\n 'js' => false\n );\n bindtextdomain('squirrelmail', SM_PATH . 'locale');\n textdomain('squirrelmail');\n }\n}",
"function visithasselt_settings_form($form, &$form_state) {\n form_load_include($form_state, 'inc', 'visithasselt_general', 'includes/admin');\n\n $langcode = !empty($_GET['variable_realm_key_language']) ? $_GET['variable_realm_key_language'] : $GLOBALS['language']->language;\n\n $form['newsletter_block_body'] = array(\n '#type' => 'textarea',\n '#title' => t('Newsletter block body'),\n '#default_value' => i18n_variable_get('newsletter_block_body', $langcode),\n );\n\n return system_settings_form($form);\n}",
"public function getActiveListenableChannelsOptions ()\n {\n \treturn $this->getChannelOptions(true, $description=false); \n }",
"public function get_newsletter_options_for_gutenberg() {\n\n\t\t// Format newsletters for Gutenberg.\n\t\t$newsletters = [];\n\t\tforeach ( (array) $this->get_newsletter_options() as $value => $label ) {\n\t\t\t$newsletters[] = [\n\t\t\t\t'value' => $value,\n\t\t\t\t'label' => $label,\n\t\t\t];\n\t\t}\n\n\t\treturn $newsletters;\n\t}",
"public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}",
"function chch_popup_pro_agile_set_adapter() {\n if(!empty($_POST['_chch_pop_up_pro_newsletter_adapter'])) {\n $_POST['_chch_pop_up_pro_newsletter_adapter'] = 'AgileCRM';\n }\n}",
"public function get_newsletter_options() : array {\n\t\t$newsletters = [];\n\t\t$newsletter_lists = (array) $this->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_lists', 'lists' );\n\n\t\t// Loop through lists and build array.\n\t\tforeach ( $newsletter_lists as $list ) {\n\t\t\t$list = wp_parse_args(\n\t\t\t\t$list,\n\t\t\t\t[\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'name' => '',\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Validate both properties.\n\t\t\tif (\n\t\t\t\t! empty( $list['name'] )\n\t\t\t\t&& ! empty( $list['id'] )\n\t\t\t) {\n\t\t\t\t$newsletters[ sanitize_title( $list['name'] ) ] = $list['name'];\n\t\t\t}\n\t\t}\n\n\t\treturn $newsletters;\n\t}",
"function true_customizer_init( $wp_customize ) {\n\n\t$true_transport = 'tstMessage';\n\n\n\t// Adding section\n\t$wp_customize->add_section(\n\t\t'true_display_options',\n\t\tarray(\n\t\t\t'title' => 'Footer text',\n\t\t\t'priority' => 200,\n\t\t\t'description' => 'Настройте внешний вид вашего сайта'\n\t\t)\n\t);\n\n\n\n\t// Text in a footer\n\t$wp_customize->add_setting(\n\t\t'true_footer_copyright_text', // id\n\t\tarray(\n\t\t\t'default' => 'All rights protected.',\n\t\t\t'sanitize_callback' => 'true_sanitize_copyright',\n\t\t\t'transport' => $true_transport\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'true_footer_copyright_text',\n\t\tarray(\n\t\t\t'section' => 'true_display_options',\n\t\t\t'label' => 'Copyright',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\n\n}",
"public function showOptions()\n {\n\treturn $this->getConfigData('checkout/delivery_options');\n }",
"public function admin_options() {\n\t\t\t?>\n\t\t\t\t<h3><?php esc_html_e('Cointopay Checkout', 'Cointopay'); ?></h3>\n\n\t\t\t\t<div id=\"wc_get_started\">\n\t\t\t\t<span class=\"main\"><?php esc_html_e('Provides a secure way to accept crypto currencies.', 'Cointopay'); ?></span>\n\t\t\t\t<p><a href=\"https://app.cointopay.com/index.jsp?#Register\" target=\"_blank\" class=\"button button-primary\"><?php esc_html_e('Join free', 'Cointopay'); ?></a> <a href=\"https://cointopay.com\" target=\"_blank\" class=\"button\"><?php esc_html_e('Learn more about WooCommerce and Cointopay', 'Cointopay'); ?></a></p>\n\t\t\t\t</div>\n\n\t\t\t\t<table class=\"form-table\">\n\t\t\t <?php $this->generate_settings_html(); ?>\n\t\t\t\t</table>\n\t\t\t\t<?php\n\n\t\t}",
"protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}",
"private function activateMailChimpNewsletter()\n\t{\n\t\t$service = MailChimp_Newsletter::instance();\n\n\t\tif ($this->is_configured && $service->isConfigured()) {\n\n\t\t\t$service->setEnvironment($this->environment);\n\t\t\t$service->setVersion($this->version);\n\n\t\t\t// adding the ability to render the checkbox on another screen of the checkout page.\n\t\t\t$render_on = $service->getOption('mailchimp_checkbox_action', 'woocommerce_after_checkout_billing_form');\n\n\t\t\t$this->loader->add_action($render_on, $service, 'applyNewsletterField', 10);\n\n\t\t\t$this->loader->add_action('woocommerce_ppe_checkout_order_review', $service, 'applyNewsletterField', 10);\n\t\t\t$this->loader->add_action('woocommerce_register_form', $service, 'applyNewsletterField', 10);\n\n\t\t\t$this->loader->add_action('woocommerce_checkout_order_processed', $service, 'processNewsletterField', 10, 2);\n\t\t\t$this->loader->add_action('woocommerce_ppe_do_payaction', $service, 'processPayPalNewsletterField', 10, 1);\n\t\t\t$this->loader->add_action('woocommerce_register_post', $service, 'processRegistrationForm', 10, 3);\n\t\t}\n\t}",
"function got_chosen_intg_activation() {\n $default_opts = array('gcid' => '', 'feedkey' => '', 'shareable' => true, 'commentable' => true, 'pub_minifeed_default' => true, 'webcurtain' => true, 'webcurtain_compat' => false );\n update_option('got_chosen_intg_settings', $default_opts);\n}",
"public function admin_options() { ?>\n <h3><?php _e( 'Veritrans', 'woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Veritrans.', 'woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }",
"function getAdminOptions() {\r\n\r\n // Default values. \r\n $apAdminOptions = array('mainpage' => '',\r\n 'turnon_wpscSupportTickets' => 'true',\r\n 'departments' => '',\r\n 'email' => get_bloginfo('admin_email'),\r\n 'email_new_ticket_subject' => __('Your support ticket was received.', 'wpsc-support-tickets'),\r\n 'email_new_ticket_body' => __('Thank you for opening a new support ticket. We will look into your issue and respond as soon as possible.', 'wpsc-support-tickets'),\r\n 'email_new_reply_subject' => __('Your support ticket reply was received.', 'wpsc-support-tickets'),\r\n 'email_new_reply_body' => __('A reply was posted to one of your support tickets.', 'wpsc-support-tickets'),\r\n 'disable_inline_styles' => 'false',\r\n 'allow_guests' => 'false',\r\n 'allow_all_tickets_to_be_replied' => 'false',\r\n 'allow_all_tickets_to_be_viewed' => 'false',\r\n 'allow_html' => 'false',\r\n 'allow_closing_ticket' => 'false',\r\n 'allow_uploads' => 'false',\r\n 'custom_field_position' => 'after message',\r\n 'custom_field_frontend_position' => 'after message',\r\n 'use_ticket_in_email' => 'true',\r\n 'use_reply_in_email' => 'true',\r\n 'department_admins' => 'default',\r\n 'email_name' => __('Support', 'wpsc-support-tickets'),\r\n 'hide_email_on_frontend_list' => 'false',\r\n 'email_encoding' => 'utf-8',\r\n 'hide_email_on_support_tickets' => 'false',\r\n 'enable_beta_testing' => 'false',\r\n 'disable_all_emails' => 'false',\r\n 'override_wordpress_email' => 'false',\r\n 'overrides_email' => get_bloginfo('admin_email'),\r\n 'custom_title' => __('Title', 'wpsc-support-tickets'),\r\n 'custom_message' => __('Your message', 'wpsc-support-tickets'),\r\n 'show_login_text' => 'true',\r\n 'override_mysql_timezone' => 'false',\r\n 'show_advanced_options' => 'false',\r\n 'converted_departments_phase2' => 'false',\r\n 'custom_new_ticket_button_text' => __('Create a New Ticket', 'wpsc-support-tickets'),\r\n 'cc_all_new_tickets' => 'false',\r\n 'cc_all_new_tickets_to_email' => get_bloginfo('admin_email'),\r\n 'cc_all_user_replies' => 'false',\r\n 'cc_all_user_replies_to_email' => get_bloginfo('admin_email'),\r\n 'cc_all_admin_replies' => 'false',\r\n 'cc_all_admin_replies_to_email' => get_bloginfo('admin_email'),\r\n 'allow_search' => 'false'\r\n ); \r\n \r\n if ($this->wpscstSettings != NULL) { // If we haven't cached stuff already\r\n $devOptions = $this->wpscstSettings; // Caches the settings array so that we don't keep reinitializing it\r\n } else {\r\n $devOptions = get_option($this->adminOptionsName);\r\n }\r\n if (!empty($devOptions)) { // If the default values don't exist.\r\n \r\n foreach ($devOptions as $key => $option) {\r\n $apAdminOptions[$key] = $option;\r\n }\r\n }\r\n update_option($this->adminOptionsName, $apAdminOptions);\r\n return $apAdminOptions;\r\n }",
"public function addMetaFields()\n {\n // Get some help :-)\n $helper = Metabox::get('lbwp-nl');\n\n // Metabox for settings\n $boxId = 'newsletter-settings';\n $helper->addMetabox($boxId, 'Einstellungen');\n $helper->addInputText('mailSubject', $boxId, 'Betreff', array('required' => true));\n $helper->addInputText('mailSender', $boxId, 'E-Mail Absender', array('required' => true));\n $helper->addInputText('mailSenderName', $boxId, 'Absender-Name', array('required' => true));\n\n // Template selection\n $boxId = 'newsletter-template';\n $helper->addMetabox($boxId, 'Newsletter Design');\n $helper->addField(\n 'templateId',\n $boxId,\n array(),\n array($this, 'displayNewsletterTemplates'),\n array($this, 'saveNewsletterTemplate')\n );\n\n // Metabox for post assignation\n $boxId = 'newsletter-items';\n $helper->addMetabox($boxId, 'Beiträge auswählen');\n $helper->addAssignPostsField('newsletterItems', $boxId, $this->sourceTypes);\n\n // Info box because we schedule sendings at xx:31 with cron\n $boxId = 'newsletter-sendinfo';\n $helper->addMetabox($boxId, 'Versand Information', 'side');\n\n $helper->addField(\n 'sendInfo',\n $boxId,\n array(),\n array($this, 'displaySendInfo'),\n '__return_false'\n );\n\n $boxId = 'newsletter-sendtest';\n $helper->addMetabox($boxId, 'Test-Versand', 'side');\n // Box to mail the current newsletter as a test to an email\n $helper->addField(\n 'sendTest',\n $boxId,\n array(),\n array($this, 'displayTestForm'),\n '__return_false'\n );\n }",
"function bp_lb_plugin_menu() {\n\t\tadd_options_page( 'BuddyPress Update Email Reminder Lightbox Settings', 'BuddyPress Update Email Reminder Lightbox Settings', 'manage_options', 'lb-alerts-settings', 'bp_lb_alerts_options' );\n\t}",
"private function setOptions()\n {\n $this->clientId = $this->config['stravaSettings']['clientId'];\n $this->clientSecret = $this->config['stravaSettings']['clientSecret'];\n $this->redirectUri = $this->config['stravaSettings']['redirectUri'];\n $this->aprovalPrompt = $this->config['stravaSettings']['approval_prompt'];\n $this->scopes = $this->config['stravaSettings']['scopes'];\n }",
"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->add_delayed_payment_support(\n\t\t\tarray(\n\t\t\t\t'option_label' => esc_html__( 'Subscribe contact to iContact only when payment is received.', 'gravityformsicontact' )\n\t\t\t)\n\t\t);\n\t\t\n\t}"
]
| [
"0.6402801",
"0.59012383",
"0.5846641",
"0.58366555",
"0.58024496",
"0.57236177",
"0.56400645",
"0.5636054",
"0.5607285",
"0.5558025",
"0.5546646",
"0.5521867",
"0.5508108",
"0.5482793",
"0.54770607",
"0.5475041",
"0.5465809",
"0.5464011",
"0.5455378",
"0.5450994",
"0.5410267",
"0.53902036",
"0.5388564",
"0.5386578",
"0.53703815",
"0.53668773",
"0.5359587",
"0.5341381",
"0.53410167",
"0.5332647"
]
| 0.7374673 | 0 |
Test if the current user is assigned to review current post | function eman_can_review( $post, $user_id=false ) {
// Get the post if an id was provide
if ( is_numeric($post) ) { $post = get_post($post); }
// If no post then nothing to review
if ( ! is_object($post) ) { return false; }
// Get current user if no user provided
if ( ! $user_id ) $user_id = get_current_user_id();
// Test if owner review phase (doesn't require bic)
$owner_review = false;
$status = emanager_post::status($post, 'slug');
if ( 'em_noc' == $post->post_type && in_array($status, array('submitted','executed','recommend')) && eman_check_role('owner') ) {#( current_user_can('owner') || current_user_can('owners_rep') ) ) {
return true;
}
// Test if the post is currently reviewable, returns the reviews if so
if ( eman_post_reviewable($post) ) {
if ( 'em_letter' === get_post_type( $post ) && current_user_can('manage_options') ) {
return true;
} elseif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isReviewed() {\n\t\t$this->getReviewed();\n\t}",
"function eman_post_reviewable( $post )\n{\n\t// Get current post status\n\t$status = emanager_post::status($post, 'slug');\n\tif ( $status && ! in_array($status, array('void','approved','approve','draft','revise','executed')) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"function current_user_owns_post( $post_id = null ) {\n\t\tif ( null == $post_id ) {\n\t\t\treturn false;\n\t\t}\n\t\tglobal $current_user;\n\t\t$post = get_post( $post_id, 'OBJECT' );\n\t\treturn ( $post->post_author == $current_user->id );\n\t}",
"public function ReviewRatedByActiveUser()\n {\n return array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION) && array_key_exists($this->id, $_SESSION['TPkgShopArticleReviewShopArticleReviewRated']);\n }",
"public function isAssignee(UserInterface $user);",
"public function isPostOwner($id) {\n $post = Post::where('id','=',$id)->first();\n return ($this->id == $post->user->id);\n }",
"public function belongsToCurrent()\n {\n return Auth::id() == $this->user_id;\n }",
"public function isAuthorized($user) {\n if ($this->action === 'add') {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('edit', 'delete'))) {\n $presupuestoId = $this->request->params['pass'][0];\n if ($this->Post->isOwnedBy($presupuestoId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}",
"public function canPost()\n {\n $role = $this->role;\n if($role == 'author' || $role == 'admin')\n {\n return true;\n } else {\n return false;\n }\n }",
"public function only_post_user_can_answered_his_post()\n {\n $comment = factory(\\App\\Comment::class)->create();\n\n $policy = new CommentPolicy();\n\n $policy->accept($comment->post->user,$comment);\n\n $this->assertTrue($policy->accept($comment->post->user,$comment));\n }",
"public function isExistingReview(): bool\n {\n $review = ShopFeedbackEntity::findOne([\n 'created_by' => (!isset(Yii::$app->request->post()['created_by']))\n ? Yii::$app->user->identity->getId() : Yii::$app->request->post()['created_by'],\n 'shop_id' => Yii::$app->request->post()['shop_id']]);\n if (!$review) {\n $this->addError('created_by',\n Yii::t('app', 'Отзыв не найден'));\n return false;\n } else {\n return true;\n }\n }",
"abstract public function isAssigned($userId, $itemName);",
"public function review(User $user, Project $project)\n {\n // if user is not a reviewer, do not authorize\n if ($user->role->name != 'reviewer') {\n return false;\n }\n\n // get operating units being reviewed by user\n $ous = $user->reviews->pluck('id')->toArray();\n\n // get operating unit owner of project\n $ou = $project->operating_unit_id;\n\n // check if reviewer is assigned to review ou project\n $result = in_array($ou, $ous);\n\n // return result\n return $result;\n }",
"private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}",
"public function isProposition()\n {\n $u = $this->user()->first();\n\n return auth()->user()->id != $u->id;\n }",
"public function isAuthorized($user) {\n if ($this->action === 'add') {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('edit', 'delete'))) {\n $postId = $this->request->params['pass'][0];\n if ($this->Post->isOwnedBy($postId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n\t}",
"public function isAuthorized($user) {\n\t\tif ($this->action === 'add') {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// The owner of a post can edit and delete it\n\t\tif (in_array ( $this->action, array (\n\t\t\t\t'edit',\n\t\t\t\t'delete' \n\t\t) )) {\n\t\t\t$postId = $this->request->params ['pass'] [0];\n\t\t\tif ($this->Post->isOwnedBy ( $postId, $user ['id'] )) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn parent::isAuthorized ( $user );\n\t}",
"public function isInAuthorPost()\n {\n return $this->object->isInAuthorPost();\n }",
"function employer_review_action() {\n global $user_ID, $current_user;\n $args = $_POST;\n \n if (!isset($args['project_id'])) {\n wp_send_json(array(\n 'success' => false,\n 'msg' => __('Invalid project id.', ET_DOMAIN)\n ));\n }\n \n $project_id = $args['project_id'];\n \n $author_id = (int)get_post_field('post_author', $project_id);\n \n $result = array(\n 'succes' => false,\n 'msg' => __('You can\\'t not access this action.', ET_DOMAIN)\n );\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = get_post_field('post_author', $bid_id_accepted);\n \n $profile_id = get_user_meta($author_bid, 'user_profile_id', true);\n \n /*\n * validate data\n */\n if (!$bid_id_accepted) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please assign project before complete.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate for this profile.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission for review action\n */\n \n if (!$user_ID || $user_ID !== $author_id) wp_send_json($result);\n \n $args['comment_post_ID'] = $bid_id_accepted;\n $args['comment_approved'] = 1;\n \n // insert review\n $review = Fre_Review::get_instance();\n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire an acction after project owner complete his project\n * @param int $project_id\n * @param Array $args\n * @since v1.2\n * @author Dakachi\n */\n do_action('fre_complete_project', $project_id, $args);\n \n /**\n * update project, bid, user rating scrore after review a project\n */\n $this->update_after_empoyer_review($project_id, $comment);\n \n $project_title = get_the_title($project_id);\n $freelancer_name = get_the_author_meta('display_name', $author_bid);\n wp_send_json(array(\n 'success' => true,\n 'msg' => sprintf(__(\"You have completed project %s and reviewed %s.\", ET_DOMAIN) , $project_title, $freelancer_name)\n ));\n } else {\n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }",
"public function isAuthorized($user) {\n\t if ($this->action === 'add') {\n\t return true;\n\t }\n\n\t // The owner of a post can edit and delete it\n\t if (in_array($this->action, array('edit', 'delete'))) {\n\t $postId = (int) $this->request->params['pass'][0];\n\n\t if ($this->Post->isOwnedBy($postId, $user['id'])) {\n\t return true;\n\t }\n\t }\n\t return parent::isAuthorized($user);\n\t}",
"function isRead() {\n\t\t$submissionDao = Application::getSubmissionDAO();\n\t\t$userGroupDao = DAORegistry::getDAO('UserGroupDAO');\n\t\t$userStageAssignmentDao = DAORegistry::getDAO('UserStageAssignmentDAO');\n\t\t$viewsDao = DAORegistry::getDAO('ViewsDAO');\n\n\t\t$submission = $submissionDao->getById($this->getSubmissionId());\n\n\t\t// Get the user groups for this stage\n\t\t$userGroups = $userGroupDao->getUserGroupsByStage(\n\t\t\t$submission->getContextId(),\n\t\t\t$this->getStageId()\n\t\t);\n\t\twhile ($userGroup = $userGroups->next()) {\n\t\t\t$roleId = $userGroup->getRoleId();\n\t\t\tif ($roleId != ROLE_ID_MANAGER && $roleId != ROLE_ID_SUB_EDITOR) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Get the users assigned to this stage and user group\n\t\t\t$stageUsers = $userStageAssignmentDao->getUsersBySubmissionAndStageId(\n\t\t\t\t$this->getSubmissionId(),\n\t\t\t\t$this->getStageId(),\n\t\t\t\t$userGroup->getId()\n\t\t\t);\n\n\t\t\t// Check if any of these users have viewed it\n\t\t\twhile ($user = $stageUsers->next()) {\n\t\t\t\tif ($viewsDao->getLastViewDate(\n\t\t\t\t\tASSOC_TYPE_REVIEW_RESPONSE,\n\t\t\t\t\t$this->getId(),\n\t\t\t\t\t$user->getId()\n\t\t\t\t)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function approve()\n {\n $post = new PostBag();\n $id = $post->fetchInt('id');\n \n $this->db->query(\"UPDATE `film_review` SET `status` = 'show' WHERE `id` = {$id} LIMIT 1\");\n if (!empty($this->db->error)) {\n return false;\n }\n\n $result = $this->db->query(\"SELECT `userId` FROM `film_review` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n $this->db->query(\"UPDATE `user` SET `count_review` = `count_review` + 1 WHERE `id` = {$row['userId']} LIMIT 1\");\n }\n \n return true;\n }",
"public function userIsProfessor($user_id){\n $user_temp = Users::find($user_id);\n return !empty($user_id) && $user_temp && $user_temp['type'] == 1;\n }",
"public function userIsProfessor($user_id){\n $user_temp = Users::find($user_id);\n return !empty($user_id) && $user_temp && $user_temp['type'] == 1;\n }",
"public function isAuthorized($user) {\n if ($this->action === 'add') {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('edit', 'delete'))) {\n $postId = (int) $this->request->params['pass'][0];\n if ($this->Post->isOwnedBy($postId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n }",
"function post_as_is_authorized(int $post_as_guid, int $user_guid = 0): bool {\n\tif ($post_as_guid < 1) {\n\t\treturn false;\n\t}\n\t\n\tif ($user_guid < 1) {\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\t}\n\t\n\tif ($user_guid < 1) {\n\t\treturn false;\n\t}\n\t\n\tif (post_as_is_global_editor($user_guid)) {\n\t\treturn true;\n\t}\n\t\n\t$user = get_user($user_guid);\n\tif (!$user instanceof \\ElggUser) {\n\t\treturn false;\n\t}\n\t\n\treturn $user->hasRelationship($post_as_guid, POST_AS_RELATIONSHIP);\n}",
"public function isAuthorized($user) {\n\t\treturn true;\n\t /* if ($this->action === 'add') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// The owner of a post can edit and delete it\n\t\tif (in_array($this->action, array('edit', 'delete'))) {\n\t\t\t$postId = (int) $this->request->params['pass'][0];\n\t\t\tif ($this->Post->isOwnedBy($postId, $user['id'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn parent::isAuthorized($user);*/\n\t}",
"public function approve(User $user)\n {\n return $user->role->can_approve_posts == 1;\n }",
"protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }"
]
| [
"0.69660896",
"0.67894876",
"0.6661757",
"0.6377939",
"0.6295337",
"0.6227289",
"0.61742353",
"0.6137929",
"0.6101535",
"0.6080368",
"0.6060328",
"0.6013452",
"0.59922814",
"0.59704626",
"0.5955485",
"0.5945179",
"0.59166694",
"0.59101945",
"0.58834374",
"0.5868263",
"0.5863287",
"0.5859796",
"0.5844964",
"0.58322877",
"0.58322877",
"0.5804713",
"0.58012617",
"0.579802",
"0.5797388",
"0.57954437"
]
| 0.72695756 | 0 |
$shop = Shop::select('name','user_id')>groupBy('name','user_id')>get() ; | public function management_shop(){
//$quantity = Shop::select('name','user_id')->groupBy('name','user_id')->count();
$users = Users::where('role_id','2')->get();
return view('pages_admin.management_shop',['users'=>$users]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function wilaya_tags()\n {\n \n$DataWilayas = Colis::where('validation','=',true)->where(function ($query) {\n $query->where('id_stats','=',null)\n ->orWhere('id_stats','=',11);\n})->groupBy('wilaya')->pluck('wilaya')->toArray();\n\n//dd($DataWilayas);\n\nreturn response()->json($DataWilayas);\n\n }",
"public function findAllGroup()\n {\n $groupList = DB::table('groups')\n ->join('users', 'groups.user_id', '=', 'users.id')\n ->select('groups.*', DB::raw('CONCAT(\"อ.\",users.fname_th,\" \", users.lname_th) AS creater'))\n ->orderBy('fname_th','ASC')\n ->orderBy('group_name','ASC')\n ->get();\n// $findAllSection = Section::all()->orderBy('section_name');\n return response()->json($groupList);\n }",
"public function getallShop(){\n\t\t$shops = DB::table('shop')->get();\n\t\treturn View::make('Form.ShowAllShop')->with('shops',$shops);\n\t}",
"public function shops()\n {\n return $this->hasMany(Shop::class);\n }",
"public function getShops(Request $request)\n {\n //get user id\n $id = \\Auth::user()->id;\n //Get coordinates\n $lat = (string)$request->input('lat');\n $lng = (string)$request->input('lng');\n\n //Make a Query to Calculate distance\n $qry = 'SELECT id,shop_name,shop_description, SQRT(POW(69.1 * (lat - :lat), 2) +POW(69.1 * (:lng - lng) * COS(lat / 57.3), 2)) AS distance FROM t_shop HAVING distance < 25 and id not in (select shop_id from t_disliked WHERE TIMESTAMPDIFF(HOUR,unliked, NOW()) < 2 and user_id=:user_id1) and id not in (select shop_id from t_liked where user_id=:user_id2) ORDER BY distance';\n //Another way to do it\n //$shops = DB::table('t_shop')\n // ->select('id,shop_name,shop_description', DB::raw('SQRT(POW(69.1 * (lat - :lat), 2) +POW(69.1 * (:lng - lng) * COS(lat // 57.3), 2)) AS distance'))\n // ->orderBy('distance')\n // ->havingRaw('distance < 25 and id not in (select shop_id from t_disliked WHERE TIMESTAMPDIFF(HOUR,unliked, NOW()) < 2 ) and id not in (select shop_id from t_liked)')\n // ->get();\n $shops = DB::select($qry,['lat' => $lat,'lng' => $lng,'user_id1' => $id,'user_id2' => $id]);\n return response()->json($shops);\n }",
"public function &getGroupBy();",
"public function users()\n {\n return User::join('group_user', 'group_user.user_id', '=', 'users.id')\n ->join('groups', 'group_user.group_id', '=', 'groups.id')\n ->join('stores', 'stores.group_id', '=', 'groups.id')\n ->where('stores.id', $this->id)\n ->select('users.*')\n ->get();\n }",
"public function show()\n {\n $lichsu=ViTien::orderBy('ngaynap','DESC')->where('nguoinap','=',Auth::user()->email)->get()->groupBy('ngaynap');\n// $user=User::orderBy('created_at','DESC')->get()->groupBy(function ($item){\n// return $item->created_at->format('d-m-Y');\n// })->toArray();\n// $user2=User::orderBy('updated_at','DESC')->get()->groupBy(function ($item){\n// return $item->updated_at->format('d-m-Y');\n// })->toArray();\n// $a=array_merge($user,$user2);\n// dd($a);\n\n// $user=User::orderBy('ngaykichhoat','DESC')->where('nguoitao','=',Auth::user()->email)->get()->groupBy('ngaykichhoat')->toArray();\n// $lichsu=array_merge($a,$user);\n// dd($lichsu);\n return view('backend.profile',compact('lichsu'));\n }",
"public function select_users_gerentes (){\n $gerentes = User::join('personal','users.id','=','personal.id')\n ->select('users.usuario','personal.id','personal.nombre','personal.apellidos')\n ->where('users.rol_id','=','4')\n ->get();\n\n return['gerentes' => $gerentes];\n }",
"public function Shop()\n {\n return DB::table('products')->get();\n }",
"public function getUsers() {\n $user= \\DB::table('users')\n ->pluck('name', 'id');\n return $user;\n \n \n }",
"public function getUsers(){\n $users = DB::table('users')\n ->select(['users.created_at','users.email','users.id','users.name','users.tele','villes.nomVille'])\n ->join('villes', 'villes.idVille', '=', 'users.ville_idVille')\n ->orderBy('id', 'asc')\n ->get();\n\n\n\n\n\n\n return Response()->json(['users'=>$users]);\n }",
"public function groupBy($sql);",
"public function getDelivery(){\n return \\DB::table('users')->where('rol', 5)->select(\"id\", \"name\")->get();\n }",
"public function groupBy($field);",
"public function groupBy($field);",
"public function shop()\n {\n return $this->belongsTo('App\\Model\\Shop');\n }",
"public function selectAllJabatan(){\n\n // return $query->result();\n $this->db->select('t_user.jabatan, t_user.tipe');\n $this->db->from($this->tableName);\n $this->db->group_by('jabatan');\n return $this->db->get(); \n }",
"private function Data() {\n return DB::table('users')\n ->select('users.id','users.name', 'users.email', \n 'users.created_at','users.updated_at')\n ->get()\n ->map(function ($item, $key) {\n return (array) $item;\n })\n ->all();\n }",
"public function getQueryGroupby() {\n $R = 'R_'. $this->id;\n return \"$R.value_id\";\n }",
"public function groups()\n {\n return $this->belongsToMany(Group::class, 'product_review_group_facebook_id', 'facebook_id', 'group_id');\n }",
"public function shops()\n {\n return $this->belongsTo(Shop::class, 'node_id');\n }",
"public function group(): Collection;",
"public function getGroups(){\n $groups = Group::get()->toArray();\n $groups_array = array();\n foreach($groups as $group){\n $groups_array[$group['id']]['group_name'] = $group['group_name'];\n $groups_array[$group['id']]['user_ids'] = explode(\",\",$group['user_ids']);\n }\n return $groups_array;\n }",
"public function a_get_groups()\n {\n $query = Group::query();\n \n $query\n ->select(array(\n \"$this->groups_tb_id as id\",\n \"$this->groups_tb_name as name\",\n ));\n\n return $query\n ->get()\n ->toArray();\n }",
"public function query()\n {\n return User::orderBy('name');\n }",
"public function view(){\n $email = Auth::guard('admin')->user()->email;\n $qds=Marts_Products::select('product_id')->where('email',$email)->pluck('product_id');\n $sel = Marts_Products::select('product_id')->where('email',$email)->get();\n \n if(isset($sel)){\n foreach($sel as $sels){\n $ang=Products::select('category')->where('id',$sels->product_id)->first();\n \n \n $this->rec[]=[\n \"categories\"=>$ang->category\n ];\n \n }\n\n if($this->rec){\n $cat=array_unique($this->rec,SORT_REGULAR);\n }\n else{\n \n return view('layouts.my_products')->with(\"err\",\"No Category Left to Show\")->with('categorie','');\n }\n\n$categorie= DB::table('Products')->get()->whereIn('id', $qds)->unique('subcategory')->groupBy('category');\n\n\nreturn view('layouts.my_products')->with('cat',$cat)->with('categorie',$categorie); \n}\nelse{\n dd(\"NOT REGISTERED\");\n}\n\n\n\n //$myvue[]=\n \n \n \n \n }",
"function getGroupBy() {\n return $this->getAdditionalProperty('group_by', self::DONT_GROUP);\n }",
"public function getcomboUsuario() {\n $models = User::find()->asArray()->all();\n return ArrayHelper::map($models, 'id', 'name');\n }",
"public function groups()\n\t{\n\t\treturn $this->belongsToMany('Darryldecode\\Backend\\Components\\User\\Models\\Group','user_group_pivot_table','user_id');\n\t}"
]
| [
"0.62181747",
"0.57488173",
"0.572569",
"0.5694601",
"0.56368256",
"0.5604074",
"0.55893785",
"0.55648404",
"0.5559832",
"0.55543333",
"0.55288905",
"0.5518318",
"0.54968137",
"0.5468685",
"0.5451865",
"0.5451865",
"0.5434816",
"0.5432675",
"0.54074913",
"0.53995085",
"0.537874",
"0.5369842",
"0.5357228",
"0.5339946",
"0.53352433",
"0.5307701",
"0.5304026",
"0.5297353",
"0.529515",
"0.52832097"
]
| 0.62329465 | 0 |
Set API data on an object or a list of objects. | protected function setApiData($object) {
return $this->get('os2display.api_data')->setApiData($object);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setApiData( array $data );",
"public function setData(&$object, &$dataObject = null)\n {\n if ($dataObject === null)\n {\n $dataObject = $this->getApiRequest();\n }\n\n if (is_array($dataObject))\n {\n throw new \\Exception('array_not_supported');\n }\n\n $this->mapObject($object, $dataObject);\n }",
"public function set($data);",
"function set($data) {\n\tif (! is_object($data)) throw new Exception('Supplied argument is not an object.');\n\t\n\tforeach (get_object_vars($data) as $prop=>$val) {\n\t if (property_exists($this,$prop)) {\n\t\t$this->$prop = $val;\n\t }\n\t}\n\t\n }",
"public function setData($data) {\n if (empty($data)) {\n return;\n }\n if (is_object($data) || is_array($data)) {\n foreach ($this->_data as $field => $value) {\n if (array_key_exists($field, $data)) {\n $temp_val = $data[$field];\n } else {\n $temp_val = $value;\n }\n $this->__set($field, $temp_val);\n }\n } else {\n throw new Exception('The entity \"' . get_class($this) .\n '\" must be created by an array or object.');\n }\n }",
"public static function setData($data) {}",
"function setObject($object);",
"function set(array $data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t}",
"public function setData($data);",
"public function setData($data);",
"public function setData($data);",
"public function setData($data);",
"public function setData($data);",
"public function setFromArray(array $data);",
"public function setData($data)\n {\n $resultData = $this->hydrateIfJsonToArray($data);\n if (!empty($resultData)) {\n $this->data = $resultData;\n }\n else {\n $this->data = [];\n }\n }",
"public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}",
"public function setData($data) { \n $this->data = $data; \n }",
"public function setObjectData(&$data)\n {\n $objVarNames = array_keys(get_object_vars($this));\n $theData = $data;\n if (is_object($theData)) $theData = get_object_vars($data);\n foreach($theData as $propertyName => &$propertyValue)\n {\n foreach ($objVarNames as &$varName)\n {\n if (strcasecmp($varName, $propertyName) == 0)\n {\n $this->$varName = $propertyValue;\n }\n }\n }\n }",
"public function setData($data)\r\n {\r\n }",
"public function setData($data)\n {\n $this->_data = $data;\n }",
"abstract function set ($item, $data);",
"public function hydrate($data){\n foreach ($data as $key => $value){\n $method = 'set'.ucfirst($key);\n \n if (method_exists($this, $method)){\n $this->$method($value);\n }\n }\n }",
"function setField (&$data, $key, $value)\n{\n if (is_object ($data))\n $data->$key = $value;\n else if (is_array ($data))\n $data[$key] = $value;\n else throw new \\InvalidArgumentException;\n}",
"public function setData(array $data);",
"public function setData(array $data);",
"public function setData(array $data);",
"function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}",
"function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}",
"function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}",
"public function set_data($data)\n {\n }"
]
| [
"0.72501975",
"0.69637233",
"0.6734153",
"0.6463909",
"0.6454353",
"0.63867646",
"0.6334855",
"0.6256978",
"0.6226091",
"0.6226091",
"0.6226091",
"0.6226091",
"0.6226091",
"0.61937344",
"0.6146082",
"0.61171454",
"0.61154133",
"0.6111498",
"0.6109041",
"0.61022186",
"0.6083515",
"0.6073845",
"0.60468334",
"0.6028739",
"0.6028739",
"0.6028739",
"0.60230863",
"0.60230863",
"0.60230863",
"0.60055983"
]
| 0.7065436 | 1 |
Creates a button to navigate to an event | function displayEventButton($eventID, $eventInfo){
//Creates a button to navigate to an event
// Format location string
$location = '';
if($eventInfo['eventCity'] != null){
$location = $eventInfo['eventCity'];
}
if($eventInfo['eventProvince'] != null){
if(isset($location)){ $location .= ', '; }
$location .= $eventInfo['eventProvince'];
}
if($eventInfo['eventCountry'] != null){
if(isset($location)){ $location .= ', '; }
$location .= $eventInfo['eventCountry'];
}
$location = rtrim($location,', \t');
// Format year and date string
$name = $eventInfo['eventName'];
$year = $eventInfo['eventYear'];
$startDate = $eventInfo['eventStartDate'];
$endDate = $eventInfo['eventStartDate'];
try {
$format = "M jS";
$dateString = '';
if (isset($startDate)) {
$dateString = (new DateTime($startDate))->format($format);
if (isset($endDate) && $endDate != $startDate)
$dateString .= " - " . (new DateTime($endDate))->format($format);
} else if (isset($endDate)) {
$dateString = (new DateTime($endDate))->format($format);
}
} catch (Exception $e) {
$dateString = '';
}
// Displays current event in red
if($eventID == $_SESSION['eventID']) {
$isActive = "alert";
} else {
$isActive = '';
}
?>
<button value='<?= $eventID ?>' style='width:100%'
class='button hollow <?= $isActive ?>' name='changeEventTo' >
<?= $name ?>, <?= $year ?>
<span class='hide-for-small-only'> - </span>
<BR class='show-for-small-only'>
<?= $location ?>
<BR>
<?= $dateString ?>
</button>
<?php } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeLinkButton() {}",
"public function makeShortcutButton() {}",
"function newButton($view) {\n\t\t$str = '<a class=\"button is-primary\" href=\"?do=edit&view='.$view.'\">New</a>';\n\t\treturn $str;\n\t}",
"public function getButton() {}",
"function CreateButton()\n\t{\n\t\t$button = new Button('Click Me!', $this->CurrentLeft, $this->CurrentTop, 150);\n\t\t/* Adds the Button object to the WebPage's ArrayList called Controls.\n\t\t Without this line, a Button is merely created, but will\n\t\t not be displayed. */\n\t\t$this->Controls->Add($button);\n\t\t/* Increases the class variable for Left by 50 pixels so that subsequent\n\t\t Buttons will appear to the right. */\n\t\t$this->CurrentLeft += 50;\n\t\t/* Increases the class variable for Top by 30 pixels so that subsequent\n\t\t Buttons will appear below. */\n\t\t$this->CurrentTop += 30;\n\t\t/* Sets the Click Event for this Button to call the\n\t\t CreateButton function of this object. Thus, every\n\t\t Button will be able to create other Buttons. \n\t\t \n\t\t The first parameter tells NOLOH in which class definition the event\n\t\t is defined. The second parameter is the name of the event to be\n\t\t called. */\n\t\t$button->Click = new ServerEvent($this, 'CreateButton');\n\t\t/* The following line demonstrates two more aspects\n\t\t of Events. First of all, we can use the Click[] = \n\t\t notation to append another ServerEvent to the Click. \n\t\t Thus, Events can be treated like arrays in NOLOH. Now\n\t\t the Click will perform two separate tasks in the defined order.\n\t\t Secondly, a ServerEvent does not have to call a\n\t\t function of the $this object, but it can be any\n\t\t object whatsoever. We will call a function of the\n\t\t Button itself, namely, SetText, to set the Text\n\t\t to something else. Parameters to functions are given\n\t\t by any additional parameters to ServerEvent, so\n\t\t the button's text will be set to 'Thanks! Click Again!'\n\t\t In short, clicking on the button will perform the\n\t\t statement: $button->SetText('Thanks! Click Again!'); */\n\t\t$button->Click[] = new ServerEvent($button, 'SetText', 'Thanks! Click Again!');\n\t\t/* In summary, clicking on any Button will make another\n\t\t Button below and to the right of the clicked button, as well\n\t\t as change the clicked button's Text (or label). */\n\t}",
"function displayCreateButton() {\r\n\t \t\r\n\t \techo \"<a href='create.php' class='btn btn-success'>Create a New Question!!</a><br />\";\r\n\t \t\r\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 }",
"public function makeInputButton() {}",
"function nav_buttons()\n\t{\n\t\t?>\n\t\t<input type=\"button\" value=\"Create New Preorder >\" onclick=\"document.location='/admin/utilities/preorder.php?act=new'\" class=\"btn\">\n\t\t<p />\n\t\t<?php\n\t}",
"protected function generateButtons() {}",
"function rt_button_show($target)\n{\n return rt_ui_button('show', $target, 'search');\n}",
"function m_button2OnButtonClick( $event )\n {\n // Open the Relationships Frame.\n $relationships = new MyFrame3(null);\n $relationships->Show();\n }",
"function rt_ui_button($label, $target, $icon, $options = array())\n{\n $options['class'] = 'new ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary';\n $content = sprintf('<span class=\"ui-button-icon-primary ui-icon ui-icon-%s\"></span><span class=\"ui-button-text\">%s</span>', $icon, $label);\n return link_to($content, $target, $options);\n}",
"protected function createButton($config)\n {\n $tmpl = $this->getOptionalTemplate(\n $config,\n ARCH_PATH.'/theme/form/button.php'\n );\n if (\n !empty($config['action'])\n && !empty($config['property'])\n && !empty($this->record)\n ) {\n $config['action'] .= $this->record[$config['property']];\n }\n $v = new \\Arch\\Registry\\View($tmpl, $config);\n return $v;\n }",
"function m_button3OnButtonClick( $event )\n {\n // Open the Relations Frame.\n $relations = new MyFrame4(null);\n $relations->Show();\n }",
"public function addButton(\\SetaPDF_FormFiller_Field_Button $button) {}",
"public function renderCreateButton()\n {\n return new Tools\\CreateButton($this);\n }",
"function shortcode_insert_button()\n {\n $this->config['self_closing'] = 'yes';\n\n $this->config['name'] = __('Download Button', 'avia_framework');\n $this->config['tab'] = __('Content Elements', 'avia_framework');\n $this->config['icon'] = AviaBuilder::$path['imagesURL'] . \"sc-button.png\";\n $this->config['order'] = 1;\n $this->config['target'] = 'avia-target-insert';\n $this->config['shortcode'] = 'avia_download_button';\n $this->config['tooltip'] = __('Creates a download button', 'avia_framework');\n $this->config['tinyMCE'] = ['tiny_always' => true];\n $this->config['preview'] = true;\n }",
"static function createButton($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/button.php\";\n }",
"protected function registerButtons() {}",
"protected function registerButtons() {}",
"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 createAccountButton(){\n\t\techo '<form name=\"accounts\" method=\"post\" action=\"CheckBook.php/:Add\">';\n\t\techo '<button type=\"submit\">Add an Account</button>';\n\t\techo '</form>';\n\t}",
"public function addsButtons() {}",
"function rt_button_edit($target)\n{\n return rt_ui_button('edit', $target, 'pencil');\n}",
"function m_button1OnButtonClick( $event )\n {\n // Open the People Frame.\n $people = new MyFrame2(null);\n $people->Show();\n }",
"function eventLink ( $id, $name ) {\n return \"<a class='e' href='\" . pathToRoot() . \"e.php?i=$id'>$name</a>\";\n}",
"public function set_button($button) { $this->button = $button; }",
"public function backToViewButton($id) {\n\t\tglobal $system_data;\n\t\t$btv = new Link($this->modePrefix() . \"view&id=$id\", \"Zurück\");\n\t\t$btv->addIcon(\"arrow_left\");\n\t\t$btv->write();\n\t}",
"protected function getShortcutButton() {}"
]
| [
"0.66758275",
"0.6371852",
"0.63427365",
"0.6305093",
"0.62175494",
"0.62047577",
"0.6123406",
"0.6001758",
"0.59789425",
"0.5882958",
"0.58787584",
"0.58160496",
"0.5797098",
"0.5745899",
"0.57406306",
"0.5738357",
"0.57351345",
"0.5725283",
"0.57037705",
"0.5680082",
"0.5679697",
"0.5675188",
"0.5665882",
"0.56608504",
"0.5656115",
"0.5651485",
"0.5640286",
"0.56294096",
"0.56188107",
"0.5610861"
]
| 0.6582091 | 1 |
/ Function to display each exchange on small screens | function displayExchangeSmall($exchange, $num = null, $showExchTime = false){
$colorCode1 = COLOR_CODE_1;
$colorCode2 = COLOR_CODE_2;
$t1 = $exchange[1][1];
if($t1 == null){$t1 = " ";}
$t2 = $exchange[1][2];
if($t2 == null){$t2 = " ";}
$b1 = $exchange[2][1];
if($b1 == null){$b1 = " ";}
$b2 = $exchange[2][2];
if($b2 == null){$b2 = " ";}
if($showExchTime && $exchange['time'] == ''){
$exchange['time'] = "0:00";
}
$class = '';
$odd = '';
if($num % 2 != 1){
$class= 'old-exch-odd';
} else {
$odd= "opacity:0.92;";
}
?>
<tr class='old-exch-mini'>
<td class='<?=$class?>'>
<?php if($showExchTime){
echo $exchange['time'];
} else {
echo $num;
} ?>
</td>
<td class='f1-BG' style='<?=$odd?>'>
<?=$t1?>
</td>
<td class='f1-BG' style='<?=$odd?>'>
<?=$t2?>
</td>
<td class='f2-BG' style='<?=$odd?>'>
<?=$b1?>
</td>
<td class='f2-BG' style='<?=$odd?>'>
<?=$b2?>
</td>
</tr>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Show_Shelf($cur_title,$shelf_arr)\r\n\t\t{ \r\n\t\t\tglobal $ecom_siteid,$db,$ecom_hostname,$Settings_arr,$ecom_themeid,$default_layout,$Captions_arr,$inlineSiteComponents,$shelf_for_inner,$position;\r\n\t\t\t$Captions_arr['COMMON'] = getCaptions('COMMON');\r\n\t\t\tif (count($shelf_arr))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$shelfsort_by\t\t\t= $Settings_arr['product_orderfield_shelf'];\r\n\t\t\t\tif($position == 'left-middle-band')\r\n\t\t\t\t{\r\n\t\t\t\t $prodperpage\t\t\t= 4;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$prodperpage\t\t\t= $Settings_arr['product_maxcntperpage_shelf'];// product per page\r\n\t\t\t\tswitch ($shelfsort_by)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'custom': // case of order by customer fiekd\r\n\t\t\t\t\t$shelfsort_by\t\t= 'b.product_order';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'product_name': // case of order by product name\r\n\t\t\t\t\t$shelfsort_by\t\t= 'a.product_name';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'price': // case of order by price\r\n\t\t\t\t\t$shelfsort_by\t\t= 'a.product_webprice';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'product_id': // case of order by price\r\n\t\t\t\t\t$prodsort_by\t\t= 'a.product_id';\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t\t\tdefault: // by default order by product name\r\n\t\t\t\t\t$shelfsort_by\t\t= 'a.product_name';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t};\r\n\t\t\t\t$shelfsort_order\t\t= $Settings_arr['product_orderby_shelf'];\r\n\t\t\t\t$prev_shelf\t\t\t\t= 0;\r\n\t\t\t\t$show_max =0;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Iterating through the shelf array to fetch the product to be shown.\r\n\t\t\t\tforeach ($shelf_arr as $k=>$shelfData)\r\n\t\t\t\t{ \r\n\t\t\t\t\t// Check whether shelf_activateperiodchange is set to 1\r\n\t\t\t\t\t$active \t= $shelfData['shelf_activateperiodchange'];\r\n\t\t\t\t\tif($active==1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$proceed\t= validate_component_dates($shelfData['shelf_displaystartdate'],$shelfData['shelf_displayenddate']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$proceed\t= true;\t\r\n\t\t\t\t\tif ($proceed)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($_REQUEST['req']!='') // If coming to show the details in middle area other than from the home page then show the details in normal shelf style\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//if($shelf_for_inner==true) /* Case if call is to display shelf at the bottom on inner pages*/\r\n\t\t\t\t\t\t//\t\t$shelfData['shelf_currentstyle']='inner_list';\r\n\t\t\t\t\t\t\t//else\r\n\t\t\t\t\t\t\tif($shelfData['shelf_currentstyle']!='gallery')\r\n\t\t\t\t\t\t\t\t$shelfData['shelf_currentstyle']='listingall';\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 //if($shelf_for_inner==true)\r\n\t\t\t\t\t\t\t //$shelfData['shelf_currentstyle']='inner_list';\r\n\t\t\t\t\t\t\t //else\r\n\t\t\t\t\t\t\t //$shelfData['shelf_currentstyle']= 'nor';\r\n\t\t\t\t\t\t\t $shelfData['shelf_currentstyle']= 'listingall';\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Get the total number of product in current shelf\r\n\t\t\t\t\t\t$sql_totprod = \"SELECT count(b.products_product_id) \r\n\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\tproducts a,product_shelf_product b \r\n\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\tb.product_shelf_shelf_id = \".$shelfData['shelf_id'].\" \r\n\t\t\t\t\t\t\t\t\t\tAND a.product_id = b.products_product_id \r\n\t\t\t\t\t\t\t\t\t\tAND a.product_hide = 'N' \";\r\n\t\t\t\t\t\t$ret_totprod \t= $db->query($sql_totprod);\r\n\t\t\t\t\t\tlist($tot_cnt) \t= $db->fetch_array($ret_totprod); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Call the function which prepares variables to implement paging\r\n\t\t\t\t\t\t$ret_arr \t\t= array();\r\n\t\t\t\t\t\t$pg_variable\t= 'shelf_'.$shelfData['shelf_id'].'_pg';\r\n\t\t\t\t\t\tif ($_REQUEST['req']!='')// LIMIT for products is applied only if not displayed in home page\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$start_var \t\t= prepare_paging($_REQUEST[$pg_variable],$prodperpage,$tot_cnt);\r\n\t\t\t\t\t\t\t$Limit\t\t\t= \" LIMIT \".$start_var['startrec'].\", \".$prodperpage;\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\tif($shelfData['shelf_currentstyle']=='inner_list' and $shelfData['shelf_displaytype']=='2row')\r\n\t\t\t\t\t\t\t\t$Limit = ' LIMIT 5';\r\n\t\t\t\t\t\t\telseif($shelfData['shelf_currentstyle']=='inner_list' and $shelfData['shelf_displaytype']=='4row')\r\n\t\t\t\t\t\t\t\t$Limit = ' LIMIT 8';\r\n } \r\n if($position == 'left-middle-band')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$Limit = ' LIMIT 4';\r\n\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\t// Get the list of products to be shown in current shelf\r\n\t\t\t\t\t\t$sql_prod = \"SELECT a.product_id,a.product_name,a.product_variablestock_allowed,a.product_show_cartlink,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_preorder_allowed,a.product_show_enquirelink,a.product_webstock,a.product_actualstock,a.product_webprice,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_discount,a.product_discount_enteredasval,a.product_bulkdiscount_allowed,\r\n\t\t\t\t\t\t\t\t\t\t\tproduct_total_preorder_allowed,a.product_applytax,a.product_shortdesc,a.product_bonuspoints,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_stock_notification_required,a.product_alloworder_notinstock,a.product_variables_exists,a.product_variablesaddonprice_exists,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_variablecomboprice_allowed,a.product_variablecombocommon_image_allowed,a.default_comb_id,\r\n\t\t\t\t\t\t\t\t\t\t\ta.price_normalprefix,a.price_normalsuffix, a.price_fromprefix, a.price_fromsuffix,a.price_specialofferprefix, a.price_specialoffersuffix, \r\n\t\t\t\t\t\t\t\t\t\t\ta.price_discountprefix, a.price_discountsuffix, a.price_yousaveprefix, a.price_yousavesuffix,a.price_noprice,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_averagerating,a.product_saleicon_show,a.product_saleicon_text,a.product_newicon_show,a.product_newicon_text,\r\n\t\t\t\t\t\t\t\t\t\t\ta.product_freedelivery \r\n\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\t\tproducts a,product_shelf_product b \r\n\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\tb.product_shelf_shelf_id = \".$shelfData['shelf_id'].\" \r\n\t\t\t\t\t\t\t\t\t\t\tAND a.product_id = b.products_product_id \r\n\t\t\t\t\t\t\t\t\t\t\tAND a.product_hide = 'N' \r\n\t\t\t\t\t\t\t\t\t\tORDER BY \r\n\t\t\t\t\t\t\t\t\t\t\ta.product_webstock DESC,a.product_webprice ASC \r\n\t\t\t\t\t\t\t\t\t\t$Limit\t\";\r\n\t\t\t\t\t\t$ret_prod = $db->query($sql_prod);\r\n\t\t\t\t\t\tif ($db->num_rows($ret_prod))\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$comp_active = isProductCompareEnabled();\r\n\t\t\t\t\t\t\t$pass_type = get_default_imagetype('midshelf');\r\n\t\t\t\t\t\t\t//print_r($shelfData);\r\n\t\t\t\t\t\t\t// Number of result to display on the page, will be in the LIMIT of the sql query also\r\n\t\t\t\t\t\t\t$querystring = \"\"; // if any additional query string required specify it over here\r\n\t\t\t\t\t\t\tif($shelfData['shelf_currentstyle']=='gallery') // case of normal design layout\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tswitch($shelfData['shelf_displaytype'])\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tcase 'olddefault':\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"gallery_table\">\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t$max_col = 3;\r\n\t\t\t\t\t\t\t\t\t\t\t$cur_col=0;\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t$imghold_arr = array();\r\n\t\t\t\t\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$pass_type ='image_thumbpath';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor($im_i=0;$im_i<count($img_arr);$im_i++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$imghold_arr[] = array('img'=>url_root_image($img_arr[$im_i][$pass_type],1),'id'=>$row_prod['product_id'],'name'=>$row_prod['product_name']);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(count($imghold_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor($im_i=0;$im_i<count($imghold_arr);$im_i++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"gallery_td\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo url_product($imghold_arr[$im_i]['id'],$imghold_arr[$im_i]['name'],0)?>\" title=\"<?php echo stripslash_normal($imghold_arr[$im_i]['name'])?>\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshow_image($imghold_arr[$im_i]['img'],$imghold_arr[$im_i]['name'],$imghold_arr[$im_i]['name'],'','',0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?> \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cur_col++;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col>=$max_col)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$cur_col = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif($max_col>$cur_col)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo \"<td class='gallery_td' colspan='\".($max_col-$cur_col).\"'> </td></tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t</table>\t\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\t$prev_id = 0;\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t$imghold_arr = array();\r\n\t\t\t\t\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$pass_type ='image_thumbpath';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"gallery_propertyouter\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"gallery_propertyname\"><a href=\"<?php echo url_product($row_prod['product_id'],$row_prod['product_name'],1)?>\"><?php echo stripslashes($row_prod['product_name'])?></a></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor($im_i=0;$im_i<count($img_arr);$im_i++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"gallery_image\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo url_root_image($img_arr[$im_i]['image_bigpath'])?>\" title=\"<?php echo stripslash_normal($row_prod['product_name'])?>\" rel='lightbox[gallery_<?php echo $row_prod['product_id']?>]'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshow_image(url_root_image($img_arr[$im_i][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?> \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\t\telseif($shelfData['shelf_currentstyle']=='nor') // case of normal design layout\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tswitch($shelfData['shelf_displaytype'])\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t\tcase 'scroll':\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$width_one_set \t= 305;\r\n\t\t\t\t\t\t\t\t\t\t$min_number_req\t= 3;\r\n\t\t\t\t\t\t\t\t\t\t$min_width_req \t= $width_one_set * $min_number_req;\r\n\t\t\t\t\t\t\t\t\t\t$total_cnt\t\t= $db->num_rows($ret_prod);\r\n\t\t\t\t\t\t\t\t\t\t$calc_width\t\t= $total_cnt * $width_one_set;\r\n\t\t\t\t\t\t\t\t\t\tif($calc_width < $min_width_req)\r\n\t\t\t\t\t\t\t\t\t\t\t$div_width = $min_width_req;\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t$div_width = $calc_width; \r\n\t\t\t\t\t\t\t\t\t\t\t$divid = uniqid('shelf');\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<div class=\"marquee\" id=\"mycrawler2\">\r\n\r\n\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t\t\t\t\t\t\t <tr>\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t <?php\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t<td><div class=\"list_scroll\" >\r\n\t\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$prodcur_arr[] = $row_prod;\r\n\t\t\t\t\t\t\t\t\t\t$HTML_title = $HTML_image = $HTML_desc = '';\r\n\t\t\t\t\t\t\t\t\t\t$HTML_sale = $HTML_new = $HTML_compare = $HTML_rating = '';\r\n\t\t\t\t\t\t\t\t\t\t$HTML_price = $HTML_bulk= $HTML_bonus = $HTML_compare = $HTML_freedel= $HTML_bonus_bar = '';\r\n\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_showtitle']==1)// whether title is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_title = '<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">'.stripslash_normal($row_prod['product_name']).'</a>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showimage']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_image ='<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">';\r\n\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\r\n\t\t\t\t\t\t\t\t\t\t\t$pass_type ='image_thumbcategorypath';\r\n\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,1);\r\n\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= show_image(url_root_image($img_arr[0][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t// calling the function to get the default image\r\n\t\t\t\t\t\t\t\t\t\t\t\t$no_img = get_noimage('prod',$pass_type); \r\n\t\t\t\t\t\t\t\t\t\t\t\tif ($no_img)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= show_image($no_img,$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= '</a>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['class_type'] = 'div';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['normal_class'] = 'normal_shlfB_pdt_priceA';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['strike_class'] = 'normal_shlfB_pdt_priceB';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['yousave_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['discount_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_arr = show_Price($row_prod,$price_class_arr,'shelfcenter_3',false,3);\r\n\t\t\t\t\t\t\t\t\t\t\tif($price_arr['discounted_price'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['discounted_price'];\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['base_price'];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_name\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?=$HTML_title;?>\r\n\t\t\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_img\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $HTML_image;?>\r\n\t\t\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"list_scroll_price\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?\r\n\t\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_price;\r\n\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_buy_otr\" > \r\n\t\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_buy_l\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t$link \t\t= url_product($row_prod['product_id'],$row_prod['product_name'],1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $link?>\" title=\"<?php echo $row_prod['product_name']?>\" class=\"\">Buy</a>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"list_scroll_buy_r\" ><a href=\"<?php echo $link?>\" title=\"<?php echo $row_prod['product_name']?>\" class=\"\">More Info</a></div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t</div></td>\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t?>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t\tmarqueeInit({\r\n\t\t\t\t\t\t\t\t\t\tuniqueid: 'mycrawler2',\r\n\t\t\t\t\t\t\t\t\t\tstyle: {\r\n\t\t\t\t\t\t\t\t\t\t\t'padding': '0',\r\n\t\t\t\t\t\t\t\t\t\t\t'width': '930px',\r\n\t\t\t\t\t\t\t\t\t\t\t'height': '265px',\r\n\t\t\t\t\t\t\t\t\t\t\t'margin' : '0',\r\n\t\t\t\t\t\t\t\t\t\t\t'float' :\"left\"\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tinc:5, //speed - pixel increment for each iteration of this marquee's movement\r\n\t\t\t\t\t\t\t\t\t\tmouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)\r\n\t\t\t\t\t\t\t\t\t\tmoveatleast: 2,\r\n\t\t\t\t\t\t\t\t\t\tneutral: 150,\r\n\t\t\t\t\t\t\t\t\t\tsavedirection: true,\r\n\t\t\t\t\t\t\t\t\t\trandom: true\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t$HTML_comptitle = $HTML_maindesc = $HTML_paging = $HTML_showall = '';\r\n\t\t\t\t\t\t\t\t\t\tif($cur_title!='')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_comptitle =' <div class=\"shlf_a_top\">\r\n\t\t\t\t\t\t\t\t\t\t\t <div class=\"shlf_a_hdr\">\r\n\t\t\t\t\t\t\t\t\t\t\t <table border=\"0\" class=\"shlf_a_hdrtable\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" >\r\n\t\t\t\t\t\t\t\t\t\t\t\t <tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"shlf_a_hdrl\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if($tot_cnt>0) // case of show all link\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //$HTML_comptitle .= \"<a href='\".url_shelf_all($shelfData['shelf_id'],$shelfData['shelf_name'],1).\"' title=''>\".stripslashes($cur_title).\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $HTML_comptitle .=stripslashes($cur_title);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_comptitle .='</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"shlf_a_hdrr\"> </td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t\t\t\t\t\t\t </table>\r\n\t\t\t\t\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t\t\t\t\t </div>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$desc = trim($shelfData['shelf_description']);\r\n\t\t\t\t\t\t\t\t\t\tif($desc!='' and $desc!=' ')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $desc = stripslashes($desc);\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_maindesc = '<p>'.$desc.'</p>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t?>\r\n <div class=\"shlf_a_con\"> \r\n <? \r\n echo $HTML_comptitle;\r\n echo $HTML_maindesc;\r\n\t\t\t\t\t\t\t\t\t$width_one_set \t= 305;\r\n\t\t\t\t\t\t\t\t\t$min_number_req\t= 3;\r\n\t\t\t\t\t\t\t\t\t$min_width_req \t= $width_one_set * $min_number_req;\r\n\t\t\t\t\t\t\t\t\t$total_cnt\t\t= $db->num_rows($ret_prod);\r\n\t\t\t\t\t\t\t\t\t$calc_width\t\t= $total_cnt * $width_one_set;\r\n\t\t\t\t\t\t\t\t\tif($calc_width < $min_width_req)\r\n\t\t\t\t\t\t\t\t\t\t$div_width = $min_width_req;\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t$div_width = $calc_width; \r\n\t\t\t\t\t\t\t\t\t\t$divid = uniqid('shelf');\r\n ?>\r\n \t<div class=\"shlf_a_bottom\">\r\n <div class=\"shlf_a_outer\">\r\n <div class=\"shlf_thumb_outer\">\r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t $max_col = 3;\r\n $cur_col = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n while($row_prod = $db->fetch_array($ret_prod))\r\n {\r\n $prodcur_arr[] = $row_prod;\r\n $HTML_title = $HTML_image = $HTML_desc = '';\r\n $HTML_sale = $HTML_new = $HTML_compare = $HTML_rating = '';\r\n $HTML_price = $HTML_bulk= $HTML_bonus = $HTML_compare = $HTML_freedel= $HTML_bonus_bar = '';\r\n if($shelfData['shelf_showtitle']==1)// whether title is to be displayed\r\n {\r\n $HTML_title = '<div class=\"shlf_a_pdt_name\"><a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">'.stripslash_normal($row_prod['product_name']).'</a></div>';\r\n }\r\n if ($shelfData['shelf_showimage']==1)// Check whether description is to be displayed\r\n {\r\n $HTML_image ='<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">';\r\n // Calling the function to get the image to be shown\r\n $pass_type ='image_thumbcategorypath';\r\n $img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,1);\r\n if(count($img_arr))\r\n {\r\n $HTML_image .= show_image(url_root_image($img_arr[0][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n }\r\n else\r\n {\r\n // calling the function to get the default image\r\n $no_img = get_noimage('prod',$pass_type); \r\n if ($no_img)\r\n {\r\n $HTML_image .= show_image($no_img,$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n } \r\n } \r\n $HTML_image .= '</a>';\r\n }\r\n if ($shelfData['shelf_showdescription']==1)// Check whether description is to be displayed\r\n {\r\n $HTML_desc = '<div class=\"shlf_a_pdt_des\">'.stripslash_normal($row_prod['product_shortdesc']).'</div>';\r\n }\r\n if ($shelfData['shelf_showprice']==1)\r\n {\r\n $price_class_arr['class_type'] = 'div';\r\n $price_class_arr['normal_class'] = 'normal_shlfB_pdt_priceA';\r\n $price_class_arr['strike_class'] = 'normal_shlfB_pdt_priceB';\r\n $price_class_arr['yousave_class'] = 'normal_shlfB_pdt_priceC';\r\n $price_class_arr['discount_class'] = 'normal_shlfB_pdt_priceC';\r\n $price_arr = show_Price($row_prod,$price_class_arr,'shelfcenter_3',false,3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($price_arr['discounted_price'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['discounted_price'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['base_price'];\r\n }\r\n ?>\r\n <?php\r\n if($cur_col==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"shlf_d_pdt_otr_row1\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n \r\n <div class=\"shlf_a_pdt\">\r\n <?php\r\n if($row_prod['product_saleicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$desc = stripslash_normal(trim($row_prod['product_saleicon_text']));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//if($desc!='')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $HTML_sale = '<div class=\"pdt_list_sale\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_newicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$desc = stripslash_normal(trim($row_prod['product_newicon_text']));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $HTML_new = '<div class=\"pdt_list_new\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_new ;\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_sale;\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n <div class=\"shlf_a_pdt_top\"></div>\r\n \r\n <div class=\"shlf_a_pdt_mid\">\r\n <?=$HTML_title;?>\r\n <div class=\"shlf_a_pdt_r\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo $HTML_image;?>\r\n </div>\r\n <div class=\"shlf_a_pdt_l\">\r\n \r\n <? /*=$HTML_desc*/ ?>\r\n <div class=\"shlf_a_pdt_buy_otr\">\r\n <div class=\"shlf_a_pdt_price\"><?\r\n if ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_price;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?></div>\r\n <div class=\"shlf_a_pdt_buy\">\r\n <?php $frm_name = 'frm_shelf'.uniqid('').$row_prod['product_id'] ?>\r\n <form method=\"post\" action=\"<?php url_link('manage_products.html')?>\" name='<?php echo $frm_name?>' id=\"<?php echo $frm_name?>\" class=\"frm_cls\" onsubmit=\"return product_enterkey(this,<?php echo $row_prod['product_id']?>)\">\r\n <input type=\"hidden\" name=\"fpurpose\" value=\"\" />\r\n <input type=\"hidden\" name=\"fproduct_id\" value=\"\" />\r\n <input type=\"hidden\" name=\"pass_url\" value=\"<?php echo $_SERVER['REQUEST_URI']?>\" />\r\n <input type=\"hidden\" name=\"fproduct_url\" value=\"<?php url_product($row_prod['product_id'],$row_prod['product_name'])?>\" />\r\n <?php\r\n $class_arr \t\t\t\t\t= array();\r\n $class_arr['ADD_TO_CART']\t= 'quantity_infolink';\r\n $class_arr['PREORDER']\t\t= 'quantity_infolink';\r\n $class_arr['ENQUIRE']\t\t= 'quantity_infolink';\r\n show_addtocart($row_prod,$class_arr,$frm_name,false,'','','',1);\r\n $link \t\t= url_product($row_prod['product_id'],$row_prod['product_name'],1);\r\n ?>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"shlf_a_pdt_more\"><a href=\"<?php echo $link?>\" title=\"<?php echo $row_prod['product_name']?>\" class=\"\">More Info</a></div>\r\n \r\n </div>\r\n \r\n </div>\r\n <?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$cur_col++;\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col>=$max_col)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$cur_col =0;\r\n\t\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col<$max_col)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col!=0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n ?>\r\n \r\n </div>\r\n \r\n <?php /*<div class=\"shlf_thumb_outer_more\"><a href=\"<?php echo url_shelf_all($shelfData['shelf_id'],$shelfData['shelf_name'],1); ?>\"><?php echo $Captions_arr['COMMON']['SHOW_ALL']; ?></a></div> */ ?>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\tbreak;\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\telseif($shelfData['shelf_currentstyle']=='listingall') // case of shelf to be displayed in inner pages\r\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$HTML_comptitle = $HTML_maindesc = $HTML_paging = $HTML_showall = '';\r\n\t\t\t\t\t\t\t\t\t\tif($cur_title!='')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_comptitle ='<h3>'.stripslashes($cur_title).'</h3>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$desc = trim($shelfData['shelf_description']);\r\n\t\t\t\t\t\t\t\t\t\tif($desc!='' and $desc!=' ')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $desc = stripslashes($desc);\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_maindesc = '<p>'.$desc.'</p>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ($tot_cnt>0 and ($_REQUEST['req']!='') and $tot_cnt>$prodperpage)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$paging \t\t= paging_footer_advanced($path,$query_string,$tot_cnt,$start_var['pg'],$start_var['pages'],'',$pg_variable,'Properties',$pageclass_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t='<div class=\"subcat_nav_content\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class=\"subcat_nav_top\"></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<div class=\"subcat_nav_bottom\">';\r\n\t\t\t\t\t\t\t\t\t\t\tif(!$shelf_for_inner)\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_paging.= '<div class=\"subcat_nav_pdt_no\"><span>'.$paging['total_cnt'].'</span></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging.='\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"page_nav_content\"><ul>';//.'';\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t.= $paging['navigation']['start_nav'].$paging['navigation']['page_no'].$paging['navigation']['end_nav'];\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t.= ' \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul></div></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif($_REQUEST['req']=='' and $tot_cnt==-1) // case of show all link\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t //$HTML_showall = \"<div class='shlf_dhdr_r'><a href='\".url_shelf_all($shelfData['shelf_id'],$shelfData['shelf_name'],1).\"' title=''>\".$Captions_arr['COMMON']['SHOW_ALL'].\"</a></div>\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n <?php //echo $HTML_comptitle;?>\r\n <div class=\"listwrap\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"property_shelf\">\r\n \t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_comptitle;\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_maindesc;\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_paging;\r\n\t\t\t\t\t\t\t\t\t\t\t?>\t</div>\r\n </div>\r\n <?php\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$max_col = 3;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$cur_col = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$prodcur_arr = array();\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n \t\t\t\t<div class=\"listdetailwrap\">\r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*if($shelfData['shelf_name'] != \"\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\techo \"<h3>\".$shelfData['shelf_name'].\"</h3>\";\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_description'] != \"\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\techo \"<p>\".$shelfData['shelf_description'].\"</p>\";\t}*/\r\n\t\t\t\t\t\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$prodcur_arr[] = $row_prod;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_title = $HTML_image = $HTML_desc = '';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_sale = $HTML_new = $HTML_compare = $HTML_rating = '';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $HTML_bulk= $HTML_bonus = $HTML_compare = $HTML_freedel= $HTML_bonus_bar = '';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['class_type'] = 'div';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['normal_class'] = 'normal_shlfB_pdt_priceA';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['strike_class'] = 'normal_shlfB_pdt_priceB';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['yousave_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['discount_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t $price_arr = show_Price($row_prod,array(),'compshelf',false,3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($price_arr['discounted_price'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['discounted_price'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['base_price'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_showtitle']==1)// whether title is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_title = '<h3><a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">'.stripslash_normal($row_prod['product_name']).'</a> <span style=\"float:right;padding:0 15px 0 0;color:#FF5E33\">'.$HTML_price.'</span></h3>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showimage']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$pass_type\t=\t'image_thumbpath';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$img_arr\t=\tget_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tabimg_arr\t=\tget_imagelist('prod',$row_prod['product_id'],'image_bigpath',0,0,1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image ='<div class=\"slidemainImg\"><a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\" >';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$curimgid = $shelfData['shelf_id'].'_'.$row_prod['product_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tglobal $def_mainimg_id;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$def_mainimg_id = $curimgid;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//$HTML_image .= show_image(url_root_image($img_arr[0][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= '<img src=\"'.url_root_image($img_arr[0][$pass_type],1).'\" id=\"'.$curimgid.'\" alt=\"'.$row_prod['product_name'].'\">';\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calling the function to get the default image\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$no_img = get_noimage('prod',$pass_type); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($no_img)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= show_image($no_img,$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= '</a>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_saleicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//$HTML_image .= '<div class=\"icon-list-sale\"><img src=\"'.url_site_image('big-sale.png',1).'\" alt=\"Sale\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_newicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//$HTML_image .= '<div class=\"icon-list-new\"><img src=\"'.url_site_image('big-new.png',1).'\" alt=\"New\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_actualstock']==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= '<div class=\"nowlet_cls_inner\"><img src=\"'.url_site_image('nowLet.png',1).'\" alt=\"Now Let\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .='</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showdescription']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_desc = \"<div class='slidethumbwrap'>\".stripslash_normal($row_prod['product_shortdesc']).\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"list\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?=$HTML_title;?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n <div class=\"list_left\">\r\n <?=$HTML_image?>\r\n \r\n \r\n \r\n <?php //echo $HTML_desc;?>\r\n <?php show_MoreImages_Unipad($row_prod,0,0);?>\r\n \r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_actualstock']>0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$availability_msg = '<span class=\"green_available\">'.$Captions_arr['COMMON']['PRODDET_AVAIL_1_YEAR'].'</span>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$availability_msg = '<span class=\"red_available\">'.$Captions_arr['COMMON']['PRODDET_AVAIL_2_YEAR'].'</span>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $availability_msg;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n </div>\r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//$HTML_price = show_Price($row_prod,$price_class_arr,'shelfcenter_3');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo '<div class=\"pdt_list_thumb_outer\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col%2==0 && $cur_col!=0)\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cls = \"pdt_list_pdt_rt\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cls = \"pdt_list_pdt\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n <div class=\"list_right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*if($row_prod['product_actualstock']>0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$availability_msg = '<div class=\"green_available\">'.$Captions_arr['COMMON']['PRODDET_AVAIL_1_YEAR'].'</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$availability_msg = '<div class=\"red_available\">'.$Captions_arr['COMMON']['PRODDET_AVAIL_2_YEAR'].'</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $availability_msg;\t*/\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\t\r\n <?php show_ProductVariables_Unipad($row_prod['product_id']); ?>\r\n <?php /*?><ul class=\"list_point_left\">\r\n <li><a href=\"javascript:void(0);\">6 Bedrooms with double....</a></li>\r\n <li><a href=\"javascript:void(0);\">Large Lounge consisting....</a></li>\r\n <li><a href=\"javascript:void(0);\">High End Gloss White...</a></li>\r\n <li><a href=\"javascript:void(0);\">Bedrooms with Oak...</a></li>\r\n <li><a href=\"javascript:void(0);\">Bathrooms – we have...</a></li>\r\n <li><a href=\"javascript:void(0);\">Superb Gloss Black...</a></li>\r\n <li><a href=\"javascript:void(0);\">Ceramic Hob and Oven....</a></li> \r\n </ul>\r\n <ul class=\"list_point_right\">\r\n <li><a href=\"javascript:void(0);\">6 Bedrooms with double....</a></li>\r\n <li><a href=\"javascript:void(0);\">Large Lounge consisting....</a></li>\r\n <li><a href=\"javascript:void(0);\">High End Gloss White...</a></li>\r\n <li><a href=\"javascript:void(0);\">Bedrooms with Oak...</a></li>\r\n <li><a href=\"javascript:void(0);\">Bathrooms – we have...</a></li>\r\n <li><a href=\"javascript:void(0);\">Superb Gloss Black...</a></li>\r\n <li><a href=\"javascript:void(0);\">Ceramic Hob and Oven....</a></li>\r\n </ul><?php */?>\r\n </div>\r\n <?php /*?> <?php\r\n if($row_prod['product_saleicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$desc = stripslash_normal(trim($row_prod['product_saleicon_text']));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//if($desc!='')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $HTML_sale = '<div class=\"pdt_list_sale\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_newicon_show']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$desc = stripslash_normal(trim($row_prod['product_newicon_text']));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//if($desc!='')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $HTML_new = '<div class=\"pdt_list_new\"></div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_new;\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_sale;\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n \r\n \r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_showrating']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t $module_name = 'mod_product_reviews';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($module_name,$inlineSiteComponents))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_averagerating']>=0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_rating = '<div class=\"list_d_pdt_rate\">'.display_rating($row_prod['product_averagerating'],1).'</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_rating = ' ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n echo $HTML_rating;\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n \r\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_price;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n <?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t if($row_prod['product_bonuspoints']>0 and $shelfData['shelf_showbonuspoints']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_bonus = 'Bonus: '.$row_prod['product_bonuspoints'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_bonus = ' ';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"pdt_list_bonus\"> <?php echo $HTML_bonus;?> </div> \r\n \r\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_bulkdiscount_allowed']=='Y' || $row_prod['product_freedelivery']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<div class='pdt_list_free_otr'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_freedelivery']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_freedel = ' <div class=\"pdt_list_free_del\"> </div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_bulkdiscount_allowed']=='Y')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_bulk = '<div class=\"pdt_list_free_bulk\"> </div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($row_prod['product_bulkdiscount_allowed']=='Y' || $row_prod['product_freedelivery']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t echo \"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t </div><?php */?>\r\n \r\n <div class=\"listicon\">\r\n \t<?php show_ProductLabels_Unipad($row_prod['product_id']); ?>\r\n <?php /*?><ul class=\"featurelist\">\r\n <li><a href=\"javascript:void(0);\"><img src=\"<?php url_site_image('icon_flat_tv.png');?>\" /></a></li>\r\n <li><a href=\"javascript:void(0);\"><img src=\"<?php url_site_image('icon_double_bed.png');?>\" /></a></li>\r\n <li><a href=\"javascript:void(0);\"><img src=\"<?php url_site_image('icon_coffee_table.png');?>\" /></a></li>\r\n <li><a href=\"javascript:void(0);\"><img src=\"<?php url_site_image('icon_walkable.png');?>\"/></a></li>\r\n </ul><?php */?>\r\n \r\n <div class=\"viewdetails\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php url_product($row_prod['product_id'],$row_prod['product_name'])?>\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\"><?php echo stripslash_normal($Captions_arr['COMMON']['COMMON_FULL_DETAILS'])?></a> \r\n \t\t\t\t\t</div>\r\n </div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t$cur_col++;\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col>=$max_col)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/*$cur_col =0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";*/\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($cur_col<$max_col)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($cur_col!=0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//echo \"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n ?> \r\n </div>\r\n \r\n \r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telseif($shelfData['shelf_currentstyle']=='inner_list') // case of shelf to be displayed in inner pages\r\n\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t switch($position)\r\n\t\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t case 'left-middle-band':\r\n\t\t\t\t\t\t\t\t\t $HTML_comptitle = $HTML_maindesc = $HTML_paging = $HTML_showall = '';\r\n\t\t\t\t\t\t\t\t\t\tif($cur_title!='')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_comptitle ='<div class=\"shlf_d_hdr\">'.stripslashes($cur_title).'</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$desc = trim($shelfData['shelf_description']);\r\n\t\t\t\t\t\t\t\t\t\tif($desc!='' and $desc!=' ')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t $desc = stripslashes($desc);\r\n\t\t\t\t\t\t\t\t\t\t\t $HTML_maindesc = '<p>'.$desc.'</p>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ($tot_cnt>0 and ($_REQUEST['req']!='') and $tot_cnt>$prodperpage)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$paging \t\t= paging_footer_advanced($path,$query_string,$tot_cnt,$start_var['pg'],$start_var['pages'],'',$pg_variable,'Products',$pageclass_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t='<div class=\"subcat_nav_content\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class=\"subcat_nav_top\"></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<div class=\"subcat_nav_bottom\">\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"subcat_nav_pdt_no\"><span>'.$paging['total_cnt'].'</span></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"page_nav_content\"><ul>';//.'';\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t.= $paging['navigation']['start_nav'].$paging['navigation']['page_no'].$paging['navigation']['end_nav'];\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_paging \t.= ' \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul></div></div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif($tot_cnt==-1) // case of show all link\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t //$HTML_showall = \"<div class='shlf_dhdr_r'><a href='\".url_shelf_all($shelfData['shelf_id'],$shelfData['shelf_name'],1).\"' title='' class='shlfd-showall'>\".$Captions_arr['COMMON']['SHOW_ALL'].\"</a></div>\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t ?>\r\n <div class=\"shlf_d_con\"> \r\n <?php echo $HTML_comptitle;?>\r\n <?php //echo $HTML_showall;?>\r\n <div class=\"shlf_d_bottom\">\r\n <?php echo $HTML_maindesc ; \r\n $max_col = 2;\r\n $cur_col = 0;\r\n $prodcur_arr = array();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t while($row_prod = $db->fetch_array($ret_prod))\r\n {\r\n $prodcur_arr[] = $row_prod;\r\n $HTML_title = $HTML_image = $HTML_desc = '';\r\n $HTML_sale = $HTML_new = $HTML_compare = $HTML_rating = '';\r\n $HTML_price = $HTML_bulk= $HTML_bonus = $HTML_compare = $HTML_freedel= $HTML_bonus_bar = '';\r\n\t\t\t\t\t\t\tif($shelfData['shelf_showtitle']==1)// whether title is to be displayed\r\n\t\t\t\t\t\t\t{\r\n $HTML_title = '<div class=\"shlf_d_pdt_name\"><a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">'.stripslash_normal($row_prod['product_name']).'</a></div>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($shelfData['shelf_showimage']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t{\r\n $HTML_image ='<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">';\r\n\t\t\t\t\t\t\t\r\n // Calling the function to get the image to be shown\r\n $pass_type ='image_thumbpath';\r\n $img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,1);\r\n if(count($img_arr))\r\n {\r\n $HTML_image .= show_image(url_root_image($img_arr[0][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n }\r\n else\r\n {\r\n // calling the function to get the default image\r\n $no_img = get_noimage('prod',$pass_type); \r\n if ($no_img)\r\n {\r\n $HTML_image .= show_image($no_img,$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n } \r\n } \r\n $HTML_image .= '</a>';\r\n }\r\n\t\t\t\t\t\t\tif ($shelfData['shelf_showdescription']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t{\r\n $HTML_desc = stripslash_normal($row_prod['product_shortdesc']);\r\n\t\t\t\t\t\t\t}\r\n $price_class_arr['class_type'] = 'div';\r\n $price_class_arr['normal_class'] = 'normal_shlfB_pdt_priceA';\r\n $price_class_arr['strike_class'] = 'normal_shlfB_pdt_priceB';\r\n $price_class_arr['yousave_class'] = 'normal_shlfB_pdt_priceC';\r\n $price_class_arr['discount_class'] = 'normal_shlfB_pdt_priceC';\r\n $price_arr = show_Price($row_prod,array(),'compshelf',false,3);\r\n if($price_arr['discounted_price'])\r\n $HTML_price = $price_arr['discounted_price'];\r\n else\r\n $HTML_price = $price_arr['base_price'];\r\n \r\n //$HTML_price = show_Price($row_prod,$price_class_arr,'shelfcenter_3');\r\n if($cur_col==0)\r\n {\r\n echo '<div class=\"shlf_d_pdt_otr_row\">';\r\n }\t\r\n ?>\r\n <div class=\"shlf_d_pdt_otr\"> \r\n <?=$HTML_title;?>\r\n <div class=\"shlf_d_pdt_img\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n <div class=\"shlf_d_pdt_imga\"> \r\n \t<?=$HTML_image?>\r\n \t</div>\r\n \t\t\t\t\t\t\t<div class=\"shlf_d_pdt_morea\"> \r\n <a href=\"<?php url_product($row_prod['product_id'],$row_prod['product_name'])?>\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\">\r\n <img height=\"110\" width=\"13\" src=\"<?php echo url_site_image('more-v.gif',1); ?>\">\r\n </a>\r\n </div> \r\n \r\n </div>\r\n <div class=\"shlf_d_pdt_buy\">\r\n <div class=\"shlf_d_pdt_buy_ba\"> \r\n <div class=\"shlf_d_pdt_price\"> \r\n <?\r\n if ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_price;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?></div>\r\n <div class=\"shlf_d_pdt_buy_in\"><a href=\"<?php url_product($row_prod['product_id'],$row_prod['product_name'])?>\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\"><?php echo stripslash_normal($Captions_arr['COMMON']['COMMON_BUY_NOW'])?></a></div>\r\n </div>\r\n </div>\r\n </div>\r\n <?\r\n $cur_col++;\r\n if($cur_col>=$max_col)\r\n {\r\n $cur_col =0;\r\n echo \"</div>\";\r\n }\r\n }\r\n if($cur_col<$max_col)\r\n {\r\n if($cur_col!=0)\r\n { \r\n echo \"</div>\";\r\n } \r\n }\r\n ?>\r\n \r\n \r\n <div class=\"shlf_thumb_outer_more1\"><a href=\"<?php echo url_shelf_all($shelfData['shelf_id'],$shelfData['shelf_name'],1); ?>\"><?php echo $Captions_arr['COMMON']['SHOW_ALL']; ?></a></div> \r\n </div> \r\n\t\t\t\t\t\t\t\t\t\t \r\n </div>\r\n \r\n <?php\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t default:\r\n\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_displaytype']=='scroll')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$width_one_set \t= 305;\r\n\t\t\t\t\t\t\t\t\t\t$min_number_req\t= 3;\r\n\t\t\t\t\t\t\t\t\t\t$min_width_req \t= $width_one_set * $min_number_req;\r\n\t\t\t\t\t\t\t\t\t\t$total_cnt\t\t= $db->num_rows($ret_prod);\r\n\t\t\t\t\t\t\t\t\t\t$calc_width\t\t= $total_cnt * $width_one_set;\r\n\t\t\t\t\t\t\t\t\t\tif($calc_width < $min_width_req)\r\n\t\t\t\t\t\t\t\t\t\t\t$div_width = $min_width_req;\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t$div_width = $calc_width; \r\n\t\t\t\t\t\t\t\t\t\t\t$divid = uniqid('shelf');\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<div class=\"marquee\" id=\"mycrawler2\">\r\n\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t\t\t\t\t\t\t <tr>\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t <?php\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t<td><div class=\"list_scroll\" >\r\n\t\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$prodcur_arr[] = $row_prod;\r\n\t\t\t\t\t\t\t\t\t\t$HTML_title = $HTML_image = $HTML_desc = '';\r\n\t\t\t\t\t\t\t\t\t\t$HTML_sale = $HTML_new = $HTML_compare = $HTML_rating = '';\r\n\t\t\t\t\t\t\t\t\t\t$HTML_price = $HTML_bulk= $HTML_bonus = $HTML_compare = $HTML_freedel= $HTML_bonus_bar = '';\r\n\t\t\t\t\t\t\t\t\t\tif($shelfData['shelf_showtitle']==1)// whether title is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_title = '<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">'.stripslash_normal($row_prod['product_name']).'</a>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showimage']==1)// Check whether description is to be displayed\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_image ='<a href=\"'.url_product($row_prod['product_id'],$row_prod['product_name'],1).'\" title=\"'.stripslash_normal($row_prod['product_name']).'\">';\r\n\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\r\n\t\t\t\t\t\t\t\t\t\t\t$pass_type ='image_thumbcategorypath';\r\n\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',$row_prod['product_id'],$pass_type,0,0,1);\r\n\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= show_image(url_root_image($img_arr[0][$pass_type],1),$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t// calling the function to get the default image\r\n\t\t\t\t\t\t\t\t\t\t\t\t$no_img = get_noimage('prod',$pass_type); \r\n\t\t\t\t\t\t\t\t\t\t\t\tif ($no_img)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= show_image($no_img,$row_prod['product_name'],$row_prod['product_name'],'','',1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t$HTML_image .= '</a>';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['class_type'] = 'div';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['normal_class'] = 'normal_shlfB_pdt_priceA';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['strike_class'] = 'normal_shlfB_pdt_priceB';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['yousave_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_class_arr['discount_class'] = 'normal_shlfB_pdt_priceC';\r\n\t\t\t\t\t\t\t\t\t\t\t$price_arr = show_Price($row_prod,$price_class_arr,'shelfcenter_3',false,3);\r\n\t\t\t\t\t\t\t\t\t\t\tif($price_arr['discounted_price'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['discounted_price'];\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t$HTML_price = $price_arr['base_price'];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_name\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?=$HTML_title;?>\r\n\t\t\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_img\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $HTML_image;?>\r\n\t\t\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"list_scroll_price\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?\r\n\t\t\t\t\t\t\t\t\t\t\tif ($shelfData['shelf_showprice']==1)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\techo $HTML_price;\r\n\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"list_scroll_buy_otr\" > \r\n\t\t\t\t\t\t\t\t\t\t <div class=\"list_scroll_buy_l\" >\r\n\t\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t\t$link \t\t= url_product($row_prod['product_id'],$row_prod['product_name'],1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $link?>\" title=\"<?php echo $row_prod['product_name']?>\" class=\"\">Buy</a>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"list_scroll_buy_r\" ><a href=\"<?php echo $link?>\" title=\"<?php echo $row_prod['product_name']?>\" class=\"\">More Info</a></div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t</div></td>\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t?>\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t\tmarqueeInit({\r\n\t\t\t\t\t\t\t\t\t\tuniqueid: 'mycrawler2',\r\n\t\t\t\t\t\t\t\t\t\tstyle: {\r\n\t\t\t\t\t\t\t\t\t\t\t'padding': '0',\r\n\t\t\t\t\t\t\t\t\t\t\t'width': '930px',\r\n\t\t\t\t\t\t\t\t\t\t\t'height': '265px',\r\n\t\t\t\t\t\t\t\t\t\t\t'margin' : '0',\r\n\t\t\t\t\t\t\t\t\t\t\t'float' :\"left\"\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tinc:5, //speed - pixel increment for each iteration of this marquee's movement\r\n\t\t\t\t\t\t\t\t\t\tmouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)\r\n\t\t\t\t\t\t\t\t\t\tmoveatleast: 2,\r\n\t\t\t\t\t\t\t\t\t\tneutral: 150,\r\n\t\t\t\t\t\t\t\t\t\tsavedirection: true,\r\n\t\t\t\t\t\t\t\t\t\trandom: true\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t break;\t\t\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t}\r\n\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\tremovefrom_Display_Settings($shelfData['shelf_id'],'mod_shelf');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}",
"public function getDisplay();",
"function display1()\r\n\t{\r\n\t\techo \"<div id=\\\"page-wrapper\\\"> <div class=\\\"compare\\\">\";\r\n\t}",
"public function display(){\n\t\t$item_name = $this->pdh->get('item', 'name', array($this->url_id));\n\n\t\tif ( empty($item_name) ){\n\t\t\tmessage_die($this->user->lang('error_invalid_item_provided'));\n\t\t}\n\n\t\t#search for the gameid\n\t\t$game_id = $this->pdh->get('item', 'game_itemid', array($this->url_id));\n\n\t\t//Sort\n\t\t$sort\t\t\t= $this->in->get('sort');\n\n\t\t$item_ids = array();\n\t\tif ($game_id > 1){\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_ingameid', array($game_id));\n\t\t}else{\n\t\t\t$item_ids = $this->pdh->get('item', 'ids_by_name', array($item_name));\n\t\t}\n\t\t$counter = sizeof($item_ids);\n\n\t\t//default now col\n\t\t$colspan = ($this->config->get('infotooltip_use')) ? 1 : 0 ;\n\n\t\t#Itemhistory Diagram\n\t\tif ($this->config->get('pk_itemhistory_dia')){\n\t\t\t$colspan++;\n\t\t}\n\n\t\t//Comments\n\t\t$comm_settings = array('attach_id'=>md5(stripslashes($item_name)), 'page'=>'items');\n\t\t$this->comments->SetVars($comm_settings);\n\t\t$COMMENT = ($this->config->get('pk_enable_comments') == 1) ? $this->comments->Show() : '';\n\n\t\t//init infotooltip\n\t\tinfotooltip_js();\n\n\t\t$hptt_page_settings\t\t= $this->pdh->get_page_settings('viewitem', 'hptt_viewitem_buyerslist');\n\t\t$hptt\t\t\t\t\t= $this->get_hptt($hptt_page_settings, $item_ids, $item_ids, array('%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => ''), $this->url_id);\n\n\t\t//linechart data\n\t\tif($this->config->get('pk_itemhistory_dia')) {\n\t\t\t$a_items = array();\n\t\t\tforeach($item_ids as $item_id) {\n\t\t\t\t$a_items[] = array('name' => $this->time->date(\"Y-m-d H:i:s\", $this->pdh->get('item', 'date', array($item_id))), 'value' => $this->pdh->get('item', 'value', array($item_id)));\n\t\t\t}\n\t\t}\n\t\t$this->tpl->assign_vars(array(\n\t\t\t'ITEM_STATS'\t\t\t\t=> $this->pdh->get('item', 'itt_itemname', array($this->url_id, 0, 1)),\n\t\t\t'ITEM_CHART'\t\t\t\t=> ($this->config->get('pk_itemhistory_dia') && count($a_items) > 1) ? $this->jquery->LineChart('item_chart', $a_items, '', 200, 500, '', false, true, 'date') : '',\n\t\t\t'ITEM_MODEL'\t\t\t\t=> (isset($model3d)) ? $model3d : false,\n\t\t\t'COMMENT'\t\t\t\t\t=> $COMMENT,\n\n\t\t\t'SHOW_ITEMSTATS'\t\t\t=> ($this->config->get('infotooltip_use')) ? true : false,\n\t\t\t'SHOW_ITEMHISTORYA'\t\t\t=> ($this->config->get('pk_itemhistory_dia') == 1 ) ? true : false,\n\t\t\t'SHOW_COLSPAN'\t\t\t\t=> $colspan,\n\t\t\t'BUYERS_TABLE'\t\t\t\t=> $hptt->get_html_table($sort, '&i='.$this->url_id, 0, 100, sprintf($this->user->lang('viewitem_footcount'), $counter)),\n\t\t\t'L_PURCHASE_HISTORY_FOR'\t=> sprintf($this->user->lang('purchase_history_for'), stripslashes($item_name)),\n\t\t));\n\n\t\t$this->core->set_vars(array(\n\t\t\t'page_title'\t\t=> sprintf($this->user->lang('viewitem_title'), stripslashes($item_name)),\n\t\t\t'template_file'\t\t=> 'viewitem.html',\n\t\t\t'display'\t\t\t=> true)\n\t\t);\n\t}",
"function screen_layout($screen)\n {\n }",
"function Show_Products($title,$compare_products_arr)\n\t\t{\n\t\t\n\t\t\tglobal $ecom_siteid,$db,$ecom_hostname,$Settings_arr,$ecom_themeid,$default_layout,$Captions_arr,$inlineSiteComponents;\n\t\t\t\n\t\t\t// ** Fetch any captions for product details page\n\t\t\t$Captions_arr['PROD_DETAILS'] \t= getCaptions('PROD_DETAILS');\n\t\t\t\n\t\t\t$num_products = count($_SESSION['compare_products']);\n\t\t\tif ($num_products && isProductCompareEnabled())\n\t\t\t{\n\t\t\t\t$showqty\t\t= $Settings_arr['show_qty_box'];// show the qty box\n\t\t\t\t$compare_product_ids\t=implode(\",\",$_SESSION['compare_products']);\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Get the list of products to be shown in compare products\n\t\t\t\t\t\t$sql_prod = \"SELECT product_id,product_name,product_variablestock_allowed,product_show_cartlink,\n\t\t\t\t\t\t\t\t\t\tproduct_preorder_allowed,product_show_enquirelink,product_webstock,product_webprice,\n\t\t\t\t\t\t\t\t\t\tproduct_discount,product_discount_enteredasval,product_bulkdiscount_allowed,\n\t\t\t\t\t\t\t\t\t\tproduct_total_preorder_allowed,product_applytax,product_shortdesc,product_averagerating,\n\t\t\t\t\t\t\t\t\t\tmanufacture_id,product_model,product_bonuspoints \n\t\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\t\tproducts \n\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t product_id IN (\".$compare_product_ids.\")\";\n\t\t\t\t\t\t$ret_prod = $db->query($sql_prod);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_label_cnt = \"SELECT id as cnt_labels \n\t\t\t\t\t\t\t\t\t FROM\n\t\t\t\t\t\t\t\t\t \t\tproduct_labels \n\t\t\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t\t \t\tproducts_product_id IN (\".$compare_product_ids.\")\";\n\t\t\t\t\t\t$ret_label_cnt = $db->query($sql_label_cnt);\n\t\t\t\t\t\t$label_cnt = $db->num_rows($ret_label_cnt);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_var_cnt = \"SELECT var_id as cnt_vars \n\t\t\t\t\t\t\t\t\t FROM\n\t\t\t\t\t\t\t\t\t \t\tproduct_variables\n\t\t\t\t\t\t\t\t\t WHERE \n\t\t\t\t\t\t\t\t\t \t\tproducts_product_id IN (\".$compare_product_ids.\")\";\n\t\t\t\t\t\t$ret_var_cnt = $db->query($sql_var_cnt);\n\t\t\t\t\t\t$var_cnt = $db->num_rows($ret_var_cnt);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($db->num_rows($ret_prod))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t?>\n\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"productcomparisontable\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif($cur_title)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"<?=$num_products ?>\" class=\"shelfAheader\" align=\"left\"><?php echo $cur_title?></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$max_col = $Settings_arr['no_of_products_to_compare'];\n\t\t\t\t\t\t\t$cur_col = 0;\n\t\t\t\t\t\t\t$compare_width = 100/$num_products ;\n\t\t\t\t\t\t\t$prodcur_arr = array();\n\t\t\t\t\t\t\t$prod_name_arr = array();\n\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\t$rowvar = 0;\n\t\t\t\t\t\t\t$manuvar =0;\n\t\t\t\t\t\t\t$modvar =0;\n\t\t\t\t\t\t\t$bonusvar =0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($row_prod = $db->fetch_array($ret_prod))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$prodcur_arr[] = $row_prod;\n\t\t\t\t\t\t\t\t//print_r($prodcur_arr);\n\t\t\t\t\t\t\t\t//##############################################################\n\t\t\t\t\t\t\t\t// Showing the title, description and image part for the product\n\t\t\t\t\t\t\t\t//##############################################################\n\t\t\t\t\t\t\t\t$prod_name_arr[] = $row_prod['product_name'];\n\t\t\t\t\t\t\t\t$prod_id_arr[] \t= $row_prod['product_id'];\n\t\t\t\t\t\t\t\t//$prod_id_arr[]['product_id'] \t= $row_prod['product_id'];\n\t\t\t\t\t\t\t\t$prod_variablestock_arr[] \t\t\t= $row_prod['product_variablestock_allowed'];\n\t\t\t\t\t\t\t\t$prod_shortdesc_arr[]\t\t \t\t= $row_prod['product_shortdesc'];\n\t\t\t\t\t\t\t\t$prod_webstock_arr[] \t\t\t\t= $row_prod['product_webstock'];\n\t\t\t\t\t\t\t\t$prod_webprice_arr[] \t\t\t\t= $row_prod['product_webprice'];\n\t\t\t\t\t\t\t\t$prod_discount_arr[] \t\t\t\t= $row_prod['product_discount'];\n\t\t\t\t\t\t\t\t$prod_discount_enteredasval_arr[]\t= $row_prod['product_discount_enteredasval'];\n\t\t\t\t\t\t\t\t$prod_bulkdiscount_allowed_arr[] \t= $row_prod['product_bulkdiscount_allowed'];\n\t\t\t\t\t\t\t\t$prod_total_preorder_allowed_arr[] \t= $row_prod['product_total_preorder_allowed'];\n\t\t\t\t\t\t\t\t$prod_applytax_arr[] \t\t\t\t= $row_prod['product_applytax'];\n\t\t\t\t\t\t\t\t$prod_variablestock_allowed_arr[] \t= $row_prod['product_variablestock_allowed'];\n\t\t\t\t\t\t\t\t$prod_show_cartlink_arr[] \t\t\t= $row_prod['product_show_cartlink'];\n\t\t\t\t\t\t\t\t$prod_preorder_allowed_arr[] \t\t= $row_prod['product_preorder_allowed'];\n\t\t\t\t\t\t\t\t$prod_show_enquirelink_arr[] \t\t= $row_prod['product_show_enquirelink'];\n\t\t\t\t\t\t\t\t$prod_rating[] \t\t\t\t\t\t= $row_prod['product_averagerating'];\t\n\t\t\t\t\t\t\t\t$prod_manufact[] \t\t\t\t\t= $row_prod['manufacture_id'];\t\n\t\t\t\t\t\t\t\t$prod_model[] \t\t\t\t\t\t= $row_prod['product_model'];\t\t\n\t\t\t\t\t\t\t\t$product_bonuspoints[] \t\t\t\t= $row_prod['product_bonuspoints'];\t\t\n\t\t\t\t\t\t\t\t\tif($row_prod['product_bulkdiscount_allowed']=='Y') {\n\t\t\t\t\t\t\t\t\t \t$rowvar = 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(trim($row_prod['manufacture_id'])) {\n\t\t\t\t\t\t\t\t\t \t$manuvar = 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(trim($row_prod['product_model'])) {\n\t\t\t\t\t\t\t\t\t \t$modvar = 1;\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\tif(trim($row_prod['product_bonuspoints'])) {\n\t\t\t\t\t\t\t\t\t \t$bonusvar = 1;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t?> \n\t\t\t\t\t\t<tr >\n\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){\n\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t<td class=\"productcom_name\" align=\"left\" valign=\"middle\" style=\"width:<?=$compare_width?>%;\">\n\t\t\t\t\t\t\t\t\t<a class=\"productcom_name_link\" href=\"<?php url_product($prod_id_arr[$i],\"'\".$prod_name_arr[$i].\"'\",-1)?>\" title=\"<?php echo stripslashes($prod_name_arr[$i])?>\"><?php echo stripslashes($prod_name_arr[$i])?></a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<tr >\n\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){\n\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t<td class=\"productcom_rating\" align=\"right\" valign=\"middle\" style=\"width:<?=$compare_width?>%;\">\n\t\t\t\t\t\t\t\t<?PHP\n\t\t\t\t\t\t\t\t\t// Check whether the product review module is active for the site\n\t\t\t\t\t\t\t\t\t$module_name = 'mod_product_reviews';\n\t\t\t\t\t\t\t\t\tif(in_array($module_name,$inlineSiteComponents))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\techo $Captions_arr['PROD_DETAILS']['PRODDET_REVIEW_CAPTION'];\n\t\t\t\t\t\t\t\t\t\t\tfor ($x=0;$x<$prod_rating[$i];$x++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.url_site_image('reviewstar_on.gif',1).'\" border=\"0\" alt=\"revscoreimg\" /> '; \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tfor ($x=$prod_rating[$i];$x<10;$x++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.url_site_image('reviewstar_off.gif',1).'\" border=\"0\" alt=\"revscoreimg\"/> '; \n\t\t\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</td>\n\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t<td class=\"productcom_image\" align=\"center\">\n\t\t\t\t\t\t\t\t<a href=\"<?php url_product($prod_id_arr[$i],\"'\".$prod_name_arr[$i].\"'\",-1)?>\" title=\"<?php echo stripslashes($prod_name_arr[$i])?>\">\n\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t//\techo $prod_id_arr[$i];\n\t\t\t\t\t\t\t\t// Calling the function to get the type of image to shown for current \n\t\t\t\t\t\t\t\t\t$pass_type = get_default_imagetype('midshelf');\n\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\n\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('prod',\"'\".$prod_id_arr[$i].\"'\",$pass_type,0,0,1);\n\t\t\t\t\t\t\t\t\tif(count($img_arr))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tshow_image(url_root_image($img_arr[0][$pass_type],1),\"'\".$prod_name_arr[$i].\"'\",\"'\".$prod_name_arr[$i].\"'\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// calling the function to get the default image\n\t\t\t\t\t\t\t\t\t\t$no_img = get_noimage('prod',$pass_type); \n\t\t\t\t\t\t\t\t\t\tif ($no_img)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tshow_image($no_img,\"'\".$prod_name_arr[$i].\"'\",\"'\".$prod_name_arr[$i].\"'\");\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t?></a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<? }?>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<?PHP \n\t\t\t\t\t\t\t\tif ($Settings_arr['product_show_instock'])\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<tr>\n\t\t\t\t\t\t\t\t<? \n\t\t\t\t\t\t\t\tfor($i=0;$i<$num_products;$i++)\n\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $compare=1;\n\t\t\t\t\t\t\t\t\t\techo '<td class=\"productcom_avaiable\" valign=\"top\"> ';\n\t\t\t\t\t\t\t\t\t\t echo \" <span class='stockdetailstd'>\".get_stockdetails($prod_id_arr[$i],$compare).\"</span>\";\n\t\t\t\t\t\t\t\t\t\techo '</td>';\n\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?>\t</tr>\n\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<tr>\n\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ \n\t\t\t\t\t\t\t\t\t\techo '<td class=\"productcom_price_td\" valign=\"top\">';\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_id']\t\t\t\t\t\t\t= $prod_id_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_variablestock_allowed']\t\t= $prod_variablestock_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_webstock']\t\t\t\t\t\t= $prod_webstock_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_webprice']\t\t\t\t\t\t= $prod_webprice_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_discount']\t\t\t\t\t\t= $prod_discount_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_discount_enteredasval']\t\t= $prod_discount_enteredasval_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_bulkdiscount_allowed']\t\t\t= $prod_bulkdiscount_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_total_preorder_allowed']\t\t= $prod_total_preorder_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$prod_price_arr['product_applytax']\t\t\t\t\t\t= $prod_applytax_arr[$i];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$price_class_arr['ul_class'] \t\t= 'productcom_price';\n\t\t\t\t\t\t\t\t\t\t$price_class_arr['normal_class'] \t= 'productcom_normalprice';\n\t\t\t\t\t\t\t\t\t\t$price_class_arr['strike_class'] \t= 'productcom_strikeprice';\n\t\t\t\t\t\t\t\t\t\t$price_class_arr['yousave_class'] \t= 'productcom_yousaveprice';\n\t\t\t\t\t\t\t\t\t\t$price_class_arr['discount_class'] \t= 'shelfAdiscountprice';\n\t\t\t\t\t\t\t\t\t\techo show_Price($prod_price_arr,$price_class_arr,'shelfcenter_3');\n\t\t\t\t\t\t\t\t\t\techo '</td>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t?>\t</tr> \n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t\t <td class=\"productcom_details\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t <?\n\t\t\t\t\t\t\t\t\techo stripslashes($prod_shortdesc_arr[$i])?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<? if ($label_cnt)\n\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t\t<td class=\"productcom_label\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t\t$this->display_labels($prod_id_arr[$i]);\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t\t <td class=\"productcom_details\" valign=\"top\">\n\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\tif($manuvar==1) { \n\t\t\t\t\t\t\t\t\t(trim($prod_manufact[$i]))?$manufactId = stripslashes($prod_manufact[$i]):$manufactId = \"NA\";\t\n\t\t\t\t\t\t\t\t\techo \"<strong>Manufacture Id : </strong>\".$manufactId; }\n\t\t\t\t\t\t\t\tif($modvar==1) {\t\n\t\t\t\t\t\t\t\t\t(trim($prod_model[$i]))?$prod_model = stripslashes($prod_manufact[$i]):$prod_model = \"NA\";\n\t\t\t\t\t\t\t\t\techo \"<br/><strong>Model Number :</strong>\".$prod_model; }\n\t\t\t\t\t\t\t\tif($bonusvar==1) {\t\n\t\t\t\t\t\t\t\t\t(trim($product_bonuspoints[$i]))?$product_bonuspoints = stripslashes($product_bonuspoints[$i]):$product_bonuspoints = \"NA\";\n\t\t\t\t\t\t\t\t\techo \"<br/><strong>Bonus Points :</strong>\".$product_bonuspoints; }\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<? \n\t\t\t\t\t\t\t\t\t$var_class = 'productcom_varialbe';\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$var_class = 'productcom_label';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ($var_cnt)\n\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t\t<td class=\"<?=$var_class?>\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t\t$this->show_ProductVariables($prod_id_arr[$i]);\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<?PHP if($rowvar==1) { ?>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){ ?>\n\t\t\t\t\t\t\t\t\t <td class=\"productcom_details\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t <? \n\t\t\t\t\t\t\t\t\t\t\t$this->show_BulkDiscounts($prod_id_arr[$i]);\n\t\t\t\t\t\t\t\t\t?> \n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<? \n\t\t\t\t\t\t\t\t\t$info_class = 'productcom_label';\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t $info_class = 'productcom_varialbe';\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<? for($i=0;$i<$num_products;$i++){\n\t\t\t\t\t\t\t\t\t$frm_name = uniqid('compare_');\n\t\t\t\t\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<td class=\"<?=$info_class?>\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t<form method=\"post\" action=\"<?php url_link('manage_products.html')?>\" name='<?php echo $frm_name?>' id=\"<?php echo $frm_name?>\" class=\"frm_cls\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"fpurpose\" value=\"\" />\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"fproduct_id\" value=\"\" />\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"pass_url\" value=\"<?php echo $_SERVER['REQUEST_URI']?>\" /><div style=\"width:45%;float:left;\">\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_id']\t\t\t\t\t = $prod_id_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_name']\t\t\t\t\t = $prod_name_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_total_preorder_allowed'] = $prod_total_preorder_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_applytax']\t\t\t\t = $prod_applytax_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_variablestock_allowed']\t = $prod_variablestock_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_show_cartlink']\t\t\t = $prod_show_cartlink_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_preorder_allowed']\t\t = $prod_preorder_allowed_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_show_enquirelink']\t\t = $prod_show_enquirelink_arr[$i];\n\t\t\t\t\t\t\t\t\t$prod_info_arr['product_webstock']\t\t = $prod_webstock_arr[$i];\n\t\t\t\t\t\t\t\t\t\t$class_arr \t\t\t\t\t= array();\n\t\t\t\t\t\t\t\t\t\t$class_arr['ADD_TO_CART']\t= 'quantity_infolink';\n\t\t\t\t\t\t\t\t\t\t$class_arr['PREORDER']\t\t= 'quantity_infolink';\n\t\t\t\t\t\t\t\t\t\t$class_arr['ENQUIRE']\t\t= 'quantity_infolink';\n\t\t\t\t\t\t\t\t\t\tshow_moreinfo($prod_info_arr,'quantity_infolink');\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</div><div style=\"width:45%;float:left;\">\n\t\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t//\tprint_r($prod_info_arr);\n\t\t\t\t\t\t\t\t\t\tshow_addtocart($prod_info_arr,$class_arr,$frm_name);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t?></div></form>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t<?php \t\t\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t}",
"protected function _screen() {}",
"function displayExchangeReg($exchange, $num = null, $showExchTime = false){\r\n\t\t$colorCode1 = COLOR_CODE_1;\r\n\t\t$colorCode2 = COLOR_CODE_2;\r\n\t\t\r\n\t\t$t1 = $exchange[1][1];\r\n\t\tif($t1 == null){$t1 = \" \";}\r\n\t\t$t2 = $exchange[1][2];\r\n\t\tif($t2 == null){$t2 = \" \";}\r\n\t\t$b1 = $exchange[2][1];\r\n\t\tif($b1 == null){$b1 = \" \";}\r\n\t\t$b2 = $exchange[2][2];\r\n\t\tif($b2 == null){$b2 = \" \";}\r\n\r\n\t\tif($showExchTime && $exchange['time'] == ''){\r\n\t\t\t$exchange['time'] = \"0:00\";\r\n\t\t}\t\r\n\t\t\r\n\t\t$class = '';\r\n\t\t$odd = '';\r\n\t\tif($num % 2 != 1){ \r\n\t\t\t$class= 'old-exch-odd'; \r\n\t\t} else {\r\n\t\t\t$odd= \"opacity:0.92;\";\r\n\t\t}\r\n\t\t\r\n\t\t?>\t\r\n\t\t\r\n\t\t<div class='shrink text-center' style='width: 40px'>\r\n\t\t\t<?php if($showExchTime): ?>\r\n\t\t\t\t<div class='cell <?=$class?>'>\r\n\t\t\t\t\t<?=$exchange['time']?>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif ?>\r\n\t\t\t<div class='cell f1-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$t1?><BR><?=$t2?>\r\n\t\t\t</div>\r\n\t\t\t<div class='cell f2-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$b1?><BR><?=$b2?>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<?php\r\n\t}",
"public function show(SmsSwitch $smsSwitch)\n {\n //\n }",
"public function showThumbnails() {\n $this->generateHead();\n $thumbnailsArray = $this->getThumbnailsArray();\n for($i = 0; $i < $this->rowsCount * 2; $i ++){\n echo '<div class=\"col-xs-6\">';\n echo '<a href=\"big_img.php?img_id=' . $thumbnailsArray[$i]['id'] . '\" class=\"thumbnail\">';\n echo '<img src=\"images/thumbnails/' . $thumbnailsArray[$i]['filename'] . '\" alt=\"\">';\n echo '</a>';\n echo '</div>';\n }\n $this->generateFoot();\n }",
"private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}",
"public function view(){\n\t\t\t$this->__switchboard();\n\t\t}",
"function poco_upsell_display() {\n $columns = apply_filters('poco_upsells_columns', 4);\n if (is_active_sidebar('sidebar-woocommerce-detail')) {\n $columns = 3;\n }\n woocommerce_upsell_display(-1, $columns);\n }",
"public function show_full_page()\n\t{\n\t\tglobal $__server;\n\t\t\n\t\t// hent familierangering\n\t\t$ff_list = ff::get_fam_points_rank();\n\t\t\n\t\t// deaktiver høyre side\n\t\t//define(\"DISABLE_RIGHT_COL\", true);\n\t\t\n\t\tess::$b->page->add_css('\n#default_main { overflow: visible }');\n\t\t\n\t\tess::$b->page->add_js_domready('\n\tsm_scripts.load_hm();\n\twindow.HM.addEvent(\"f-changed\", function(data) {\n\t\t//$$(\".bydeler_filter a\").removeClass(\"active\");\n\t\t$$(\".bydeler_ressurs\").setStyle(\"display\", \"none\");\n\t\t$$(\".bydeler_ressurs_\"+data).setStyle(\"display\", \"block\");\n\t\t//$(\"f_\"+data).addClass(\"active\");\n\t});\n\twindow.HM.addEvent(\"f-removed\", function() {\n\t\t//$$(\".bydeler_filter a\").removeClass(\"active\");\n\t\t//$(\"f_\").addClass(\"active\");\n\t\t$$(\".bydeler_ressurs\").setStyle(\"display\", \"block\");\n\t});\n\twindow.HM.addEvent(\"b-added\", function() {\n\t\t//$$(\".bydeler_alt a\").removeClass(\"active\");\n\t\t//$(\"v_b\").addClass(\"active\");\n\t\t$$(\".bydeler_br\").setStyle(\"display\", \"none\");\n\t\t$$(\".bydeler_steder\").setStyle(\"display\", \"block\");\n\t});\n\twindow.HM.addEvent(\"b-removed\", function() {\n\t\t//$$(\".bydeler_alt a\").removeClass(\"active\");\n\t\t//$(\"v_\").addClass(\"active\");\n\t\t$$(\".bydeler_br\").setStyle(\"display\", \"block\");\n\t\t$$(\".bydeler_steder\").setStyle(\"display\", \"none\");\n\t});\n\t\n\t$$(\".bydeler_steder\").setStyle(\"display\", \"none\");\n\t$$(\".bydeler_alt a\").addEvent(\"click\", function(e)\n\t{\n\t\twindow.HM.remove(\"f\");\n\t\twindow.HM.set(\"b\", \"\");\n\t\te.stop();\n\t});\n\t\n\t$$(\".bydeler_filter a\").addEvent(\"click\", function(e)\n\t{\n\t\twindow.HM.remove(\"b\");\n\t\tif (this.get(\"id\") == \"f_\") window.HM.remove(\"f\");\n\t\telse window.HM.set(\"f\", this.get(\"id\").substring(2));\n\t\te.stop();\n\t});\n\t\n\twindow.HM.recheck();\n');\n\t\t\n\t\t// sett opp alle FF og sorter dem i y-retning\n\t\t$data = array();\n\t\t$pos_x = array();\n\t\t$pos_y = array();\n\t\tforeach ($this->bydeler as $id => $bydel)\n\t\t{\n\t\t\tif ($id == 0) continue;\n\t\t\t\n\t\t\tforeach ($bydel['ff'] as $row)\n\t\t\t{\n\t\t\t\t$pos_x[] = $row['br_pos_x'];\n\t\t\t\t$pos_y[] = $row['br_pos_y'];\n\t\t\t\t\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\t\n\t\t\t\t// familie\n\t\t\t\tif ($row['ff_type'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen leder av broderskapet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t$class = \"bydeler_ressurs_familie\";\n\t\t\t\t\t\n\t\t\t\t\t// antall poeng\n\t\t\t\t\tif (isset($ff_list[$row['ff_id']]) && $ff_list[$row['ff_id']]->data['ff_is_crew'] == 0) $eier .= '<br />'.game::format_num($ff_list[$row['ff_id']]->data['ff_points_sum']).' poeng';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// firma\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($type['type'] == \"bomberom\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen styrer bomberommet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen eier av firmaet' : 'Eies av '.self::list_players($row['eier']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$class = \"bydeler_ressurs_firma bydeler_ressurs_{$type['type']}firma\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data[] = '\n\t\t<a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\" class=\"bydeler_ressurs '.$class.'\" style=\"left: '.$row['br_pos_x'].'%; top: '.$row['br_pos_y'].'%\">\n\t\t\t<img class=\"bydeler_ressurs_t\" src=\"'.htmlspecialchars($type['bydeler_graphic']).'\" alt=\"'.htmlspecialchars($type['bydeler_alt_pre']).htmlspecialchars($row['ff_name']).'\" />\n\t\t\t<span class=\"bydeler_ressurs_tekst\">\n\t\t\t\t'.htmlspecialchars($row['ff_name']).'<span class=\"bydeler_owner\"><br />\n\t\t\t\t'.$eier.'</span>\n\t\t\t</span>\n\t\t\t<img class=\"bydeler_ressurs_graphic\" src=\"'.htmlspecialchars(ff::get_logo_path_static($row['ff_id'], $row['ff_logo_path'])).'\" alt=\"\" />\n\t\t</a>';\n\t\t\t}\n\t\t}\n\t\tarray_multisort($pos_y, $pos_x, $data);\n\t\t\n\t\t$bydeler_0 = $this->bydeler[0];\n\t\tunset($this->bydeler[0]);\n\t\t\n\t\t// sorter bydelene i y-retning\n\t\t$bydeler_x = array();\n\t\t$bydeler_y = array();\n\t\tforeach ($this->bydeler as $id => $bydel)\n\t\t{\n\t\t\t$bydeler_x[] = $bydel['bydel_x'];\n\t\t\t$bydeler_y[] = $bydel['bydel_y'];\n\t\t}\n\t\tarray_multisort($bydeler_x, $bydeler_y, $this->bydeler);\n\t\t\n\t\t// invitasjoner til FF\n\t\tif (count($this->ff_invites) > 0)\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c small\">\n\t<h1 class=\"bg1\">Invitasjoner<span class=\"left2\"></span><span class=\"right2\"></span></h1>\n\t<div class=\"bg1\">';\n\t\t\t\n\t\t\tforeach ($this->ff_invites as $row)\n\t\t\t{\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\techo '\n\t\t<p>Du er invitert til '.$type['refobj'].' <a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\">'.htmlspecialchars($row['ff_name']).'</a> som '.$type['priority'][$row['ffm_priority']].' ('.ess::$b->date->get($row['ffm_date_join'])->format(date::FORMAT_NOTIME).') - <a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\">Godta/avslå</a></p>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t</div>\n</div>';\n\t\t}\n\n\t\tif (count($this->fff) > 0 || access::has(\"mod\"))\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c medium bydeler_br bydeler_ressurs bydeler_ressurs_familie\">\n\t<h1 class=\"bg1\">Konkurranse om å danne broderskap <span class=\"left2\"></span><span class=\"right2\"></span></h1>\n\t<div class=\"bg1 c\">\n\t\t<table class=\"table center tablem\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t'.(access::has(\"mod\") ? '<th>Admin</th>' : '').'\n\t\t\t\t\t<th>Avsluttes</th>\n\t\t\t\t\t<th>Gjenstår</th>\n\t\t\t\t\t<th>Antall broderskap</th>\n\t\t\t\t\t<th>Gjenstående broderskap</th>\n\t\t\t\t\t<th>Status</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody class=\"r\">';\n\t\t\t\n\t\t\t$i = 0;\n\t\t\t$free = 0;\n\t\t\tforeach ($this->fff as $row)\n\t\t\t{\n\t\t\t\t$time = time();\n\n\t\t\t\tif ($row['ff_count'] < ff::MAX_FFF_FF_COUNT && $time >= $row['fff_time_start']) $free += ff::MAX_FFF_FF_COUNT-$row['ff_count'];\n\n\t\t\t\techo '\n\t\t\t\t<tr'.(++$i % 2 == 0 ? ' class=\"color\"' : '').'>\n\t\t\t\t\t'.(access::has(\"mod\") ? '<td><form action=\"'.$__server['relative_path'].'/ff/\" method=\"post\"><input type=\"hidden\" name=\"fff_id\" value=\"'.$row['fff_id'].'\">'.show_sbutton(\"Deaktiver\", 'name=\"comp_deactivate\"').'</form></td>' : '').'\t\t\t\t\n\t\t\t\t\t<td>'.ess::$b->date->get($row['fff_time_expire'])->format(date::FORMAT_SEC).'</td>\n\t\t\t\t\t<td>'.game::timespan(max(time(), $row['fff_time_expire']), game::TIME_ABS).'</td>\n\t\t\t\t\t<td>'.$row['ff_count'].'</td>\n\t\t\t\t\t<td>'.$row['ff_count_active'].'</td>\n\t\t\t\t\t'.($time >= $row['fff_time_start'] ?\n\t\t\t\t\t\t'<td><a href=\"'.$__server['relative_path'].'/ff/?fff_id='.$row['fff_id'].'\">Vis »</a></td>' :\n\t\t\t\t\t\t'<td>Starter om '.game::timespan(max(time(), $row['fff_time_start']), game::TIME_ABS).'</td>').'\n\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t\n\t\t\t$create_link = login::$logged_in\n\t\t\t\t? ($this->up->rank['number'] < ff::$types[1]['priority_rank'][1]\n\t\t\t\t\t? ' - Du har ikke høy nok rank til å opprette et broderskap'\n\t\t\t\t\t: ' - Du har høy nok rank - <a href=\"'.$__server['relative_path'].'/ff/?create\">Opprett broderskap »</a>')\n\t\t\t\t: '';\n\n\t\t\techo '\n\t\t\t</tbody>\n\t\t</table>'.($free > 0 ? '\n\t\t<p class=\"c\" style=\"margin-top: 0\">Det er '.$free.' '.fword(\"ledig konkurranseplass\", \"ledige konkurranseplasser\", $free).$create_link.'</p>' : '\n\t\t<p class=\"c\" style=\"margin-top: 0\">Ingen ledige konkurranseplasser.</p>').'\n\t\t'.(access::has(\"mod\") ? '<p style=\"margin-top: 20px;\"><form action=\"'.$__server['relative_path'].'/ff/\" method=\"post\">'.show_sbutton(\"Opprett ny broderskapskonkurranse\", 'name=\"new_comp\"').'</form></p>' : '').'\n\t</div>\n</div>';\n\t\t}\n\t\t\n\t\t// topp rangerte familier\n\t\tif (count($ff_list) > 0)\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c xxsmall bydeler_br bydeler_ressurs bydeler_ressurs_familie\">\n\t<h1 class=\"bg1\">Topp rangerte broderskap<span class=\"left\"></span><span class=\"right\"></span></h1>\n\t<div class=\"bg1\">\n\t\t<dl class=\"dd_right\">';\n\t\t\t\n\t\t\t$i = 0;\n\t\t\tforeach ($ff_list as $ff)\n\t\t\t{\n\t\t\t\t$title = \"For rank til medlemmer: \".$ff->data['ff_points_up'].\" - For firma til medlemmer: \".$ff->data['ff_points_ff'].\" - For drap: \".$ff->data['ff_points_kill'];\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t<dt><a href=\"'.ess::$s['rpath'].'/ff/?ff_id='.$ff->id.'\">'.htmlspecialchars($ff->data['ff_name']).'</a></dt>\n\t\t\t<dd title=\"'.$title.'\">'.game::format_num($ff->data['ff_points_sum']).' poeng</dd>';\n\t\t\t\t\n\t\t\t\t// vis kun 3 beste familiene\n\t\t\t\tif (++$i == 3) break;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t</dl>\n\t\t<p class=\"c\"><a href=\"'.ess::$s['rpath'].'/node/19\">Poenginformasjon</a></p>\n\t</div>\n</div>';\n\t\t}\n\t\t\n\t\tkf_menu::$data['bydeler_menu'] = true;\n\t\t\n\t\techo '\n<h1 class=\"bydeler\">Bydeler</h1>\n<div class=\"bydeler\">\n\t<div class=\"bydeler_kart bydeler_br\">\n\t\t<img src=\"'.STATIC_LINK.'/themes/kofradia/drammen_stor.gif\" class=\"bydeler_bg\" />\n\t\t'.implode('', $data).'\n\t</div>';\n\t\t\n\t\t// har vi noen FF som ikke er plassert?\n\t\tif ($bydeler_0['active'])\n\t\t{\n\t\t\techo '\n\t<div class=\"bydeler_uplassert bydeler_br\">';\n\t\t\t\n\t\t\tforeach ($bydeler_0['ff'] as $row)\n\t\t\t{\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\t\n\t\t\t\t// familie\n\t\t\t\tif ($row['ff_type'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen leder av broderskapet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t$class = \"bydeler_ressurs_familie\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// firma\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($type['type'] == \"bomberom\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen styrer bomberommet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen eier av firmaet' : 'Eies av '.self::list_players($row['eier']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$class = \"bydeler_ressurs_firma bydeler_ressurs_{$type['type']}firma\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '\n\t\t<div class=\"bydeler_uplassert_boks\">\n\t\t\t<a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\" class=\"bydeler_ressurs '.$class.'\">\n\t\t\t\t<img class=\"bydeler_ressurs_graphic\" src=\"'.htmlspecialchars(ff::get_logo_path_static($row['ff_id'], $row['ff_logo_path'])).'\" alt=\"\" />\n\t\t\t\t<span class=\"bydeler_ressurs_tekst\">\n\t\t\t\t\t'.htmlspecialchars($row['ff_name']).'<span class=\"bydeler_owner\"><br />\n\t\t\t\t\t'.$eier.'</span>\n\t\t\t\t</span>\n\t\t\t\t<img class=\"bydeler_ressurs_t\" src=\"'.htmlspecialchars($type['bydeler_graphic']).'\" alt=\"'.htmlspecialchars($type['bydeler_alt_pre']).htmlspecialchars($row['ff_name']).'\" />\n\t\t\t</a>\n\t\t</div>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t<div class=\"bydeler_kart bydeler_steder\">\n\t\t<img src=\"'.STATIC_LINK.'/themes/kofradia/drammen_stor.gif\" class=\"bydeler_bg\" />';\n\t\t\n\t\tforeach ($this->bydeler as $bydel)\n\t\t{\n\t\t\tif ($bydel['active'] == 0) continue;\n\t\t\t\n\t\t\tif ($this->up)\n\t\t\t{\n\t\t\t\t$distance = self::calc_travel_distance($this->up->bydel, $bydel);\n\t\t\t\t\n\t\t\t\t$taxi_price = round($distance * self::TAXI_PRICE_KM);\n\t\t\t\t$taxi_points = round($distance * self::TAXI_POINTS_KM * $this->up->rank['number']);\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t<div class=\"map_unit'.($this->up && $this->up->bydel['id'] == $bydel['id'] ? ' map_active' : '').'\" style=\"left: '.$bydel['bydel_x'].'%; top: '.$bydel['bydel_y'].'%\" id=\"map_link_'.$bydel['id'].'\">\n\t\t\t<div class=\"map_title\">\n\t\t\t\t<p class=\"map_link\"><b><b><b>'.htmlspecialchars($bydel['name']).'</b></b></b></p>\n\t\t\t\t<div class=\"bydeler_sted\">\n\t\t\t\t\t<div class=\"bydeler_sted_info\">\n\t\t\t\t\t\t<dl class=\"dd_right\">\n\t\t\t\t\t\t\t<dt>Spillere</dt>\n\t\t\t\t\t\t\t<dd>'.game::format_number($bydel['num_players']).'</dd>\n\t\t\t\t\t\t\t<dt>Penger i omløp</dt>\n\t\t\t\t\t\t\t<dd>'.game::format_cash($bydel['sum_money']).'</dd>\n\t\t\t\t\t\t</dl>';\n\t\t\t\n\t\t\tif (!$this->up) {} // ignorer anonyme brukere\n\t\t\telseif ($this->up->bydel['id'] == $bydel['id'])\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du befinner deg i denne bydelen.</p>';\n\t\t\t}\n\t\t\telseif ($this->up->fengsel_check())\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du er i fengsel og kan ikke reise.</p>';\n\t\t\t}\n\t\t\telseif ($this->up->bomberom_check())\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du er i bomberom og kan ikke reise.</p>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"bydeler_reise c\">\n\t\t\t\t\t\t\t<form action=\"bydeler\" method=\"post\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"reise\" value=\"'.htmlspecialchars($bydel['name']).'\" />';\n\t\t\t\t\n\t\t\t\t// taxi\n\t\t\t\tif (!$this->up->energy_check(self::TAXI_ENERGY*1.3))\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ikke nok energi til å ta taxi hit.</p>';\n\t\t\t\t}\n\t\t\t\telseif ($this->up->data['up_points'] < $taxi_points * 2) // må ha dobbelte\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ikke høy nok rank til å ta taxi hit.</p>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Ta taxi (\".game::format_cash($taxi_price).\", \".game::format_number(round($taxi_points)).\" poeng)\", 'name=\"taxi\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// gta\n\t\t\t\tif ($this->gta_count == 0)\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ingen biler i bydelen du oppholder deg i for å reise med.</p>';\n\t\t\t\t}\n\t\t\t\telseif (!$this->gta_garage[$bydel['id']]['garage'])\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Det er ingen garasje i denne bydelen.</p>';\n\t\t\t\t}\n\t\t\t\telseif ($this->gta_garage[$bydel['id']]['garage_free'] == 0)\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Det er ingen ledige plasser i garasjen i denne bydelen.</p>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Kjør egen bil\", 'name=\"gta\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// teleportere\n\t\t\t\tif (access::is_nostat())\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Teleporter hit (nostat)\", 'name=\"teleporter\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t</div>';\n\t\t\n\t\techo '\n</div>';\n\t\t\n\t\tess::$b->page->load();\n\t}",
"function display() {\n echo'<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\n echo'<tr>'; //first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo '</tr><tr>'; //next square is in a new row\n }\n echo'</tr>';\n echo'</table>';\n }",
"function showprod1() {\r\n\t$result = mysql_query(\"SELECT * FROM products ORDER BY rand() LIMIT 6\");\r\n\twhile($row = mysql_fetch_array($result)){\r\n\t?>\r\n\t<div id=\"prod\"><table>\r\n\t<tr><td height=\"180px\"><center><img src=\"./images/products/<?php echo $row['image']?>\" alt=\"\" height=\"400px\" class=\"resizeme\" width=\"400px\" onload=”$(this).aeImageResize({ height: 190, width: 180})”/></center><td><tr>\r\n\t<tr><td height=\"15\"><center><?php echo $row['name'] ?></center></td></tr>\r\n\t<tr><td height=\"15\"><center>$<?php echo $row['price'] ?></center></td></tr>\r\n\t<tr><td valign=\"top\"><center><?php echo $row['discrip'] ?></center></td></tr>\r\n\t</table>\r\n\t</div>\r\n\t<?php\t\r\n\t}\t\r\n}",
"function print_item_size($item_size, $addition_class=''){\r\r\n\t\tglobal $gdl_item_row_size;\r\r\n\t\t\r\r\n\t\t$gdl_item_row_size = (empty($gdl_item_row_size))? 0: $gdl_item_row_size;\r\r\n\t\t\r\r\n\t\tif($gdl_item_row_size >= 1){\r\r\n\t\t\r\r\n\t\t\t$gdl_item_row_size = 0;\r\r\n\t\t\techo '<br class=\"clear\">';\r\r\n\t\t\t\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\tswitch($item_size){\r\r\n\t\t\tcase 'element1-4':\r\r\n\t\t\t\techo '<div class=\"four columns ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 1/4; \r\r\n\t\t\t\tbreak;\r\r\n\t\t\tcase 'element1-3':\r\r\n\t\t\t\techo '<div class=\"one-third column ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 1/3; \r\r\n\t\t\t\tbreak;\r\r\n\t\t\tcase 'element1-2':\r\r\n\t\t\t\techo '<div class=\"eight columns ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 1/2; \r\r\n\t\t\t\tbreak;\r\r\n\t\t\tcase 'element2-3':\r\r\n\t\t\t\techo '<div class=\"two-thirds column ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 2/3; \r\r\n\t\t\t\tbreak;\r\r\n\t\t\tcase 'element3-4':\r\r\n\t\t\t\techo '<div class=\"twelve columns ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 3/4; \r\r\n\t\t\t\tbreak;\r\r\n\t\t\tcase 'element1-1':\r\r\n\t\t\t\techo '<div class=\"sixteen columns ' . $addition_class . '\">';\r\r\n\t\t\t\t$gdl_item_row_size += 1; \r\r\n\t\t\t\tbreak;\t\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}",
"public function render_screen_layout()\n {\n }",
"function displayWarehouses($num, $addr, $city, $state, $zip, $quant) {\n echo \"\n <h2>Warehouse #\" . $num . \"</h2>\n <ul class='summaryList'>\n <li>Street Address: <i>'\" . $addr . \"'</i></li>\n <li>City: <i>'\" . $city . \"'</i></li>\n <li>State: <i>'\" . $state . \"'</i></li>\n <li>Zip-Code: <i>'\" . $zip . \"'</i></li>\n <li>Quantity Shipping: <i>'\" . $quant . \"'</i></li>\n </ul>\n \";\n }",
"function setDisplayVars()\n{\n global $displayBitmap;\n global $title;\n global $year;\n global $star;\n global $country;\n global $director;\n global $actor;\n global $screen;\n global $cine;\n global $oscar;\n $index = 0;\n\n //title\n if (($displayBitmap & TTL_MASK) == TTL_MASK)\n {\n $title = $index;\n ++$index;\n }\n //year\n if (($displayBitmap & YER_MASK) == YER_MASK)\n {\n $year = $index;\n ++$index;\n }\n //star rating\n if (($displayBitmap & STR_MASK) == STR_MASK)\n {\n $star = $index;\n ++$index;\n }\n //country\n if (($displayBitmap & COU_MASK) == COU_MASK)\n {\n $country = $index;\n ++$index;\n }\n //director\n if (($displayBitmap & DIR_MASK) == DIR_MASK)\n {\n $director = $index;\n ++$index;\n }\n //actor\n if (($displayBitmap & ACT_MASK) == ACT_MASK)\n {\n $actor = $index;\n ++$index;\n }\n //screenwriter\n if (($displayBitmap & SCR_MASK) == SCR_MASK)\n {\n $screen = $index;\n ++$index;\n }\n //cinematographer\n if (($displayBitmap & CIN_MASK) == CIN_MASK)\n {\n $cine = $index;\n ++$index;\n }\n //oscar\n if (($displayBitmap & OSC_MASK) == OSC_MASK)\n {\n $oscar = $index;\n ++$index;\n }\n}",
"private function display($list)\n {\n $this->view->downNumber = count($list);\n $this->view->downHostList = $list;\n }",
"public function display_items() {\n\t\t$wrap_class = str_replace( '_', '-', $this->parant_plugin_slug );\n\t\t?>\n\t\t<div id=\"wpaddons-io-wrap\" class=\"wrap <?php echo $wrap_class; ?>-wrap\">\n\n\t\t\t<?php\n\t\t\t// Get addon\n\t\t\t$addons = $this->get_addons();\n\n\t\t\t// Load the display template\n\t\t\tinclude_once( $this->view );\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t}",
"public function show()\n {\n echo $this->constructGrid();\n }",
"function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }",
"function wyz_display_offers() {\n\tif ( 'on' == get_option( 'wyz_disable_offers' ) )\n\t\treturn '';\n\tglobal $template_type;\n\t$btn_class = ( 2 == $template_type ? 'action-btn btn-bg-blue' : 'btn') . ' wyz-secondary-color-hover';\n\tob_start();\n\n\t// Get pending offers.\n\t$query = new WP_Query( array(\n\t\t'post_type' => 'wyz_offers',\n\t\t'posts_per_page' => '-1',\n\t\t'author' => get_current_user_id(),\n\t\t'post_status' => 'pending',\n\t\t'meta_query' =>array(\n\t\t\tarray (\n\t\t\t\t'key' => 'business_id',\n\t\t\t\t'value' => $_GET[ WyzQueryVars::ManageBusiness ],\n\t\t\t)\n\t\t),\n\t) );\n\t$pending = false;\n\tif ( $query->have_posts() ) : ?>\n\t\t\n\t<div class=\"section-title col-xs-12 margin-bottom-50\"><div class=\"row\">\n\t\t<h1><?php echo ( sprintf( esc_html__( 'PENDING %s', 'wyzi-business-finder' ), WYZ_OFFERS_CPT ) );?></h1>\n\t</div></div>\n\t<!-- pending offers -->\n\t<div class=\"publish-offers col-xs-12\">\n\t<div class=\"row\">\n\t\n\t\t<?php while ( $query->have_posts() ) :\n\t\t\t$query->the_post();\n\t\t\t$curr_id = get_the_ID();\n\t\t\t$curr_post = get_post( $curr_id );\n\t\t\t$icon_id = get_post_meta( $curr_id, 'wyz_offers_image_id', true );\n\t\t\tif ( current_user_can( 'manage_options' ) || get_current_user_id() == $curr_post->post_author ) :\n\t\t\t\tif ( ! $pending ) {\n\t\t\t\t\t$pending = true; ?>\n\t\t\t\t<?php } ?>\n\t\t<div class=\"sin-pub-offer\">\n\t\t\t<div class=\"logo\"><?php echo wp_get_attachment_image( $icon_id, 'thumbnail', true );?></div>\n\t\t\t<div class=\"title\"><h4><?php the_title(); ?></h4></div>\n\t\t\t<div class=\"buttons\">\n\t\t\t\t<a href=\"<?php echo esc_url( get_post_permalink() ); ?>\" class=\"<?php echo $btn_class;?>\"><?php esc_html_e( 'view', 'wyzi-business-finder' );?></a>\n\t\t\t\t<?php \n\t\t\t\tif ( 'on' === get_option( 'wyz_offer_editable' ) || current_user_can( 'manage_options' ) ) { ?>\n\t\t\t\t<a href=\"<?php echo WyzHelpers::add_clear_query_arg( array( 'edit-offer' => $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" ><?php esc_html_e( 'edit', 'wyzi-business-finder' );?></a>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ( ! ( 'trash' == get_post_status() ) ) {?>\n\t\t\t\t<a href=\"<?php echo esc_url( get_delete_post_link( $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" onclick=\"return confirm('<?php esc_html_e( 'Are you sure you wish to delete', 'wyzi-business-finder' );?> : <?php echo esc_js( get_the_title() ); ?>?')\"><?php esc_html_e( 'delete', 'wyzi-business-finder' );?></a>\n\t\t\t\t<?php }?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php endif;\n\n\t\tendwhile;\n\t\twp_reset_postdata();?>\n\t</div>\n\t</div>\n\t\t\t\n\t<?php endif;\n\n\t// Get published offers.\n\t$query = new WP_Query( array(\n\t\t'post_type' => 'wyz_offers',\n\t\t'posts_per_page' => '-1',\n\t\t'author' => get_current_user_id(),\n\t\t'post_status' => 'publish',\n\t\t'meta_query' =>array(\n\t\t\tarray (\n\t\t\t\t'key' => 'business_id',\n\t\t\t\t'value' => $_GET[ WyzQueryVars::ManageBusiness ],\n\t\t\t)\n\t\t),\n\t) );\n\n\tif ( $query->have_posts() ) : ?>\n\t\t\n\t<div class=\"section-title col-xs-12 margin-bottom-50\"><div class=\"row\">\n\t\t<h1><?php esc_html_e( 'PUBLISHED OFFERS', 'wyzi-business-finder' );?></h1>\n\t</div></div>\n\t<!-- published offers -->\n\t<div class=\"publish-offers col-xs-12\">\n\t<div class=\"row\">\n\t\t<?php while ( $query->have_posts() ) :\n\n\t\t\t$query->the_post();\n\t\t\t$curr_id = get_the_ID();\n\t\t\t$curr_post = get_post( $curr_id );\n\t\t\t$icon_id = get_post_meta( $curr_id, 'wyz_offers_image_id', true );\n\t\t\tif ( current_user_can( 'manage_options' ) || get_current_user_id() == $curr_post->post_author ) :\n\t\t\t\t$edit_post = '?edit-offer=' . $curr_id;?>\n\t\t\t\t\n\t\t\t<div class=\"sin-pub-offer\">\n\t\t\t\t<div class=\"logo\"><?php echo wp_get_attachment_image( $icon_id, 'thumbnail', true );?></div>\n\t\t\t\t<div class=\"title\"><h4><?php the_title(); ?></h4></div>\n\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_post_permalink() ); ?>\" class=\"<?php echo $btn_class;?>\"><?php esc_html_e( 'view', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php \n\t\t\t\t\tif ( 'on' === get_option( 'wyz_offer_editable' ) || current_user_can( 'manage_options' ) ) { ?>\n\t\t\t\t\t<a href=\"<?php echo WyzHelpers::add_clear_query_arg( array( 'edit-offer' => $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" ><?php esc_html_e( 'edit', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php }\n\t\t\t\t\tif ( ! ( 'trash' == get_post_status() ) ) {?>\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_delete_post_link( $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" onclick=\"return confirm('<?php esc_html_e( 'Are you sure you wish to delete', 'wyzi-business-finder' );?> : <?php echo esc_js( get_the_title() );?>?')\"><?php esc_html_e( 'delete', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php }?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php endif;\n\n\t\tendwhile;\n\t\twp_reset_postdata();?>\n\n\t</div>\n\t</div>\n\t\n\t<?php else :\n\t\tWyzHelpers::wyz_info( esc_html__( 'This Business has no published Offers Yet', 'wyzi-business-finder' ) );\n\tendif;\n\n\t// Get Future offers.\n\t$query = new WP_Query( array(\n\t\t'post_type' => 'wyz_offers',\n\t\t'posts_per_page' => '-1',\n\t\t'author' => get_current_user_id(),\n\t\t'post_status' => 'future',\n\t\t'meta_query' =>array(\n\t\t\tarray (\n\t\t\t\t'key' => 'business_id',\n\t\t\t\t'value' => $_GET[ WyzQueryVars::ManageBusiness ],\n\t\t\t)\n\t\t),\n\t) );\n\n\tif ( $query->have_posts() ) : ?>\n\t\t\n\t<div class=\"section-title col-xs-12 margin-bottom-50\"><div class=\"row\">\n\t\t<h1><?php esc_html_e( 'SCHEDULED OFFERS', 'wyzi-business-finder' );?></h1>\n\t</div></div>\n\t<!-- schedualed offers -->\n\t<div class=\"publish-offers col-xs-12\">\n\t<div class=\"row\">\n\t\t<?php while ( $query->have_posts() ) :\n\n\t\t\t$query->the_post();\n\t\t\t$curr_id = get_the_ID();\n\t\t\t$curr_post = get_post( $curr_id );\n\t\t\t$icon_id = get_post_meta( $curr_id, 'wyz_offers_image_id', true );\n\t\t\tif ( current_user_can( 'manage_options' ) || get_current_user_id() == $curr_post->post_author ) :\n\t\t\t\t$edit_post = '?edit-offer=' . $curr_id;?>\n\t\t\t\t\n\t\t\t<div class=\"sin-pub-offer\">\n\t\t\t\t<div class=\"logo\"><?php echo wp_get_attachment_image( $icon_id, 'thumbnail', true );?></div>\n\t\t\t\t<div class=\"title\"><h4><?php the_title(); ?></h4></div>\n\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_post_permalink() ); ?>\" class=\"<?php echo $btn_class;?>\"><?php esc_html_e( 'view', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php \n\t\t\t\t\tif ( 'on' === get_option( 'wyz_offer_editable' ) || current_user_can( 'manage_options' ) ) { ?>\n\t\t\t\t\t<a href=\"<?php echo WyzHelpers::add_clear_query_arg( array( 'edit-offer' => $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" ><?php esc_html_e( 'edit', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php }\n\t\t\t\t\tif ( ! ( 'trash' == get_post_status() ) ) {?>\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_delete_post_link( $curr_id ) ); ?>\" class=\"<?php echo $btn_class;?>\" onclick=\"return confirm('<?php esc_html_e( 'Are you sure you wish to delete', 'wyzi-business-finder' );?> : <?php echo esc_js( get_the_title() );?>?')\"><?php esc_html_e( 'delete', 'wyzi-business-finder' );?></a>\n\t\t\t\t\t<?php }?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php endif;\n\n\t\tendwhile;\n\t\twp_reset_postdata();?>\n\n\t</div>\n\t</div>\n\t\n\t<?php endif;\n\n\n\n\tif ( apply_filters( 'wyz_display_add_new_offer_button_ud', true, $_GET[ WyzQueryVars::ManageBusiness ] ) ){\n\t\tif ( $pending ) : \n\t\t\tWyzHelpers::wyz_info( sprintf( esc_html__( 'You can\\'t add a new %s while having ones pending for review', 'wyzi-business-finder' ), WYZ_OFFERS_CPT ) );\n\t\telse : \n\n\t\t\tif (WyzHelpers::wyz_sub_can_bus_owner_do(get_current_user_id(),'wyzi_sub_business_can_create_offers')) {\t\t?>\n\n\t\t\t<a class=\"wyz-primary-color wyz-prim-color btn-square\" href=\"<?php echo WyzHelpers::add_clear_query_arg( array( WyzQueryVars::AddNewOffer => true, WyzQueryVars::BusinessId => $_GET[ WyzQueryVars::ManageBusiness ] ) );?>\"><?php echo sprintf( esc_html__( 'Add New %s', 'wyzi-business-finder' ), WYZ_OFFERS_CPT );?></a>\n\t\t<?php } endif; \n\t}?>\n\t\n\t<?php return ob_get_clean();\n}",
"function show_earthriestext($products) {\r\n\tglobal $product;\r\n\t$pid=$product->id;\r\n\t$_enable_warehouse=get_metadata('post',$pid,'_enable_warehouse',true);\r\n\r\n\t\r\n\tif($_enable_warehouse==1) {\r\n\t\t $output= '<div style=\"font-size: 10px;color: #000;\">fulfilled by Eartheries warehouse</div>';\r\n\t\techo sprintf($output);\r\n\t}\r\n\t\r\n\t\r\n}",
"function Show_Shelf($cur_title,$shelf_arr)\n\t\t{\n\t\t\tglobal $ecom_siteid,$db,$ecom_hostname,$Settings_arr,$ecom_themeid,$default_layout,$Captions_arr,$inlineSiteComponents;\n\t\t\t$ajax_return_function = 'ajax_return_productdetailscontents';\n\t\t\t$Captions_arr['PROD_DETAILS'] \t= getCaptions('PROD_DETAILS');\n\t\t\t$shelf_included = 0;\n\t\t\t\n\t\t\tif(!$_REQUEST['shelf_id'])\n\t\t\t{\n\t\t\t\t$shelf_included = 1;\n\t\t\t}\n\t\t\tinclude_once \"ajax/ajax.php\";\n\t\t\tif (count($shelf_arr))\n\t\t\t{\n\t\t\t\t$shelfsort_by\t\t\t= $Settings_arr['product_orderfield_shelf'];\n\t\t\t\t$prodperpage\t\t\t= $Settings_arr['product_maxcntperpage_shelf'];// product per page\n\t\t\t\n\t\t\t\tswitch ($shelfsort_by)\n\t\t\t\t{\n\t\t\t\t\tcase 'custom': // case of order by customer fiekd\n\t\t\t\t\t$shelfsort_by\t\t= 'b.product_order';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'product_name': // case of order by product name\n\t\t\t\t\t$shelfsort_by\t\t= 'a.product_name';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'price': // case of order by price\n\t\t\t\t\t$shelfsort_by\t\t= 'calc_disc_price';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'product_id': // case of order by price\n\t\t\t\t\t$prodsort_by\t\t= 'a.product_id';\n\t\t\t\t\tbreak;\t\n\t\t\t\t\tdefault: // by default order by product name\n\t\t\t\t\t$shelfsort_by\t\t= 'a.product_name';\n\t\t\t\t\tbreak;\n\t\t\t\t};\n\t\t\t\t$shelfsort_order\t\t= $Settings_arr['product_orderby_shelf'];\n\t\t\t\t$prev_shelf\t\t\t\t= 0;\n\t\t\t\t//Iterating through the shelf array to fetch the product to be shown.\n\t\t\t\tforeach ($shelf_arr as $k=>$shelfData)\n\t\t\t\t{\n\t\t\t\t\t// Check whether shelf_activateperiodchange is set to 1\n\t\t\t\t\t$active \t= $shelfData['shelf_activateperiodchange'];\n\t\t\t\t\tif($active==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$proceed\t= validate_component_dates($shelfData['shelf_displaystartdate'],$shelfData['shelf_displayenddate']);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$proceed\t= true;\t\n\t\t\t\t\tif ($proceed)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($_REQUEST['req']=='')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$cls = \"shelfBtable_home\";\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $cls = \"shelfBtable\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tfunction showmask_shelf(id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobjs = eval('document.getElementById(\"'+id+'\")');\n\t\t\t\t\t\t\tobjs.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction hidemask_shelf(id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobjs = eval('document.getElementById(\"'+id+'\")');\n\t\t\t\t\t\t\tobjs.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"<?php echo $cls;?>\">\n\t<?php \t\t\t\tif($cur_title)\n\t\t\t\t\t\t{\n\t?>\t\t\t\t\t<tr><td colspan=\"3\" class=\"shelfBheader\" align=\"left\"><?php echo $cur_title?></td></tr>\n\t<?php\t\t\t\t}\n\t\t\t\t\t\t$desc = trim($shelfData['shelf_description']);\n\t\t\t\t\t\tif($desc!='' and $desc!=' ')\n\t\t\t\t\t\t{\n\t?>\t\t\t\t\t\t<tr><td colspan=\"3\" class=\"shelfBproddes\" align=\"left\"><?php echo $desc;?></td></tr>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t<tr><td colspan=\"3\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif($shelf_included==0) // case of showall of shelf\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"donotproceed_shelf\" id=\"donotproceed_shelf\" value=\"\">\n\t\t\t\t\t\t\t\t<div id=\"result_prod_div\">\n\t\t\t\t\t\t\t\t<div id=\"pgng1_1\" align=\"left\" class=\"message_box\" style=\"display:none\" ></div>\n\t\t\t\t\t\t\t\t<div id=\"last_msg_loader\"></div>\n\n\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\tjQuery.noConflict();\n\t\t\t\t\t\t\t\tvar $j = jQuery;\n\t\t\t\t\t\t\t\t$j(document).ready(function(){\n\t\t\t\t\t\t\t\t\twindow.last_msg_funtion = function (showheader) \n\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t var dataString = '';\n\t\t\t\t\t\t\t\t\t var sortby\t\t= '<?php echo $shelfsort_by?>';\n\t\t\t\t\t\t\t\t\t var sortorder \t= '<?php echo $shelfsort_order?>';\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t if($j('#proddispstyle_type').val())\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tvar liststyle = $j('#proddispstyle_type').val();\n\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\tvar liststyle \t= 'grid';\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t var prodperpage = '<?php echo $prodperpage?>';\n\t\t\t\t\t\t\t\t\t if(showheader==2)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tshowheader=1;\n\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('ajax_paging_prevcntr').value = '';\n\t\t\t\t\t\t\t\t\t\t\t$j('#result_prod_div').html('<div id=\"pgng1_1\" align=\"left\" class=\"message_box\" style=\"display:none\" ></div><div id=\"last_msg_loader\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t$j('div#last_msg_loader').html('<img src=\"<?php url_site_image('bigLoader.gif')?>\">');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t var ID\t=\t$j(\".message_box:last\").attr(\"id\");\n\t\t\t\t\t\t\t\t\t sp1 \t\t= ID.split('_');\n\t\t\t\t\t\t\t\t\t sp2 \t\t= sp1[0].replace('pgng','');\n\t\t\t\t\t\t\t\t\t if (document.getElementById('ajax_paging_prevcntr'))\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t var cntr_vals = document.getElementById('ajax_paging_prevcntr').value;\n\t\t\t\t\t\t\t\t\t\t if(cntr_vals!=sp2)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t document.getElementById('ajax_paging_prevcntr').value = sp2;\n\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 return; // done to avoid repetation.\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t var qrystr = \"&req=prod_shelf&shelf_sortorder=\"+sortorder+\"&shelf_sortby=\"+sortby+\"&shelf_prodperpage=\"+prodperpage+'&showheader='+showheader+'&liststyle='+liststyle+\"&shelf_included=\"+\"<?php echo $shelf_included?>\";\n\t\t\t\t\t\t\t\t\t $j('div#last_msg_loader').html('<img src=\"<?php url_site_image('bigLoader.gif')?>\">');\n\t\t\t\t\t\t\t\t\t $j.post(\"../../../includes/base_files/shelf.php?shelf_id=\"+<?php echo $_REQUEST['shelf_id']?>+\"&fromajax_prodautoload=true&shelfdet_pg=\"+sp2+qrystr,\n\t\t\t\t\t\t\t\t\t\tfunction(data)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif (data != \"\") \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(document.getElementById('paging_ended'))\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\telse\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$j(\".message_box:last\").after(data);\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}\n\t\t\t\t\t\t\t\t\t\t\t$j('div#last_msg_loader').empty();\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}; \n\t\t\t\t\t\t\t\t\t$j(window).scroll(function()\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($j(window).scrollTop() >= ($j(document).height() - $j(window).height()-500))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(document.getElementById('paging_ended'))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\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/*if($j(\"#donotproceed_shelf\").val()==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\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\telse\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\tvar wintop \t= $j(window).scrollTop();\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar docht \t= $j(document).height();\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar winht \t= $j(window).height();\n\t\t\t\t\t\t\t\t\t\t\t\t\tlast_msg_funtion(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\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\tif(document.getElementById('paging_ended'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlast_msg_funtion(1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tfunction display_view(typ)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($j('#proddispstyle_type').val()!=typ)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$j('#proddispstyle_type').val(typ);\n\t\t\t\t\t\t\t\t\tlast_msg_funtion(2);\n\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</script>\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse // case of shelf is included from any inner page\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t $sql_prod = \"SELECT a.product_id,a.product_name,a.product_variablestock_allowed,a.product_show_cartlink,\n\t\t\t\t\t\t\t\t\ta.product_preorder_allowed,a.product_show_enquirelink,a.product_webstock,a.product_webprice,\n\t\t\t\t\t\t\t\t\ta.product_discount,a.product_discount_enteredasval,a.product_bulkdiscount_allowed,\n\t\t\t\t\t\t\t\t\tproduct_total_preorder_allowed,a.product_applytax,a.product_shortdesc,a.product_bonuspoints ,\n\t\t\t\t\t\t\t\t\ta.product_stock_notification_required,a.product_alloworder_notinstock,a.product_variables_exists,a.product_variablesaddonprice_exists,\n\t\t\t\t\t\t\t\t\ta.product_variablecomboprice_allowed,a.product_variablecombocommon_image_allowed,a.default_comb_id,\n\t\t\t\t\t\t\t\t\ta.price_normalprefix,a.price_normalsuffix, a.price_fromprefix, a.price_fromsuffix,a.price_specialofferprefix, a.price_specialoffersuffix, \n\t\t\t\t\t\t\t\t\ta.price_discountprefix, a.price_discountsuffix, a.price_yousaveprefix, a.price_yousavesuffix,a.price_noprice,\n\t\t\t\t\t\t\t\t\ta.product_averagerating,a.product_saleicon_show,a.product_saleicon_text,a.product_newicon_show,a.product_newicon_text,\n\t\t\t\t\t\t\t\t\ta.product_show_pricepromise,a.product_freedelivery,\n\t\t\t\t\t\t\t\t\t\t\t\t\tIF(a.product_discount >0, \n\t\t\t\t\t\t\t\t\t\t\t\t\tcase a.product_discount_enteredasval\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHEN 0 THEN (a.product_webprice-a.product_webprice*a.product_discount/100) \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHEN 1 THEN (IF((a.product_webprice-a.product_discount)>0,(a.product_webprice-a.product_discount),0)) \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHEN 2 THEN (a.product_discount) \n\t\t\t\t\t\t\t\t\t\t\t\t\tEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t,a.product_webprice) calc_disc_price \n\t\t\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\t\t\tproducts a,product_shelf_product b \n\t\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t\tb.product_shelf_shelf_id = \".$shelfData['shelf_id'].\" \n\t\t\t\t\t\t\t\t\t\t\tAND a.product_id = b.products_product_id \n\t\t\t\t\t\t\t\t\t\t\tAND a.product_hide = 'N' \n\t\t\t\t\t\t\t\t\t\tORDER BY \n\t\t\t\t\t\t\t\t\t\t\t$shelfsort_by $shelfsort_order \t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tLIMIT \n\t\t\t\t\t\t\t\t\t\t\t0,8\";\n\t\t\t\t\t\t\t\t$ret_prod = $db->query($sql_prod);\n\t\t\t\t\t\t\t\t$row_cat = $shelfData;\n\t\t\t\t\t\t\t\t$row_cat['product_displaytype']='grid';\n\t\t\t\t\t\t\t\t$row_cat['shelf_included']=1;\n\t\t\t\t\t\t\t\t$this->Show_Products($ret_prod,$tot_cnt,$start_var,$row_cat,$base_sort_by,$prodsort_order,$from_filter=false);\n\t\t\t\t\t\t\t\t//$this->Show_NomoreProducts();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}",
"private function welcome_pieces()\n {\n //use the collections::all() method and put it into the allpieces variable\n $allpieces = $this->certificates->distinct_all();\n $results = ''; \n foreach ($allpieces as $row)\n {\n $results .= $this->parser->parse('_homepagecell', $row, true);\n }\t\n $this->data['piecedisplay'] = $results; \n }",
"function HM_PB_4_FM($component) {\n if ($component['parent_device_interface'] == 'BidCos-RF' && $component['visible'] == 'true' && isset($component['PRESS_SHORT'])) {\n return '<div class=\"hh\">'\n . '<div class=\"pull-left\"><img src=\"../assets/icons/' . $component[\"icon\"] . '\" class=\"icon\">' . $component['name'] . '</div>'\n . '<div class=\"pull-right\">'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_SHORT'] . '\" data-set-value=\"1\">Kurz</span>'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_LONG'] . '\" data-set-value=\"1\">Lang</span>'\n . '</div>'\n . '<div class=\"clearfix\"></div>'\n . '</div>';\n }\n}"
]
| [
"0.573733",
"0.571079",
"0.54027015",
"0.5391598",
"0.5384205",
"0.5356286",
"0.5318571",
"0.53166896",
"0.529249",
"0.5287912",
"0.5263718",
"0.5253724",
"0.5234444",
"0.522349",
"0.5222967",
"0.52117777",
"0.52025247",
"0.5189127",
"0.517437",
"0.5169443",
"0.5160491",
"0.51598936",
"0.514437",
"0.51277435",
"0.5123135",
"0.5094414",
"0.5094013",
"0.50865215",
"0.507297",
"0.50387657"
]
| 0.64309853 | 0 |
Checks $request if it contains a key lastname | private function handleKeyLastname(UserInterface $user, Request $request) {
$data = $request->request->all();
if (array_key_exists('lastname', $data)) {
$user->setLastname($data['lastname']);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkName() {\r\n // Params\r\n $this->lastName = $this->uri->params['lastName'];\r\n // Class call\r\n $checkClass = new LastNameOrigin($this->lastName);\r\n $res = $checkClass->Call();\r\n // Return result\r\n $this->returnJson($res['code'], $res['message']);\r\n }",
"public function requestFirstname();",
"private function setLastName()\n {\n \tif ( empty($_POST['last_name'] ) ) {\n \t\t$this->data['error']['last_name'] = \"Please provide your last name.\";\n $this->error = true;\n return;\n }\n \n $ln = trim( $_POST['last_name'] );\n \n \tif (preg_match('/^[A-Z \\'.-]{1,40}$/i', $ln)) {\n\t\t\t$this->data['last_name'] = $ln;\n\t\t} else {\n\t\t\t$this->data['error']['last_name'] = \"Your last name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }",
"public function getReqLastName()\n\t{\n\t\treturn $this->req_last_name;\n\t}",
"public function hasLastName() {\n return $this->_has(3);\n }",
"public function validateLastName()\n {\n $last_name = $this->_sanitized_data['last_name'];\n\n if (empty($last_name)) {\n $this->_addErrorMessage(\"Last name was blank or contained unwanted characters\");\n return false;\n }\n\n if (strlen($last_name) > 255) {\n $this->_addErrorMessage(\"Last name cannot be longer than 255 characters\");\n return false;\n }\n\n if ($last_name !== $this->_data['last_name']) {\n $this->_addErrorMessage(\"Last name data did not match after sanitizing\");\n return false;\n }\n\n return true;\n }",
"public function requestSurname();",
"public function validateName()\n {\n if (strlen(trim($_POST[$this->key])) < $this->minLength) {\n self::$errors[] = $this->convertUnderscores() . \" field requires at least $this->minLength characters\";\n }\n\n //check for profanity.\n if ($this->noProfanity) {\n $this->checkProfanity();\n }\n\n //lastly, check for valid first name patterns.\n\n if (!preg_match(\"/^[a-zA-Z]+[ -\\/\\\\'\\\"]*[a-zA-Z]+[ \\\"]{0,2}[a-zA-Z]*$/\", trim($_POST[$this->key]))) {\n self::$errors[] = \"Not a valid \" . $this->convertUnderscores();\n }\n\n return self::$errors ? false : true;\n }",
"public function getLastName_always_returnCorrectly()\n {\n $this->assertEquals($this->user['user_metadata']['lastname'], $this->entity->getLastName());\n }",
"function ag_rcp_require_first_and_last_names( $posted ) {\n\tif ( is_user_logged_in() ) {\n\t\treturn;\n\t}\n\t\n\tif ( empty( $posted['rcp_user_first'] ) ) {\n\t\trcp_errors()->add( 'first_name_required', __( 'Please enter your first name', 'christatimmer' ), 'register' );\n\t}\n\n\tif ( empty( $posted['rcp_user_last'] ) ) {\n\t\trcp_errors()->add( 'last_name_required', __( 'Please enter your last name', 'christatimmer' ), 'register' );\n\t}\n}",
"function setLastName($name)\n {\n if( !isset($name) || $name == '' )\n $name = 'Not Available';\n $this->addParam('last_name', (string)$name);\n }",
"protected function last_name() {\n $element = new Text('last_name');\n $element->setLabel('Last Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'Last Name is required'))\n ));\n $this->add($element);\n }",
"public function lastname(){\n\t $_error = \"enter your last name\";\n\t\treturn $_error;\n\t}",
"public function getLastname() {}",
"function nameValidator() {\n\t\tglobal $firstname;\n\t\treturn ctype_alpha($firstname);\n\t}",
"public function validateLastname($lastname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$lastname)){\n return true;\n }else{\n return false;\n }\n }",
"public function validateFirstName()\n {\n $first_name = filter_var(\n $this->_sanitized_data['first_name'],\n FILTER_SANITIZE_STRING,\n array('flags' => FILTER_FLAG_STRIP_HIGH)\n );\n $validation_response = true;\n\n if ($first_name == '') {\n $this->_addErrorMessage('First name cannot be blank');\n $validation_response = false;\n }\n\n if (strlen($first_name) > 255) {\n $this->_addErrorMessage('First name cannot exceed 255 characters');\n $validation_response = false;\n }\n\n if ($first_name !== $this->_data['first_name']) {\n $this->_addErrorMessage('First name contains unwanted characters');\n $validation_response = false;\n }\n\n return $validation_response;\n }",
"public function userHasProfileLastname()\n {\n $name = explode(' ', $this->user->name);\n\n $this->user->profile()->create([\n 'firstname' => $name[0],\n 'lastname' => $name[1],\n ]);\n\n $this->assertEquals($this->user->profile->lastname, $name[1]);\n\n }",
"public function getLastname() {\n return $this->getValue('lastname');\n }",
"private function validateLastName($last)\n {\n if (strlen($last) > 25 || strlen($last) < 2) {\n array_push($this->errorArray, \"Your last name must be between 25 & 2 characters\");\n return;\n }\n }",
"private function validateLastName($ln){\n if(strlen($ln)<2 || strlen($ln)>25){\n array_push($this->errorArray, Constants::$lastNameCharecters);\n }\n }",
"private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }",
"public function getLastName() {}",
"public function getLastName() {}",
"public function hasFirstName() {\n return $this->_has(2);\n }",
"private function handleKeyFirstname(UserInterface $user, Request $request) {\n $data = $request->request->all();\n\n if (array_key_exists('firstname', $data)) {\n // Check if firstname is empty. At least firstname is required.\n if (null == $data['firstname']) {\n $this->logAndThrowError(400, 'Invalid empty firstname', $this->get('translator')->trans('api.show_error_firstname', array(), 'messages', $request->getLocale()), $request->getLocale());\n }\n $user->setFirstname($data['firstname']);\n }\n\n }",
"function give_donation_form_validate_name_fields( $post_data ) {\n\n\t$is_alpha_first_name = ( ! is_email( $post_data['give_first'] ) && ! preg_match( '~[0-9]~', $post_data['give_first'] ) );\n\t$is_alpha_last_name = ( ! is_email( $post_data['give_last'] ) && ! preg_match( '~[0-9]~', $post_data['give_last'] ) );\n\n\tif ( ! $is_alpha_first_name || ( ! empty( $post_data['give_last'] ) && ! $is_alpha_last_name ) ) {\n\t\tgive_set_error( 'invalid_name', esc_html__( 'The First Name and Last Name fields cannot contain an email address or numbers.', 'give' ) );\n\t}\n}",
"public function hasName()\n {\n return $this->get(self::NAME) !== null;\n }",
"public function check(Request $request)\n\t{\n\t\tif ($request->input(\"action\")==\"name\")\n\t\t{\t\n\t\t\t// var_dump($request->input(\"action\"));die;\n\t\t\t$name=PersonInfo::where('name','=',$request->input(\"name\"))->get();\n\t\t\t// var_dump($name); die;\n\t\t\treturn $name;\n\t\t}\n\t}",
"function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }"
]
| [
"0.65704906",
"0.63535494",
"0.6291259",
"0.6164824",
"0.6130299",
"0.60979563",
"0.605185",
"0.6024341",
"0.583428",
"0.5792942",
"0.5761136",
"0.57210726",
"0.57042253",
"0.57009566",
"0.56352043",
"0.5610754",
"0.55972534",
"0.5552901",
"0.55404615",
"0.553794",
"0.5515708",
"0.5491822",
"0.54891706",
"0.54891706",
"0.5470542",
"0.5468537",
"0.5438868",
"0.5436874",
"0.5412706",
"0.54088336"
]
| 0.6838159 | 0 |
Whether the property is protected. | public function isProtected() : bool {
return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isProtected()\n {\n return $this->protected;\n }",
"public function isProtected(): bool\n {\n return $this->node->isProtected();\n }",
"public function isProtected(): bool\n {\n return $this->node->isProtected();\n }",
"public function isProtected() {}",
"public function getIsProtectedAttribute()\n {\n return in_array($this->guard, config('access-control.protected'));\n }",
"public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }",
"function isProtected() ;",
"public function isProtected()\n {\n return array_get($this->action, 'protected', false) === true;\n }",
"public function getHasGuardProtectedAttribute()\n {\n return in_array($this->guard, config('access-control.guard-protected'));\n }",
"public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}",
"public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}",
"public static function is_protected_meta( $protected, $meta_key ) {\n\t\treturn in_array( $meta_key, Registrations::get_meta_key() ) ? true : $protected;\n\t}",
"public function is_protected($method) {\n return ( in_array($method, Meta::get_protected_methods($this)) );\n }",
"public function is_protected_meta( $protected, $meta_key ) {\n\n\t\tif ( $protected ) {\n\t\t\treturn $protected;\n\t\t}\n\n\t\tif ( ! isset( $this->field_names ) ) {\n\t\t\t$this->field_names = wp_list_pluck( $this->form_fields(), 'name' );\n\t\t}\n\n\t\tif ( in_array( $meta_key, $this->field_names ) ) {\n\t\t\t$protected = true;\n\t\t}\n\n\t\treturn $protected;\n\t}",
"public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}",
"#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }",
"public function isPublic()\n\t{\n\t\treturn $this->property->isPublic();\n\t}",
"public function is_accessible() {\n return $this->_accessible;\n }",
"function is_protected_meta( $protected, $meta_key ) {\n\t\tif ( strpos( $meta_key, 'cso_' ) === 0 ) return true;\n\t\treturn $protected;\n\t}",
"public function getPrivate() : bool\n {\n return $this->private;\n }",
"public static function isUnaccessible(\\ReflectionProperty $property) {\r\n return ($property->isPrivate() || $property->isProtected());\r\n }",
"public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }",
"public function getPrivate() : bool {\n return $this->private;\n }",
"function is_protected_meta($meta_key, $meta_type = '')\n {\n }",
"private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }",
"public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }",
"public function shouldMethodBeProtected($method) {\n if (in_array($method, $this->getMethods())) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"function isReadonly()\n {\n return $this->readonly;\n }",
"public function get_tcosto_global_protected() : bool\n {\n if (!isset($this->tcosto_global_protected)) {\n return false;\n }\n\n return $this->tcosto_global_protected;\n }",
"public function isReadOnly()\n {\n return $this->_readOnly;\n }"
]
| [
"0.8379755",
"0.7851283",
"0.7851283",
"0.782681",
"0.7824568",
"0.7734371",
"0.7584322",
"0.7429981",
"0.7399157",
"0.7112716",
"0.7024482",
"0.6962618",
"0.6873163",
"0.6830594",
"0.6767726",
"0.6733903",
"0.6676794",
"0.666128",
"0.66601443",
"0.6638949",
"0.66339713",
"0.6587503",
"0.6586099",
"0.64362174",
"0.6426738",
"0.641243",
"0.6411495",
"0.63988507",
"0.63984317",
"0.63488376"
]
| 0.81763554 | 1 |
Whether the property is static. | public function isStatic() : bool {
return (bool) ($this->flags & Class_::MODIFIER_STATIC);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIsStatic() {\n return $this->isStatic;\n }",
"public function isStatic(): bool\n {\n return $this->node->isStatic();\n }",
"public function isStatic(): bool\n {\n return $this->node->isStatic();\n }",
"public function isStaticTheme(): bool\n {\n return (boolean) $this->staticTheme;\n }",
"public function isStaticTheme()\n {\n return (boolean) $this->staticTheme;\n }",
"public function isDynamicProperty(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_DYNAMIC_PROPERTY);\n }",
"private static function _isStatic() {\n $backtrace = debug_backtrace();\n\n // The 0th call is to _isStatic(), so we need to check the next\n // call down the stack.\n return $backtrace[1]['type'] == '::';\n }",
"#[@test]\n public function staticModifier() {\n $this->assertTrue(Modifiers::isStatic(MODIFIER_STATIC));\n $this->assertEquals('public static', Modifiers::stringOf(MODIFIER_STATIC));\n }",
"protected static function staticPropertyExists($property)\n {\n return property_exists(static::class, $property);\n }",
"public function hasStaticInUnionType(): bool\n {\n return $this->getPhanFlagsHasState(Flags::HAS_STATIC_UNION_TYPE);\n }",
"private function checkIfStatic() {\n\t\tif (\n\t\t\tisset( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_rewrite'] ) &&\n\t\t\tempty( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_rewrite'] )\n\t\t) {\n\t\t\t$deprecatedOptions = aioseo()->internalOptions->internal->deprecatedOptions;\n\t\t\tarray_push( $deprecatedOptions, 'staticSitemap' );\n\t\t\taioseo()->internalOptions->internal->deprecatedOptions = $deprecatedOptions;\n\n\t\t\taioseo()->options->deprecated->sitemap->general->advancedSettings->dynamic = false;\n\t\t}\n\t}",
"public function isPublic()\n\t{\n\t\treturn $this->property->isPublic();\n\t}",
"public function isStaticCacheble() {}",
"public function getStatic()\n {\n return $this->static;\n }",
"public function staticPreviewIsEnabled()\n {\n return $this->staticPreview;\n }",
"static public function isVisible(): bool\n {\n return static::$visible;\n }",
"private function has_static_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_STATIC) \n return true;\n \n return false;\n }",
"public function setStatic($static)\n {\n $this->static = (bool) $static;\n return $this;\n }",
"function setIsStatic($isStatic) {\n if ($isStatic !== ($oldIsStatic = $this->isStatic)) {\n $this->isStatic = $isStatic;\n }\n }",
"public function isSingleton() {\n return $this->isSingleton;\n }",
"public static function staticMethod(){\n\t\treturn self::$static;\n\t}",
"protected function matchesStaticProperty(Node $node, $property)\n {\n return ($node instanceof StaticPropertyFetch || $node instanceof PropertyProperty || $node instanceof Property)\n && $this->nodeMatchesSymbol($node, $property);\n }",
"public function isInPropertyBehavior() {\n return $this->isInPropertyBehavior;\n }",
"public function isSingleton(): bool\n {\n return $this->isSingleton;\n }",
"function is($prop){\n \treturn $this->get_property($prop)==1?true:false;\n }",
"public static function staticExists($class, string $property, bool $propertyOrConstant): bool\n {\n $reflectionClass = new ReflectionClass($class);\n $class = self::getClass($class);\n if ($propertyOrConstant) {\n try {\n $reflection = $reflectionClass->getProperty($property);\n } catch (ReflectionException $e) {\n return false;\n }\n } elseif (PHP_VERSION_ID >= 70100) {\n try {\n $reflection = new ReflectionClassConstant($class, $property);\n } catch (ReflectionException $e) {\n return false;\n }\n } else {\n return isset($reflectionClass->getConstants()[$property]);\n }\n\n $classCaller = \\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['class'] ?? '';\n $allowProtected = false;\n $allowPrivate = false;\n if ($classCaller) {\n if ($class === $classCaller) {\n $allowProtected = $allowPrivate = true;\n } elseif ($reflectionClass->isSubclassOf($classCaller) || (new ReflectionClass($classCaller))->isSubclassOf($class)) {\n $allowProtected = true;\n }\n }\n if ($reflection->isPrivate()) {\n return $allowPrivate ? $reflection->getValue() !== null : false;\n }\n if ($reflection->isProtected()) {\n return $allowProtected ? $reflection->getValue() !== null : false;\n }\n return $reflection->getValue() !== null;\n }",
"function setTypeAsStatic() {\n\t\t$this->type = \"static\";\n\t}",
"public function getIsShared()\n {\n return $this->getProperty(\"IsShared\");\n }",
"public function isPublic()\n {\n return $this->public;\n }",
"public function isPublic() {\n\t\treturn $this->public;\n\t}"
]
| [
"0.8042929",
"0.7673979",
"0.7673979",
"0.6878788",
"0.6853044",
"0.66025376",
"0.6580997",
"0.64821136",
"0.6453732",
"0.64506346",
"0.6399567",
"0.6348692",
"0.6344331",
"0.63267165",
"0.6313184",
"0.6196214",
"0.6001549",
"0.59658587",
"0.5951252",
"0.5930301",
"0.58975476",
"0.589609",
"0.5895587",
"0.5857688",
"0.5734674",
"0.5678092",
"0.5640711",
"0.56287885",
"0.56011",
"0.5592545"
]
| 0.8106914 | 0 |
This runs on every query and makes sure that only records within the current conference can be shown. Eg, you can't see presentations that belong to another conference. If you do want this, remove this method. For the Conference model this is different because this model allows you to edit other conference info regardless the current conference_id (defined by hostname) | public function init()
{
if (isset($this->conference_id)) {
if (!$this->conference_id) {
return;
}
}
$request = Zend_Controller_Front::getInstance()->getRequest();
if ( ($request->getControllerName() != 'conference')
&& ($request->getModuleName() == 'core')
&& (isset($this->conference_id))
&& ($this->getTable()->getConferenceId()) ) {
try {
if ($this->getTable()->getConferenceId() != $this->conference_id) {
throw new TA_Model_Resource_Db_Table_Row_Exception('This record does not match the conference identifier, eg. you are trying to view a record not in this conference');
}
} catch (Zend_Db_Table_Row_Exception $e) {
//do nothing
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function conference()\n {\n return $this->belongsTo(Conference::class);\n }",
"public function findByConference($id)\n {\n return $this->model->where('conference_id', $id);\n }",
"public function conference ($appointment_hash = NULL)\n {\n /* - - - - -Avoid page from caching -*/\n\t\t$this->output->set_header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');\n $this->output->set_header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0');\n $this->output->set_header('Cache-Control: post-check=0, pre-check=0', FALSE);\n $this->output->set_header('Pragma: no-cache');\n /* - - - - -Avoid page from caching Ends - - - - - - */\n\n $history_appointments = NULL;\n\n if (empty($appointment_hash))\n {\n show_404();\n }\n\n $get_current_appointment = $this->get_current_appointment();\n\n if (!empty($get_current_appointment) && encryptor('encrypt', $get_current_appointment->id) != $appointment_hash)\n {\n redirect(base_url('appointments/conference/' . encryptor('encrypt', $get_current_appointment->id)));\n }\n\n /* Fetching all Appointment Details*/\n $conditions = $params = array();\n $conditions['appointments.id'] = encryptor('decrypt', $appointment_hash);\n $conditions['appointments.status'] = ACTIVE;\n $conditions['appointments.end_time >= '] = date('Y-m-d H:i:s');\n\n $params['join'][] = array(\n 'table' => 'appointment_details',\n 'conditions' => 'appointments.id = appointment_details.appointment_id'\n );\n /*Getting prescription Details if exists or not*/\n $params['join'][] = array(\n 'table' => 'prescriptions',\n 'conditions' => 'prescriptions.appointment_id = appointments.id',\n 'type' => 'left'\n );\n $params['fields'] = 'appointments.id, appointments.call_status, \n\t\t\tappointments.start_time, appointments.end_time,\n appointments.tokbox_session_key, appointment_details.token,\n appointment_details.user_id, appointment_details.user_type, \n prescriptions.id AS prescription_id, history, examination, \n diagnosis, management, prescriptions.app_id AS prescription_app_id, \n outcome_description';\n $params['return_field'] = 'user_type';\n $get_apppointment_details = $this->appointment_model->get_all($conditions, $params);\n\n /* Fetching appointment details ends */\n\n if (empty($get_apppointment_details))\n {\n redirect(base_url($this->current_module));\n }\n\n /* Fetching Previous Appointments of the Patient with doctornow doctors */\n $conditions = $params = array();\n $conditions['appointments.status'] = ACTIVE;\n $conditions['appointments.id <> '] = current($get_apppointment_details)->id;\n $conditions['appointment_details.user_id'] = $get_apppointment_details[USER_PATIENT]->user_id;\n $conditions['appointments.start_time < '] = date('Y-m-d h:i:s');\n\n $params['join'][] = array(\n 'table' => 'appointment_details',\n 'conditions' => 'appointments.id = appointment_details.appointment_id AND appointment_details.user_type = ' . USER_PATIENT\n );\n $params['join'][] = array(\n 'table' => 'appointment_details AS ADDOC',\n 'conditions' => 'appointments.id = ADDOC.appointment_id AND ADDOC.user_type = ' . USER_DOCTOR\n );\n /*Getting doctor Details*/\n $params['join'][] = array(\n 'table' => 'users',\n 'conditions' => 'users.id = ADDOC.user_id',\n );\n \n $params['fields'] = 'appointments.id, appointments.start_time, users.first_name, users.last_name';\n $history_appointments = $this->appointment_model->get_all($conditions, $params);\n /*-----------------History Appointments Ends------------------*/\n\n /*Fetching Patient details from third party database via curl request*/\n $patient_details = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'reviewpatient',\n 'patientid' => $get_apppointment_details[USER_PATIENT]->user_id,\n )));\n /*Fetching patient Notes details from third party database via curl request*/\n $patient_notes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'getappointmentinformation',\n 'patientid' => $get_apppointment_details[USER_PATIENT]->user_id,\n 'appointmentid' => $get_apppointment_details[USER_PATIENT]->id\n )));\n\t\tif (json_decode($patient_notes) && json_decode($patient_notes) != NULL)\n {\n\t\t\t$patient_notes_str = current(json_decode($patient_notes))->PatientNote;\n\t\t}\n\n /* Saving tokbox data into session for call, if call is pending */\n if (current($get_apppointment_details)->call_status == CALL_PENDING)\n {\n $tokbox_data = array(\n 'tokbox_session_key' => $get_apppointment_details[USER_DOCTOR]->tokbox_session_key,\n 'tokbox_token' => $get_apppointment_details[USER_DOCTOR]->token\n );\n $this->session->set_userdata('tokbox_data', $tokbox_data);\n }\n\n /* Template description */\n $page_variables['container']['patient_notes'] = !empty($patient_notes_str) ? $patient_notes_str : NULL;\n $page_variables['container']['get_apppointment_details'] = $get_apppointment_details;\n $page_variables['container']['appointment_hash'] = $appointment_hash;\n $page_variables['container']['history_appointments'] = $history_appointments;\n $page_variables['container']['patient_details'] = !empty($patient_details) ? current(json_decode($patient_details)) : array();\n $page_variables['container']['patient_id'] = !empty($get_apppointment_details[USER_PATIENT]->user_id) ? $get_apppointment_details[USER_PATIENT]->user_id : 0;\n $data['page_view']['container'] = 'appointments_module/conference';\n\n $page_variables['right_container']['get_apppointment_details'] = $get_apppointment_details;\n $data['page_view']['right_container'] = 'appointments_module/right_conference';\n\n //Variables For Footer\n $data['title'] = 'Doctor\\'s Schedule | ' . SITE_NAME;\n\n /* Extra css classes to add in template */\n $data['extra_wrapper_class'] = 'live-appointment';\n //$data['extra_container_class'] = 'c-full';\n /* -------Ends----- */\n $data['js_script'] = 'appointments_module/js_script';\n $data['get_apppointment_details'] = $get_apppointment_details;\n $data['current_module'] = $this->current_module;\n $data['page_variables'] = $page_variables;\n parent::fronttemplate($data);\n /* Template Description Ends */\n }",
"function index($media_id)\n {\n //\n // $countryNow = $this->getCity($_SERVER['REMOTE_ADDR'])->country;\n // $provinceNow = $this->getCity($_SERVER['REMOTE_ADDR'])->province;\n // $cityNow = $this->getCity($_SERVER['REMOTE_ADDR'])->city;\n // echo $_SERVER['REMOTE_ADDR'];\n // echo $self_medias_country.$provinceNow.$cityNow;\n // die();\n //\n //\n // //1.the city column is empty and the province column is filled means to check the province\n //\n // $self_medias_province = SelfMedia::leftJoin('user','self_media.user_id','=','user.user_id')\n // ->where('media_id',$media_id)\n // ->where('user_balance','>',2)\n // ->where('media_city','')\n // ->where('media_province','!=','')\n // ->where('media_province','like','%'.$provinceNow.'%')\n // ->get();\n //\n // // dd($self_medias_province);\n // //2.the city column is filled and the province column is filled means the media is tobe checked iwth city and province\n // $self_medias_city = SelfMedia::leftJoin('user','self_media.user_id','=','user.user_id')\n // ->where('media_id',$media_id)\n // ->where('user_balance','>',2)\n // ->where('media_city','!=','')\n // ->where('media_province','!=','')\n // ->where('media_province','like','%'.$provinceNow.'%')\n // ->where('media_city','like','%'.$cityNow.'%')\n // ->get();\n //\n // //3.the city column is empty and the province column is empty too means the media is for the whole country to view\n // $self_medias_country = SelfMedia::leftJoin('user','self_media.user_id','=','user.user_id')\n // ->where('media_id',$media_id)\n // ->where('user_balance','>',2)\n // ->where('media_city','')\n // ->where('media_province','')->get();\n //\n //\n //\n // if($self_medias_province->isEmpty() && $self_medias_city->isEmpty() && $self_medias_country->isEmpty()){\n // return view('home.return_main')\n // ->with('content','本条信息无效 请继续分享其他信息!');\n // }\n\n //get content of the media info use parameter $media_id\n $content = SelfMedia::where('media_id', $media_id)->first()->content;\n $wechat = new WechatController;\n $wechat = $wechat->shareData();\n\n return view('social.share')\n // ->with('status',$status)\n ->with('wechat', $wechat)\n ->with('content', $content)\n ->with('media_id', $media_id);\n\n }",
"protected function getListQuery()\n\t{\n\t\t// Get the event ID\n\t\t$params = JFactory::getApplication()->getPageParameters('com_conference');\n\t\t$eventId = $params->get('eventid', 0);\n\n\t\t$db = $this->getDbo();\n\n\t\t// Get the parent query\n\t\t$query = $db->getQuery(true)\n\t\t\t->from($db->quoteName('#__conference_sessions', 'sessions'))\n\t\t\t->select(\n\t\t\t\t$db->quoteName(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sessions.conference_session_id',\n\t\t\t\t\t\t'sessions.conference_speaker_id',\n\t\t\t\t\t\t'sessions.title',\n\t\t\t\t\t\t'sessions.description',\n\t\t\t\t\t\t'sessions.slug',\n\t\t\t\t\t\t'sessions.slides',\n\t\t\t\t\t\t'sessions.enabled',\n\t\t\t\t\t\t'sessions.ordering',\n\t\t\t\t\t\t'sessions.listview'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t->select(\n\t\t\t\t$db->quoteName(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'levels.title',\n\t\t\t\t\t\t'levels.label',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'level',\n\t\t\t\t\t\t'level_label',\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t->join('LEFT OUTER', $db->quoteName('#__conference_levels', 'levels')\n\t\t\t\t. ' ON ' .\n\t\t\t\t$db->quoteName('levels.conference_level_id') . ' = ' .\n\t\t\t\t$db->quoteName('sessions.conference_level_id')\n\t\t\t)\n\t\t\t->join('LEFT OUTER', $db->quoteName('#__conference_slots', 'slots')\n\t\t\t\t. ' ON ' .\n\t\t\t\t$db->quoteName('slots.conference_slot_id') . ' = ' .\n\t\t\t\t$db->quoteName('sessions.conference_slot_id')\n\t\t\t)\n\t\t\t->join('LEFT OUTER', $db->quoteName('#__conference_days', 'days')\n\t\t\t\t. ' ON ' .\n\t\t\t\t$db->quoteName('days.conference_day_id') . ' = ' .\n\t\t\t\t$db->quoteName('slots.conference_day_id')\n\t\t\t)\n\t\t\t->join('LEFT OUTER', $db->quoteName('#__conference_events', 'events')\n\t\t\t\t. ' ON ' .\n\t\t\t\t$db->quoteName('events.conference_event_id') . ' = ' .\n\t\t\t\t$db->quoteName('days.conference_event_id')\n\t\t\t)\n\t\t\t->where($db->quoteName('events.conference_event_id') . ' = ' . (int) $eventId)\n\t\t\t->where($db->quoteName('sessions.conference_speaker_id') . \" != ''\")\n\t\t\t->where($db->quoteName('sessions.enabled') . ' = 1');\n\n\t\t// Add the list ordering clause.\n\t\t$query->order(\n\t\t\t$db->quoteName(\n\t\t\t\t$db->escape(\n\t\t\t\t\t$this->getState('list.ordering', 'sessions.title')\n\t\t\t\t)\n\t\t\t)\n\t\t\t. ' ' . $db->escape($this->getState('list.direction', 'ASC'))\n\t\t);\n\n\t\treturn $query;\n\t}",
"public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }",
"public function applicants() {\n\t\t// Utility variables\n\t\t$db = Helium::db();\n\t\t$app = 'Applicant'; // change to BetterApplicant for optimization\n\n\t\t// Here's how this works:\n\t\t// 1. Read filter from query string\n\t\t// If there is no filter, apply default filter\n\t\t// 2. Display applicants based on params[view]\n\t\t// view=stats or view=list\n\t\t// If there is no view param, apply default view.\n\n\t\t// Filtering\n\t\t// Final product: $constraints\n\n\t\t// Filter by chapter\n\t\t// This can only be used by national admin\n\t\tif ($this->user->capable_of('national_admin')) {\n\t\t\tif ($this->params['chapter_id'] && $this->params['chapter_id'] != 1) {\n\t\t\t\t$constraints[] = 'chapter_id=' . $this->params['chapter_id'];\n\t\t\t\t$chapter = Chapter::find($this->params['chapter_id']);\n\t\t\t}\n\t\t}\n\t\t// Otherwise, only list applicants from user's chapter\n\t\telse {\n\t\t\t$constraints[] = 'chapter_id=' . $this->user->chapter_id;\n\t\t\t$chapter = $this->user->chapter;\n\t\t}\n\n\t\t// Filter by stage\n\t\t$current_stage = $this->params['stage'] ? $this->params['stage'] : 'active';\n\t\tswitch ($current_stage) {\n\t\t\tcase 'incomplete':\n\t\t\t\t$constraints[] = 'confirmed=0 AND finalized=0 AND expires_on > NOW()';\n\t\t\t\tbreak;\n\t\t\tcase 'expired':\n\t\t\t\t$constraints[] = 'confirmed=0 AND finalized=0 AND expires_on < NOW()';\n\t\t\t\tbreak;\n\t\t\tcase 'confirmed':\n\t\t\t\t$constraints[] = 'confirmed=1';\n\t\t\t\tbreak;\n\t\t\tcase 'finalized':\n\t\t\t\t$constraints[] = 'finalized=1';\n\t\t\t\tbreak;\n\t\t\tcase 'not_yet_confirmed':\n\t\t\t\t$constraints[] = 'expires_on <= NOW() AND confirmed=0 AND finalized=1';\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\tcase 'selection_1':\n\t\t\t\t$constraints[] = 'expires_on > NOW() OR finalized=1';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Specific filters -- through a custom search query\n\t\t$filter = $this->params['filter'];\n\t\tif (is_array($filter)) {\n\t\t\t$current_stage = 'search';\n\t\t\t$search_title = array();\n\n\t\t\t// Filter by school\n\t\t\tif ($filter['school_name']) {\n\t\t\t\t$constraints[] = \"sanitized_high_school_name='\" . $filter['school_name'] . \"'\";\n\t\t\t\t$search_title[] = $filter['school_name'];\n\t\t\t\tunset($filter['school_name']);\n\t\t\t}\n\n\t\t\t// Filter by name\n\t\t\tif ($filter['name']) {\n\t\t\t\t$constraints[] = $db->prepare(\"`sanitized_full_name` LIKE '%%%s%%'\", str_replace(' ', '%', $this->params['name']));\n\t\t\t\t$search_title = $filter['name'];\n\t\t\t\tunset($filter['name']);\n\t\t\t}\n\n\t\t\t// For other filters, merge them into constraints\n\t\t\tforeach ($filter as $k => $v) {\n\t\t\t\t$constraints[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\t// View selection\n\t\t$view = $this->params['view'];\n\t\t$acceptable_views = array('list', 'stats');\n\t\tif (!$view && !in_array($view, $acceptable_views)) {\n\t\t\t$view = 'list';\n\t\t}\n\n\t\tswitch ($view) {\n\t\t\tcase 'list':\n\t\t\t\t// List-specific magic here: pagination, etc.\n\t\t\t\t$applicants = $app::find('chapter_id=5');\n\t\t\t\tforeach ($constraints as $constraint) {\n\t\t\t\t\t$applicants->narrow('(' . $constraint . ')');\n\t\t\t\t}\n\t\t\t\t// -- Pagination --\n\t\t\t\t$batch_length = 100;\n\t\t\t\t$applicants->set_batch_length($batch_length);\n\t\t\t\tif (!$this->params['page'])\n\t\t\t\t\t$this->params['page'] = 1;\n\t\t\t\t$page = $this->params['page'];\n\t\t\t\t$count_all = $applicants->count_all();\n\t\t\t\t$applicants->set_batch_number($page);\n\t\t\t\t$first = (($page - 1) * $batch_length) + 1;\n\t\t\t\t$last = ($first + $batch_length - 1) > $count_all ? $count_all : ($first + $batch_length - 1);\n\n\t\t\t\t// Applicants is now ready for listing.\n\t\t\t\t$this['applicants'] = $applicants;\n\t\t\t\t$this['chapter'] = $chapter;\n\t\t\t\t$this['total_pages'] = $applicants->get_number_of_batches();\n\t\t\t\t$this['current_page'] = $page;\n\t\t\t\t$this['first'] = $first;\n\t\t\t\t$this['last'] = $last;\n\t\t\t\t$this['count_all'] = $count_all;\n\t\t\t\t$this['search_title'] = $search_title;\n\t\t\t\t$this['current_stage'] = $this->params['stage'];\n\t\t\t\tbreak;\n\t\t\tcase 'stats':\n\t\t\t\t$stats = array(\n\t\t\t\t\t'sex' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'sex',\n\t\t\t\t\t\t'partition' => 'applicant_personal_details',\n\t\t\t\t\t),\n\t\t\t\t\t'school' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'sanitized_high_school_name',\n\t\t\t\t\t\t'partition' => 'applicant_personal_details',\n\t\t\t\t\t),\n\t\t\t\t\t'chapter' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'chapter_id',\n\t\t\t\t\t\t'base_query' => \"SELECT COUNT(*) AS rows, %s AS chapter_id, chapter_name AS value FROM applicants INNER JOIN chapters %s ON chapter_id=chapters.id WHERE %s AND (applicants.expires_on > NOW() or applicants.finalized=1) GROUP BY %s ORDER BY rows DESC\",\n\t\t\t\t\t),\n\t\t\t\t\t'province' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => 'applicant_address_province',\n\t\t\t\t\t\t'partition' => 'applicant_contact_info',\n\t\t\t\t\t),\n\t\t\t\t\t'city' => array(\n\t\t\t\t\t\t'type' => 'pie',\n\t\t\t\t\t\t'field' => \"CONCAT(applicant_address_city, ', ', applicant_address_province)\",\n\t\t\t\t\t\t'partition' => 'applicant_contact_info',\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tif ($constraints)\n\t\t\t\t\t$constraint_string = implode(' AND ', $constraints);\n\t\t\t\telse\n\t\t\t\t\t$constraint_string = '1';\n\t\t\t\t\n\t\t\t\tforeach ($stats as $key => $group) {\n\t\t\t\t\tunset($type, $field, $partition, $base_query, $join_string);\n\t\t\t\t\textract($group);\n\t\t\t\t\tif (!$base_query)\n\t\t\t\t\t\t$base_query = \"SELECT COUNT(*) AS rows, %s AS value FROM applicants %s WHERE %s AND (applicants.expires_on > NOW() or applicants.finalized=1) GROUP BY %s ORDER BY rows DESC\";\n\n\t\t\t\t\tif ($partition)\n\t\t\t\t\t\t$join_string = $db->prepare(\"INNER JOIN `%s` ON `%s`.applicant_id = applicants.id\", $partition, $partition);\n\n\t\t\t\t\t$the_query = sprintf($base_query, $field, $join_string, $constraint_string, $field);\n\t\t\t\t\t$results = $db->get_results($the_query);\n\t\t\t\t\t\n\t\t\t\t\t$series = array();\n\t\t\t\t\t$total = 0;\n\t\t\t\t\tif (is_array($results)) {\n\t\t\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\t\t\t$rows = $row->rows;\n\t\t\t\t\t\t\t$value = $row->value;\n\t\t\t\t\t\t\t$value = trim($value); // perhaps more trimming could be in order\n\n\t\t\t\t\t\t\tif ($series[$value])\n\t\t\t\t\t\t\t\t$series[$value] += $rows;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$series[$value] = $rows;\n\n\t\t\t\t\t\t\t$total += $rows;\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$stats[$key]['data'] = compact('series', 'total');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// country preferences - special stats\n\t\t\t\t/*\n\t\t\t\t$countries = $db->get_col(\"SELECT country_preference_1, COUNT(*) AS rows FROM applicant_program_choices WHERE country_preference_1 IS NOT NULL AND country_preference_1 != '' GROUP BY country_preference_1 ORDER BY rows DESC\");\n\t\t\t\t$country_stats = array();\n\t\t\t\tforeach ($countries as $country) {\n\t\t\t\t\t$numbers = array();\n\t\t\t\t\tfor ($i = 1; $i <= 10; $i++) {\n\t\t\t\t\t\t$cq = \"SELECT COUNT(*) FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE country_preference_$i='$country' AND $constraint_string\";\n\t\t\t\t\t\t$numbers[$i] = $db->get_var($cq);\n\t\t\t\t\t}\n\t\t\t\t\t$country_stats[$country] = $numbers;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$total_afs = $db->get_var(\"SELECT COUNT(*) FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE program_afs='1' AND $constraint_string\");\n\t\t\t\t\n\t\t\t\t// other countries - special stats\n\t\t\t\t$other_countries = $db->get_col(\"SELECT country_preference_other FROM applicant_program_choices INNER JOIN applicants ON applicants.id=applicant_program_choices.applicant_id WHERE country_preference_other != 'N/A' AND country_preference_other != 'NA' AND $constraint_string\");\n\t\t\t\t$split_pattern = \"/[,;\\/&]+|\\s+(dan|and)\\s+/i\";\n\t\t\t\t\n\t\t\t\t$country_cases = array();\n\t\t\t\t$other_countries_series = array();\n\t\t\t\t$other_countries_total = 0;\n\t\t\t\t\n\t\t\t\t$country_normalization_patterns = array(\n\t\t\t\t\t'/london|inggris|britania raya|england|uk/i' => 'United Kingdom',\n\t\t\t\t\t'/\\s+\\(.*\\)/' => '',\n\t\t\t\t\t'/korea( selatan)?|south korea/i' => 'South Korea',\n\t\t\t\t\t'/kanada/i' => 'Canada',\n\t\t\t\t\t'/singapura/i' => 'Singapore',\n\t\t\t\t\t'/spanyol/i' => 'Spain',\n\t\t\t\t\t'/^arab( saudi)?$/i' => 'Saudi Arabia',\n\t\t\t\t\t'/turki/i' => 'Turkey',\n\t\t\t\t\t'/rusia/i' => 'Russia',\n\t\t\t\t\t'/^(republik rakyat )?ch?ina$|^rrc$/i' => \"China, People's Republic of\",\n\t\t\t\t\t'/selandia baru|nz/i' => 'New Zealand'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tforeach ($other_countries as $list_of_countries) {\n\t\t\t\t\t$split_countries = preg_split($split_pattern, $list_of_countries);\n\t\t\t\t\tforeach ($split_countries as $country_name) {\n\t\t\t\t\t\t$country_name = trim($country_name, ' -');\n\t\t\t\t\t\tif (!$country_name)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t$country_name = preg_replace(array_keys($country_normalization_patterns), array_values($country_normalization_patterns), $country_name);\n\n\t\t\t\t\t\t$lowercased = strtolower($country_name);\n\t\t\t\t\t\tif ($proper_case = $country_cases[$lowercased]) {\n\t\t\t\t\t\t\t$other_countries_series[$proper_case]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$country_cases[$lowercased]\t= $country_name;\n\t\t\t\t\t\t\t$other_countries_series[$country_name] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$other_countries_total++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$stats['other_countries'] = array(\n\t\t\t\t\t'type' => 'bar',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'series' => $other_countries_series,\n\t\t\t\t\t\t'total' => $total_afs\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$this['stats'] = $stats;\n\t\t\t\t$this['country_stats'] = $country_stats;\n\t\t\t\t$this['total_afs'] = $total_afs;\n\t\t\t\t$this['chapter'] = $chapter;\n\t\t\t\t$this['search_title'] = $search_title;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this['current_stage'] = $current_stage;\n\t\t$this['view'] = $view;\n\t\t$this['search_title'] = $search_title ? implode(', ', $search_title) : '';\n\t}",
"public function addAvailableScheduleFilter()\n {\n $this->addIsActiveFilter();\n $now = (new \\DateTime('now', new \\DateTimeZone('UTC')))\n ->format(\\Magento\\Framework\\Stdlib\\DateTime::DATETIME_PHP_FORMAT);\n $this->getSelect()\n ->where(\"('$now' <= main_table.active_to OR isnull(main_table.active_to))\");\n\n return $this;\n }",
"public function addCurrentFilter()\n {\n $this->addIsActiveFilter();\n $now = (new \\DateTime('now', new \\DateTimeZone('UTC')))\n ->format(\\Magento\\Framework\\Stdlib\\DateTime::DATETIME_PHP_FORMAT);\n $this->getSelect()\n ->where(\n \"(main_table.active_from <= '$now' OR isnull(main_table.active_from)) AND \" .\n \" ('$now' <= main_table.active_to OR isnull(main_table.active_to))\");\n\n return $this;\n }",
"public function get(){\n try{\n $query = \"SELECT * FROM conferences\";\n $pdo = $this->db->prepare($query);\n $pdo->execute();\n\n return $pdo->fetchAll();\n\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }",
"public function initialize()\n {\n \t$this->belongsTo('id_verificacion', 'CobVerificacion', 'id_verificacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actadocumentacion', 'CobActadocumentacionDatos', 'id_actadocumentacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('estado', 'IbcReferencia', 'id_referencia', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->hasMany('id_actadocumentacion', 'CobActadocumentacionPersona', 'id_actadocumentacion', array(\n \t\t\t'foreignKey' => array(\n \t\t\t\t\t'message' => 'El acta no puede ser eliminada porque existen beneficiarios asociados a ésta'\n \t\t\t)\n \t));\n }",
"public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }",
"public function channel()\n {\n return $this->belongsTo(Channel::class)->withoutGlobalScopes(['active']);\n }",
"public function index()\n {\n return $this->response->view($this->getViewName('index'), [\n 'data' => $this->repository->findByConference($this->getConference()->id)->paginate(25)\n ]);\n }",
"public function beforeFilter() {\n $sessionstaff = $this->Session->read('staff');\n //set next free card number for default search\n $getfreecard = $this->Api->get_freecardDetails($sessionstaff['clinic_id']);\n $this->set('FreeCardDetails', $getfreecard);\n $getallnotifications = $this->ClinicNotification->getNotification($sessionstaff['clinic_id']);\n $this->Session->write('staff.AllNotifications', $getallnotifications);\n $trainingvideo = $this->TrainingVideo->find('all');\n //fetch all training video and set it to session to show at top of the page\n $this->Session->write('staff.trainingvideo', $trainingvideo);\n if (isset($sessionstaff['clinic_id'])) {\n $options3['conditions'] = array('Clinic.id' => $sessionstaff['clinic_id']);\n $options3['fields'] = array('Clinic.analytic_code', 'Clinic.log_time', 'Clinic.lead_log', 'Clinic.id');\n $ClientCredentials = $this->Clinic->find('first', $options3);\n \n if (isset($ClientCredentials)) {\n $staffaceess = $this->Api->accessstaff($sessionstaff['clinic_id']);\n $this->Session->write('staff.staffaccess', $staffaceess);\n //store analytic code to session\n $this->Session->write('staff.analytic_code', $ClientCredentials['Clinic']['analytic_code']);\n\n }\n }\n if (empty($sessionstaff['var']) && $this->params['action'] != 'login') {\n\n return $this->redirect('/staff/login/');\n }\n\n $this->layout = $this->layout;\n }",
"public function beforeFilter() {\n $sessionstaff = $this->Session->read('staff');\n //set next free card number for default search\n $getfreecard = $this->Api->get_freecardDetails($sessionstaff['clinic_id']);\n $this->set('FreeCardDetails', $getfreecard);\n $getallnotifications = $this->ClinicNotification->getNotification($sessionstaff['clinic_id']);\n $this->Session->write('staff.AllNotifications', $getallnotifications);\n $trainingvideo = $this->TrainingVideo->find('all');\n //fetch all training video and set it to session to show at top of the page\n $this->Session->write('staff.trainingvideo', $trainingvideo);\n if (isset($sessionstaff['clinic_id'])) {\n $options3['conditions'] = array('Clinic.id' => $sessionstaff['clinic_id']);\n $options3['fields'] = array('Clinic.analytic_code', 'Clinic.log_time', 'Clinic.lead_log', 'Clinic.id');\n $ClientCredentials = $this->Clinic->find('first', $options3);\n\n if (isset($ClientCredentials)) {\n $staffaceess = $this->Api->accessstaff($sessionstaff['clinic_id']);\n $this->Session->write('staff.staffaccess', $staffaceess);\n //store analytic code to session\n $this->Session->write('staff.analytic_code', $ClientCredentials['Clinic']['analytic_code']);\n \n }\n }\n if (empty($sessionstaff['var']) && $this->params['action'] != 'login') {\n\n return $this->redirect('/staff/login/');\n }\n\n $this->layout = $this->layout;\n }",
"public function onlyOnDetail()\n {\n parent::onlyOnDetail();\n\n $this->showOnIndex = false;\n $this->showOnDetail = true;\n $this->showOnCreation = false;\n $this->showOnUpdate = false;\n $this->showOnReplicate = false;\n $this->showOnAttach = false;\n $this->showOnLens = false;\n $this->showOnDashboard = false;\n\n return $this;\n }",
"function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}",
"public function find(Request $request)\n {\n //\n // General for all pages\n $GeneralWebmasterSections = WebmasterSection::where('status', '=', '1')->orderby('row_no', 'asc')->get();\n // General END\n\n $active_tab = 0;\n if ($request->q != \"\") {\n if (@Auth::user()->permissionsGroup->view_status) {\n\n\n //find Webmails\n $Webmails = Webmail::where('created_by', '=', Auth::user()->id)->where('title', 'like',\n '%' . $request->q . '%')\n ->orwhere('from_name', 'like', '%' . $request->q . '%')\n ->orwhere('from_email', 'like', '%' . $request->q . '%')\n ->orwhere('from_phone', 'like', '%' . $request->q . '%')\n ->orwhere('to_email', 'like', '%' . $request->q . '%')\n ->orwhere('to_name', 'like', '%' . $request->q . '%')\n ->orderby('id', 'desc')->get();\n\n //find Events\n $Events = Event::where('created_by', '=', Auth::user()->id)->where('title', 'like',\n '%' . $request->q . '%')\n ->orwhere('details', 'like', '%' . $request->q . '%')\n ->orderby('start_date', 'desc')->get();\n\n\n //find Sections\n $Sections = Section::where('created_by', '=', Auth::user()->id)->where('title_ar', 'like',\n '%' . $request->q . '%')\n ->orwhere('title_en', 'like', '%' . $request->q . '%')\n ->orwhere('seo_title_ar', 'like', '%' . $request->q . '%')\n ->orwhere('seo_title_en', 'like', '%' . $request->q . '%')\n ->orderby('id', 'desc')->get();\n } else {\n\n\n //find Webmails\n $Webmails = Webmail::where('title', 'like', '%' . $request->q . '%')\n ->orwhere('from_name', 'like', '%' . $request->q . '%')\n ->orwhere('from_email', 'like', '%' . $request->q . '%')\n ->orwhere('from_phone', 'like', '%' . $request->q . '%')\n ->orwhere('to_email', 'like', '%' . $request->q . '%')\n ->orwhere('to_name', 'like', '%' . $request->q . '%')\n ->orderby('id', 'desc')->get();\n\n //find Events\n $Events = Event::where('title', 'like', '%' . $request->q . '%')\n ->orwhere('details', 'like', '%' . $request->q . '%')\n ->orderby('start_date', 'desc')->get();\n\n\n\n //find Sections\n $Sections = Section::where('title_ar', 'like', '%' . $request->q . '%')\n ->orwhere('title_en', 'like', '%' . $request->q . '%')\n ->orwhere('seo_title_ar', 'like', '%' . $request->q . '%')\n ->orwhere('seo_title_en', 'like', '%' . $request->q . '%')\n ->orderby('id', 'desc')->get();\n\n }\n if (count($Webmails) > 0) {\n $active_tab = 5;\n }\n if (count($Events) > 0) {\n $active_tab = 4;\n }\n\n if (count($Sections) > 0) {\n $active_tab = 2;\n }\n\n\n } else {\n return redirect()->action('HomeController@search');\n }\n $search_word = $request->q;\n\n return view(\"backEnd.search\",\n compact(\"GeneralWebmasterSections\", \"search_word\", \"Webmails\", \"Contacts\", \"Events\", \"Sections\",\n \"active_tab\"));\n }",
"public function onBeforePublish() {\n if (false == $this->owner->ShowInSearch)\n {\n if ($this->owner->isPublished())\n {\n $liveRecord = \\Versioned::get_by_stage(get_class($this->owner), 'Live')->byID($this->owner->ID);\n if ($liveRecord->ShowInSearch != $this->owner->ShowInSearch)\n {\n $this->doDeleteDocument();\n }\n }\n }\n }",
"public function get_consents(){\n $pagination = create_pagination();\n $consents = Consent::select(\n DB::raw('SQL_CALC_FOUND_ROWS consent.consent_id'),\n 'consent.title',\n 'consent.content',\n 'consent.created_at'\n )\n ->where('consent.franchise_id', $this->franchise_id)\n ->where('consent.club_id', $this->club_id)\n ->where(function($query){\n //allow filter by team name\n if( isset($this->request['name']) && !empty($this->request['name']) ) {\n $query->where('consent.title', 'like', '%' . $this->request['name'] . '%');\n }\n return $query;\n })\n ->limit($pagination['per_page'])\n ->offset($pagination['offset']);\n\n //if auth user is guardian load only the consents assigned to him/her\n if( Auth::user()->hasRole('guardian') ){\n $consents->select(\n DB::raw('SQL_CALC_FOUND_ROWS consent.consent_id'),\n 'consent.title',\n 'consent.content',\n 'consent.created_at',\n 'rel_consent_user.agreed_at'\n )\n ->leftJoin('rel_consent_user', 'rel_consent_user.consent_id', '=', 'consent.consent_id')\n ->where('rel_consent_user.user_id', $this->user_id);\n }\n\n $consents = $consents->get();\n //count the results so we can use them in pagination\n $requestsCount = DB::select( DB::raw(\"SELECT FOUND_ROWS() AS count;\") );\n $count = reset($requestsCount)->count;\n\n //for admin load the guardians that the consent was assigned to\n if( Auth::user()->hasRole('admin') ){\n $consents->load('guardians');\n }\n\n return format_response($consents, $count);\n }",
"public function prepareSearch() {\n $this->User->unbindModel(array(\n 'hasOne' => array(\n 'UserInfo'\n ),\n 'hasMany' => array(\n 'ClipQuestion',\n 'Notification',\n 'QuestionComment',\n 'Question',\n 'Reply',\n 'ReplyComment',\n 'ReplyRequest',\n 'UserTag',\n 'Vote',\n 'Follow',\n 'Follower'\n )\n ));\n $this->QuestionComment = ClassRegistry::init('QuestionComment');\n $this->QuestionPvCount = ClassRegistry::init('QuestionPvCount');\n $this->ClipQuestion = ClassRegistry::init('ClipQuestion');\n $this->QuestionTag = ClassRegistry::init('QuestionTag');\n $this->ReplyRequest = ClassRegistry::init('ReplyRequest');\n $this->QuestionComment->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->QuestionPvCount->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->ClipQuestion->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->QuestionTag->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->Reply->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->ReplyRequest->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->Vote->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n/*\n $this->User->cacheQueries = true;\n $this->QuestionComment->cacheQueries = true;\n $this->QuestionPvCount->cacheQueries = true;\n $this->ClipQuestion->cacheQueries = true;\n $this->QuestionTag->cacheQueries = true;\n $this->Reply->cacheQueries = true;\n $this->ReplyRequest->cacheQueries = true;\n $this->Vote->cacheQueries = true;\n*/\n\n $this->recursive = 2;\n $this->cacheQueries = true;\n/*\n $this->unbindModel(array(\n 'hasMany' => array(\n 'ReplyRequest'\n )\n ));\n*/\n }",
"public function searchAtTenancy() {\n $criteria = new CDbCriteria;\n $criteria->compare('t.id', $this->id, true);\n $criteria->compare('t.transaction_id', $this->transaction_id, true);\n $criteria->compare('t.user_id', $this->user_id, true);\n $criteria->compare('t.schedule_date', $this->schedule_date, true);\n $criteria->compare('t.schedule_time', $this->schedule_time, true);\n $criteria->compare('t.status', $this->status);\n $criteria->compare('t.upload_service_documents', $this->upload_service_documents, true);\n $criteria->compare('t.created_date', $this->created_date, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => 8,\n ),\n ));\n }",
"public function show()\n {\n\n $args = array('burn_project_id'=>null,'type'=>null,'user_id'=>$_SESSION['user']['id'],'agency_id'=>$_SESSION['user']['agency_id']);\n extract(merge_args(func_get_args(), $args));\n\n $permissions = checkFunctionPermissionsAll($_SESSION['user']['id'], array('user','user_district','user_agency','admin'));\n if ($permissions['deny']) {\n echo $permissions['message'];\n //exit;\n }\n\n $user = new \\Info\\User($this->db);\n $agency = $user->getUserAgency($_SESSION['user']['id'], 'sql');\n $districts = $user->getUserDistricts($_SESSION['user']['id'], 'sql');\n\n if (isset($burn_project_id)) {\n $cond = \"WHERE b.burn_project_id = $burn_project_id\";\n }\n\n if ($permissions['write']['admin']) {\n // No agency requirement for admin.\n $pre_cond = \"\";\n } else {\n $pre_cond = \"WHERE b.agency_id \".$agency;\n }\n\n if ($type == 'edit') {\n if ($permissions['write']['admin']) {\n $cond = \"\";\n } elseif ($permissions['write']['user_agency']) {\n $cond = \"AND b.agency_id \".$agency;\n } elseif ($permissions['write']['user_district']) {\n $cond = \"AND b.district_id \".$districts;\n } elseif ($permissions['write']['user']) {\n $cond = \"AND b.added_by = $user_id\n AND b.district_id \".$districts;\n }\n } elseif ($type == 'view') {\n if ($permissions['read']['user_agency']) {\n $cond = \"AND b.agency_id \".$agency;\n } elseif ($permissions['read']['user'] || $permissions['read']['user_district']) {\n $cond = \"AND b.added_by != $user_id\n AND b.district_id \".$districts;\n }\n }\n\n $new_function = \"Burn.newForm($burn_project_id)\";\n\n $sql = \"SELECT b.burn_id, b.start_date as \\\"Start Date\\\", b.end_date as \\\"End Date\\\",\n a.agency as \\\"Agency\\\", CONCAT('<a href=\\\"project.php?detail=true&id=', b.burn_project_id ,'\\\">', bp.project_name, '</a>') as \\\"Burn Project Name\\\",\n b.manager_name as \\\"Manager\\\", b.manager_number as \\\"Manager Number\\\",\n CONCAT('<span class=\\\"', s.class ,'\\\" onclick=\\\"Burn.submitForm(', b.burn_id, ')\\\">', s.name ,'</span>') as \\\"Form Status\\\",\n COALESCE(CONCAT('<span class=\\\"', c.class ,'\\\" data-toggle=\\\"tooltip\\\" title=\\\"Click to Check\\\" onclick=\\\"Burn.validate(', b.burn_id , ')\\\">', c.name ,'</span>'),'<span class=\\\"label label-default\\\">N/A</span>') as \\\"Form Completeness\\\",\n CONCAT('<span class=\\\"label label-default\\\">', u.full_name, '</span>') as \\\"Added By\\\"\n FROM burns b\n JOIN pre_burns pb ON(b.pre_burn_id = pb.pre_burn_id)\n JOIN burn_projects bp ON(b.burn_project_id = bp.burn_project_id)\n JOIN agencies a ON (b.agency_id = a.agency_id)\n LEFT JOIN burn_statuses s ON (b.status_id = s.status_id)\n LEFT JOIN burn_completeness c ON(b.completeness_id = c.completeness_id)\n JOIN users u ON (b.added_by = u.user_id)\n $pre_cond\n $cond\n ORDER BY b.added_on\";\n\n if ($type == 'edit' && $permissions['write']['any']) {\n $table = show(array('sql'=>$sql,'paginate'=>true,'table'=>'burns','pkey'=>'burn_id'\n ,'include_delete'=>true,'delete_function'=>'Burn.deleteConfirmation'\n ,'include_view'=>true,'view_href'=>'?burn=true&id=@@'\n ,'edit_function'=>'Burn.editConfirmation','new_function'=>$new_function\n ,'no_results_message'=>'There are no editable burn requests associated with your user. An approved pre-burn request is required to submit a burn request.'\n ,'no_results_class'=>'info'));\n } elseif ($type == 'view' && $permissions['read']['any']) {\n $table = show(array('sql'=>$sql,'paginate'=>true,'table'=>'burns','pkey'=>'burn_id','include_edit'=>false\n ,'include_delete'=>false\n ,'no_results_message'=>'There are no viewable burn requests associated with your district(s).'\n ,'no_results_class'=>'info'));\n }\n\n $html = $table['html'];\n\n return $html;\n }",
"public function showRecordInSearch()\n {\n return !($this->owner->hasField('ShowInSearch') AND false == $this->owner->ShowInSearch);\n }",
"public function index()\n {\n $datos = [];\n if (Auth::check()) {\n $user = Auth::user();\n if ($user->id_privilege === 4) {\n // $yourPresentations = AssistantPresentation::where('id_assistant', $user->id)->get();\n $yourPresentations = AssistantPresentation::where('id_assistant', $user->id)->paginate(3);\n if($yourPresentations->isEmpty()) {\n $yourPresentations = null;\n }\n }\n if ($user->id_privilege === 3) {\n $yourPresentations = Presentation::where('id_speaker', $user->id)->paginate(3);\n }\n if ($user->id_privilege <= 2) {\n $yourPresentations = null;\n }\n $datos += [\n 'yourPresentations' => $yourPresentations,\n 'userPrivilege' => $user->id_privilege,\n ];\n }\n // $presentations = Presentation::all();\n $presentations = Presentation::paginate(3);\n $speakers = User::where('id_privilege', 3)->paginate(3);\n $datos += [\n 'presentations' => $presentations,\n 'speakers' => $speakers,\n 'yourPresentations' => null,\n 'userPrivilege' => null,\n ];\n return view('index')->with($datos);\n }",
"public function index()\n {\n\n $allCategories = Category::whereHas('events', function($q) {\n $q->where('date_to', '>=', date('Y-m-d H:i:s', time()));\n// $q->where('approved', '=', true);\n })->get();\n\n $categories = $allCategories->take(5);\n\n $districts = District::whereHas('events', function($q) {\n $q->where('date_to', '>=', date('Y-m-d H:i:s', time()));\n// $q->where('approved', '=', true);\n })->get();\n\n\n $categoryId = request()->category;\n\n if($categoryId){\n $events = Event::where('approved','=', 1)\n ->where('date_from','>=',date('Y-m-d H:i:s'))\n ->where('date_to', '>=', date('Y-m-d H:i:s'))\n ->where('category_id',(int)$categoryId)\n ->orderBy('date_from', 'asc');\n }\n else{\n $events = Event::where('approved','=', 1)\n ->where('date_from','>=',date('Y-m-d H:i:s'))\n ->where('date_to', '>=', date('Y-m-d H:i:s'))\n ->orderBy('date_from', 'asc');\n }\n\n// $events->groupBy('title');\n $events->paginate($this->itemsPerPage);\n\n $carouselBanners = Banner::all()->where('location','=', Banner::POSITION_CAROUSEL);\n\n $actionBanner = Banner::all()->where('location', '=', Banner::POSITION_EVENT_LIST);\n\n return view('front.homepage',[\n 'categories' => $categories,\n 'allCategories' => $allCategories,\n 'events' => $events->get()->unique(),\n 'districts' => $districts,\n 'categoryId' => $categoryId,\n 'carouselBanners' => $carouselBanners,\n 'actionBanner' => $actionBanner\n ]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $conferences = $em->getRepository('AppBundle:Conference')->findAll();\n\n return $this->render('conference/index.html.twig', array(\n 'conferences' => $conferences,\n ));\n }",
"public function notHospitalised()\n {\n $this->whereClause .= ' AND status <> ?';\n $this->parameterList[] = RequestStatus::HOSPITAL;\n\n return $this;\n }",
"public function show($resume_id) // full preview\n {\n\n $resume = Resume::where('resumes.id', $resume_id)->first();\n// resume translated language\n $resume_translated_language = $resume->translated_languages_id;\n $show_resume = Resume::where('id', $resume_id)->with([\n 'user',\n 'personalInformation.placeOfBirth',\n 'personalInformation.currentLocation',\n 'summary',\n 'objective',\n 'contactInformation.emails',\n 'contactInformation.contactNumbers', 'contactInformation.internetCommunications.internetCommunicationType', 'contactInformation.personalLinks.socialMedia',\n 'educations.projects',\n 'languages.diplomas',\n 'drivingLicense.categories',\n 'achievements',\n 'work_experiences.company',\n 'hobbiesInterest',\n 'memberships',\n 'projects',\n 'publications',\n 'volunteers',\n 'ConferencesWorkshopSeminar',\n 'Portfolio',\n 'certifications',\n 'trainings',\n// 'reReferences',\n 'skills'\n ])->\n with(array('personalInformation.maritalStatus.maritalStatusTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['marital_status_id', 'name']);\n }))->\n with(array('personalInformation.nationalities.nationalityTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['nationality_id', 'name']);\n }))\n ->with(array('contactInformation.contactNumbers.phoneType.PhoneTypeTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['phone_type_id', 'name']);\n }))->\n with(array('contactInformation.contactNumbers.country.countryTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['country_id', 'name']);\n }))\n ->with(array('languages.internationalLanguage.internationalLanguageTrans' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['international_language_id', 'name']);\n }))\n ->with(array('languages.languageAssessment.selfAssessment.selfAssessmentTrans' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['self_assessment_id', 'name']);\n }))\n ->with(array('languages.languageAssessment.selfAssessment.selfAssessmentTrans' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['self_assessment_id', 'name']);\n }))\n ->with(array('languages' => function ($query) {\n $query->orderBy('order');\n }))\n\n ->with(array('drivingLicense.country.countryTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['country_id', 'name']);\n }))\n ->with(array('educations.major.majorTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['major_id', 'name']);\n }))\n ->with(array('educations.minor.minorTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['minor_id', 'name']);\n }))\n ->with(array('educations.institution.institutionTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['institution_id', 'name']);\n }))\n ->with(array('educations.degreeLevel.degreeLevelTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['degree_level_id', 'name']);\n }))\n ->with(array('educations' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('work_experiences.company_industry.companyIndustryTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['company_industry_id', 'name']);\n }))\n ->with(array('work_experiences.company.company_size.company_size_translation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['company_size_id', 'name']);\n }))\n ->with(array('work_experiences.employment_types.employment_type_parent.empTypeParentTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['employment_type_parent_id', 'name']);\n }))\n ->with(array('work_experiences.employment_types.employment_type_parent.parent_category.empTypeParentTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['employment_type_parent_id', 'name']);\n }))\n ->with(array('work_experiences' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('ConferencesWorkshopSeminar.conferenceType.conferenceTypeTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['conference_type_id', 'name']);\n \n }))\n ->with(array('ConferencesWorkshopSeminar' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('Portfolio' => function ($query) {\n $query->orderBy('order');\n }))\n\n ->with(array('publications' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('projects' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('volunteers' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('memberships' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('achievements' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('certifications.validYear.validYearTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['valid_year_id', 'name']);\n }))\n ->with(array('certifications' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('trainings' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('reReferences.reference_info.country.countryTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['country_id', 'name']);\n }))\n ->with(array('reReferences.reference_info' => function ($query) {\n $query->orderBy('order');\n }))\n ->with(array('skills.skill_type.skillTypeTrans' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['skill_type_id', 'name',]);\n }))\n ->with(array('skills.skill_type.skill_type_parent.skillTypeParentTrans' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['skill_type_parent_id', 'name']);\n }))\n ->with(array('skills.skillLevel.skillLevelTranslation' => function ($query) use ($resume_translated_language) {\n $query->where('translated_languages_id', $resume_translated_language);\n $query->select(['skill_level_id', 'name']);\n }))\n ->with(array('skills' => function ($query) {\n $query->orderBy('order');\n }))\n ->first(['id', 'user_id', 'name', 'translated_languages_id']);\n return $this->showOne($show_resume);\n }"
]
| [
"0.60403347",
"0.55106777",
"0.5411407",
"0.49007103",
"0.48556164",
"0.4836632",
"0.47707105",
"0.4759692",
"0.4738614",
"0.47318187",
"0.47248855",
"0.4714006",
"0.4682797",
"0.46762115",
"0.46659556",
"0.46488267",
"0.46191534",
"0.46166414",
"0.46138078",
"0.46130016",
"0.46123776",
"0.45553544",
"0.45443168",
"0.45315284",
"0.4530086",
"0.45293552",
"0.45291355",
"0.45171303",
"0.45156193",
"0.4513948"
]
| 0.58388996 | 1 |
Add a static Observer object to the class | public static function attachStaticObserver(TA_Model_Observer_Interface $o)
{
array_push(self::$_observers, $o);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function observers();",
"function addObserver(Observer $observer_in) {\n $this->observers[] = $observer_in;\n }",
"public function attach(\\SplObserver $observer) {}",
"public function attach(\\SplObserver $observer) {}",
"public function attach(\\SplObserver $observer) {}",
"public function attach(\\SplObserver $observer) {}",
"public function attach(\\SplObserver $observer) {}",
"public function attach(\\SplObserver $observer) {}",
"public function add($observer){\n $this->observers[] = $observer;\n }",
"public function observe() {}",
"function attach( &$observer)\r\n\t{\r\n\t\tif (is_object($observer))\r\n\t\t{\r\n\t\t\t$class = get_class($observer);\r\n\t\t\tforeach ($this->_observers as $check) {\r\n\t\t\t\tif (is_a($check, $class)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->_observers[] =& $observer;\r\n\t\t} else {\r\n\t\t\t$this->_observers[] =& $observer;\r\n\t\t}\r\n\t}",
"function attach(Observer $observer_in) {\n $this->observers[] = $observer_in;\n }",
"public function registerObserver($observer)\n {\n $this->observers[] = $observer;\n }",
"public function bindObserver($observer)\n\t{\n\t\t$file = dirname(__FILE__) . '/Observer/' . $observer . '.php';\n\t\tif(file_exists($file)){\n\t\t\trequire_once($file);\n\t\t\t$obj = new $observer($this->CI, $this->config);\n\t\t\tif($obj instanceof ObserverInterface){\n\t\t\t\t$this->observers[] = $obj;\n\t\t\t}\n\t\t}\n\t}",
"public function AddObserver(object $objObserver) {\n if(method_exists($objObserver,\"On\")) {\n $this->_arrObservers[] = $objObserver;\n }\n }",
"public function attach( $observer )\r\n {\r\n $this->observers []= $observer;\r\n }",
"function Net_FTP_Observer()\n {\n $this->_id = md5(microtime());\n }",
"public function attach(Observer $observer) {\n $this->observers[] = $observer;\n }",
"function attach(&$observer, $eventIDArray)\n {\n foreach ($eventIDArray as $eventID) {\n $nameHash = md5(get_class($observer) . $eventID);\n base::setStaticObserver($nameHash, array('obs' => &$observer, 'eventID' => $eventID));\n }\n }",
"public function attach(Observer $observer)\n {\n $this->observers[] = $observer;\n }",
"function attach(AbstractObserver $observer)\n {\n $this->observers[] = $observer;\n\n }",
"public function attach(SplObserver $observer){\n $id = spl_object_hash($observer);\n $this->observers[$id] = $observer;\n }",
"public function __construct()\n {\n Hook::listen(__CLASS__);\n }",
"public function init (Observer $obs){\n\t \n\t}",
"public static function staticInit() {\n self::$logger = Logger::getLogger(__CLASS__);\n\n self::$domains = array (\n self::DOMAIN_COMMAND,\n self::DOMAIN_COMMAND_SET,\n self::DOMAIN_SERVICE_CONTRACT,\n );\n self::$categories = array (\n self::CATEGORY_ROADMAP\n );\n }",
"public function addObserver(WorkflowObserverInterface $observer)\n {\n $this->observers[] = $observer;\n }",
"public static function staticConstructor() {\n static::$loggingUtils = new LoggingUtils();\n }",
"function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"private function add_observers( $observers, $subject ) {\n \n if ( is_array( $observers ) ) {\n \n foreach ( $observers as $observer) {\n \n if ( class_exists( $observer ) ) {\n \n $subject->attach( new $observer() );\n \n }\n }\n \n }\n \n }",
"public function attach($observer)\n {\n $observerKey = spl_object_hash($observer);\n $this->observers[$observerKey] = $observer;\n }"
]
| [
"0.6833247",
"0.67054194",
"0.6472937",
"0.6472937",
"0.6472937",
"0.64722073",
"0.64722073",
"0.64722073",
"0.6366079",
"0.619584",
"0.61669123",
"0.61455566",
"0.6084249",
"0.60706794",
"0.5959561",
"0.5883357",
"0.5873043",
"0.57347405",
"0.5712314",
"0.5692079",
"0.56391877",
"0.5552132",
"0.55246127",
"0.55244565",
"0.55224836",
"0.5518854",
"0.5502569",
"0.54798156",
"0.5459714",
"0.54438907"
]
| 0.7133692 | 0 |
verify decision return properties with default DecideOptions | public function verifyDecisionProperties(): void
{
$decision = $this->userContext->decideForKeys(FLAG_KEYS);
$this->printDecisions($decision, "Check that the following decisions' properties are expected");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decide(FLAG_KEY);\n\n $this->printDecision($decision, \"Check that the following decision properties are expected for user $this->userId\");\n }",
"public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decide(FLAG_KEY, $options);\n\n $this->printDecision($decision, 'Modify the OptimizelyDecideOptions and check the decision variables expected');\n }",
"public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decideForKeys(FLAG_KEYS, $options);\n\n $this->printDecisions($decision, \"Modify the OptimizelyDecideOptions and check all the decisions' are as expected\");\n }",
"public function testOptionRequirementsMet()\n {\n $option = new Option('f');\n $option->setNeeds('foo');\n $optionSet = array(\n 'foo' => new Option('foo')\n );\n\n $this->assertTrue($option->hasNeeds($optionSet));\n }",
"public function isOptions(): bool {}",
"public function hasOptions();",
"public function getRequiredOptions();",
"abstract public function getOptions();",
"protected function getOptions() {}",
"protected function getOptions() {}",
"protected function getOptions() {}",
"public function isApplicable();",
"protected function verifyAttributes()\n {\n $formOptions = $this->sortOptions($this->productView->getOptions($this->product)['configurable_options']);\n $fixtureOptions = $this->prepareFixtureOptions();\n $errors = $this->verifyData($fixtureOptions, $formOptions, true, false);\n return empty($errors) ? null : $this->prepareErrors($errors, 'Error configurable options:');\n }",
"public function getDefinedOptions();",
"function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}",
"public function allowProperties() {}",
"abstract function options();",
"protected static abstract function getOptions();",
"public function setOptionsOnDetermination()\n\t{\n\t\treturn false;\n\t}",
"public function testConfigureOptions()\n {\n $multiLanguagesManager = $this->multiLanguagesManager;\n $resolverMock = Phake::mock('Symfony\\Component\\OptionsResolver\\OptionsResolver');\n\n $this->form->configureOptions($resolverMock);\n\n Phake::verify($resolverMock)->setDefaults(array(\n 'embedded' => true,\n 'class' => $this->statusClass,\n 'choice_label' => function ($choice) use ($multiLanguagesManager) {\n return $multiLanguagesManager->choose($choice->getLabels());\n },\n ));\n }",
"public function configureOptions();",
"function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}",
"public function testGetStyleWithExhibitDefaults()\n {\n\n // Create a record.\n $exhibit = $this->_createNeatline();\n\n // Set system styling defaults.\n set_option('vector_color', '#5033de');\n set_option('stroke_color', '#1e2ee6');\n set_option('vector_opacity', 20);\n set_option('stroke_opacity', 70);\n set_option('stroke_width', 4);\n set_option('point_radius', 6);\n\n // Set exhibit defaults.\n $exhibit->default_vector_color = '#ffffff';\n $exhibit->default_stroke_color = '#ffffff';\n $exhibit->default_vector_opacity = 5;\n $exhibit->default_stroke_opacity = 5;\n $exhibit->default_stroke_width = 5;\n $exhibit->default_point_radius = 5;\n\n // Check.\n $this->assertEquals($exhibit->getStyle('vector_color'), '#ffffff');\n $this->assertEquals($exhibit->getStyle('vector_opacity'), 5);\n $this->assertEquals($exhibit->getStyle('stroke_color'), '#ffffff');\n $this->assertEquals($exhibit->getStyle('stroke_opacity'), 5);\n $this->assertEquals($exhibit->getStyle('stroke_width'), 5);\n $this->assertEquals($exhibit->getStyle('point_radius'), 5);\n\n }",
"protected function get_options()\n\t{}",
"public function testCustomOption() {\n // Add the boolean field handler to the test view.\n $view = Views::getView('test_view');\n $view->setDisplay();\n\n $view->displayHandlers->get('default')->overrideOption('fields', [\n 'age' => [\n 'id' => 'age',\n 'table' => 'views_test_data',\n 'field' => 'age',\n 'relationship' => 'none',\n 'plugin_id' => 'boolean',\n ],\n ]);\n $view->save();\n\n $this->executeView($view);\n\n $custom_true = 'Yay';\n $custom_false = 'Nay';\n\n // Set up some custom value mappings for different types.\n $custom_values = [\n 'plain' => [\n 'true' => $custom_true,\n 'false' => $custom_false,\n 'test' => 'assertStringContainsString',\n ],\n 'allowed tag' => [\n 'true' => '<p>' . $custom_true . '</p>',\n 'false' => '<p>' . $custom_false . '</p>',\n 'test' => 'assertStringContainsString',\n ],\n 'disallowed tag' => [\n 'true' => '<script>' . $custom_true . '</script>',\n 'false' => '<script>' . $custom_false . '</script>',\n 'test' => 'assertStringNotContainsString',\n ],\n ];\n\n // Run the same tests on each type.\n foreach ($custom_values as $type => $values) {\n $options = [\n 'options[type]' => 'custom',\n 'options[type_custom_true]' => $values['true'],\n 'options[type_custom_false]' => $values['false'],\n ];\n $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/field/age');\n $this->submitForm($options, 'Apply');\n\n // Save the view.\n $this->drupalGet('admin/structure/views/view/test_view');\n $this->submitForm([], 'Save');\n\n $view = Views::getView('test_view');\n $output = $view->preview();\n $output = \\Drupal::service('renderer')->renderRoot($output);\n $this->{$values['test']}($values['true'], (string) $output, new FormattableMarkup('Expected custom boolean TRUE value %value in output for %type', ['%value' => $values['true'], '%type' => $type]));\n $this->{$values['test']}($values['false'], (string) $output, new FormattableMarkup('Expected custom boolean FALSE value %value in output for %type', ['%value' => $values['false'], '%type' => $type]));\n }\n }",
"public function getOptions() {}",
"public function getOptions() {}",
"public function getOptions() {}",
"function testOptionsTuples(){\n\t\t#mdx:OptionsTuples\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([[1,'Action'],[2,'Drama'],[3,'Sci-fi']]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\n\t}",
"function get_question_options(&$question) {\n global $CFG, $DB;\n if (!$question->options->answers = $DB->get_records_sql(\n \"SELECT a.*, c.tolerance, c.tolerancetype, c.correctanswerlength, c.correctanswerformat \" .\n \"FROM {question_answers} a, \" .\n \" {question_calculated} c \" .\n \"WHERE a.question = ? \" .\n \"AND a.id = c.answer \".\n \"ORDER BY a.id ASC\", array($question->id))) {\n notify('Error: Missing question answer for calculated question ' . $question->id . '!');\n return false;\n }\n\n/*\n if(false === parent::get_question_options($question)) {\n return false;\n }\n\n if (!$options = $DB->get_records('question_calculated', array('question' => $question->id))) {\n notify(\"No options were found for calculated question\n #{$question->id}! Proceeding with defaults.\");\n // $options = new Array();\n $options= new stdClass;\n $options->tolerance = 0.01;\n $options->tolerancetype = 1; // relative\n $options->correctanswerlength = 2;\n $options->correctanswerformat = 1; // decimals\n }\n\n // For historic reasons we also need these fields in the answer objects.\n // This should eventually be removed and related code changed to use\n // the values in $question->options instead.\n foreach ($question->options->answers as $key => $answer) {\n $answer = &$question->options->answers[$key]; // for PHP 4.x\n $answer->calcid = $options->id;\n $answer->tolerance = $options->tolerance;\n $answer->tolerancetype = $options->tolerancetype;\n $answer->correctanswerlength = $options->correctanswerlength;\n $answer->correctanswerformat = $options->correctanswerformat;\n }*/\n\n $virtualqtype = $this->get_virtual_qtype();\n $virtualqtype->get_numerical_units($question);\n\n if( isset($question->export_process)&&$question->export_process){\n $question->options->datasets = $this->get_datasets_for_export($question);\n }\n return true;\n }"
]
| [
"0.6884443",
"0.6582804",
"0.6464693",
"0.6014043",
"0.5980335",
"0.59020895",
"0.5901666",
"0.5810843",
"0.5728704",
"0.5728704",
"0.57277966",
"0.57088506",
"0.56850916",
"0.56738955",
"0.56359315",
"0.5608676",
"0.560469",
"0.5578333",
"0.5542859",
"0.55338025",
"0.54793936",
"0.5478155",
"0.54558945",
"0.54444385",
"0.54443794",
"0.54097927",
"0.54097927",
"0.5409291",
"0.54002005",
"0.53889865"
]
| 0.6825259 | 1 |
test decide w all options: DISABLE_DECISION_EVENT, ENABLED_FLAGS_ONLY, IGNORE_USER_PROFILE_SERVICE, INCLUDE_REASONS, EXCLUDE_VARIABLES (will need to add variables) | public function testWithVariationsOfDecideOptions(): void
{
$options = [
OptimizelyDecideOption::INCLUDE_REASONS,
// OptimizelyDecideOption::DISABLE_DECISION_EVENT,
// OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags
// OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,
// OptimizelyDecideOption::EXCLUDE_VARIABLES,
];
$decision = $this->userContext->decideForKeys(FLAG_KEYS, $options);
$this->printDecisions($decision, "Modify the OptimizelyDecideOptions and check all the decisions' are as expected");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testWithVariationsOfDecideOptions(): void\n {\n $options = [\n OptimizelyDecideOption::INCLUDE_REASONS,\n // OptimizelyDecideOption::DISABLE_DECISION_EVENT,\n // OptimizelyDecideOption::ENABLED_FLAGS_ONLY, // ⬅️ Disable some of your flags\n // OptimizelyDecideOption::IGNORE_USER_PROFILE_SERVICE,\n // OptimizelyDecideOption::EXCLUDE_VARIABLES,\n ];\n\n $decision = $this->userContext->decide(FLAG_KEY, $options);\n\n $this->printDecision($decision, 'Modify the OptimizelyDecideOptions and check the decision variables expected');\n }",
"public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decide(FLAG_KEY);\n\n $this->printDecision($decision, \"Check that the following decision properties are expected for user $this->userId\");\n }",
"public function simulateEnabledMatchSpecificConditionsSucceeds() {}",
"public function simulateEnabledMatchSpecificConditionsSucceeds() {}",
"public function testEnabled(): void\n {\n $agentWithoutEnabling = $this->agentFromConfigArray();\n self::assertFalse($agentWithoutEnabling->enabled());\n\n // but a config that has monitor = true, it is set\n $enabledAgent = $this->agentFromConfigArray([ConfigKey::MONITORING_ENABLED => 'true']);\n self::assertTrue($enabledAgent->enabled());\n }",
"public function simulateEnabledMatchAllConditionsSucceeds() {}",
"public function simulateEnabledMatchAllConditionsSucceeds() {}",
"protected function checkDisableFunctions() {}",
"public function test_filters_automatic_updater_disabled()\n {\n }",
"public function testTroubleshootingModeDisabledNoCookie() {\n\t\t$this->assertFalse( $this->class_instance->is_troubleshooting() );\n\t}",
"function skip() \n{\n\tif ((function_exists(\"zperfmon_enable\") && \n\t\tfunction_exists(\"zperfmon_set_user_param\") &&\n\t\tfunction_exists(\"zperfmon_disable\"))) {\n\t\treturn false; //zperfmon-client has those\n\t} \n\treturn true;\n}",
"public function testDisabled() {\n Data::setOption('safe', 'MarkSafe() > value');\n\n $listener = new PatternLabListener();\n $listener->processSafeData();\n\n $safe = Data::getOption('safe');\n $this->assertSame('MarkSafe() > value', $safe);\n }",
"#[@test]\n public function reasonOnly() {\n $action= $this->parseCommandSetFrom('\n if true { \n vacation \"Out of office\";\n }\n ')->commandAt(0)->commands[0];\n $this->assertClass($action, 'peer.sieve.action.VacationAction');\n $this->assertEquals('Out of office', $action->reason);\n }",
"function before_enable() { }",
"public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decideForKeys(FLAG_KEYS);\n\n $this->printDecisions($decision, \"Check that the following decisions' properties are expected\");\n }",
"public function testBasicFeatures()\n {\n return $this->doTheRealTest(false);\n }",
"function getEnableFieldsToBeIgnored() ;",
"function configurationTestRules(&$deviceInfo, $ruleOverride = false) {\n if (is_string($ruleOverride)) $rules[] = $ruleOverride;\n else $rules = getSettingsValue(SETTING_CATEGORY_CONFIGMGMT, \"rules\",[]);\n\n foreach ($rules as $rule) {\n $rule = strtolower($rule);\n\n $a = explode(\" run \",$rule);\n $rLogic = $a[0];\n $rScript = isset($a[1])?$a[1]:\"not set\";\n //print_r($a);\n\n if ($rScript != \"\") {\n //parse the logic\n $logicPassed = true; //AND comparing this so it must start true\n foreach (explode(\" and \",$rLogic) as $rAnd) {\n $blockPassed = false; //OR comparing this so it must start false\n foreach (explode(\" or \",$rAnd) as $rOr) {\n //test the contains block\n $c = explode(\" contains \", $rOr);\n $c[0] = trim($c[0],' \"\\'');\n $devText = isset($deviceInfo[$c[0]])?strtolower($deviceInfo[$c[0]]):\"\";\n $devSearch = isset($c[1])?trim($c[1],' \"\\''):\"\";\n $test = ($devSearch==\"\")?false:is_numeric(strpos($devText,$devSearch));\n\n //see if we're testing an OR block or an AND block\n if (count($rOr)>0) $blockPassed = $blockPassed || $test; //we have an or statement\n else $blockPassed = $test;\n\n //echo \"[$rOr] = $blockPassed\\ndevText = [$devText]\\ndevSearch = [$devSearch]\";\n }\n $logicPassed = $logicPassed && $blockPassed;\n }\n\n //done testing logic, if we have a winner then lets return it\n if ($logicPassed) return trim($rScript);\n }\n\n }\n\n //no rules were found that matched, return nothing\n return \"\";\n\n}",
"public function testGetUserOptions()\n\t{\n\t}",
"public function testSkipIfTrue(): void\n {\n $this->skipIf(true);\n }",
"public function testconfig_vars()\n\t{\n\t\t$vars = array ('sys_name',\n\t\t\t 'sys_user_reg_restricted',\n\t\t\t 'sys_require_accept_conditions',\n\t\t\t 'sys_project_reg_restricted',\n\t\t\t 'sys_use_private_project',\n\t\t\t 'sys_default_domain',\n\t\t\t 'sys_scm_tarballs_path',\n\t\t\t 'sys_scm_snapshots_path',\n\t\t\t 'sys_theme',\n\t\t\t 'sys_lang',\n\t\t\t 'sys_default_timezone',\n\t\t\t 'sys_default_country_code',\n\t\t\t 'sys_use_scm',\n\t\t\t 'sys_use_tracker',\n\t\t\t 'sys_use_forum',\n\t\t\t 'sys_use_pm',\n\t\t\t 'sys_use_docman',\n\t\t\t 'sys_use_diary',\n\t\t\t 'sys_use_news',\n\t\t\t 'sys_use_mail',\n\t\t\t 'sys_use_survey',\n\t\t\t 'sys_use_frs',\n\t\t\t 'sys_use_project_tags',\n\t\t\t 'sys_use_project_full_list',\n\t\t\t 'sys_use_fti',\n\t\t\t 'sys_use_ftp',\n\t\t\t 'sys_use_trove',\n\t\t\t 'sys_use_snippet',\n\t\t\t 'sys_use_ssl',\n\t\t\t 'sys_use_people',\n\t\t\t 'sys_use_shell',\n\t\t\t 'sys_use_ratings',\n\t\t\t 'sys_use_ftpuploads',\n\t\t\t 'sys_use_manual_uploads',\n\t\t\t 'sys_use_gateways',\n\t\t\t 'sys_use_project_vhost',\n\t\t\t 'sys_use_project_database',\n\t\t\t 'sys_use_project_multimedia',\n\t\t\t 'sys_download_host',\n\t\t\t 'sys_shell_host',\n\t\t\t 'sys_users_host',\n\t\t\t 'sys_lists_host',\n\t\t\t 'sys_scm_host',\n\t\t\t 'sys_forum_return_domain',\n\t\t\t 'sys_chroot',\n\t\t\t 'sys_upload_dir',\n\t\t\t 'sys_ftp_upload_dir',\n\t\t\t 'sys_ftp_upload_host',\n\t\t\t 'sys_apache_user',\n\t\t\t 'sys_apache_group',\n\t\t\t 'sys_require_unique_email',\n\t\t\t 'sys_bcc_all_email_address',\n\t\t\t 'sys_themeroot',\n\t\t\t 'sys_force_login',\n\t\t\t 'sys_custom_path',\n\t\t\t 'sys_plugins_path',\n\t\t\t 'sys_use_jabber',\n\t\t\t 'sys_jabber_user',\n\t\t\t 'sys_jabber_server',\n\t\t\t 'sys_jabber_port',\n\t\t\t 'sys_jabber_pass',\n\t\t\t 'sys_ldap_host',\n\t\t\t 'sys_ldap_port',\n\t\t\t 'sys_ldap_version',\n\t\t\t 'sys_ldap_base_dn',\n\t\t\t 'sys_ldap_bind_dn',\n\t\t\t 'sys_ldap_admin_dn',\n\t\t\t 'sys_ldap_passwd',\n\t\t\t 'sys_news_group',\n\t\t\t 'sys_stats_group',\n\t\t\t 'sys_peer_rating_group',\n\t\t\t 'sys_template_group',\n\t\t\t 'sys_sendmail_path',\n\t\t\t 'sys_path_to_mailman',\n\t\t\t 'sys_path_to_jpgraph',\n\t\t\t 'sys_account_manager_type',\n\t\t\t 'unix_cipher',\n\t\t\t 'homedir_prefix',\n\t\t\t 'groupdir_prefix',\n\t\t\t 'sys_urlroot',\n\t\t\t 'sys_urlprefix',\n\t\t\t 'sys_images_url',\n\t\t\t 'sys_images_secure_url',\n\t\t\t 'sys_admin_email',\n\t\t\t 'sys_session_key',\n\t\t\t 'sys_session_expire',\n\t\t\t 'sys_show_source',\n\t\t\t 'default_trove_cat',\n\t\t\t 'sys_dbhost',\n\t\t\t 'sys_dbport',\n\t\t\t 'sys_dbname',\n\t\t\t 'sys_dbuser',\n\t\t\t 'sys_dbpasswd',\n\t\t\t 'sys_share_path',\n\t\t\t 'sys_var_path',\n\t\t\t 'sys_etc_path',\n\t\t\t) ;\n\n\t\t$pattern = implode ('|', $vars) ;\n\t\t\n\t\t$root = dirname(dirname(dirname(dirname(__FILE__))));\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\$($pattern)\\b(?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$var for var in ($pattern):\");\n\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\\\$GLOBALS\\\\[.?($pattern).?\\\\](?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$GLOBALS['\\$var'] for var in ($pattern):\");\n\t}",
"public function testListTaskVariables()\n {\n }",
"public function getEnableFieldsToBeIgnored() {}",
"protected function addTestOptions()\n {\n foreach (['test' => 'PHPUnit', 'pest' => 'Pest'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }",
"public function executeDisabled()\n {\n }",
"public function isTestMode(): bool;",
"public static function Allow_optin() {\n\t\tupdate_option( 'xlp_is_opted', 'yes', false );\n\n\t\t//try to push data for once\n\t\t$data = self::collect_data();\n\n\t\t//posting data to api\n\t\tXL_API::post_tracking_data( $data );\n\t}",
"public function maybe_add_is_in_visible_test_mode_option() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n if ( get_option( 'laterpay_is_in_visible_test_mode' ) === false ) {\n add_option( 'laterpay_is_in_visible_test_mode', 0 );\n }\n }",
"function validate_plugin_accessibility(){\n\n $final_response=new stdClass();\n if( $GLOBALS['glbstg_plugenabled']==0 or $GLOBALS['glbstg_plugenabled']==\"0\" or $GLOBALS['glbstg_plugenabled']==\"\"){\n\n $final_response->response_notice=\"X5GON plugin is not enabled. Check with admin.\";\n }else{\n $final_response->response_notice=1;\n }\n\n return $final_response;\n }",
"public function isApplicable();"
]
| [
"0.7441389",
"0.54870343",
"0.53214437",
"0.5320809",
"0.5290275",
"0.52787566",
"0.52784187",
"0.5264936",
"0.52579516",
"0.52253395",
"0.521929",
"0.51509714",
"0.5128793",
"0.5097066",
"0.50656307",
"0.5056115",
"0.50507647",
"0.5033698",
"0.4955682",
"0.4951509",
"0.49355277",
"0.49333283",
"0.49322814",
"0.49259776",
"0.4900193",
"0.48940837",
"0.48821816",
"0.48732993",
"0.48655578",
"0.4861184"
]
| 0.70403206 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.