query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
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}", "function messageid($list) {\n\t\t$uid = 0;\n\t\t$mid = array();\n\t\t\n\t\tforeach($list as $line) {\n\t\t\tif(preg_match('#^\\* ([0-9]+) FETCH#', $line)) {\n\t\t\t\t$temp = explode(' ', $line);\n\t\t\t\t$uid = $temp[4];\n\t\t\t}\n\t\t\t\n\t\t\t$temp = strtoupper($line);\n\t\t\t\n\t\t\tif(substr($temp, 0, 12) == 'MESSAGE-ID: ')\n\t\t\t\t$mid[$line] = $uid;\n\t\t}\n\t\t\n\t\treturn $mid;\n\t}", "function wp_parse_id_list($input_list)\n {\n }", "public function GetSubscriptionIDFromName($subscription_name)\n {\n \t$output = mysql_result(mysql_query(\"SELECT subscription_id FROM subscriptions WHERE subscription_name_fr = '\" . $subscription_name . \"' OR subscription_name_en = '\" . $subscription_name . \"'\" ), 0, 0);\n \n \treturn $output;\n }", "function gimme_an_id($slug) {\n\n\t$mytermID = get_term_by( 'name', $slug, 'category' );\n\treturn (int)$mytermID->term_id;\n}", "function get_buzz_id($aliasname) {\n $buzz_page_alias = get_option(\"buzz_page_alias\");\n return $buzz_page_alias[$aliasname];\n}", "private static function getSiteId($site_name)\n {\n // default to luxurylink, siteId=1\n $site_id = 1;\n\n switch ($site_name) {\n case 'luxurylink':\n $site_id = 1;\n break;\n case 'family':\n $site_id = 2;\n break;\n default:\n $site_id = 1;\n }\n\n return $site_id;\n }", "private function sectionIDbyName( $name )\n {\n $sectionID = false;\n $sectionList = eZSection::fetchFilteredList( array( 'name' => $name ), false, false, true );\n if( is_array( $sectionList ) && count( $sectionList ) > 0 )\n {\n $section = $sectionList[0];\n if( is_object( $section ) )\n {\n $sectionID = $section->attribute( 'id' );\n }\n }\n return $sectionID;\n }", "private function getPlaylistId($name)\n {\n try {\n return $this->target->getPlaylistId($name);\n } catch (PlaylistDoesNotExist $e) {\n return $this->target->createPlaylist($name);\n }\n }", "function get_members_id($name_filter = \"\")\n\t{\n\t\tglobal $ibforums;\n\n\t\t//\t\t$name_filter = str_replace( '|', \"&#124;\", $name_filter );\n\t\t$member_string = \"\";\n\n\t\tif ($ibforums->input['exactname'] == 1)\n\t\t{\n\t\t\t$sql_query = \"SELECT id\n\t\t\t\t FROM ibf_members\n\t\t\t\t WHERE lower(name)='\" . $name_filter . \"'\";\n\t\t} else\n\t\t{\n\t\t\t$sql_query = \"SELECT id\n\t\t\t\t FROM ibf_members\n\t\t\t\t WHERE name like '%\" . $name_filter . \"%'\";\n\t\t}\n\n\t\t$stmt = $ibforums->db->query($sql_query);\n\n\t\twhile ($row = $stmt->fetch())\n\t\t{\n\t\t\t$member_string .= \"'\" . $row['id'] . \"',\";\n\t\t}\n\n\t\treturn preg_replace(\"/,$/\", \"\", $member_string);\n\n\t}", "function L_getIdBySlug($page_slug) {\n\t\t\n\t\t$page = get_page_by_path($page_slug);\n\t\t\n\t\tif ($page) {\n\t\t\t\n\t\t\treturn $page->ID;\n\t\t\n\t\t} else {\n\t\t\n\t\t\treturn null;\n\t\t\n\t\t}\n\t\n\t}", "static public function getId( $category_alias = null ) \n {\n $db = YireoHelper::getDBO();\n $query = \"SELECT `id` FROM `#__categories` WHERE `alias`=\".$db->quote($category_alias).\" AND `extension`='com_simplelists' LIMIT 1\";\n $db->setQuery( $query );\n return $db->loadResult();\n }", "function field_name_to_id($name) {\n if (preg_match('/^([^\\[\\]]+)\\[(.*)\\]$/', $name, $matches)) {\n return $matches[1] . '.' . $matches[2];\n } else {\n return $name;\n }\n}", "public function get_listing_id() {\r\n\t\treturn absint( $this->listing_id );\r\n\t}", "function set_list_id($list_id) {\n $this->_subscribers_base_route = $this->_base_route.'subscribers/'.$list_id;\n }", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function getRootListItemID($pm_list_name_or_id=null) {\n\t\tif($pm_list_name_or_id) {\n\t\t\t$vn_list_id = $this->_getListID($pm_list_name_or_id);\n\t\t} else {\n\t\t\t$vn_list_id = $this->getPrimaryKey();\n\t\t}\n\t\tif (!$vn_list_id) { return null; }\n\t\t\n\t\t$t_items = new ca_list_items();\n\t\t$t_items->load(array('list_id' => $vn_list_id, 'parent_id' => null));\n\t\t\n\t\treturn $t_items->getPrimaryKey();\n\t}", "function ss_get_slug( $id ) {\r\n\tif ( $id==null ) $id=$post->ID;\r\n\t$post_data = get_post( $id, ARRAY_A );\r\n\t$slug = $post_data['post_name'];\r\n\treturn $slug;\r\n}", "public function slugStrategy()\n {\n return 'id';\n }", "public function getSlug();", "public function getSlug();", "public function getSlug();", "public function getSlug();", "function entry_id_from_url_title($url_title)\n\t{\n ee()->db->where('url_title', $url_title)->limit(1);\n $entry = ee()->db->get('channel_titles')->row_array(); \n if($entry)\n {\n return $entry['entry_id'];\n }\n return false;\n\t}", "function getMailListID($groupID) {\r\n $sql = $this->db->prepare( \"SELECT mailchimp_list_id FROM GROUPS WHERE groupID=:group_id\" );\r\n $sql->execute(array( 'group_id' => $groupID));\r\n $result = $sql->fetch( PDO::FETCH_ASSOC );\r\n return $result['mailchimp_list_id'];\r\n }", "function cc_get_post_by_name($post_name) {\n\n\tglobal $wpdb;\n\n\t$sql = sprintf(\"\n\t\tSELECT ID FROM wp_posts\n\t\tWHERE post_name = '%s'\n\t\t\",\n\t\t$post_name\n\t);\n\n\t$post_id = (int) $wpdb->get_var($sql);\n\n\tif ( $post_id ) {\n\t\treturn $post_id;\n\t} else {\n\t\treturn false;\n\t}\n\n}", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getId() {\n if($this->items!==false)\n return @current($this->items)->id_str;\n return false;\n }", "public static function get_id_for_name( $name ) {\n\t\t$names = array(\n\t\t\t'wordpress' => WordPress_Module::MODULE_ID,\n\t\t\t'apache' => Apache_Module::MODULE_ID,\n\t\t\t'nginx' => Nginx_Module::MODULE_ID,\n\t\t);\n\n\t\tif ( isset( $names[ $name ] ) ) {\n\t\t\treturn $names[ $name ];\n\t\t}\n\n\t\treturn false;\n\t}", "public function getSlug()\n {\n return $this->slug ?? $this->id;\n }", "public function getCollectionId()\n {\n @list($collectionId) = explode('/', $this->_id, 2);\n\n return $collectionId;\n }", "private function getMaillistKey() {\n\t\tif ( !$this->maillistKey )\n\t\t\t$this->maillistKey = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->maillistKey;\n\t}", "public function nameToId($name)\n {\n // If the username already contains an ampersand, then we don't need to process. \n $pos = strpos($name, '@');\n if ($pos !== false)\n {\n return $name;\n }\n \n $url = 'http://idgettr.com';\n switch ($this->get('params')->get('source'))\n {\n case 'user_photos':\n case 'friend_photos':\n $data = array('photostream' => 'http://www.flickr.com/photos/'.$name);\n break;\n case 'group_photos':\n $data = array('photostream' => 'https://www.flickr.com/groups/'.$name);\n break;\n case 'set_photos':\n $data = array('photostream' => 'https://www.flickr.com/photos/'.$name.'/sets/'.$this->get('params')->get('flickrset'));\n break;\n }\n\n if ($url)\n {\n if (function_exists('curl_init'))\n {\n $useragent = \"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)\";\n\n $curl_handle = curl_init();\n curl_setopt($curl_handle, CURLOPT_URL, $url);\n curl_setopt($curl_handle, CURLOPT_POST, 1);\n curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl_handle, CURLOPT_REFERER, 'idgettr.com');\n curl_setopt($curl_handle, CURLOPT_USERAGENT, $useragent);\n $buffer = curl_exec($curl_handle);\n curl_close($curl_handle);\n\n if (!empty($buffer))\n {\n $pos = strpos($buffer, '<p><strong>id:</strong> ');\n if ($pos !== false)\n {\n $pos_start = $pos + 24;\n $pos_end = strpos($buffer, '</p>', $pos_start);\n $length = $pos_end - $pos_start;\n $id = substr($buffer, $pos_start, $length);\n return $id;\n } \n }\n }\n }\n\n\t\treturn false;\n }", "public static function getId($ownerId, $name)\r\n {\r\n \r\n $db = Zend_Registry::get(\"DB\");\r\n $sql = $db->select()\r\n ->from('zanby_users__maillists', 'id')\r\n ->where('user_id = ?', $ownerId)\r\n ->where('name = ?', $name);\r\n $id = (int)$db->fetchOne($sql);\r\n \r\n return $id;\r\n }", "public static function getIDFromSlug($slug) {\r\n \r\n $Database = (new AppCore)->getDatabaseConnection(); \r\n \r\n if (filter_var($slug, FILTER_VALIDATE_INT)) {\r\n return $slug; \r\n }\r\n \r\n $query = \"SELECT id FROM image_competition WHERE slug = ?\";\r\n $tempid = $Database->fetchOne($query, $slug);\r\n \r\n if (filter_var($tempid, FILTER_VALIDATE_INT)) {\r\n return $tempid;\r\n }\r\n \r\n $query = \"SELECT ID from image_competition WHERE title = ?\";\r\n return $Database->fetchOne($query, $slug);\r\n \r\n }", "public function forum_id_from_name($forum_name)\n {\n return $this->connection->query_select_value_if_there('forums', 'fid', array('type' => 'f', 'name' => $forum_name)); //type 'f' - forum, type 'c' - category\n }", "function slugify ($str) { // turn name into slug for ID\r\n\t$slug = str_replace(' ','-',strtolower($str));\r\n\treturn $slug;\t\r\n}", "function getItemid() {\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$user = & JFactory::getUser() ;\r\n\t\t$sql = \"SELECT id FROM #__menu WHERE link LIKE '%index.php?option=com_osmembership%' AND published=1 AND `access` IN (\".implode(',', $user->getAuthorisedViewLevels()).\") ORDER BY `access`\";\t\t\t\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$itemId = $db->loadResult();\t\t\r\n\t\tif (!$itemId) {\r\n\t\t\t$Itemid = JRequest::getInt('Itemid');\r\n\t\t\tif ($Itemid == 1)\r\n\t\t\t\t$itemId = 999999 ;\r\n\t\t\telse \r\n\t\t\t\t$itemId = $Itemid ;\t\r\n\t\t}\t\t\t\r\n\t\treturn $itemId ;\t\r\n\t}", "public function slug($name);", "function fetchId($name)\n {\n //return $this->_parent->_name.'-'.\"popup-$name[1]\";\n return $this->_parent->getName().'-'.\"popup-$name[1]\";\n }", "function section_id_convert($name) {\n\n\t// remove the hyphen\n\t$id = str_replace(\"-\", \"\", $name);\n\t\n\t// make lowercase\n\t$id = strtolower($id);\n\t\n\t// return clean value\n\treturn $id;\n\t\n}", "function convertNameToID($name) {\n $name = str_replace(\" \",\"-\",$name);\n $name = strtolower($name);\n return $name;\n}", "public function getListeName()\n\t{\n\t\treturn substr($this->getLogicalId(), strpos($this->getLogicalId(),\"_\")+2, 1).\" - \".parent::getName();\n\t}", "public function getResourceIdFromTranslatedSlug(string $slug): int;", "function wp_parse_slug_list($input_list)\n {\n }", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function getIdFromName(string $name )\n {\n if(!$name)\n throw new \\Exception('No name!');\n\n $products = self::getAll();\n if( !empty( $products->products ))\n foreach ( $products->products as $product )\n if( $product->name == $name )\n return (int) $product->id;\n\n return false;\n }", "public function get_id();", "public function get_id();", "function subj_ID(){\n\t\tglobal $_CON;\n\t\tif(isset($_GET['this_subject'])){\n\t\t\t$_ID = mysqli_real_escape_string($_CON, $_GET['this_subject']);\n\t\treturn $_ID;\n\t\t}\n\t}", "public function get_id() {\n\t\tif ( isset( $this->item['id'] ) ) {\n\t\t\treturn esc_attr( $this->item['id'] );\n\t\t}\n\n\t\treturn false;\n\t}", "function wac_NL_id($post_id,$post_type='product'){\n\tif(function_exists('icl_object_id')){\n\t\treturn icl_object_id($post_id,$post_type,false,'nl');\n\t}\n\treturn;\n}", "function get_page_id($page_name){\n\tglobal $wpdb;\n\t$page_name = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts WHERE post_name = '\".$page_name.\"'\");\n\treturn $page_name;\n}", "function get_attachment_id_from_name( $attachment ) {\n\n\t\t$attachment_post = new WP_Query( array(\n\t\t\t'post_type' => 'attachment',\n\t\t\t'showposts' => 1,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'name' => $attachment,\n\t\t\t'show_private' => true\n\t\t) );\n\n\t\tif ( empty( $attachment_post->posts ) )\n\t\t\treturn;\n\n\t\treturn reset( $attachment_post->posts )->ID;\n\n\t}", "protected static function _byName($name, $primaryList = self::LIST_AGL) {}", "function getUniqueId(string $name): string;", "public function get_id()\n {\n\n $user_type = $this->isStaff ? \"staff\" : \"user\";\n\n return $this->database->get($user_type,'id',['user_url' => $this->username]);\n\n }", "function getSlugFromId($id='') {\n\t\tif(!$id) return '';\n\t\t$result = $this->select('slug',\"`store_id` = '\".$this->store_id.\"' AND id = '$id'\");\n\t\tif($result) return $result[0]['slug'];\n\t\treturn '';\n\t}", "public function getMultipleWishlistId();", "function get_post_from_name($id){\n\t\t$hsl = $this->db->query(\"SELECT * FROM `jsts_post` WHERE `keywords` LIKE '%\".$id.\"%'\");\n\t\treturn $hsl;\n\t}", "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "public abstract function getIdentifier();" ]
[ "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.5102258", "0.51012945", "0.5091087", "0.5041179", "0.500935", "0.49800473", "0.49783", "0.49635598", "0.4952312", "0.49489483", "0.49353296", "0.49332067", "0.4929989", "0.49276254", "0.49227318", "0.4919647", "0.49132544", "0.49114403", "0.49019462", "0.49019462", "0.49019462", "0.49019462", "0.4898669", "0.48843312", "0.48826557", "0.4878821", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.48558792", "0.4845125", "0.48391125", "0.4835497", "0.48313937", "0.4828041", "0.48214993", "0.48211062", "0.48189846", "0.48174214", "0.48077974", "0.48075482", "0.4806271", "0.4797133", "0.47969475", "0.4790669", "0.47894818", "0.47862887", "0.4780795", "0.47714704", "0.4769279", "0.4764606", "0.4764606", "0.47644657", "0.47550583", "0.47515556", "0.47478804", "0.47471812", "0.4744214", "0.4742951", "0.4729204", "0.47270393", "0.47243854", "0.47165412", "0.47137752", "0.47118324" ]
0.7455327
0
Register Gutenberg blocks for this component.
public function register_blocks() { if ( function_exists( 'register_block_type' ) ) { register_block_type( "civil/{$this->slug}", [ 'editor_script' => 'block-js-' . $this->slug, 'render_callback' => function( array $attributes ) { return $this->render_block_data( $attributes ); }, 'attributes' => [ 'title' => [ 'type' => 'text', 'default' => __( 'CTA Title', 'civil-first-fleet' ), ], 'cta_text' => [ 'type' => 'text', 'default' => __( 'CTA Description', 'civil-first-fleet' ), ], 'cta_button_text' => [ 'type' => 'text', 'default' => __( 'CTA Button', 'civil-first-fleet' ), ], 'newsletter' => [ 'type' => 'boolean', ], 'newsletter_list' => [ 'type' => 'text', ], ], ] ); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_blocks() {\n\t\t}", "public function registerBlocks(): void\n\t{\n\t\tforeach (Components::getBlocks() as $block) {\n\t\t\t$this->registerBlock($block);\n\t\t}\n\t}", "function register_block() {\n\n\t// Define our assets.\n\t$editor_script = 'build/index.js';\n\t$editor_style = 'build/index.css';\n\t$frontend_style = 'build/style-index.css';\n\t$frontend_script = 'build/frontend.js';\n\n\t// Verify we have an editor script.\n\tif ( ! file_exists( plugin_dir_path( __FILE__ ) . $editor_script ) ) {\n\t\twp_die( esc_html__( 'Whoops! You need to run `npm run build` for the WDS Block Starter first.', 'wdsbs' ) );\n\t}\n\n\t// Autoload dependencies and version.\n\t$asset_file = require plugin_dir_path( __FILE__ ) . 'build/index.asset.php';\n\n\t// Register editor script.\n\twp_register_script(\n\t\t'wdsbs-editor-script',\n\t\tplugins_url( $editor_script, __FILE__ ),\n\t\t$asset_file['dependencies'],\n\t\t$asset_file['version'],\n\t\ttrue\n\t);\n\n\t// Register editor style.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $editor_style ) ) {\n\t\twp_register_style(\n\t\t\t'wdsbs-editor-style',\n\t\t\tplugins_url( $editor_style, __FILE__ ),\n\t\t\t[ 'wp-edit-blocks' ],\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . $editor_style )\n\t\t);\n\t}\n\n\t// Register frontend style.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $frontend_style ) ) {\n\t\twp_register_style(\n\t\t\t'wdsbs-style',\n\t\t\tplugins_url( $frontend_style, __FILE__ ),\n\t\t\t[],\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . $frontend_style )\n\t\t);\n\t}\n\n\t// Register block with WordPress.\n\tregister_block_type( 'wdsbs/rich-text-demo', array(\n\t\t'editor_script' => 'wdsbs-editor-script',\n\t\t'editor_style' => 'wdsbs-editor-style',\n\t\t'style' => 'wdsbs-style',\n\t) );\n\n\t// Register frontend script.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $frontend_script ) ) {\n\t\twp_enqueue_script(\n\t\t\t'wdsbs-frontend-script',\n\t\t\tplugins_url( $frontend_script, __FILE__ ),\n\t\t\t$asset_file['dependencies'],\n\t\t\t$asset_file['version'],\n\t\t\ttrue\n\t\t);\n\t}\n}", "function register_understrap_gutenberg_blocks() {\n\n // Register our block script with WordPress\n wp_enqueue_script(\n 'understrap-blocks',\n plugins_url('/blocks/dist/blocks.build.js', __FILE__),\n array('wp-blocks', 'wp-edit-post')\n );\n \n // Register our block's editor-specific CSS\n wp_enqueue_style(\n 'gutenberg-card-block-edit-style',\n plugins_url('/blocks/dist/blocks.editor.build.css', __FILE__),\n array( 'wp-edit-blocks' )\n );\n\n // Register our block's webfonts\n/* wp_enqueue_style(\n 'gutenberg-card-block-font-style',\n 'https://fonts.googleapis.com/css?family=Karla:400,700',\n array( 'wp-edit-blocks' )\n );\n*/\n\n}", "function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray( 'render_callback' => __NAMESPACE__ . '\\load_assets' )\n\t);\n}", "public function register ()\n {\n\n add_action( 'enqueue_block_editor_assets', array ( $this , 'mtk_enqueueBlockEditorFiles' ) );\n add_action( 'enqueue_block_assets ', array ( $this , 'mtk_enqueueBlockFiles' ) );\n $this->registerBlock();\n }", "function ws_blocks_register() {\n wp_register_script(\n 'ws-blocks-editor-script', \n plugins_url('dist/editor.js', __FILE__),\n //Array of dependencies\n array(\n 'wp-blocks',\n 'wp-i18n',\n 'wp-element', \n 'wp-editor', \n 'wp-components', \n 'wp-block-editor', \n 'wp-blob',\n 'wp-data'\n )\n );\n\n wp_register_style(\n 'ws-blocks-editor-style',\n plugins_url('dist/editor.css', __FILE__),\n //Array of dependencies - our stylesheet is loaded after this one\n array('wp-edit-blocks')\n );\n\n //Scripts and Styles for Front End\n wp_register_script(\n 'ws-blocks-script', \n plugins_url('dist/script.js', __FILE__),\n //load after jquery\n array('jquery')\n );\n\n wp_register_style(\n 'ws-blocks-style', \n plugins_url('dist/style.css', __FILE__)\n );\n\n ws_block_register_block_type('hero-banner');\n ws_block_register_block_type('story-block');\n ws_block_register_block_type('text-banner');\n}", "function gutenberg_blocks_template_image_register_block() {\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t// Gutenberg is not active.\n\t\treturn;\n\t}\n\twp_register_script(\n\t\t'gutenberg_blocks_template_image_script',\n\t\tplugins_url( 'block.build.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.build.js' )\n\t);\n\twp_register_style(\n\t\t'gutenberg_blocks_template_image_style',\n\t\tplugins_url( 'style.css', __FILE__ ),\n\t\tarray( ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'style.css' )\n\t);\n\tregister_block_type( 'gutenberg-blocks/template-image', array(\n\t\t'style' => 'gutenberg_blocks_template_image_style',\n\t\t'editor_script' => 'gutenberg_blocks_template_image_script',\n\t) );\n}", "public function register() {\n\n if ( ! function_exists( 'register_block_type' ) ) {\n return;\n }\n\n register_block_type( 'minervakb/' . $this->ID, array(\n 'attributes' => $this->get_block_attributes(),\n 'render_callback' => array($this, 'wrapped_render')\n ));\n }", "protected function register_blocks() {\n\n\t\t\\register_block_type(\n\t\t\t'tcc/column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-1-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-2-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-3-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-4-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t}", "public function register_blocks() {\n\n\t\t// Return early if this function does not exist.\n\t\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Shortcut for the slug.\n\t\t$slug = $this->_slug;\n\n\t\tregister_block_type(\n\t\t\t$slug . '/accordion',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/alert',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/author',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/click-to-tweet',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/dynamic-separator',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gif',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gist',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/highlight',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-carousel',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-masonry',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-stacked',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t}", "function ticketmaster_register_block() {\n\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t// Gutenberg is not active.\n\t\treturn;\n\t}\n\n\twp_register_script(\n\t\t'ticketmaster',\n\t\tplugins_url( 'build/index.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components'),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.js' )\n\t);\n\n register_block_type('ticketmaster/event-listing', [\n 'editor_script' => 'ticketmaster',\n 'attributes' => [\n 'term' => [\n 'type' => 'string',\n 'default' => 'Concert'\n ],\n 'size' => [\n 'type' => 'number',\n 'default' => 8\n ],\n ],\n 'render_callback' => render_nova_directive('EventListing'),\n ]);\n}", "public static function register_blocks()\n {\n if (function_exists('acf_register_block_type')):\n\n acf_register_block_type(array(\n 'name' => 'hero',\n 'title' => __('Hero'),\n 'render_template' => 'template-parts/blocks/hero/hero.php',\n 'category' => 'custom-blocks',\n 'icon' => 'admin-site',\n 'keywords' => array('hero', 'carousel'),\n 'supports' => array(\n 'align' => false,\n ),\n ));\n\n endif;\n }", "protected function register_block() {\n\t\t$dir = dirname( __FILE__ );\n\n\t\t$script_asset_path = \"$dir/build/index.asset.php\";\n\t\tif ( ! file_exists( $script_asset_path ) ) {\n\t\t\tthrow new Error(\n\t\t\t\t'You need to run `npm start` or `npm run build` for the \"sudar/wp-plugin-review-block\" block first.'\n\t\t\t);\n\t\t}\n\t\t$index_js = 'build/index.js';\n\t\t$script_asset = require( $script_asset_path );\n\t\twp_register_script(\n\t\t\t'wp-plugin-review-block-editor',\n\t\t\tplugins_url( $index_js, __FILE__ ),\n\t\t\t$script_asset['dependencies'],\n\t\t\t$script_asset['version']\n\t\t);\n\t\twp_set_script_translations( 'wp-plugin-review-block-editor', 'wp-plugin-reviews' );\n\n\t\t$editor_css = 'build/index.css';\n\t\twp_register_style(\n\t\t\t'wp-plugin-review-block-editor',\n\t\t\tplugins_url( $editor_css, __FILE__ ),\n\t\t\tarray(),\n\t\t\tfilemtime( \"$dir/$editor_css\" )\n\t\t);\n\n\t\t$style_css = 'build/style-index.css';\n\t\twp_register_style(\n\t\t\t'create-block-review-block-block',\n\t\t\tplugins_url( $style_css, __FILE__ ),\n\t\t\tarray(),\n\t\t\tfilemtime( \"$dir/$style_css\" )\n\t\t);\n\n\t\tregister_block_type( 'sudar/wp-plugin-review-block', array(\n\t\t\t'editor_script' => 'wp-plugin-review-block-editor',\n\t\t\t'editor_style' => 'wp-plugin-review-block-editor',\n\t\t\t'style' => 'wp-plugin-review-block',\n\t\t\t'render_callback' => [ $this, 'get_plugin_reviews_render_callback' ]\n\t\t) );\n\t}", "public function registerBlock()\n {\n register_block_type( 'mtk-plugin/cptshortcode' , array (\n 'editor_script' => 'mtk_cptshortcode_editor',\n 'editor_style' => 'mtk_cptshortcode_editor',\n 'style' => 'mtk_cptshortcode',\n ) );\n\n }", "function gutenberg_frugalisme_custom_blocks() {\n\twp_register_style(\n\t\t'frugalisme-front-end-styles',\n\t\tSB_PLUGIN_URL . '/style.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'style.css' )\n\t);\n\t// Block editor styles.\n\twp_register_style(\n\t\t'frugalisme-editor-styles',\n\t\tSB_PLUGIN_URL . '/editor.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'editor.css' )\n\t);\n\n\t// Block Editor Script.\n\twp_register_script(\n\t\t'frugalisme-editor-js',\n\t\tSB_PLUGIN_URL . '/youtube-feed.js',\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-i18n' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'youtube-feed.js' ),\n\t\ttrue\n\t);\n\tregister_block_type(\n\t\t'youtube-feed/youtube-feed',\n\t\tarray(\n\t\t\t'style' => 'frugalisme-front-end-styles',\n\t\t\t'editor_style' => 'frugalisme-editor-styles',\n\t\t\t'editor_script' => 'frugalisme-editor-js',\n\t\t\t'render_callback' => 'frugalisme_render_feed'\n\t\t)\n\t);\n\n}", "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}", "function register_blocks() {\t\n\n // Fail if block editor is not supported\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n // List all of the blocks for your plugin\n $blocks = [\n \"antaresplugin/gallery\",\n ];\n\n // Register each block with same CSS and JS\n foreach( $blocks as $block ) {\n if( \"antaresplugin/gallery\" === $block ) { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css',\n 'attributes' => [ \n 'images' => [\n 'type' => \"array\",\n 'default' => []\n ],\n 'direction' => [\n 'type'=> \"string\",\n 'default' => \"row\"\n ],\n 'isLightboxEnabled' => [\n 'type' => \"boolean\",\n 'default' => true\n ]\n ]\n ] );\t \n }\n else { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css'\n ] );\t \n }\n }\n\n}", "function register_block_core_block()\n {\n }", "function register_blocks() {\n\trequire_once DKOO_BLOCKS_PATH . 'blocks/background-video/index.php';\n\tBackgroundVideo\\register_block();\n}", "public function register_cpt_blocks() {\n /* Include CPT creation file */\n //include_once( ILIO_BLOCKS_INCLUDES_DIR . '/blockss.post-type.php' );\n }", "function register_block( $name ) {\n\t\n\t\t\tacf_register_block( array(\n\t\t\t\t'name' => str_replace('-', ' ', $name),\n\t\t\t\t'title' => __( str_replace('-', ' ', ucwords( $name, '-' )), 'genlite' ),\n\t\t\t\t'description' => __( str_replace('-', ' ', ucwords( $name, '-' )) . ' block.', 'genlite' ),\n\t\t\t\t'render_callback' => function( $block, $content = '', $is_preview = false ) {\n\t\t\t\t\t$context = Timber::context();\n\t\t\t\t\n\t\t\t\t\t// Store block values.\n\t\t\t\t\t$context['block'] = $block;\n\t\t\t\t\n\t\t\t\t\t// Store field values.\n\t\t\t\t\t$context['fields'] = get_fields();\n\t\t\t\t\n\t\t\t\t\t// Store $is_preview value.\n\t\t\t\t\t$context['is_preview'] = $is_preview;\n\n\t\t\t\t\t// Render the block.\n\t\t\t\t\tTimber::render( 'templates/blocks/' . str_replace(' ', '-', strtolower( $block['title'] )) . '.twig', $context );\n\t\t\t\t},\n\t\t\t\t'category' => 'genlite-blocks',\n\t\t\t\t'icon' => '',\n\t\t\t\t'keywords' => array( $name ),\n\t\t\t\t'mode' \t\t\t => 'edit'\n\t\t\t) );\t\n\t\t}", "function phpbits_register_breadcrumbs_block() {\n\t// Return early if this function does not exist.\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n\t// Load attributes from block.json.\n\tob_start();\n\tinclude BREADCRUMBSBLOCK_PLUGIN_DIR . 'src/blocks/breadcrumbs/block.json';\n\t$metadata = json_decode( ob_get_clean(), true );\n\tregister_block_type(\n\t\t$metadata['name'],\n\t\tarray(\n\t\t\t'editor_script' => 'breadcrumbs-block-editor',\n\t\t\t'editor_style' => 'breadcrumbs-block-editor-css',\n\t\t\t'style' => 'breadcrumbs-block-frontend',\n\t\t\t'attributes' => $metadata['attributes'],\n\t\t\t'render_callback' => 'phpbits_render_breadcrumbs_block',\n\t\t)\n\t);\n}", "protected function register(): void\n {\n if (function_exists('acf_register_block')) {\n acf_register_block_type(array(\n 'name' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'render_callback' => [$this, 'render'],\n 'category' => 'layout',\n 'icon' => 'screenoptions',\n 'keywords' => [$this->id, 'zkd'],\n 'supports' => ['anchor' => true]\n ));\n }\n }", "protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}", "function setup_starter_register_custom_blocks() {\n\n $blocks = array(\n 'feature' => array(\n 'name' => 'feature_pull_block',\n 'title' => __('Feature Pull Block'),\n 'render_template' => plugin_dir_path( __FILE__ ).'../blocks/block-feature-pull-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'feature', 'highlight', 'pull' ),\n ),\n \n ); //echo $blocks[ 'feature']['render_template'];\n /*\n 'logs' => array(\n 'name' => 'log',\n 'title' => __('Log'),\n 'render_template' => 'partials/blocks/block-log-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'update', 'log' ),\n ),\n */\n\n // Bail out if function doesn’t exist or no blocks available to register.\n if ( !function_exists( 'acf_register_block_type' ) && !$blocks ) {\n return;\n }\n \n // this loop is broken, how do we register multiple blocks in one go?\n // Register all available blocks.\n foreach ($blocks as $block) {\n acf_register_block_type( $block );\n }\n \n}", "public function mtk_enqueueBlockEditorFiles()\n {\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.js';\n $deps = array( 'wp-blocks' , 'wp-element') ;\n wp_register_script( $handle , $src , $deps );\n\n /* Register global block css - backend only */\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode_editor.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode_editor.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "function achtvier_beitraege_block_init() {\n\t// Skip block registration if Gutenberg is not enabled/merged.\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\t$dir = dirname( __FILE__ );\n\n\t$index_js = 'achtvier-beitraege/index.js';\n\twp_register_script(\n\t\t'achtvier-beitraege-block-editor',\n\t\tplugins_url( $index_js, __FILE__ ),\n\t\tarray(\n\t\t\t'wp-blocks',\n\t\t\t'wp-i18n',\n\t\t\t'wp-element',\n\t\t\t'wp-components',\n\t\t\t'wp-editor'\n\t\t),\n\t\tfilemtime( \"$dir/$index_js\" )\n\t);\n\n\t$editor_css = 'achtvier-beitraege/editor.css';\n\twp_register_style(\n\t\t'achtvier-beitraege-block-editor',\n\t\tplugins_url( $editor_css, __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( \"$dir/$editor_css\" )\n\t);\n\n\t$style_css = 'achtvier-beitraege/style.css';\n\twp_register_style(\n\t\t'achtvier-beitraege-block',\n\t\tplugins_url( $style_css, __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( \"$dir/$style_css\" )\n\t);\n\n\tregister_block_type( 'achtvier-blocks/achtvier-beitraege', array(\n\t\t'editor_script' => 'achtvier-beitraege-block-editor',\n\t\t'editor_style' => 'achtvier-beitraege-block-editor',\n\t\t'style' => 'achtvier-beitraege-block',\n\t\t'attributes' => array(\n\t'categories' => array(\n\t\t'type' => 'string',\n\t),\n\t'className' => array(\n\t\t'type' => 'string',\n\t),\n\t'postsToShow' => array(\n\t\t'type' => 'number',\n\t\t'default' => 5,\n\t),\n\t'displayPostDate' => array(\n\t\t'type' => 'boolean',\n\t\t'default' => false,\n\t),\n 'teaserLength' => array(\n\t\t'type' => 'number',\n\t\t'default' => 70,\n\t),\t\n\t'order' => array(\n\t\t'type' => 'string',\n\t\t'default' => 'desc',\n\t),\n\t'orderBy' => array(\n\t\t'type' => 'string',\n\t\t'default' => 'date',\n\t),\n),\n'render_callback' => 'render_achtvier_beitraege',\n\t) );\n}", "function register_block_core_calendar() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/calendar',\n\t\tarray(\n\t\t\t'render_callback' => 'render_block_core_calendar',\n\t\t)\n\t);\n}", "function enqueueBlock() {\n wp_enqueue_script(\n 'ugroup-new-block',\n plugin_dir_url(__FILE__) . 'ugroup-test.js',\n array('wp-blocks','wp-editor'),\n true\n );\n}", "public function register_block($name,$block)\n \t{\n \t\t$this->blocks[$name]=$block;\n \t}", "function register_block_core_pattern()\n {\n }", "public function register()\n {\n //footer loading static blocks\n view()->composer('frontend.partials.footer-main', function($view)\n {\n $view->with([\n 'footerLeft' => StaticBlock::getStaticBlock(StaticBlock::FOOTER_LEFT),\n 'footerRight' => StaticBlock::getStaticBlock(StaticBlock::FOOTER_RIGHT),\n 'footerCenter' => StaticBlock::getStaticBlock(StaticBlock::FOOTER_CENTER),\n ]);\n });\n\n view()->composer('frontend.partials.header', function($view)\n {\n $view->with([\n 'topLeftHeader' => StaticBlock::getStaticBlock(StaticBlock::HEADER_LEFT),\n 'topRightHeader' => StaticBlock::getStaticBlock(StaticBlock::HEADER_RIGHT),\n 'topCenterHeader' => StaticBlock::getStaticBlock(StaticBlock::HEADER_CENTER),\n 'mainHeader' => StaticBlock::getStaticBlock(StaticBlock::HEADER_MAIN),\n ]);\n });\n }", "function register_dynamic_block_action() {\n\n\twp_register_script(\n\t\t'my-first-dynamic-gutenberg-block-script',\n\t\tplugins_url( 'myblock.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element' ),\n\t\ttrue\n\t);\n\n\tregister_block_type(\n\t\t'my-first-dynamic-gutenberg-block/latest-post',\n\t\tarray(\n\t\t\t'editor_script' => 'my-first-dynamic-gutenberg-block-script',\n\t\t\t'render_callback' => 'my_plugin_render_block_latest_post',\n\t\t)\n\t);\n\n}", "function wp_enqueue_registered_block_scripts_and_styles()\n {\n }", "private function registerBlock(array $blockDetails): void\n\t{\n\t\t\\register_block_type(\n\t\t\t$blockDetails['blockFullName'],\n\t\t\t[\n\t\t\t\t'render_callback' => [$this, 'render'],\n\t\t\t\t'attributes' => $this->getAttributes($blockDetails),\n\t\t\t]\n\t\t);\n\t}", "public function register_block ( $block_name, $options = [] )\n {\n $_options = wp_parse_args( $options, [\n 'builder' => blockpress(),\n ]);\n\n $this->_blocks[ $block_name ] = $_options['builder']->get_block_instance( $block_name );\n }", "function gutenberg_enqueue_registered_block_scripts_and_styles() {\n\t$is_editor = ( 'enqueue_block_editor_assets' === current_action() );\n\n\t$block_registry = WP_Block_Type_Registry::get_instance();\n\tforeach ( $block_registry->get_all_registered() as $block_name => $block_type ) {\n\t\t// Front-end styles.\n\t\tif ( ! empty( $block_type->style ) ) {\n\t\t\twp_enqueue_style( $block_type->style );\n\t\t}\n\n\t\t// Front-end script.\n\t\tif ( ! empty( $block_type->script ) ) {\n\t\t\twp_enqueue_script( $block_type->script );\n\t\t}\n\n\t\t// Editor styles.\n\t\tif ( $is_editor && ! empty( $block_type->editor_style ) ) {\n\t\t\twp_enqueue_style( $block_type->editor_style );\n\t\t}\n\n\t\t// Editor script.\n\t\tif ( $is_editor && ! empty( $block_type->editor_script ) ) {\n\t\t\twp_enqueue_script( $block_type->editor_script );\n\t\t}\n\t}\n}", "function ajarRegisterBlock() {\n\n //Archivo php generado del builds\n $assets = include_once get_template_directory().'/blocks/build/index.asset.php';\n\n wp_register_script(\n 'ajar-block', // handle del script\n get_template_directory_uri().'/blocks/build/index.js', //url del directorio\n $assets['dependencies'], //all dep\n $assets['version'] // cada build cambia la version, para evitaas conflictos de cache\n );\n\n register_block_type(\n 'ajar/basic',\n array(\n 'editor_script' => 'ajar-block', //copiar el script ya registrado\n 'attributes' => array( //repetimos los attr del block de index.js\n 'content' => array(\n 'type' => \"string\",\n 'default' => 'Hello World'\n ),\n 'mediaURL' => array(\n \"type\" => 'string'\n ),\n 'mediaAlt' => array(\n \"type\" => 'string'\n ),\n ),\n 'render_callback' => 'ajarRenderDinamycBlock' //funcion para generar el SSR(server side render)\n )\n );\n}", "function register_acf_block_types() {\n\n\t// ingredients list block\n\tacf_register_block_type(array(\n\t\t'name' => 'ingredients',\n\t\t'title' => __('Ingredients'),\n\t\t'description' => __('List of ingredients'),\n\t\t'render_template' => 'block-ingredients.php',\n\t\t'category' => 'formatting',\n\t\t'icon' => 'editor-list',\n\t\t'keywords' => array('ingredients', 'list'),\n\t\t'mode' => 'edit',\n\t\t'supports' => array(\n\t\t\t'align' => false,\n\t\t\t'mode' => false,\n\t\t),\n\t));\n}", "function register_block_core_template_part()\n {\n }", "function register_block_core_legacy_widget()\n {\n }", "function register_block_core_gallery()\n {\n }", "function register_block_core_widget_group()\n {\n }", "function iqor_blocks_register_block_type($block, $options = array()) {\n register_block_type(\n 'iqor-blocks/' . $block,\n array_merge(\n array(\n 'editor_script' => 'iqor-blocks-editor-script',\n 'editor_style' => 'iqor-blocks-editor-style',\n 'script' => 'iqor-blocks-script',\n 'style' => 'iqor-blocks-style'\n ),\n $options\n )\n );\n\n}", "function _register_core_block_patterns_and_categories()\n {\n }", "public function mtk_enqueueBlockFiles()\n {\n $handle = 'mtk_cptshortcode';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "function register_block_core_shortcode()\n {\n }", "function register_block_core_gallery() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/gallery',\n\t\tarray(\n\t\t\t'render_callback' => function ( $attributes, $content ) {\n\t\t\t\treturn $content;\n\t\t\t},\n\t\t)\n\t);\n}", "function block_init() {\n $dir = __DIR__;\n $script_base = \"theme-piber\";\n\n $script_asset_path = \"$dir/build/blocks/index.asset.php\";\n if (!file_exists($script_asset_path)) {\n throw new \\Error(\n __('You need to run `npm start` or `npm run build` first.', 'theme-piber')\n );\n }\n $index_js = '/build/blocks/index.js';\n $script_asset = require($script_asset_path);\n \\wp_register_script(\n \"$script_base-block-editor\",\n \\get_stylesheet_directory_uri() . $index_js,\n $script_asset['dependencies'],\n $script_asset['version'],\n true\n );\n \\wp_set_script_translations(\"$script_base-block-editor\", 'theme-piber', \\piber\\THEME_PIBER_L_PATH);\n\n $editor_css = '/build/blocks/index.css';\n \\wp_register_style(\n \"$script_base-block-editor\",\n \\get_stylesheet_directory_uri() . $editor_css,\n array(),\n filemtime(\"$dir/$editor_css\")\n );\n\n $style_css = '/build/blocks/style-index.css';\n if (file_exists($dir . $style_css)) {\n \\wp_register_style(\n \"$script_base-block\",\n \\get_stylesheet_directory_uri() . $style_css,\n array(),\n filemtime(\"$dir/$style_css\")\n );\n }\n\n blocks\\register_blocks($script_base);\n}", "function loadMyBlock() {\n wp_enqueue_script(\n 'my-new-block',\n plugin_dir_url(__FILE__) . 'catalog-block-build.js',\n array('wp-blocks','wp-editor'),\n true\n );\n}", "function oleinstrap_blocks_enqueue() {\n\twp_enqueue_script( 'oleinstrap-blocks-script',\n\t\tget_template_directory_uri() . '/inc/blocks/build/index.js',\n\t\tarray( 'wp-blocks' )\n\t);\n}", "function _register_theme_block_patterns()\n {\n }", "function mytheme_blocks_register_block_type( $block, $options = array() ) {\n\tregister_block_type(\n\t\t'mytheme-blocks/' . $block,\n\t\tarray_merge(\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'mytheme-blocks-editor-script',\n\t\t\t\t'editor_style' =>\n\t\t\t\t'mytheme-blocks-editor-style',\n\t\t\t\t'script' => 'mytheme-blocks-script',\n\t\t\t\t'style' => 'mytheme-blocks-style',\n\t\t\t),\n\t\t\t$options,\n\t\t)\n\t);\n}", "function register_block_core_image()\n {\n }", "function register_block_core_file()\n {\n }", "public function init() {\n\n\t\t// Functions.\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/functions-llms-blocks.php';\n\n\t\t// Classes.\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-assets.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-abstract-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-migrate.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-page-builders.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-post-instructors.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-post-types.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-post-visibility.php';\n\n\t\t// Block Visibility Component.\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/class-llms-blocks-visibility.php';\n\n\t\t// Dynamic Blocks.\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-course-information-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-course-syllabus-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-instructors-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-lesson-navigation-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-lesson-progression-block.php';\n\t\trequire_once LLMS_BLOCKS_PLUGIN_DIR . '/includes/blocks/class-llms-blocks-pricing-table-block.php';\n\n\t}", "public function createACFBlock()\n {\n if (function_exists('acf_register_block_type')) {\n acf_register_block_type(\n array(\n 'name' => 'acfBlock',\n 'title' => __('ACF Block'),\n 'description' => __('A custom block that incorporates ACF fields.'),\n 'render_callback' => array($this, 'renderACFBlock'),\n 'category' => 'widgets',\n 'icon' => array('background' => '#ecf6f6', 'src' => 'email'),\n 'keywords' => array('example', 'acf'),\n 'mode' => 'edit'\n )\n );\n }\n }", "function loadMyBlockFiles() {\n wp_enqueue_script(\n 'my-super-unique-handle', \n plugin_dir_url(__FILE__) . 'my-block.js',\n array('wp-blocks', 'wp-i18n', 'wp-editor'),\n true\n );\n}", "function thedux_framework_register_caviar_blocks(){\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/functions.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_accordion_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_block_title_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_blog_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_blog_posts_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_button_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_card_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_carousel_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_clients_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_feature_banner_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_feature_product_list_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_hero_header_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_hero_slider_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_hover_tile_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_icon_cards_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_image_gallery_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_image_gallery_wide_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_image_text_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_inline_video_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_instafeed_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_modal_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_modal_gallery_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_modal_gallery_wide_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_modal_video_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_portfolio_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_pricing_table_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_product_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_product_masonry_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_progress_bar_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_shop_deal_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_shop_feature_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_tabs_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_team_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_testimonial_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_twitter_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_video_background_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_video_gallery_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_video_gallery_wide_block.php');\n\trequire_once( THEDUX_FRAMEWORK_PATH . 'vc_blocks/caviar/vc_map_block.php');\n}", "function AllowGutenbergBlocks(){\n $AllowedBlocks = array_merge($this->WPgutenberg_AllowedBlocks, $this->WPgutenberg_CustomAllowedBlocks);\n return $AllowedBlocks;\n }", "function snyder_card_register_block() {\n wp_register_script(\n \"snyder-card-editor\",\n plugins_url(\"card-editor.build.js\", __FILE__),\n array(\"wp-blocks\", \"wp-element\", \"wp-editor\")\n );\n\n wp_register_script(\n \"snyder-card-container-editor\",\n plugins_url(\"card-container-editor.build.js\", __FILE__),\n array(\"wp-blocks\", \"wp-element\", \"wp-editor\")\n );\n\n wp_register_style(\n \"snyder-card-style\",\n plugins_url(\"card.css\", __FILE__),\n array()\n );\n\n register_block_type(\"snyder-blocks/card\", array(\n \"editor_script\" => \"snyder-card-editor\",\n \"style\" => \"snyder-card-style\",\n \"editor_style\" => \"snyder-card-style\"\n ));\n\n register_block_type(\"snyder-blocks/card-container\", array(\n \"editor_script\" => \"snyder-card-container-editor\",\n \"style\" => \"snyder-card-style\",\n \"editor_style\" => \"snyder-card-style\"\n ));\n}", "public function __construct() {\n // update default vars with configuration file\n SELF::updateVars();\n // filter gutenberg blocks\n if(!empty($this->WPgutenberg_AllowedBlocks)):\n add_filter( 'allowed_block_types', array($this, 'AllowGutenbergBlocks'), 100 );\n endif;\n // add gutenberg style options\n if(!empty($this->WPgutenberg_Stylesfile)):\n add_action( 'enqueue_block_editor_assets', array($this, 'AddBackendStyleOptions'), 100 );\n endif;\n // disable gutenberg\n if($this->WPgutenberg_active == 0):\n SELF::DisableGutenberg();\n endif;\n // disable Gutenberg block styles\n if($this->WPgutenberg_css == 0):\n add_action( 'wp_enqueue_scripts', array($this, 'DisableGutenbergCSS'), 100 );\n endif;\n // add theme support\n SELF::CustomThemeSupport();\n // register custom blocks\n add_action( 'init', array($this, 'WPgutenbergCustomBlocks') );\n // Change inline font size to var\n if($this->WPgutenberg_fontsizeScaler == 0):\n add_filter('the_content', array($this, 'InlineFontSize') );\n endif;\n }", "public function __construct()\n\t{\n\t\t// Array of block params\n\t\t$block = array(\n\t\t\t\"classname\" => \"extra_form_parts\", // Must match class name aboce\n\t\t\t\"name\" => \"Extra form parts\",\n\t\t\t\"description\" => \"Extra form parts\"\n\t\t);\n\t\t// register block with core, this makes it available to users \n\t\tblocks::register($block);\n\t}", "function register_block_core_calendar()\n {\n }", "public function block($args, $assoc_args)\n {\n /**\n * Setup vars for directory and block names\n *\n * $blockName is the kebab-case component name\n * - used for registration, scss/partial filename\n * - used in partial for classname\n * - used in scss for classname\n *\n * $blockClassName is the PascalCase component name\n * - used for ACF_Block registration classname\n * - added to BlockServiceProvider.php\n */\n $theme_path = trailingslashit(get_template_directory());\n $blockName = strtolower($args[0]);\n $blockClassNameParts = explode('-', $args[0]);\n $blockClassName = '';\n foreach ($blockClassNameParts as $part) {\n $blockClassName .= ucfirst($part);\n }\n $blockTitle = strtolower($blockName);\n\n\n /**\n * Create block\n */\n $create_block_result = $this->createAcfBlock($theme_path, $blockClassName, $blockTitle);\n \n if ($create_block_result !== true) {\n return;\n }\n\n /**\n * Reference in block service provider\n */\n $this->addClassToBlockServiceProvider($theme_path, $blockClassName);\n\n /**\n * Create partial\n */\n $this->createBlockPartial($theme_path, $blockTitle);\n\n /**\n * Create SCSS (optional)\n */\n \\WP_CLI::confirm('Would you like SCSS?', $assoc_args_scss = array());\n $created_scss = $this->createBlockScssFile($theme_path, $blockName);\n\n /**\n * Reference SCSS in _blocks.scss\n */\n if ($created_scss) {\n $this->addScssImportStatement($theme_path, $blockName);\n }\n\n //@TODO finish me\n //$this->addBlockToAllowedBlocks($theme_path, $blockName);\n \n \\WP_CLI::success('Great Success! https://untappd.akamaized.net/photo/2017_08_05/c1e3366ff091d1b65c903dddfcd2f036_320x320.jpg');\n }", "function gutenberg_prepare_blocks_for_js() {\n\t$block_registry = WP_Block_Type_Registry::get_instance();\n\t$blocks = array();\n\t$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'supports', 'attributes' );\n\n\tforeach ( $block_registry->get_all_registered() as $block_name => $block_type ) {\n\t\tforeach ( $keys_to_pick as $key ) {\n\t\t\tif ( ! isset( $block_type->{ $key } ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! isset( $blocks[ $block_name ] ) ) {\n\t\t\t\t$blocks[ $block_name ] = array();\n\t\t\t}\n\n\t\t\t$blocks[ $block_name ][ $key ] = $block_type->{ $key };\n\t\t}\n\t}\n\n\treturn $blocks;\n}", "public function initialise_blocks ( $blocks = [], $options = [] )\n {\n $_options = wp_parse_args( $options, [\n 'builder' => blockpress(),\n ]);\n\n // If no blocks given, check the entity for any blocks\n if ( empty( $blocks ) )\n {\n $blocks = $this->get_prop( 'blocks' );\n }\n\n // If again no blocks specified, register all of the blocks within this entity\n if ( empty( $blocks ) )\n {\n $blocks = array_keys( $_options['builder']->get_prop( 'loaded_blocks' ) );\n $this->blocks = $blocks;\n }\n\n // Register the specified blocks within this entity\n if ( ! empty( $blocks ) )\n {\n foreach ( $blocks as $block_name )\n {\n // If $pecial $auce is found, load in the blocks which match the selector\n if ( preg_match( '/^\\$\\$\\:?/', $block_name ) )\n {\n $filters = str_replace( '$$:', '', $block_name );\n $filtered_blocks = filter_blocks( $_options['builder']->get_blocks(), $filters );\n\n // Register all the filtered blocks\n foreach ( $filtered_blocks as $filtered_block_name => $filtered_block_instance )\n {\n $this->register_block( $filtered_block_name );\n }\n }\n else\n {\n $this->register_block( $block_name );\n }\n }\n }\n }", "function RegisterBlock($block, $block_impl, $cacheable=true, $cache_attrs=null)\n {\n $this->_smarty->register_block($block, $block_impl, $cacheable, $cache_attrs);\n }", "function register_block_style($block_name, $style_properties)\n {\n }", "function gutenberg_cardContent_block_admin()\n{\n wp_enqueue_script(\n 'gutenberg-block-card-content',\n CH_THEME_URI . '/blocks/card-content/block.js',\n array('wp-blocks', 'wp-element'),\n CH_VERSION\n\n );\n\n wp_enqueue_style(\n 'gutenberg-notice-block-editor',\n CH_THEME_URI . '/blocks/card-content/block.css',\n array(),\n CH_VERSION\n );\n}", "function wp_setup_widgets_block_editor()\n {\n }", "function lcm_register_block_categories() {\n\tif ( class_exists( 'WP_Block_Patterns_Registry' ) ) {\n\n\t\tregister_block_pattern_category(\n\t\t\t'custom',\n\t\t\tarray( 'label' => _x( 'Custom Patterns', 'Block pattern category', 'lcm_block_patterns' ) )\n\t\t);\n\n\t}\n}", "function register_dynamic_block() {\n if (!function_exists('register_block_type')) {\n return;\n }\n\n // Hook server side rendering into render callback\n // Make sure name matches registerBlockType in ./index.js\n register_block_type('davidyeiser-detailer/book-details', array(\n 'render_callback' => __NAMESPACE__ . '\\render_dynamic_block'\n ));\n}", "public function enqueue_block_editor_assets() {\n\t\t$this->asset_manager->enqueue_script( 'structured-data-blocks' );\n\t\t$this->asset_manager->enqueue_style( 'structured-data-blocks' );\n\t}", "public function register_acf_block_types() {\n\n\t\t// register a faq block.\n acf_register_block_type(array(\n 'name' => 'faq',\n 'title' => __('FAQs'),\n 'description' => __('A content block to display FAQs.'),\n 'render_template' => IG_BLOCKS_PLUGIN_PATH . 'template-parts/blocks/faq/template.php',\n 'enqueue_assets' => function(){\n wp_enqueue_script( 'jquery-ui-accordion' );\n },\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'faq', 'question', 'answer', 'starter' ),\n 'mode'\t\t\t\t=> 'preview',\n\t\t\t'supports'\t\t\t=> array(\n\t\t\t\t'align' => array( 'full' ),\n\t\t\t\t'mode' => false,\n\t\t\t\t'jsx' => true\n\t\t\t),\n ));\n\n\t\t// Cannot just disable align as editor will not show it as full if supports:align is false.\n\t\t// https://github.com/AdvancedCustomFields/acf/issues/91.\n\n\t\t\n\t}", "function register_core_block_types_from_metadata()\n {\n }", "function register_block_core_post_template()\n {\n }", "function pnCPG_blockblock_init()\n{\n // Security\n pnSecAddSchema('pnCPG:block:', 'Block title::');\n}", "function vsau_init_callback() {\n\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n\t/* Register Javascript File build/index.js */\n\twp_register_script(\n\t\t'vs-about-us-js',\n\t\tplugins_url( 'build/index.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-data', 'wp-components' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'build/index.js' ),\n\t\ttrue\n\t);\n\n\t/* Register Editor Style: src/editor.css */\n\twp_register_style(\n\t\t'vs-about-us-editor-css',\n\t\tplugins_url( 'src/editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'src/editor.css' )\n\t);\n\n\tregister_block_type(\n\t\t'vape-smoke/about-us',\n\t\tarray(\n\t\t\t'editor_script' => 'vs-about-us-js',\n\t\t\t'editor_style' => 'vs-about-us-editor-css',\n\t\t\t'style' => 'vs-about-us-frontend-css',\n\t\t\t'render_callback' => 'vsau_block_render',\n\t\t\t'attributes' => array(\n\t\t\t\t'sectionHeading' => array(\n\t\t\t\t\t'type' => 'string'\n\t\t\t\t),\n\t\t\t\t'aboutUsImage' => array(\n\t\t\t\t\t'type' => 'string'\n\t\t\t\t),\n\t\t\t\t'aboutUsDescription' => array(\n\t\t\t\t\t'type' => 'string'\n\t\t\t\t),\n\t\t\t\t'readMoreButtonText' => array(\n\t\t\t\t\t'type' => 'string'\n\t\t\t\t),\n\t\t\t\t'readMoreButtonLink' => array(\n\t\t\t\t\t'type' => 'string'\n\t\t\t\t),\n\t\t\t)\n\t\t)\n\t);\n}", "function lwhhgb_enqueue_block_assets() {\n\n\n\twp_enqueue_style( \n\t\t'lwhhgb-block-1', \n\t\tplugins_url('./src/style.css'.__FILE__), \n\t\tarray('wp-blocks')\n\t);\n\n\n\n\tif( is_admin() ){\n\n\t\twp_enqueue_style( \n\t\t\t'lwhhgb-block-1-editor', \n\t\t\tplugins_url('./src/editor-style.css'.__FILE__), \n\t\t\tarray('wp-editor-blocks')\n\t\t);\n\n\t}\n\n\n\n}", "function gutenberg_enqueue_block_editor_assets_block_directory() {\n\t\twp_enqueue_script( 'wp-block-directory' );\n\t\twp_enqueue_style( 'wp-block-directory' );\n\t}", "function gutenberg_boilerplate_es5_enqueue_editor_assets() {\n\t// Block scripts for the editor.\n\twp_enqueue_script(\n\t\t'gutenberg-boilerplate-es5-step01',\n\t\tplugins_url( 'step-01/block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-01/block.js' )\n\t);\n\twp_enqueue_script(\n\t\t'gutenberg-boilerplate-es5-step02',\n\t\tplugins_url( 'step-02/block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-02/block.js' )\n\t);\n\twp_enqueue_script(\n\t\t'gutenberg-boilerplate-es5-step03',\n\t\tplugins_url( 'step-03/block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-03/block.js' )\n\t);\n\twp_enqueue_script(\n\t\t'gutenberg-boilerplate-es5-step04',\n\t\tplugins_url( 'step-04/block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-04/block.js' )\n\t);\n\n\twp_enqueue_script(\n\t\t'aa-tweet',\n\t\tplugins_url( 'tweet/block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'tweet/block.js' )\n\t);\n\n\t// Block styles for the editor.\n\twp_enqueue_style(\n\t\t'gutenberg-boilerplate-es5-step02-editor',\n\t\tplugins_url( 'step-02/editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-02/editor.css' )\n\t);\n\twp_enqueue_style(\n\t\t'gutenberg-boilerplate-es5-step03-editor',\n\t\tplugins_url( 'step-03/editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-03/editor.css' )\n\t);\n\twp_enqueue_style(\n\t\t'gutenberg-boilerplate-es5-step04-editor',\n\t\tplugins_url( 'step-04/editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'step-04/editor.css' )\n\t);\n\n\twp_enqueue_style(\n\t\t'aa-tweet-editor',\n\t\tplugins_url( 'tweet/editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'tweet/editor.css' )\n\t);\n}", "public function addBlockToAllowedBlocks($theme_path, $blockName)\n {\n $allowed_blocks_filepath = $theme_path.'admin/SetAllowedBlocks.php';\n\n $allowed_blocks_contents = file_get_contents($allowed_blocks_filepath);\n\n $pattern = \"/acf\\/$blockName/\";\n\n $result = preg_match($pattern, $allowed_blocks_contents);\n\n if ($result) {\n //If already exists abort\n \\WP_CLI::error('Block already added to AllowedBlocks');\n return false;\n }\n\n\n $pattern = \"/public \\$allowedBlocks = \\[[.\\w\\W]*(\\];)/gmU\";\n\n $replace = \" '\\\\App\\\\ACF_Blocks\\\\\".$blockClassName.\"',\";\n\n $replace .= \"\\n ];\";\n\n\n\n $block_service_provider_file_contents = preg_replace(\"/];/\", $replace, $block_service_provider_file_contents);\n $result = file_put_contents($block_service_provider_path, $block_service_provider_file_contents);\n \\WP_CLI::line('Block registration class referenced created in BlockServiceProvider');\n\n\n\n\n \n\n $result = preg_match($pattern, $allowed_blocks_contents);\n }", "function bethel_register_widget_areas() {\n\tunregister_sidebar( 'header-right' ); // Remove the right header widget area\n\tgenesis_register_sidebar (array ('id' => 'header-right-top', 'name' => 'Header Right Top', 'description' => 'The upper widget to the right of the header image.'));\t\n\tgenesis_register_sidebar (array ('id' => 'footer-bottom', 'name' => 'Footer Bottom', 'description' => 'Full-width widget at the very bottom of the page.'));\t\n}", "public function __construct() {\n $this->regions = array(\n \t'block1' => 'block1',\n \t'block2' => 'block2',\n );\n }", "function enqueue_block_scripts() {\n\tif ( DEV_BUILD ) {\n\t\t$block_path = '/build/';\n\t} else {\n\t\t$block_path = '';\n\t}\n\n\twp_enqueue_script(\n\t\tFEM_PREFIX . 'blocks',\n\t\tplugins_url( $block_path . 'index.js', __FILE__ ),\n\t\t[ 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor', 'wp-api-fetch' ],\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . $block_path . 'index.js' ),\n\t\ttrue\n\t);\n\twp_enqueue_style(\n\t\tFEM_PREFIX . 'block-style-front',\n\t\tplugins_url( $block_path . 'style-frontend.css', __FILE__ ),\n\t\t[],\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . $block_path . 'style-frontend.css' )\n\t);\n\twp_enqueue_style(\n\t\tFEM_PREFIX . 'block-style-editor',\n\t\tplugins_url( $block_path . 'index.css', __FILE__ ),\n\t\t[],\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . $block_path . 'index.css' )\n\t);\n\n\t/**\n\t * Icons for mime types\n\t *\n\t * @link https://github.com/dmhendricks/file-icon-vectors/\n\t */\n\t//phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion\n\twp_enqueue_style( 'file-icon-vectors', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/file-icon-vivid.min.css', null, null );\n}", "function tnp_register_block($dir) {\n return TNP_Composer::register_block($dir);\n}", "public function thm_add_reusable_blocks_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Reusable Blocks', 'evt' ),\n\t\t\t'Reusable Blocks',\n\t\t\t'edit_posts',\n\t\t\t'edit.php?post_type=wp_block',\n\t\t\t'',\n\t\t\t'data:image/svg+xml;base64,'.base64_encode('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><path fill=\"black\" d=\"M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z\"></path></svg>'),\n\t\t\t59\n\t\t);\n\t}", "function register_block_core_cover()\n {\n }", "function create_block_react_app_block_init() {\n\tregister_block_type( __DIR__ );\n}", "public function get_registered($block_name, $block_style_name)\n {\n }", "function fuxt_init_custom_block() {\n\n // Abort if ACF function does not exists.\n if( ! function_exists('acf_register_block_type') ) {\n return;\n }\n\n // Register an example \"testimonial\" block.\n acf_register_block_type(array(\n 'name' => 'testimonial',\n 'title' => __('Testimonial'),\n 'description' => __('A custom testimonial block.'),\n 'render_template' => 'template-parts/blocks/testimonial/testimonial.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'testimonial', 'quote' ),\n ));\n}", "function register_block_core_post_content()\n {\n }", "function farmhouse_custom_block_style() {\n\n\tif ( ! function_exists( 'register_block_style' ) ) {\n\t\treturn;\n\t}\n\n\t$names = genesis_get_config( 'block-styles' );\n\n\tforeach ( $names as $name => $styles ) {\n\t\tforeach ( $styles as $style ) {\n\t\t\tregister_block_style( $name, $style );\n\t\t}\n\t}\n\n}", "function register_block_core_heading()\n {\n }", "function sc_enqueue_block_editor_assets() {\n\t\\wp_enqueue_script(\n\t\t'cd2-gutenberg-shortcode-block',\n\t\t\\plugins_url( 'block.build.js', __FILE__ ),\n\t\t[ 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ],\n\t\tfilemtime( \\plugin_dir_path( __FILE__ ) . BLOCK_JS_FILE ),\n\t\ttrue\n\t);\n\n\t\\wp_enqueue_style(\n\t\t'cd2-gutenberg-shortcode-block-css-editor',\n\t\t\\plugins_url( 'editor.css', __FILE__ ),\n\t\t[ 'wp-edit-blocks' ],\n\t\tfilemtime( \\plugin_dir_path( __FILE__ ) . 'editor.css' )\n\t);\n}", "function register_block_core_search()\n {\n }", "public function __construct($blocks, $available_context = array(), $registry = \\null)\n {\n }", "function blocks_scripts() {\n\n\twp_enqueue_script(\n\t\t'blocks',\n\t\tTENUP_SCAFFOLD_TEMPLATE_URL . '/dist/js/blocks.js',\n\t\t[],\n\t\tTENUP_SCAFFOLD_VERSION,\n\t\ttrue\n\t);\n}" ]
[ "0.7944318", "0.7940284", "0.74017155", "0.7388673", "0.7385046", "0.7348771", "0.7309499", "0.7302173", "0.7278604", "0.72688156", "0.72652555", "0.7245643", "0.7095067", "0.70712817", "0.70670027", "0.69964504", "0.6961915", "0.69473207", "0.6946324", "0.6918326", "0.6899397", "0.688504", "0.6866741", "0.68083626", "0.67403716", "0.6719488", "0.66873574", "0.66040546", "0.65658575", "0.6552018", "0.6471213", "0.64671445", "0.64654773", "0.64595705", "0.64492947", "0.6448496", "0.64459574", "0.64443654", "0.64396864", "0.64304334", "0.64142394", "0.63937503", "0.6390456", "0.63518465", "0.63483363", "0.6322732", "0.6317418", "0.6284311", "0.62840354", "0.62819177", "0.6281188", "0.62537295", "0.6244625", "0.6244251", "0.6221577", "0.620834", "0.6150899", "0.60882497", "0.608464", "0.60725945", "0.6060088", "0.6031713", "0.6029977", "0.6023476", "0.6013902", "0.6010556", "0.6003667", "0.59883", "0.5963233", "0.596293", "0.5942598", "0.59252757", "0.5924547", "0.59132946", "0.59121406", "0.59107274", "0.5894524", "0.5893126", "0.5885325", "0.5881816", "0.5874638", "0.5863904", "0.58530396", "0.58511084", "0.58447796", "0.5831107", "0.581747", "0.58171993", "0.58138984", "0.57922494", "0.578754", "0.5765254", "0.5760843", "0.57521945", "0.57470214", "0.57366574", "0.5735245", "0.57331973", "0.57290125", "0.5721945" ]
0.7379821
5
Format Gutenberg block data to appear in the component template and render it.
public function render_block_data( $attributes ) { $type = ! empty( $attributes['newsletter'] ) ? 'newsletter' : 'subscribe'; $this->set_setting( 'type', $type ); $this->set_setting( 'layout', 'inline' ); $this->set_setting( 'newsletter', $attributes['newsletter_list'] ?? '' ); $this->set_data( 'title', $attributes['title'] ?? 'Test' ); $this->set_data( 'description', $attributes['cta_text'] ?? 'Whatever' ); $this->set_data( 'button_text', $attributes['cta_button_text'] ?? '' ); return ai_partial( [ 'slug' => $this->get_component_path( $this->setting( 'type' ) ), 'return' => true, 'variables' => [ 'component' => $this, 'stylesheet' => $this->slug, ], ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render( $block_data )\n\t{\n\t\treturn \"<\".$block_data['header_type'].\">\".$block_data['h_content'].\"</\".$block_data['header_type'].\">\";\n\t}", "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 render_block($parsed_block)\n {\n }", "function render_block($block)\r\n {\r\n $personal_messenger_block = PersonalMessengerBlock :: factory($this, $block);\r\n return $personal_messenger_block->run();\r\n }", "function get_the_block_template_html()\n {\n }", "public function renderBlockData($blockData)\n {\n $logTxt = __($blockData['description']) . ' | ' .\n __('BLOCK : ') . $blockData['class'] . ' | ' .\n __('CACHE KEY : ') . $blockData['cacheKey'] . ' | ' .\n __('CACHE LIFETIME : ') . $blockData['cacheLifetime'] . ' | ' .\n __('NAME IN LAYOUT : ') . $blockData['nameInLayout'];\n switch ($this->getCacheDebugType()) {\n case 'log':\n $this->cacheDebugLogger->debug($logTxt);\n break;\n case 'frontend':\n echo $logTxt . '<br />';\n break;\n }\n }", "protected function _beforeToHtml()\n {\n $this->prepareBlockData();\n return parent::_beforeToHtml();\n }", "public function render_content() {\n\t\t?>\n\t\t\t<input\n\t\t\t\tid=\"_customize-input-gutenberg_widget_blocks\"\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tvalue=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t<?php $this->link(); ?>\n\t\t\t/>\n\t\t<?php\n\t\tthe_gutenberg_widgets( 'gutenberg_customizer' );\n\t}", "function get_acf_meta_block_format($field_name, $block_name, $post_id) {\n\n\tif (function_exists('get_field_object')) {\n\t\t$field = get_field_object($field_name, $post_id);\n\t}\n\n\t$field_data = array(\n\t\t$field['key'] => $field['value']\n\t);\n\n\t$block_data = array(\n\t\t'name' => \"acf/$block_name\",\n\t\t'data' => $field_data,\n\t);\n\n\t$json_data = json_encode($block_data);\n\n\treturn \"<!-- wp:acf/$block_name $json_data /-->\";\n}", "public function render()\n\t{\n\t\t$title = $this->renderTitle();\n\t\t$subtitle = $this->renderSubtitle();\n\t\t$new = $this->renderNew();\n\n\t\treturn <<<HTML\n<section class=\"block-new\">\n\t<div class=\"container\">\n\t\t<div class=\"container-inner\">\n\t\t\t<div class=\"block-new-layout\">\n\t\t\t\t$title\n\t\t\t\t$subtitle\n\t\t\t\t$new\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</section>\nHTML;\n\t}", "function render_block($block)\r\n {\r\n $block = ProfilerBlock :: factory($this, $block);\r\n return $block->run();\r\n }", "public function renderBlockContent() {\n $plugin_block = $this->blockManager\n ->createInstance('purpose_attributes_report_block', []);\n $access_result = $plugin_block->access($this->currentUser());\n if (is_object($access_result) && $access_result->isForbidden() || is_bool($access_result) && !$access_result) {\n return [];\n }\n $build = $plugin_block->build();\n return $build;\n }", "function vsau_block_render( $attributes ) {\n\t$aboutUsImage = ( ! empty( $attributes['aboutUsImage'] ) ) ? $attributes['aboutUsImage'] : '';\n\tob_start();\n\t?>\n\t<section class=\"about-us\">\n\t\t<div class=\"mission-area\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-12 text-center\">\n\t\t\t\t\t\t<h2 class=\"section-heading\"><?php echo wp_kses_post( ( ! empty( $attributes['sectionHeading'] ) ) ? $attributes['sectionHeading'] : __( 'About', 'vape-smoke' ) ); ?></h2>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"mission-area-content\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-6 pr-md-0\">\n\t\t\t\t\t\t\t<img src=\"<?php echo esc_url( $aboutUsImage ); ?>\" alt=\"abt us image\" class=\"w-100\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"mission-area-text col-md-6\">\n\t\t\t\t\t\t\t<p><?php echo esc_html( ( ! empty( $attributes['aboutUsDescription'] ) ) ? $attributes['aboutUsDescription'] : '' ); ?></p>\n\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( ( ! empty( $attributes['readMoreButtonLink'] ) ) ? $attributes['readMoreButtonLink'] : '' ); ?>\">\n\t\t\t\t\t\t\t\t<button class=\"btn\"><?php echo esc_html( ( ! empty( $attributes['readMoreButtonText'] ) ) ? $attributes['readMoreButtonText'] : __( 'Read More', 'vape-smoke' ) ); ?></button>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n\t<?php\n\treturn ob_get_clean();\n}", "public function render()\r\n\t{\r\n\t\t// The formatted result has not been generated yet\r\n\t\tif( empty($this->result) )\r\n\t\t{\r\n\t\t\t// Generate the result using the default format for the chosen template\r\n\t\t\t$this->format('{+BALANCE}');\r\n\t\t}\r\n\r\n\t\t// Prepare item data for template\r\n\t\t$item = get_object_vars($this);\r\n\t\tunset($item['template'], $item['options']);\r\n\r\n\t\t// Load the chosen template\r\n\t\t$template = new ThumbsUp_Template(THUMBSUP_DOCROOT.'templates/'.$this->template.'.php');\r\n\r\n\t\t// Pass on all item data to the template\r\n\t\t$template\r\n\t\t\t->set('item', (object) $item)\r\n\t\t\t->set('template', $this->template)\r\n\t\t\t->set('options', (object) $this->options);\r\n\r\n\t\t// Render the template output\r\n\t\treturn $template->render();\r\n\t}", "function render_block_core_block($attributes)\n {\n }", "function render_block_core_post_template($attributes, $content, $block)\n {\n }", "public static function createInlineBlock($component_data) {\n switch ($component_data['field_identifier']) {\n case 'featured_highlight':\n case 'featured_highlight_a':\n case 'featured_highlight_b':\n case 'featured_highlight_c':\n $block_definition = FeaturedHighlight::createBlockDefinition($component_data);\n break;\n\n case 'flex_content_area_a':\n case 'flex_content_area_b':\n $block_definition = FlexContentArea::createBlockDefinition($component_data);\n break;\n\n case 'hero':\n $block_definition = Hero::createBlockDefinition($component_data);\n break;\n\n case 'image_link_a':\n case 'image_link_b':\n $block_definition = ImageLink::createBlockDefinition($component_data);\n break;\n\n case 'promo_list':\n $block_definition = PromoLists::createBlockDefinition($component_data);\n break;\n\n case 'promo_unit':\n $block_definition = PromoUnits::createBlockDefinition($component_data);\n break;\n\n case 'photo_content_area':\n $block_definition = PhotoContentArea::createBlockDefinition($component_data);\n break;\n\n case 'quick_links':\n $block_definition = QuickLinks::createBlockDefinition($component_data);\n break;\n\n case 'resource':\n $block_definition = Resource::createBlockDefinition($component_data);\n break;\n\n case 'social_links':\n $block_definition = SocialLinks::createBlockDefinition($component_data);\n break;\n\n case 'wysiwyg_a':\n case 'wysiwyg_b':\n case 'wysiwyg_c':\n case 'wysiwyg_d':\n $block_definition = BasicBlock::createBlockDefinition($component_data);\n break;\n\n case 'moody_showcase':\n $block_definition = MoodyShowcase::createBlockDefinition($component_data);\n break;\n\n case 'tabs':\n $block_definition = MoodyFlexTabs::createBlockDefinition($component_data);\n break;\n\n }\n if (!isset($block_definition)) {\n return FALSE;\n }\n\n // For each block type to migrate, add a callback like the one above.\n try {\n $block = BlockContent::create($block_definition);\n $block->save();\n return $block;\n }\n catch (EntityStorageException $e) {\n \\Drupal::logger('utexas_migrate')->warning(\"Import of :block_type failed: :error - Code: :code\", [\n ':block_type' => $component_data['block_type'],\n ':error' => $e->getMessage(),\n ':code' => $e->getCode(),\n ]);\n }\n }", "function dj_render_block_team( $attributes, $content ) {\n\n\t$blockOutput = '';\n\t$thisPageId = get_the_ID();\n\n\t/* block attributes\n \t*-----------------------------------------------------------*/\n\t$className = '';\n\tif ( isset( $attributes['className'] ) ) {\n\t\t$className .= ' ' . $attributes['className'];\n\t}\n\n\t$align = '';\n\tif ( isset( $attributes['align'] ) ) {\n\t\t$className .= ' align' . $attributes['align'];\n\t}\n\n\t$term = '';\n\tif ( isset( $attributes['term'] ) ) {\n\t\t$term .= $attributes['term'];\n\t}\n\n\t$content_display = '';\n\tif ( isset( $attributes['toggleContent'] ) ) {\n\t\t$content_display .= $attributes['toggleContent'];\n\t}\n\n\t$range_columns = '';\n\tif ( isset( $attributes['rangeColumns'] ) ) {\n\t\t$range_columns .= $attributes['rangeColumns'];\n\t}\n\n\t$readmore = '';\n\tif ( isset( $attributes['readmore'] ) ) {\n\t\t$readmore .= $attributes['readmore'];\n\t}\n\n\t$quote_display = '';\n\tif ( isset( $attributes['toggleQuote'] ) ) {\n\t\t$quote_display = $attributes['toggleQuote'];\n\t}\n\n\t$blockOutput .= '<div class=\"wp-block-cgb-team row'.$className.'\">';\n\t/* ----------------------------------------------------------\n\t* \tteam members - the loop\n\t*-----------------------------------------------------------*/\n\n\tglobal $post;\n\t$args = array(\n 'post_type' \t\t=> 'team-member',\n 'posts_per_page' \t=> '-1',\n 'orderby' \t\t\t=> 'menu_order',\n 'order' \t\t\t=> 'ASC'\n\t);\n\t\n\tif ( isset( $attributes['term'] ) ) {\n\t\t$args['team-committee'] = $term;\n\t}\n\n\t$loop = new WP_Query($args);\n\n\t$counter = 0;\n\t$total_posts = $loop->post_count;\n\t\n\tif ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();\n\n\t\t$img_url = wp_get_attachment_image_url( get_post_thumbnail_id( $post->ID ), 'large');\n\t\t$img_srcset = wp_get_attachment_image_srcset( get_post_thumbnail_id( $post->ID ), 'large' );\n\t\t$img_alt = get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true);\n\t\tif (!$img_alt) { $img_alt = get_the_title($post->ID); }\n\t\t\n\t\tif ($content_display == false) {\n\t\t\t$content = apply_filters('the_content', ( get_post($post->ID)->post_excerpt) );\n\t\t} else {\n\t\t\t$content = apply_filters('the_content', ( get_post($post->ID)->post_content) );\n\t\t}\n\t\t\n\t\t$title = get_the_title($post->ID);\n\t\t$url = get_permalink($post->ID);\n\t\t\n\t\t$job_title = get_post_meta( get_the_ID(), 'team-title', true );\n\t\t$linkedin = get_post_meta( get_the_ID(), 'linkedin-href', true );\n\t\t$team_member_quote = get_post_meta( get_the_ID(), 'team-member-quote', true );\n\n\t\t$column_class = 'col-sm-6';\n\t\tif ($range_columns == 3) {\n\t\t\t$column_class = 'col-lg-4 col-md-6';\n\t\t} else if ($range_columns == 2) {\n\t\t\t$column_class = 'col-sm-6';\n\t\t}\n\n\t\tif ($quote_display == false) {\n\t\t\t$quote = '';\n\t\t} else {\n\t\t\tif ($team_member_quote) {\n\t\t\t\t$quote = '<blockquote class=\"wp-block-quote is-style-default\"><p>'.$team_member_quote.'</p></blockquote>';\n\t\t\t} else {\n\t\t\t\t$quote = '';\n\t\t\t}\n\t\t}\n\n\t\t$card_title_class = 'card-title text-center';\n\t\tif (!$job_title) {\n\t\t\t$card_title_class .= ' short-underline';\n\t\t}\n\t\t\n\t\t\n\t\t/* card content\n\t\t*-----------------------------------------------------------*/\n\t\t\t$blockOutput .= '<div class=\"card-column '.$column_class.'\"><div class=\"card h-100\">\n\t\t\t\t\t\t\t<figure class=\"card-img-top\">\n\t\t\t\t\t\t\t\t<img src=\"'. esc_url( $img_url ).'\"\n\t\t\t\t\t\t\t\t\tsrcset=\"'.esc_attr( $img_srcset ).'\"\n\t\t\t\t\t\t\t\t\tsizes=\"(max-width: 50em) 100vw, 100%\" class=\"\" alt=\"'.esc_attr( $img_alt ).'\">\n\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t\t<div class=\"card-body\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h3 class=\"'.$card_title_class.'\">'.$title.'</h3>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $job_title ) {\n\t\t\t\t\t\t\t\t\t$blockOutput .= '<p class=\"card-text job-title text-center\">'.$job_title.'</p>';\n\t\t\t\t\t\t\t\t} \n\n\t\t\t\t\t\t\t\tif ($linkedin) {\n\t\t\t\t\t\t\t\t\t$blockOutput .= '<a href=\"'.$linkedin.'\" class=\"linkedin-href text-center\" target=\"_blank\"><i class=\"fab fa-linkedin\"><span class=\"sr-only\">Linkedin Icon</span></i></a>';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$blockOutput .= $quote;\n\n\t\t\t\t\t\t\t\t$blockOutput .= $content;\n\n\t\t\t\t\t\t\t$blockOutput .= '</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div></div>';\n\t\t\n\n\tendwhile; else:\n\tendif;\n\twp_reset_postdata();\n$blockOutput .= '</div>';\n\n\n\treturn $blockOutput;\n}", "public function renderContent( $data, $block, $edit ){\n\t\t\n\t\t$providers\t\t\t= ZbrochureContentContacts::getProviders();\n\t\t$contacts\t\t\t= ZbrochureContentContacts::getContacts();\n\t\n\t\t$randomid\t\t\t= rand();\n\t\n\t\t$this->_output\t\t= '';\n\t\t$this->_edit_output\t= '';\n\t\t\n\t\t$selected\t\t\t= json_decode( $data->data );\n\t\t\n\t\t$this->_output .= '<div id=\"textblock-'.$randomid.'\" class=\"editable-content\">'.PHP_EOL;\n\t\t\n\t\t$this->_output .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"package-table\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_output .= '<thead>'.PHP_EOL;\n\t\t\t$this->_output .= '<tr class=\"package-header\">'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_ADMINISTRATOR' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_BENEFIT' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_PHONE' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_WEBSITE' ).'</th>'.PHP_EOL;\n\t\t\t$this->_output .= '</tr>'.PHP_EOL;\n\t\t\t$this->_output .= '</thead>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_output .= '<tbody>'.PHP_EOL;\n\t\t\t\n\t\t\tforeach( $selected as $c ){\n\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\n\t\t\t\tforeach( $contacts as $active ){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif( $active->contact_id === $c ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$alt = ($i % 2) ? 'alternative-row-0' : 'alternative-row-1';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_output .= '<tr class=\"package-plan-row '.$alt.'\">'.PHP_EOL;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->provider_name.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_name.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_phone.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_email.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_output .= '</tr>'.PHP_EOL;\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$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$this->_output .= '</tbody>'.PHP_EOL;\t\n\t\t\n\t\t$this->_output .= '</table>'.PHP_EOL;\n\t\t\n\t\t$this->_output .= '</div>'.PHP_EOL;\n\t\t\n\t\tif( $edit == 1 ){\n\t\t\n\t\t\t//**************** Start Dialog\t****************//\n\t\t\t$this->_edit_output .= '<div id=\"edittext-'.$randomid.'\" title=\"Edit Contact Block\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<form action=\"index.php?option=com_zbrochure&task=saveBlock\" method=\"post\">'.PHP_EOL;\n\t\t\t\n\t\t\t$alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"letter-picker-container\"><div class=\"letter-picker\"><ul>'.PHP_EOL;\n\t\t\t\n\t\t\tforeach( $alphabet as $letter ){\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<li><a onclick=\"$(\\'.auto-scroll\\').scrollTo($(\\'#'.$letter.'\\'), 400);\" id=\"letter-'.$letter.'\" href=\"javascript:void(0);\">'.$letter.'</a></li>'.PHP_EOL;\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->_edit_output .= '</ul></div></div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"auto-scroll\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row text-container\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row package-container-header\">'.PHP_EOL;\n\t\t\t\n\t\t\t\n\t\t\t//$this->_edit_output .= '<input type=\"text\" name=\"data['.$block->content_type_folder.']['.$data->id.']\" class=\"inputbox\" value=\"'.$data->data.'\" style=\"width:97%\" />';\n\t\t\t\n\t\t\t$lettersort = '';\n\t\t\t$lettersused = array();\n\t\t\t\n\t\t\tforeach( $providers as $provider ){\n\t\t\t\t\n\t\t\t\t//Give the containing div of a provider an ID if it's the first with this letter\n\t\t\t\tif( !$lettersort ){\n\t\t\t\t\t$lettersort = substr($provider->provider_name, 0,1);\n\t\t\t\t\t$lettersused[] = $lettersort;\n\t\t\t\t\t$this->_edit_output .= '<div id=\"'.$lettersort.'\" class=\"contact-item\">'.PHP_EOL;\n\t\t\t\t}else{\n\t\t\t\t\t$newletter = substr($provider->provider_name, 0,1);\n\t\t\t\t\tif( ucfirst($lettersort) != ucfirst($newletter) ){\n\t\t\t\t\t\t$lettersort = ucfirst($newletter);\n\t\t\t\t\t\t$lettersused[] = $lettersort;\n\t\t\t\t\t\t$this->_edit_output .= '<div id=\"'.$lettersort.'\" class=\"contact-item\">';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_edit_output .= '<div class=\"contact-item\">'.PHP_EOL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<h3>'.$provider->provider_name.'</h3>'.PHP_EOL;\n\t\t\t\t\n\t\t\t\tif( !empty($contacts) ){\n\t\t\t\t\n\t\t\t\t\tforeach( $contacts as $contact ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $provider->provider_id === $contact->provider_id ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach( $selected as $nd ){\n\t\t\t\t\t\t\t\tif( $nd === $contact->contact_id ){\n\t\t\t\t\t\t\t\t\t$checked = 'checked';\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\tif( $checked ){\n\t\t\t\t\t\t\t\t$this->_edit_output .= '<label><input checked=\"'.$checked.'\" type=\"checkbox\" name=\"content[data][]\" value=\"'.$contact->contact_id.'\" /> '.$contact->contact_name.'</label><br />'.PHP_EOL;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->_edit_output .= '<label><input type=\"checkbox\" name=\"content[data][]\" value=\"'.$contact->contact_id.'\" /> '.$contact->contact_name.'</label><br />'.PHP_EOL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tunset($checked);\n\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\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->_edit_output .= 'There are no contacts for this provider.'.PHP_EOL;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row btn-container add-padding\" style=\"margin:10px 0\">\n\t\t\t\t\t\t\t\t\t\t<button class=\"btn save-btn fr\" type=\"submit\"><span>Save</span></button>\n\t\t\t\t\t\t\t\t\t\t<button class=\"btn cancel-btn fr\" onclick=\"location.reload(); return false;\"><span>Cancel</span></button>\n\t\t\t\t\t\t\t\t\t</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output\t.= '<input type=\"hidden\" name=\"content[id]\" value=\"'.$data->id.'\" />'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"content_block_id\" value=\"'.$block->content_block_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_block_type\" value=\"'.$block->content_block_type.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_bro_id\" value=\"'.$block->content_bro_id.'\" type=\"hidden\" />'.PHP_EOL;\t\t\n\t\t\t$this->_edit_output .= '<input name=\"view\" value=\"'.JRequest::getVar('view').'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_id\" value=\"'.$block->bro_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_id\" value=\"'.$block->bro_page_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_order\" value=\"'.$block->bro_page_order.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '</form>'.PHP_EOL;\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t//**************** End Dialog ****************//\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '<script type=\"text/javascript\">\n\t\t\t\n\t\t\t\t\t\t\t\t\t$(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#textblock-'.$randomid.'\" ).click(function(){\n\t\t\t\t\t\t\t\t\t\t\t$(\"#edittext-'.$randomid.'\").dialog(\\'open\\');\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#edittext-'.$randomid.'\" ).dialog({\n\t\t\t\t\t\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\t\t\t\t\t\tresizable: true,\n\t\t\t\t\t\t\t\t\t\t\theight:420,\n\t\t\t\t\t\t\t\t\t\t\twidth:700,\n\t\t\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\t\t\tclose: function(){}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</script>'.PHP_EOL;\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<script type=\"text/javascript\">'.PHP_EOL;\n\t\t\t\t\n\t\t\t\tforeach( $lettersused as $letterused ){\n\t\t\t\t\n\t\t\t\t\t$this->_edit_output .= '$(document).ready(function(){$(\"#letter-'.$letterused.'\").addClass(\"available\")});'.PHP_EOL;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '</script>'.PHP_EOL;\n\n\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$output->render = $this->_output;\n\t\t$output->edit\t= $this->_edit_output;\n\t\t\t\t\n\t\treturn $output;\n\t\n\t}", "public function renderBlock(UserInterface $user, $subpage) {\n switch ($subpage) {\n case 'summary':\n $content = [\n '#theme' => 'contacts_summary',\n '#content' => [\n 'left' => '<div><h2>Contact Summary</h2><p>This block contains a summary of information about the contact.</p></div>',\n 'right' => '<div><h2>Summary Operations</h2><p>This block contains a list of useful operations to perform on the contact.</p></div>',\n ],\n '#attached' => [\n 'library' => ['contacts/contacts-dashboard'],\n ],\n ];\n break;\n\n case 'indiv':\n $content = [\n '#theme' => 'contacts_indiv',\n '#content' => [\n 'middle' => '<div><h2>Individual Information</h2><p>This block contains information about the individual, such as date of birth and gender.</p></div>',\n ],\n '#attached' => [\n 'library' => ['contacts/contacts-dashboard'],\n ],\n ];\n break;\n\n case 'notes':\n $content = [\n '#theme' => 'contacts_notes',\n '#content' => [\n 'middle' => '<div><h2>Contact Notes</h2><p>This block contains notes made about the contact by staff members.</p></div>',\n ],\n '#attached' => [\n 'library' => ['contacts/contacts-dashboard'],\n ],\n ];\n break;\n\n default:\n $content = ['#markup' => $this->t('Page not found')];\n }\n\n return $content;\n }", "public static function renderBlock( $fields = null, $attributes = null, $inner_blocks = null ) {\n echo '<div class=\"' . Plugin::PLUGIN_NAME . '_container\" data-formid=\"' . $fields['form'] . '\"></div>';\n }", "function render_block_core_file($attributes, $content, $block)\n {\n }", "function render_block_core_template_part($attributes)\n {\n }", "function render_block ( $template = null, $block = null, $data = array() ) {\r\n if ( empty( $template ) || empty( $block ) ) {\r\n return false;\r\n }\r\n\r\n if ( strpos( $template, config_item( 'twig_extension') ) === false ) {\r\n $template .= $this->CI->config->item( 'twig_extension' );\r\n }\r\n\r\n $template = $this->_twig->loadTemplate( $template );\r\n\r\n return ( $template->hasBlock( $block ) ) ? $template->renderBlock( $block, $data ) : false;\r\n }", "public function render()\n\t{\n\t\t$template = $this->template;\n\t\t$template->setFile( __DIR__ . '/dataGrid.latte' );\n\n\t\t$template->grid = $this;\n\t\t$template->stencils = $this->stencils;\n\t\t$template->actionWidth = $this->actionWidth;\n\t\t$template->actitle = $this->actitle;\n\t\t$template->acfooter = $this->acfooter;\n\t\t$template->cmd = self::CMD;\n\t\t$template->labels = $this->labels;\n\t\t$template->columns = $this->columns;\n\t\t$template->key = $this->key;\n\t\t$template->isSorting = $this->isSorting();\n\t\t$template->isFiltering = $this->isFiltering();\n\t\t$template->isAdding = $this->isAdding();\n\t\t$template->isRemoving = $this->isRemoving();\n\t\t$template->isEditing = $this->isEditing();\n\t\t$template->hasActions = $this->hasActions();\n\t\t$template->sortable = $this->sortable;\n\t\t$template->sorting = $this->sorting;\n\t\t$template->filtering = $this->filtering;\n\t\t$template->id = $this->id;\n\t\t$template->pgbtn = $this->getPagerButtons();\n\t\t$template->currentPage = $this->getCurrentPage();\n\t\t$template->rowsPerPage = $this->getRowsPerPage();\n\t\t$template->pageCount = $this->getPageCount();\n\n\t\tif ( count( $this->dataSnippet ) ) $template->data = $this->dataSnippet;\n\t\telse $template->data = $this->getData();\n\n\t\t$template->render();\n\t}", "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 render() {\n\t\t$content = Customify()->get_setting( $this->name );\n\t\techo '<div class=\"builder-header-' . esc_attr( $this->id ) . '-item item--html\">';\n\t\techo apply_filters( 'customify_the_content', wp_kses_post( balanceTags( $content, true ) ) );\n\t\techo '</div>';\n\t}", "protected function RenderHTML()\n\t{\n\t $dispmode = $this->GetDisplayMode();\n\t $this->SetDisplayMode($dispmode->GetMode());\n\n $smarty = BizSystem::GetSmartyTemplate();\n $smarty->assign_by_ref(\"name\", $this->m_Name);\n $smarty->assign_by_ref(\"title\", $this->m_Title);\n $smarty->assign_by_ref(\"formstate\", $this->m_FormState);\n $smarty->assign_by_ref(\"toolbar\", $this->m_ToolBar->Render());\n\n if ($dispmode->m_DataFormat == \"array\") // if dataFormat is array, call array render function\n $smarty->assign_by_ref(\"fields\", $this->RenderArray());\n else if ($dispmode->m_DataFormat == \"table\") // if dataFormat is table, call table render function.\n {\n $smarty->assign_by_ref(\"table\", $this->RenderTable());\n $smarty->assign_by_ref(\"formobj\", $this);\n }\n else if ($dispmode->m_DataFormat == \"block\" && $dispmode->m_FormatStyle)\n $smarty->assign_by_ref(\"block\", $this->RenderFormattedTable());\n\n $smarty->assign_by_ref(\"navbar\", $this->m_NavBar->Render());\n\n\t return $smarty->fetch(BizSystem::GetTplFileWithPath($dispmode->m_TemplateFile, $this->m_Package))\n\t . \"\\n\" . $this->RenderShortcutKeys()\n\t . \"\\n\" . $this->RenderContextMenu();\n\t}", "function vscu_block_render( $attributes ) {\n\t$contact_form = ( ! empty( $attributes['contactForm'] ) ) ? $attributes['contactForm'] : '';\n\tob_start();\n\t?>\n\t<section class=\"contact_us_main\">\n\t\t<div class=\"container\">\n\t\t\t<div class=\"contact-us-content\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-7 ml-auto mr-auto\">\n\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t<?php echo do_shortcode( '[contact-form-7 id=\"' . $contact_form . '\"]' ); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n\t<?php\n\treturn ob_get_clean();\n}", "function wp_render_elements_support($block_content, $block)\n {\n }", "public function renderData();", "public function render()\n\t{\n\t\t// convert json to PHP arrays\n\t\tif(!is_array($this->headers))\n\t\t\t$this->headers = $this->extract_json($this->headers);\n\t\tif(!is_array($this->data))\n\t\t\t$this->data = $this->extract_json($this->data);\n\n\t\t// generate a table of the appropriate type with sub-render method\n\t\t$table_html = $this->{\"render_$this->type\"}();\n\t\t\n\t\t// get the snippets directory if set\n\t\tif($this->snippets_dir && file_exists(\"$this->snippets_dir/table.php\"))\n\t\t\t$snippet = \"$this->snippets_dir/table.php\";\n\t\telse\n\t\t\t$snippet = __DIR__ . \"/snippets/table.php\";\n\t\t\n\t\t// build up the replacements array\n\t\t$replacements = array(\n\t\t\t'body' => $table_html,\n\t\t\t'class' => strlen($this->class)?\"class=\\\"$this->class\\\"\":'',\n\t\t\t'id' => strlen($this->id)?\"id=\\\"$this->id\\\"\":'',\n\t\t\t'caption' => strlen($this->caption)?\"<caption>$this->caption</caption>\":'',\n\t\t);\n\t\t\n\t\t$html = \\helpers\\html\\html::load_snippet($snippet, $replacements);\n\n\t\treturn $html;\n\t}", "function render_block_core_post_content($attributes, $content, $block)\n {\n }", "public function render()\n {\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000874 begin\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000874 end\n }", "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 }", "public function getBlockTemplate(array $params);", "public function getRendering(){\r\n return Mage::getSingleton('core/layout')\r\n ->createBlock('CrmTicket/Admin_Tag_Rendering')\r\n ->setTemplate('CrmTicket/Tag/Rendering.phtml')\r\n ->setTag($this)\r\n ->toHtml();\r\n }", "protected function render() {\n\t\tglobal $product;\n\t\t$product_id = $product->get_id();\n\t\t$settings = $this->get_settings_for_display();\n\t\t$this->add_inline_editing_attributes( 'content', 'advanced' );\n\t\t?>\n\t\t<div class=\"product-page-header-widget\">\n\t\t\t<div class=\"content-inner\">\n\t\t\t\t<div class=\"product-page-header\" style=\"background:url(<?= $settings['image']['url'] ?>) no-repeat center center;\">\n\t\t\t\t\t<div class=\"pph-content\">\n\t\t\t\t\t\t<div class=\"pph-content-inner\">\n\t\t\t\t\t\t\t<div class=\"pph-wrapper\">\n\t\t\t\t\t\t\t\t<div class=\"triangle-strip\">\n\t\t\t\t\t\t\t\t\t<div class=\"t1\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t2\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t3\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t4\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"text-wrapper\">\n\t\t\t\t\t\t\t\t\t<h2 class=\"p-name\"><?= $product->get_name() ?></h2>\n\t\t\t\t\t\t\t\t\t<div class=\"text-wysiwyg\">\n\t\t\t\t\t\t\t\t\t\t<?= wpautop( $settings['content'] ) ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<a href=\"<?= do_shortcode('[add_to_cart_url id=\"'.$product_id.'\"]'); ?>\" data-quantity=\"1\" data-product_id=\"<?= $product_id ?>\" class=\"add-to-cart-btn w-btn\">BUY NOW</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function run()\n {\n $template = $this->_template;\n $positions = $template->getPositions();\n $assigned = [];\n foreach (Yii::$app->big->getFrontendThemePositions() as $name => $title) {\n $item = [\n 'title' => $title,\n 'blocks' => [],\n ];\n if (isset($positions[$name])) {\n $item['blocks'] = $this->getBlocks($positions[$name]);\n }\n $assigned[$name] = $item;\n }\n\n $this->registerScripts();\n\n return $this->render($this->viewFile, [\n 'availableBlocks' => $this->blocks,\n 'assignedBlocks' => $assigned,\n 'columns' => $this->columns,\n 'id' => $this->id,\n ]);\n }", "public function render_content_block ( $atts ) {\n // check for content block id\n $type = get_post_meta( $atts['id'], 'yali_cb_type', true );\n if( empty($type) ) {\n return;\n }\n\n return call_user_func( array( $this, 'render_' . $type ), $atts );\n }", "public function render()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'render content of display class',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $blocks = array();\n foreach ($this->DISPLAY as $key => $val) {\n\n if ($key === 'core') {\n continue;\n }\n\n if ($this->block){ \n if (isset($this->block[$key])) {\n if (!isset($blocks[$this->block[$key]])) {\n $blocks[$this->block[$key]] = '';\n }\n\n $blocks[$this->block[$key]] .= $val;\n }\n }\n\n $this->DISPLAY['core'] = str_replace(\n '{;mod;' . $key . ';}',\n $val,\n $this->DISPLAY['core']\n );\n unset($this->DISPLAY[$key]);\n }\n\n foreach($blocks as $blockName => $blockContent){\n $this->DISPLAY['core'] = str_replace(\n '{;block;' . $blockName . ';}',\n $blockContent,\n $this->DISPLAY['core']\n );\n }\n\n $this->_link('css');\n $this->_link('js');\n $this->_session();\n\n $this->DISPLAY = $this->DISPLAY['core'];\n\n $this->_path();\n $this->_clean();\n $this->_compress();\n\n if (!(bool)$this->_options['debug']) {\n ob_clean();\n }\n return $this->DISPLAY;\n }", "function my_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\n\tblock($slug, $block);\n}", "public static function getBlockRenderList()\n {\n return ['onePageBlock'];\n }", "public static function get_block_data()\n {\n }", "function render_block_core_widget_group($attributes, $content, $block)\n {\n }", "function my_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t// include a template part from within the \"template-parts/block\" folder\n\tif( file_exists( get_theme_file_path(\"/templates/block/{$slug}.php\") ) ) {\n\t\tinclude( get_theme_file_path(\"/templates/block/{$slug}.php\") );\n\t}\n}", "function wp_render_duotone_support($block_content, $block)\n {\n }", "public function render()\n {\n return view('netflex-pages::blocks');\n }", "public function displayAjaxSaveBlockContent()\n {\n $errors = [];\n\n $picto = Tools::getValue('picto');\n $id_block = empty(Tools::getValue('id_block')) ? null : Tools::getValue('id_block');\n $type_link = (int) Tools::getValue('typelink');\n $id_cms = Tools::getValue('id_cms');\n $psr_languages = (array) json_decode(Tools::getValue('lang_values'));\n\n $blockPsr = new ReassuranceActivity($id_block);\n if (!$id_block) {\n // Last position\n $blockPsr->position = Db::getInstance()->getValue('SELECT MAX(position) AS max FROM ' . _DB_PREFIX_ . 'psreassurance');\n $blockPsr->position = $blockPsr->position ? $blockPsr->position + 1 : 1;\n $blockPsr->status = false;\n }\n $blockPsr->handleBlockValues($psr_languages, $type_link, $id_cms);\n $blockPsr->icon = $picto;\n if (empty($picto)) {\n $blockPsr->custom_icon = '';\n }\n $blockPsr->date_add = date('Y-m-d H:i:s');\n $blockPsr->date_update = date('Y-m-d H:i:s');\n\n if (isset($_FILES) && !empty($_FILES)) {\n $customImage = $_FILES['file'];\n $fileTmpName = $customImage['tmp_name'];\n $filename = $customImage['name'];\n\n // validateUpload return false if no error (false -> OK)\n $validUpload = ImageManager::validateUpload($customImage);\n if (is_bool($validUpload) && $validUpload === false) {\n move_uploaded_file($fileTmpName, $this->module->folder_file_upload . $filename);\n $blockPsr->custom_icon = $this->module->img_path_perso . '/' . $filename;\n $blockPsr->icon = '';\n } else {\n $errors[] = $validUpload;\n }\n }\n if (empty($errors)) {\n if ($id_block) {\n $blockPsr->update();\n } else {\n $blockPsr->add();\n }\n }\n\n // Response\n $this->ajaxRenderJson(empty($errors) ? 'success' : 'error');\n }", "function groom_block_info()\n{\n $blocks['groom_calendar_standard'] = array(\n 'info' => t('Calendrier Groom - Standard'),\n );\n $blocks['groom_calendar_solo'] = array(\n 'info' => t('Calendrier Groom - Solo'),\n );\n $blocks['groom_calendar_vip'] = array(\n 'info' => t('Calendrier Groom - VIP'),\n );\n\n return $blocks;\n}", "function data($data_block, $raw_mode=FALSE) {\n list($provider, $block_name) = explode('/', $data_block, 2);\n //Intstantiate the provider\n $o = $this->repository($provider);\n $repos = @$this->repositories[$provider];\n if (isset($repos['enabled']) && !$repos['enabled']) {\n return '';\n }\n //Populate user callback.\n if (isset($repos['user callback'])) {\n $user_fn = $repos['user callback'];\n if (is_callable($user_fn)) {\n $current_user = $user_fn();\n Frx::Data()->setValue('current_user', $current_user);\n }\n }\n\n\n $xml = '';\n if ($o) {\n $access = TRUE;\n $block = $this->loadBlock($data_block);\n $right = @$block['access'];\n if ($block && $o->access($right)) {\n if ($raw_mode) $block['options']['return_type'] = 'raw';\n switch ($block['type']) {\n case 'sql':\n $xml = $o->sqlData($block['source'], @$block['options']);\n break;\n case 'xml':\n $xml = $o->xmlData($block['source']);\n break;\n case 'php':\n $data = Frx::Data()->currentContextArray();\n $xml = $o->phpData($block['object'], $data );\n break;\n }\n\n }\n return $xml;\n }\n else {\n return '';\n }\n }", "protected function _toHtml()\n {\n // Check the payment method is active, block duplicate rendering of this block\n if (Mage::helper('gene_braintree')->isSetupRequired() &&\n !Mage::registry('gene_js_loaded_' . $this->getTemplate())\n ) {\n Mage::register('gene_js_loaded_' . $this->getTemplate(), true);\n\n return parent::_toHtml();\n }\n\n return '';\n }", "public static function render_duotone_support($block_content, $block, $wp_block)\n {\n }", "public function testGetRenderBlockTemplate()\n {\n $methodData = [];\n $priceCode = 'price_test';\n $type = 'simple';\n $className = \\Magento\\Framework\\View\\Element\\Template\\Context::class;\n $template = false;\n $data = [\n $type => [\n 'prices' => [\n $priceCode => [\n 'render_class' => $className,\n 'render_template' => $template,\n ],\n ],\n ],\n ];\n\n $priceInfoMock = $this->getMockBuilder(\\Magento\\Framework\\Pricing\\PriceInfo\\Base::class)\n ->disableOriginalConstructor()\n ->getMock();\n $priceInfoMock->expects($this->once())\n ->method('getPrice')\n ->with($this->equalTo($priceCode))\n ->will($this->returnValue($this->priceMock));\n $this->productMock->expects($this->once())\n ->method('getTypeId')\n ->will($this->returnValue($type));\n $this->productMock->expects($this->once())\n ->method('getPriceInfo')\n ->will($this->returnValue($priceInfoMock));\n\n $renderBlock = $this->getMockBuilder(\\Magento\\Framework\\Pricing\\Render\\PriceBox::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $testedClass = $this->createTestedEntity($data);\n\n $arguments = [\n 'data' => $methodData,\n 'rendererPool' => $testedClass,\n 'price' => $this->priceMock,\n 'saleableItem' => $this->productMock,\n ];\n $this->layoutMock->expects($this->once())\n ->method('createBlock')\n ->with($this->equalTo($className), $this->equalTo(''), $this->equalTo($arguments))\n ->will($this->returnValue($renderBlock));\n\n $result = $testedClass->createPriceRender($priceCode, $this->productMock, $methodData);\n $this->assertInstanceOf(\\Magento\\Framework\\Pricing\\Render\\PriceBoxRenderInterface::class, $result);\n }", "public function getBlock(){\n\t\n\t\tif( empty($this->_block) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 'b.*, t.*, u.*, m.email AS modified_email, m.username AS modified_username, m.name AS modified_name' );\n\t\t\t\n\t\t\t$query->from( '#__zbrochure_content_blocks AS b' );\n\t\t\t\n\t\t\t$query->join( 'LEFT', '#__users AS u ON u.id = b.content_block_created_by' );\n\t\t\t$query->join( 'LEFT', '#__users AS m ON m.id = b.content_block_modified_by' );\n\t\t\t$query->join( 'LEFT', '#__zbrochure_content_types AS t ON t.content_type_id = b.content_block_type' );\n\t\t\t\n\t\t\t$query->where( 'b.content_block_id = '.$this->_id );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block = $this->_db->loadObject();\n\t\t\t\n\t\t\t$this->_block->render\t= $this->_getContent();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_block;\n\t\n\t}", "function synapsefitness_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t\n\t// include a template part from within the \"template-parts/blocks\" folder\n\tif( file_exists( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") ) ) {\n\t\t\n\t\tinclude( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") );\n\t\n\t}\n}", "public function generate_feed_block()\n\t{\n\t\t$feed = fetch_feed( $this->url );\n\t\t\n\t\tif ( is_wp_error( $feed ) )\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$feed_item_quantity = $feed->get_item_quantity( $this->limit );\n\t\t\n\t\tif ( $feed_item_quantity <= 0 )\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$data = new stdClass();\n\t\t\n\t\t$data->show_title = $this->show_title;\n\t\t$data->show_description = $this->show_description;\n\t\t$data->show_enclosure = $this->show_enclosure;\n\t\t$data->link_active = $this->link_active;\n\t\t$data->link_target = $this->link_target;\n\t\t$data->feed_items = $feed->get_items( 0, $feed_item_quantity );\n\t\t\n\t\tob_start();\n\t\tinclude $this->plugin->path . 'public' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'feed_block.php';\n\t\treturn ob_get_clean();\n\t}", "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 ehh_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t\n\t// include a template part from within the \"template-parts/blocks\" folder\n\tif( file_exists( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") ) ) {\n\t\t\n\t\tinclude( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") );\n\t\n\t}\n}", "public function render($data);", "public function createACFBlock()\n {\n if (function_exists('acf_register_block_type')) {\n acf_register_block_type(\n array(\n 'name' => 'acfBlock',\n 'title' => __('ACF Block'),\n 'description' => __('A custom block that incorporates ACF fields.'),\n 'render_callback' => array($this, 'renderACFBlock'),\n 'category' => 'widgets',\n 'icon' => array('background' => '#ecf6f6', 'src' => 'email'),\n 'keywords' => array('example', 'acf'),\n 'mode' => 'edit'\n )\n );\n }\n }", "public abstract function render($data);", "public function render()\n\t{\n\t\t$class = $this->renderMarginClass($this->hasMargins);\n\n\t\treturn <<<HTML\n<section class=\"block-divider $class\">\n\t<div class=\"container\">\n\t\t<div class=\"container-inner\">\n\t\t</div>\n\t</div>\n</section>\nHTML;\n\t}", "function render_tut06b_block( $atts, $content ) {\n\n if( function_exists( 'get_current_screen' ) ) { return; }\n\n \n $title = isset( $atts['title']) ? \"<h2>{$atts['title']}</h2>\" : '';\n $image = isset( $atts['mediaURL'] ) ? \"<img src='{$atts['mediaURL']}'>\" : '';\n $ingredients = isset( $atts['ingredients'] ) ? \"<ul>{$atts['ingredients']}</ul>\" : '';\n\n ob_start();\n\n echo \"<div class='recipe'>\n {$title}\n <h4> Ingredients </h4>\n {$ingredients}\n {$image}\n <h4> Steps </h4>\n {$content}\n </div>\";\n\n return ob_get_clean(); // prevent error when updating, I'm honestly not sure how\n}", "protected function render_content()\n {\n $value = $this->value();\n\n\n try {\n $this->value_array = json_decode($value, true);\n\n $this->value_json = $value;\n\n } catch (Exception $e) {\n $this->value_array = array();\n $this->value_json = \"{}\";\n }\n $this->render_default_values();\n\n $this->render_styling();\n }", "function wp_render_typography_support($block_content, $block)\n {\n }", "public function render()\r\n {\r\n parent::render();\r\n $this->fcLoadObjectDetails($this->oModel);\r\n return $this->_sThisTemplate;\r\n }", "private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }", "protected function render_template() {\n\t\t?>\n\n\t\t<li id=\"accordion-section-{{ data.id }}\"\n\t\t\tclass=\"accordion-section control-section control-section-{{ data.type }} cannot-expand\">\n\t\t\t<p class=\"frontpage-sections-upsell\">\n\t\t\t\t<# if ( data.upsell_text ) { #>\n\t\t\t\t\t{{{data.upsell_text}}}\n\t\t\t\t\t<# } #>\n\t\t\t</p>\n\t\t</li>\n\t\t<?php\n\t}", "public function frontend_render(): string\n {\n $all_settings = $this->get_settings();\n $current_lang = LanguageHelper::user_lang_slug();\n $padding_top = SanitizeInput::esc_html($all_settings['padding_top']);\n $padding_bottom = SanitizeInput::esc_html($all_settings['padding_bottom']);\n $custom_form_id = SanitizeInput::esc_html($all_settings['custom_form_id']);\n $title = SanitizeInput::esc_html($all_settings['title_'.$current_lang]);\n\n\n\n $output = '<div class=\"lawyer-contact-area\" data-padding-top=\"'.$padding_top.'\" data-padding-bottom=\"'.$padding_bottom.'\">';\n\n $output .='<div class=\"container\">';\n $output .= '<div class=\"row\">';\n\n $output .= '<div class=\"col-lg-6\"><div class=\"left-contnet-wrap\">\n <ul class=\"lawyer-contact-list\">';\n $this->args['settings'] = RepeaterField::remove_default_fields($all_settings);\n foreach ($this->args['settings'] as $key => $setting){\n if (is_array($setting)){\n $this->args['repeater'] = $setting;\n $array_lang_item = $setting[array_key_last($setting)];\n if (!empty($array_lang_item) && is_array($array_lang_item) && count($array_lang_item) > 0) {\n foreach ($array_lang_item as $index => $value) {\n\n $output .= $this->render_slider_markup($index); // for multiple array index\n }\n } else {\n $output .= $this->render_slider_markup(); // for only one index of array\n }\n }\n }\n\n $output .= '</ul></div></div>'; //contact info column wrap\n\n if (!empty($custom_form_id)){\n $output .= '<div class=\"col-lg-6\"> <div class=\"right-content-wrap\"><h3 class=\"title\">'.$title.'</h3>';\n $form_details = FormBuilder::find($custom_form_id);\n $output .= FormBuilderCustom::render_form(optional($form_details)->id,null,null,'boxed-btn');\n $output .= '</div></div>';\n }\n\n $output .= ' </div> </div></div>';\n return $output;\n }", "public function content_template() { ?>\n\n\t\t<span class=\"customize-control-title\">\n\t\t<# if ( data.label ) { #>\n\t\t\t{{ data.label }}\n\t\t<# } #>\n\n\t\t<# if ( data.description ) { #>\n\t\t\t<span class=\"description customize-control-description\">{{{ data.description }}}</span>\n\t\t<# } #>\n\t\t</span>\n\n\t\t<ul>\n\n\t\t<# if ( data.family && data.family.choices ) { #>\n\n\t\t\t<li class=\"customize-control typography-font-family\">\n\n\t\t\t\t<# if ( data.family.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.family.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.family.link }}}>\n\n\t\t\t\t\t<# _.each( data.family.choices, function( label, choice ) { #>\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.family.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.weight && data.weight.choices ) { #>\n\n\t\t\t<li class=\"customize-control typography-font-weight\">\n\n\t\t\t\t<# if ( data.weight.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.weight.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.weight.link }}}>\n\n\t\t\t\t\t<# _.each( data.weight.choices, function( label, choice ) { #>\n\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.weight.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.style && data.style.choices ) { #>\n\n\t\t\t<li class=\"typography-font-style\">\n\n\t\t\t\t<# if ( data.style.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.style.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<select {{{ data.style.link }}}>\n\n\t\t\t\t\t<# _.each( data.style.choices, function( label, choice ) { #>\n\n\t\t\t\t\t\t<option value=\"{{ choice }}\" <# if ( choice === data.style.value ) { #> selected=\"selected\" <# } #>>{{ label }}</option>\n\n\t\t\t\t\t<# } ) #>\n\n\t\t\t\t</select>\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.size ) { #>\n\n\t\t\t<li class=\"typography-font-size\">\n\n\t\t\t\t<# if ( data.size.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.size.label }} (px)</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<input type=\"number\" min=\"1\" {{{ data.size.link }}} value=\"{{ data.size.value }}\" />\n\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t<# if ( data.line_height ) { #>\n\n\t\t\t<li class=\"typography-line-height\">\n\n\t\t\t\t<# if ( data.line_height.label ) { #>\n\t\t\t\t\t<span class=\"customize-control-title\">{{ data.line_height.label }} (px)</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<input type=\"number\" min=\"1\" {{{ data.line_height.link }}} value=\"{{ data.line_height.value }}\" />\n\n\t\t\t</li>\n\t\t<# } #>\n\n\t\t</ul>\n\t<?php }", "public function getBlocksDataFullRaw(): void\n\t{\n\t\t// Get global settings direct from file.\n\t\t$settings = $this->getSettingsManifest();\n\n\t\t$namespace = $settings['namespace'];\n\n\t\t$blocks = \\array_map(\n\t\t\tstatic function ($block) use ($namespace) {\n\t\t\t\t// Check if blocks-namespace is defined in block or in global manifest settings.\n\t\t\t\t$block['namespace'] = $namespace;\n\t\t\t\t$block['blockFullName'] = \"{$namespace}/{$block['blockName']}\";\n\n\t\t\t\treturn $block;\n\t\t\t},\n\t\t\t$this->getBlocksManifests()\n\t\t);\n\n\t\t// Register store and set all the data.\n\t\tComponents::setStore();\n\t\tComponents::setSettings($settings);\n\t\tComponents::setBlocks($blocks);\n\t\tComponents::setComponents($this->getComponentsManifests());\n\t\tComponents::setVariations($this->getVariationsManifests());\n\t\tComponents::setConfigFlags();\n\t\tComponents::setPaths();\n\n\t\tif (Components::getConfigUseWrapper()) {\n\t\t\tComponents::setWrapper($this->getWrapperManifest());\n\t\t}\n\t}", "abstract public function render($data);", "function ajarRenderDinamycBlock($attributes, $content) {\n return '<h1 class=\"my-3\">'.$attributes['content'].'</h1>'.\n '<img src=\"'.$attributes['mediaURL'].'\" alt=\"'.$attributes['mediaAlt'].'\" />'.\n '<hr>';\n}", "function jsforwp_dynamic_block_render( $attributes ) {\n\n\t$recent_posts = wp_get_recent_posts(\n\t\t[\n\t\t\t'numberposts' => 1,\n\t\t\t'post_status' => 'publish',\n\t\t]\n\t);\n\tif ( count( $recent_posts ) === 0 ) {\n\t\treturn 'No posts';\n\t}\n\t$post = $recent_posts[0];\n\t$post_id = $post['ID'];\n\n\treturn sprintf(\n\t\t'<p><a class=\"wp-block-my-plugin-latest-post\" href=\"%1$s\">%2$s</a></p>',\n\t\tesc_url( get_permalink( $post_id ) ),\n\t\tesc_html( get_the_title( $post_id ) )\n\t);\n\n}", "function render_block_core_comment_template($attributes, $content, $block)\n {\n }", "public static function output_block_styles()\n {\n }", "public function format()\r\n {\r\n //$this->template=$this->viewModel->formatView();\r\n }", "function theme_acf_block_render_callback( $block ) {\n // convert name (\"acf/testimonial\") into path friendly slug (\"testimonial\")\n $slug = str_replace('acf/', '', $block['name']);\n\n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/templates/blocks/{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/templates/blocks/{$slug}.php\") );\n }\n}", "public function render()\n {\n $_ipt = '';\n\n if($this->type == 'submit') {\n $_ipt = $this->renderSubmitItem();\n }else if($this->inline !== 'false' || $this->type == 'inline') {\n $_ipt = $this->renderInlineItem();\n }else{\n $_ipt = <<<'blade'\n <div {{ $attributes->merge([\"class\" => \"layui-form-item\"]) }}>\n <label for=\"name\" class=\"layui-form-label {{$required}}\">\n @if($required)<span>*</span> @endif{{$label}}\n </label>\n <div class=\"layui-input-block\">{{$slot}}</div>\n </div>\n blade;\n }\n return $_ipt;\n }", "public function display_data() {\n return format_text($this->data, $this->dataformat, array('overflowdiv' => true));\n }", "function block_core_gallery_render($attributes, $content)\n {\n }", "protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> &nbsp;&nbsp; Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }", "function render_block_core_post_date($attributes, $content, $block)\n {\n }", "public function render()\n {\n if (defined('DOING_AJAX') && DOING_AJAX) {\n $check = $this->formData->check();\n $check or wp_send_json_error();\n $this->buildContext($check);\n $data = [\n 'success' => true,\n 'data' => ['content' => do_shortcode($check['content'])],\n ];\n @header('Content-Type: application/json; charset='.get_option('blog_charset'));\n echo wp_json_encode($data, JSON_PRETTY_PRINT);\n wp_die();\n }\n }", "protected function buildBlock(string $data): string\n {\n return \"\\n\".sprintf('###> %s ###%s%s%s###< %s ###%s', self::NAME, \"\\n\", rtrim($data, \"\\r\\n\"), \"\\n\", self::NAME, \"\\n\");\n }", "final public function render()\n {\n echo $this->generateMarkup($this->sanitizeData());\n }", "function ju_block($c, $data = [], string $template = '', array $vars = []) {\n\tif (is_string($data)) {\n\t\t$template = $data;\n\t\t$data = [];\n\t}\n\t/**\n\t * 2016-11-22\n\t * В отличие от Magento 1.x, в Magento 2 нам нужен синтаксис ['data' => $data]:\n\t * @see \\Magento\\Framework\\View\\Layout\\Generator\\Block::createBlock():\n\t * $block->addData(isset($arguments['data']) ? $arguments['data'] : []);\n\t * https://github.com/magento/magento2/blob/2.1.2/lib/internal/Magento/Framework/View/Layout/Generator/Block.php#L240\n\t * В Magento 1.x было не так:\n\t * https://github.com/OpenMage/magento-mirror/blob/1.9.3.1/app/code/core/Mage/Core/Model/Layout.php#L482-L491\n\t */\n\t/** @var AbstractBlock|BlockInterface|Template $r */\n\t$r = ju_layout()->createBlock(\n\t\t$c ?: (ju_is_backend() ? BackendTemplate::class : Template::class), jua($data, 'name'), ['data' => $data]\n\t);\n\t# 2019-06-11\n\tif ($r instanceof Template) {\n\t\t# 2016-11-22\n\t\t$r->assign($vars);\n\t}\n\tif ($template && $r instanceof Template) {\n\t\t$r->setTemplate(ju_phtml_add_ext($template));\n\t}\n\treturn $r;\n}", "protected function renderModuleContent() {}", "public function render_html() {\n global $USER;\n $courseid = \\mod_customcert\\element_helper::get_courseid($this->get_id());\n $content = $this->get_decoded_data()->content;\n $text = format_text($content, FORMAT_HTML, ['context' => \\context_course::instance($courseid)]);\n\n return \\mod_customcert\\element_helper::render_html_content($this, $this->render_table($text, $USER, true));\n }", "public function render()\n {\n $parameters = $this->data['parameterArray'];\n $parameters['row'] = $this->data['databaseRow'];\n // Vars\n $uid = $parameters['row']['uid'];\n $pid = $parameters['row']['pid'];\n $name = $parameters['itemFormElName'];\n $value = $parameters['itemFormElValue'];\n $cType = $parameters['row']['CType'];\n $gridLayout = $parameters['row']['tx_gridelements_backend_layout'];\n // In case of new content elements, pid might be negative\n if ($pid < 1) {\n $pid = $this->getPidFromParentContentElement($pid);\n }\n // C-Type could be an array or a string\n if (is_array($cType) && isset($cType[0])) {\n $cType = $cType[0];\n }\n if (is_array($gridLayout) && isset($gridLayout[0])) {\n $gridLayout = $gridLayout[0];\n }\n // Get values\n $values = explode(',', $value);\n $this->valuesFlipped = array_flip($values);\n $this->valuesAvailable = [];\n // Get configuration\n $behaviours = $this->getMergedConfiguration($pid, 'behaviour', $cType);\n // Build checkboxes\n $this->checkboxesArray['default'] = [];\n $this->checkboxesArray['ctype'] = [];\n $this->checkboxesArray['gridLayout'] = [];\n if (isset($behaviours['properties']) && is_array($behaviours['properties'])) {\n foreach ($behaviours['properties'] as $contentElementKey => $label) {\n // GridElements: are able to provide grid-specific behaviours\n if (is_array($label) && $cType === 'gridelements_pi1' && !array_key_exists($contentElementKey, $this->defaultProperties)) {\n $contentElementKey = substr($contentElementKey, 0, -1);\n\n // Behaviour for all GridElements\n if ($contentElementKey == 'default' && !empty($label)) {\n foreach ($label as $gridLayoutKey => $gridLayoutBehaviourLabel) {\n $this->createElement($gridLayoutKey, $gridLayoutBehaviourLabel, 'ctype');\n }\n }\n // Behaviour only for selected GridElement\n elseif ($contentElementKey == $gridLayout && !empty($label)) {\n foreach ($label as $gridLayoutKey => $gridLayoutBehaviourLabel) {\n $this->createElement($gridLayoutKey, $gridLayoutBehaviourLabel, 'gridLayout');\n }\n }\n }\n // Normal CEs\n else {\n // Is default property!?\n if (array_key_exists($contentElementKey, $this->defaultProperties)) {\n $this->createElement($contentElementKey, $label, 'default');\n }\n // Is ctype specific!\n else {\n $this->createElement($contentElementKey, $label, 'ctype');\n }\n }\n }\n }\n // Merge checkbox groups\n $checkboxes = '';\n $checkboxes .= $this->getMergedCheckboxes('default');\n $checkboxes .= $this->getMergedCheckboxes('ctype', $cType);\n $checkboxes .= $this->getMergedCheckboxes('gridLayout', $gridLayout);\n if ($checkboxes === '') {\n $checkboxes = $this->getLanguageService()->sL('LLL:EXT:themes/Resources/Private/Language/locallang.xlf:behaviour.no_behaviour_available');\n }\n // Process current classes/identifiers\n $setClasses = array_intersect($values, $this->valuesAvailable);\n $setClass = htmlspecialchars(implode(' ', $setClasses));\n $setValue = htmlspecialchars(implode(',', $setClasses));\n // Allow admins to see the internal identifiers\n $inputType = 'hidden';\n if ($this->isAdminAndDebug()) {\n $inputType = 'text';\n }\n // Build hidden field structure\n $hiddenField = '<div>'.LF;\n $hiddenField .= '<div class=\"form-control-wrap\">'.LF;\n $hiddenField .= '<input class=\"form-control themes-hidden-admin-field '.$setClass.'\" ';\n $hiddenField .= 'readonly=\"readonly\" type=\"'.$inputType.'\" ';\n $hiddenField .= 'name=\"'.htmlspecialchars($name).'\" ';\n $hiddenField .= 'value=\"'.$setValue.'\" class=\"'.$setClass.'\">'.LF;\n $hiddenField .= '</div>'.LF;\n $hiddenField .= '</div>'.LF;\n // Missed classes\n $missedField = $this->getMissedFields($values, $this->valuesAvailable);\n\n return ['html' => '<div class=\"contentBehaviour\">'.$checkboxes.$hiddenField.$missedField.'</div>'];\n }", "function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }", "function render_block_core_shortcode($attributes, $content)\n {\n }", "public function render()\r\n {\r\n $this->data['menu'] = build_menu(\r\n $this->choices, $this->uri->segment(1));\r\n \r\n $this->data['header'] = $this->parser->parse(\r\n '_header', $this->data, true);\r\n $this->data['content'] = $this->parser->parse(\r\n $this->data['page_body'], $this->data, true);\r\n $this->data['footer'] = $this->parser->parse(\r\n '_footer', $this->data, true);\r\n \r\n $this->data['data'] = &$this->data;\r\n \r\n $this->parser->parse('_template', $this->data);\r\n }", "function gutenberg_frugalisme_custom_blocks() {\n\twp_register_style(\n\t\t'frugalisme-front-end-styles',\n\t\tSB_PLUGIN_URL . '/style.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'style.css' )\n\t);\n\t// Block editor styles.\n\twp_register_style(\n\t\t'frugalisme-editor-styles',\n\t\tSB_PLUGIN_URL . '/editor.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'editor.css' )\n\t);\n\n\t// Block Editor Script.\n\twp_register_script(\n\t\t'frugalisme-editor-js',\n\t\tSB_PLUGIN_URL . '/youtube-feed.js',\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-i18n' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'youtube-feed.js' ),\n\t\ttrue\n\t);\n\tregister_block_type(\n\t\t'youtube-feed/youtube-feed',\n\t\tarray(\n\t\t\t'style' => 'frugalisme-front-end-styles',\n\t\t\t'editor_style' => 'frugalisme-editor-styles',\n\t\t\t'editor_script' => 'frugalisme-editor-js',\n\t\t\t'render_callback' => 'frugalisme_render_feed'\n\t\t)\n\t);\n\n}", "function _add_block_template_info($template_item)\n {\n }", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "private static function renderBlock($block, $items, $encoding)\n {\n $fields = '';\n foreach ($items as $key => $value) {\n if ($block === 'Info') {\n $fields .= self::renderField($block, $key, $value, $encoding, true);\n } else {\n $fields .= \"{$block}Begin\\n\";\n foreach ($value as $subKey => $subValue) {\n $fields .= self::renderField($block, $subKey, $subValue, $encoding, false);\n }\n }\n }\n return $fields;\n }", "protected function _outputBlocks()\n {\n $blocks = func_get_args();\n $output = $this->getLayout()->createBlock('adminhtml/text_list');\n foreach ($blocks as $block) {\n $output->insert($block, '', true);\n }\n $this->getResponse()->setBody($output->toHtml());\n }", "function my_acf_block_render_callback( $block ) {\n $slug = str_replace('acf/', '', $block['name']);\n \n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") );\n }\n}" ]
[ "0.75445247", "0.67666394", "0.6595602", "0.6538642", "0.6501218", "0.64389527", "0.63021046", "0.6294761", "0.6289585", "0.62679476", "0.6239257", "0.6232958", "0.6161073", "0.6139421", "0.6131822", "0.6123884", "0.60948426", "0.60728", "0.6001656", "0.5992444", "0.5983275", "0.59341604", "0.59302974", "0.5926751", "0.5899502", "0.5897666", "0.58721656", "0.5871271", "0.58604753", "0.58567643", "0.583944", "0.5830139", "0.58231014", "0.58193475", "0.5817713", "0.5799104", "0.5792937", "0.5788722", "0.57757014", "0.57753295", "0.57669413", "0.57639134", "0.5753105", "0.5726258", "0.57177997", "0.57013494", "0.56951773", "0.56870365", "0.5686071", "0.5684597", "0.5671074", "0.5660228", "0.56597024", "0.5658139", "0.56549925", "0.56417125", "0.56387556", "0.563358", "0.56268674", "0.5624402", "0.5620527", "0.56157535", "0.56124973", "0.56104106", "0.5608097", "0.55825615", "0.5578082", "0.55676633", "0.55668426", "0.5564434", "0.5562891", "0.55621725", "0.55578476", "0.55575955", "0.55556697", "0.55552113", "0.5554943", "0.55515724", "0.55486876", "0.554833", "0.5541312", "0.5537979", "0.55370694", "0.55347365", "0.5533863", "0.5528935", "0.5522839", "0.5522043", "0.5521413", "0.5520685", "0.5519831", "0.5517918", "0.5516391", "0.5509561", "0.5502196", "0.5494195", "0.5493597", "0.5479659", "0.5473817", "0.54737693" ]
0.61081356
16
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}", "public function _settings_section_authentication() {\n _e( \"We need your Zendesk subdomain, so we can use Zendesk's API to get your ticket information.\", 'zendesk' );\n }", "function TS_VCSC_Set_Plugin_Options() {\r\n\t\t// Redirect Option\r\n\t\tadd_option('ts_vcsc_extend_settings_redirect', \t\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_activation', \t\t\t\t\t\t0);\r\n\t\t// Options for Theme Authors\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypes', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeWidget',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTeam',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTestimonial',\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeLogo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeSkillset',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_additions', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_codeeditors', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_fontimport', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_iconicum', \t\t\t\t \t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_dashboard', \t\t\t\t\t\t1);\r\n\t\t// Options for Custom CSS/JS Editor\r\n\t\tadd_option('ts_vcsc_extend_settings_customCSS',\t\t\t\t\t\t\t'/* Welcome to the Custom CSS Editor! Please add all your Custom CSS here. */');\r\n\t\tadd_option('ts_vcsc_extend_settings_customJS', \t\t\t\t '/* Welcome to the Custom JS Editor! Please add all your Custom JS here. */');\r\n\t\t// Other Options\r\n\t\tadd_option('ts_vcsc_extend_settings_frontendEditor', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_buffering', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_mainmenu', \t\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsDomain', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_previewImages',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_visualSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativeSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativePaginator',\t\t\t\t\t'200');\r\n\t\tadd_option('ts_vcsc_extend_settings_backendPreview',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_extended', \t\t\t\t 0);\r\n\t\tadd_option('ts_vcsc_extend_settings_systemInfo',\t\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_socialDefaults', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_builtinLightbox', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_lightboxIntegration', \t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowAutoUpdate', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowNotification', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowDeprecated', \t\t\t\t\t0);\r\n\t\t// Font Active / Inactive\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMedia',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcon',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceAwesome',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceBrankic',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCountricons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCurrencies',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceElegant',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceEntypo',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFoundation',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceGenericons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcoMoon',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMonuments',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceSocialMedia',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceTypicons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFontsAll',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Awesome',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Entypo',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Linecons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_OpenIconic',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Typicons',\t\t\t\t0);\t\t\r\n\t\t// Custom Font Data\r\n\t\tadd_option('ts_vcsc_extend_settings_IconFontSettings',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustom',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomArray',\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomJSON',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPath',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPHP', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomName',\t\t\t\t\t'Custom User Font');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomAuthor',\t\t\t\t'Custom User');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomCount',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDate',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDirectory',\t\t\t'');\r\n\t\t// Row + Column Extensions\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRows',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsColumns',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRowEffectsBreak',\t\t\t'600');\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothScroll',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothSpeed',\t\t\t\t'30');\r\n\t\t// Custom Post Types\r\n\t\tadd_option('ts_vcsc_extend_settings_customWidgets',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTeam',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTestimonial',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customSkillset',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customTimelines', \t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customLogo', \t\t\t\t\t\t0);\r\n\t\t// tinyMCE Icon Shortcode Generator\r\n\t\tadd_option('ts_vcsc_extend_settings_useIconGenerator',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_useTinyMCEMedia', \t\t\t\t\t1);\r\n\t\t// Standard Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_StandardElements',\t\t\t\t\t'');\r\n\t\t// Demo Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_DemoElements', \t\t\t\t\t\t'');\r\n\t\t// WooCommerce Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceUse',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceElements',\t\t\t\t'');\r\n\t\t// bbPress Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressUse',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressElements',\t\t\t\t\t'');\r\n\t\t// Options for External Files\r\n\t\tadd_option('ts_vcsc_extend_settings_loadForcable',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadLightbox', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadTooltip', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadFonts', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadEnqueue',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHeader',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadjQuery', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadModernizr',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadWaypoints', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadCountTo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadMooTools', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadDetector', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHammerNew', \t\t\t\t\t1);\r\n\t\t// Google Font Manager Settings\r\n\t\tadd_option('ts_vcsc_extend_settings_allowGoogleManager', \t\t\t\t1);\r\n\t\t// Single Page Navigator\r\n\t\tadd_option('ts_vcsc_extend_settings_allowPageNavigator', \t\t\t\t0);\r\n\t\t// EnlighterJS - Syntax Highlighter\r\n\t\tadd_option('ts_vcsc_extend_settings_allowEnlighterJS',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowThemeBuilder',\t\t\t\t\t0);\r\n\t\t// Post Type Menu Positions\r\n\t\t$TS_VCSC_Menu_Positions_Defaults_Init = array(\r\n\t\t\t'ts_widgets'\t\t\t\t\t=> 50,\r\n\t\t\t'ts_timeline'\t\t\t\t\t=> 51,\r\n\t\t\t'ts_team'\t\t\t\t\t\t=> 52,\r\n\t\t\t'ts_testimonials'\t\t\t\t=> 53,\r\n\t\t\t'ts_skillsets'\t\t\t\t\t=> 54,\r\n\t\t\t'ts_logos'\t\t\t\t\t\t=> 55,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_menuPositions',\t\t\t\t\t\t$TS_VCSC_Menu_Positions_Defaults_Init);\r\n\t\t// Row Toggle Settings\r\n\t\t$TS_VCSC_Row_Toggle_Defaults_Init = array(\r\n\t\t\t'Large Devices' => 1200,\r\n\t\t\t'Medium Devices' => 992,\r\n\t\t\t'Small Devices' => 768,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_rowVisibilityLimits', \t\t\t\t$TS_VCSC_Row_Toggle_Defaults_Init);\r\n\t\t// Language Settings: Countdown\r\n\t\t$TS_VCSC_Countdown_Language_Defaults_Init = array(\r\n\t\t\t'DayPlural' => 'Days',\r\n\t\t\t'DaySingular' => 'Day',\r\n\t\t\t'HourPlural' => 'Hours',\r\n\t\t\t'HourSingular' => 'Hour',\r\n\t\t\t'MinutePlural' => 'Minutes',\r\n\t\t\t'MinuteSingular' => 'Minute',\r\n\t\t\t'SecondPlural' => 'Seconds',\r\n\t\t\t'SecondSingular' => 'Second',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsCountdown', \t\t\t$TS_VCSC_Countdown_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps PLUS\r\n\t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init = array(\r\n\t\t\t'ListenersStart' => 'Start Listeners',\r\n\t\t\t'ListenersStop' => 'Stop Listeners',\r\n\t\t\t'MobileShow' => 'Show Google Map',\r\n\t\t\t'MobileHide' => 'Hide Google Map',\r\n\t\t\t'StyleDefault' => 'Google Standard',\r\n\t\t\t'StyleLabel' => 'Change Map Style',\r\n\t\t\t'FilterAll' => 'All Groups',\r\n\t\t\t'FilterLabel' => 'Filter by Groups',\r\n\t\t\t'SelectLabel' => 'Zoom to Location',\r\n\t\t\t'ControlsOSM' => 'Open Street',\r\n\t\t\t'ControlsHome' => 'Home',\r\n\t\t\t'ControlsBounds' => 'Fit All',\r\n\t\t\t'ControlsBike' => 'Bicycle Trails',\r\n\t\t\t'ControlsTraffic' => 'Traffic',\r\n\t\t\t'ControlsTransit' => 'Transit',\r\n\t\t\t'TrafficMiles' => 'Miles per Hour',\r\n\t\t\t'TrafficKilometer' => 'Kilometers per Hour',\r\n\t\t\t'TrafficNone' => 'No Data Available',\r\n\t\t\t'SearchButton' => 'Search Location',\r\n\t\t\t'SearchHolder' => 'Enter address to search for ...',\r\n\t\t\t'SearchGoogle' => 'View on Google Maps',\r\n\t\t\t'SearchDirections' => 'Get Directions',\r\n\t\t\t'OtherLink' => 'Learn More!',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMapPLUS', \t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps (Deprecated)\r\n\t\t$TS_VCSC_Google_Map_Language_Defaults_Init = array(\r\n\t\t\t'TextCalcShow' => 'Show Address Input',\r\n\t\t\t'TextCalcHide' => 'Hide Address Input',\r\n\t\t\t'TextDirectionShow' => 'Show Directions',\r\n\t\t\t'TextDirectionHide' => 'Hide Directions',\r\n\t\t\t'TextResetMap' => 'Reset Map',\r\n\t\t\t'PrintRouteText' \t\t\t => 'Print Route',\r\n\t\t\t'TextViewOnGoogle' => 'View on Google',\r\n\t\t\t'TextButtonCalc' => 'Show Route',\r\n\t\t\t'TextSetTarget' => 'Please enter your Start Address:',\r\n\t\t\t'TextGeoLocation' => 'Get My Location',\r\n\t\t\t'TextTravelMode' => 'Travel Mode',\r\n\t\t\t'TextDriving' => 'Driving',\r\n\t\t\t'TextWalking' => 'Walking',\r\n\t\t\t'TextBicy' => 'Bicycling',\r\n\t\t\t'TextWP' => 'Optimize Waypoints',\r\n\t\t\t'TextButtonAdd' => 'Add Stop on the Way',\r\n\t\t\t'TextDistance' => 'Total Distance:',\r\n\t\t\t'TextMapHome' => 'Home',\r\n\t\t\t'TextMapBikes' => 'Bicycle Trails',\r\n\t\t\t'TextMapTraffic' => 'Traffic',\r\n\t\t\t'TextMapSpeedMiles' => 'Miles Per Hour',\r\n\t\t\t'TextMapSpeedKM' => 'Kilometers Per Hour',\r\n\t\t\t'TextMapNoData' => 'No Data Available!',\r\n\t\t\t'TextMapMiles' => 'Miles',\r\n\t\t\t'TextMapKilometes' => 'Kilometers',\r\n\t\t\t'TextMapActivate' => 'Show Google Map',\r\n\t\t\t'TextMapDeactivate' => 'Hide Google Map',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMap', \t\t\t$TS_VCSC_Google_Map_Language_Defaults_Init);\r\n\t\t// Language Settings: Isotope Posts\r\n\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init = array(\r\n\t\t\t'ButtonFilter'\t\t => 'Filter Posts', \r\n\t\t\t'ButtonLayout'\t\t => 'Change Layout',\r\n\t\t\t'ButtonSort'\t\t => 'Sort Criteria',\r\n\t\t\t// Standard Post Strings\r\n\t\t\t'Date' \t\t\t\t => 'Post Date', \r\n\t\t\t'Modified' \t\t\t => 'Post Modified', \r\n\t\t\t'Title' \t\t\t => 'Post Title', \r\n\t\t\t'Author' \t\t\t => 'Post Author', \r\n\t\t\t'PostID' \t\t\t => 'Post ID', \r\n\t\t\t'Comments' \t\t\t => 'Number of Comments',\r\n\t\t\t// Layout Strings\r\n\t\t\t'SeeAll'\t\t\t => 'See All',\r\n\t\t\t'Timeline' \t\t\t => 'Timeline',\r\n\t\t\t'Masonry' \t\t\t => 'Centered Masonry',\r\n\t\t\t'FitRows'\t\t\t => 'Fit Rows',\r\n\t\t\t'StraightDown' \t\t => 'Straigt Down',\r\n\t\t\t// WooCommerce Strings\r\n\t\t\t'WooFilterProducts' => 'Filter Products',\r\n\t\t\t'WooTitle' => 'Product Title',\r\n\t\t\t'WooPrice' => 'Product Price',\r\n\t\t\t'WooRating' => 'Product Rating',\r\n\t\t\t'WooDate' => 'Product Date',\r\n\t\t\t'WooModified' => 'Product Modified',\r\n\t\t\t// General Strings\r\n\t\t\t'Categories' => 'Categories',\r\n\t\t\t'Tags' => 'Tags',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsIsotopePosts', \t\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init);\r\n\t\t// Options for Lightbox Settings\r\n\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init = array(\r\n\t\t\t'thumbs' => 'bottom',\r\n\t\t\t'thumbsize' => 50,\r\n\t\t\t'animation' => 'random',\r\n\t\t\t'captions' => 'data-title',\r\n\t\t\t'closer' => 1, // true/false\r\n\t\t\t'duration' => 5000,\r\n\t\t\t'share' => 0, // true/false\r\n\t\t\t'social' \t => 'fb,tw,gp,pin',\r\n\t\t\t'notouch' => 1, // true/false\r\n\t\t\t'bgclose'\t\t\t => 1, // true/false\r\n\t\t\t'nohashes'\t\t\t => 1, // true/false\r\n\t\t\t'keyboard'\t\t\t => 1, // 0/1\r\n\t\t\t'fullscreen'\t\t => 1, // 0/1\r\n\t\t\t'zoom'\t\t\t\t => 1, // 0/1\r\n\t\t\t'fxspeed'\t\t\t => 300,\r\n\t\t\t'scheme'\t\t\t => 'dark',\r\n\t\t\t'removelight' => 0,\r\n\t\t\t'customlight' => 0,\r\n\t\t\t'customcolor'\t\t => '#ffffff',\r\n\t\t\t'backlight' \t\t => '#ffffff',\r\n\t\t\t'usecolor' \t\t => 0, // true/false\r\n\t\t\t'background' => '',\r\n\t\t\t'repeat' => 'no-repeat',\r\n\t\t\t'overlay' => '#000000',\r\n\t\t\t'noise' => '',\r\n\t\t\t'cors' => 0, // true/false\r\n\t\t\t'scrollblock' => 'css',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxSettings',\t\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxAnimation', \t\t\t'random');\r\n\t\t// Options for Envato Sales Data\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoData', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoInfo', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoLink', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoPrice', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoRating', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoSales', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoCheck', \t\t\t\t\t 0);\r\n\t\t$roles \t\t\t\t\t\t\t\t= get_editable_roles();\r\n\t\tforeach ($GLOBALS['wp_roles']->role_objects as $key => $role) {\r\n\t\t\tif (isset($roles[$key]) && $role->has_cap('edit_pages') && !$role->has_cap('ts_vcsc_extend')) {\r\n\t\t\t\t$role->add_cap('ts_vcsc_extend');\r\n\t\t\t}\r\n\t\t}\r\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 }", "public function getTrackingMyEmbedOptions()\n {\n return [\n 'selector' => '#embedTrack',\n 'courier' => $this->getTrackingMyCourierName(),\n ];\n }", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "function bbps_add_options() {\n\n\t// Default options\n\t$options = array (\n\t//user counts and titles\n\t\t// The default display for topic status we used not resolved as default\n\t\t'_bbps_default_status' => '1',\n\t\t//enable user post count display\n\t\t'_bbps_enable_post_count' => '1',\n\t\t//enable user rank\n\t\t'_bbps_enable_user_rank' => '1',\n\t\t//defaults for who can change the topic status\n\t\t'_bbps_status_permissions' => '',\n\t\t// the reply counts / boundaries for the custom forum poster titles this has no default as the user must set these\n\t\t'_bbps_reply_count' => '',\n\t\t//the status people want to show on their topics.\n\t\t'_bbps_used_status' => '',\n\t\t//give admin and forum moderators the ability to move topics into other forums default = enabled\n\t\t'_bbps_enable_topic_move' => '1',\n\t\t//urgent topics\n\t\t'_bbps_status_permissions_urgent' => '',\n\t\t//do a color change for resolved topics\n\t\t//'_bbps_status_color_change' => '1',\n\t);\n\t// Add default options\n\tforeach ( $options as $key => $value )\n\t\tadd_option( $key, $value );\n\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 skcw_options() {\n\t$template_path = get_option('skcw_template_directory');\n\t$templates = get_option('skcw_templates_list');\n\n\tif ( isset($_GET['skcw_message']) ) {\n\t\tswitch($_GET['skcw_message']) {\n\t\t\tcase 'updated':\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery(\"#skcw_updated\").show();\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tinclude(SKCW_DIR.'views/options-view.php');\n}", "public function default_settings() : array {\n\t\treturn [\n\t\t\t'layout' => 'block',\n\t\t\t'newsletter' => '',\n\t\t\t'theme' => 'light',\n\t\t\t'type' => 'subscribe',\n\t\t];\n\t}", "function activate() {\n\t\t\tadd_option('h2utp_options', json_encode($this->options));\n\t\t}", "public function get_options(){\n $this->options = [\n 'items' => get_post_meta( $this->ID, 'opt_items' ),\n 'margin' => get_post_meta( $this->ID, 'opt_margin' ),\n 'loop' => get_post_meta( $this->ID, 'opt_loop' ),\n 'nav' => get_post_meta( $this->ID, 'opt_nav' ),\n 'dots' => get_post_meta( $this->ID, 'opt_dots' ),\n 'autoplay' => get_post_meta( $this->ID, 'opt_autoplay' ),\n 'autoplaySpeed' => get_post_meta( $this->ID, 'opt_autoplaySpeed' ),\n ];\n }", "function Main_CyberPanel_Emails()\n{\n\n add_submenu_page(\"cyberpanel\", \"Configure Emails\",\n \"Email Templates\", \"manage_options\", \"wpcp-emails\"\n , \"cyberpanel_main_emails_html\"\n );\n\n}", "public function _settings_section_contact_form() {\n _e( 'The contact form is a way for users to submit support requests. It can be added to the dashboard using the options above.', 'zendesk' );\n }", "public function _settings_field_ssl() {\n global $zendesk_support;\n $ssl = (bool) $zendesk_support->settings['ssl'];\n ?>\n <?php if ( $ssl ): ?>\n <span class=\"description\"><?php _e( 'Your account is using SSL', 'zendesk' ); ?></span>\n <?php else: ?>\n <span class=\"description\"><?php _e( 'Your account is <strong>not</strong> using SSL', 'zendesk' ); ?></span>\n <?php endif; ?>\n <?php\n }", "function abecaf_register_options_page() {\n add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' );\n}", "function wpmantis_set_options()\n{\n\t$options = array(\n\t\t'mantis_soap_url' => 'http://yoursite.com/bugs/api/soap/mantisconnect.php?wsdl',\n\t\t'mantis_user' => 'wordpress',\n\t\t'mantis_password' => 'password',\n\t\t'mantis_base_url' => 'http://yoursite.com',\n\t\t'mantis_max_desc_lenght' => 25,\n\t\t'mantis_statuses' => array(\n\t\t\t'10' => __('New', 'wp-mantis'),\n\t\t\t'20' => __('Feedback', 'wp-mantis'),\n\t\t\t'30' => __('Acknowledged', 'wp-mantis'),\n\t\t\t'40' => __('Confirmed', 'wp-mantis'),\n\t\t\t'50' => __('Assigned', 'wp-mantis'),\n\t\t\t'80' => __('Resolved', 'wp-mantis'),\n\t\t\t'90' => __('Closed', 'wp-mantis')\n\t\t),\n\t\t'mantis_colors' => array(\n\t\t\t'10' => '#fcbdbd',\n\t\t\t'20' => '#e3b7eb',\n\t\t\t'30' => '#ffcd85',\n\t\t\t'40' => '#fff494',\n\t\t\t'50' => '#c2dfff',\n\t\t\t'80' => '#d2f5b0',\n\t\t\t'90' => '#c9ccc4'\n\t\t),\n\t\t'mantis_enable_pagination' => true,\n\t\t'mantis_bugs_per_page' => 8\n\t);\n\n}", "static function add_show_emails(): void {\r\n\t\tself::add_acf_field(self::show_emails, [\r\n\t\t\t'label' => 'Show emails on current masthead page?',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Public emails may be helpful for readers,'\r\n\t\t\t\t.' but increase the risk of exposure to spam.',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'message' => '',\r\n\t\t\t'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}", "function cww_df_options_page_sections() { \n $sections = array(); \n // $sections[$id] = __($title, 'wptuts_textdomain'); \n $sections['cww_df_authorizenet_setting_section'] = __('Authorize.net', 'cww');\n return apply_filters('cww_df_options_page_sections', $sections);\n}", "function mailfetch_optpage_register_block() {\n include_once (SM_PATH . 'plugins/mail_fetch/functions.php');\n mailfetch_optpage_register_block_function();\n}", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "public function linkToBecopay()\n {\n global $smarty;\n\n $smarty->assign(array(\n 'description' => $this->description\n ));\n\n $becopay_option = new PaymentOption();\n $becopay_option->setCallToActionText($this->displayName)\n ->setAction($this->context->link->getModuleLink($this->name, 'payment', array(), true))\n ->setAdditionalInformation($this->fetch('module:' . $this->name . '/view/becopay_intro.tpl'))\n ->setLogo(Media::getMediaPath(_PS_MODULE_DIR_ . $this->name . '/logo.png'));\n\n return $becopay_option;\n }", "function pro_bottom_newsletter()\n{\n\t$pro = get_option('up_themes_betty_commerce_wordpress_theme');\n\t\n\tif( !empty( $pro['bottom_newsletter_optin'] ) )\n\t{\n\t\treturn $pro['bottom_newsletter_optin'];\n\t}\n\treturn false;\n}", "function simplenews_admin_settings_subscription($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['account'] = array(\n '#type' => 'fieldset',\n '#title' => t('User account'),\n '#collapsible' => FALSE,\n );\n $form['account']['simplenews_sync_account'] = array(\n '#type' => 'checkbox',\n '#title' => t('Synchronize with account'),\n '#default_value' => variable_get('simplenews_sync_account', TRUE),\n '#description' => t('When checked subscriptions will be synchronized with site accounts. When accounts are deleted, subscriptions with the same email address will be removed. When site accounts are blocked/unblocked, subscriptions will be deactivated/activated. When not checked subscriptions will be unchanged when associated accounts are deleted or blocked.'),\n );\n\n $form['subscription_mail'] = array(\n '#type' => 'fieldset',\n '#title' => t('Confirmation emails'),\n '#collapsible' => FALSE,\n );\n\n $form['subscription_mail']['simplenews_use_combined'] = array(\n '#type' => 'select',\n '#title' => t('Use combined confirmation mails'),\n '#options' => array(\n 'multiple' => t('For multiple changes'),\n 'always' => t('Always'),\n 'never' => t('Never'),\n ),\n '#description' => t('Combined confirmation mails allow subscribers to confirm multiple newsletter changes with single mail.'),\n '#default_value' => variable_get('simplenews_use_combined', 'multiple'),\n );\n\n if (module_exists('token')) {\n $form['subscription_mail']['token_help'] = array(\n '#title' => t('Replacement patterns'),\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['subscription_mail']['token_help']['browser'] = array(\n '#theme' => 'token_tree',\n '#token_types' => array('simplenews-newsletter', 'simplenews-subscriber'),\n );\n }\n\n $form['subscription_mail']['single'] = array(\n '#type' => 'fieldset',\n '#title' => t('Single confirmation mails'),\n '#collapsed' => TRUE,\n '#collapsible' => TRUE,\n '#states' => array(\n 'invisible' => array(\n ':input[name=\"simplenews_use_combined\"]' => array(\n 'value' => 'always',\n ),\n ),\n ),\n );\n\n $form['subscription_mail']['single']['simplenews_confirm_subscribe_subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject'),\n '#default_value' => simplenews_subscription_confirmation_text('subscribe_subject'),\n '#maxlength' => 180,\n );\n $form['subscription_mail']['single']['simplenews_confirm_subscribe_unsubscribed'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text of subscribe email'),\n '#default_value' => simplenews_subscription_confirmation_text('subscribe_unsubscribed'),\n '#rows' => 5,\n );\n $form['subscription_mail']['single']['simplenews_confirm_subscribe_subscribed'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text for already subscribed visitor'),\n '#default_value' => simplenews_subscription_confirmation_text('subscribe_subscribed'),\n '#rows' => 5,\n );\n $form['subscription_mail']['single']['simplenews_confirm_unsubscribe_subscribed'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text of unsubscribe email'),\n '#default_value' => simplenews_subscription_confirmation_text('unsubscribe_subscribed'),\n '#rows' => 5,\n );\n $form['subscription_mail']['single']['simplenews_confirm_unsubscribe_unsubscribed'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text for not yet subscribed visitor'),\n '#default_value' => simplenews_subscription_confirmation_text('unsubscribe_unsubscribed'),\n '#rows' => 5,\n );\n\n $form['subscription_mail']['combined'] = array(\n '#type' => 'fieldset',\n '#title' => t('Combined confirmation mails'),\n '#collapsed' => TRUE,\n '#collapsible' => TRUE,\n '#states' => array(\n 'invisible' => array(\n ':input[name=\"simplenews_use_combined\"]' => array(\n 'value' => 'never',\n ),\n ),\n ),\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject text for combined confirmation mail'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_subject'),\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_body'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text for combined confirmation mail'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_body'),\n '#rows' => 5,\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_body_unchanged'] = array(\n '#type' => 'textarea',\n '#title' => t('Body text for unchanged combined confirmation mail'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_body_unchanged'),\n '#rows' => 5,\n '#description' => t('This body is used when there are no change requests which have no effect, e.g trying to subscribe when already being subscribed to a newsletter.')\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_line_subscribe_unsubscribed'] = array(\n '#type' => 'textfield',\n '#title' => t('Change text for a new subscription'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_line_subscribe_unsubscribed'),\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_line_subscribe_subscribed'] = array(\n '#type' => 'textfield',\n '#title' => t('Change text when already subscribed'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_line_subscribe_subscribed'),\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_line_unsubscribe_subscribed'] = array(\n '#type' => 'textfield',\n '#title' => t('Change text for an unsubscription'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_line_unsubscribe_subscribed'),\n );\n\n $form['subscription_mail']['combined']['simplenews_confirm_combined_line_unsubscribe_unsubscribed'] = array(\n '#type' => 'textfield',\n '#title' => t('Change text when already unsubscribed'),\n '#default_value' => simplenews_subscription_confirmation_text('combined_line_unsubscribe_unsubscribed'),\n );\n\n $form['confirm_pages'] = array(\n '#type' => 'fieldset',\n '#title' => t('Confirmation pages'),\n '#collapsible' => FALSE,\n );\n $form['confirm_pages']['simplenews_confirm_subscribe_page'] = array(\n '#type' => 'textfield',\n '#title' => t('Subscribe confirmation'),\n '#description' => t('Drupal path or URL of the destination page where after the subscription is confirmed (e.g. node/123). Leave empty to go to the front page.'),\n '#default_value' => variable_get('simplenews_confirm_subscribe_page', ''),\n );\n $form['confirm_pages']['simplenews_confirm_unsubscribe_page'] = array(\n '#type' => 'textfield',\n '#title' => t('Unsubscribe confirmation'),\n '#description' => t('Drupal path or URL of the destination page when the subscription removal is confirmed (e.g. node/123). Leave empty to go to the front page.'),\n '#default_value' => variable_get('simplenews_confirm_unsubscribe_page', ''),\n );\n\n return system_settings_form($form);\n}", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "function my_new_contactmethods( $contactmethods ) {\n// Add Twitter\n$contactmethods['twitter'] = 'Twitter';\n//add Facebook\n$contactmethods['facebook'] = 'Facebook';\n\n\n \nreturn $contactmethods;\n}", "function ofa_secure_mail_shortcode($atts) {\n extract(shortcode_atts(array(\"email\" => '', \"text\" => ''), $atts));\n return ofa_secure_mail($email, $text);\n}", "function video_cck_dailymotion_settings() {\n $form = array();\n return $form;\n}", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "function Newsletters()\n\t{\n\t\t$this->PopupWindows[] = 'sendpreviewdisplay';\n\t\t$this->PopupWindows[] = 'checkspamdisplay';\n\t\t$this->PopupWindows[] = 'viewcompatibility';\n\t\t$this->LoadLanguageFile();\n\t}", "function get_form_fields($name='',$subject='',$text='',$send_time=0,$newsletter=0)\n\t{\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('NAME'),do_lang_tempcode('DESCRIPTION_NAME_REFERENCE'),'name',$name,true));\n\t\t$fields->attach(form_input_line(do_lang_tempcode('SUBJECT'),do_lang_tempcode('DESCRIPTION_WELCOME_EMAIL_SUBJECT'),'subject',$subject,true));\n\t\t$fields->attach(form_input_huge_comcode(do_lang_tempcode('TEXT'),do_lang_tempcode('DESCRIPTION_WELCOME_EMAIL_TEXT'),'text',$text,true));\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('SEND_TIME'),do_lang_tempcode('DESCRIPTION_SEND_TIME'),'send_time',$send_time,true));\n\t\tif (addon_installed('newsletter'))\n\t\t{\n\t\t\trequire_lang('newsletter');\n\t\t\tif (get_value('welcome_nw_choice')==='1')\n\t\t\t{\n\t\t\t\t$newsletters=new ocp_tempcode();\n\t\t\t\t$rows=$GLOBALS['SITE_DB']->query_select('newsletters',array('id','title'));\n\t\t\t\tif (get_forum_type()=='ocf')\n\t\t\t\t{\n\t\t\t\t\t$newsletters->attach(form_input_list_entry('',is_null($newsletter),do_lang_tempcode('NEWSLETTER_OCF')));\n\t\t\t\t}\n\t\t\t\tforeach ($rows as $_newsletter)\n\t\t\t\t\t$newsletters->attach(form_input_list_entry(strval($_newsletter['id']),$_newsletter['id']===$newsletter,get_translated_text($_newsletter['title'])));\n\t\t\t\tif (!$newsletters->is_empty())\n\t\t\t\t\t$fields->attach(form_input_list(do_lang_tempcode('NEWSLETTER'),'','newsletter',$newsletters,NULL,false,false));\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (get_forum_type()=='ocf') // If you are not using OCF, it is IMPLIED you will have to be sending to newsletter people, hence no choice\n\t\t\t\t{\n\t\t\t\t\trequire_lang('newsletter');\n\t\t\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('NEWSLETTER'),do_lang_tempcode('DESCRIPTION_NEWSLETTER_INSTEAD'),'newsletter',$newsletter==1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "public function _settings_section_dropbox() {\n _e( 'The Zendesk Dropbox places a convenient tab on your pages that allow your visitors to contact you via a pop-up form.', 'zendesk' );\n }", "function section_optionator( $settings ){\n\t\t$settings = wp_parse_args($settings, $this->optionator_default);\n\t\t$opt_array = array(\n\t\t\t'tm_candy_open' => array(\n\t\t\t\t'title'\t\t\t=> 'Show at the start',\n\t\t\t\t'type' \t=> 'check',\n\t\t\t\t'inputlabel' \t=> __( 'Show at the start', $this->domain ),\n\t\t\t\t'shortexp' \t\t=> 'Default: Hidden',\n\t\t\t\t'exp' \t\t=> 'Check if you want to show the notification when the page is loaded, by default the notification area is hidden and it show the ribbon to open it.'\n\t\t\t),\n\t\t\t'tm_candys_set' \t=> array(\n\t\t\t\t'type' \t\t\t=> 'select_taxonomy',\n\t\t\t\t'taxonomy_id'\t=> $this->tax_id,\n\t\t\t\t'title' \t\t=> __('Select notiofication set to show', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('The set to show', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Select a set', $this->domain),\n\t\t\t\t'exp' \t\t\t=> __('if don\\'t select a set it will show all notification entries', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_items' => array(\n\t\t\t\t'type' \t\t\t=> 'count_select',\n\t\t\t\t'inputlabel'\t=> __('Number of notifications to show', $this->domain),\n\t\t\t\t'title' \t\t=> __('Number of notifications', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('Default value is 1', $this->domain),\n\t\t\t\t'count_start'\t=> 1, \n \t\t\t\t'count_number'\t=> 5,\n\t\t\t),\n\t\t\t'tm_candys_pause_on_hover' => array(\n\t\t\t\t'type'\t\t\t=> 'check',\n\t\t\t\t'title'\t\t\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('', $this->domain),\n\t\t\t\t'exp'\t\t\t=> __('Determines whether the timeout between transitions should be paused \"onMouseOver\"', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_duration_pause' \t=> array(\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t\t'inputlabel'\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'title' \t\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'shortexp'\t\t=> '',\n\t\t\t\t'exp'\t\t\t=> __('The amount of milliseconds the carousel will pause. 1000 = 1 second', $this->domain),\n\t\t\t),\n\n\t\t\t\t\n\t\t);\n\n\t\t$settings = array(\n\t\t\t'id' \t\t=> $this->id.'_meta',\n\t\t\t'name' \t\t=> $this->name,\n\t\t\t'icon' \t\t=> $this->icon, \n\t\t\t'clone_id'\t=> $settings['clone_id'], \n\t\t\t'active'\t=> $settings['active']\n\t\t);\n\n\t\tregister_metatab($settings, $opt_array);\n\t\t\n\t}", "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 simplenews_admin_settings_mail($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_mail_backend']['simplenews_use_cron'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use cron to send newsletters'),\n '#default_value' => variable_get('simplenews_use_cron', TRUE),\n '#description' => t('When checked cron will be used to send newsletters (recommended). Test newsletters and confirmation emails will be sent immediately. Leave unchecked for testing purposes.'),\n );\n\n $sources = simplenews_get_source_caches();\n $sources_labels = array();\n $sources_descriptions = '';\n foreach ($sources as $name => $source) {\n $sources_labels[$name] = $source['label'];\n $sources_descriptions .= t('<strong>@label</strong>: @description <br />', array('@label' => $source['label'], '@description' => $source['description']));\n }\n\n $form['simplenews_mail_backend']['simplenews_source_cache'] = array(\n '#type' => 'select',\n '#title' => t('Cache'),\n '#description' => t('Chosing a different cache implementation allows for a different behavior during sending mails.') . '<br /><br />' . $sources_descriptions,\n '#options' => $sources_labels,\n '#default_value' => variable_get('simplenews_source_cache', 'SimplenewsSourceCacheBuild'),\n );\n\n $throttle = drupal_map_assoc(array(1, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000));\n $throttle[SIMPLENEWS_UNLIMITED] = t('Unlimited');\n if (function_exists('getrusage')) {\n $description_extra = '<br />' . t('Cron execution must not exceed the PHP maximum execution time of %max seconds. You find the time spend to send emails in the <a href=\"/admin/reports/dblog\">Recent log entries</a>.', array('%max' => ini_get('max_execution_time')));\n }\n else {\n $description_extra = '<br />' . t('Cron execution must not exceed the PHP maximum execution time of %max seconds.', array('%max' => ini_get('max_execution_time')));\n }\n $form['simplenews_mail_backend']['simplenews_throttle'] = array(\n '#type' => 'select',\n '#title' => t('Cron throttle'),\n '#options' => $throttle,\n '#default_value' => variable_get('simplenews_throttle', 20),\n '#description' => t('Sets the numbers of newsletters sent per cron run. Failure to send will also be counted.') . $description_extra,\n );\n $form['simplenews_mail_backend']['simplenews_spool_expire'] = array(\n '#type' => 'select',\n '#title' => t('Mail spool expiration'),\n '#options' => array(\n 0 => t('Immediate'),\n 1 => format_plural(1, '1 day', '@count days'),\n 7 => format_plural(1, '1 week', '@count weeks'),\n 14 => format_plural(2, '1 week', '@count weeks'),\n ),\n '#default_value' => variable_get('simplenews_spool_expire', 0),\n '#description' => t('Newsletter mails are spooled. How long must messages be retained in the spool after successful sending. Keeping the message in the spool allows mail statistics (which is not yet implemented). If cron is not used, immediate expiration is advised.'),\n );\n $form['simplenews_mail_backend']['simplenews_debug'] = array(\n '#type' => 'checkbox',\n '#title' => t('Log emails'),\n '#default_value' => variable_get('simplenews_debug', FALSE),\n '#description' => t('When checked all outgoing simplenews emails are logged in the system log. A logged email does not guarantee that it is send or will be delivered. It only indicates that a message is sent to the PHP mail() function. No status information is available of delivery by the PHP mail() function.'),\n );\n return system_settings_form($form);\n}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Midtrans.', 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form. generated from `init_form_fields`\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function sec_site_options(){\n\t\t$options_array = array(\n\t\t\tarray(\n\t\t\t\t'type' \t=> \t'multi',\n\t\t\t\t'col'\t=> 1,\n\t\t\t\t'title' => __( 'Post Type Settings', 'pagelines' ),\n\t\t\t\t'opts'\t=> array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'\t=>\t'disable_public_pt',\n\t\t\t\t\t\t'type'\t=> 'check',\n\t\t\t\t\t\t'label'\t=> __( 'Set Projects Post Type to Private.', 'pagelines' ),\n\t\t\t\t\t\t'help'\t=> __( 'Disable Single Project Post view.', 'pagelines' ),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\treturn $options_array;\n\t}", "function btpay_config_mails_fn()\n{\n if (!current_user_can('manage_options'))\n {\n wp_die('You do not have sufficient permissions!');\n }\n\n btpay_mail_config_action();\n}", "function pt_options_page()\n\t\t{ \n\t\t\t?>\n\t\t\t<form action='options.php' method='post'>\n\t\t\t\t<h2>Pretty block Testimonials</h2>\n\t\t\t\t<?php\n\t\t\t\tsettings_fields( 'ptblock' );\n\t\t\t\tdo_settings_sections( 'ptblock' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}", "public function updatedOptIn()\n {\n $this->updateValue(\n 'opt_in',\n $this->optIn,\n \"You have updated the customer's marketing email subscription.\"\n );\n }", "function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}", "protected function defineOptions() {\r\n $options = parent::defineOptions();\r\n $options['view_type'] = array('default' => 'web');\r\n\t$options['image_style'] = array('default' => '');\r\n\t$options['link_to_entity'] = array('default' => '');\r\n\r\n return $options;\r\n }", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "function utb_get_api_settings()\n{\n $utbclientid = get_option('utb_clientid');\n $utbsecret = get_option('utb_secret');\n $utbbrewery = get_option('utb_breweryid');\n $config = array(\n 'clientId' => $utbclientid,\n 'clientSecret' => $utbsecret,\n 'breweryid' => $utbbrewery,\n 'redirectUri' => $utbredirecturi\n );\n return $config;\n}", "public function setShowNewsletter($blShow)\n {\n $this->_iNewsStatus = $blShow;\n }", "public static function bkap_get_extra_options(){\n\n return apply_filters( 'bkap_extra_options', array(\n \n 'bkap_resource' => array(\n 'id' => '_bkap_resource',\n 'wrapper_class' => 'show_if_simple',\n 'label' => __( 'Booking Resource', 'woocommerce-booking' ),\n 'description' => __( 'Booking Resource Description.', 'woocommerce-booking' ),\n 'default' => 'no',\n ),\n ) );\n }", "function ciniki_wineproduction_hooks_webOptions(&$ciniki, $tnid, $args) {\n\n //\n // Check to make sure the module is enabled\n //\n if( !isset($ciniki['tenant']['modules']['ciniki.wineproduction']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.108', 'msg'=>\"I'm sorry, the page you requested does not exist.\"));\n }\n\n //\n // Get the settings from the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_web_settings', 'tnid', $tnid, 'ciniki.web', 'settings', 'page');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['settings']) ) {\n $settings = array();\n } else {\n $settings = $rc['settings'];\n }\n\n $pages = array();\n\n $pages['ciniki.wineproduction'] = array('name'=>'Wine Products', 'options'=>array(\n array('label'=>'Category Format',\n 'setting'=>'page-wineproducts-categories-format', \n 'type'=>'toggle',\n 'value'=>(isset($settings['page-wineproducts-categories-format'])?$settings['page-wineproducts-categories-format']:'thumbnails'),\n 'toggles'=>array(\n array('value'=>'thumbnails', 'label'=>'Thumbnails'),\n array('value'=>'list', 'label'=>'List'),\n array('value'=>'tradingcards', 'label'=>'Trading Cards'),\n ),\n ),\n array('label'=>'List Format',\n 'setting'=>'page-wineproducts-list-format',\n 'type'=>'toggle',\n 'value'=>(isset($settings['page-wineproducts-list-format'])?$settings['page-wineproducts-list-format']:'imagelist'),\n 'toggles'=>array(\n array('value'=>'imagelist', 'label'=>'Image List'),\n array('value'=>'tradingcards', 'label'=>'Trading Cards'),\n ),\n ),\n array('label'=>'Thumbnail Format',\n 'setting'=>'page-wineproducts-thumbnail-format', \n 'type'=>'toggle',\n 'value'=>(isset($settings['page-wineproducts-thumbnail-format'])?$settings['page-wineproducts-thumbnail-format']:'square-cropped'),\n 'toggles'=>array(\n array('value'=>'square-cropped', 'label'=>'Cropped'),\n array('value'=>'square-padded', 'label'=>'Padded'),\n ),\n ),\n array('label'=>'Thumbnail Padding Color',\n 'setting'=>'page-wineproducts-thumbnail-padding-color', \n 'type'=>'colour',\n 'value'=>(isset($settings['page-wineproducts-thumbnail-padding-color'])?$settings['page-wineproducts-thumbnail-padding-color']:'#ffffff'),\n ),\n ));\n\n return array('stat'=>'ok', 'pages'=>$pages);\n}", "public function updateSubscriptionSettings(){\n if( Request::isMethod('post') && Session::token() == Input::get('_token') ){\n $get_subscription_settings_option = Option :: where('option_name', '_subscription_settings_data')->first();\n \n if(!empty($get_subscription_settings_option)){\n $subscription_settings_data = unserialize($get_subscription_settings_option->option_value);\n \n $visibility = (Input::has('subscriptions_visibility')) ? true : false;\n $cookie_visibility = (Input::has('subscribe_popup_cookie_set')) ? true : false;\n \n if(isset($subscription_settings_data['subscription_visibility'])){\n $subscription_settings_data['subscription_visibility'] = $visibility; \n }\n \n if(isset($subscription_settings_data['subscribe_type'])){\n $subscription_settings_data['subscribe_type'] = Input::get('subscriptions_type'); \n }\n \n if(isset($subscription_settings_data['subscribe_options'])){\n $subscription_settings_data['subscribe_options'] = Input::get('subscribe_options'); \n }\n \n if(isset($subscription_settings_data['popup_bg_color'])){\n $subscription_settings_data['popup_bg_color'] = Input::get('subscriptions_popup_bg_color'); \n }\n \n if(isset($subscription_settings_data['popup_content'])){\n $subscription_settings_data['popup_content'] = string_encode(Input::get('subscription_content_editor')); \n }\n \n $subscription_settings_data['popup_display_page'] = Input::get('popup_display'); \n \n if(isset($subscription_settings_data['subscribe_btn_text'])){\n $subscription_settings_data['subscribe_btn_text'] = Input::get('subscribe_btn_text'); \n }\n \n if(isset($subscription_settings_data['subscribe_popup_cookie_set_visibility'])){\n $subscription_settings_data['subscribe_popup_cookie_set_visibility'] = $cookie_visibility; \n }\n \n if(isset($subscription_settings_data['subscribe_popup_cookie_set_text'])){\n $subscription_settings_data['subscribe_popup_cookie_set_text'] = Input::get('subscribe_popup_cookie_set_text'); \n }\n\n $data = array(\n 'option_value' => serialize($subscription_settings_data)\n );\n\n if( Option::where('option_name', '_subscription_settings_data')->update($data))\n {\n Session::flash('success-message', Lang::get('admin.successfully_updated_msg'));\n return redirect()->back();\n }\n } \n }\n }", "public function getProductViewCountdownOptions() {\n $view_countbox_options = array();\n\n if($this->getProductViewCountdownConfig('enabled') == 1) {\n $view_countbox_options['enabled'] = true;\n } else {\n $view_countbox_options['enabled'] = false;\n }\n\n if($this->getProductViewCountdownConfig('insertion')) {\n $view_countbox_options['insertion'] = $this->getProductViewCountdownConfig('insertion');\n } else {\n $view_countbox_options['insertion'] = 'after';\n }\n\n if($this->getProductViewCountdownConfig('parent_element')) {\n $view_countbox_options['parent_element'] = $this->getProductViewCountdownConfig('parent_element');\n } else {\n $view_countbox_options['parent_element'] = '.product-info-main';\n }\n\n if($this->getProductViewCountdownConfig('children_element')) {\n $view_countbox_options['children_element'] = $this->getProductViewCountdownConfig('children_element');\n } else {\n $view_countbox_options['children_element'] = '.product-info-price';\n }\n\n return $view_countbox_options;\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "function opslert_plugin_settings(){\n return array( \n 'ops_alert_server' => array('friendly_name' => 'Ops Alert Server', \n 'default' => 'alerts.cheggnet.com',\n 'type' => 'string'),\n 'ops_alert_server_offset' => array('friendly_name' => 'Alert Offset',\n 'default' => 1000000, \n 'type' => 'integer')\n \n );\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}", "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 }", "public function composerSettings() {\n\n if ( current_user_can('manage_options') && $this->composer->isPlugin()) {\n //add_options_page(__(\"Swift Page Builder Settings\", \"js_composer\"), __(\"Swift Page Builder\", \"js_composer\"), 'install_plugins', \"wpb_vc_settings\", array($this, \"composerSettingsMenuHTML\"));\n }\n }", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function egsr_subscriber_cap(){\n return Array ( \n 'read' => true,\n );\n}", "public static function contract_options() {\n return array(\n '' => '',\n 'RENT' => __( 'Rent', 'inventor-properties' ),\n 'SALE' => __( 'Sale', 'inventor-properties' ),\n );\n }", "function acapi_common_options() {\n $options = array(\n 'email' => array(\n 'description' => 'Email address for your Acquia Network user account',\n 'default_value' => '',\n 'prompt' => array('Email', NULL, TRUE, FALSE),\n 'example-value' => '[email protected]',\n ),\n 'key' => array(\n 'description' => 'Private Cloud API key for your Acquia Network user account',\n 'default_value' => '',\n 'prompt' => array('Key', NULL, TRUE, TRUE),\n 'example-value' => 'apikey',\n ),\n 'acapi-conf-path' => array(\n 'description' => 'Acquia Cloud API config files location. If not specified config will be loaded from $HOME/.drush',\n 'default_value' => '',\n 'example-value' => '/home/user/acapi-site-configs',\n ),\n 'ac-config' => array(\n 'description' => 'Acquia Cloud API user config file location. If not specified config will be loaded from $HOME',\n 'default_value' => drush_server_home() . '/.acquia/cloudapi.conf',\n 'example-value' => drush_server_home() . '/.acquia/cloudapi-site-specific.conf',\n ),\n 'endpoint' => array(\n 'description' => 'Acquia Cloud API endpoint URL.',\n 'default_value' => 'https://cloudapi.acquia.com/v1',\n 'prompt' => array('Endpoint URL', NULL, TRUE, FALSE),\n 'example-value' => 'https://cloudapi.acquia.com/v1',\n ),\n 'cainfo' => array(\n 'description' => 'Path to a file containing the SSL certificates needed to verify the ac-api-endpoint.',\n 'default_value' => dirname(__FILE__) . '/cloudapi.acquia.com.pem',\n 'example-value' => 'cloudapi.acquia.com.pem',\n ),\n 'format' => array(\n 'description' => 'Format to output the object. Use \"print_r\" for print_r, \"export\" for var_export, and \"json\" for JSON. If not provided, the output is printed in a human-readable format.',\n 'default_value' => '',\n 'example-value' => 'json',\n ),\n );\n return $options;\n}", "function _simplenews_issue_filter_default() {\n return array(\n 'newsletter' => 'all',\n );\n}", "function tos_menu() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'userdash_tos' )\n\t\t);\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function load_content_builder_cpts() {\n // FROM PLUGIN AND THEME\n echo efflab_cb_get_module_cpts();\n \n}", "function CreateNewsletter()\n\t{\n\t\t$newsletterapi = $this->GetApi();\n\n\t\t$GLOBALS['Action'] = 'Create&SubAction=Step2';\n\t\t$GLOBALS['CancelButton'] = GetLang('CreateNewsletterCancelButton');\n\t\t$GLOBALS['Heading'] = GetLang('CreateNewsletter');\n\t\t$GLOBALS['Intro'] = GetLang('CreateNewsletterIntro');\n\t\t$GLOBALS['NewsletterDetails'] = GetLang('CreateNewsletterHeading');\n\n\t\t$GLOBALS['FormatList'] = '';\n\t\t$allformats = $newsletterapi->GetAllFormats();\n\t\tforeach ($allformats as $id => $name) {\n\t\t\tif ($name == 'TextAndHTML') {\n\t\t\t\t$recommended = ' ' . GetLang('Recommended');\n\t\t\t} else {\n\t\t\t\t$recommended = '';\n\t\t\t}\n\t\t\t$GLOBALS['FormatList'] .= '<option value=\"' . $id . '\">' . GetLang('Format_' . $name) . $recommended .'</option>';\n\t\t}\n\n\t\t$templateselects = $this->GetTemplateList();\n\t\t$GLOBALS['TemplateList'] = $templateselects;\n\n\t\t$this->ParseTemplate('Newsletter_Form_Step1');\n\t}", "function short_code_func(){\n\t\t$opt_val = get_option( 'wpCertifications_configData' );\n\n\t\t$savedData = json_decode($opt_val);\n\n\t\t$view_bag['list_id'] = $savedData->list_id;\n\t\t$view_bag['api_key'] = $savedData->api_key;\n\n\t\t$sc = new wpCertifications();\n\t\t$content = $sc->get_render( 'form.php', $view_bag );\n return $content;\n\t}", "function set_wmpl_enabled_options( $wmpl_options ) {\n return\n array_merge(\n $wmpl_options ,\n array(\n 'popup_email_title' ,\n 'popup_email_from_placeholder' ,\n 'popup_email_subject_placeholder' ,\n 'popup_email_message_placeholder' ,\n )\n );\n }", "public function __construct() {\n\t\tparent::__construct( true, 'wpsimplesmtp_smtp_ms', 'wpsimplesmtp_ms_adminaccess_section' );\n\n\t\tadd_action( 'network_admin_menu', [ &$this, 'add_network_menu' ] );\n\t\tadd_action( 'admin_init', [ &$this, 'network_settings_init' ] );\n\t\tadd_action( 'network_admin_edit_wpsimplesmtpms', [ &$this, 'update_network_settings' ] );\n\n\t\t$this->options = new Options();\n\t}", "public function pageBudgetmailer()\n {\n print new Template( 'options' );\n }", "function fantacalcio_send_newsletter($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n \n global $user;\n \n $sql = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d' AND c_id IN (SELECT c_id FROM {fanta_competitions} WHERE newsletter = 1)\";\n $result = db_query($sql, $vote_round);\n while ($row = db_fetch_object($result)) {\n $rounds[$row->c_id] = $row;\n }\n \n //newsletters\n //TODO //Administation\n $tids = array(1 => 13, 2 => 16);\n \n foreach ($rounds as $c_id => $round) {\n\n $tid = $tids[$c_id];\n\n $body = newsletter_create_body($c_id, $round->competition_round);\n $title = \"Riepilogo \" . (!empty($round->round_label) ? $round->round_label : $round->competition_round . \"a Giornata\");\n\n //create node\n $newsletter = array();\n $newsletter = (object) array('title'=> $title, 'body'=> $body, 'type' => 'simplenews', 'uid' => $user->uid, 'language' => 'it');\n\n //taxonomy\n $newsletter->taxonomy[$tid] = taxonomy_get_term($tid);\n $newsletter->simplenews = array('tid' => $tid, 's_format' => 'html', 'send' => SIMPLENEWS_COMMAND_SEND_NOW);\n\n node_save($newsletter);\n\n module_invoke('simplenews', 'simplenews_nodeapi', $newsletter, 'insert');\n\n }\n \n return \"Newsletter inviate\"; \n}" ]
[ "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.53282636", "0.53198093", "0.53140634", "0.5309593", "0.5304775", "0.5289598", "0.5273325", "0.5263288", "0.52622455", "0.52583337", "0.5252456", "0.5247844", "0.52400017", "0.52360606", "0.52351546", "0.5218688", "0.52174354", "0.52062905", "0.5197921", "0.5191949", "0.5191949", "0.51910347", "0.5180295", "0.51713836", "0.51702595", "0.5168335", "0.51677334", "0.51672614", "0.51657027", "0.51576537", "0.51567256", "0.5156536", "0.51491535", "0.5147714", "0.5141271", "0.51408774", "0.5133867", "0.51272637", "0.51267356", "0.51250374", "0.51216197", "0.5118613", "0.5104714", "0.51017743", "0.50966156", "0.5093217", "0.5088825", "0.5079519", "0.50762534", "0.50749", "0.5074089", "0.5071993", "0.5064325", "0.5062182", "0.5055227", "0.5044534", "0.5040107", "0.50339854", "0.5033786", "0.50320536", "0.5029232", "0.50285727", "0.50194925", "0.5018088", "0.50157464", "0.5008039", "0.5006974", "0.50043416", "0.50036836", "0.50027925" ]
0.7374673
0
Helper for creating new instances of this component.
function call_to_action( array $settings = [], array $data = [], array $fm_fields = [] ) : Call_To_Action { return new Call_To_Action( $settings, $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function create() {\n\t}", "public function create() {\n\t \n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function newInstance();", "public function newInstance();", "public function new()\n\t{\n\t\t//\n\t}", "public function new()\n\t{\n\t\t//\n\t}", "public function create() {\n\n\t}", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function createByComponents($components) {}", "public function new()\n {\n //\n }", "public function new()\n {\n //\n }", "public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }", "public function create() {\n\n\t\t\n\t}", "public function create() {\r\n }", "public static abstract function createInstance();", "public function create() {}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t\t//\n\t\t}", "public function create(){}", "public function create()\n\t {\n\t //\n\t }", "public function create() {\n \n }", "public function create() {\n \n }", "public function create() {\n }", "public function create() {\n }", "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "public function createNew() {\n\t}", "static function create(): self;", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function create() {\r\n //\r\n }", "public function create()\r\n {\r\n }", "public function create()\r\n {\r\n }", "public abstract function createInstance($parameters);", "public function create()\n {\n \t\n }", "public function create()\n {\n \t\n }", "public function create()\n {\n //TODO\n }", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function create() {\n //not implemented\n }", "public function create()\n {}", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "public function create()\n\t{\n\n\t}", "abstract protected function create ();", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function createNew();", "public function regularNew() {}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}" ]
[ "0.67847914", "0.6752442", "0.6668784", "0.6668784", "0.6668784", "0.6665173", "0.6665173", "0.6633438", "0.6633438", "0.6619607", "0.6607726", "0.6590344", "0.6587409", "0.6587409", "0.658727", "0.6584584", "0.65551203", "0.6550108", "0.6527658", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.65139335", "0.6499241", "0.6491623", "0.64625734", "0.64505994", "0.64505994", "0.6445803", "0.6445803", "0.6429397", "0.6412365", "0.6406191", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.63939565", "0.6390023", "0.63889277", "0.6387699", "0.6387699", "0.6384817", "0.63597196", "0.63597196", "0.63516355", "0.6345562", "0.6344518", "0.6342826", "0.63422996", "0.6340759", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.6333251", "0.63328266", "0.63298386", "0.63298386", "0.63279396", "0.63208604", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462", "0.6316462" ]
0.0
-1
Handle newsletter form submissions.
function newsletter_submission_ajax() { /** * Validate nonce. */ if ( ! isset( $_POST['newsletter_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['newsletter_nonce'] ) ), 'civil_newsletter_nonce' ) ) { wp_send_json_error( __( 'Something went wrong! Reload the page and try again.', 'civil-first-fleet' ) ); } /** * Validate email. */ if ( empty( $_POST['email'] ) ) { wp_send_json_error( __( 'Please provide an email.', 'civil-first-fleet' ) ); } $email = sanitize_text_field( wp_unslash( $_POST['email'] ) ); // Invalid email. if ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) { wp_send_json_error( __( 'Email is invalid, please enter a valid email address (i.e. [email protected]).', 'civil-first-fleet' ) ); } /** * Validate mailchimp list slug. */ $list = ''; if ( ! empty( $_POST['list'] ) ) { // Get sanitized list slug. $list = sanitize_text_field( wp_unslash( $_POST['list'] ) ); } /** * Get various settings. */ $call_to_action = new Call_To_Action(); $newsletter_list_id = $call_to_action->get_newsletter_list_id_by_slug( $list ); $mailchimp_api_key = $call_to_action->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_api_key' ); $success_message = $call_to_action->get_option( 'newsroom-settings', 'newsletter', 'success_message' ); // Validate newsletter list id. if ( empty( $newsletter_list_id ) ) { wp_send_json_error( __( 'No email list found.', 'civil-first-fleet' ) ); } // Fallback success message. if ( empty( $success_message ) ) { $success_message = __( 'Thank you for subscribing!', 'civil-first-fleet' ); } // Mailchimp is not configured for this site. if ( empty( $mailchimp_api_key ) ) { wp_send_json_error( __( 'Mailchimp is not configured properly.', 'civil-first-fleet' ) ); } // Get the domain. $domain = substr( $mailchimp_api_key, strpos( $mailchimp_api_key, '-' ) + 1 ); // Send data to Mailchimp. $response = wp_remote_post( 'https://' . $domain . '.api.mailchimp.com/3.0/lists/' . $newsletter_list_id . '/members', [ 'headers' => [ 'Authorization' => 'Basic ' . base64_encode( 'user:' . $mailchimp_api_key ), 'Content Type' => 'application/json', ], 'body' => wp_json_encode( [ 'email_address' => $email, 'status' => 'subscribed', ] ), ] ); // Check response. if ( is_wp_error( $response ) ) { wp_send_json_error( $response->get_error_message() ); } // Get response body. $body = json_decode( wp_remote_retrieve_body( $response ), true ); // New subscription confirmed. if ( ! empty( $body['id'] ) ) { wp_send_json_success( $success_message ); } // Generic error if title and detail are unavailable. if ( empty( $body['title'] ) || empty( $body['detail'] ) ) { wp_send_json_success( esc_html__( 'Something went wrong. Unknown error.', 'civil-first-fleet' ) ); } // Determine which response to use. switch ( $body['title'] ) { case 'Member Exists': $message = __( 'You are already subscribed to this list. Thanks!', 'civil-first-fleet' ); break; default: $message = $body['detail']; } wp_send_json_success( $message ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index() {\n\t\tif($this->RequestHandler->isPost()) {\n\n\t\t\tprint_r($this->data);\n\t\t\tdie;\n\n\t\t\tif($this->FormNewsletter->save($this->data)) {\n\n\t\t\t}\n\t\t}\n\n\t}", "function simplenews_admin_newsletter_form_submit($form, &$form_state) {\n //dpm($form_state);\n $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\n if ($op == t('Delete')) {\n $form_state['redirect'] = 'admin/config/services/simplenews/categories/' . $form_state['values']['newsletter_id'] . '/delete';\n return;\n }\n\n $newsletter = $form_state['newsletter'];\n entity_form_submit_build_entity('simplenews_newsletter', $newsletter, $form, $form_state);\n\n switch (simplenews_newsletter_save($newsletter)) {\n case SAVED_NEW:\n drupal_set_message(t('Created new newsletter %name.', array('%name' => $newsletter->name)));\n watchdog('simplenews', 'Created new newsletter %name.', array('%name' => $newsletter->name, WATCHDOG_NOTICE, l(t('edit'), 'admin/config/services/simplenews/categories/' . $newsletter->newsletter_id . '/edit')));\n break;\n\n case SAVED_UPDATED:\n drupal_set_message(t('Updated newsletter %name.', array('%name' => $newsletter->name)));\n watchdog('simplenews', 'Updated newsletter %name.', array('%name' => $newsletter->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/config/services/simplenews/categories/' . $newsletter->newsletter_id . '/edit'));\n break;\n }\n\n $form_state['values']['newsletter_id'] = $newsletter->newsletter_id;\n $form_state['newsletter_id'] = $newsletter->newsletter_id;\n $form_state['redirect'] = 'admin/config/services/simplenews';\n}", "public function actionNewsletter()\n\t{\n\t\t$model=new Newsletter('default');\n\t\t\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='newsletter')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\n\t\telse if (isset($_POST['Newsletter']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Newsletter'];\n\t\t\t$model->date_enrolled = new CDbExpression('now()');\n\t\t\t\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('newsletter','Thank you for subscribing to our newsletter! Please add .... to your contacts to ensure you get our emails.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->render(\n\t\t\t'newsletter',\n\t\t\tarray (\n\t\t\t\t'model' => $model,\n\t\t\t)\n\t\t);\n\t}", "function Process()\n\t{\n\t\t$GLOBALS['Message'] = '';\n\n\t\t$action = (isset($_GET['Action'])) ? strtolower(urldecode($_GET['Action'])) : null;\n\t\t$user = &GetUser();\n\n\t\t$check_access = $action;\n\t\t$secondary_actions = array('activate', 'deactivate', 'activatearchive', 'deactivatearchive');\n\t\tif (in_array($check_access, $secondary_actions)) {\n\t\t\t$check_access = 'approve';\n\t\t}\n\n\t\t// with 'change' actions, each separate action is checked further on, so we'll just check they can manage anything in this area.\n\t\tif (in_array($action, array('change', 'checkspam', 'viewcompatibility', 'processpaging', 'sendpreview', 'preview'))) {\n\t\t\t$check_access = 'manage';\n\t\t}\n\n\t\t$access = $user->HasAccess('newsletters', $check_access);\n\n\n\t\t$popup = (in_array($action, $this->PopupWindows)) ? true : false;\n\t\tif (!in_array($action, $this->SuppressHeaderFooter)) {\n\t\t\t$this->PrintHeader($popup);\n\t\t}\n\n\t\tif (!$access) {\n\t\t\tif (!$popup) {\n\t\t\t\t$this->DenyAccess();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check user permissions to determine if the user can access this newsletter\n\t\t */\n\t\t\t$tempAPI = null;\n\t\t\t$tempCheckActions = array('change', 'checkspam', 'viewcompatibility', 'processpaging', 'sendpreview', 'view', 'preview', 'edit', 'send', 'delete', 'copy', 'update');\n\t\t\t$tempID = null;\n\n\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t$tempID = $_GET['id'];\n\t\t\t} elseif(isset($_POST['newsletters'])) {\n\t\t\t\t$tempID = $_POST['newsletters'];\n\t\t\t}\n\n\t\t\tif (!is_null($tempID)) {\n\t\t\t\t$_GET['id'] = $tempID;\n\t\t\t\t$_POST['newsletters'] = $tempID;\n\n\t\t\t\tif (!$user->Admin() && in_array($action, $tempCheckActions)) {\n\t\t\t\t\tif (!is_array($tempID)) {\n\t\t\t\t\t\t$tempID = array($tempID);\n\t\t\t\t\t}\n\n\t\t\t\t\t$tempAPI = $this->GetApi();\n\n\t\t\t\t\tforeach ($tempID as $tempEachID) {\n\t\t\t\t\t\t$tempEachID = intval($tempEachID);\n\t\t\t\t\t\tif ($tempEachID == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$tempAPI->Load($tempEachID)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($tempAPI->ownerid != $user->userid) {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($tempID);\n\t\t\tunset($tempCheckActions);\n\t\t\tunset($tempAPI);\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\tif ($action == 'processpaging') {\n\t\t\t$this->SetPerPage($_GET['PerPageDisplay']);\n\t\t\t$action = '';\n\t\t}\n\n\t\tswitch ($action) {\n\t\t\tcase 'viewcompatibility':\n\t\t\t\t$newsletter_info = IEM::sessionGet('Newsletters');\n\n\t\t\t\t$html = (isset($_POST['myDevEditControl_html'])) ? $_POST['myDevEditControl_html'] : false;\n\t\t\t\t$text = (isset($_POST['TextContent'])) ? $_POST['TextContent'] : false;\n\t\t\t\t$showBroken = isset($_REQUEST['ShowBroken']) && $_REQUEST['ShowBroken'] == 1;\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $html;\n\t\t\t\t$details['textcontent'] = $text;\n\t\t\t\t$details['format'] = $newsletter_info['Format'];\n\n\t\t\t\t$this->PreviewWindow($details, $showBroken);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'checkspamdisplay':\n\t\t\t\t$force = IEM::ifsetor($_GET['Force'], false);\n\t\t\t\t$this->CheckContentForSpamDisplay($force);\n\t\t\tbreak;\n\n\t\t\tcase 'checkspam':\n\t\t\t\t$text = (isset($_POST['TextContent'])) ? $_POST['TextContent'] : false;\n\t\t\t\t$html = (isset($_POST['myDevEditControl_html'])) ? $_POST['myDevEditControl_html'] : false;\n\t\t\t\t$this->CheckContentForSpam($text, $html);\n\t\t\tbreak;\n\n\t\t\tcase 'activate':\n\t\t\tcase 'deactivate':\n\t\t\tcase 'activatearchive':\n\t\t\tcase 'deactivatearchive':\n\t\t\t\t$id = (int)$_GET['id'];\n\t\t\t\t$newsletterapi = $this->GetApi();\n\t\t\t\t$newsletterapi->Load($id);\n\n\t\t\t\t$message = '';\n\n\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\tswitch ($action) {\n\t\t\t\t\t\tcase 'activatearchive':\n\t\t\t\t\t\t\t$newsletterapi->Set('archive', 1);\n\t\t\t\t\t\t\tif (!$newsletterapi->Active()) {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterArchive_ActivatedSuccessfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'deactivatearchive':\n\t\t\t\t\t\t\t$newsletterapi->Set('archive', 0);\n\t\t\t\t\t\t\t$message .= $this->PrintWarning('NewsletterArchive_DeactivatedWarning');\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterArchive_DeactivatedSuccessfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'activate':\n\t\t\t\t\t\t\t$allow_attachments = $this->CheckForAttachments($id, 'newsletters');\n\t\t\t\t\t\t\tif ($allow_attachments) {\n\t\t\t\t\t\t\t\t$newsletterapi->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterActivatedSuccessfully');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterActivateFailed_HasAttachments');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$newsletterapi->Set('active', 0);\n\t\t\t\t\t\t\tif ($newsletterapi->Archive()) {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t\t$message .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$message .= $this->PrintSuccess('NewsletterDeactivatedSuccessfully');\n\t\t\t\t\t\t}\n\t\t\t\t\t$newsletterapi->Save();\n\n\t\t\t\t\t$GLOBALS['Message'] = $message;\n\t\t\t\t}\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\n\t\t\tcase 'sendpreviewdisplay':\n\t\t\t\t$this->SendPreviewDisplay();\n\t\t\tbreak;\n\n\t\t\tcase 'sendpreview':\n\t\t\t\t$this->SendPreview();\n\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$newsletters = array($id);\n\t\t\t\t$this->DeleteNewsletters($newsletters);\n\t\t\tbreak;\n\n\t\t\tcase 'view':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$type = strtolower(get_class($this));\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\tif (!$newsletter->Load($id)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Log this to \"User Activity Log\"\n\t\t\t\t$logURL = SENDSTUDIO_APPLICATION_URL . '/admin/index.php?Page=' . __CLASS__ . '&Action=Edit&id=' . $_GET['id'];\n\t\t\t\tIEM::logUserActivity($logURL, 'images/newsletters_view.gif', $newsletter->name);\n\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $newsletter->GetBody('HTML');\n\t\t\t\t$details['textcontent'] = $newsletter->GetBody('Text');\n\t\t\t\t$details['format'] = $newsletter->format;\n\n\t\t\t\t$this->PreviewWindow($details);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'preview':\n\t\t\t\t$id = $this->_getGETRequest('id', 0);\n\t\t\t\t$type = strtolower(get_class($this));\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\tif (!$newsletter->Load($id)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$details = array();\n\t\t\t\t$details['htmlcontent'] = $newsletter->GetBody('HTML');\n\t\t\t\t$details['textcontent'] = $newsletter->GetBody('Text');\n\t\t\t\t$details['format'] = $newsletter->format;\n\n\t\t\t\t$this->PreviewWindow($details, false, $id);\n\t\t\t\texit;\n\t\t\tbreak;\n\n\t\t\tcase 'copy':\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$api = $this->GetApi();\n\t\t\t\tlist($newsletter_result, $files_copied) = $api->Copy($id);\n\t\t\t\tif (!$newsletter_result) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCopyFail');\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t} else {\n\t\t\t\t\t$changed = false;\n\t\t\t\t\t// check the permissions.\n\t\t\t\t\t// if we can't make archive a newsletter, disable this aspect of it.\n\t\t\t\t\tif (!$user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t\t\t$api->Set('archive', 0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// if we can't approve newsletters, then make sure we disable it.\n\t\t\t\t\tif (!$user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t\t$changed = true;\n\t\t\t\t\t\t$api->Set('active', 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($changed) {\n\t\t\t\t\t\t$api->Save();\n\t\t\t\t\t}\n\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterCopySuccess');\n\t\t\t\t\tif (!$files_copied) {\n\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterFilesCopyFail');\n\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\n\t\t\tcase 'edit':\n\t\t\t\t$newsletter = $this->GetApi();\n\n\t\t\t\t$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;\n\t\t\t\t$newsletter->Load($id);\n\n\t\t\t\t$subaction = (isset($_GET['SubAction'])) ? strtolower(urldecode($_GET['SubAction'])) : '';\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'step2':\n\t\t\t\t\t\t$editnewsletter = array('id' => $id);\n\n\t\t\t\t\t\t$checkfields = array('Name', 'Format');\n\t\t\t\t\t\t$valid = true; $errors = array();\n\t\t\t\t\t\tforeach ($checkfields as $p => $field) {\n\t\t\t\t\t\t\tif (!isset($_POST[$field])) {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($_POST[$field] == '') {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$value = $_POST[$field];\n\t\t\t\t\t\t\t\t$editnewsletter[$field] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$valid) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->EditNewsletter($id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tIEM::sessionSet('Newsletters', $editnewsletter);\n\t\t\t\t\t\t$this->DisplayEditNewsletter($id);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'save':\n\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t$user = IEM::getCurrentUser();\n\t\t\t\t\t\t$session_newsletter = IEM::sessionGet('Newsletters');\n\n\t\t\t\t\t\t$text_unsubscribelink_found = true;\n\t\t\t\t\t\t$html_unsubscribelink_found = true;\n\n\t\t\t\t\t\tif (isset($_POST['TextContent'])) {\n\t\t\t\t\t\t\t$textcontent = $_POST['TextContent'];\n\t\t\t\t\t\t\t$newsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t$text_unsubscribelink_found = $this->CheckForUnsubscribeLink($textcontent, 'text');\n\t\t\t\t\t\t\t$session_newsletter['contents']['text'] = $textcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['myDevEditControl_html'])) {\n\t\t\t\t\t\t\t$htmlcontent = $_POST['myDevEditControl_html'];\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * This is an effort not to overwrite the eixsting HTML contents\n\t\t\t\t\t\t\t * if there isn't any contents in it (DevEdit will have '<html><body></body></html>' as a minimum\n\t\t\t\t\t\t\t * that will be passed to here)\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (trim($htmlcontent) == '') {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter');\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t\t$this->DisplayEditNewsletter($id);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$newsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t$html_unsubscribelink_found = $this->CheckForUnsubscribeLink($htmlcontent, 'html');\n\t\t\t\t\t\t\t$session_newsletter['contents']['html'] = $htmlcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['subject'])) {\n\t\t\t\t\t\t\t$newsletter->Set('subject', $_POST['subject']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach (array('Name', 'Format') as $p => $area) {\n\t\t\t\t\t\t\t$newsletter->Set(strtolower($area), $session_newsletter[$area]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter->Set('active', 0);\n\t\t\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\t\t\tif (isset($_POST['active'])) {\n\t\t\t\t\t\t\t\t$newsletter->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newsletter->Set('archive', 0);\n\n\t\t\t\t\t\tif (isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$newsletter->Set('archive', 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$dest = strtolower(get_class($this));\n\t\t\t\t\t\t$movefiles_result = $this->MoveFiles($dest, $id);\n\t\t\t\t\t\tif ($movefiles_result) {\n\t\t\t\t\t\t\tif (isset($textcontent)) {\n\t\t\t\t\t\t\t\t$textcontent = $this->ConvertContent($textcontent, $dest, $id);\n\t\t\t\t\t\t\t\t$newsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($htmlcontent)) {\n\t\t\t\t\t\t\t\t$htmlcontent = $this->ConvertContent($htmlcontent, $dest, $id);\n\t\t\t\t\t\t\t\t$newsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$result = $newsletter->Save();\n\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToUpdateNewsletter');\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter_info = $session_newsletter;\n\t\t\t\t\t\t$newsletter_info['embedimages'] = true;\n\t\t\t\t\t\t$newsletter_info['multipart'] = true;\n\n\t\t\t\t\t\tlist($newsletter_size, $newsletter_img_warnings) = $this->GetSize($newsletter_info);\n\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_EMBEDIMAGES) { $size_message = GetLang('Newsletter_Size_Approximate'); }\n\t\t\t\t\t\telse { $size_message = GetLang('Newsletter_Size_Approximate_Noimages'); }\n\t\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterUpdated', sprintf($size_message, $this->EasySize($newsletter_size)));\n\n\t\t\t\t\t\tif (SENDSTUDIO_EMAILSIZE_WARNING > 0) {\n\t\t\t\t\t\t\t$warning_size = SENDSTUDIO_EMAILSIZE_WARNING * 1024;\n\t\t\t\t\t\t\tif ($newsletter_size > $warning_size) {\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('Newsletter_Size_Over_EmailSize_Warning', $this->EasySize($warning_size));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Delete any attachments we're meant to first\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_ATTACHMENTS) {\n\t\t\t\t\t\t\tlist($del_attachments_status, $del_attachments_status_msg) = $this->CleanupAttachments($dest, $id);\n\n\t\t\t\t\t\t\tif ($del_attachments_status) {\n\t\t\t\t\t\t\t\tif ($del_attachments_status_msg) {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $del_attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $del_attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Only save the new attachments after deleting the old ones\n\t\t\t\t\t\t\tlist($attachments_status, $attachments_status_msg) = $this->SaveAttachments($dest, $id);\n\n\t\t\t\t\t\t\tif ($attachments_status) {\n\t\t\t\t\t\t\t\tif ($attachments_status_msg != '') {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$newsletter->Active() && isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($newsletter_img_warnings) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('UnableToLoadImage_Newsletter_List', $newsletter_img_warnings);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$html_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInHTMLContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$text_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInTextContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['Message'] = str_replace('<br><br>', '<br>', $GLOBALS['Message']);\n\n\t\t\t\t\t\t($subaction == 'save') ? $this->DisplayEditNewsletter($id) : $this->ManageNewsletters();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\tcase 'step1':\n\t\t\t\t\t\t$this->EditNewsletter($id);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'create':\n\t\t\t\t$subaction = (isset($_GET['SubAction'])) ? strtolower(urldecode($_GET['SubAction'])) : '';\n\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'step2':\n\t\t\t\t\t\t$newnewsletter = array();\n\t\t\t\t\t\t$checkfields = array('Name', 'Format');\n\t\t\t\t\t\t$valid = true; $errors = array();\n\t\t\t\t\t\tforeach ($checkfields as $p => $field) {\n\t\t\t\t\t\t\tif (!isset($_POST[$field]) || empty($_POST[$field])) {\n\t\t\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t\t\t\t$errors[] = GetLang('Newsletter'.$field.'IsNotValid');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$value = $_POST[$field];\n\t\t\t\t\t\t\t\t$newnewsletter[$field] = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$valid) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isset($_POST['TemplateID'])) {\n\t\t\t\t\t\t\t$newnewsletter['TemplateID'] = $_POST['TemplateID'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tIEM::sessionSet('Newsletters', $newnewsletter);\n\t\t\t\t\t\t$this->DisplayEditNewsletter();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'save':\n\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t$user = IEM::getCurrentUser();\n\t\t\t\t\t\t$session_newsletter = IEM::sessionGet('Newsletters');\n\n\t\t\t\t\t\t$newnewsletter = $this->GetApi();\n\n\t\t\t\t\t\t$text_unsubscribelink_found = true;\n\t\t\t\t\t\t$html_unsubscribelink_found = true;\n\n\t\t\t\t\t\tif (isset($_POST['TextContent'])) {\n\t\t\t\t\t\t\t$textcontent = $_POST['TextContent'];\n\t\t\t\t\t\t\t$newnewsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t$text_unsubscribelink_found = $this->CheckForUnsubscribeLink($textcontent, 'text');\n\t\t\t\t\t\t\t$session_newsletter['contents']['text'] = $textcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['myDevEditControl_html'])) {\n\t\t\t\t\t\t\t$htmlcontent = $_POST['myDevEditControl_html'];\n\t\t\t\t\t\t\t$newnewsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t$html_unsubscribelink_found = $this->CheckForUnsubscribeLink($htmlcontent, 'html');\n\t\t\t\t\t\t\t$session_newsletter['contents']['html'] = $htmlcontent;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($_POST['subject'])) {\n\t\t\t\t\t\t\t$newnewsletter->Set('subject', $_POST['subject']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach (array('Name', 'Format') as $p => $area) {\n\t\t\t\t\t\t\t$newnewsletter->Set(strtolower($area), $session_newsletter[$area]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->Set('active', 0);\n\t\t\t\t\t\tif ($user->HasAccess('newsletters', 'approve')) {\n\t\t\t\t\t\t\tif (isset($_POST['active'])) {\n\t\t\t\t\t\t\t\t$newnewsletter->Set('active', $user->Get('userid'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->Set('archive', 0);\n\t\t\t\t\t\tif (isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$newnewsletter->Set('archive', 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newnewsletter->ownerid = $user->userid;\n\t\t\t\t\t\t$result = $newnewsletter->Create();\n\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter');\n\t\t\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newsletter_info = $session_newsletter;\n\t\t\t\t\t\t$newsletter_info['embedimages'] = true;\n\t\t\t\t\t\t$newsletter_info['multipart'] = true;\n\n\t\t\t\t\t\tlist($newsletter_size, $newsletter_img_warnings) = $this->GetSize($newsletter_info);\n\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_EMBEDIMAGES) { $size_message = GetLang('Newsletter_Size_Approximate'); }\n\t\t\t\t\t\telse { $size_message = GetLang('Newsletter_Size_Approximate_Noimages'); }\n\t\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterUpdated', sprintf($size_message, $this->EasySize($newsletter_size)));\n\n\t\t\t\t\t\tif (SENDSTUDIO_EMAILSIZE_WARNING > 0) {\n\t\t\t\t\t\t\t$warning_size = SENDSTUDIO_EMAILSIZE_WARNING * 1024;\n\t\t\t\t\t\t\tif ($newsletter_size > $warning_size) {\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('Newsletter_Size_Over_EmailSize_Warning', $this->EasySize($warning_size));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$dest = strtolower(get_class($this));\n\n\t\t\t\t\t\t$movefiles_result = $this->MoveFiles($dest, $result);\n\n\t\t\t\t\t\tif ($movefiles_result) {\n\t\t\t\t\t\t\tif (isset($textcontent)) {\n\t\t\t\t\t\t\t\t$textcontent = $this->ConvertContent($textcontent, $dest, $result);\n\t\t\t\t\t\t\t\t$newnewsletter->SetBody('Text', $textcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($htmlcontent)) {\n\t\t\t\t\t\t\t\t$htmlcontent = $this->ConvertContent($htmlcontent, $dest, $result);\n\t\t\t\t\t\t\t\t$newnewsletter->SetBody('HTML', $htmlcontent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newnewsletter->Save();\n\t\t\t\t\t\tif (SENDSTUDIO_ALLOW_ATTACHMENTS) {\n\t\t\t\t\t\t\tlist($attachments_status, $attachments_status_msg) = $this->SaveAttachments($dest, $result);\n\t\t\t\t\t\t\tif ($attachments_status) {\n\t\t\t\t\t\t\t\tif ($attachments_status_msg != '') {\n\t\t\t\t\t\t\t\t\t$GLOBALS['Success'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('SuccessMsg', true, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$GLOBALS['Error'] = $attachments_status_msg;\n\t\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$newnewsletter->Active() && isset($_POST['archive'])) {\n\t\t\t\t\t\t\t$GLOBALS['Error'] = GetLang('NewsletterCannotBeInactiveAndArchive');\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($newsletter_img_warnings) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('UnableToLoadImage_Newsletter_List', $newsletter_img_warnings);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$html_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInHTMLContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$text_unsubscribelink_found) {\n\t\t\t\t\t\t\t$GLOBALS['Message'] .= $this->PrintWarning('NoUnsubscribeLinkInTextContent');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$GLOBALS['Message'] = str_replace('<br><br>', '<br>', $GLOBALS['Message']);\n\n\t\t\t\t\t\tif ($subaction == 'save') {\n\t\t\t\t\t\t\t$this->DisplayEditNewsletter($result);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->ManageNewsletters();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'addnewsletter':\n\t\t\t\t$newsletter = $this->GetApi();\n\t\t\t\t$user = IEM::getCurrentUser();\n\n\t\t\t\t$valid = true; $errors = array();\n\t\t\t\tif (!$valid) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter') . '<br/>- ' . implode('<br/>- ',$errors);\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$newsletter->ownerid = $user->userid;\n\n\t\t\t\t$create = $newsletter->Create();\n\t\t\t\tif (!$create) {\n\t\t\t\t\t$GLOBALS['Error'] = GetLang('UnableToCreateNewsletter');\n\t\t\t\t\t$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);\n\t\t\t\t\t$this->CreateNewsletter();\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('NewsletterCreated');\n\t\t\t\t\t$this->EditNewsletter($create);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$subaction = strtolower($_POST['ChangeType']);\n\t\t\t\t$newsletterlist = $_POST['newsletters'];\n\n\t\t\t\tswitch ($subaction) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Delete');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->DeleteNewsletters($newsletterlist);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'approve':\n\t\t\t\t\tcase 'disapprove':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Approve');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->ActionNewsletters($newsletterlist, $subaction);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'archive':\n\t\t\t\t\tcase 'unarchive':\n\t\t\t\t\t\t$access = $user->HasAccess('Newsletters', 'Archive');\n\t\t\t\t\t\tif ($access) {\n\t\t\t\t\t\t\t$this->ActionNewsletters($newsletterlist, $subaction);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->DenyAccess();\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->ManageNewsletters();\n\t\t\tbreak;\n\t\t}\n\n\t\tif (!in_array($action, $this->SuppressHeaderFooter)) {\n\t\t\t$this->PrintFooter($popup);\n\t\t}\n\t}", "public function actionNewsLetter() {\n if (Yii::$app->request->isAjax) {\n $exist = \\common\\models\\NewsLetter::find()->where(['email' => $_POST['email']])->one();\n if (empty($exist)) {\n $model = new \\common\\models\\NewsLetter();\n $model->email = $_POST['email'];\n $model->date = date('Y-m-d');\n if ($model->save()) {\n// $this->sendNewsLetterMail($model);\n echo 1;\n exit;\n } else {\n echo 0;\n exit;\n }\n } else {\n echo 2;\n exit;\n }\n }\n }", "public function handleDataSubmission() {}", "public function Handler() {\n\t\tif(isset($_POST['doAdd']) && empty($_POST['email'])) {\n\t\t $this->guestbookModel->Add(strip_tags($_POST['newEntry']));\n\t\t}\n\t\telseif(isset($_POST['doClear'])) {\n\t\t $this->guestbookModel->DeleteAll();\n\t\t}\n\t\telseif(isset($_POST['doCreate'])) {\n\t\t $this->guestbookModel->Init();\n\t\t} \n\t\t$this->RedirectTo($this->request->CreateUrl($this->request->controller));\n\t}", "function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}", "public function submit() {\n\tparent::submit();\n\tif( $this->notify() ) {\n\t echo '<div class=\"alert alert-success\">' . $this->message_form_send . '</div>';\n\t}\n }", "function simplenews_admin_newsletter_delete_submit($form, &$form_state) {\n $newsletter_id = $form_state['values']['newsletter_id'];\n $name = $form_state['values']['name'];\n\n // Delete newsletter.\n // Subscriptions are deleted by simplenews_simplenews_newsletter_delete()\n simplenews_newsletter_delete($newsletter_id);\n drupal_set_message(t('Newsletter %name has been deleted.', array('%name' => $name)));\n\n $form_state['redirect'] = 'admin/config/services/simplenews';\n}", "static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }", "function process_form_submission() {\n\t\t// Add a filter to replace tokens in the subject field with sanitized field values\n\t\tadd_filter( 'contact_form_subject', array( $this, 'replace_tokens_with_input' ), 10, 2 );\n\n\t\t$id = stripslashes( $_POST['contact-form-id'] );\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\tcheck_admin_referer( \"contact-form_{$id}\" );\n\t\t}\n\n\t\t$is_widget = 0 === strpos( $id, 'widget-' );\n\n\t\t$form = false;\n\n\t\tif ( $is_widget ) {\n\t\t\t// It's a form embedded in a text widget\n\n\t\t\t$this->current_widget_id = substr( $id, 7 ); // remove \"widget-\"\n\t\t\t$widget_type = implode( '-', array_slice( explode( '-', $this->current_widget_id ), 0, -1 ) ); // Remove trailing -#\n\n\t\t\t// Is the widget active?\n\t\t\t$sidebar = is_active_widget( false, $this->current_widget_id, $widget_type );\n\n\t\t\t// This is lame - no core API for getting a widget by ID\n\t\t\t$widget = isset( $GLOBALS['wp_registered_widgets'][$this->current_widget_id] ) ? $GLOBALS['wp_registered_widgets'][$this->current_widget_id] : false;\n\n\t\t\tif ( $sidebar && $widget && isset( $widget['callback'] ) ) {\n\t\t\t\t// This is lamer - no API for outputting a given widget by ID\n\t\t\t\tob_start();\n\t\t\t\t// Process the widget to populate Grunion_Contact_Form::$last\n\t\t\t\tcall_user_func( $widget['callback'], array(), $widget['params'][0] );\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t} else {\n\t\t\t// It's a form embedded in a post\n\n\t\t\t$post = get_post( $id );\n\n\t\t\t// Process the content to populate Grunion_Contact_Form::$last\n\t\t\tapply_filters( 'the_content', $post->post_content );\n\t\t}\n\n\t\t$form = Grunion_Contact_Form::$last;\n\n\t\tif ( ! $form )\n\t\t\treturn false;\n\n\t\tif ( is_wp_error( $form->errors ) && $form->errors->get_error_codes() )\n\t\t\treturn $form->errors;\n\n\t\t// Process the form\n\t\treturn $form->process_submission();\n\t}", "function simplenews_admin_newsletter_form($form, &$form_state, SimplenewsNewsletter $newsletter = NULL) {\n if (is_null($newsletter)) {\n $newsletter = entity_create('simplenews_newsletter', array());\n }\n\n $form_state['newsletter'] = $newsletter;\n // Check whether we need a deletion confirmation form.\n if (isset($form_state['confirm_delete']) && isset($form_state['values']['newsletter_id'])) {\n $newsletter = simplenews_newsletter_load($form_state['values']['newsletter_id']);\n return simplenews_admin_newsletter_delete($form, $form_state, $newsletter);\n }\n $form['newsletter_id'] = array(\n '#type' => 'value',\n '#value' => $newsletter->newsletter_id,\n );\n $form['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Name'),\n '#default_value' => $newsletter->name,\n '#maxlength' => 255,\n '#required' => TRUE,\n );\n $form['description'] = array(\n '#type' => 'textfield',\n '#title' => t('Description'),\n '#default_value' => $newsletter->description,\n );\n $form['weight'] = array(\n '#type' => 'hidden',\n '#value' => $newsletter->weight,\n );\n $form['subscription'] = array(\n '#type' => 'fieldset',\n '#title' => t('Subscription settings'),\n '#collapsible' => FALSE,\n );\n\n // Subscribe at account registration time.\n $options = simplenews_new_account_options();\n $form['subscription']['new_account'] = array(\n '#type' => 'select',\n '#title' => t('Subscribe new account'),\n '#options' => $options,\n '#default_value' => $newsletter->new_account,\n '#description' => t('None: This newsletter is not listed on the user registration page.<br />Default on: This newsletter is listed on the user registion page and is selected by default.<br />Default off: This newsletter is listed on the user registion page and is not selected by default.<br />Silent: A new user is automatically subscribed to this newsletter. The newsletter is not listed on the user registration page.'),\n );\n\n // Type of (un)subsribe confirmation\n $options = simplenews_opt_inout_options();\n $form['subscription']['opt_inout'] = array(\n '#type' => 'select',\n '#title' => t('Opt-in/out method'),\n '#options' => $options,\n '#default_value' => $newsletter->opt_inout,\n '#description' => t('Hidden: This newsletter does not appear on subscription forms. No unsubscription footer in newsletter.<br /> Single: Users are (un)subscribed immediately, no confirmation email is sent.<br />Double: When (un)subscribing at a subscription form, anonymous users receive an (un)subscription confirmation email. Authenticated users are (un)subscribed immediately.'),\n );\n\n // Provide subscription block for this newsletter.\n $form['subscription']['block'] = array(\n '#type' => 'checkbox',\n '#title' => t('Subscription block'),\n '#default_value' => $newsletter->block,\n '#description' => t('A subscription block will be provided for this newsletter. Anonymous and authenticated users can subscribe and unsubscribe using this block.'),\n );\n\n $form['email'] = array(\n '#type' => 'fieldset',\n '#title' => t('Email settings'),\n '#collapsible' => FALSE,\n );\n // Hide format selection if there is nothing to choose.\n // The default format is plain text.\n $format_options = simplenews_format_options();\n if (count($format_options) > 1) {\n $form['email']['format'] = array(\n '#type' => 'radios',\n '#title' => t('Email format'),\n '#default_value' => $newsletter->format,\n '#options' => $format_options,\n );\n }\n else {\n $form['email']['format'] = array(\n '#type' => 'hidden',\n '#value' => key($format_options),\n );\n $form['email']['format_text'] = array(\n '#markup' => t('Newsletter emails will be sent in %format format.', array('%format' => $newsletter->format)),\n );\n }\n // Type of hyperlinks.\n $form['email']['hyperlinks'] = array(\n '#type' => 'radios',\n '#title' => t('Hyperlink conversion'),\n '#description' => t('Determine how the conversion to text is performed.'),\n '#options' => array(t('Append hyperlinks as a numbered reference list'), t('Display hyperlinks inline with the text')),\n '#default_value' => $newsletter->hyperlinks,\n '#states' => array(\n 'visible' => array(\n ':input[name=\"format\"]' => array(\n 'value' => 'plain',\n ),\n ),\n ),\n );\n\n $form['email']['priority'] = array(\n '#type' => 'select',\n '#title' => t('Email priority'),\n '#default_value' => $newsletter->priority,\n '#options' => simplenews_get_priority(),\n );\n $form['email']['receipt'] = array(\n '#type' => 'checkbox',\n '#title' => t('Request receipt'),\n '#return_value' => 1,\n '#default_value' => $newsletter->receipt,\n );\n\n // Email sender name\n $form['simplenews_sender_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Sender information'),\n '#collapsible' => FALSE,\n );\n $form['simplenews_sender_information']['from_name'] = array(\n '#type' => 'textfield',\n '#title' => t('From name'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => $newsletter->from_name,\n );\n\n // Email subject\n $form['simplenews_subject'] = array(\n '#type' => 'fieldset',\n '#title' => t('Newsletter subject'),\n '#collapsible' => FALSE,\n );\n if (module_exists('token')) {\n $form['simplenews_subject']['token_help'] = array(\n '#title' => t('Replacement patterns'),\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n $form['simplenews_subject']['token_help']['browser'] = array(\n '#theme' => 'token_tree',\n '#token_types' => array('simplenews-newsletter', 'node', 'simplenews-subscriber'),\n );\n }\n\n $form['simplenews_subject']['email_subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Email subject'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => $newsletter->email_subject,\n );\n\n // Email from address\n $form['simplenews_sender_information']['from_address'] = array(\n '#type' => 'textfield',\n '#title' => t('From email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => $newsletter->from_address,\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 50,\n );\n\n if ($newsletter->newsletter_id) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 55,\n );\n }\n return $form;\n}", "public function postAction() {\n\t\t$this->sendMessage();\n\t}", "function handle($args)\n {\n parent::handle($args);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->trySave();\n } else {\n $this->showForm();\n }\n }", "public function actionIndex()\n {\n $this->requirePostRequest();\n\n $request = Craft::$app->getRequest();\n $settings = Newsletter2Go::$plugin->getSettings();\n\n $contact = new Contact();\n $contact->name = $request->getBodyParam(\"recipientName\");\n $contact->email = $request->getBodyParam(\"recipientEmail\");\n\n if($contact->validate()) {\n $response = Newsletter2Go::$plugin->apiService->subscribe($contact);\n\n if ($response->status == \"201\") {\n return $this->asJson([\"success\" => $settings->successFlashMessage]);\n } else {\n return $this->asJson([\"errors\" => $response]);\n }\n } else {\n return $this->asJson([\"errors\" => $contact->getErrors()]);\n }\n\n Craft::$app->session->setFlash(\"notice\", $settings->successFlashMessage);\n return $this->redirectToPostedUrl(\"/\");\n \n }", "function receive_form()\n{\n if (isset($_POST['cf-submitted'])) {\n global $wpdb;\n\n // sanitize form values\n $name = sanitize_text_field($_POST[\"cf-name\"]);\n $email = sanitize_email($_POST[\"cf-email\"]);\n $message = esc_textarea($_POST[\"cf-message\"]);\n Dao::insertMessage($wpdb->prefix . \"livre_dor\", new Livre_dor($message, $email, $name));\n }\n}", "function pdfbulletin_sendtest_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n \n $node = $form_state['values']['node'];\n $pdfbulletin = $node->pdfbulletin;\n $pdfbulletin->subscribers = $subscriptions;\n pdfbulletin_send_email($pdfbulletin, $node);\n\n drupal_set_message('Test message sent.');\n // @todo make this more redirect friendly\n drupal_goto('/pdfbulletin/' . $pdfbulletin->id . '/subscribers');\n}", "public function addNewsletter()\n\t{\n\t\t/**Cargamos los Helpers Necesarios */\n\t\thelper([\"url\", \"form\"]);\n\t\t/**Para las Validaciones del Formulario */\n\t\t$validation = \\Config\\Services::validation();\n\t\t/**Reglas para los Campos del Formulario */\n\t\t$validation->setRules([\n\t\t\t\"email\" => \"required|valid_email\"\n\t\t], [\n\t\t\t\"email\" => [\n\t\t\t\t\"required\" => \"Debe Ingresar un E-mail.\",\n\t\t\t\t\"valid_email\" => \" Debe Ingresar un E-mail Valido.\"\n\t\t\t],\n\t\t]);\n\n\n\t\tif (!$validation->withRequest($this->request)->run()) {\n\t\t\t$errors = $validation->getErrors();\n\t\t\tforeach ($errors as $error) {\n\t\t\t\techo $error;\n\t\t\t}\n\t\t} else {\n\t\t\t/**Cargamos El Modelo */\n\t\t\t$newsletterModel = new NewsletterModel();\n\t\t\t/**Comprobamos que el Email No exista en la db*/\n\t\t\t$existEmails = $newsletterModel->where(\"email\", $_POST['email'])->findAll();\n\t\t\t/**Comprobamos si tiene algo es decir que ya existe el email */\n\t\t\tif ($existEmails) {\n\t\t\t\techo \"El E-mail ya existe.\";\n\t\t\t} else {\n\t\t\t\t$id = $newsletterModel->insert($_POST);\n\t\t\t\techo \"Bienvenido al Newsletter.\";\n\t\t\t}\n\t\t}\n\t}", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "function Newsletter()\n{\n global $xoopsDB;\n include_once XOOPS_ROOT_PATH.\"/class/xoopsformloader.php\";\n xoops_cp_header();\n adminmenu(5);\n echo \"<br />\";\n\t$sform = new XoopsThemeForm(_AM_NEWS_NEWSLETTER, \"newsletterform\", XOOPS_URL.'/modules/news/admin/index.php', 'post');\n\t$dates_tray = new XoopsFormElementTray(_AM_NEWS_NEWSLETTER_BETWEEN);\n\t$date1 = new XoopsFormTextDateSelect('', 'date1',15,time());\n\t$date2 = new XoopsFormTextDateSelect(_AM_NEWS_EXPORT_AND, 'date2',15,time());\n\t$dates_tray->addElement($date1);\n\t$dates_tray->addElement($date2);\n\t$sform->addElement($dates_tray);\n\n\t$topiclist=new XoopsFormSelect(_AM_NEWS_PRUNE_TOPICS, 'export_topics','',5,true);\n\t$topics_arr=array();\n\t$xt = new NewsTopic();\n\t$allTopics = $xt->getAllTopics(false);\t\t\t\t// The webmaster can see everything\n\t$topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');\n\t$topics_arr = $topic_tree->getAllChild(0);\n\tif(count($topics_arr)) {\n\t\tforeach ($topics_arr as $onetopic) {\n\t\t\t$topiclist->addOption($onetopic->topic_id(),$onetopic->topic_title());\n\t\t}\n\t}\n\t$topiclist->setDescription(_AM_NEWS_EXPORT_PRUNE_DSC);\n\t$sform->addElement($topiclist,false);\n\t$sform->addElement(new XoopsFormHidden('op', 'launchnewsletter'), false);\n\t$sform->addElement(new XoopsFormRadioYN(_AM_NEWS_REMOVE_BR, 'removebr',1),false);\n\t$button_tray = new XoopsFormElementTray('' ,'');\n\t$submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');\n\t$button_tray->addElement($submit_btn);\n\t$sform->addElement($button_tray);\n\t$sform->display();\n}", "public function weeklyAction()\n {\n if (!$this->request->isPost()) {\n return false;\n }\n $email = $this->request->getPost('email');\n if (!$email) {\n $this->flashSession->error(t('Please input your Email'));\n return $this->indexRedirect();\n }\n $subscribe = new Subscribe();\n $subscribe->setStatus('Y');\n $subscribe->setEmail($email);\n\n if (!$subscribe->save()) {\n foreach ($subscribe->getMessages() as $message) {\n $this->flashSession->error($message);\n return $this->indexRedirect();\n }\n }\n $this->flashSession->success(t('Thank you for subscribing to our newsletter'));\n return $this->indexRedirect();\n }", "public function action_index()\n {\n\t\t$valid = TRUE;\n $post = $this->request->post();\n if (empty($post)) {\n exit;\n }\n if (isset($post['email_template'])) {\n //security issue. email_template should not contain characters like . / @\n if (preg_match('#[^a-z0-9\\_\\-]#i', $post['email_template'])) {\n $this->request->redirect('/');\n }\n }\n\n $formprocessor_model = new Model_Formprocessor();\n\n $ignore_captcha = (isset($post['trigger']) && $post['trigger'] == 'add_to_list' && Settings::instance()->get('newsletter_subscription_captcha') == 0);\n $ignore_captcha = (isset($post['ignore_captcha']) AND $post['ignore_captcha'] == 'true') ? true : $ignore_captcha; // This should be removed. It's exploitable\n\n if ( ! $ignore_captcha && ! $formprocessor_model->captcha_check($post))\n {\n $page = new Model_Pages();\n $this->request->redirect($page->get_page_by_id(Settings::instance()->get('captcha_fail_page')));\n }\n\n if (Model_Plugin::is_enabled_for_role('Administrator', 'contacts3')) {\n $this->create_contact($post);\n }\n //Actions\n switch ($post['trigger'])\n\t\t{\n case 'add_to_list':\n $validation = $formprocessor_model->add_to_list($post);\n $valid = $validation['valid'];\n $error = $validation['error'];\n break;\n case 'contact_us':\n $formprocessor_model->contact_us($post);\n break;\n case 'call_back_request':\n $formprocessor_model->request_callback($post);\n break;\n case 'booking':\n $formprocessor_model->booking($post);\n $data = ($_POST);\n Model_Bookings::save_booking($data);\n break;\n case 'booking2':\n $formprocessor_model->booking2($post);\n break;\n case 'enquiry':\n $formprocessor_model->enquiry($post);\n break;\n case 'get_a_quote':\n $formprocessor_model->get_a_quote($post);\n break;\n case 'consultation':\n $formprocessor_model->consultation($post);\n break;\n case 'enquiry_form':\n $formprocessor_model->enquiry_form($post);\n break;\n case 'custom_form':\n $valid = $formprocessor_model->custom_form($post);\n break;\n\t\t\tcase 'register_account':\n\t\t\t\t$validation = $formprocessor_model->register_account_form($post);\n\t\t\t\t$valid = $validation['valid'];\n\t\t\t\t$error = $validation['error'];\n\t\t\t\t$redirect = $validation['redirect'];\n\t\t\t\tbreak;\n case 'subscribe':\n $valid = $formprocessor_model->subscribe($post);\n break;\n case 'mailchimp_add':\n $valid = $formprocessor_model->mailchimp_add($post);\n break;\n case 'concert_form':\n $valid = $formprocessor_model->concert_form($post);\n break;\n case 'new_project_enquiry':\n $formprocessor_model->new_project_enquiry($post);\n break;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('unknown form processor trigger:' . $post['trigger']);\n }\n\n\t\t// Redirect after actions\n\t\tif ( ! $valid)\n\t\t{\n\t\t\tif (isset($error) AND $error != '')\n\t\t\t{\n\t\t\t\tIbHelpers::set_message($error, 'error');\n\t\t\t}\n if (isset($redirect)) {\n if (URL::is_internal($redirect)) {\n $this->request->redirect($redirect);\n } else {\n $this->request->redirect('/');\n }\n }\n\t\t\t$redirect = (isset($redirect) AND $redirect != '') ? $redirect : $this->request->referrer();\n\t\t\t$this->request->redirect($redirect);\n\t\t}\n elseif (isset($post['redirect']) AND ! empty($post['redirect']) AND $valid)\n\t\t{\n // for tracking add an activity record for successful email sent\n $activity = new Model_Activity();\n $activity\n ->set_item_type('user')\n ->set_action('email')\n ->set_item_id($post['trigger'])\n ->set_user_id(Request::$client_ip)\n ->save();\n if (URL::is_internal($post['redirect'])) {\n $this->request->redirect($post['redirect']);\n } else {\n $this->request->redirect('/');\n }\n }\n }", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "protected function _handle_forms()\n\t{\n\t\tif (!strlen($this->_form_posted)) return;\n\t\t$method = 'on_'.$this->_form_posted.'_submit';\n\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\tcall_user_func(array($this, $method), $this->_form_action);\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($this->controls as $k=>$v)\n\t\t{\n\t\t\t$ctl = $this->controls[$k];\n\n\t\t\tif (method_exists($ctl, $method))\n\t\t\t{\n\t\t\t\t$ctl->page = $this;\n\t\t\t\tcall_user_func(array($ctl, $method), $this->_form_action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (DEBUG) dwrite(\"Method '$method' not defined\");\n\t}", "public function actionNewsletterInline()\n\t{\n\t\t$model=new Newsletter('inline');\n\t\t\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='newsletter')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\n\t\telse if (isset($_POST['Newsletter']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Newsletter'];\n\t\t\t$model->date_enrolled = new CDbExpression('now()');\n\t\t\t\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('newsletter','Thank you for subscribing to our newsletter! Please add .... to your contacts to ensure you get our emails.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->render(\n\t\t\t'newsletter',\n\t\t\tarray (\n\t\t\t\t'model' => $model,\n\t\t\t)\n\t\t);\n\t}", "public function public_form_response_handler() {\n\n\t\t$nonce = $_POST['_wpnonce'];\n if (!wp_verify_nonce( $nonce, 'submit_coinqvest_checkout_8b%kj@')) {\n exit; // Get out of here, the nonce is rotten!\n }\n\n\t\t$this->checkout_form = new Checkout_Form($this->plugin_name_url);\n\t\t$this->checkout_form->process_checkout();\n\n\t}", "public function formHandler()\n {\n $_SESSION['title'] = \"Caiman: Dashboard\";\n $this->allowAccessTo(array(1, 3));\n\n $oldPassword = null;\n $newPasswordRepeat = null;\n $newPassword = null;\n\n if (isset($_GET['e'])) {\n $this->e = filter_input(INPUT_GET, 'e', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n // form update\n if ($this->e == \"updatePassword\") {\n $_SESSION['title'] = \"Caiman: Update password\";\n if (isset($_POST['oldPassword'])) {\n $oldPassword = filter_input(INPUT_POST, 'oldPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPassword'])) {\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPasswordRepeat'])) {\n $newPasswordRepeat = filter_input(INPUT_POST, 'newPasswordRepeat', FILTER_SANITIZE_STRING);\n }\n\n if (isset($oldPassword) && isset($newPassword) && isset($newPasswordRepeat)) {\n $_SESSION['user']->updatePassword($newPassword, $newPasswordRepeat, $oldPassword);\n }\n }\n\n // update if account if visible or not\n if ($this->e == \"updatePrivateAccount\") {\n\n if ($_SESSION['user']->idUser != -1) {\n $_SESSION['user']->updatePrivateAccount();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }\n }", "function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}", "function ManageNewsletters()\n\t{\n\t\t$user = &GetUser();\n\t\t$perpage = $this->GetPerPage();\n\n\t\t$DisplayPage = $this->GetCurrentPage();\n\t\t$start = 0;\n\t\tif ($perpage != 'all') {\n\t\t\t$start = ($DisplayPage - 1) * $perpage;\n\t\t}\n\n\t\t$sortinfo = $this->GetSortDetails();\n\n\t\t$newsletterapi = $this->GetApi();\n\n\t\t$newsletterowner = ($user->Admin() || $user->AdminType() == 'n') ? 0 : $user->userid;\n\t\t$NumberOfNewsletters = $newsletterapi->GetNewsletters($newsletterowner, $sortinfo, true);\n\t\t$mynewsletters = $newsletterapi->GetNewsletters($newsletterowner, $sortinfo, false, $start, $perpage, true);\n\n\t\tif ($user->HasAccess('Newsletters', 'Create')) {\n\t\t\t$GLOBALS['Newsletters_AddButton'] = $this->ParseTemplate('Newsletter_Create_Button', true, false);\n\t\t\t$GLOBALS['Newsletters_Heading'] = GetLang('Help_NewslettersManage_HasAccess');\n\t\t}\n\n\t\tif (!isset($GLOBALS['Message'])) {\n\t\t\t$GLOBALS['Message'] = '';\n\t\t}\n\n\t\t/**\n\t\t * Trigger event\n\t\t */\n\t\t\t$tempEventData = new EventData_IEM_NEWSLETTERS_MANAGENEWSLETTERS();\n\t\t\t$tempEventData->displaymessage = &$GLOBALS['Message'];\n\t\t\t$tempEventData->trigger();\n\n\t\t\tunset($tempEventData);\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\tif ($NumberOfNewsletters == 0) {\n\t\t\tif ($user->HasAccess('Newsletters', 'Create')) {\n\t\t\t\t$GLOBALS['Message'] .= $this->PrintSuccess('NoNewsletters', GetLang('NoNewsletters_HasAccess'));\n\t\t\t} else {\n\t\t\t\t$GLOBALS['Message'] .= $this->PrintSuccess('NoNewsletters', '');\n\t\t\t}\n\t\t\t$this->ParseTemplate('Newsletters_Manage_Empty');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->SetupPaging($NumberOfNewsletters, $DisplayPage, $perpage);\n\t\t$GLOBALS['FormAction'] = 'Action=ProcessPaging';\n\t\t$paging = $this->ParseTemplate('Paging', true, false);\n\n\t\tif ($user->HasAccess('Newsletters', 'Delete')) {\n\t\t\t$GLOBALS['Option_DeleteNewsletter'] = '<option value=\"Delete\">' . GetLang('Delete') . '</option>';\n\t\t}\n\n\t\tif ($user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t$GLOBALS['Option_ActivateNewsletter'] = '<option value=\"Approve\">' . GetLang('ApproveNewsletters') . '</option>';\n\t\t\t$GLOBALS['Option_ActivateNewsletter'] .= '<option value=\"Disapprove\">' . GetLang('DisapproveNewsletters') . '</option>';\n\t\t\t$GLOBALS['Option_ArchiveNewsletter'] = '<option value=\"Archive\">' . GetLang('ArchiveNewsletters') . '</option>';\n\t\t\t$GLOBALS['Option_ArchiveNewsletter'] .= '<option value=\"Unarchive\">' . GetLang('UnarchiveNewsletters') . '</option>';\n\t\t}\n\n\t\t$newsletter_manage = $this->ParseTemplate('Newsletters_Manage', true, false);\n\n\t\t$newsletterdisplay = '';\n\n\t\t$jobapi = $this->GetApi('Jobs');\n\n\t\tforeach ($mynewsletters as $pos => $newsletterdetails) {\n\t\t\t$newsletterid = $newsletterdetails['newsletterid'];\n\t\t\t$GLOBALS['Name'] = htmlspecialchars($newsletterdetails['name'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t$GLOBALS['Short_Name'] = htmlspecialchars($this->TruncateName($newsletterdetails['name'], 34), ENT_QUOTES, SENDSTUDIO_CHARSET);\n\n\t\t\t$GLOBALS['Created'] = $this->PrintDate($newsletterdetails['createdate']);\n\t\t\t$GLOBALS['Format'] = GetLang('Format_' . $newsletterapi->GetFormat($newsletterdetails['format']));\n\t\t\t$GLOBALS['Owner'] = $newsletterdetails['owner'];\n\n\t\t\t$GLOBALS['Subject'] = htmlspecialchars($newsletterdetails['subject'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t$GLOBALS['Short_Subject'] = htmlspecialchars($this->TruncateName($newsletterdetails['subject'], 37), ENT_QUOTES, SENDSTUDIO_CHARSET);\n\n\t\t\t$GLOBALS['id'] = $newsletterid;\n\n\t\t\t$GLOBALS['NewsletterIcon'] = '<img src=\"images/m_newsletters.gif\">';\n\n\t\t\t$GLOBALS['NewsletterAction'] = '<a href=\"index.php?Page=Newsletters&Action=View&id=' . $newsletterid . '\" target=\"_blank\">' . GetLang('View') . '</a>';\n\n\t\t\t$send_inprogress = false;\n\t\t\t$send_fully_completed = true;\n\n\t\t\t$job = false;\n\t\t\tif ($newsletterdetails['jobid'] > 0) {\n\t\t\t\t$job = $jobapi->LoadJob($newsletterdetails['jobid']);\n\t\t\t}\n\n\t\t\t$GLOBALS['LastSentTip'] = $GLOBALS['LastSentTip_Extra'] = $GLOBALS['Job'] = '';\n\n\t\t\tif ($newsletterdetails['starttime'] > 0) {\n\t\t\t\t$GLOBALS['LastSent'] = $this->PrintDate($newsletterdetails['starttime']);\n\n\t\t\t\t$GLOBALS['TipName'] = $this->GetRandomId();\n\n\t\t\t\tif ($newsletterdetails['finishtime'] > 0) {\n\t\t\t\t\t$GLOBALS['LastSentTip'] = sprintf(GetLang('AlreadySentTo'), $this->FormatNumber($newsletterdetails['total_recipients']), $this->FormatNumber($newsletterdetails['sendsize']));\n\t\t\t\t\tif ($newsletterdetails['total_recipients'] < $newsletterdetails['sendsize'] && $job) {\n\t\t\t\t\t\t$send_fully_completed = false;\n\t\t\t\t\t\t$GLOBALS['ResendTipName'] = $this->GetRandomId();\n\t\t\t\t\t\t$GLOBALS['Job'] = $job['jobid'];\n\t\t\t\t\t\tif ($job['resendcount'] < SENDSTUDIO_RESEND_MAXIMUM) {\n\t\t\t\t\t\t\t$GLOBALS['NewsletterIcon'] = $this->ParseTemplate('Newsletters_Send_Resend_Tip', true, false);\n\t\t\t\t\t\t\t$GLOBALS['LastSentTip_Extra'] = GetLang('AlreadySentTo_Partial');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['LastSentTip'] = sprintf(GetLang('AlreadySentTo_SoFar'), $this->FormatNumber($newsletterdetails['total_recipients']), $this->FormatNumber($newsletterdetails['sendsize']));\n\t\t\t\t}\n\n\t\t\t\t$already_sent_tip = $this->ParseTemplate('Newsletters_Send_Tip', true, false);\n\n\t\t\t\t$GLOBALS['LastSent'] = $already_sent_tip;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['LastSent'] = GetLang('NotSent');\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Send')) {\n\t\t\t\tif ($newsletterdetails['active']) {\n\t\t\t\t\tif (!$job || empty($job)) {\n\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Send&id=' . $newsletterid . '\">' . GetLang('Send') . '</a>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$jobstate = $jobapi->GetJobStatus($job['jobstatus']);\n\t\t\t\t\t\tswitch ($job['jobstatus']) {\n\t\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\t\t$send_inprogress = true;\n\t\t\t\t\t\t\t\tif (SENDSTUDIO_CRON_ENABLED && SENDSTUDIO_CRON_SEND > 0) {\n\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Schedule\">' . $jobstate . '</a>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Send&Action=PauseSend&Job=' . $job['jobid'] . '\">' . $jobstate . '</a>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'p':\n\t\t\t\t\t\t\t\tif (SENDSTUDIO_CRON_ENABLED && SENDSTUDIO_CRON_SEND > 0) {\n\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Schedule\">' . $jobstate . '</a>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Send&Action=ResumeSend&Job=' . $job['jobid'] . '\">' . $jobstate . '</a>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'w':\n\t\t\t\t\t\t\t\t// this is only applicable for scheduled newsletters (waiting to send).\n\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Schedule\">' . GetLang('Waiting') . '</a>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif ($send_fully_completed) {\n\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Send&id=' . $newsletterid . '\">' . GetLang('Send') . '</a>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ($job['resendcount'] < SENDSTUDIO_RESEND_MAXIMUM) {\n\t\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Send&Action=Resend&Job=' . $job['jobid']. '\">' . GetLang('Resend') . '</a>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Resend', 'Newsletter_Send_Disabled_Resend_Maximum');\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}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Send', 'Newsletter_Send_Disabled_Inactive');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Send');\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Edit')) {\n\t\t\t\tif (!$send_inprogress) {\n\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Newsletters&Action=Edit&id=' . $newsletterid . '\">' . GetLang('Edit') . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Edit', 'Newsletter_Edit_Disabled_SendInProgress');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Edit');\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Create')) {\n\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"index.php?Page=Newsletters&Action=Copy&id=' . $newsletterid . '\">' . GetLang('Copy') . '</a>';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Copy');\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Delete')) {\n\t\t\t\tif (!$send_inprogress) {\n\t\t\t\t\t$GLOBALS['NewsletterAction'] .= '&nbsp;&nbsp;<a href=\"javascript: ConfirmDelete(' . $newsletterid . ');\">' . GetLang('Delete') . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Delete', 'Newsletter_Delete_Disabled_SendInProgress');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$GLOBALS['NewsletterAction'] .= $this->DisabledItem('Delete');\n\t\t\t}\n\n\t\t\tif ($newsletterdetails['active'] > 0) {\n\t\t\t\t$statusaction = 'deactivate';\n\t\t\t\t$activeicon = 'tick';\n\t\t\t\tif ($user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t$activetitle = GetLang('Newsletter_Title_Disable');\n\t\t\t\t} else {\n\t\t\t\t\t$activetitle = GetLang('NoAccess');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$statusaction = 'activate';\n\t\t\t\t$activeicon = 'cross';\n\t\t\t\tif ($user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t\t$activetitle = GetLang('Newsletter_Title_Enable');\n\t\t\t\t} else {\n\t\t\t\t\t$activetitle = GetLang('NoAccess');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\tif (!$send_inprogress) {\n\t\t\t\t\t$GLOBALS['ActiveAction'] = '<a href=\"index.php?Page=Newsletters&Action=' . $statusaction . '&id=' . $newsletterid . '\" title=\"' . $activetitle . '\"><img src=\"images/' . $activeicon . '.gif\" border=\"0\"></a>';\n\t\t\t\t} else {\n\t\t\t\t\t$activetitle = GetLang('Newsletter_ChangeActive_Disabled_SendInProgress');\n\t\t\t\t\t$GLOBALS['ActiveAction'] = '<span title=\"' . $activetitle . '\"><img src=\"images/' . $activeicon . '.gif\" border=\"0\"></span>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ActiveAction'] = '<span title=\"' . $activetitle . '\"><img src=\"images/' . $activeicon . '.gif\" border=\"0\"></span>';\n\t\t\t}\n\n\t\t\tif ($newsletterdetails['archive'] > 0) {\n\t\t\t\t$statusaction = 'deactivatearchive';\n\t\t\t\t$activeicon = 'tick';\n\t\t\t\t$activetitle = GetLang('Newsletter_Title_Archive_Disable');\n\t\t\t} else {\n\t\t\t\t$statusaction = 'activatearchive';\n\t\t\t\t$activeicon = 'cross';\n\t\t\t\t$activetitle = GetLang('Newsletter_Title_Archive_Enable');\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Newsletters', 'Approve')) {\n\t\t\t\t$GLOBALS['ArchiveAction'] = '<a href=\"index.php?Page=Newsletters&Action=' . $statusaction . '&id=' . $newsletterid . '\" title=\"' . $activetitle . '\"><img src=\"images/' . $activeicon . '.gif\" border=\"0\"></a>';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ArchiveAction'] = '<span title=\"' . $activetitle . '\"><img src=\"images/' . $activeicon . '.gif\" border=\"0\"></span>';\n\t\t\t}\n\n\t\t\t$newsletterdisplay .= $this->ParseTemplate('Newsletters_Manage_Row', true, false);\n\t\t}\n\t\t$newsletter_manage = str_replace('%%TPL_Newsletters_Manage_Row%%', $newsletterdisplay, $newsletter_manage);\n\t\t$newsletter_manage = str_replace('%%TPL_Paging%%', $paging, $newsletter_manage);\n\t\t$newsletter_manage = str_replace('%%TPL_Paging_Bottom%%', $GLOBALS['PagingBottom'], $newsletter_manage);\n\n\t\techo $newsletter_manage;\n\t}", "function CreateNewsletter()\n\t{\n\t\t$newsletterapi = $this->GetApi();\n\n\t\t$GLOBALS['Action'] = 'Create&SubAction=Step2';\n\t\t$GLOBALS['CancelButton'] = GetLang('CreateNewsletterCancelButton');\n\t\t$GLOBALS['Heading'] = GetLang('CreateNewsletter');\n\t\t$GLOBALS['Intro'] = GetLang('CreateNewsletterIntro');\n\t\t$GLOBALS['NewsletterDetails'] = GetLang('CreateNewsletterHeading');\n\n\t\t$GLOBALS['FormatList'] = '';\n\t\t$allformats = $newsletterapi->GetAllFormats();\n\t\tforeach ($allformats as $id => $name) {\n\t\t\tif ($name == 'TextAndHTML') {\n\t\t\t\t$recommended = ' ' . GetLang('Recommended');\n\t\t\t} else {\n\t\t\t\t$recommended = '';\n\t\t\t}\n\t\t\t$GLOBALS['FormatList'] .= '<option value=\"' . $id . '\">' . GetLang('Format_' . $name) . $recommended .'</option>';\n\t\t}\n\n\t\t$templateselects = $this->GetTemplateList();\n\t\t$GLOBALS['TemplateList'] = $templateselects;\n\n\t\t$this->ParseTemplate('Newsletter_Form_Step1');\n\t}", "public function postSubscribe(){\n\n $data = Array();\n\n $ajax = \\Data::post('ajax');\n\n $data['email'] = trim(\\Data::post('email'));\n\n if(stripos($data['email'],'@') !== false){\n \n $data['ip_address'] = \\Request::ip();\n $data['created_on'] = Array('raw' => 'NOW()');\n $data['token'] = \\Crypt::hash(time() . $data['email']);\n\n $record = new \\EmailNewsletter\\record\\Email($data);\n\n try {\n\n $record->insert();\n\n $message = 'Thanks for subscribing!';\n\n if($ajax){\n $this->json(Array('success' => $message));\n }//if\n\n \\Session::setFlash('email-newsletter-subscribe-success',$message);\n\n } catch(\\Exception $e){\n\n \\Enact::logError($e->getMessage());\n\n $message = 'We were unable to subscribe you to our email list, please try again later.';\n\n if($ajax){\n $this->json(Array('error' => $message));\n }//if\n\n \\Session::setFlash('email-newsletter-subscribe-error',$message);\n\n }//catch\n\n } else {\n\n $message = 'Please enter a valid email address and try again';\n\n if($ajax){\n $this->json(Array('error' => $message));\n }//if\n\n \\Session::setFlash('email-newsletter-subscribe-error',$message);\n\n }//el\n\n $this->redirect(\\Data::post('submit-uri'));\n\n }", "public function Subscribe()\n\t\t{\n\t\t\tif(!isset($_POST['check'])) {\n\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('Oops');\n\t\t\t\t$GLOBALS['Class'] = \"ErrorMessage\";\n\t\t\t\t$GLOBALS['SubscriptionMessage'] = GetLang('NewsletterSpammerVerification');\n\t\t\t}\n\t\t\telse if(isset($_POST['nl_first_name']) && isset($_POST['nl_email'])) {\n\n\t\t\t\t$first_name = $_POST['nl_first_name'];\n\t\t\t\t$email = $_POST['nl_email'];\n\n\t\t\t\t$subscriberFlag = 0; // this variable is used for checking email marketer is checked or not.\n\t\t\t\t// Is Interspire Email Marketer integrated or should we just use the built-in list?\n\t\t\t\tif(GetConfig('MailXMLAPIValid') && GetConfig('UseMailerForNewsletter') && GetConfig('MailNewsletterList') > 0) {\n\t\t\t\t\t// Add them to the Interspire Email Marketer list\n\t\t\t\t\t$GLOBALS['ISC_CLASS_ADMIN_SENDSTUDIO'] = GetClass('ISC_ADMIN_SENDSTUDIO');\n\t\t\t\t\t$result = $GLOBALS['ISC_CLASS_ADMIN_SENDSTUDIO']->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$subscriberFlag = 1;\n\t\t\t\t\t// commented this line as need to insert it into subscriober table everytime.\n\t\t\t\t\t// $result = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t\tThis below condition is added to check if email marketer is not integrated, then need to pass the values back in \n\t\t\t\t\tvariable $result . Always need to insert it into subscriber table. - starts.\n\t\t\t\t*/\n\t\t\t\tif($subscriberFlag == 1) // if email marketer is not integrated\n\t\t\t\t{\n\t\t\t\t\t$result = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result_new = $this->AddSubscriberToNewsletter($first_name, $email);\n\t\t\t\t}\n\t\t\t\t/* -- ends -- */\n\n\t\t\t\tif($result['status'] == \"success\") {\n\t\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('NewsletterThanksForSubscribing');\n\t\t\t\t\t$GLOBALS['Class'] = \"\";\n\t\t\t\t\t$GLOBALS['SubscriptionMessage'] = $result['message'] . sprintf(\" <a href='%s'>%s.</a>\", $GLOBALS['ShopPath'], GetLang('Continue'));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$GLOBALS['SubscriptionHeading'] = GetLang('Oops');\n\t\t\t\t\t$GLOBALS['Class'] = \"ErrorMessage\";\n\t\t\t\t\t$GLOBALS['SubscriptionMessage'] = $result['message'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle(sprintf(\"%s - %s\", GetConfig('StoreName'), GetLang('NewsletterSubscription')));\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"newsletter_subscribe\");\n\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t}", "function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }", "public function form_submission() {\n\n\t\t// Check to see if this is a new post or has already been created.\n\t\tif ( isset( $_POST['object_id'] ) && ( get_post_type( $_POST['object_id'] ) !== 'tm-events-entries' ) && ( $_POST['object_id'] < 0 ) ) {\n\t\t\tremove_query_arg( 'entry' );\n\t\t\twp_redirect( home_url( $path = 'nominate/entry' ) );\n\t\t}\n\n\t\t// If no form submission, bail.\n\t\tif ( empty( $_POST ) || ! isset( $_POST['submit-cmb'], $_POST['object_id'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if hidden form is present.\n\t\t// If it is then this has been submitted by a bot.\n\t\tif ( empty( $_POST ) || isset( $_POST['_nsa_entries_2016_hidden_check'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get CMB2 metabox object.\n\t\t$cmb = $this->get_current_form( $this->meta_prefix, 'fake-object-id' );\n\t\t$post_data = array();\n\n\t\t// Check security nonce.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check hidden box is NOT ticked.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check Post ID is valid.\n\t\t/*if ( (! is_int( $_POST['object_id'] ) ) || ( ! $_POST['object_id'] >= 0 ) || floor( $_POST['object_id'] ) !== $_POST['object_id'] ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'post_data_missing', __( 'Cannot submit your entry. Please try again' ) ) );\n\t\t}*/\n\n\t\t/**\n\t\t * Fetch sanitized values\n\t\t */\n\t\t$sanitized_values = $cmb->get_sanitized_values( $_POST );\n\n\t\t// Set our post data arguments.\n\t\t// If we are updating a post supply the id from our hidden field.\n\t\t$post_data['ID'] = absint( $_POST['object_id'] );\n\n\t\t$post_data['post_title'] = $sanitized_values['submitted_post_title'];\n\t\tunset( $sanitized_values['submitted_post_title'] );\n\t\t$post_data['post_content'] = '';\n\n\t\t// Set the post type we want to submit.\n\t\t$post_data['post_type'] = 'tm-events-entries';\n\t\t// Set the status of of post.\n\t\t$post_data['post_status'] = 'publish';\n\n\t\t// Create the new post.\n\t\t$new_submission_id = wp_insert_post( $post_data, true );\n\n\t\t// If we hit a snag, update the user.\n\t\tif ( is_wp_error( $new_submission_id ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', $new_submission_id );\n\t\t} else {\n\n\t\t\t// Loop through remaining (sanitized) data, and save to post-meta.\n\t\t\tforeach ( $sanitized_values as $key => $value ) {\n\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t$value = array_filter( $value );\n\t\t\t\t\tif ( ! empty( $value ) ) {\n\t\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove any previous entry query arguments.\n\t\t\tremove_query_arg( 'entry' );\n\n\t\t\t// Send confirmation email out.\n\t\t\t$confirm_email = $this->send_confirmation( $post_data['post_title'], $sanitized_values );\n\n\t\t\t/**\n\t\t\t * Redirect back to the form page with a query variable with the new post ID.\n\t\t\t * This will help double-submissions with browser refreshes\n\t\t\t */\n\t\t\twp_redirect(\n\t\t\t\tesc_url_raw(\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'entry' => $new_submission_id,\n\t\t\t\t\t\t),\n\t\t\t\t\t\thome_url( '/nominate/confirm/' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\texit;\n\t\t}\n\n\t}", "function og_simplenews_manager_add_newsletter($form, &$form_state) {\n $name = $form_state['values']['newsletters']['new'];\n if (!empty($name)) {\n og_simplenews_new_group_newsletter($form_state['node'], $name);\n }\n}", "public function postsAction() {\n\n $params = $this->_request->getParams();\n $this->view->ajax_post = isset($params['ajax_post']) ? TRUE : FALSE;\n\n //Добавим путь к действию\n $this->_breadcrumbs->addStep($this->Translate('Список сообщений в блогах'));\n }", "public function handleSubmission(\\WP_REST_Request $req) {\n $params = $req->get_json_params();\n\n if (!$this->validateRecaptcha($params['recaptchaRes'])) {\n return new \\WP_Error('recaptcha_invalid', 'Recaptcha Invalid', 409);\n }\n\n if (!empty($params) && array_key_exists('formValues', $params)) {\n wp_mail($this->recipient, 'New Form Submission', $this->emailTemplate($params['formValues']));\n return new \\WP_REST_Response('Form Submitted');\n }\n \n return new \\WP_Error('validation_error', 'No foram values sent.', 400);\n }", "public function submissions();", "function process_form()\n {\n }", "public function processChangeNewsletterVal()\n {\n }", "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}", "public static abstract function postSubmit(Form $form);", "function og_simplenews_manager_save_emails($form, &$form_state) {\n foreach ($form_state['values']['newsletters'] as $tid => $values) {\n if ($tid && is_numeric($tid)) {\n og_simplenews_save_subscriptions($tid, $values['emails']);\n }\n }\n}", "public function Handler(){\n\t\tif (isset($_POST['add'])){\n\t\t\t$this->guestbookModel->Add(strip_tags($_POST['comment']));\n\t\t} elseif(isset($_POST['clear'])){\n\t\t\t$this->guestbookModel->DeleteAll();\n\t\t} elseif(isset($_SESSION['create'])){\n\t\t\t$this->guestbookModel->Init();\n\t\t}\n\t\t$this->RedirectTo($this->request->CreateUrl($this->request->controller));\n\t}", "function pdfbulletin_subscribers_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n pdfbulletin_subscribers_save($form_state['values']['pdfbulletin']->nid, $subscriptions);\n drupal_set_message(t('Subscriptions saved'));\n}", "function subscription_show() {\n\n\tif ( isset($_POST['submit_products']) ) {\n\t\t$email = $_REQUEST['email'];\n\t\t\n\t\t$theMsg = '\n\t\t\tEmail Address: '.$email.'<br><br>\n\t\t';\n\n\t\t$mail_to = \"[email protected]\";\n\t\t$mail_subject = \"Subscription Entry\";\n\t\t$mail_body = \"<html><body>\".stripslashes($theMsg).\"</body></html>\";\n\t\t$mail_header = \"From: Subscription Entry <[email protected]>\\n\" . \"MIME-Version: 1.0\\n\" . \"Content-type: text/html; charset=iso-8859-1\";\n\n\t\tif ( mail($mail_to, $mail_subject, $mail_body, $mail_header) ) {\n\t\t\techo '<script type=\"text/javascript\"> \n\t\t\talert(\"Your subscription has been sent.\"); \n\t\t\twindow.location.href=\"/home/\"; \n\t\t\t</script>';\n\t\t} \n\t\telse {\n\t\t\techo '<script type=\"text/javascript\"> \n\t\t\talert(\"Subscription not sent.\"); \n\t\t\twindow.location.href=\"/subscribe/\"; \n\t\t\t</script>';\n\t\t} \n\t}\n\t\n\t$output = ' \n\t\t<script type=\"text/javascript\">\n\t\t\tfunction subCheck(formobj) { \n\t\t\t\tvar email = $(\"#email\").val(),\n\t\t\t\t\tmsg = \"\",\n\t\t\t\t\tpos = email.indexOf(\"@\",0); \n\t\t\t\tif (pos == -1) { \n\t\t\t\t\tmsg += \"Please enter a valid email address \\n\\n\"; \n\t\t\t\t} \n\t\t\t\telse { \n\t\t\t\t\tvar pos2 = email.indexOf(\"@\", pos + 1), \n\t\t\t\t\t\tpos3 = email.indexOf(\".\", pos + 1), \n\t\t\t\t\t\tdiff = pos3 - pos;\n\n\t\t\t\t\tif (pos2 != -1 || diff <= 3) { \n\t\t\t\t\t\tmsg += \"Please enter a valid email address.\\n\\n\"; \n\t\t\t\t\t} \n\t\t\t\t} \n\n\t\t\t\tif (msg == \"\") { \n\t\t\t\t\treturn true; \n\t\t\t\t} \n\t\t\t\telse { \n\t\t\t\t\talert(msg); \n\t\t\t\t\treturn false; \n\t\t\t\t} \n\t\t\t}\n\t\t</script>\n\n\t\t<form action=\"\" name=\"contactform\" method=\"post\" onsubmit=\"return subCheck(this);\">\n\t\t\t<div class=\"contactSpace\">\n\t\t\t\t<input type=\"text\" name=\"email\" id=\"email\" placeholder=\"Enter your Email Address\" />\n\t\t\t</div>\n\t\t\t<div class=\"contactSpace\">\n\t\t\t\t<input type=\"submit\" value=\"Subscribe\" name=\"submit_subscribe\" class=\"submit_contact\" />\n\t\t\t</div>\n\t\t</form>\n\t';\n\t\n\treturn $output;\n\n}", "public function callback() {\n $params = array();\n parse_str( $_POST['form_data'], $params );\n\n if ( !wp_verify_nonce( $params['nonce'], 'sk-operation-messages' ) ) {\n die( 'Hey hey, stop messing around!!!' );\n }\n\n if ( isset( $params['om_message_id'] ) ) {\n\n if ( $this->update_message( $params['om_message_id'], $params ) ) {\n\n wp_send_json_success(\n 'Updated!!'\n );\n\n }\n\n }\n\n // Check OK. Save the message.\n if ( $this->save_message( $params ) ) {\n\n wp_send_json_success(\n 'Created!'\n );\n\n }\n\n wp_send_json_error( 'Failed!' );\n\n }", "function rps_myajax_submit() {\n\t$response = array('spam' => 'no', 'mail_sent' => 'no');\n\n\t$id = (is_integer($_POST['id'])) ? $_POST['id'] : '';\n\t$name = sanitize_text_field($_POST['form']['name']);\n\t$email = sanitize_email($_POST['form']['email']);\n\t$message = sanitize_text_field($_POST['form']['message']);\n\n\t$akismet = new Akismet(URL, AKISMET_KEY);\n\t$akismet->setCommentAuthor($name);\n\t$akismet->setCommentAuthorEmail($email);\n\t$akismet->setCommentContent($message);\n\t$akismet->setPermalink($id);\n\n\tif ($akismet->isCommentSpam()) {\n\t\t$response['spam'] = 'yes';\n\t} else {\n\t\t$to = get_bloginfo('admin_email');\n\t\t$subject = __('New message from your website');\n\t\t$the_message = sprintf('<p>%s <a href=\"mailto:%s\">%s</a> %s %s</p><p>%s</p>', __('Message from'), $email, $email, __('on'), date('jS F Y \\@ H:i'), $message);\n\t\t$mail_sent = wp_mail($to, $subject, $the_message);\n\t\t$response['mail_sent'] = ($mail_sent) ? 'yes' : 'no';\n\t}\n $response = json_encode($response);\n header(\"Content-Type: application/json\");\n echo $response;\n die;\n}", "public function returnForm() {\r\n global $db;\r\n\r\n $this->status = PRESUBMITTED;\r\n\r\n $deanComments =\"\"; // we save the dean's comments before deleting the approval\r\n\r\n // delete all approvals from database.\r\n foreach($this->approvals AS $approval) {\r\n if($approval->type == COMMITMENTS || $approval->type == DEAN_REVIEW) {\r\n $deanComments = $approval->comments;\r\n }\r\n $approval->delete();\r\n }\r\n\r\n if(strlen($deanComments) > 0) {\r\n $sql = \"UPDATE forms_tracking SET `dean_comments`= '\" . $deanComments . \"' WHERE `form_tracking_id` = \" . $this->trackingFormId;\r\n $db->Execute($sql);\r\n }\r\n\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form returned for modifications', $this->trackingFormId);\r\n $emailBody = sprintf('A tracking form was returned for modifications from your Dean :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nComments : %s\r\n\r\nPlease make any required modifications and re-submit the form.\r\n\r\n', $this->trackingFormId, $this->projectTitle, html_entity_decode(strip_tags($deanComments)));\r\n\r\n $ResearcherNotification = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $ResearcherNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Researcher : '. $e);\r\n }\r\n\r\n $this->saveMe();\r\n }", "function handlePost()\n {\n // CSRF protection\n $token = $this->trimmed('token');\n if (!$token || $token != common_session_token()) {\n // TRANS: Client error displayed when the session token does not match or is not given.\n $this->showForm(_m('There was a problem with your session token. '.\n 'Try again, please.'));\n return;\n }\n\n if ($this->oprofile) {\n if ($this->arg('submit')) {\n $this->saveFeed();\n return;\n }\n }\n $this->showForm();\n }", "public static function handle_form_submission(){\n\t\tglobal $post;\n\n\t\t// Setup $_POST & $_REQUEST to appear as if the form had been submitted in the traditional way... yep, all sorts of fudge\n\t\tparse_str( $_POST['data'], $data );\n\t\t$_POST = array_merge( $_POST, $data );\n\t\tunset( $_POST['action'] );\n\t\tunset( $_POST['data'] );\n\t\t$_REQUEST['_wpnonce'] = $_POST['_wpnonce'];\n\n\t\t// Setup the post global for Grunion\n\t\t$post = get_post( $_POST['contact-form-id'] );\n\t\tsetup_postdata( $post );\n\n\t\t// Dirty dirty hack to work around Grunion's style printing that breaks ajax\n\t\t$old_request = $_REQUEST['action'];\n\t\t$_REQUEST['action'] = 'grunion_shortcode_to_json';\n\n\t\t$content = do_shortcode( wpautop( $post->post_content ) );\n\n\t\t// Now we can restore the real action\n\t\t$_REQUEST['action'] = $old_request;\n\n\t\t// We have an error in the contact form\n\t\tif ( strpos( $content, 'form-errors' ) !== false ) {\n\t\t\t$result = 'error';\n\t\t\tpreg_match( '%((\\<ul class=\\'form-errors)(.|' . PHP_EOL . ')*?\\</ul\\>)%', $content, $matches );\n\t\t\t$content = \"<div class='form-error'><h3>\" . __( 'Error!' ) . \"</h3>\";\n\t\t\t$content .= $matches[0];\n\t\t\t$content .= \"</div>\";\n\t\t} else {\n\t\t\t$result = 'success';\n\t\t\tpreg_match( '%((\\<div id=\\'contact-form)(.|' . PHP_EOL . ')*?\\</div\\>)%', $content, $matches );\n\t\t\t$content = $matches[0];\n\t\t}\n\n\t\t$content = apply_filters( 'grunion_ajax_confirmation', $content );\n\n\t\t$response = array( 'result' => $result, 'html' => $content );\n\n\t\t$response = json_encode( $response );\n\n\t\theader( \"Content-Type: application/json\" );\n\t\techo $response;\n\n\t\texit();\n\t}", "function submit() {\n\t\tThesisHandler::setupTemplate();\n\n\t\t$journal = &Request::getJournal();\n\t\t$journalId = $journal->getJournalId();\n\n\t\t$thesisPlugin = &PluginRegistry::getPlugin('generic', 'ThesisPlugin');\n\n\t\tif ($thesisPlugin != null) {\n\t\t\t$thesesEnabled = $thesisPlugin->getEnabled();\n\t\t}\n\n\t\tif ($thesesEnabled) {\n\t\t\t$thesisPlugin->import('StudentThesisForm');\n\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'thesis'), 'plugins.generic.thesis.theses'));\n\t\t\t$thesisDao = &DAORegistry::getDAO('ThesisDAO');\n\n\t\t\t$thesisForm = &new StudentThesisForm();\n\t\t\t$thesisForm->initData();\n\t\t\t$thesisForm->display();\n\n\t\t} else {\n\t\t\t\tRequest::redirect(null, 'index');\n\t\t}\n\t}", "function handle()\n {\n\n if(isset($_POST['submit-report'])){\n $this->handleSubmission();\n }\n\n\n $this->page = file_get_contents('./pages/dispatch.html');\n $departments = $this->generateDepartments();\n $this->page = str_replace(\"<!-- Fill Departments -->\", $departments, $this->page);\n $this->page = str_replace(\"<!-- HEADER -->\", file_get_contents('./pages/header.html'), $this->page);\n //$this->page = str_replace('<!-- javascript -->', $this->getJS(), $this->page);\n }", "function LaunchNewsletter()\n{\n\tglobal $xoopsModule, $xoopsConfig, $dateformat;\n\txoops_cp_header();\n\tadminmenu(5);\n\n\tif (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php')) {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php';\n\t} else {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/english/newsletter.php';\n\t}\n\techo \"<br />\";\n\t$story = new NewsStory();\n\t$exportedstories=array();\n\t$topiclist='';\n\t$removebr=false;\n\tif(isset($_POST['removebr']) && intval($_POST['removebr'])==1) {\n\t\t$removebr=true;\n\t}\n\t$date1=$_POST['date1'];\n\t$date2=$_POST['date2'];\n\t$timestamp1=mktime(0,0,0,intval(substr($date1,5,2)), intval(substr($date1,8,2)), intval(substr($date1,0,4)));\n\t$timestamp2=mktime(0,0,0,intval(substr($date2,5,2)), intval(substr($date2,8,2)), intval(substr($date2,0,4)));\n\tif(isset($_POST['export_topics'])) {\n\t\t$topiclist=implode(\",\",$_POST['export_topics']);\n\t}\n\t$tbltopics=array();\n\t$exportedstories=$story->NewsExport($timestamp1, $timestamp2, $topiclist, 0, $tbltopics);\n $newsfile=XOOPS_ROOT_PATH.'/uploads/newsletter.txt';\n\tif(count($exportedstories)) {\n\t\t$fp=fopen($newsfile,'w');\n\t\tif(!$fp) {\n\t\t\tredirect_header('index.php',4,sprintf(_AM_NEWS_EXPORT_ERROR,$newsfile));\n\t\t}\n\n\t\tforeach($exportedstories as $onestory)\n\t\t{\n\t\t\t$content=$newslettertemplate;\n\t\t\t$content=str_replace('%title%',$onestory->title(),$content);\n\t\t\t$content=str_replace('%uname%',$onestory->uname(),$content);\n\t\t\t$content=str_replace('%created%',formatTimestamp($onestory->created(),$dateformat),$content);\n\t\t\t$content=str_replace('%published%',formatTimestamp($onestory->published(),$dateformat),$content);\n\t\t\t$content=str_replace('%expired%',formatTimestamp($onestory->expired(),$dateformat),$content);\n\t\t\t$content=str_replace('%hometext%',$onestory->hometext(),$content);\n\t\t\t$content=str_replace('%bodytext%',$onestory->bodytext(),$content);\n\t\t\t$content=str_replace('%description%',$onestory->description(),$content);\n\t\t\t$content=str_replace('%keywords%',$onestory->keywords(),$content);\n\t\t\t$content=str_replace('%reads%',$onestory->counter(),$content);\n\t\t\t$content=str_replace('%topicid%',$onestory->topicid(),$content);\n\t\t\t$content=str_replace('%topic_title%',$onestory->topic_title(),$content);\n\t\t\t$content=str_replace('%comments%',$onestory->comments(),$content);\n\t\t\t$content=str_replace('%rating%',$onestory->rating(),$content);\n\t\t\t$content=str_replace('%votes%',$onestory->votes(),$content);\n\t\t\t$content=str_replace('%publisher%',$onestory->uname(),$content);\n\t\t\t$content=str_replace('%publisher_id%',$onestory->uid(),$content);\n\t\t\t$content=str_replace('%link%',XOOPS_URL.'/modules/news/article.php?storyid='.$onestory->storyid(),$content);\n\t\t\tif($removebr) {\n\t\t\t\t$content=str_replace('<br />',\"\\r\\n\",$content);\n\t\t\t}\n\t\t\tfwrite($fp,$content);\n\t\t}\n\t\tfclose($fp);\n\t\t$newsfile=XOOPS_URL.'/uploads/newsletter.txt';\n\t\tprintf(_AM_NEWS_NEWSLETTER_READY,$newsfile,XOOPS_URL.'/modules/news/admin/index.php?op=deletefile&amp;type=newsletter');\n\t} else {\n\t\tprintf(_AM_NEWS_NOTHING);\n\t}\n}", "function ef_notifications_notification_submit($form, &$form_state) {\n if (isset($form_state['values']['ef_notifications'])) {\n ($form['options']['#access'] ? $wrapper_id = 'options' : $wrapper_id = 'revision_information');\n foreach ($form_state['values']['ef_notifications'] as $rid => $role_emails) {\n foreach ($role_emails as $email) {\n $email_transition = $form[$wrapper_id]['workflow_email'][$rid]['#hidden'];\n ef_notifications_mail_send($email, $email_transition, $form_state['node']); //\n }\n }\n }\n}", "public function submit_form()\n\t{\n\t\tDisplay::message('user_profil_submit', ROOT . 'index.' . PHPEXT . '?p=profile&amp;module=contact', 'forum_profil');\n\t}", "public function handled_request() {\n if ( ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'nonce_from_shortcode' ) ) {\n wp_send_json_error( [\n 'error' => __( 'Nonce Verification Failed', 'form_submit_ajax' ),\n ] );\n }\n \n if ( empty( $_REQUEST ) ) {\n wp_send_json_error( [\n 'error' => __( 'Sorry data can not be empty', 'form_submit_ajax' )\n ] );\n }\n\n $args = [\n 'fname' => sanitize_text_field( $_REQUEST['fname'] ),\n 'lname' => sanitize_text_field( $_REQUEST['lname'] ),\n 'email' => sanitize_email( $_REQUEST['email'] ),\n 'message' => sanitize_textarea_field( $_REQUEST['message'] ),\n ];\n $inserted = wp_af_insert_address( $args );\n\n if ( is_wp_error( $inserted ) ) {\n wp_send_json_error( [\n 'error' => __( 'Something went wrong', 'form_submit_ajax' )\n ] );\n }\n\n wp_send_json_success( [\n 'message' => __( 'Data save successfuly', 'form_submit_ajax' )\n ] );\n }", "function handle_form() {\n\t\tglobal $wpdb;\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: GET THIS WORKING TO AVOID NON-ADMINS USING IT\n/*\t\tif( ! is_user_logged_in() ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\t\n\t\t}\n*/\n\t\t// Exit if the Cancel button was pressed, and redirect to page that lists all orgs\n\t\tif( isset( $_POST['submit'] ) && 'Cancel' == $_POST['submit'] ) {\n\t\t\t\n\t\t\t// TODO: Check destination\n\t\t\twp_safe_redirect( site_url() . '/admin/list-orgs' );\n\t\t\texit();\n\t\t}\n\n\t\t$org = new Organisation();\n\n\t\t$org->save_org_from_post();\n\t\t\n\t}", "function event_formprocessing($formvariables) {\r\r\n\tglobal $glbl_companyname, $glbl_sendformsfromemailaddress, $glbl_sendformstoemailaddress,\r\r\n\t $glbl_physicalwebrootlocation;\r\r\n\t$outputtype = 'simple';\r\r\n\t// Security validation 'ctcd'\r\r\n\tif (!pingToken($formvariables['citycode']))\r\r\n\t\treturn '// invalid: press the browser [back] button;';\r\r\n\t// When using a custom template for output\r\r\n\tif (isset($formvariables['emailtemplate'])){\r\r\n\t\t$loc = $glbl_physicalwebrootlocation . $formvariables['emailtemplate'];\r\r\n\t\tif (file_exists($loc)){ \r\r\n\t\t\t$file = fopen($loc, 'r'); // Read template page\r\r\n\t\t\t$formstring = fread($file, filesize($loc));\r\r\n\t\t\tfclose($file);\r\r\n\t\t\tif (trim($formstring) != '')\r\r\n\t\t\t\t$outputtype = 'custom';\r\r\n\t\t}\r\r\n\t}\r\r\n\t// When using simple output\r\r\n\tif ($outputtype == 'simple')\r\r\n\t\t$formstring = 'A form was submitted for: ' . $glbl_companyname . '<br><br>';\r\r\n\t// Loop over form variables\r\r\n\tforeach (explode(',', $formvariables['fieldlist']) as $formfield) {\r\r\n\t\t$formfieldvalue = '';\r\r\n\t\tif (isset($formvariables[$formfield]))\r\r\n\t\t\t$formfieldvalue = $formvariables[$formfield];\r\r\n\t\tif (strtolower($formfield) == 'email')\r\r\n\t\t\t$formfieldvalue = '<a href=\"mailto:' . $formfieldvalue . '\">' . $formfieldvalue . '</a>';\r\r\n\t\tif ($outputtype == 'simple')\r\r\n\t\t\t$formstring .= str_replace('_', ' ', $formfield) . ': ' . str_replace('\\\\', '', $formfieldvalue) . '<br>';\r\r\n\t\telse\r\r\n\t\t\t$formstring = str_replace('<!-- {$' . $formfield . '$} -->', $formfieldvalue, $formstring);\r\r\n\t}\r\r\n\t// Add datetimestamp\r\r\n\tif ($outputtype == 'simple')\t\r\r\n\t\t$formstring .= '<br>Date: ' . date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\");\r\r\n\telse\r\r\n\t\t$formstring = str_replace('<!-- {$datetimestamp$} -->',\r\r\n\t\t\t\t\t\t\t\t (date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\")), $formstring);\t\r\r\n\t// Send via email\r\r\n\trequire_once(\"htmlMimeMail5/htmlMimeMail5.php\"); // htmlMimeMail5 class\r\r\n $mail = new htmlMimeMail5(); // Instantiate a new HTML Mime Mail object\r\r\n $mail->setFrom($glbl_sendformsfromemailaddress);\r\r\n $mail->setReturnPath($glbl_sendformsfromemailaddress); \r\r\n $mail->setSubject('web form | ' . $glbl_companyname);\r\r\n $mail->setText(str_replace('<br>', '\\r\\n', $formstring));\r\r\n $mail->setHTML($formstring);\r\r\n\t// Attach uploaded image, if any\r\r\n\tif (isset($_FILES['imagefile']['name']))\r\r\n\t\tif ($_FILES['imagefile']['type'] == \"image/gif\" || $_FILES['imagefile']['type'] == \"image/jpg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/jpeg\" || $_FILES['imagefile']['type'] == \"image/pjpeg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/png\")\r\r\n\t\t\t$mail->addAttachment(new fileAttachment($_FILES['imagefile']['tmp_name'], $_FILES['imagefile']['type']));\r\r\n\t// Send the email!\r\r\n\t$mail->send(array($glbl_sendformstoemailaddress), 'smtp');\r\r\n\t// User defined function hook\r\r\n\texecUserDefinedFunction('USRDFNDafter_event_formprocessing');\r\r\n\t// Point to page\r\r\n\theader('Location: ' . $formvariables['afterpage']);\r\r\n}", "protected function postProcess()\n {\n if (Tools::isSubmit('btnSubmit')) {\n Configuration::updateValue('ONEHOP_SEND_SMS_API', Tools::getValue('SEND_SMS_API'));\n Configuration::updateValue('ONEHOP_ADMIN_MOBILE', Tools::getValue('ADMIN_MOBILE'));\n }\n $token = Tools::getAdminTokenLite('AdminModules');\n $request_scheme = $_SERVER['REQUEST_SCHEME'] ? $_SERVER['REQUEST_SCHEME'] : 'http';\n $hostlink = $request_scheme . \"://\" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];\n $mainPara = \"controller=AdminModules&configure=onehopsmsservice\";\n $reDirectLink = $hostlink . \"?\" . $mainPara . \"&token=\" . $token . \"&smswelcome=yes\";\n Tools::redirect($reDirectLink);\n }", "public function callbackSubmit()\n {\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n $reply->find(\"id\", $this->form->value(\"id\"));\n $reply->delete();\n $this->di->get(\"response\")->redirect(\"comments\");\n }", "public function processForm(ServerData $server);", "function post_form($placeholder) {\n\n\n \techo '<form action=\"' . esc_url( $_SERVER['REQUEST_URI'] ) . '\" method=\"post\">';\n \techo '<p>';\n \techo 'Your Name (required) <br/>';\n \techo '<input class=\"inp\" type=\"text\" name=\"cf-name\" pattern=\"[a-zA-Z0-9 ]+\" value=\"' . ( isset( $_POST[\"cf-name\"] ) ? esc_attr( $_POST[\"cf-name\"] ) : '' ) . '\" size=\"40\" />';\n \techo '</p>';\n \techo '<p>';\n \techo 'Your Email (required) <br/>';\n \techo '<input class=\"inp\" type=\"email\" name=\"cf-email\" value=\"' . ( isset( $_POST[\"cf-email\"] ) ? esc_attr( $_POST[\"cf-email\"] ) : '' ) . '\" size=\"40\" />';\n \techo '</p>';\n \techo '<p>';\n \techo 'Subject (required) <br/>';\n \techo '<input class=\"inp\" type=\"text\" name=\"cf-subject\" pattern=\"[a-zA-Z ]+\" value=\"' . ( isset( $_POST[\"cf-subject\"] ) ? esc_attr( $_POST[\"cf-subject\"] ) : '' ) . '\" size=\"40\" />';\n \techo '</p>';\n \techo '<p>';\n \techo 'Your Message (required) <br/>';\n \techo '<textarea rows=\"10\" cols=\"35\" name=\"cf-message\" placeholder=\"'.$placeholder.'\">' . ( isset( $_POST[\"cf-message\"] ) ? esc_attr( $_POST[\"cf-message\"] ) : '' ) . '</textarea>';\n \techo '</p>';\n \techo '<p><input class=\"inp\" type=\"submit\" name=\"cf-submitted\" value=\"Send\"></p>';\n \techo '</form>';\n }", "function process()\n\t{\n\t\tswitch(getPOST('action',''))\n\t\t{\n\t\t\tcase 'forum_send':\n\t\t\t\tif(isInPOST(array(\"body\")))\n\t\t\t\t{\n\t\t\t\t\tif($this->sendMessage($_POST['body'],getGET($this->reply_to_get,0)))\n\t\t\t\t\t\t$this->message(FORUM_MESSAGE_SEND_MESSAGE_OK);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'cat_operation':\n\t\t\t\tif(isset($_POST['cat_id']))\n\t\t\t\t{\n\t\t\t\t\tif(isset($_POST['pub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubCat($_POST['cat_id'],true))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_PUB_CAT_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['unpub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubCat($_POST['cat_id'],false))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_UNPUB_CAT_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['del']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(isset($_POST['del_bizt'])) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->delCat($_POST['cat_id']))\n\t\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_DEL_CAT_OK);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse $this->message(FORUM_MESSAGE_DEL_BIZT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'topic_operation':\n\t\t\t\tif(isset($_POST['topic_id']))\n\t\t\t\t{\n\t\t\t\t\tif(isset($_POST['pub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubTopic($_POST['topic_id'],true))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_PUB_TOPIC_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['unpub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubTopic($_POST['topic_id'],false))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_UNPUB_TOPIC_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['del']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(isset($_POST['del_bizt']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->delTopic($_POST['topic_id']))\n\t\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_DEL_TOPIC_OK);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse $this->message(FORUM_MESSAGE_DEL_BIZT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'post_operation':\n\t\t\t\tif(isset($_POST['post_id']))\n\t\t\t\t{\n\t\t\t\t\tif(isset($_POST['pub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubMessage($_POST['post_id'],true))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_PUB_POST_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['unpub']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->pubMessage($_POST['post_id'],false))\n\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_UNPUB_POST_OK);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($_POST['del']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(isset($_POST['del_bizt']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->delMessage($_POST['post_id']))\n\t\t\t\t\t\t\t\t$this->message(FORUM_MESSAGE_DEL_POST_OK);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse $this->message(FORUM_MESSAGE_DEL_BIZT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'new_topic':\n\t\t\t\tif(isset($_POST['topic_name']))\n\t\t\t\t{\n\t\t\t\t\t$this->createTopic($_POST['topic_name']);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'new_cat':\n\t\t\t\tif(isset($_POST['cat_name']))\n\t\t\t\t{\n\t\t\t\t\t$this->createCat($_POST['cat_name']);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function _processSubmit()\n {\n global $interface;\n global $configArray;\n\n // Without IDs, we can't continue\n if (empty($_REQUEST['ids'])) {\n header(\n \"Location: \" . $this->followupUrl . \"?errorMsg=bulk_noitems_advice\"\n );\n exit();\n }\n\n $url = $configArray['Site']['url'] . \"/Search/Results?lookfor=\" .\n urlencode(implode(\" \", $_POST['ids'])) . \"&type=ids\";\n $result = $this->sendEmail(\n $url, $_POST['to'], $_POST['from'], $_POST['message']\n );\n\n if (!PEAR::isError($result)) {\n $this->followupUrl .= \"?infoMsg=\" . urlencode(\"bulk_email_success\");\n header(\"Location: \" . $this->followupUrl);\n exit();\n } else {\n // Assign Error Message and Available Data\n $this->errorMsg = $result->getMessage();\n $interface->assign('formTo', $_POST['to']);\n $interface->assign('formFrom', $_POST['from']);\n $interface->assign('formMessage', $_POST['message']);\n $interface->assign('formIDS', $_POST['ids']);\n }\n }", "function send_news_letter() {\n $this->load->view('includes/header');\n $this->load->view('includes/top_header');\n $this->load->view('includes/left_panel');\n\n $data['template'] = $this->news_letter_model->get_news_letter_template();\n $this->load->view('news_letter/edit_news_letter', $data);\n\n $this->load->view('includes/footer');\n }", "function wpcf7_knews_subscription ($WPCF7_ContactForm) {\n\t\n\t$submission = WPCF7_Submission::get_instance();\n\t$posted_data =& $submission->get_posted_data();\t \n\n\tif(isset($posted_data['knews-subscription'])) {\n\n\t\t$email = $posted_data['email'];\n\t\t\n\t\t$id_list_news = $posted_data['knews-subscription'];\n\t\t$lang = ICL_LANGUAGE_CODE;\n\t\t$lang_locale = get_locale();\n\t\t\n\t\t$extra_fields = $posted_data;\n\t\t$custom_fields = array();\n\t\t\tforeach ($extra_fields as $field) {\n\t\t\t\t$custom_fields[1]=$posted_data['name'];\n\t\t\t\t$custom_fields[2]=$posted_data['surname'];\n\t\t\t}\n\t\n\t\t$bypass_confirmation = true;\n\t\t\n\t\tapply_filters('knews_add_user_db', 0, $email, $id_list_news, $lang, $lang_locale, $custom_fields, $bypass_confirmation);\n\t\t\t\n\t}\t\n}", "public function indexAction()\n {\n $form = new ContactForm(null);\n\n if ($this->request->isPost()) {\n $mail = $this->getDI()\n ->getMail();\n if ($form->isValid($this->request->getPost()) != false) {\n\n try{\n $mail->send(\n array($this->config->mail->fromEmail => $this->config->mail->fromName),\n 'Contact Us',\n 'contact-us', array(\n 'name' => $this->request->getPost('name'),\n 'email' => $this->request->getPost('email'),\n 'message' => $this->request->getPost('message')\n )\n );\n $this->flash->success('Your message have been sent to administrator.');\n $form->clear();\n }catch (Exception $e){\n echo $e->getMessage();\n }\n\n }\n }\n $this->view->form = $form;\n }", "public function dispatch_actions() {\n add_action( 'wp_ajax_nopriv_form_handle', [ wssn_stock_notifier()->stock,'wssn_stock_submit_email_form_handle' ] );\n add_action( 'wp_ajax_form_handle', [ wssn_stock_notifier()->stock,'wssn_stock_submit_email_form_handle' ] );\n\n }", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function form_submission($args) {\n\t\t\t// Called when a form is submitted\n\t\t\t// * Add the __finishURL if not set\n\t\t\t// * Store it in temp storage\n\t\t\t// * Output \"busy page\" that includes the UID. The page will then do an AJAX request\n\t\t\t// that will start the processing of the form data\n\t\t\n\t\t\t// Some housekeeping--garbage collect the old signed files\n\t\t\t$this->gc_files_dir();\n\t\t\t\n\t\t\t$UID = $args['__UID'];\n\n\t\t\tif ($this->debug_mode()) {\n\t\t\t\t$this->log (\"Request {$UID}:Incoming form values: \" . $this->var_dump($args), CFS_DEBUG);\n\t\t\t}\n\t\t\t\n\t\t\t// $args must have a __UID. \n\t\t\tif ($UID === 0) {\n\t\t\t\t$this->error_page(\"Problem! The form id was not provided.\", \n\t\t\t\t\t\"Please consult your developer.\");\n\t\t\t\t$this->log (\"Request missing UID! Incoming form values: \" . $this->var_dump($args), CFS_FATALERROR);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tif (! $args['__finishURL']) {\n\t\t\t\t\t$args['__finishURL'] = $this->thank_you_url();\n\t\t\t\t}\n\t\t\t\t$args['__signed_file_path'] = $this->signed_files_dir() . \"/\" . $UID . \".pdf\";\n\t\t\t\t\n\t\t\t\tif ( $args['_date_format'] && $args['_date_fields']) {\n\t\t\t\t\t$args = $this->process_dates($args);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store the args\n\t\t\t\t// See http://codex.wordpress.org/Transients_API\n\t\t\t\tset_transient( $UID, $args, HOUR_IN_SECONDS );\n\t\t\t\t\n\t\t\t\t// Send our please wait page\n\t\t\t\t// The page will then do an Ajax call back to us\n\t\t\t\t// using api POST /cfs/v1/request\n\t\t\t\t$this->please_wait_page($UID);\n\t\t\t}\n\t\t}", "function wpgnv_process_form() {\n\tif ( empty( $_POST['post-title'] ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\tglobal $wpgnv_error;\n\t\t$wpgnv_error = 'You left the Idea field empty. Please enter an Idea and THEN submit it.';\n\t\treturn;\n\t}\n\tif ( isset( $_POST ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\t$post_args = array (\n\t\t\t'post_type' => 'ideas',\n\t\t\t'post_status' => 'pending',\n\t\t\t'post_title' => esc_html( $_POST['post-title'] )\n\t\t);\n\t\t$post_id = wp_insert_post( $post_args );\n\n\t\tif ( is_wp_error( $post_id ) ) {\n\t\t\tglobal $wpgnv_error;\n\t\t\t$wpgnv_error = 'Sorry, there was an error processing your new idea.';\n\t\t} else {\n\t\t\tglobal $wpgnv_success;\n\t\t\t$wpgnv_success = 'Awesome! Your idea has been submitted and is awaiting moderation.';\n\t\t}\n\t}\t\n}", "public function form()\n\t{\n\t\tglobal $L;\n\t\t$sentEmails = $this->getSentEmailsArray();\n\n\t\t$html = '<div class=\"alert alert-primary\" role=\"alert\">';\n\t\t$html .= $this->description();\n\t\t$html .= '</div>';\n\n\t\t$html .= '<div>';\n\t\t// API key\n\t\t$html .= '<label><strong>Buttondown API Key</strong></label>';\n\t\t$html .= '<input id=\"apiKey\" name=\"apiKey\" type=\"text\" value=\"'.$this->getValue('apiKey').'\">';\n\t\t$html .= '<span class=\"tip\">Copy your API key on https://buttondown.email/settings/programming </span>';\n\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('paused').'</label>';\n\t\t$html .= '<select id=\"paused\" name=\"paused\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('paused')===true?'selected':'').'>'.$L->get('is-paused').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('paused')===false?'selected':'').'>'.$L->get('is-active').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('paused-tip').'</span>';\n\n\t\t// Start date\n\t\t$html .= '<label>'.$L->get('send-after').'</label>';\n\t\t$html .= '<input id=\"startDate\" name=\"startDate\" type=\"text\" value=\"'.$this->getValue('startDate').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('send-after-tip').'</span>';\n\t\t// Subject Prefix\n\t\t$html .= '<label>'.$L->get('subject-prefix').'</label>';\n\t\t$html .= '<input id=\"subjectPrefix\" name=\"subjectPrefix\" type=\"text\" value=\"'.$this->getValue('subjectPrefix').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('subject-prefix-tip').'</span>';\n\t\t\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('include-cover').'</label>';\n\t\t$html .= '<select id=\"includeCover\" name=\"includeCover\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('includeCover')===true?'selected':'').'>'.$L->get('yes').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('includeCover')===false?'selected':'').'>'.$L->get('no').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('include-cover-tip').'</span>';\n\t\t$html .= '</div><hr>';\n\t\t// List of page keys for which mail was sent \n\t\t$html .= '<h4>'.$L->get('sent-list').'</h4>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('sent-list-tip').'</span>';\n\t\t$html .= '<div style=\"overflow-y: scroll; height:400px;\"><ul>';\n\t\tforeach ($sentEmails as $sentKey):\n\t\t\t$html .= '<li>'.$sentKey.'</li>';\n\t\tendforeach;\n\t\t$html .= '</ul></div>';\n\t\t$html .= '<div><a target=\"_blank\" rel=\"noopener\" href=\"https://buttondown.email/archive\">Buttondown Archive</a></div>';\n\t\treturn $html;\n\t}", "public function submitPage() {}", "public function handleSubmit()\n {\n // process: just display the form.\n if ((!empty($_POST[\"fromHome\"])) ||\n (!empty($_POST[\"fromStaffHomePage\"]))) {\n $this->fromHomePage = true;\n }\n if ($this->fromHomePage) {\n return;\n }\n\n // Clear camper ID from the session, in case multiple campers are\n // being added in the same browser.\n unset($_SESSION[\"camper_id\"]);\n\n // Check for submitted values. Fire an error if required inputs\n // are missing, and grab defaults if applicable.\n foreach ($this->columns as $col) {\n $val = test_input($_POST[$col->name]);\n if ($val === null) {\n if ($col->required) {\n $this->colName2Error[$col->name] = errorString(\"Missing value for required field\");\n continue;\n }\n if (!is_null($col->defaultValue)) {\n $val = $col->defaultValue;\n } else {\n continue;\n }\n }\n $this->col2Val[$col->name] = $val;\n }\n if (!empty($this->colName2Error)) {\n // If we hit any errors, stop here and display, so the user\n // can correct them.\n return;\n }\n\n // Check to see if this camper registration is a duplicate, which\n // we define as having the same first and last name, and edah. If\n // a dup is detected, display an overlay that lets the user either\n // continue to the edit-camper page, with the ID set to the existing\n // camper ID, or else lets them start the add form again, with the\n // fields cleared.\n $db = new DbConn();\n $db->isSelect = true;\n $db->addColVal($this->col2Val[\"first\"], 's');\n $db->addColVal($this->col2Val[\"last\"], 's');\n $db->addColVal($this->col2Val[\"edah_id\"], 'i');\n $sql = \"SELECT c.camper_id camper_id, e.name edah_name FROM campers c, edot e WHERE c.edah_id = e.edah_id AND \" .\n \"c.first = ? AND c.last = ? AND c.edah_id = ?\";\n $result = $db->doQuery($sql, $err);\n if (($result !== false) && ($result->num_rows > 0)) {\n // If the query succeeded and returned one or more rows, then\n // we've found a duplicate.\n $row = mysqli_fetch_assoc($result);\n $this->duplicateCamperDesc = $this->col2Val[\"first\"] . \" \" . $this->col2Val[\"last\"] . \" in \" . $row[\"edah_name\"];\n return;\n }\n\n // At this point, we have valid new-camper data. Set all our\n // column data in the SESSION hash, so that ajax methods can pick it\n // up.\n foreach ($this->col2Val as $colName => $colVal) {\n $_SESSION[$colName] = $colVal;\n }\n\n // Go to the choice-ranking page.\n $rankChoicesUrl = urlIfy(\"rankCamperChoices.html\");\n echo (\"<script type=\\\"text/javascript\\\">window.location.replace(\\\"$rankChoicesUrl\\\");</script>\");\n exit();\n }", "private function formSubmitted() {\n\t\t\t\n\t\t\t// connect db\n\t\t\t$this->db->replicaConnect(Database::getName($this->par['lang'], $this->par['project']));\n\t\t\t\n\t\t\t// build query for outgoing links\n\t\t\t$this->par['page'] = str_replace(' ', '_', $this->par['page']);\n\t\t\t$t1 = 'SELECT s.pl_title';\n\t\t\t$t1 .= ' FROM pagelinks s';\n\t\t\t$t1 .= ' INNER JOIN page tp ON (s.pl_title = tp.page_title AND s.pl_namespace = tp.page_namespace)';\n\t\t\t$t1 .= ' INNER JOIN page sp ON (s.pl_from = sp.page_id AND s.pl_namespace = sp.page_namespace AND sp.page_title = ?)';\n\t\t\t$t1 .= ' WHERE s.pl_namespace = 0';\n\t\t\t$t1 .= ' AND s.pl_from_namespace = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q1 = $this->db->executePreparedQuery($t1, 's', $this->par['page']);\n\t\t\t\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q1) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$r1 = Database::fetchResult($q1);\n\t\t\t\n\t\t\t// build query for incoming links\n\t\t\t$t2 = 'SELECT tp.page_title';\n\t\t\t$t2 .= ' FROM page tp';\n\t\t\t$t2 .= ' INNER JOIN pagelinks t ON (tp.page_id = t.pl_from AND t.pl_title = ? AND t.pl_namespace = 0 AND t.pl_from_namespace = 0)';\n\t\t\t$t2 .= ' WHERE tp.page_is_redirect = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q2 = $this->db->executePreparedQuery($t2, 's', $this->par['page']);\n\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q2) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$r2 = Database::fetchResult($q2);\n\t\t\t\n\t\t\t$out = [];\n\t\t\t$inc = [];\n\t\t\t$common = [];\n\t\t\t$noback = [];\n\t\t\t$nolink = [];\n\t\t\tforeach ($r1 as $l1) {\n\t\t\t\t$out[] = $l1['pl_title'];\n\t\t\t}\n\t\t\tforeach ($r2 as $l2) {\n\t\t\t\t$inc[] = $l2['page_title'];\n\t\t\t}\n\t\t\t\n\t\t\t// get arrays\n\t\t\t$common = array_intersect($out, $inc);\n\t\t\t$noback = array_diff($out, $inc);\n\t\t\t$nolink = array_diff($inc, $out);\n\t\t\t\n\t\t\t// sort arrays\n\t\t\tsort($common);\n\t\t\tsort($noback);\n\t\t\tsort($nolink);\n\t\t\t\n\t\t\t// close queries\n\t\t\t$q1->close();\n\t\t\t$q2->close();\n\t\t\t\n\t\t\t// open statistics area\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Statistics');\n\t\t\t\n\t\t\t$this->page->addInline('p', 'Page conjunction for ' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], $this->par['page'], str_replace('_', ' ', $this->par['page']))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t. ' (' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], 'Special:Whatlinkshere/' . $this->par['page'], 'What links here') . ')');\n\t\t\t\n\t\t\t// statistics\n\t\t\t$this->page->openBlock('p');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', count($out) . ' links on this page');\n\t\t\t$this->page->addInline('li', count($inc) . ' links to this page');\n\t\t\t$this->page->addInline('li', '<a href=\"#noback\">' . count($noback) . ' links on this page without backlinks</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#nolink\">' . count($nolink) . ' incoming links without corresponding outgoing links</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#mutual\">' . count($common) . ' mutual links</a>');\n\t\t\t$this->page->closeBlock(2);\n\t\t\t\n\t\t\t// open result area\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Results');\n\t\t\t\n\t\t\t// no backlinks\n\t\t\tif (count($noback) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"noback\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with no backlinks:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($noback as $v1) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v1, str_replace('_', ' ', $v1)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// no wikilinks\n\t\t\tif (count($nolink) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"nolink\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles with links to ' . str_replace('_', ' ', $this->par['page']) . ' but no links from here:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($nolink as $v2) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v2, str_replace('_', ' ', $v2)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// common links\n\t\t\tif (count($common) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"mutual\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with backlinks (mutual links):');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($common as $v3) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v3, str_replace('_', ' ', $v3)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\t\t\t\n\t\t\t// close result area\n\t\t\t$this->page->closeBlock();\n\t\t}", "public function send_contact_form(){\n if( ! $this->is_valid_nonce( 'mpp_ajax_nonce' ) ){\n die();\n }\n $contact_form = new ContactForm( $this->plugin, $_POST );\n if( $contact_form->has_fields() ){\n $contact_form->execute();\n }\n wp_send_json( $contact_form->result );\n }", "function newsletters_page() {\r\n //including file for send newsletter\r\n if ( \"send_newsletter\" == $_REQUEST['newsletter_action'] && ( $_REQUEST['newsletter_id'] || $_REQUEST['send_id'] ) ) {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-send-newsletter.php\" );\r\n return;\r\n }\r\n\r\n require_once( $plugin_dir . \"email-newsletter-files/page-newsletters.php\" );\r\n }", "public function action_sendnewsletters()\n\t{\n\t\techo 'Send newsletters from queue'.\"\\n\";\n\t\t$mails = Model_Newsletter::getQueuedToSend();\n\t\t$swiftMail = email::connect();\n\t\t$done_item = array();\n\t\t$done_newsletter = array();\n\t\tif (!count($mails))\n\t\t{\n\t\t\techo 'Nothing to send';\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t\tforeach ($mails as $mail)\n\t\t{\n\t\t\t$message = new Swift_Message();\n\t\t\t$message->setFrom(Model_Mail::EMAIL_ADMIN);\n\t\t\t$message->setBody($mail->content,'text/html');\n\t\t\t$message->setTo(array($mail->subscriber_email));\n\t\t\t$message->setSubject($mail->title);\n\t\t\t\n\t\t\t$result = $swiftMail->send($message);\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\tif (!in_array($mail->newsletter_id, $done_newsletter))\n\t\t\t\t{\n\t\t\t\t\tarray_push($done_newsletter, $mail->newsletter_id);\t\n\t\t\t\t}\n\t\t\t\tarray_push($done_item, $mail->newsletter_queue_id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tModel_Newsletters::moveToArchive($done_item);\n\t\tModel_Newsletters::setSent($done_newsletter);\n\t\techo 'Sended '.count($done).' e-mail'.\"\\n\";\n\t}", "public function run()\n {\n $sender = wp_get_current_user()->get('user_email');\n $headers = 'From: '.$sender.'<'.$sender.'>'.\"\\r\\n\";\n $subject = sprintf(\n esc_html__('Your post on %s was rejected.', 'reject-notify'),\n esc_html(get_bloginfo('name'))\n );\n add_filter('wp_mail_content_type', function () {\n return 'text/html';\n }, PHP_INT_MAX);\n $success = wp_mail($this->data['recipient'], $subject, $this->data['reason'], $headers);\n $format = $success\n ? esc_html__('Email sent to %s!', 'reject-notify')\n : esc_html__('Error on sending email to %s', 'reject-notify');\n $message = sprintf($format, $this->data['recipient']);\n $class = $success ? 'updated' : 'error';\n $json = array_merge($this->data, compact('message', 'class', 'sender', 'subject'));\n $success and $this->meta->add($this->data['postid'], $this->authorID);\n wp_send_json($json);\n }", "public function ShowForm()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}", "public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}", "public function submitForm(array &$form, FormStateInterface $form_state) {\n \n $fsname = $form_state->getValue('name');\n $fsemail = $form_state->getValue('email');\n $fscolor = $form_state->getValue('color');\n $fsmessage = $form_state->getValue('message');\n \n \n //\n // store all of this in the table\n $connection = \\Drupal::database();\n $result = $connection->insert('genericcontactform')\n ->fields([\n 'name' => $fsname,\n 'email' => $fsemail,\n 'color' => $fscolor,\n 'message' => $fsmessage\n ])\n ->execute();\n \n \n //\n // now send an email notification\n $module = 'genericcontactform';\n $key = 'form_submit_notification';\n \n $admin_email = $this->config('system.site')->get('mail');\n $from = $fsemail;\n\n $params = $form_state->getValues();\n $language_code = $this->languageManager->getDefaultLanguage()->getId();\n // fwiw, usually ^this returns 'en' but hey, whatever\n $send_now = TRUE;\n $result = $this->mailManager->mail($module, $key, $to, $language_code, $params, $from, $send_now);\n \n \n //\n // and we're done\n drupal_set_message('Thanks!');\n\n }", "function send_AJAX_mail_before_submit() {\n\t\t\t\n\t\t\t$to = get_option('admin_email');\n\t\t\t$form_fields = $_POST['whatever'];\n\t\t\t\n\t\t\t$subject = 'E-mail sent through Minimal Form on '.get_site_url();\n\t\t\t$message = 'Got this response from a visitor through Minimal Form on your site:'.\"\\r\\n \\r\\n\";\n\t\t\t\n\t\t\tforeach($form_fields as $key => $value){\n\t\t\t\t$message .= $key.': '.$value.\"\\r\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tcheck_ajax_referer('my_email_ajax_nonce');\n\t\t\tif (isset($_POST['action']) && $_POST['action'] == \"mail_before_submit\") {\n\t\t\t\t// send email \n\t\t\t\twp_mail( $to, $subject, $message, $headers, $attachments );\n\t\t\t}\n\t\t}", "function viaggio_deliver_mail() {\n\tif ( isset( $_POST['cf-submitted'] ) ) {\n\n\t\t// sanitize form values\n\t\t$name = sanitize_text_field( $_POST[\"cf-name\"] );\n\t\t$email = sanitize_email( $_POST[\"cf-email\"] );\n\t\t$subject = sanitize_text_field( $_POST[\"cf-subject\"] );\n\t\t$message = esc_textarea( $_POST[\"cf-message\"] );\n\n\t\t// get the blog administrator's email address\n\t\t$to = get_option( 'admin_email' );\n\n\t\t$headers = \"From: $name <$email>\" . \"\\r\\n\";\n\n\t\t// If email has been process for sending, display a success message\n\t\tif ( wp_mail( $to, $subject, $message, $headers ) ) {\n\t\t\techo '<div>';\n\t\t\techo '<p>'.esc_html__('Thanks for contacting me, expect a response soon.' , 'viaggio').'</p>';\n\t\t\techo '</div>';\n\t\t} else {\n\t\t\techo esc_html__('An unexpected error occurred.' , 'viaggio');\n\t\t}\n\t}\n}", "function handle_actions() {\n $id = filter_input(INPUT_GET, 'id');\n global $subscribers;\n global $log;\n\n // POST\n $action = filter_input(INPUT_POST, 'action');\n if ($action == 'create') { \n $log->log('Subscriber CREATE'); // CREATE\n $subscribers->add();\n }\n \n\n // GET\n $action = filter_input(INPUT_GET, 'action');\n if (empty($action)) { \n $log->log('Subscriber READ'); // READ\n return $subscribers->list_view();\n }\n if ($action == 'add') {\n $log->log('Subscriber Add View');\n return $subscribers->add_view();\n }\n }", "public function submit()\n {\n dd(['subject' => 'Twitch', 'content' => post()]);\n }", "public function formAction() {}", "function sf_submission_form() \n{\n\tglobal $sfBaseDir;\n\t\n\t// output form jQuery\n\t$form .= '<script type=\"text/javascript\">\n\t\t//<![CDATA[\n\t\tjQuery(function($){\n\n\t\t\t$(\"#sf_submission\").submit(function() {\n\t\t\t // validate and process form here\n\t\t\t\tvar str = $(this).serialize();\t\t\t\t\t \n\t\t\t\t $.ajax({\n\t\t\t\t type: \"POST\",\n\t\t\t\t url: \"' . $sfBaseDir . 'includes/process-submission.php\",\n\t\t\t\t data: str,\n\t\t\t\t success: function(msg){\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#note\").ajaxComplete(function(event, request, settings)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(msg == \"OK\") // Message Sent? Show the Thank You message and hide the form\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresult = \"Your question has been submitted. Thank you!\";\n\t\t\t\t\t\t\t\t$(\"#sf_submission\").fadeOut();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresult = msg;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t$(this).html(result);\t\t\t\t\t\t\t \n\t\t\t\t\t\t});\t\t\t\t\t \n\t\t\t\t\t}\t\t\t\t\t \n\t\t\t\t });\t\t\t\t\t \n\t\t\t\treturn false;\n\t\t\t});\t\t\t\t\n\n\t\t}); // end jquery(function($))\n\t\t//]]> \n\t</script>';\t\n\t\n\t// form CSS\n\t$form .= '\n\t<style type=\"text/css\">\n\t\t#sf_submission fieldset { margin: 20px 0; }\n\t\t#sf_submission input, #sf_submission textarea { width: 99%; }\n\t\t#sf_submission #sf_submit { width: auto; }\n\t\t#note { color: #0085b9; }\n\t\t#note .notification_error { color: #b81236; }\n\t</style>\n\t';\n\t\n\t// output form HTML\n\t$form .= '<form id=\"sf_submission\">';\n\t\t$form .= '<fieldset>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$form .= '<label for=\"sf_name\">Your Name</label><br/>';\n\t\t\t\t$form .= '<input type=\"text\" name=\"sf_name\" id=\"sf_name\"/>';\n\t\t\t$form .= '</div>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$form .= '<label for=\"sf_email\">Your E-Mail</label><br/>';\n\t\t\t\t$form .= '<input type=\"text\" name=\"sf_email\" id=\"sf_email\"/>';\n\t\t\t$form .= '</div>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$form .= '<label for=\"sf_title\">Question Title</label><br/>';\n\t\t\t\t$form .= '<input type=\"text\" name=\"sf_title\" id=\"sf_title\"/>';\n\t\t\t$form .= '</div>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$form .= '<label for=\"sf_topic\">Question Topic</label><br/>';\n\t\t\t\t$form .= '<select name=\"sf_topic\" id=\"sf_topic\">';\n\t\t\t\t\t$terms = get_terms('faq_topics', array('hide_empty' => 0));\n\t\t\t\t\tforeach($terms as $term) {\n\t\t\t\t\t\t$form .= '<option value=\"' . $term->name .'\">' . $term->name . '</option>';\n\t\t\t\t\t}\n\t\t\t\t$form .= '</select>';\n\t\t\t$form .= '</div>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$form .= '<label for=\"sf_question\">Your Question</label><br/>';\n\t\t\t\t$form .= '<textarea name=\"sf_question\" id=\"sf_question\" rows=\"8\">Ask your question here</textarea>';\n\t\t\t$form .= '</div>';\n\t\t\t$form .= '<div>';\n\t\t\t\t$math1 = rand(1,10);\n\t\t\t\t$math2 = rand(1,10);\n\t\t\t\t$form .= '<label for=\"sf_math\">Validate that you are human: ' . $math1 . '+' . $math2 . '</label><br/>';\n\t\t\t\t$form .= '<input type=\"text\" name=\"sf_math\" id=\"sf_math\"/><br/>';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"sf_math_1\" value=\"' . $math1 . '\"/>';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"sf_math_2\" value=\"' . $math2 . '\"/>';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"sf_referrer\" value=\"' . get_permalink() . '\"/>';\n\t\t\t\t$form .= '<input type=\"submit\" id=\"sf_submit\" value=\"Send Question\"/>';\n\t\t\t$form .= '</div>';\n\t\t$form .= '</fieldset>';\n\t$form .= '</form>';\n\t$form .= '<div id=\"note\"></div>';\n\n\treturn $form;\n}", "public function _report_form_submit()\n\t{\n\t\t$incident = Event::$data;\n\n\t\tif ($_POST)\n\t\t{\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident->id)\n\t\t\t\t->find();\n\t\t\t\t\n\t\t\t$incident_message = ORM::factory('incident_message')->where('incident_id', $incident->id)->find();\t\n\t\t\t$messageID = $incident_message->message_id;\n\t\t\t$message = ORM::factory('message')->where('id',$messageID)->find();\n\t\t\t$smsFrom = $message->message_from;\n\t\t\t\n\t\t\t$locationID = $incident->location_id;\n\t\t\t$location = ORM::factory('location')->where('id',$locationID)->find();\n\t\t\t$locationName = $location->location_name; \n\t\t\t\n\t\t\t$outgoingMessage = Kohana::lang('actionable.action_taken_message').\": \".$incident->incident_title.\" | \".$locationName.\" | \".$incident->incident_date;\n\t\t\t$resolutionMessage = Kohana::lang('actionable.resolution_message').\": \".$incident->incident_title.\" | \".$locationName.\" | \".$incident->incident_date;\n\n\t\t\t$action_item->incident_id = $incident->id;\n\t\t\t$action_item->actionable = isset($_POST['actionable']) ? \n\t\t\t\t$_POST['actionable'] : \"\";\n\t\t\t$action_item->action_taken = isset($_POST['action_taken']) ?\n\t\t\t\t$_POST['action_taken'] : \"\";\n\t\t\t$action_item->action_summary = $_POST['action_summary'];\n\t\t\t$action_item->resolution_summary = $_POST['resolution_summary'];\n\t\t\tif(isset($_POST['action_taken'])){\n\t\t\t\tif($_POST['action_taken']==1){\n\t\t\t\t\tif(!isset($action_item->action_date)){\n\t\t\t\t\t\t$action_item->action_date = date(\"Y-m-d H:i:s\",time());\n\t\t\t\t\t\tsms::send($smsFrom,Kohana::config(\"settings.sms_no1\"),$outgoingMessage);\n\t\t\t\t\t}\n\t\t\t\t}else if($_POST['action_taken']==2){\n\t\t\t\t\tif(!isset($action_item->resolution_date)){\n\t\t\t\t\t\t$action_item->resolution_date = date(\"Y-m-d H:i:s\",time());\n\t\t\t\t\t\tsms::send($smsFrom,Kohana::config(\"settings.sms_no1\"),$resolutionMessage);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_item->action_date = null;\n\t\t\t\t$action_item->resolution_date = null;\n\t\t\t}\t\t\n\t\t\t$action_item->save();\n\t\t}\n\t}", "public static function run () {\n\t\t\t$form = new FormHandler();\n\n\t\t\t$form->addValuesArray($_POST);\n\n\t\t\t# Add all the fields\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'title', \n\t\t\t\t'title'\t\t=> Lang::get('Site Title'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'url', \n\t\t\t\t'title'\t\t=> Lang::get('URL'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'thumb_url', \n\t\t\t\t'title'\t\t=> Lang::get('URL to Thumbnail')\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'content', \n\t\t\t\t'title'\t\t=> Lang::get('Description'), \n\t\t\t\t'type'\t\t=> 'textarea',\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'author', \n\t\t\t\t'title'\t\t=> Lang::get('Your Name'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'email', \n\t\t\t\t'title'\t\t=> Lang::get('And E-mail'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'add_site_submit', \n\t\t\t\t'type'\t\t=> 'hidden', \n\t\t\t\t'value'\t\t=> '1'\n\t\t\t));\n\n\t\t\t# User is submitting form\n\t\t\t# Make sure form is valid (true => check for spam as well)\n\t\t\tif (isset($_POST['add_site_submit']) and $form->validate(true)) {\n\t\t\t\t# Add new site\n\t\t\t\tSites::insert(array(\n\t\t\t\t\t'author'\t\t=> $_POST['author'], \n\t\t\t\t\t'email'\t\t\t=> $_POST['email'], \n\t\t\t\t\t'title'\t\t\t=> $_POST['title'], \r\n\t\t\t\t\t'content'\t\t=> $_POST['content'], \r\n\t\t\t\t\t'thumb_url'\t\t=> isset($_POST['thumb_url']) ? $_POST['thumb_url'] : '', \r\n\t\t\t\t\t'url'\t\t\t=> $_POST['url'], \r\n\t\t\t\t\t'url_str'\t\t=> Router::urlize($_POST['title']), \n\t\t\t\t\t'pub_date'\t\t=> date('Y-m-d H:i:s')\n\t\t\t\t));\n\n\t\t\t\t# Redirect after POST\n\t\t\t\tredirect('?added_site');\r\n\t\t\t}\n\n\t\t\t# Form has been submitted\n\t\t\tif (isset($_GET['added_site'])) {\n\t\t\t\tself::$tplFile = 'ThankYou';\n\t\t\t}\n\t\t\t# Form has NOT been submitted\n\t\t\telse {\n\t\t\t\t# Assign form HTML to template vars\n\t\t\t\tself::$tplVars['form_html'] = $form->asHTML();\n\t\t\t}\n\t\t}", "public function on_after_submit() {\n\t\t\n\t\t/*\n\t\t$post = array();\n\t\t$post['cm-name'] = $this->controller->questionAnswerPairs['1']['answer'].' '.$this->controller->questionAnswerPairs['2']['answer'];\n\t\t$post['cm-itutkr-itutkr'] = $this->controller->questionAnswerPairs['3']['answer'];\n\t\t\t\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t\tcurl_setopt($ch, CURLOPT_URL, 'http://url.to.my.campaignmonitor/myform');\n\t\t//Don't ask me what this does, I just know that without this funny header, the whole thing doesn't work!\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Expect:'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post );\n\t\t\n\t\t$url = curl_exec( $ch );\n\t\tcurl_close ($ch);\n\t\t*/\n\t}", "static public function handleIncomingEmails() {\n\n /**\n * Handle incoming emails for all generic comments (blogs, files, etc...)\n */\n elgg_register_plugin_hook_handler('email:integration:create', 'generic_comment',\n function ($hook_name, $entity_type, $return_value, $parameters) {\n\n // Setup the parameters\n set_input('topic_guid', $parameters['guid']);\n set_input('entity_guid', $parameters['guid']);\n set_input('generic_comment', $parameters['message']);\n\n // Set action\n set_input('action', 'comments/add');\n\n // Perform the action\n action(\"comments/add\");\n\n\n });\n\n /**\n * Handle incoming emails for discussion posts\n */\n elgg_register_plugin_hook_handler('email:integration:create', 'group_topic_post',\n function ($hook_name, $entity_type, $return_value, $parameters) {\n\n set_input('entity_guid', $parameters['guid']);\n set_input('group_topic_post', $parameters['message']);\n\n // Set action\n set_input('action', 'discussion/reply/save');\n\n // Perform the action\n action(\"discussion/reply/save\");\n\n\n });\n\n /**\n * Handle incoming emails for updating status\n */\n elgg_register_plugin_hook_handler('email:integration:create', 'status_update',\n function ($hook_name, $entity_type, $return_value, $parameters) {\n\n // Set update message\n // 140 characters or less\n set_input('body', substr($parameters['message'], 0, 140));\n set_input('method', 'site');\n\n // Set action\n set_input('action', 'thewire/add');\n\n // perform the action\n action(\"thewire/add\");\n\n\n });\n \n /**\n * Handle incoming emails to send private messages\n */\n elgg_register_plugin_hook_handler('email:integration:create', 'messages',\n function ($hook_name, $entity_type, $return_value, $parameters) {\n \n set_input('subject', $parameters['subject']);\n set_input('body', $parameters['message']);\n set_input('recipient_guid', $parameters['guid']);\n\n // Set action\n set_input('action', 'messages/send');\n\n // Perform the action\n action(\"messages/send\");\n });\n }", "public function ajax_reply() {\n\t\t$action = $_POST['bbp_reply_form_action'];\n\t\tif ( 'bbp-new-reply' == $action ) {\n\t\t\tbbp_new_reply_handler( $action );\n\t\t} elseif ( 'bbp-edit-reply' == $action ) {\n\t\t\tbbp_edit_reply_handler( $action );\n\t\t}\n\t}", "function mpc_html_form_code() {\n echo '<form action=\"' .esc_url( $_SERVER['REQUEST_URI'] ) . '\" method=\"post\">';\n echo '<p>';\n echo 'Il tuo Nome <br>';\n echo '<input type=\"text\" name=\"mpc-name\" pattern=\"[a-zA-Z0-9]+\" value=\"' . ( isset($_POST[\"mpc-name\"]) ? esc_attr( $_POST[\"mpc-name\"]) : '' ) . '\" size=40></p>';\n echo '<p>La tua email <br>';\n echo '<input type=\"email\" name=\"mpc-email\" value=\"' . ( isset($_POST[\"mpc-email\"]) ? esc_attr( $_POST[\"mpc-email\"]) : '' ) . '\" size=40></p>';\n echo 'Oggetto <br/>';\n\techo '<input type=\"text\" name=\"mpc-subject\" pattern=\"[a-zA-Z ]+\" value=\"' . ( isset( $_POST[\"mpc-subject\"] ) ? esc_attr( $_POST[\"mpc-subject\"] ) : '' ) . '\" size=\"40\" />';\n\techo '</p>';\n\techo '<p>Il tuo messaggio <br/>';\n\techo '<textarea rows=\"10\" cols=\"35\" name=\"mpc-message\">' . ( isset( $_POST[\"mpc-message\"] ) ? esc_attr( $_POST[\"mpc-message\"] ) : '' ) . '</textarea>';\n\techo '</p>';\n\techo '<p><input type=\"submit\" name=\"mpc-submitted\" value=\"Invia\"></p>';\n\techo '</form>';\n}", "function simplenews_admin_newsletter_delete($form, &$form_state, $newsletter) {\n // Store some newsletter values for submit handling.\n $form = array();\n $form['newsletter_id'] = array('#type' => 'value', '#value' => $newsletter->newsletter_id);\n $form['name'] = array('#type' => 'value', '#value' => $newsletter->name);\n\n $form['notice'] = array(\n '#markup' => '<p><strong>' . t('Note: All subscriptions associated with this newsletter will be lost.') . '</strong></p>',\n );\n\n return confirm_form($form, t('Are you sure you want to delete the newsletter %name?', array('%name' => $newsletter->name)), 'admin/config/services/simplenews', t('This action cannot be undone.'), t('Delete'), t('Cancel')\n );\n}", "public function subscribe()\n\t{\n\n\t\t\t$this->data['user'] = $this->subscriber_m->get_new();\t\t\n\t\t//setup the form\n\t\t$rules=$this->subscriber_m->_rules_page;\n\t\t$this->form_validation->set_rules($rules);\n\t\t\n\t\t//process the form \n\t\tif($this->form_validation->run() == TRUE)\n\t\t{\n\t\t\t$data = $this->subscriber_m->array_from_post(array('semail'));\n\t\t\t$this->subscriber_m->save($data);\n//\t\t\tredirect('/');\n\t\t\t\n\t\t}\n\t\t//load SUBSCRIBER view\n\t\t$this->load->view('sidebar',$this->data);\n\t}", "public function changeSubmitBox()\n {\n $post = WordPress::getPost();\n\n if ($post->post_type == 'lbwp-nl') {\n // Check if the newsletters sent flag needs to be reset\n $this->checkSendReset($post);\n\n // Check if the hourly cron must be executed immediately\n $this->checkSendImmediately($post);\n\n // Get the newsletter (whose data ight be altered previously)\n $newsletter = $this->getNewsletter($post->ID);\n\n // If the newsletter is already sent, add some css/js do alter the box\n if ($newsletter->sent == 1) {\n echo '\n <script type=\"text/javascript\">\n jQuery(function() {\n jQuery(\"#submitpost a\").remove();\n jQuery(\"#major-publishing-actions\").remove();\n // Create info\n var info = jQuery(\"<div/>\");\n info.addClass(\"misc-pub-section\");\n info.css(\"font-weight\", \"bold\");\n info.text(\"Der Newsletter wurde bereits an den Dienst gesendet und eingeplant.\");\n var link = jQuery(\"<div/>\");\n link.addClass(\"misc-pub-section\");\n link.html(\\'<a href=\"\\' + document.location.href + \\'&resetSent\">Zurücksetzen und erneut einplanen</a>\\');\n jQuery(\"#misc-publishing-actions\").after(link).after(info);\n });\n </script>\n ';\n }\n }\n }", "public function process()\n\t{\n\t\t$aValidation = array(\n\t\t\t'message' => Phpfox::getPhrase('mail.add_reply')\n\t\t);\t\t\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\t\t\t\t\n\t\n\t\t$aMail = Phpfox::getService('mail')->getMail($this->request()->getInt('id'));\t\n\t\t\n\t\tif (!isset($aMail['mail_id']))\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.invalid_message'));\n\t\t}\n\t\t\n\t\t$bCanView = false;\n\t\tif (($aMail['viewer_user_id'] == Phpfox::getUserId()) || ($aMail['owner_user_id'] == Phpfox::getUserId()))\n\t\t{\n\t\t\t$bCanView = true;\t\t\t\n\t\t}\n\t\t\n\t\tif ($bCanView === false)\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.invalid_message'));\n\t\t}\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\n\t\t\t\t$aVals['to'] = $aMail['owner_user_id'];\n\t\t\t\t\n\t\t\t\tif (($iNewId = Phpfox::getService('mail.process')->add($aVals)))\n\t\t\t\t{\n\t\t\t\t\t$this->url()->send('mail.view', array('id' => $iNewId));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tif ($aMail['viewer_user_id'] == Phpfox::getUserId())\n\t\t{\n\t\t\tPhpfox::getService('mail.process')->toggleView($aMail['mail_id'], false);\n\t\t}\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\n\t\t\t\t'aMail' => $aMail\n\t\t\t)\n\t\t);\n\t}" ]
[ "0.727666", "0.67628634", "0.667265", "0.64187956", "0.64120746", "0.6406954", "0.6321864", "0.62122965", "0.6210184", "0.61502266", "0.6147232", "0.6138065", "0.6117792", "0.61030376", "0.60886616", "0.6085357", "0.60726976", "0.60506487", "0.6049155", "0.60348487", "0.6030484", "0.60302985", "0.6015287", "0.6004144", "0.5929926", "0.59098536", "0.5891152", "0.5863723", "0.582285", "0.5817239", "0.57945913", "0.57331103", "0.5727862", "0.57276887", "0.57246554", "0.5724335", "0.5722151", "0.56979865", "0.5692451", "0.56861025", "0.5683197", "0.5675481", "0.56689215", "0.56656206", "0.5663123", "0.56622857", "0.564973", "0.5645307", "0.5634461", "0.56038064", "0.56003654", "0.55984324", "0.5589525", "0.5559366", "0.5557405", "0.5549137", "0.5542478", "0.55202144", "0.5517438", "0.5510463", "0.5507226", "0.55067164", "0.55047756", "0.55023086", "0.5500729", "0.5496586", "0.5492157", "0.5488158", "0.54868424", "0.5486769", "0.54825485", "0.54793173", "0.54734105", "0.545953", "0.5454443", "0.5447215", "0.5440793", "0.5438341", "0.54337764", "0.5429997", "0.54294026", "0.54182345", "0.5415945", "0.5410942", "0.5410855", "0.54083014", "0.54029936", "0.5402324", "0.54016614", "0.53997177", "0.53916943", "0.53865117", "0.5383478", "0.5378813", "0.53694427", "0.5367038", "0.5364486", "0.5362304", "0.53601164", "0.53455746" ]
0.669795
2
Retrieves the note object with required associated entities to populate the table and back links
private function getNote($noteId) { return $this->restClient->get( 'note/' . $noteId, 'Note', ['notes', 'client', 'client-users', 'current-report', 'report-id', 'note-client', 'user'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function note()\n {\n return $this->hasOne('App\\Note');\n }", "public function getNotes();", "public function getNote();", "public function show(Note $note)\n {\n $note->load('card');\n $note->load('user');\n return $note;\n }", "public function getNote()\n {\n return $this->table->note;\n }", "function getNote()\n {\n return $this->note;\n }", "function get_notes($course)\n{\n return $course->notes;\n}", "public function noteAction() {\n\tif($this->_getParam('id',false)) {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonDetails($this->_getParam('id'));\n\t} else {\n throw new Pas_Exception_Param($this->_missingParameter);\n\t}\n\t}", "public function index()\n {\n $note = Note::all();\n }", "public function notes()\n {\n return $this->hasMany(\"App\\Note\");\n }", "public function actionLoadNotes()\r\n\t{\n\t\tif(isset($_POST['id'])) {\n\t\t\t$employee_id = $_POST['id'];\n\t\t\t$model = $this->loadModel($employee_id, Yii::app()->user->id);\r\n\t\t\techo $model->note;\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\techo 'no data';\r\n\t}", "function getNote() {\n return $this->note;\n }", "public function Get($uuid=false) {\n // If no uuid provided then use the stored one\n if (!$uuid) { $uuid = $this->store_note['uuid']; }\n // If still no uuid\n if (!$uuid) { return $this; }\n // Create the database table\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entry_notes_table = $this->Get_Notes_Table(); \n // Check for an existing record\n $note = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM $entry_notes_table WHERE uuid = %s\",$uuid));\n // If no entry was found\n if (!$entry) { return; }\n // Populate the entry data\n $this->store_note = array(\n 'id' => $note->id,\n 'uuid' => $note->uuid,\n 'entry_uuid' => $note->entry_uuid,\n 'form_uuid' => $note->form_uuid,\n 'note_data' => $note->note_data,\n 'time_created' => $note->time_created,\n 'time_modified' => $note->time_modified,\n 'date_created' => $note->date_created,\n 'date_modifed' => $note->date_modifed,\n );\n // Return for chaining\n return $this;\n }", "function findNoteById($id);", "public function show()\n {\n //\n $id=$_POST['id'];\n $note=DB::table('notes')->where('note_id',$id)->get();\n return $note;\n }", "public function index()\n {\n $notes = request()->user()->notes()->paginate(20);\n return NoteResource::collection($notes)->additional([\n 'message' => \"Notes retrieved successfully\",\n 'status' => \"success\"\n ]);\n }", "public function getNote()\r\n {\r\n return $this->note;\r\n }", "public function getResponseNotes();", "public static function retrieveAllNotes() {\n return R::getAll('SELECT * FROM note');\n }", "public function notesAction() {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonsList();\n\t}", "function getNoteList()\n {\n $stmt = \"SELECT\n cno_id,\n cno_prj_id,\n cno_customer_id,\n cno_note\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"customer_note\n ORDER BY\n cno_customer_id ASC\";\n $res = DB_Helper::getInstance()->getAll($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return array();\n } else {\n for ($i = 0; $i < count($res); $i++) {\n $res[$i]['customer_title'] = self::getTitle($res[$i]['cno_prj_id'], $res[$i]['cno_customer_id']);\n }\n return $res;\n }\n }", "function getNotes(){\n\n\n\t\theader('Content-Type: application/json');\n\t\t\n\t\t$id = $_GET['id'];\n\t\t$r = new RESPONSE(0);\n\n\t\t//make sure id is present\n\t\tif ($id == \"\" || $id < 1){\n\t\t\t$r->message = \"No data.\";\n\t\t\techo $r->toJSON();\t\n\t\t\treturn false;\n\t\t}\n\n\t\t//create the db\n\t\t$database = createDb();\t\t\n\n\n\n\t\t//get the admin notes\n\t\t$datas = $database->select(\"Note\", \"*\", [\n\t\t\t\"MainContactId\" => $id \n\t\t]);\n\n\n\t\t//parse and format response\n\t\tif( count($datas) > 0){\n\n\t\t\t$r->html .= '<tbody>';\t\n\n\t\t\t foreach ($datas as $row) {\n\t\t\t\t \t\t\t\t\t\t // process the notes\n\t\t\t\t $notes = $row[\"Notes\"];\n\t\t\t\t \n\t\t\t\t if ($notes != \"\"){\n\t\t\t\t\t$r->html .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $row[\"DateTimeEntered\"], $notes);\t \n\t\t\t\t }\n\n\t\t\t }\n\n\n\n\t\t\t$r->html .= '</tbody>';\t\n\t\t\t$r->status = 1;\n\n\t\t}\n\n\t\t//the response\n\t\techo $r->toJSON();\t\n\n\t}", "public function get_notes() {\n return YITH_WCBK()->notes->get_booking_notes( $this->id );\n }", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user); \n }", "public function note() { return $this->_m_note; }", "function getFromPost()\r\n {\r\n $CI = &get_instance();\r\n $note = new Note;\r\n //correct form?\r\n if ($CI->input->post('formname')!='note') {\r\n return null;\r\n }\r\n //get basic data\r\n $note->note_id = $CI->input->post('note_id');\r\n $note->text = $CI->input->post('text');\r\n $note->pub_id = $CI->input->post('pub_id');\r\n $note->user_id = $CI->input->post('user_id');\r\n\r\n return $note;\r\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user);\n }", "private function get_notes()\n\t{\n\t\t$notes = $this->api->search( Options::get('simplenote__search') );\n\t\t\t\t\n\t\treturn $notes;\n\t}", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "public function index()\n {\n return NoteResource::collection(Note::mine()->get());\n }", "public function show(ShowNoteRequest $request, Note $note): NoteResource\n {\n return new NoteResource($note->pimp()->findOrFail($note->id));\n }", "function getNotes() {\n\t\treturn $this->_Notes;\n\t}", "public function index()\n {\n return Notes::all();\n }", "function getNotes() {\n\t\treturn $this->notes;\n\t}", "public function index()\n {\n return Note::all();\n }", "public function notes()\n {\n return $this->morphedByMany('App\\Note', 'taggable');\n }", "function return_notes()\n {\n $data = array();\n $query = $this->pdo->prepare('SELECT * FROM note');\n $query->execute();\n $posts = $query->fetchAll();\n $html = '';\n foreach ($posts as $value) \n {\n $html .= \"<div class='single-note'><div class='note-title'>\".$value['title'].\n \" <img class='delete' id='\".$value['id'].\"' src='img/delete.gif' alt='delete'></div><div class='note-text' id=\".$value['id'].\">\".$value['description'].\"</div></div>\";\n }\n $data['html'] = $html;\n return($data);\n }", "public static function getAllNote() : array {\r\n global $config;\r\n $con = new Sql($config[\"host\"], $config[\"database\"], $config[\"username\"], $config[\"password\"]);\r\n $noteGateway = new NoteGateway($con);\r\n return $noteGateway->findAll();\r\n }", "public function note(){\n \n return $this->morphOne(Note::class,'notable');\n \n }", "public function getContentNote() {\n $fields = array(\n 'contentNote' => array('contentNoteDescription', 'contentNoteElement')\n );\n $result = TingOpenformatMethods::parseFields($this->_getContent(), $fields);\n return $result;\n }", "public function note()\n {\n return $this->morphOne(config('notes.notes.model'), 'noteable');\n }", "public function getCustomerNote();", "public function notes()\n {\n return $this->hasMany('Synthesise\\Note', 'user_id');\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function getNote($id)\n\t{\n\t\treturn $this->getResourceChildObject('notes', $id);\n\t}", "function getId_note() {\r\n\t\treturn $this->id_note;\r\n\t}", "public function index() {\n\t\t$this->DeliveryNote->recursive = 0;\n\t\t$this->set('deliveryNotes', $this->paginate()); \n\t}", "function getPatientNote($appointmentRecord)\n{\n // only show dentist note, viewing details like crown and carries requires clicking edit\n // then viewing notes edit page with all data filled in\n if (!isset($appointmentRecord['ProgressNotes'])) {\n return null;\n }\n $progressNotes = $appointmentRecord['ProgressNotes'];\n if (!is_array($progressNotes)) {\n return null;\n }\n\n $date = getDefaultDate();\n if (isset($appointmentRecord['AppointmentDate'])) {\n if (dateIsCorrupted($appointmentRecord['AppointmentDate'])) {\n $appointmentRecord['AppointmentDate'] = $date; // set to default\n } else { // otherwise\n $date = $appointmentRecord['AppointmentDate'];\n }\n }\n // set supported date format for date input(yyyy-mm-dd)\n $appointmentRecord['AppointmentDate'] = getNiceDate($date, 'Y-m-d');\n\n // set value for date column to format Dec 31, 2021\n $date = getNiceDate($date);\n $appointmentRecord['Date'] = $date;\n $appointmentRecord['ProgressNotes'] = $progressNotes;\n $appointmentRecord['Note'] = isset($progressNotes['Note']) ? $progressNotes['Note'] : 'edit to add notes';\n return $appointmentRecord;\n /* use commented array if keys in appointment record are not similar to keys required\n by calling method\n * [\n 'PatientName' => $appointmentRecord['PatientName'],\n 'DentistName' => $appointmentRecord['DentistName'],\n 'PatientNo' => $appointmentRecord['PatientNo'],\n 'FileNumber' => $appointmentRecord['FileNumber'],\n 'DOB' => $appointmentRecord['DOB'],\n 'Date' => $date,\n 'Note' => $progressNotes['Note'],\n 'AppointmentDate' => $appointmentRecord['AppointmentDate'],\n 'FirebaseId' => $appointmentRecord['FirebaseId'],\n 'ProgressNotes' => $progressNotes,\n ]*/\n}", "function getFromRow($R)\r\n {\r\n $CI = &get_instance();\r\n $userlogin = getUserLogin();\r\n \r\n $note = new Note;\r\n foreach ($R as $key => $value)\r\n {\r\n $note->$key = $value;\r\n }\r\n //check rights; if fail: return null\r\n if ( !$userlogin->hasRights('note_read') || !$CI->accesslevels_lib->canReadObject($note))return null;\r\n \r\n //read the crossref_ids as they were cached in the database\r\n $CI->db->select('xref_id');\r\n $Q = $CI->db->get_where('notecrossrefid',array('note_id'=>$note->note_id));\r\n \tforeach ($Q->result() as $R) {\r\n $note->xref_ids[] = $R->xref_id;\r\n \t} \r\n return $note;\r\n }", "function findNotesByUser(UserInterface $user);", "function getByID($note_id)\r\n {\r\n $CI = &get_instance();\r\n $Q = $CI->db->get_where('notes', array('note_id' => $note_id));\r\n if ($Q->num_rows() > 0)\r\n {\r\n return $this->getFromRow($Q->row());\r\n } else {\r\n return null;\r\n }\r\n }", "public function index()\n {\n return Note::orderBy('created_at', 'desc')->get();\n }", "public function show(Note $note)\n {\n return response()->succees('Note successfully retrieved', $note);\n }", "public function index()\n {\n return TecnicNote::all();\n }", "public function getNote($note_id, $db)\r\n {\r\n $sql = \"SELECT * FROM notes\r\n WHERE id=:note_id\";\r\n $pst = $db->prepare($sql);\r\n $pst->bindParam(':note_id', $note_id);\r\n $pst->execute();\r\n $n = $pst-> fetch(PDO::FETCH_OBJ);\r\n return $n;\r\n }", "public function show(Note $note)\n {\n \treturn response()->json([\n \t\t'MESSAGE' => $note], 200\n\t\t);\n }", "function read()\n\t{\n\t\tglobal $ilias, $ilDB;\n\n\t\t$q = \"SELECT * FROM bookmark_data WHERE obj_id = \".\n\t\t\t$ilDB->quote($this->getId(), \"integer\");\n\t\t$bm_set = $ilDB->query($q);\n\t\tif ($ilDB->numRows($bm_set) == 0)\n\t\t{\n\t\t\t$message = \"ilBookmark::read(): Bookmark with id \".$this->id.\" not found!\";\n\t\t\t$ilias->raiseError($message,$ilias->error_obj->WARNING);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bm = $ilDB->fetchAssoc($bm_set);\n\t\t\t$this->setTitle($bm[\"title\"]);\n\t\t\t$this->setDescription($bm[\"description\"]);\n\t\t\t$this->setTarget($bm[\"target\"]);\n\t\t\t$this->setParent($this->tree->getParentId($this->id));\n\t\t}\n\t}", "public function get_user_notes(){\n $user_id = (int) $_COOKIE['user_id'];\n $sql = 'SELECT * from '. static::$table_name .' AS N JOIN notes_subject AS S';\n $sql .=' ON N.user_id =' .\"'\". self::$database->escape_string($user_id) .\"'\";\n $sql .= ' AND N.user_id = S.user_id AND N.note_id = S.note_id JOIN notes_tag AS T ON N.user_id = T.user_id AND N.note_id = T.note_id';\n\n return static::find_by_sql($sql);\n }", "public function getRelationshipNotes()\n {\n return $this->getFieldArray('580');\n }", "public static function get_notes( $context = 'edit', $args = array() ) {\n\t\t$data_store = \\WC_Data_Store::load( 'admin-note' );\n\t\t$raw_notes = $data_store->get_notes( $args );\n\t\t$notes = array();\n\t\tforeach ( (array) $raw_notes as $raw_note ) {\n\t\t\t$note = new WC_Admin_Note( $raw_note );\n\t\t\t$note_id = $note->get_id();\n\t\t\t$notes[ $note_id ] = $note->get_data();\n\t\t\t$notes[ $note_id ]['name'] = $note->get_name( $context );\n\t\t\t$notes[ $note_id ]['type'] = $note->get_type( $context );\n\t\t\t$notes[ $note_id ]['locale'] = $note->get_locale( $context );\n\t\t\t$notes[ $note_id ]['title'] = $note->get_title( $context );\n\t\t\t$notes[ $note_id ]['content'] = $note->get_content( $context );\n\t\t\t$notes[ $note_id ]['icon'] = $note->get_icon( $context );\n\t\t\t$notes[ $note_id ]['content_data'] = $note->get_content_data( $context );\n\t\t\t$notes[ $note_id ]['status'] = $note->get_status( $context );\n\t\t\t$notes[ $note_id ]['source'] = $note->get_source( $context );\n\t\t\t$notes[ $note_id ]['date_created'] = $note->get_date_created( $context );\n\t\t\t$notes[ $note_id ]['date_reminder'] = $note->get_date_reminder( $context );\n\t\t\t$notes[ $note_id ]['actions'] = $note->get_actions( $context );\n\t\t}\n\t\treturn $notes;\n\t}", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes(ParameterMap $paramInstance=null, HeaderMap $headerInstance=null)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\t$handlerInstance->setParam($paramInstance); \n\t\t$handlerInstance->setHeader($headerInstance); \n\t\treturn $handlerInstance->apiCall(ResponseHandler::class, 'application/json'); \n\n\t}", "public function show(Note $note)\n {\n if (! $note->isMine) {\n abort(403);\n }\n\n return new NoteResource($note);\n }", "public function getExplanatoryNotes() {\n $entries = Explanatorynote::all();\n return response()->json($entries);\n }", "function __editNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //get the note\n $this->__viewNotes();\n\n //visibility\n $this->data['visible']['wi_my_note_edit'] = 1;\n $this->data['visible']['wi_my_note_view'] = 0;\n\n }", "protected function _addNotes()\n\t{\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\treturn Admin_Form_Entity::factory('Script')\n\t\t\t->value(\"$(function (){\n\t\t\t\t$.adminLoad({ path: '/admin/crm/project/note/index.php', additionalParams: 'crm_project_id=\" . $this->_object->id . \"', windowId: '{$windowId}_notes' });\n\t\t\t});\");\n\t}", "public function actionCreate()\n {\n $model = new HerbNote();\n\n if($model->load(\\Yii::$app->request->getBodyParams(), '') && $model->save()) {\n\n Activity::store(HerbNote::ITEM_TYPE, $model->id, Actions::CREATE);\n\n $model->refresh();\n\n \\Yii::$app->response->statusCode = Http::CREATED;\n\n return $model;\n }\n\n return $this->sendValidationResult($model);\n }", "public function getNotes()\n {\n if (array_key_exists(\"notes\", $this->_propDict)) {\n return $this->_propDict[\"notes\"];\n } else {\n return null;\n }\n }", "public function getNotes()\n {\n if (array_key_exists(\"notes\", $this->_propDict)) {\n return $this->_propDict[\"notes\"];\n } else {\n return null;\n }\n }", "public function getInternalNote() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->internalNote;\r\n\t}", "public function displayNotes($begDate, $endDate, $getNotes) {\r\n\r\nif(isset($getNotes)) { \r\n\r\n $output = \"\";\r\n\r\n $pdo = new PdoMethods();\r\n \r\n $begTimestamp = strtotime($begDate);\r\n $endTimestamp = strtotime($endDate);\r\n\r\n $sql = \"SELECT * FROM date_plus_note WHERE date BETWEEN '$begTimestamp' AND '$endTimestamp' ORDER BY date DESC\";\r\n\r\n $records = $pdo->selectNotBinded($sql);\r\n\r\n if($records) { \r\n \r\n $output = \"<style>\r\n table {\r\n border-collapse: collapse;\r\n border-spacing: 0;\r\n width: 100%;\r\n border: 1px solid #ddd;\r\n }\r\n \r\n th, td {\r\n text-align: left;\r\n padding: 16px;\r\n }\r\n \r\n tr:nth-child(even) {\r\n background-color: #f2f2f2\r\n }\r\n </style>\";\r\n\r\n $output .= \"<table border='1'>\";\r\n $output .= \"<tr><th>Date and Time</th><th>Note</th></tr>\";\r\n \r\n foreach($records as $row) {\r\n $convertedDate = date(\"j/d/Y h:i A\", $row['date']);\r\n $output .= \"<tr><td>\" . $convertedDate . \"</td><td>\" . $row['note'] . \"</td></tr>\";\r\n }\r\n\r\n $output .= \"</table>\";\r\n\r\n } else {\r\n $output = \"No notes found for the date range selected\";\r\n } \r\n \r\n return $output;\r\n\r\n }\r\n\r\n\r\n}", "public function getNote(string $id, ParameterMap $paramInstance=null, HeaderMap $headerInstance=null)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes/'); \n\t\t$apiPath=$apiPath.(strval($id)); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\t$handlerInstance->setParam($paramInstance); \n\t\t$handlerInstance->setHeader($headerInstance); \n\t\treturn $handlerInstance->apiCall(ResponseHandler::class, 'application/json'); \n\n\t}", "public function getCustomerNoteNotify();", "public function getDescriptionNote() {\n $elements = $this->_getDetails();\n $display_version = variable_get('ting_search_openformat', 'bibliotekdkWorkDisplay');\n if ($display_version === 'bibliotekdkWorkDisplay') {\n $fields = array(\n 'descriptionNoteLink' => array(\n 'descriptionNoteLink' => 'descriptionNoteLinkElement'\n ),\n );\n } else {\n $fields = array('descriptionNote');\n }\n $result = TingOpenformatMethods::parseFields($elements, $fields);\n return (is_array($result)) ? reset($result) : $result;\n }", "public function Add_Note($data) {\n // Populate the entry data\n $this->store_note = array(\n 'uuid' => isset($data['uuid']) ? $data['uuid'] : uniqid(),\n 'entry_uuid' => $data['entry_uuid'],\n 'form_uuid' => $data['form_uuid'],\n 'note_data' => $data['note_data'],\n 'time_created' => isset($data['time_created']) ? $data['time_created'] : time(),\n 'time_modified' => isset($data['time_modified']) ? $data['time_modified'] : time(),\n 'date_created' => isset($data['date_created']) ? $data['date_created'] : date(\"Y-m-d H:i:s\"),\n 'date_modifed' => isset($data['date_modifed']) ? $data['date_modifed'] : date(\"Y-m-d H:i:s\"),\n );\n // Return for chaining\n return $this;\n }", "public function getNote($id)\n {\n return Laranote::where('model', get_class($this))\n ->where('model_id', $this->id)\n ->where('id', $id)\n ->first();\n }", "function Reference($id)\n {\n \n global $MAIN_TABLE;\n global $NOTES_TABLE;\n\n $q = \"SELECT * FROM `$MAIN_TABLE` WHERE id=$id;\";\n $rows = dbSelect($q, 'Reference()');\n $row = $rows[0];\n $this->id = $id;\n $this->year = $row[1];\n $this->title = $row[3];\n $this->author = $row[2];\n $this->keywords = $row[4];\n $this->html = $row[5];\n $this->bibtex = $row[6];\n\n $q = \"SELECT * FROM `$NOTES_TABLE` WHERE refid=$id ORDER BY timestamp;\";\n $rows = dbSelect($q, 'Bug()');\n $this->notes = array();\n foreach ($rows as $row) {\n $this->notes[] = new Note($row);\n }\n }", "public function model()\n {\n return Note::class;\n }", "public function add_note()\n {\n\n $cols = \"`desc`\";\n\n $value =\n \" '\" . $this->obj->all_data->notes->get_desc() . \"' \";\n\n\n $insert = $this->obj->insert(\"notes\", $cols, $value);\n return $insert;\n }", "private function prepareProductNotes(): void\n {\n $this->_entityBehaviors['catalog_product']['notes'] =\n [\n Import::BEHAVIOR_APPEND => new Phrase('New product data is added to the existing product data for'\n . ' the existing entries in the database. All fields except sku can be updated.'),\n Import::BEHAVIOR_REPLACE => new Phrase('The existing product data is replaced with new data.'\n . ' <b>Exercise caution when replacing data because the existing product data will be completely'\n . ' cleared and all references in the system will be lost.</b>'),\n Import::BEHAVIOR_DELETE => new Phrase('Any entities in the import data that already exist in the'\n . ' database are deleted from the database.'),\n ];\n }", "public function GetNote(\\Grafeas\\V1beta1\\GetNoteRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/grafeas.v1beta1.GrafeasV1Beta1/GetNote',\n $argument,\n ['\\Grafeas\\V1beta1\\Note', 'decode'],\n $metadata, $options);\n }" ]
[ "0.64464825", "0.6199639", "0.607955", "0.59363973", "0.58607846", "0.5842101", "0.58379894", "0.5822413", "0.58024", "0.57963854", "0.5746308", "0.57230115", "0.56952125", "0.5677816", "0.56392133", "0.56387514", "0.55995524", "0.5586624", "0.5586604", "0.55766606", "0.55692977", "0.5567273", "0.55513453", "0.5544791", "0.55432504", "0.5541099", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.5523177", "0.55155843", "0.551453", "0.5500705", "0.5487301", "0.5450652", "0.5434953", "0.5424665", "0.5392448", "0.53914386", "0.53871095", "0.538542", "0.5384314", "0.5351811", "0.5341252", "0.53395027", "0.5334862", "0.53337973", "0.53313273", "0.53313273", "0.53313273", "0.53313273", "0.53313273", "0.53226715", "0.52885306", "0.5288286", "0.528737", "0.52599066", "0.5258306", "0.52494985", "0.5247785", "0.5232042", "0.522744", "0.5209721", "0.5205091", "0.5202109", "0.5196257", "0.5190316", "0.5175715", "0.51627946", "0.51627946", "0.51627946", "0.51627946", "0.51627946", "0.51535016", "0.5152372", "0.51471484", "0.5141098", "0.5134998", "0.5132325", "0.51255757", "0.51255757", "0.5123603", "0.510848", "0.5093657", "0.5089446", "0.50893", "0.5089069", "0.50850505", "0.5076056", "0.50755936", "0.5071123", "0.505857", "0.5054782" ]
0.52841705
63
compruebo si existe la variable
public function eliminar() { if (isset ($_REQUEST['id'])){ $id=$_REQUEST['id']; $miConexion=HelperDatos::obtenerConexion(); $resultado=$miConexion->query("call eliminar_rubro($id)"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has(string $variable): bool;", "public function has(string $variableName): bool;", "public static function exists($_name) {\n\t\tif (!$_name) {\n\t\t\ttrigger_error(self::TEXT_Variable);\n\t\t\treturn array(FALSE,NULL);\n\t\t}\n\t\t$_var=&self::ref(self::resolve($_name));\n\t\treturn isset($_var);\n\t}", "function existeLetra(/*>>> Completar parámetros <<<*/ ){\n \n /*>>> Completar cuerpo de la función <<<*/\n\n}", "public function isVariableCualitativa(){ return false; }", "function in_vars($name){ // check the template variable\n\treturn array_key_exists($name, $this->vars);\n}", "function variable_check($var) {\n\t\t\n\t\t// is variable set?\n\n\t\tif (isset($var)) {\n\t\t\treturn \"$var is set \\n\";\n\t\t}\n\t\t\n\t\telseif (empty($var)) {\n\t\t\treturn \"$var is not set \\n\";\n\t\t}\n\t\n\n}", "function exists( &$variable )\n{\n\treturn ( isset( $variable ) && !empty( $variable ) );\n}", "function checarLexicoExistente($projeto, $nome) {\r\n //test if the variable is not null\r\n assert($projeto != NULL);\r\n assert($nome != NULL);\r\n //test if a variable has the correct type\r\n assert(is_string($projeto));\r\n assert(is_string($nome));\r\n\r\n $naoexiste = false;\r\n\r\n $r = bd_connect() or die(\"Erro ao conectar ao SGBD<br>\" . mysql_error() . \"<br>\" . __FILE__ . __LINE__);\r\n $q = \"SELECT * FROM lexico WHERE id_projeto = $projeto AND nome = '$nome' \";\r\n //test if the variable is not null\r\n assert($q != NULL);\r\n $qr = mysql_query($q) or die(\"Erro ao enviar a query de select no lexico<br>\" . mysql_error() . \"<br>\" . __FILE__ . __LINE__);\r\n //test if the variable is not null\r\n assert($qr != NULL);\r\n $resultArray = mysql_fetch_array($qr);\r\n if ($resultArray == false) {\r\n $naoexiste = true;\r\n } else {\r\n //nothing to do\r\n }\r\n\r\n $q = \"SELECT * FROM sinonimo WHERE id_projeto = $projeto AND nome = '$nome' \";\r\n //test if the variable is not null\r\n assert($q != NULL);\r\n $qr = mysql_query($q) or die(\"Erro ao enviar a query de select no lexico<br>\" . mysql_error() . \"<br>\" . __FILE__ . __LINE__);\r\n //test if the variable is not null\r\n assert($qr != NULL);\r\n $resultArray = mysql_fetch_array($qr);\r\n\r\n if ($resultArray != false) {\r\n $naoexiste = false;\r\n } else {\r\n //nothing to do\r\n }\r\n\r\n return $naoexiste;\r\n}", "function isUnknown( $var );", "function getvar($varname){\n\t\t// for example, getvar('name') will return 'name_fr' (provided it exists and is non-empty) in a french context\n\t\t$locname = $varname.'_'.CURLANG;\n\t\t$otherlang = $varname.'_'.(CURLANG=='fr'?'de':'fr');\n\t\tif(isset($this->$locname)){\n\t\t\tif($this->$locname == '' && $this->$otherlang != ''){\n\t\t\t\t// if the current language variable is empty, return the other language's value\n\t\t\t\treturn $this->$otherlang;\n\t\t\t}else{\n\t\t\t\treturn $this->$locname;\n\t\t\t}\n\t\t}elseif(isset($this->$varname)){\n\t\t\treturn $this->$varname;\n\t\t}\n\t\treturn false;\n\t}", "function existe_ocupacion ($ocupacion){\n\t\t\t\tinclude(\"bd_conection.php\");\n\t\t\t\t$result = @mysqli_query($con, \"SELECT * FROM ocupaciones WHERE ocupacion_tipo LIKE '$ocupacion'\");\n\t\t\t\t$rowcount=mysqli_num_rows($result);\n\t\t\t\tif ($rowcount > 0){\t\n\t\t\t\t\twhile($ocupacionExist = @mysqli_fetch_assoc($result)) { \n\t\t\t\t\t\treturn $ocupacionExist['ocupacion_tipo'];\n\t\t\t\t\t}\n\t\t\t\t}else if ($ocupacion !== \"\") {\n\t\t\t\t\t@mysqli_query($con, \"INSERT INTO ocupaciones (ocupacion_tipo) VALUES ('$ocupacion')\");\t\t\t\n\t\t\t\t\treturn $ocupacion;\n\t\t\t\t}\n\t\t\t}", "function variableExists ($variableName) {\n if (!$this->templateValid) {$this->triggerError (\"Template not valid.\"); return false; }\n return $this->lookupVariableName($variableName,$varNo); }", "function is_set($variabel_cek) {\n\t if(isset($_SESSION[$variabel_cek]) && !empty($_SESSION[$variabel_cek])){return $_SESSION[$variabel_cek];}\n\t\telse {return false;}\n\t}", "function objetosDuplicados($param){\r\n\t\tswitch ($param){\r\n\t\t\tcase 1:\r\n\t\t\t\treturn \"El usuario ya existe en el sistema\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn \"El libro ya existe en el sistema\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn \"El ejemplar ya existe en el sistema\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"Error de Categoria. Sin embargo el objeto ya existe en el sistema\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function initVar(&$var){\n\t\treturn isset($var) ? $var :null;\n\t}", "function lookupVariableName ($varName, &$varNo) {\n $x =& $this->varNameToNoMap[strtoupper($varName)];\n if (!isset($x)) return false;\n $varNo = $x;\n return true; }", "function issetor(&$variable, $placeholder = ''){\n if(isset($variable)){\n return $variable;\n } else {\n return $placeholder;\n }\n}", "function does_not_exist( &$variable )\n{\n\treturn ( !isset( $variable ) || empty( $variable ) );\n}", "public function valid()\n\t{\n\t\t$key = key($this->var);\n\t\t$var = ($key !== NULL && $key !== FALSE);\n\t\techo \"valid: $var\\n\";\n\t\treturn $var;\t\n\t}", "static private function _doesExist($object) {\n $id = $object->_id;\n $type = $object->_type;\n if (!isset(self::$cache[$type])) {\n self::$cache[$type] = self::getStack($type);\n }\n if(isset(self::$cache[$type][$id])){\n return TRUE;\n }\n return FALSE;\n }", "function ifset(&$var)\n{\n\treturn isset($var) ? $var : null;\n}", "static public function has($key)\r\n {\r\n /* Let's make sure we have a valid variable name */\r\n self::validateKey($key);\r\n\r\n /* Fset::get returns null if the specified variable does not exist */\r\n $value = Fset::get(self::$values, $key);\r\n return !is_null($value);\r\n }", "function isIssetVariable($tableauPost) {\n $tableau = array();\n foreach ($tableauPost as $key => $value) {\n if (isset($tableauPost[$key])) {\n $tableau[$key] = $value;\n }\n }\n if (count($tableauPost) != count($tableau)) {\n return false;\n }\n else {\n return true;\n }\n}", "function existe($id_desig){\r\n $sql=\"select * from suplente where id_desig_suplente=$id_desig\";\r\n $res=toba::db('designa')->consultar($sql);\r\n \r\n if(count($res)>0){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public function isVar(){\n return $this->var;\n }", "function buscar() //funcion para ver si el registro existe \n\t{\n\t$sql=\"select * from slc_unid_medida where nomenc_unid_medida= '$this->abr' and desc_unid_medida= '$this->des'\"; \n\t $result=mysql_query($sql,$this->conexion);\n\t $n=mysql_num_rows($result);\n\t if($n==0)\n\t\t\t return 'false';\n\t\t\telse\n\t\t\t return 'true';\n\t}", "public function baja($param){\n $resp = false;\n if ($this->seteadosCamposClaves($param)){\n $elObjtinscripcion = $this->cargarObjetoConClave($param);\n if ($elObjtinscripcion!=null and $elObjtinscripcion->eliminar()){\n $resp = true;\n }\n }\n return $resp;\n }", "function checkRegister($data_label = \"\")\n\t{\n\t\tif(\"\" == $data_label)\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(shm_has_var($data_label))\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "function Remove($var='') {\n\t\tif ($var == '') return false;\n\t\tunset($this->_ExternalVars[$var]);\n\t\treturn true;\n\t}", "public function hasVariables() {\n return $this->_has(1);\n }", "public function __isset($name){\n return !empty($this->vars[$name]);\n }", "function make_lang_var()\n\t{\n\t\t// Pfad einbinden\n\t\tglobal $pfad;\n\n\t\t// Backend Sprache\n\t}", "function exist()\n{\n $STK = $_POST[\"TKDen\"];\n $temp = new TKNganHang();\n if ($temp->exists($STK))\n echo 1;\n else echo 0;\n\n}", "function exists($var)\n\t{\n\t\treturn isset($var) && !empty($var);\n\t}", "public function hasVariableLabel() {\n return $this->_has(8);\n }", "public function isVariableTexto(){ return false; }", "private static function registrar( $var, $valor ) {\n\t\tdefine( $var, $valor ) or die( \"Nao foi possivel registrar {$var}\");\n\t}", "public function hasVariableType() {\n return $this->_has(4);\n }", "public function hasVariableType() {\n return $this->_has(4);\n }", "function esPublicidad ($publicacion) {\n // Verifico si es una publicidad\n if ($publicacion == \"publicidad\") {\n $publicidad = true;\n } else {\n $publicidad = false;\n }\n return $publicidad;\n}", "function exists($id)\n{\n\tif ($id && file_exists('datas/data')){\n\t\t$file = unserialize(file_get_contents('datas/data'));\n\t\tforeach ($file as $value){\n\t\t\tif(trim($value['nom']) === trim($id))\n\t\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}", "function __isset($name) {\n $empty = empty($this->_vars[$name]);\n return ! $empty;\n }", "function set_or_empty($a)\n{\n\tif (isset($a)) {\n\t\techo \"Variable is set\" . PHP_EOL;\n\t} else {\n\t\techo \"Variable is empty\" . PHP_EOL;\n\t}\n\treturn;\n}", "public function hasVariables() {\n return $this->_has(2);\n }", "function getVariable($nombre, $default = '') {\r\n\tif (isset($_POST[$nombre])) {\r\n\t\treturn $_POST[$nombre];\r\n\t} elseif(isset($_GET[$nombre])) {\r\n\t\treturn $_GET[$nombre];\r\n\t} else {\r\n\t\treturn $default;\r\n\t}\r\n}", "function comprobarexiste($name)\n\t\t{\n\t\t\t$mysqli=$this->conexionBD();\n\t\t\t$query=\"SELECT * FROM grupo where `NOMBRE_GRUPO` ='$name'\";\n\t\t\t$resultado=$mysqli->query($query);\n\t\t\tif(mysqli_num_rows($resultado)){\n\t\t\t\t$mysqli->close();\n\t\t\t\treturn TRUE;\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$mysqli->close();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function has($variable_key)\n {\n return shm_has_var($this->getResource(), $variable_key);\n }", "function Get($var='') {\n\t\tif ($var == '') return false;\n\t\tif (!isset($this->_ExternalVars[$var])) return false;\n\t\treturn $this->_ExternalVars[$var];\n\t}", "function getVar($id, $symbol=null, $time=null) {\n static $varCache = [];\n if (array_key_exists(($key=$id.'|'.$symbol.'|'.$time), $varCache))\n return $varCache[$key];\n\n if (!is_string($id)) throw new IllegalTypeException('Illegal type of parameter $id: '.gettype($id));\n if (isset($symbol) && !is_string($symbol)) throw new IllegalTypeException('Illegal type of parameter $symbol: '.gettype($symbol));\n if (isset($time) && !is_int($time)) throw new IllegalTypeException('Illegal type of parameter $time: '.gettype($time));\n\n $self = __FUNCTION__;\n static $dataDir;\n $dataDir = $dataDir ?: Application::getConfig()['app.dir.data'];\n\n if ($id == 'rtDirDate') { // $yyyy/$mm/$dd // lokales Pfad-Datum\n if (!$time) throw new InvalidArgumentException('Invalid parameter $time: '.$time);\n $result = gmdate('Y/m/d', $time);\n }\n else if ($id == 'rtDir') { // $dataDir/history/rosatrader/$type/$symbol/$rtDirDate // lokales Verzeichnis\n $type = RosaSymbol::dao()->getByName($symbol)->getType();\n $rtDirDate = $self('rtDirDate', null, $time);\n $result = $dataDir.'/history/rosatrader/'.$type.'/'.$symbol.'/'.$rtDirDate;\n }\n else if ($id == 'rtFile.raw') { // $rtDir/M1.bin // lokale Datei ungepackt\n $rtDir = $self('rtDir' , $symbol, $time);\n $result = $rtDir.'/M1.bin';\n }\n else if ($id == 'rtFile.compressed') { // $rtDir/M1.rar // lokale Datei gepackt\n $rtDir = $self('rtDir' , $symbol, $time);\n $result = $rtDir.'/M1.rar';\n }\n else {\n throw new InvalidArgumentException('Unknown variable identifier \"'.$id.'\"');\n }\n\n $varCache[$key] = $result;\n (sizeof($varCache) > ($maxSize=128)) && array_shift($varCache) /*&& echoPre('cache size limit of '.$maxSize.' hit')*/;\n\n return $result;\n}", "function compileExists($compile){\n\tif(file_exists(COMPILER_FOLDER.'/'.$compile.'/'.$compile.'.zip')&&file_exists(COMPILER_FOLDER.'/'.$compile.'/'.$compile.'.sql')){\n return true;\n }else{\n \treturn false;\n } \n}", "public function __isset(string $name): bool\n {\n return isset($this->variables[$name]);\n }", "function existenNotasRegistradas($matricula){\n return false;\n }", "function getVariableContainer() ;", "function maquetador_carga_modulos() {\n global $aEstado;\n if ( is_array( $aEstado[\"modulos\"]) ){\n\t foreach ( $aEstado[\"modulos\"] as $cModulo=>$nombreReal ) {\n\t if ( $nombreReal ) {\t \n\t include_once ( $nombreReal ); //se puede cargar sin if ya que es include_once\n\t $aEstado[\"modulos\"][$cModulo] = false;\n\t }\t \n\t }\t \n\t return true;\n\t } \n\t return false; \n\n}", "function get_var($value) {\n\t\tglobal $agi;\n\n\t\t$r = $agi->get_variable( $value );\n\t\tif ($r['result'] == 1) {\n\t\t\t$result = $r['data'];\n\t\t\treturn trim($result);\n\t\t}\n\t\treturn '';\n\t}", "public function __isset($name)\n {\n return $this->var_holder->has($name);\n }", "public function hasVariables() {\n return $this->_has(4);\n }", "function store_lang_exists($key)\n {\n return isset(ee()->lang->language[$key]);\n }", "public static function isSerializedVar($val)\n {\n\t\tif (!is_string($val)) return false;\n else return (strrpos($val, \"__\", 2) !== false && strrpos($val, \"__\", -2) !== false) ? true : false;\n }", "function numeroExisteSalle($numero_salle) {\n\n // récupération accés base de données\n $bd = getConnexion();\n $rqt = \"SELECT numero_salle FROM salle WHERE numero_salle = :numero_salle\";\n $stmt = $bd->prepare($rqt);\n // ajout param\n $stmt->bindParam(\":numero_salle\", $numero_salle);\n // execution requette\n $stmt->execute();\n\n // récupération resultat\n $listResult = $stmt->fetchAll();\n\n if (count($listResult) == 0) {\n return false;\n } else {\n return true;\n }\n}", "public function Exists();", "public function __isset($var) {\n\t\treturn isset($this->args[$var]);\n\t}", "function verificarExistenciaVariavel($email)\n{\n if(isset($email) && !empty($email)){\n verificarEmail($email);//Chamando a função para verificar se o e-mail está corrreto\n }else {\n echo \"Você esqueceu de preencher o email!\";\n }\n}", "public function has($name) {\n \treturn $this->view->hasVar($name);\n }", "function variable2(){\n\t\t \tglobal $a, $b, $texto;\t\t\t//Global palabra reservada para hace las variables locales.\n\t\t \t$a = $a + $b;\n\t\t }", "function __isset( $var_name ){\n\t\tif( $var_name == 'categories' ){\n\t\t\treturn !empty($this->terms);\n\t\t}\n\t\treturn !empty($this->$var_name);\n\t}", "function existeUsuario($usuario){\n\tif (hasKey(BUCKET_USUARIOS,$usuario))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function whatThat($yourVar){\n if(isset($yourVar)){\n echo 'Exist ';\n if(!empty($yourVar)){\n echo 'Something inside : ';\n if(is_dir($yourVar)){\n echo 'Folder.';\n }if(is_file($yourVar)){\n echo 'File.';\n }if(is_int($yourVar)){\n echo 'Numeric.';\n }if(is_float ($yourVar)){\n echo 'Decimal Number.';\n }if(is_string($yourVar)){\n echo 'String.';\n }if(is_object($yourVar)){\n echo 'Objet.';\n }if(is_array($yourVar)){\n echo 'Array.';\n }if(is_bool($yourVar)){\n echo 'Booléen.';\n }\n }else{\n echo 'Nothing inside.';\n }\n }else{\n echo 'Not Exist.';\n }\n}", "public function baja($param){\n $resp = false;\n if ($this->seteadosCamposClaves($param)){\n $elObjtinscripcionestadotipo = $this->cargarObjetoConClave($param);\n if ($elObjtinscripcionestadotipo!=null and $elObjtinscripcionestadotipo->eliminar()){\n $resp = true;\n }\n }\n return $resp;\n }", "public function __isset(string $name): bool\n {\n return isset(self::$variables[$name]);\n }", "function getVar($id, $symbol=null, $time=null) {\n //global $varCache;\n static $varCache = [];\n if (array_key_exists(($key=$id.'|'.$symbol.'|'.$time), $varCache))\n return $varCache[$key];\n\n if (!is_string($id)) throw new IllegalTypeException('Illegal type of parameter $id: '.getType($id));\n if (!is_null($symbol) && !is_string($symbol)) throw new IllegalTypeException('Illegal type of parameter $symbol: '.getType($symbol));\n if (!is_null($time) && !is_int($time)) throw new IllegalTypeException('Illegal type of parameter $time: '.getType($time));\n\n static $dataDirectory;\n $self = __FUNCTION__;\n\n if ($id == 'xtradeDirDate') { // $yyyy/$mm/$dd // lokales Pfad-Datum\n if (!$time) throw new InvalidArgumentException('Invalid parameter $time: '.$time);\n $result = gmDate('Y/m/d', $time);\n }\n else if ($id == 'fxiSourceDir') { // $dataDirectory/history/xtrade/$group/$symbol/$xtradeDirDate // lokales Quell-Verzeichnis\n if (!$symbol) throw new InvalidArgumentException('Invalid parameter $symbol: '.$symbol);\n if (!$dataDirectory)\n $dataDirectory = Config::getDefault()->get('app.dir.data');\n $group = XTrade::$symbols[$symbol]['group'];\n $xtradeDirDate = $self('xtradeDirDate', null, $time);\n $result = $dataDirectory.'/history/xtrade/'.$group.'/'.$symbol.'/'.$xtradeDirDate;\n }\n else if ($id == 'fxiTargetDir') { // $dataDirectory/history/xtrade/$type/$symbol/$xtradeDirDate // lokales Ziel-Verzeichnis\n if (!$symbol) throw new InvalidArgumentException('Invalid parameter $symbol: '.$symbol);\n if (!$dataDirectory)\n $dataDirectory = Config::getDefault()->get('app.dir.data');\n $group = XTrade::$symbols[$symbol]['group'];\n $xtradeDirDate = $self('xtradeDirDate', null, $time);\n $result = $dataDirectory.'/history/xtrade/'.$group.'/'.$symbol.'/'.$xtradeDirDate;\n }\n else if ($id == 'fxiSource.raw') { // $fxiSourceDir/M1.myfx // lokale Quell-Datei ungepackt\n $fxiSourceDir = $self('fxiSourceDir', $symbol, $time);\n $result = $fxiSourceDir.'/M1.myfx';\n }\n else if ($id == 'fxiSource.compressed') { // $fxiSourceDir/M1.rar // lokale Quell-Datei gepackt\n $fxiSourceDir = $self('fxiSourceDir', $symbol, $time);\n $result = $fxiSourceDir.'/M1.rar';\n }\n else if ($id == 'fxiTarget.raw') { // $fxiTargetDir/M1.myfx // lokale Ziel-Datei ungepackt\n $fxiTargetDir = $self('fxiTargetDir' , $symbol, $time);\n $result = $fxiTargetDir.'/M1.myfx';\n }\n else if ($id == 'fxiTarget.compressed') { // $fxiTargetDir/M1.rar // lokale Ziel-Datei gepackt\n $fxiTargetDir = $self('fxiTargetDir' , $symbol, $time);\n $result = $fxiTargetDir.'/M1.rar';\n }\n else {\n throw new InvalidArgumentException('Unknown variable identifier \"'.$id.'\"');\n }\n\n $varCache[$key] = $result;\n (sizeof($varCache) > ($maxSize=128)) && array_shift($varCache) /*&& echoPre('cache size limit of '.$maxSize.' hit')*/;\n\n return $result;\n}", "function comprovaCategoriaProducte($idProducte,$idCategoria){\n $conn=connexioBD();\n $existe=false;\n $sql=\"SELECT * FROM categoria_producte WHERE categoria_id='$idCategoria' and producte_id='$idProducte'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows==1){\n $existe=true;\n }\n return $existe;\n $resultado->free();\n $conn->close();\n}", "function tempty($variable)\n{\n\n\tif ($variable=='' ) return true;\n\tif (is_array($variable))\n\t{\n\t\tforeach ($variable as $subvar)\n\t\t{\n\t\t\t$result=tempty($subvar);\n\t\t\tif (!$result) break;\n\t\t}\n\t\treturn $result;\n\t}\n\telse {return false;}\n}", "public function existeParametre($nom)\n {\n return ((isset($this->parametres[$nom])) && ($this->parametres[$nom]!=\"\"));\n }", "public static function exist($key) ;", "public function __isset($name) {\n\t\treturn isset($this->_vars[$name]);\n\t}", "public function addToVariable($variable,$value){\n\n $var = $this->getSavedVariable($variable);\n\n if($var){\n $var = json_decode($var,true);\n if(is_array($var) AND !empty($var)){\n if(in_array($value,$var)){\n return false;\n } else {\n array_push($var,$value);\n }\n }\n }\n\n if(!is_array($var) OR empty($var)){\n $var = array();\n array_push($var,$value);\n }\n\n $var = json_encode($var);\n $this->saveVariable($variable,$var);\n\n }", "function guardar_lab_varias($objeto){\n\n\t\tswitch ($objeto['tipo']){\n\t\t\t\tcase \"lab_conceptos\":\n\t\t\t\t\t//echo \"Guardar switch lab_conceptos\";\n\t\t\t\t\t$sql = \"INSERT INTO\n\t\t\t\t\t\t\t\t\tprd_lab_conceptos (id_tipo, parametro, is_numeric, unidad)\n\t\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t\t(\".$objeto['tipo_concepto'] . \", '\" .$objeto['parametro']. \"',\" . $objeto['is_numeric'] . \",\" . $objeto['unidad'] . \")\";\n\t\t\t\t\tbreak;\n\t\t}\n\n\n\t\t$result =$this->insert_id($sql);\n\n\t\treturn $result;\n\n\n\t}", "function __ ($var, $rpl = null)\n{\n global $main;\n if (array_key_exists ($var, $main->template->vars_l))\n {\n if (is_array ($rpl))\n $cnt = vsprintf ($main->template->vars_l[$var], $rpl);\n else\n $cnt = $main->template->vars_l[$var];\n echo $cnt;\n }\n}", "function getUserVariable( $name, $valuekey ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as $key => $user) {\n if (strcmp($name, $user['name']) == 0 || \n strcmp($name, $user['email']) == 0 ) {\n //unset($d['users'][$key]);\n if (array_key_exists($valuekey, $d['users'][$key])) {\n \t return $d['users'][$key][$valuekey];\n } else\n\t return FALSE;\n }\n }\n return FALSE;\n }", "function existe ($aulas, $aula){\n $existe=FALSE;\n \n if(count($aulas) != 0){\n $indice=0;\n $longitud=count($aulas);\n while(($indice < $longitud) && !$existe){\n //strcmp($aulas[$indice]['id_aula'], $aula['id_aula'])==0\n $existe=($aulas[$indice]['id_aula'] == $aula['id_aula']) ? TRUE : FALSE;\n $indice += 1;\n }\n }\n return $existe;\n }", "abstract public function assertJavascriptVariableHasAValue($variable);", "function exists()\n {\n return false;\n }", "function getExistenciaSocio($socio){\n\t\t$exist\t= 0;\n\t\tif(isset($socio) ){\n\t\t\t$sql\t= \"SELECT COUNT(codigo) AS 'iExistentes' FROM socios_general WHERE codigo=$socio \";\n\t\t\t//setLog($sql);\n\t\t\t$exist\t= mifila($sql, \"iExistentes\");\n\t\t}\n\t\treturn $exist;\n\t}", "public static function extraerVariable($nombre)\r\n {\r\n if (isset($_SESSION[$nombre])) {\r\n return $_SESSION[$nombre];\r\n } else {\r\n return false;\r\n }\r\n }", "public function hasVariableResultDto() {\n return $this->_has(1);\n }", "function var_identify($arg1){\n global $token;\n $error_val = False;\n\n get_token();\n if($token->type >= tokenType::f_gf && $token->type <= tokenType::f_tf){\n upper_scan($token->data, 0);\n $arg1->addAttribute('type', 'var');\n $arg1[0] = $token->data;\n get_token();\n if($token->type === tokenType::marker){\n $arg1[0] .= $token->data;\n get_token();\n if($token->type !== tokenType::identifier){\n if(!preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n if(!is_keyword(tokenType::identifier)){\n $error_val = True;\n }\n }\n $arg1[0] .= $token->data;\n }\n else $error_val = True;\n }\n else $error_val = True;\n\n if($error_val){\n fwrite(STDERR, \"ERROR : SYNTAX : Variable <var> expected : last token: $token->data $token->type\\n\");\n exit(23);\n }\n }", "public function baja($param){\n $resp = false;\n \n if ($this->seteadosCamposClaves($param)){\n $elObjtTabla = $this->cargarObjetoConClave($param);\n if ($elObjtTabla!=null and $elObjtTabla->eliminar()){\n $resp = true;\n }\n }\n \n return $resp;\n }", "function PKG_getPackageParamsVar($id,$var)\n{\n$params=explode(\"#\",PKG_getPackageParams($id));\n\n//removes PHP warning notice\n$varValue[1]=\"\";\n\nfor ($i=0; $i < count($params); $i++)\n\t{\n\t if (strstr($params[$i],$var) != FALSE)\n\t \t{\n\t \t $varValue=explode(\"=\",$params[$i]);\n\t\t break;\n\t\t};\n\t};\n\nreturn($varValue[1]);\n}", "function varDeclarationConvert()\n {\n // $strposdolar = strpos();\n }", "static function get($key) {\n @include \"tmp/$key\";\n return isset($t) ? $t : false;\n }", "function existeTitulacion($base, $id)\n{\n $query = \"SELECT `id` FROM `titulaciones` WHERE `id`=\" . $id;\n $resultado = $base->query($query);\n if (empty($resultado->fetchAll())) {\n return false;\n }\n $resultado->closeCursor();\n return true;\n}", "public function is_auxiliary_variable( $id ) {\n\t\treturn ! empty( $this->skin_palettes_config['palette'][ $id ] ) && (int) $this->skin_palettes_config['palette'][ $id ]['id'] === $id && empty( $this->skin_palettes_config['palette'][ $id ]['hsla_code'] );\n\t}", "function is_set($variable, $value = '') {\n return isset($variable)?$variable:$value;\n}", "function existen_registros($tabla, $filtro = '') {\n if (!empty($filtro))\n $sql = \"select count(*) from \" . trim($tabla) . \" where {$filtro}\";\n else\n $sql = \"select count(*) from \" . trim($tabla);\n // print_r($sql);exit;\n $bd = new conector_bd();\n $query = $bd->consultar($sql);\n $row = pg_fetch_row($query);\n if ($row[0] > 0)\n return true;\n else\n return false;\n }", "function comprovarBorrar($idProducte, $idUsuari){\n $conn=connexioBD();\n $existe=false;\n $sql1=\"SELECT * FROM productes WHERE id='$idProducte' and usuari_id='$idUsuari'\";\n if (!$resultado =$conn->query($sql1)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows==1){\n $existe=true;\n }\n return $existe;\n $resultado->free();\n $conn->close(); \n}", "public function __isset($name)\n {\n return isset($this->variables[$name]);\n }", "function validaSelect($selectDestino) {\n global $listadoSelects;\n if (isset($listadoSelects[$selectDestino]))\n return true;\n else\n return false;\n}", "private function _exists() {\n // taky typ uz existuje ?\n $id = $this->equipment->getID();\n if ($id > 0) {\n $this->flash(\"Také vybavenie už existuje.<br/>Presmerované na jeho editáciu.\", \"error\");\n $this->redirect(\"ape/equipment/edit/$id\");\n }\n }", "function existe($funcion) {\n $f = $this->consultar($funcion);\n if (isset($f[\"funcion\"]) && $f[\"funcion\"] == $funcion) {\n $existe = true;\n } else {\n $existe = false;\n }\n return($existe);\n }" ]
[ "0.5389594", "0.52625084", "0.52565646", "0.52349865", "0.51573074", "0.51278126", "0.5113274", "0.5096186", "0.5081764", "0.50625914", "0.50559837", "0.50527334", "0.50504106", "0.5038977", "0.5027071", "0.5021214", "0.4971078", "0.49602044", "0.49449673", "0.4942937", "0.49109882", "0.4909509", "0.49001482", "0.48962626", "0.48962343", "0.4892056", "0.4890258", "0.4878215", "0.48721576", "0.48692206", "0.48665816", "0.4866207", "0.4837033", "0.48321924", "0.4819307", "0.48163894", "0.48154792", "0.48089904", "0.48056594", "0.48056594", "0.47959504", "0.4795073", "0.47886962", "0.47861126", "0.47846928", "0.47758695", "0.4766747", "0.47596905", "0.47553754", "0.47216687", "0.4720559", "0.47174594", "0.47146833", "0.46966794", "0.46869585", "0.46839228", "0.4672701", "0.46683124", "0.46615687", "0.46612704", "0.46584517", "0.46551758", "0.465114", "0.46500432", "0.46495906", "0.4640863", "0.4640675", "0.46325406", "0.4617599", "0.4616344", "0.4609084", "0.46054527", "0.46017972", "0.46000412", "0.45992544", "0.45990592", "0.459531", "0.459431", "0.45911393", "0.45863244", "0.45860133", "0.4585492", "0.4584795", "0.45838863", "0.457464", "0.4572033", "0.4571939", "0.45692733", "0.45689616", "0.4567852", "0.45675316", "0.45634544", "0.4560498", "0.45599166", "0.4559847", "0.45567068", "0.45556185", "0.4552931", "0.45479503", "0.4542456", "0.4540964" ]
0.0
-1
Return the correct error constant for a specified type.
public static function getTypeError( $type ) { $data = [ Type::INTEGER => static::INTEGER, Type::FLOAT => static::FLOAT, Type::BOOLEAN => static::BOOLEAN, Type::TIMESTAMP => static::TIMESTAMP, Type::DATETIME => static::DATETIME, Type::DATE => static::DATE, Type::TIME => static::TIME, Type::YEAR => static::YEAR, Type::IP => static::IP, Type::EMAIL => static::EMAIL, Type::URL => static::URL, Type::JSON => static::JSON, Type::OBJECT => static::VALUE, ]; return isset($data[$type]) ? $data[$type] : static::VALUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getErrorForType($errorType) {\n switch($errorType) {\n default:\n case 'no_error':\n $this->addMsg(\n MSG_WARNING,\n $this->_gt('The action failed, but no error was triggered. Something`s wrong here.')\n );\n break;\n case 'path_not_found':\n $this->addMsg(MSG_ERROR, $this->_gt('Path could not be created.'));\n break;\n case 'mode_not_set':\n $this->addMsg(\n MSG_ERROR,\n $this->_gt('Could not determine, whether file was uploaded or local.')\n );\n break;\n case 'file_not_moved':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not move file.'));\n break;\n case 'no_properties':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not find out file properties.'));\n break;\n case 'empty_file':\n $this->addMsg(MSG_ERROR, $this->_gt('Wouldn`t add empty file.'));\n break;\n case 'db_add_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('File could not be added.'));\n break;\n case 'db_update_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('File could not be updated.'));\n break;\n case 'create_version_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Version could not be created.'));\n break;\n case 'load_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not load file.'));\n break;\n case 'import_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Failed to import file.'));\n break;\n case 'no_temp_file':\n $this->addMsg(MSG_ERROR, $this->_gt('Temporary file not found.'));\n break;\n case 'open_remote_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not open remote file.'));\n break;\n case 'open_temp_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not open temporary file.'));\n break;\n case 'derivations_lost':\n $this->addMsg(\n MSG_ERROR,\n $this->_gt('Derivation of file could not be saved, relation is lost.')\n );\n break;\n case 'copy_file_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Could not copy file.'));\n break;\n case 'create_path_failed':\n $this->addMsg(MSG_ERROR, $this->_gt('Path could not be created.'));\n break;\n case 'file_not_found':\n $this->addMsg(MSG_ERROR, $this->_gt('File not found.'));\n break;\n case 'version_not_found':\n $this->addMsg(MSG_ERROR, $this->_gt('Version not found.'));\n }\n }", "function getErrorType() {\n\t\treturn isset($this->errorType) ? $this->errorType : 0;\n\t}", "public function getErrorType()\n {\n return $this->errorType;\n }", "public function getErrorType()\n {\n return $this->errorType;\n }", "public function getErrorType()\n {\n return $this->get('type', '');\n }", "abstract public function getErrorType(): string;", "public static function type( $code ) {\n\t\t// -- Get the proper message based on HTTP status code\n\t\tswitch( $code ) {\n\t\t\tcase Error::$not_found: \n\t\t\t\treturn Error::missing(); \n\t\t\tbreak;\n\n\t\t\tcase Error::$internal: \n\t\t\t\treturn Error::internal(); \n\t\t\tbreak;\n\t\t}\n\t}", "public function errorType($code)\n {\n switch($code)\n {\n case E_ERROR: // 1 //\n return 'E_ERROR';\n case E_WARNING: // 2 //\n return 'E_WARNING';\n case E_PARSE: // 4 //\n return 'E_PARSE';\n case E_NOTICE: // 8 //\n return 'E_NOTICE';\n case E_CORE_ERROR: // 16 //\n return 'E_CORE_ERROR';\n case E_CORE_WARNING: // 32 //\n return 'E_CORE_WARNING';\n case E_COMPILE_ERROR: // 64 //\n return 'E_COMPILE_ERROR';\n case E_COMPILE_WARNING: // 128 //\n return 'E_COMPILE_WARNING';\n case E_USER_ERROR: // 256 //\n return 'E_USER_ERROR';\n case E_USER_WARNING: // 512 //\n return 'E_USER_WARNING';\n case E_USER_NOTICE: // 1024 //\n return 'E_USER_NOTICE';\n case E_STRICT: // 2048 //\n return 'E_STRICT';\n case E_RECOVERABLE_ERROR: // 4096 //\n return 'E_RECOVERABLE_ERROR';\n case E_DEPRECATED: // 8192 //\n return 'E_DEPRECATED';\n case E_USER_DEPRECATED: // 16384 //\n return 'E_USER_DEPRECATED';\n }\n return \"\";\n }", "public function getErrorType() {\n if (curl_error($this->query['ch'])) {\n return 'network';\n }\n\n if ($this->getHttpCode() >= 400) {\n return 'http';\n }\n\n return null;\n }", "public static function type()\n {\n foreach (self::typesConditions() as $type => $condition) {\n if ($condition()) {\n return $type;\n }\n }\n return '404';\n }", "function _errorlog_erronoToConstantName($errno) {\r\n \r\n static $numsToNames;\r\n \r\n // create index of nums to names\r\n if (!$numsToNames) {\r\n foreach (get_defined_constants() as $name => $num) { \r\n if (preg_match(\"/^E_/\", $name)) { $numsToNames[$num] = $name; }\r\n }\r\n }\r\n \r\n //\r\n if (array_key_exists($errno, $numsToNames)) { return $numsToNames[$errno]; }\r\n else { return $errno; }\r\n}", "public function getType()\n {\n return 'PackageFactory.Guevara:Error';\n }", "public function getType(): string\n\t{\n\t\treturn get_class($this->err);\n\t}", "public function error()\n {\n return $this->type('error');\n }", "public function is_a_const_ERROR(): void\n {\n self::assertEquals('ERROR', ChannelNotificationSeverity::ERROR);\n $sut = new ChannelNotificationSeverity('ERROR');\n self::assertEquals('ERROR', $sut->getValue());\n }", "public function expectedErrorMessage( string $needle, int $search_type = self::MESSAGE_EQUALS ) {\n\t\t$type = 'ERROR_MESSAGE';\n\t\treturn compact( 'type', 'needle', 'search_type' );\n\t}", "public function getType() {\n if(!isset($this->type) OR !($this->type)){\n return 'UFO_Exception';\n }else{\n return $this->type;\n }\n }", "public function errorMessage($requestType, $message){\n throw new Zend_Service_Exception('An error occurred making '. $requestType .' request. Message: ' . $message);\n }", "public function getErrorCode();", "abstract protected function _getErrorNumber();", "public function get_error($error_code) {\n\t\treturn $this->error_types[$error_code];\n\t}", "public function error(int $type)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 404:\n\t\t\t\theader(\"HTTP/2 404 Not Found\");\n\t\t\t\t$this->render($this->vars['404']);\n\t\t\tbreak;\n\n\t\t\tcase 401:\n\t\t\t\theader(\"HTTP/2 401 Unauthorized\");\n\t\t\t\t$this->render($this->vars['401']);\n\t\t\tbreak;\n\n\t\t\tcase 403:\n\t\t\t\theader(\"HTTP/2 401 Forbidden\");\n\t\t\t\t$this->render($this->vars['403']);\n\t\t\tbreak;\n\t\t}\t\t\n\t}", "public function getErrorCode(): int;", "public function getXsiTypeName() {\n return \"RequestError\";\n }", "public function getError();", "public function getError();", "public function getError();", "public static function typeToValue(String $type){\n $type = strtoupper($type);\n if(!in_array($type, self::getUserTypes())){\n throw new \\Exception('Incorrect User Type');\n }\n return constant('self::'. $type);\n }", "private function _err($type, $trace, $name) {\n\t\t\t$fmt = 'Undifined property via <code>%1$s::%2$s()</code>: Property <code>%3$s</code> cannot be unset in <b>%4$s</b> on line <b>%5$s</b>. Error triggered';\n\t\t\tif ($type == 'FORBIDDEN') {\n\t\t\t\t$fmt = 'Forbidden property via <code>%1$s::%2$s()</code>: Property <code>%3$s</code> cannot be unset in <b>%4$s</b> on line <b>%5$s</b>. Error triggered';\n\t\t\t} elseif($type == 'CLONE') {\n\t\t\t\t$fmt = 'Invalid clone in <b>%4$s</b> on line <b>%5$s</b>. Because of how cloning works, and how references are configured within the class, extensions of %1$s cannot be cloned. Please make a new instance instead, like so: <code>$clone = new \\\\uri($original->str()); $clone->input = $original->input;</code>. Error triggered';\n\t\t\t}\n\t\t\t\n\t\t\ttrigger_error(\n\t\t\t\tsprintf(\n\t\t\t\t\t$fmt,\n\t\t\t\t\t$trace[0]['class'],\n\t\t\t\t\t$trace[0]['function'],\n\t\t\t\t\t$name,\n\t\t\t\t\t$trace[0]['file'],\n\t\t\t\t\t$trace[0]['line']\n\t\t\t\t),\n\t\t\t\tE_USER_NOTICE\n\t\t\t);\n\t\t}", "protected function getValidType($type)\n {\n switch ($type) {\n case 'rail':\n case 'railway':\n case 'train':\n return GISCoordinate::RAILWAY_TYPE;\n case 'highway':\n case 'motorway':\n return GISCoordinate::HIGHWAY_TYPE;\n case 'busstop':\n case 'public_transport_stop':\n case 'bus_stop':\n return GISCoordinate::BUSSTOP_TYPE;\n default:\n return null;\n }\n }", "public function get_error();", "public function get_error();", "function getErrorMessage($client_currency_index, $errorMessage, $errorType) {\n\t$errorArray = array();\n\t\n\tswitch($client_currency_index) {\n\t\tcase 1:\n\t\t\t//echo $errorMessage;\n\t\t\t//echo $errorType;\n\t\t\t//errorType \"missing\"\n\t\t\t$errorArray[\"client_name\"][\"required\"] = \"You did not fill out the client name field.\";\n\t\t\t$errorArray[\"client_phone\"][\"required\"] = \"You did not fill out the client phone number field.\";\n\t\t\t$errorArray[\"client_email\"][\"required\"] = \"You did not fill out the client email field.\";\n\t\t\t$errorArray[\"client_address\"][\"required\"] = \"You did not fill out the client address field.\";\n\t\t\t$errorArray[\"client_city\"][\"required\"] = \"You did not fill out the client city field.\";\n\t\t\t$errorArray[\"client_zip\"][\"required\"] = \"You did not fill out the client zip field.\";\n\t\t\t$errorArray[\"client_logo_link\"][\"required\"] = \"You didn't upload a file.\";\n\t\t\t$errorArray[\"contact_name\"][\"required\"] = \"Please enter a name for your contact. Note: All clients must have at least one contact.\";\n\t\t\t$errorArray[\"project_name\"][\"required\"] = \"Please enter a name for your project.\";\n\t\t\t$errorArray[\"person_first_name\"][\"required\"] = \"Please enter a first name for this person.\";\n\t\t\t$errorArray[\"person_last_name\"][\"required\"] = \"Please enter a last name for this person.\";\n\t\t\t$errorArray[\"person_email\"][\"required\"] = \"Please enter an email address for this person.\";\n\t\t\t//errorType \"invalid input\"\n\t\t\t$errorArray[\"client_email\"][\"invalid_input\"] = \"Please check you entered a valid email address for the client.\";\n\t\t\t$errorArray[\"client_phone\"][\"invalid_input\"] = \"Please check you entered a valid phone number for the client in format XXX-XXX-XXXX.\";\n\t\t\t$errorArray[\"client_zip\"][\"invalid_input\"] = \"Please check you entered a valid zip code for this client in format XXXXX.\";\n\t\t\t//errors for file upload\n\t\t\t$errorArray[\"client_logo_link\"][\"invalid_file\"] = \"You may only upload JPEG images.\";\n\t\t\t$errorArray[\"client_logo_link\"][\"upload_problem\"] = \"Something went wrong uploading your image.\";\n\t\t\t//contact errors\n\t\t\t$errorArray[\"contact_email\"][\"invalid_input\"] = \"Please check you entered a valid email address for your contact.\";\n\t\t\t$errorArray[\"contact_office_number\"][\"invalid_input\"] = \"Please check you entered a valid office phone number for the contact in format XXX-XXX-XXXX.\";\n\t\t\t$errorArray[\"contact_mobile_number\"][\"invalid_input\"] = \"Please check you entered a valid mobile phone number for the contact in format XXX-XXX-XXXX.\";\n\t\t\t$errorArray[\"contact_fax_number\"][\"invalid_input\"] = \"Please check you entered a valid fax phone number for the contact in format XXX-XXX-XXXX.\";\n\t\t\t$errorArray[\"contact_primary\"][\"required\"] = \"All clients must have at least one primary contact.\";\n\t\t\treturn $errorArray[$errorMessage][$errorType];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"You entered an invalid language index.\";\n\t}\n}", "abstract public function getErrorMessage(string $className): string;", "public function getCodeConstant(): string\n\t{\n\t\treturn ExceptionUtil::getExceptionCode($this->err);\n\t}", "function get_error( $errorCode )\n {\n switch ( $errorCode ) {\n case 'ERRORSAVE':\n $error = 'There was a problem adding or updating the record(s)';\n break;\n case 'ERRORDELETE':\n $error = 'There was a problem deleting the record(s).';\n break;\n case 'ERRORPAGEEXISTS':\n $error = 'The page already exists.';\n break;\n case 'ERRORPAGENOTFOUND':\n $error = 'The selected page cannot be found.';\n break;\n default:\n $error = 'An error has occurred.';\n\n }\n\n return $error;\n }", "function setError($type, $msg) {\n\t\t$this->errorType = $type;\n\t\t$this->errorMsg = $msg;\n\t}", "public function getXsiTypeName() {\n return \"ApiError\";\n }", "final public static function Label( $enumType, $enumValue )\n {\n $result = 'IllegalValue';\n\n if ( class_exists( $enumType, false ) )\n {\n $reflector = new ReflectionClass( $enumType );\n\n foreach( $reflector->getConstants() as $key => $val )\n {\n if ( $val == $enumValue )\n {\n $result = $key;\n break;\n }\n }\n }\n return $result;\n }", "public static function validate_type($type) { \n\n\t\tswitch($type) { \n\t\t\tcase 'rpc':\n\t\t\tcase 'interface':\n\t\t\tcase 'network':\n\t\t\t\treturn $type;\n\t\t\tbreak;\n\t\t\tcase 'xml-rpc':\n\t\t\t\treturn 'rpc';\n\t\t\tbreak; \n\t\t\tdefault: \n\t\t\t\treturn 'stream';\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}", "function newErr($type, $message) {\n $response = array(\n 'error' => $type,\n 'message' => $message\n );\n return json_encode($response);\n \n }", "public static function clasname(string $type): string\n {\n if (!self::exists($type)) {\n throw new Exception(\"The alert type '$type' does not exist in config\");\n }\n\n return self::type($type)['alert'];\n }", "public static function getMessagesKeyFor($type) {\n $map = array(\n self::TRANSFORM => self::TRANSFORM_MESSAGES,\n self::WARNING => self::WARNING_MESSAGES,\n self::ERROR => self::ERROR_MESSAGES\n );\n if (array_key_exists($type, $map))\n return $map[$type];\n return \"{$type}Messages\";\n }", "public function get_error_code()\n {\n }", "function getError();", "function getError();", "public function getException($type, $error, $error_description = null, array $data = []);", "public function getErrorCode()\n {\n return $this->getInput('error_code');\n }", "public function errorcode();", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getErrorCode(): ?string {\n $val = $this->getBackingStore()->get('errorCode');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'errorCode'\");\n }", "private function getTypeString($type){\n\t\tswitch($type){\n\t\t\tcase Logger::DEBUG:\n\t\t\t\t$type = 'DEBUG';\n\t\t\t\tbreak;\n\t\t\tcase Logger::ERROR:\n\t\t\t\t$type = 'ERROR';\n\t\t\t\tbreak;\n\t\t\tcase Logger::WARNING:\n\t\t\t\t$type = 'WARNING';\n\t\t\t\tbreak;\n\t\t\tcase Logger::CUSTOM :\n\t\t\t\t$type = 'CUSTOM';\n\t\t\t\tbreak;\n\t\t\tcase Logger::CRITICAL:\n\t\t\t\t$type = 'CRITICAL';\n\t\t\t\tbreak;\n\t\t\tcase Logger::ALERT:\n\t\t\t\t$type = 'ALERT';\n\t\t\t\tbreak;\n\t\t\tcase Logger::NOTICE:\n\t\t\t\t$type = 'NOTICE';\n\t\t\t\tbreak;\n\t\t\tcase Logger::EMERGENCE:\n\t\t\t\t$type = 'EMERGENCE';\n\t\t\t\tbreak;\n\t\t\tcase Logger::INFO:\n\t\t\t\t$type = 'INFO';\n\t\t\t\tbreak;\n\t\t\tcase Logger::SPECIAL :\n\t\t\t\t$type = 'SPECIAL';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = 'CUSTOM';\n\t\t}\n\t\treturn $type;\n\t}", "public function getError() {}", "function getError()\r\n\t{\r\n\t\treturn $this->error_code;\r\n\t}", "function defineErrorCode(int $errorCode) : string {\n $errors = [\n 0 => 'There is no error, the file uploaded with success',\n 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',\n 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',\n 3 => 'The uploaded file was only partially uploaded',\n 4 => 'No file was uploaded',\n 6 => 'Missing a temporary folder',\n 7 => 'Failed to write file to disk.',\n 8 => 'A PHP extension stopped the file upload.',\n ];\n\n return $errors[$errorCode];\n}", "public function getErrorCode()\n {\n return $this->singleValue('//i:errorCode');\n }", "public function getError() : string {\n\t\t\treturn match ($this->error) {\n\t\t\t\tUPLOAD_ERR_OK => \"Upload completed successfully.\",\n\t\t\t\tUPLOAD_ERR_INI_SIZE => \"Upload exceeded maximum file size on server\",\n\t\t\t\tUPLOAD_ERR_FORM_SIZE => \"Upload exceeded maximum file size in browser\",\n\t\t\t\tUPLOAD_ERR_PARTIAL => \"Upload didn't complete\",\n\t\t\t\tUPLOAD_ERR_NO_FILE => \"No file was uploaded\",\n\t\t\t\tUPLOAD_ERR_NO_TMP_DIR => \"Missing temporary folder on server\",\n\t\t\t\tUPLOAD_ERR_CANT_WRITE => \"Failed to write upload to disk\",\n\t\t\t\tUPLOAD_ERR_EXTENSION => \"A server extension stopped the upload\",\n\t\t\t\tdefault => \"Unknown error code during file upload\",\n\t\t\t};\n\t\t}", "public function getErrorLocation($type, $name)\n {\n return $this->getFilePath($type, $name);\n }", "public static function validateType(int $type)\n {\n $refl = new \\ReflectionClass(self::class);\n if (!in_array($status, $refl->getConstants())) {\n throw new \\InvalidArgumentException('Does not support this type');\n }\n }", "public function message()\n {\n return 'Invalid constant value. Possible values are: ' . $this->class::all()->implode(', ');\n }", "protected function getErrorMsgTemplate()\n {\n return 'The %s cast is ';\n }", "function error($code) {\n\tswitch ($code) {\n\t\tcase 'EntityExists':\n\t\t\t$str = 'Cannot complete that action because the entity already exists';\n\t\t\tbreak;\n\t\tcase 'EntityDoesNotExist':\n\t\t\t$str = 'Cannot complete that action because that entity does not exist';\n\t\t\tbreak;\n\t\tcase 'InvalidPassword':\n\t\t\t$str = 'The password supplied is not valid';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = $code;\n\t}\n\treturn $str;\n}", "abstract public function getMsgError();", "public function getType() {\n return REMOTE_MSG_EXCEPTION;\n }", "abstract protected function getValidType(): string;", "public static function getError()\n\t{\n\t\treturn self::$error;\n\t}", "public function errorCode();", "public function errorCode();", "abstract protected function _getErrorString();", "public function getErrorMessageByCode($code): string\n {\n switch ($code) {\n case 400:\n {\n return 'Requisição Mal Formada';\n }\n case 401:\n {\n return 'Usuário não autorizado';\n }\n case 403:\n {\n return 'Acesso não autorizado';\n }\n case 404:\n {\n return 'Recurso não Encontrado';\n }\n case 405:\n {\n return 'Operação não suportada';\n }\n case 408:\n {\n return 'Tempo esgotado para a requisição';\n }\n case 409:\n {\n return 'Recurso em conflito';\n }\n case 413:\n {\n return 'Requisição excede o tamanho máximo permitido';\n }\n case 415:\n {\n return 'Content-type inválido';\n }\n case 422:\n {\n return 'Não foi possível processar as instruções contidas na requisição';\n }\n case 429:\n {\n return 'Requisição excede a quantidade máxima de chamadas permitidas à API.';\n }\n case 500:\n {\n return 'Erro na API';\n }\n }\n }", "public function getType($type)\n {\n switch ($type) {\n case 'landLine' :\n return OutgoingCall::TYPE_LANDLINE;\n case 'mobile' :\n return OutgoingCall::TYPE_MOBILE;\n case 'special' :\n return OutgoingCall::TYPE_SPECIAL;\n }\n\n throw new \\Exception('Unknown type : ' . $type);\n }", "final public function GetExpectedType() { return $this->type; }", "public static function getType(): string\n {\n return self::TYPE;\n }", "protected function getTypeString($type)\n {\n switch ($type) {\n case Logger::EMERGENCY:\n case Logger::EMERGENCE:\n case Logger::CRITICAL:\n // emergence, critical\n return 'critical';\n case Logger::ALERT:\n case Logger::ERROR:\n // error, alert\n return 'error';\n case Logger::WARNING:\n // warning\n return 'warning';\n case Logger::NOTICE:\n case Logger::INFO:\n // info, notice\n return 'info';\n case Logger::DEBUG:\n case Logger::CUSTOM:\n case Logger::SPECIAL:\n default:\n // debug, log, custom, special\n return 'debug';\n }\n }", "public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n\tswitch ($errno) {\n\t\tcase E_NOTICE:\n\t\t\t$type = \"Notice\";\n\t\t\tbreak;\n\t\tcase E_WARNING:\n\t\t\t$type = \"Warning\";\n\t\t\tbreak;\n\t\tcase E_STRICT:\n\t\t\t$type = \"strict\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$type = \"Error\";\n\t}\n\t//echo \"<b>$type:</b> \".$errfile.':'.$errline.': '.$errstr.'<br />';\n\tthrow new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "function translate_type_to_name($opt_type) {\n global $products_options_types_list;\n return $products_options_types_list[$opt_type];\n return 'Error ' . $opt_type;\n}", "static function translator($type){\n if ( $type == ActionType::PAGE_CALL )\n return 'Page Call';\n if ( $type == ActionType::ERROR )\n return 'Error';\n if ( $type == ActionType::NOT_ALLOWED )\n return 'requested resource ist not allowed for this user';\n }", "function fetchErrorCode($error)\n{\n if (method_exists($error, 'getStatusCode')) {\n return $error->getStatusCode();\n }\n\n if (method_exists($error, 'getCode')) {\n return $error->getCode();\n }\n\n return 0;\n}", "public function retrouve_Type($type) {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif (is_numeric ( $type )) {\n\t\t\treturn $type;\n\t\t}\n\t\tswitch (strtolower ( $type )) {\n\t\t\tcase \"zabbix admin\" :\n\t\t\t\treturn 2;\n\t\t\t\tbreak;\n\t\t\tcase \"zabbix super admin\" :\n\t\t\t\treturn 3;\n\t\t\t\tbreak;\n\t\t\tcase \"zabbix user\" :\n\t\t\tdefault :\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "public function errorCode() {}", "public function setError($errorType) {\n $this->error = $errorType;\n }", "public function getErrorMessage() {\n\t\tswitch( $this->error ) {\n\t\t\tcase TAN_NOT_FOUND : return \"Die TAN wurde nicht gefunden\";\n case REGISTRATION_USER_EXISTS : return \"Dieser Nutzer Existiert bereits\";\n\t\t}\n\t}", "abstract public function error();", "public function get_course_type($type){\n\t\tswitch($type){\n\t\t\tcase 'R':\n\t\t\t$value = 'Regular';\n\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t$value = 'Correspondence';\n\t\t\tbreak;\t\t\t\n\t\t}\n\t\treturn $value;\n }", "private function getApiErrorCode($errorCode)\n {\n if (is_int($errorCode)) {\n $apiError = ExceptionCode::errorCodeString($errorCode);\n return $apiError ?: $errorCode;\n }\n return $errorCode;\n }", "public function getXsiTypeName() {\n return \"DistinctError.Reason\";\n }", "function get_error_name($errno)\n{\n $constants = get_defined_constants(true);\n $keys = array_keys($constants['Core'], $errno);\n $keys = array_filter($keys, function($value) {\n return (strpos($value, 'E_') === 0);\n });\n return implode('|', $keys); // There should only be one member of the array, all being well.\n}", "public function getXsiTypeName() {\n return \"StringLengthError\";\n }", "public function wrongTypeFile()\n {\n return 'This type of file is not allowed';\n }", "public function getError(): int\n {\n return $this->error;\n }", "static function resType($type)\n {\n self::$resType = $type;\n\n if(!$type)\n self::$resType = '%';\n\n return __CLASS__;\n }", "public function getError() {\n\t\treturn self::$error;\n\t}", "public function getMessageLevelName($constant) {\n $map = array(\n MigrationBase::MESSAGE_ERROR => t('Error'),\n MigrationBase::MESSAGE_WARNING => t('Warning'),\n MigrationBase::MESSAGE_NOTICE => t('Notice'),\n MigrationBase::MESSAGE_INFORMATIONAL => t('Informational'),\n );\n return $map[$constant];\n }", "public function getErrorCode(): ?int {\n $val = $this->getBackingStore()->get('errorCode');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'errorCode'\");\n }", "public function expectedErrorPath( string $path ) {\n\t\t$type = 'ERROR_PATH';\n\t\treturn compact( 'type', 'path' );\n\t}", "public function getErrorMessage($input) {\n\t\treturn $input . ' is invalid.';\n\t}", "public function errorCode()\n {\n $error = $this->errorInfo();\n return $error[0];\n }", "public function errorString($code) {\n \n if(!is_numeric($code)) {\n return false;\n }\n\n $code = (int)$code;\n \n switch($code) {\n case 0: \n return \"Operation was successful\";\n case 247: \n return \"The userid provided is absent, or incorrect\";\n case 250: \n return \"The provided userid and/or Oauth credentials do not match\";\n case 286: \n return \"No such subscription was found\";\n case 293: \n return \"The callback URL is either absent or incorrect\";\n case 294: \n return \"No such subscription could be deleted\";\n case 304: \n return \"The comment is either absent or incorrect\";\n case 305: \n return \"Too many notifications are already set\";\n case 342: \n return \"The signature (using Oauth) is invalid\";\n case 343: \n return \"Wrong Notification Callback Url don't exist\";\n case 601: \n return \"Too Many Request\";\n case 2554: \n return \"Wrong action or wrong webservice\";\n case 2555: \n return \"An unknown error occurred\";\n case 2556: \n return \"Service is not defined\";\n }\n \n return false;\n }" ]
[ "0.7035882", "0.69569284", "0.6695219", "0.6695219", "0.6582162", "0.6554966", "0.65529144", "0.6403434", "0.62343675", "0.62272364", "0.6129866", "0.60431916", "0.5985268", "0.59731704", "0.5966196", "0.5944607", "0.592055", "0.58545244", "0.5790182", "0.57803136", "0.57569355", "0.56786704", "0.5631222", "0.5601295", "0.55870754", "0.55870754", "0.55870754", "0.5581243", "0.55689627", "0.55549526", "0.55429506", "0.55429506", "0.5509177", "0.5490291", "0.5485504", "0.54850197", "0.54827327", "0.5451233", "0.5440807", "0.5423822", "0.5415424", "0.5412149", "0.5392727", "0.5381418", "0.5380173", "0.5380173", "0.5367532", "0.53642213", "0.53604525", "0.53549725", "0.53549725", "0.53365403", "0.532452", "0.53221107", "0.5314472", "0.53089446", "0.5306899", "0.5306865", "0.5304168", "0.52914137", "0.5289107", "0.528664", "0.5282862", "0.52753913", "0.52698374", "0.5256397", "0.5256288", "0.52554774", "0.52554774", "0.5225062", "0.52238625", "0.52140427", "0.52027684", "0.51560456", "0.51494354", "0.5144449", "0.51433426", "0.51431257", "0.51423347", "0.5130886", "0.512564", "0.5124883", "0.5119106", "0.5116424", "0.5116333", "0.51160747", "0.5115815", "0.5112928", "0.51038384", "0.5100457", "0.51004404", "0.5095723", "0.5091388", "0.50819814", "0.5079085", "0.5070903", "0.50692225", "0.5061738", "0.5060093", "0.50545985" ]
0.6753201
2
Preparamos un array con las clases a cargar
function carga_clases($clase) { $ficheros = array(); $ruta = $_SERVER['DOCUMENT_ROOT']; $ficheros[] = $ruta."/../app/clases/slim/".$clase.".php"; $ficheros[] = $ruta."/../app/clases/funciones/".$clase.".php"; foreach ($ficheros as $key => $fichero) { if (file_exists($fichero)) include_once ($fichero); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadClasses()\n\t\t{\n\t\t\t// foreach($GLOBALS['classes'] as $var => $class)\n\t\t\t// {\n\t\t\t\t// $this->$var = $class;\n\t\t\t// }\n\t\t\t\n\t\t\t// $this->load = _new('loader');\n\t\t\t\n\t\t\t/** Registramos todos os objetos que serão necessários **/\n\t\t\tforeach(Registry::getAll() as $var => $object)\n\t\t\t{\n\t\t\t\t$this->$var = $object;\n\t\t\t}\n\t\t\t\n\t\t\t// E também a classe loader\n\t\t\t$this->load = Registry::get('loader');\n\t\t}", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n \r\n foreach($autoload AS $key => $class){\r\n \r\n $settings = &$this->settings->{$key};\r\n \r\n if(isset($settings)){\r\n\r\n $this->{$key} = new $class($settings);\r\n }\r\n }\r\n }\r\n }", "public static function classes(): array;", "function __construct($arrDados=array()){\n $this->loadArrDados($arrDados);\n }", "private function loadClass() {\n $this->_instances = array();\n\n $this->_instances['log'] = new Log();\n if(ENVIRONMENT == self::ENVIRONMENT_DEV) {\n $this->_instances['debug'] = new Debug();\n $this->_instances['panel'] = new Panel();\n }\n $this->_instances['controller'] = null;\n $this->_instances['configuration'] = new Configuration();\n $this->_instances['routing'] = new Routing();\n }", "protected function buildJSClassesArray() {}", "public static function load(array $classes);", "public function load() : array;", "function __autoload($class_name) {\n // Front will be the first element of the array\n // Conttoller will be the second one\n // because they concanated with \"_\" character\n $class = explode(\"_\", $class_name);\n\n\n // Implode is the opposite of explode. Instead to devide, it will \n // concanete the array\n // as a concanenater we will use \"/\"\n // this way, let say we have as previously Front_Controller\n // the Front/Controller.php\n $path = implode(\"/\", $class) . \".php\";\n require_once($path);\n}", "private function init()\n\t{\n\t\tforeach (isLoadedClass() as $objName)\n\t\t{\n\t\t\t$this->$objName =& loadClass('', '', $objName);\n\t\t}\n\t}", "protected function _load()\n {\n return array();\n }", "abstract protected function load(): array;", "static function loadClass()\n {\n $list_arg = func_get_args();\n if (!empty($list_arg))\n {\n foreach (func_get_args() as $item)\n {\n include_once \"system/classes/{$item}.class.php\";\n }\n }\n }", "abstract public function loadAll();", "protected function initClasses()\n {\n $classList = __DIR__ . DS . 'classes.txt';\n if(file_exists($classList)) {\n $contents = file_get_contents($classList);\n $classes = explode(',', $contents);\n foreach($classes as $class)\n $this->classes[] = trim($class);\n }\n\n }", "abstract public function getClasses();", "public static function loadAll();", "public function postLoad()\n {\n // Ensure class content are known\n $data = (array) $this->_data;\n foreach ($data as $dataEntry) {\n $type = key($dataEntry);\n\n $dataEntry = array_pop($dataEntry);\n if (true === is_array($dataEntry)) {\n $type = key($dataEntry);\n }\n\n if ($type !== 'scalar' && $type !== 'array') {\n self::getFullClassname($type);\n }\n }\n\n parent::postLoad();\n }", "function cargarClases($classname)\n{\n require '../clases/' . $classname . '.php';\n}", "function cargarClases($classname)\n{\n require '../clases/' . $classname . '.php';\n}", "private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }", "protected function loadClassFiles() {}", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "public function getDatas(){\n $r=array();\n $className=get_class($this);\n foreach($this->fields() as $f){\n $r[$f->name]=$f;\n }\n return $r;\n }", "private function prepareFetch($class_name)\n\t{\n\t\t$this->prepared_fetch = [];\n\t\tforeach ((new Reflection_Class($class_name))->getProperties([T_EXTENDS, T_USE]) as $property) {\n\t\t\t// dao must be before gz : first we get the value from the file, then we inflate it\n\t\t\tif ($dao = $property->getAnnotation('dao')->value) {\n\t\t\t\t$dao = Dao::get($dao);\n\t\t\t\tif ($dao !== $this) {\n\t\t\t\t\t$this->prepared_fetch[$property->name][] = $dao;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($property->getAnnotation(Store_Annotation::ANNOTATION)->value === Store_Annotation::GZ) {\n\t\t\t\t$this->prepared_fetch[$property->name][] = self::GZINFLATE;\n\t\t\t}\n\t\t}\n\t}", "private function get_object_array($array){\n \n }", "function __autoload($className)\n{\n require_once \"webcore.reflection.php\";\n \n ClassLoader::loadClass($className);\n}", "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "public function getClasses();", "public function getClasses();", "public function getClasses();", "function __autoload($nomeClasse)\n{\n include_once './classes/' . $nomeClasse . '.class.php';\n}", "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"{$ponto}class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "function __autoload($classe){\n\t$pontos = array(\"./\", \"../\", \"../../\");\n foreach($pontos AS $ponto){\n\t\tif(file_exists(\"{$ponto}class/{$classe}.class.php\")){\n\t\t\t//echo \"{$ponto}class/{$classe}.class.php\\n\";\n\t\t\tinclude_once \"{$ponto}class/{$classe}.class.php\";\n\t\t}\n\t}\n}", "public function factory($arrayfetch){\n $arraytoret = Array();\n if($arrayfetch){\n foreach($arrayfetch as $fetch){\n $newObject = new Usuario($this->driver);\n $newObject->fill($fetch);\n array_push($arraytoret,$newObject);\n }\n }\n return $arraytoret;\n }", "public function classes() {\n\t\t$this->ApiClass = ClassRegistry::init('ApiGenerator.ApiClass');\n\t\t$classIndex = $this->ApiClass->getClassIndex();\n\t\t$this->set('classIndex', $classIndex);\n\t}", "function fetchTipo() {\n\n $tipos = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM tipo\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $tipo = new Tipo($id, $nombre);\n array_push($tipos, $tipo);\n }\n\n return $tipos;\n }", "function geraClassesBasicas(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.Modelo.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n //print_r($aBanco);\n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n # Varre a estrutura dos campos da tabela em questao\n $aAtributo = $aListaAtributo = $aAtribuicao = $aFuncaoGet = $aFuncaoSet = array();\n foreach($aTabela as $oCampo){\n $nomeCampo \t = (string)$oCampo->NOME;\n if((string)$oCampo->FKTABELA != ''){\n # Processa nome original da tabela estrangeira\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n if($nomeFKClasse == $nomeClasse){\n $nomeCampo = \"o\".ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $nomeCampo));\n } else {\n $nomeCampo = \"o$nomeFKClasse\";\n }\n }\n\n # Atribui resultados\n $aAtributo[] \t = \"\\tpublic \\$$nomeCampo;\";\n $aListaAtributo[] = ((string)$oCampo->FKTABELA != '') ? \"$nomeFKClasse \\$$nomeCampo = NULL\" : \"\\$$nomeCampo = NULL\";\n $aAtribuicao[] \t = \"\\t\\t\\$this->$nomeCampo = \\$$nomeCampo;\";\n }\n\n # Monta demais valores a serem substituidos\n $atributos = join($aAtributo,\"\\n\");\n $listaAtributos = join(\", \", $aListaAtributo);\n $atribuicao = join(\"\\n\", $aAtribuicao);\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%ATRIBUTOS%%', $atributos, $copiaModelo);\n $copiaModelo = str_replace('%%LISTA_ATRIBUTOS%%', $listaAtributos, $copiaModelo);\n $copiaModelo = str_replace('%%ATRIBUICAO%%', $atribuicao, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/basicas\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.$nomeClasse.php\",\"w\");\n fputs($fp, $copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "function geraClassesMapeamento(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloMAP.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n # Recupera o nome da tabela e gera o nome da classe\n $nomeTabela = ucfirst((string)$aTabela['NOME']);\n $nomeTabelaOriginal = (string)$aTabela['NOME'];\n\n $nomeClasse = ucfirst($this->getCamelMode($nomeTabela));\n $objetoClasse = \"\\$o$nomeClasse\";\n # Varre a estrutura dos campos da tabela em questao\n $objToReg = $regToObj = $objToRegInsert = array();\n\n foreach($aTabela as $oCampo){\n # Processa nome original da tabela estrangeira\n $nomeFKClasse\t= ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n $objetoFKClasse = $nomeFKClasse;\n\n # Testando nova implementacao - Tirar caso ocorrer erro\n if($nomeFKClasse == $nomeClasse)\n $objetoFKClasse = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME));\n\n //$nomeCampo = $this->getCamelMode((string)$oCampo->NOME); Alteracao SUDAM\n $nomeCampo = (string)$oCampo->NOME;\n\n # Monta parametros a serem substituidos posteriormente\n if($oCampo->FKTABELA == ''){\n $objToReg[] = \"\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = $objetoClasse\".\"->$nomeCampo;\";\n if($oCampo->CHAVE == \"0\"){\n $objToRegInsert[] = \"\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = $objetoClasse\".\"->$nomeCampo;\";\n }\n $regToObj[] = \"\\t\\t$objetoClasse\".\"->$nomeCampo = \\$reg['$nomeTabelaOriginal\".\"_\".(string)$oCampo->NOME.\"'];\";\n \n }\n else{\n $objToReg[] = \"\\t\\t\\$o$objetoFKClasse = $objetoClasse\".\"->o$objetoFKClasse;\\n\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = \\$o$objetoFKClasse\".\"->\".(string)$oCampo->FKCAMPO.\";\";\n if($oCampo->CHAVE == \"0\"){\n $objToRegInsert[] = \"\\t\\t\\$o$objetoFKClasse = $objetoClasse\".\"->o$objetoFKClasse;\\n\\t\\t\\$reg['\".(string)$oCampo->NOME.\"'] = \\$o$objetoFKClasse\".\"->\".(string)$oCampo->FKCAMPO.\";\";\n }\n $x \t\t= $this->retornaArvore((string)$oCampo->FKTABELA);\n $regToObj[] = \"\\n$x\\t\\t$objetoClasse\".\"->o$objetoFKClasse = \\$o$objetoFKClasse;\";\n }\n }\n\n # Monta demais valores a serem substituidos\n $objToReg = join($objToReg,\"\\n\");\n $objToRegInsert = join($objToRegInsert,\"\\n\");\n $regToObj = join($regToObj,\"\\n\");\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%OBJETO_CLASSE%%', $objetoClasse, $copiaModelo);\n $copiaModelo = str_replace('%%OBJ_TO_REG%%', $objToReg, $copiaModelo);\n $copiaModelo = str_replace('%%OBJ_TO_REG_INSERT%%', $objToRegInsert,$copiaModelo);\n $copiaModelo = str_replace('%%REG_TO_OBJ%%', $regToObj, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/map\";\n\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.$nomeClasse\".\"MAP.php\",\"w\");\n fputs($fp,$copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "public function findAll(string $className) : array \r\n{\r\n \r\n $resultatRequete = $this->pdo->query(\"SELECT * FROM {$this->table}\");\r\n\r\n $items = $resultatRequete->fetchAll(PDO::FETCH_CLASS, $className);\r\n\r\n return $items;\r\n}", "function __autoload($classPupa){\n\n require 'class/'.$classPupa.'.php';\n \n}", "function class_autoload($params){\n\tstatic $entries_count = 0;\n\tif($entries_count>0){ return; }\n\t$entries_count++;\n\tif(is_string($params)){\n\t\t__class_autoload__(array(\"directory\" => $params));\n\t}elseif(is_array($params)){\n\t\t__class_autoload__(array(\"filenames_by_class\" => $params));\n\t}\n\t$entries_count--;\n}", "function mostraTodasClasses() {\r\n\t$arrayClasses = get_declared_classes();\r\n\t\r\n\tif (count($arrayClasses)) {\r\n\t\tforeach ($arrayClasses as $classe) {\r\n\t\t\techo \"Métodos da classe {$classe}<br/>\";\r\n\t\t\t\r\n\t\t\t$metodos = get_class_methods($classe);\r\n\t\t\tif (!count($metodos)) {\r\n\t\t\t\techo \"Classe não possui nenhum método<br/>\";\r\n\t\t\t} else {\r\n\t\t\t\tforeach ($metodos as $metodo) {\r\n\t\t\t\t\techo \"Método: {$metodo} <br/>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"Propriedades:<br />\";\r\n\t\t\t$properties = get_class_vars($classe);\r\n\t\t\tif (!count($properties)) {\r\n\t\t\t\techo \"<i>Não possui</i><br />\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tforeach($properties as $propriedade => $valor) {\r\n\t\t\t\t\techo \"Propriedade: {$propriedade}, Valor: {$valor} <br />\";\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<hr/>\";\r\n\t\t}\r\n\t}\r\n}", "function __autoload($class){\n require \"classes/\".$class.\".php\";\n }", "function __autoload($class)\n \t{\n // metodo que inclui apenas uma vez e se ja existir ignora uma classe.\n \t require_once \"class/\".$class.\".class.php\"; \n \t}", "function chargerclasses($class){\n require(\"../dao/\".$class.\".class.php\");\n }", "function __autoload($class_name){\n require_once \"../cls/\".$class_name.'.php';\n}", "function chargerclasses($class){\n require(\"../dao/\".$class.\".class.php\");\n }", "public function load()\n {\n $this->_retrievedFiles = $this->getRetrievedFiles();\n $this->_loadedClasses = [];\n\n $manifestRepository = $this->_registry->getManifestRepository();\n $providerRepository = $this->_registry->getProviderRepository();\n\n $loadedClasses = [];\n\n // loop through files and find the classes declared by loading the file\n foreach ($this->_retrievedFiles as $file) {\n if(is_dir($file)) {\n continue;\n }\n\n $classesLoadedBefore = get_declared_classes();\n $oldLevel = error_reporting(E_ALL | ~E_STRICT); // remove strict so that other packages wont throw warnings\n // should we lint the files here? i think so\n include_once $file;\n error_reporting($oldLevel); // restore old error level\n $classesLoadedAfter = get_declared_classes();\n $loadedClasses = array_merge($loadedClasses, array_diff($classesLoadedAfter, $classesLoadedBefore));\n }\n\n // loop through the loaded classes and ensure that\n foreach ($loadedClasses as $loadedClass) {\n\n // reflect class to see if its something we want to load\n $reflectionClass = new ReflectionClass($loadedClass);\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Manifest_Interface')\n && !$reflectionClass->isAbstract())\n {\n $manifestRepository->addManifest($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Provider_Interface')\n && !$reflectionClass->isAbstract()\n && !$providerRepository->hasProvider($reflectionClass->getName(), false))\n {\n $providerRepository->addProvider($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n }\n\n return $this->_loadedClasses;\n }", "function __autoload($nomClasse) {\r\n\trequire_once $nomClasse.'.class.php';\r\n}", "function __autoload($classe){\n\n require_once'../modelo/'.$classe.'.php';\n\n}", "#[Pure]\nfunction spl_classes(): array {}", "function load_my_classes($_cls)\n{\n //echo '<hr />' . $_cls . '<hr />';\n $PATH_SEPARATOR = DIRECTORY_SEPARATOR;\n //$ROOTPATH = $_SERVER[\"DOCUMENT_ROOT\"];\n\t$ROOTPATH = dirname($_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\t//print_r($_SERVER);\n \n\t\n\n\n if(class_exists($_cls))\n {\n //doe niks, het is een ingebouwde class zoals \\SplObjectStorage o.i.d.\n }\n elseif(strpos($_cls, 'Exception') !== false)\n {\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . 'Exceptions.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n elseif(strpos($_cls, 'Common') === false)\n {\n $dirsToLookIn = Array(\"controller\", \"core\", \"model\", \"view\");\n \n foreach($dirsToLookIn as $dir)\n {\n if(strpos($_cls, __NAMESPACE__) !== false)\n {\n //namespace eraf strippen anders komt die mee in de padverwijzingen\n $_cls = substr($_cls, strlen(__NAMESPACE__)+1); \n }\n \n \n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . $dir . $PATH_SEPARATOR . $_cls . '.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n }\n else\n {\n $_cls = substr($_cls, 7);\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . $_cls . '.php';\n \n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n //echo '<hr />';\n}", "public function preparChamado(array $objetos, $params);", "function loader($class){\n require_once \"routes/cats.php\";\n require_once \"models/CatsModel.php\";\n require_once \"models/Database.php\";\n require_once \"models/Mysqldb.php\";\n require_once \"views/CatsView.php\";\n require_once \"controllers/CatsController.php\";\n\n}", "function initclasses() {\n\n\t$classes = array(\n\t\tarray( 'title' => 'Full Digitizing Class - Part 1', 'video' => 'wmup1a.mp4' ),\n\t\tarray( 'title' => 'Full Digitizing Class - Part 2', 'video' => 'wmup2a.mp4' ),\n\t\tarray( 'title' => 'Full Digitizing Class - Part 3', 'video' => 'art101a.mp4' ),\n\t\tarray( 'title' => 'Full Digitizing Class - Part 4', 'video' => 'art to stitchesa.mp4' ),\n\t\tarray( 'title' => 'Full Digitizing Class - Part 5', 'video' => 'designanalysisa.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 1', 'video' => 'learntodigitize part1.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 2', 'video' => 'learntodigitize part2.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 3', 'video' => 'learntodigitize part3.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 4a', 'video' => 'learntodigitize 4a.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 4b', 'video' => 'learntodigitize 4b.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 5', 'video' => 'learntodigitize part5r.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 6', 'video' => 'learntodigitize part 6.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 7', 'video' => 'learntodigitize part7r.mp4' ),\n\t\tarray( 'title' => 'Learn to Digitize Webinar - Part 8', 'video' => 'balboaworkbook.mp4' ),\n\t\tarray( 'title' => 'Quick Steps to Embroidery Success  - Blending 101   ', 'video' => 'qstocolorblending.mp4 ' ),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Advanced Blending     ',\n\t\t\t'video' => 'revised advanced blending.mp4 '\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Shading 101     ',\n\t\t\t'video' => 'quick_steps_to_successfull_shading_101.mp4'\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Advanced Shading ',\n\t\t\t'video' => 'quick_steps_to_successful_shading.mp4  '\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Small Lettering      ',\n\t\t\t'video' => ' quick_steps_to_small_lettering.mp4'\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Perfect Rectangle  ',\n\t\t\t'video' => 'perfect rectangle.mp4 '\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Perfect Circle  ',\n\t\t\t'video' => 'quick_steps_to_the_perfect_circle.mp4'\n\t\t),\n\t\tarray(\n\t\t\t'title' => 'Quick Steps to Embroidery Success  - Easy Applique     ',\n\t\t\t'video' => 'qstoeasyappliquefinal.mp4'\n\t\t),\n\t\tarray( 'title' => 'Quick Steps to Embroidery Success  - 3D Foam ', 'video' => 'foamandfauxfoam.mp4   ' ),\n\t\tarray( 'title' => 'Wilcom Basics and Beyond - Part 1', 'video' => 'basicwilcomvideo1.mp4' ),\n\t\tarray( 'title' => 'Wilcom Basics and Beyond - Part 2', 'video' => 'basicwilcomvideo2.mp4' ),\n\t\tarray( 'title' => 'Wilcom Basics and Beyond - Part 3', 'video' => 'basicwilcompart3finalfinalfinal.mp4' ),\n\t\tarray( 'title' => 'Wilcom Basics and Beyond - Part 4', 'video' => 'basicwilcomvideo4final.mp4' ),\n\t\tarray( 'title' => 'Wilcom Basics and Beyond - Part 4', 'video' => 'missing?' ),\n\n\t);\n\n\t$user = get_user_by( 'email', '[email protected]' );\n\tif ( ! $user ) {\n\t\t$userdata = array(\n\t\t\t'user_login' => 'Balboa Threadworks',\n\t\t\t'user_nicename' => 'Balboa Threadworks',\n\t\t\t'user_pass' => md5( __FILE__ ),\n\t\t\t'user_email' => '[email protected]',\n\t\t\t'role' => 'Author',\n\t\t);\n\n\t\t$user_id = wp_insert_user( $userdata );\n\t} else {\n\t\t$user_id = $user->ID;\n\t}\n\n\n\tforeach ( $classes as $index => $info ) {\n\t\t$post = get_page_by_title( $info['title'], OBJECT, Classes::POST_TYPE );\n\t\tif ( empty( $post ) ) {\n\t\t\t$my_post = array(\n\t\t\t\t'post_title' => wp_strip_all_tags( $info['title'] ),\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'post_author' => $user_id,\n\t\t\t\t'post_type' => Classes::POST_TYPE,\n\t\t\t);\n\n\t\t\t// Insert the post into the database\n\t\t\t$post_id = wp_insert_post( $my_post );\n\n\t\t\t$meta_key = Classes::VIDEO_META_KEY;\n\t\t\tupdate_post_meta( $post_id, $meta_key, $info['video'] );\n\t\t}\n\t}\n}", "public function load()\n {\n $db = db::obtain();\n $data = $db->fetch_array_pdo('SELECT * FROM '.db::real_tablename('champions'), []);\n $r = [];\n foreach ($data as $k => $v) {\n $hero = new hero();\n $hero->set_array($v);\n $r[$hero->get('key')] = $hero;\n }\n\n return $r;\n }", "public static function init() {\r\n\t\r\n\t\tforeach(self::$_classes as $var=>$class) {\r\n\t\t\t\t\r\n\t\t\t$$var = new $class();\r\n\t\t}\r\n\t}", "function __autoload( $className ){\n require_once 'classes/'.$className.'.class.php';\n }", "function __autoload($className){\n include_once \"Classes/$className.php\";\n}", "public function fetchClazz(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM clazz\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function loadAllClassesIncrementally()\n {\n }", "function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}", "function createLibClassArray(){\n return array(\n \"MA2090\",\n \"ED3700\",\n \"ML4220\",\n \"EL1000\",\n \"VA2010\",\n \"PY2010\",\n \"HI2681\",\n \"BS2400\",\n \"BS2401\",\n \"MA2310\",\n \"ED3820\",\n \"ML1100\",\n \"EL2206\",\n \"VA2020\",\n \"PY3410\",\n \"AS2112\",\n \"CP2220\",\n \"CP2221\",\n \"CS2511\",\n \"ED3950\",\n \"ML1101\",\n \"EL4312\",\n \"VA2030\",\n \"PY3420\",\n \"HI3091\",\n \"BS2410\",\n \"BS2411\",\n \"CS2511\",\n \"EL3865\",\n \"VA3100\",\n \"HI2810\",\n \"HI3002\",\n \"HI3011\",\n \"HI3021\"\n );\n }", "public function load($className);", "public function __construct(array $donnees) {\n $this->hydrate($donnees);\n\n }", "public function __construct($data, $archivo)\n {\n $this->nombre = $data[\"nombre\"];\n $this->apellido = $data[\"telefono\"];\n $this->domicilio = $data[\"domicilio\"];\n $this->cp = $data[\"cp\"];\n $this->provincia = $data[\"provincia\"];\n $this->localidad = $data[\"localidad\"];\n $this->nacionalidad = $data[\"nacionalidad\"];\n $this->dni = $data[\"dni\"];\n $this->fecha = $data[\"fecha\"];//nacimiento\n $this->estado = $data[\"estado\"];//civil\n $this->email = $data[\"email\"];\n $this->telefono = $data[\"telefono\"];\n $this->postular = $data[\"postular\"];//OBJ\n //ARRAY\n $this->puesto_trabajos = $data[\"puesto_trabajos\"];\n //$this->trabajos_seniority = $data[\"trabajos_seniority\"];\n $this->empresa_trabajos = $data[\"empresa_trabajos\"];\n $this->trabajos_pais = $data[\"trabajos_pais\"];\n $this->industria_trabajos = $data[\"industria_trabajos\"];\n $this->area_trabajos = $data[\"area_trabajos\"];\n $this->actual_trabajos = isset($data[\"actual_trabajos\"]) ? $data[\"actual_trabajos\"] : [];\n $this->desde_trabajos = $data[\"desde_trabajos\"];\n $this->hasta_trabajos = isset($data[\"hasta_trabajos\"]) ? $data[\"hasta_trabajos\"] : [];\n $this->descripcion_trabajos = $data[\"descripcion_trabajos\"];\n $this->titulo_educacion = $data[\"titulo_educacion\"];\n $this->educacion_pais = $data[\"educacion_pais\"];\n $this->educacion_area = $data[\"educacion_area\"];\n $this->educacion_nivel = $data[\"educacion_nivel\"];\n $this->educacion_estado = $data[\"educacion_estado\"];\n $this->desde_educacion = $data[\"desde_educacion\"];\n $this->hasta_educacion = isset($data[\"hasta_educacion\"]) ? $data[\"hasta_educacion\"] : [];\n $this->descripcion_educacion = $data[\"descripcion_educacion\"];\n $this->url_redes = $data[\"url_redes\"];\n\n $this->remuneracion = $data[\"remuneracion\"];\n $this->mensaje = $data[\"mensaje\"];\n\n $this->archivo = $archivo;\n }", "public function fetchAllObj(string $class = null): array\n {\n if (!$this->wasExecuted()) {\n $this->exec();\n }\n\n if ($class === null) {\n return $this->getAdapter()->getStatement()->fetchAll(\\PDO::FETCH_OBJ);\n } else {\n $objectInstances = [];\n\n foreach ($this->fetchAll() as $r) {\n $objectInstances[] = new $class($r);\n }\n\n return $objectInstances;\n }\n }", "static public function loader($class){\n if(in_array($class, self::entities)) {\n require(\"../entity/\" . $class . \".php\");\n }\n elseif (in_array($class, self::managers)) {\n require(\"../model/\" . $class . \".php\");\n }\n else{\n if(in_array($class, self::services)) {\n require(\"../services/\" . $class . \".php\");\n }\n }\n }", "public function provider_load() {\n return array(\n array(\n 'text',// Field.\n array(// Post.\n 'text' => 'test',\n ),\n 'test', // Expected.\n ),\n );\n }", "function autoloadClass($classe)\n{\n require $classe . \".php\";\n}", "function loader($class){\n $class_file = DIR. DS . $class . '.php';\n\n if(file_exists($class_file)){\n require_once($class_file);\n }else{\n foreach (AUTOLOAD_CLASSES as $path){\n $class_file = $path . DS . $class . '.php';\n if(file_exists($class_file)) require_once($class_file);\n }\n }\n}", "function sourceArray($srcClassName) {\n // Returns an array which contains method source and args.\n\n $ref = new ReflectionClass($srcClassName);\n\n $refMethods = $ref->getMethods();\n // Possible replacement: get_class_methods()?\n\n $objectArray = array();\n foreach ($refMethods as $refMethod) {\n $method = $refMethod->name;\n\n // Get a string of a method's source, in a single line.\n // XXX: Y u no cache file\n $filename = $refMethod->getFileName();\n if (!empty($filename)) {\n $source = getSource($srcClassName, $method, $filename);\n } else {\n // We presume that if no filename is found, the method is\n // built-in and we are unconcerned with it\n debugMsg(\"Skipping builtin method $method\");\n continue;\n }\n \n // Check to determine whether the method being inspected is static\n $isStatic = $refMethod->isStatic();\n\n // Get a comma-seperated string of parameters, wrap them in\n // a method definition. Note that all your methods\n // just became public.\n $params = prepareParametersString($refMethod, false); \n $paramsDefault = prepareParametersString($refMethod); \n if ($isStatic) {\n // unconfirmed as of yet\n $methodHeader = \"public static function $method({$paramsDefault})\";\n } else {\n $methodHeader = \"public function $method({$paramsDefault})\";\n }\n\n // Return the two components mentioned above, indexed by method name\n // XXX: Only send one of the params vars, processing on other end\n $objectArray[$method] = array(\"params\" => $params, \"paramsDefault\" => $paramsDefault, 'methodHeader' => $methodHeader, 'src' => $source, 'isStatic' => $isStatic);\n }\n return $objectArray;\n}", "public function load(array $data);", "function __autoload($class_name){\n\t$archives = ['app/conexao/'.$class_name.'.php',\n\t\t\t'app/controller/'.$class_name.'.php',\n\t\t\t'app/model/'.$class_name.'.php',\n\t\t\t'app/view/'.$class_name.'.php'];\n\t\t\n\t\tforeach ($archives as $archive) {\n\t\t\tif(file_exists($archive)){\n\t\t\t\trequire_once $archive;\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function loadFactoriesClassNames(): array;", "public function recargar() {\n $this->cargarActas();\n }", "private function cargarActas() {\n $this->aActas = array();\n $res = Funciones::gEjecutarSQL(\"SELECT FECHA,DATE_FORMAT(FECHA,'%d-%m-%Y') AS FECHAISO,COUNT(*) AS PUNTOS FROM ACTAS_PUNTOS GROUP BY FECHA ORDER BY FECHA DESC\");\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n $this->aActas[$aRow['FECHA']] = array($aRow['FECHAISO'], $aRow['PUNTOS']);\n }\n $res->closeCursor(); \n }", "function __autoload($class_name) {\n\n require_once $class_name . '.class.php';\n\t\n}", "function geraClassesBD(){\n # Abre o template da classe BD e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloBD.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeTabela = ucfirst((string)$aTabela['NOME']);\n $nomeClasse = $this->getCamelMode($nomeTabela);\n $modeloTemp = NULL;\n $copiaModelo = $modelo;\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%NOME_CLASSE%%',$nomeClasse,$copiaModelo);\n\n # Complementos adicionais para classes especificas\n switch($nomeClasse){\n case 'Grupoprograma':\n case 'Modulo':\n case 'Programa':\n case 'Usuario':\n case 'Usuariogrupo':\n $modeloTemp = Util::getConteudoTemplate(\"class.Modelo.$nomeClasse\".\"BD.php\");\t\t\t\n $copiaModelo = str_replace('%%COMPLEMENTO%%',$modeloTemp,$copiaModelo);\n break;\n\n default: \n $copiaModelo = str_replace('%%COMPLEMENTO%%','',$copiaModelo);\t\n break;\n }\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/bd\";\n if(!file_exists($dir)) \n mkdir($dir);\n $fp = fopen(\"$dir/class.$nomeClasse\".\"BD.php\",\"w\");\n fputs($fp, $copiaModelo);\n fclose($fp);\n }\n return true;\t\n }", "public function load() {\n foreach ($this->bundles as $bundle) {\n \n $class = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($bundle);\n \n $prefix = '';\n $this->location[$class->getShortName()] = \\Raptor\\Util\\ClassLocation::getLocation($bundle);\n $this->specif[$class->getShortName()] = array('location' => \\Raptor\\Util\\ClassLocation::getLocation($bundle), 'namespace' => $class->getNamespaceName(), 'name' => $class->getName());\n if (!$class->getReflectionDocComment()->isEmpty() and $class->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $class->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefix = $obj[0]->getDescription();\n }\n \n $controllerDir = \\Raptor\\Util\\ClassLocation::getLocation($bundle) . '/Controller';\n $listfiles= \\Raptor\\Util\\Files::find($controllerDir, \"*Controller.php\");\n \n foreach ($listfiles as $nombre_fichero) {\n $prefixController = $prefix;\n $namespaceSrc = explode('src', $nombre_fichero);\n $real = array();\n if (count($namespaceSrc) > 1)\n $real = $namespaceSrc[1];\n else {\n $namespaceSrc = explode('libs', $nombre_fichero);\n $real = $namespaceSrc[1];\n }\n $namespaceClass = str_replace('.php', '', $real);\n $namespace = str_replace('/', '\\\\', $namespaceClass);\n \n $controller = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($namespace);\n if (!$controller->getReflectionDocComment()->isEmpty() and $controller->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $controller->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefixController = $prefixController . $obj[0]->getDescription();\n }\n\n foreach ($controller->getMethods() as $method) {\n /**\n * Searching the API in any method of controller classes\n */\n $api = new \\stdClass();\n $api->hasApi = false;\n $api->version = '0.0.0';\n $api->text = '';\n $doc = $method->getReflectionDocComment();\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('api')) {\n $api->text = $method->getReflectionDocComment()->getFullDescription();\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('api');\n $api->category = $collectionDescrip[0]->getDescription();\n $api->class = $method->getDeclaringClass()->getName();\n $api->bundle = $class->getName();\n $api->method = $method->getName();\n $api->hasApi = true;\n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $collectionRoute = $collectionRouteObj[0];\n $api->route=$prefixController . $collectionRoute->getDescription();\n }else{\n $api->route=false;\n }\n \n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('version')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('version');\n $collectionRoute = $collectionRouteObj[0];\n $api->version=$collectionRoute->getDescription();\n }\n }\n if ($api->hasApi) {\n if (!isset($this->api[$api->category]))\n $this->api[$api->category] = array();\n $this->api[$api->category][] = $api;\n }\n \n if (!$method->getReflectionDocComment()->isEmpty() and $method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('RouteName')) {\n $collectionNameObj = $doc->getAnnotationsCollection()->getAnnotation('RouteName');\n $collectionName = $collectionNameObj[0]->getDescription();\n } else {\n $routeArray = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $Route = $routeArray[0];\n $collectionName = str_replace('/', '_', $prefixController . $Route->getDescription());\n }\n\n \n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n \n $collectionRoute = $collectionRouteObj[0];\n $descrip=\"\";\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Description')) {\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('Description');\n $descrip = $collectionDescrip[0]->getDescription();\n }\n $methodName='ANY';\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Method')) {\n $collectionMethod = $doc->getAnnotationsCollection()->getAnnotation('Method');\n $methodName = $collectionMethod[0]->getDescription();\n }\n \n $this->definitions[$collectionName]=$api;\n $this->definitions[$collectionName] = array($prefixController . $collectionRoute->getDescription(), $method->getDeclaringClass()->getName(), $method->getName(), $class->getName(),'method'=>$methodName);\n $this->description[$prefixController . $collectionRoute->getDescription()]=array($descrip,$method->getReflectionDocComment()->getFullDescription());\n \n }\n }\n }\n }\n \n }", "function __autoload($class_name) {include $class_name . '.php';}", "function __autoload($clase){\n include $clase.'.class.php';\n }", "public static function autoload($class)\n{\n\n\t$paths = self::getPaths();\n\n\t$flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE;\n\n\t$file=str_replace('/', \"\\\\\", $class);\t\n\t$file=str_replace(\"\\\\\", DIRECTORY_SEPARATOR, trim($file, \"\\\\\")).'.php';\n\n\t//$file = strtolower(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, trim($class, \"\\\\\"))).\".php\";\n\t//echo \"<br>$file<br>(\".strpos(\"mk\\\\\",$file).')';\n\t\n\tif (strpos($file,\"Mk\".DIRECTORY_SEPARATOR)===false)\n\t{\t\n\t//echo \"entro<hr>\";\n\t\tif (strpos($file,'_controller')>0)\n\t\t{\n\t\t\t$classFile=basename($file,'_controller.php');\n\t\t\t\t//echo \"classfile; $classFile\";\n\t\t\t$combined=MODULE_PATH.DIRECTORY_SEPARATOR.$classFile.DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$file;\n\t\t\t//echo \"1Se Busco $combined ($class)\";\t\n\t\t\tif (file_exists($combined))\n\t\t\t{\n\t\t\t\tinclude($combined);\n\t\t\t\t//echo \"<br>Se encontro la clase $combined\";\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$classFile=basename($file,'.php');\n\t\t//echo \"$classFile\";\n\t\t$combined=MODULE_PATH.DIRECTORY_SEPARATOR.$classFile.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.$file;\n\t\t//echo \"2Se Busco $combined ($class)\";\t\n\t\tif (file_exists($combined))\n\t\t{\n\t\t\tinclude($combined);\n\t\t\t//\\Mk\\Debug::msg(\"Se encontro la clase $combined\");\t\n\t\t\treturn;\n\t\t}\n\n\t\t//$session = \\Mk\\Registry::get(\"session\");\n\t\t//$classFile=$session-> get(\"cur_model_path\");\n/*\t\tif ($classFile!='')\n\t\t{\n\t\t\t\n\t\t\t//\\Mk\\Debug::smsg(\"$classFile\",'cur_model_path');\n\t\t\t$combined=MODULE_PATH.DIRECTORY_SEPARATOR.$classFile.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.$file;\n\t\t\t//echo \"<br>3Se Busco $combined ($class)\";\t\n\t\t\tif (file_exists($combined))\n\t\t\t{\n\t\t\t\tinclude($combined);\n\t\t\t\t//\\Mk\\Debug::smsg(\"Se encontro la clase $combined\",'',3);\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n*/\n\n\t\tforeach ($paths as $path)\n\t\t{\n\t\t\t$combined = str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $path.DIRECTORY_SEPARATOR.$file);\n\t\t\t//echo \"<br>**$combined\";\n\t\t\tif (file_exists($combined))\n\t\t\t{\n\t\t\t\t//echo \"<br>(4)Se encontro la clase $combined\";\t\n\t\t\t\tinclude($combined);\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//echo \"<hr>Se busco y no se encontro en $combined/ (( $class )) (\".APP_PATH.'**'.getcwd().\")\";\t\n\t }\n\n\t}\n\n\t\n echo \"<hr><span style='color:red'>Se busco y no se encontro en $combined/ (( $class )) (\".APP_PATH.'**'.getcwd().\")</span>\";\t\n $deb=debug_backtrace();\n foreach ($deb as $k => $v) {\n \\Mk\\Debug::msg($v,3,3);\n }\n throw new \\Exception(\" La clase ({$class}) No se encuentra!!!.\");\n}", "private static function _load() {\n $kategorier = Yaml::parse( file_get_contents( UKMrapporter::getPluginPath() .'rapporter/kategorier.yml') );\n foreach( $kategorier as $id => $kategori_data ) {\n $kategori = new Kategori( $id, $kategori_data );\n static::$data[ $kategori->getId() ] = $kategori;\n }\n }", "public function init()\n {\n $this->_Users = new Users();\n $this->_VotsTaula = new VotsTaula();\n $this->_Categories = new Categories();\n $this->_NoticiaTaula = new NoticiaTaula();\n $this->_ComentarisTaula = new ComentarisTaula();\n $this->_NoticiesFavoritas = new NoticiesFavoritas();\n $this->_Seguidors = new Seguidors();\n $this->_Contactar = new Contactar();\n $this->_Notificaciones = new Notificaciones();\n\n }", "function __autoload($classe)\r\n{\r\n\t// Retorna algo como C:\\xampp\\htdocs\\Orion\\asspa\\gc\\\r\n\t$CAMINHO \t= str_replace(\"config.php\",\"\",__FILE__);\r\n\t$DS\t\t\t= DIRECTORY_SEPARATOR;\r\n\t// Essa função procura a classe no caminho especificado.\r\n if (file_exists(\"$CAMINHO$classe.class.php\"))\r\n {\r\n include_once \"$CAMINHO$classe.class.php\";\r\n }\r\n}", "function __autoload($class_name0) {\n\n\t// casos especiais\n\tif ($class_name0==\"datalog\") {\n\t\t$class_name0=\"pdata\";\n\t}\n\n\n\t$class_name = strtolower($class_name0);\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".nx\";\n\t$file[]=DIRNLIB.\"cls_\".$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".nx\";\n\t$file[]=CORENLIB.$class_name.\".nx\";\n\t$file[]=CORENLIB.$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls.nx\";\t\n\t\n\n\tforeach ($file as $v) {\n\t\tif (file_exists($v)) {\n\t\t\trequire_once ($v);\n\t\t\treturn;\n\t\t}\n\t}\n\tdie (\"CLASS NAME: '$class_name' NOT FOUND\");\n}", "public function getClassLoaders();", "abstract protected function loadExposedObjects();", "public function loadClasses(){\n spl_autoload_register(function($className){\n require_once preg_replace(\"/\\\\\\\\/\", \"/\", $className).\".php\";\n });\n }", "private function autoload($className)\r\n {\r\n }", "public function load()\n {\n $data = array(\n 'get' => (isset($_GET)) ? $_GET : null, \n 'post' => (isset($_POST)) ? $_POST : null,\n 'request' => (isset($_REQUEST)) ? $_REQUEST : null,\n 'files' => (isset($_FILES)) ? $_FILES : null,\n 'server' => (isset($_SERVER)) ? $_SERVER : null,\n 'session' => (isset($_SESSION)) ? $_SESSION : null\n );\n\n foreach ($data as $name => $value) {\n if ($value !== null) {\n $this->$name = $value;\n $global = strtoupper($name);\n unset($$global);\n }\n }\n }", "private function loadBones($className) {\n // Load dem bones\n $requiredBone = $className . EXT;\n foreach($this->bones as $bone) {\n $bonePath = str_replace(['/', '\\\\'], DIRECTORY_SEPARATOR, join([SKELETON_PATH, $bone, DIRECTORY_SEPARATOR, $requiredBone]));\n if(file_exists($bonePath)) {\n require $bonePath;\n $this->loadedBones[] = basename($bonePath, EXT);\n break;\n }\n }\n }", "public function loadAll() {\n $gerimu_masyvas = [];\n\n foreach ($this->db->getRows($this->table_name) as $gerimas) {\n $gerimu_masyvas[] = new \\App\\Item\\Gerimas($gerimas);\n }\n\n return $gerimu_masyvas;\n }", "function __autoload($classe) {\n\n $classe = strtolower($classe);\n\n if (file_exists(__DIR__.\"/{$classe}.php\"))\n include_once __DIR__.\"/{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././model/class.{$classe}.php\"))\n include_once __DIR__.\"/.././model/class.{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././controller/class.{$classe}.php\"))\n include_once __DIR__.\"/.././controller/class.{$classe}.php\";\n}", "public function __load();", "function loadClass($className)\r\n{\r\n require $className . '.php';\r\n}", "function __autoload($className)\r\n{\r\n require_once $className . '.php';\r\n}", "private function orderInstances() : array\n\t{\n\t\t$InstanceFiles = array();\n\n\t\tforeach( Helper::getDirectoryContents( $this->ArchivePath ) as $class )\n\t\t{\n\t\t\tforeach( Helper::getDirectoryContents( $this->ArchivePath . $class ) as $filename )\n\t\t\t{\n\t\t\t\tif( $this->isJsonFile( $filename ) )\n\t\t\t\t{\n\t\t\t\t\t$index = substr( $filename, 0, strpos( $filename, '-' ) );\n\t\t\t\t\t$InstanceFiles[$index] = $this->ArchivePath . \"$class/$filename\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tksort( $InstanceFiles );\n\t\treturn $InstanceFiles;\n\t}", "public static function autoload() {\n // autoload\n include('cache/classes.yml.php');\n foreach($return as $class) {\n require_once($class);\n }\n }" ]
[ "0.66470855", "0.62646455", "0.61982894", "0.61563396", "0.61517954", "0.61340576", "0.61304104", "0.60375494", "0.6016654", "0.6004739", "0.59652877", "0.59338295", "0.5901618", "0.5886792", "0.5843145", "0.5833798", "0.58225805", "0.58217704", "0.5797647", "0.5797647", "0.57786006", "0.57755935", "0.5774955", "0.57742417", "0.5763603", "0.57483166", "0.57422346", "0.57259935", "0.57243806", "0.57243806", "0.57243806", "0.57155216", "0.5711241", "0.5711241", "0.5709931", "0.57023597", "0.5695043", "0.56938255", "0.5689588", "0.5675554", "0.56737196", "0.5665436", "0.56652445", "0.5647687", "0.5637965", "0.56263167", "0.56173265", "0.56071955", "0.55961865", "0.55893445", "0.5587016", "0.55801904", "0.5562865", "0.5545773", "0.5539706", "0.55393815", "0.55328584", "0.5520376", "0.55093515", "0.5499739", "0.5495071", "0.5485424", "0.54656976", "0.5464922", "0.54604983", "0.5440156", "0.54308164", "0.54290295", "0.541661", "0.5412968", "0.54091805", "0.5406175", "0.5402696", "0.5397912", "0.53972405", "0.539254", "0.5389879", "0.5389557", "0.5389127", "0.5372005", "0.5371546", "0.53693944", "0.53645587", "0.53623074", "0.5356162", "0.53543305", "0.5352423", "0.53474814", "0.534683", "0.5344411", "0.5336577", "0.5335478", "0.5335214", "0.5332771", "0.53322065", "0.5321815", "0.5319487", "0.53194666", "0.53182554", "0.5317017", "0.5309697" ]
0.0
-1
functions for our custom Roles Group the roles for easy reference
function eman_roles( $type='turner' ) { switch ( $type ) { case 'owner' : return array('owner','owners_rep','consultant'); break; case 'sub' : return array('subcontractor'); break; case 'pending' : return array('subscriber'); break; case 'turner' : return array('administrator','editor'); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getRoles();", "public function roles();", "public function roles();", "public function roles();", "public function roles();", "function wp_roles()\n {\n }", "public function & GetRoles ();", "function egsr_custom_site_roles(){\n\n return Array ( \n // STAFF_ROLE => Array (\n // 'label' => STAFF_ROLE_LABEL,\n // 'caps' => egsr_staff_cap(),\n // ),\n GROUP_EDITOR_ROLE => Array (\n 'label' => GROUP_EDITOR_ROLE_LABEL,\n 'caps' => egsr_group_editor_cap(),\n ),\n GROUP_ADMIN_ROLE => Array (\n 'label' => GROUP_ADMIN_ROLE_LABEL,\n 'caps' => egsr_group_admin_cap(),\n ),\n );\n\n}", "function populate_roles()\n {\n }", "function get_roles( ) {\n\n\n global $wp_roles;\n $default_roles = array();\n //$default_roles = array('administrator','editor', 'author', 'contributor', 'subscriber', 'pending');\n\n\n $roles = $wp_roles->get_names();\n // dump($roles);\n\n $roless['Bez ograniczeń'] = '';\nforeach($roles as $role => $name){\n if(!in_array( $role, $default_roles)){\n $roless[$name] = $role;\n }\n}\n\n //dump($roless);\nreturn $roless;\n /*\n $categories = get_categories( $args );\n $cat[__('Wybierz kategorię')] = '';\n foreach( $categories as $category ) {\n\t$cat[$category->name] = $category->term_id;\n }\n return $cat;\n */\n}", "function populate_roles_210()\n {\n }", "static function group(): string { return 'roles'; }", "function hook_roles() {\n\t\treturn null;\n\t}", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "protected function get_roles_data()\n {\n }", "public function findRoles() {\n\t\t\n\t}", "function populate_roles_280()\n {\n }", "protected abstract function getAllowedRoles();", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "function populate_roles_230()\n {\n }", "function egsr_add_group_site_roles()\n{\n // Exit if script is run from other than Admin\n if ( !current_user_can('administrator') ) {\n return;\n }\n $group_site_roles = egsr_custom_site_roles();\n foreach ($group_site_roles as $key => $value) {\n $role = get_role($key);\n // Check if Role doesn't exist already\n if(!isset($role->name) == $key){\n // Add role + capabilities\n add_role(\n $key,\n $value['label'],\n $value['caps']\n );\n }\n }\n}", "public function init_roles()\n {\n }", "function populate_roles_270()\n {\n }", "function populate_roles_160()\n {\n }", "static function add_roles(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::roles, [\r\n\t\t\t'label' => 'Roles',\r\n\t\t\t'type' => 'repeater',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'collapsed' => '',\r\n\t\t\t'min' => '1',\r\n\t\t\t'max' => '',\r\n\t\t\t'layout' => 'block',\r\n\t\t\t'button_label' => 'Add role'\r\n\t\t]);\r\n\t}", "function populate_roles_260()\n {\n }", "public function rolesForUser();", "function reset_role( $role ) {\n $default_roles = array(\n 'administrator' => array(\n 'switch_themes' => 1,\n 'edit_themes' => 1,\n 'activate_plugins' => 1,\n 'edit_plugins' => 1,\n 'edit_users' => 1,\n 'edit_files' => 1,\n 'manage_options' => 1,\n 'moderate_comments' => 1,\n 'manage_categories' => 1,\n 'manage_links' => 1,\n 'upload_files' => 1,\n 'import' => 1,\n 'unfiltered_html' => 1,\n 'edit_posts' => 1,\n 'edit_others_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'edit_pages' => 1,\n 'read' => 1,\n 'level_10' => 1,\n 'level_9' => 1,\n 'level_8' => 1,\n 'level_7' => 1,\n 'level_6' => 1,\n 'level_5' => 1,\n 'level_4' => 1,\n 'level_3' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'edit_others_pages' => 1,\n 'edit_published_pages' => 1,\n 'publish_pages' => 1,\n 'delete_pages' => 1,\n 'delete_others_pages' => 1,\n 'delete_published_pages' => 1,\n 'delete_posts' => 1,\n 'delete_others_posts' => 1,\n 'delete_published_posts' => 1,\n 'delete_private_posts' => 1,\n 'edit_private_posts' => 1,\n 'read_private_posts' => 1,\n 'delete_private_pages' => 1,\n 'edit_private_pages' => 1,\n 'read_private_pages' => 1,\n 'delete_users' => 1,\n 'create_users' => 1,\n 'unfiltered_upload' => 1,\n 'edit_dashboard' => 1,\n 'update_plugins' => 1,\n 'delete_plugins' => 1,\n 'install_plugins' => 1,\n 'update_themes' => 1,\n 'install_themes' => 1,\n 'update_core' => 1,\n 'list_users' => 1,\n 'remove_users' => 1,\n 'add_users' => 1,\n 'promote_users' => 1,\n 'edit_theme_options' => 1,\n 'delete_themes' => 1,\n 'export' => 1,\n ),\n \n 'editor' => array(\n 'moderate_comments' => 1,\n 'manage_categories' => 1,\n 'manage_links' => 1,\n 'upload_files' => 1,\n 'unfiltered_html' => 1,\n 'edit_posts' => 1,\n 'edit_others_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'edit_pages' => 1,\n 'read' => 1,\n 'level_7' => 1,\n 'level_6' => 1,\n 'level_5' => 1,\n 'level_4' => 1,\n 'level_3' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'edit_others_pages' => 1,\n 'edit_published_pages' => 1,\n 'publish_pages' => 1,\n 'delete_pages' => 1,\n 'delete_others_pages' => 1,\n 'delete_published_pages' => 1,\n 'delete_posts' => 1,\n 'delete_others_posts' => 1,\n 'delete_published_posts' => 1,\n 'delete_private_posts' => 1,\n 'edit_private_posts' => 1,\n 'read_private_posts' => 1,\n 'delete_private_pages' => 1,\n 'edit_private_pages' => 1,\n 'read_private_pages' => 1,\n ),\n \n 'author' => array(\n 'upload_files' => 1,\n 'edit_posts' => 1,\n 'edit_published_posts' => 1,\n 'publish_posts' => 1,\n 'read' => 1,\n 'level_2' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'delete_posts' => 1,\n 'delete_published_posts' => 1,\n ),\n \n 'contributor' => array(\n 'edit_posts' => 1,\n 'read' => 1,\n 'level_1' => 1,\n 'level_0' => 1,\n 'delete_posts' => 1,\n ),\n \n 'subscriber' => array(\n 'read' => 1,\n 'level_0' => 1,\n ),\n \n 'display_name' => array(\n 'administrator' => 'Administrator',\n 'editor'\t=> 'Editor',\n 'author'\t=> 'Author',\n 'contributor' => 'Contributor',\n 'subscriber'\t=> 'Subscriber',\n ),\n \n );\n \n $role = strtolower( $role );\n \n remove_role( $role );\n \n return add_role( $role, $default_roles['display_name'][$role], $default_roles[$role] );\n}", "function populate_roles_250()\n {\n }", "function product_line_roles_fun() {\r\n return array(\r\n 'Ventilation' => 'permissiondata',\r\n 'Compression' => 'permissiondata',\r\n 'Infrastructure' => 'permissiondata',\r\n 'Stapling' => 'vlex_permissiondata',\r\n 'Patient Monitoring' => 'vlex_permissiondata',\r\n 'Ablation' => 'vlex_permissiondata',\r\n 'Vessel Sealing' => 'vlex_permissiondata',\r\n );\r\n}", "function populate_roles_300()\n {\n }", "function um_roles_init( $wp_roles = null ) {\r\n\r\n\t\t\t//Add UM role data to WP Roles\r\n\t\t\tforeach ( $wp_roles->roles as $roleID => $role_data ) {\r\n\t\t\t\t$role_meta = get_option( \"um_role_{$roleID}_meta\" );\r\n\r\n\t\t\t\tif ( ! empty( $role_meta ) )\r\n\t\t\t\t\t$wp_roles->roles[$roleID] = array_merge( $role_data, $role_meta );\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//Add custom UM roles\r\n\t\t\t$roles = array();\r\n\r\n\t\t\t$role_keys = get_option( 'um_roles' );\r\n\r\n\t\t\tif ( $role_keys ) {\r\n\r\n\t\t\t\tforeach ( $role_keys as $role_key ) {\r\n\t\t\t\t\t$role_meta = get_option( \"um_role_{$role_key}_meta\" );\r\n\t\t\t\t\tif ( $role_meta ) {\r\n\t\t\t\t\t\t//$role_meta['name'] = 'UM ' . $role_meta['name'];\r\n\t\t\t\t\t\t$roles['um_' . $role_key] = $role_meta;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tforeach ( $roles as $role_id => $details ) {\r\n\t\t\t\t\t$capabilities = ! empty( $details['wp_capabilities'] ) ? array_keys( $details['wp_capabilities'] ) : array();\r\n\t\t\t\t\t$details['capabilities'] = array_fill_keys( array_values( $capabilities ), true );\r\n\t\t\t\t\tunset( $details['wp_capabilities'] );\r\n\t\t\t\t\t$wp_roles->roles[$role_id] = $details;\r\n\t\t\t\t\t$wp_roles->role_objects[$role_id] = new \\WP_Role( $role_id, $details['capabilities'] );\r\n\t\t\t\t\t$wp_roles->role_names[$role_id] = $details['name'];\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Return the modified $wp_roles array\r\n\t\t\treturn $wp_roles;\r\n\t\t}", "function wpbod_nombres_roles() {\n \n global $wp_roles;\n \n if ( ! isset( $wp_roles ) ) {\n $wp_roles = new WP_Roles();\n }\n \n $wp_roles->roles['contributor']['name'] = 'Profesor';\n $wp_roles->role_names['contributor'] = 'Profesor';\n \n $wp_roles->roles['subscriber']['name'] = 'Cliente';\n\t$wp_roles->role_names['subscriber'] = 'Cliente';\n\t\n\t$wp_roles->roles['customer']['name'] = 'Registro';\n $wp_roles->role_names['customer'] = 'Registro';\n\n \n}", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function get_role()\n {\n }", "function egsr_default_wp_site_roles(){\n\n return Array ( \n AUTHOR_ROLE => Array (\n 'label' => AUTHOR_ROLE_LABEL,\n 'caps' => egsr_author_cap(),\n ),\n CONTRIBUTOR_ROLE => Array (\n 'label' => CONTRIBUTOR_ROLE_LABEL,\n 'caps' => egsr_contributor_cap(),\n ),\n EDITOR_ROLE => Array (\n 'label' => EDITOR_ROLE_LABEL,\n 'caps' => egsr_editor_cap(),\n ),\n SUBSCRIBER_ROLE => Array (\n 'label' => SUBSCRIBER_ROLE_LABEL,\n 'caps' => egsr_subscriber_cap(),\n ),\n );\n\n}", "public function add_roles() {\n global $wp_roles;\n\n if ( ! class_exists( 'WP_Roles' ) ) {\n return;\n }\n\n if ( ! isset( $wp_roles ) ) {\n $wp_roles = new WP_Roles();\n }\n\n // Add customer role:\n add_role( 'customer', __( 'Customer', 'jpid' ), array(\n 'read' => true\n ) );\n\n // Add shop manager role:\n add_role( 'shop_manager', __( 'Shop Manager', 'jpid' ), array(\n 'read' => true,\n 'read_private_pages' => true,\n 'read_private_posts' => true,\n 'edit_users' => true,\n 'edit_posts' => true,\n 'edit_pages' => true,\n 'edit_published_posts' => true,\n 'edit_published_pages' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_others_posts' => true,\n 'edit_others_pages' => true,\n 'publish_posts' => true,\n 'publish_pages' => true,\n 'delete_posts' => true,\n 'delete_pages' => true,\n 'delete_private_pages' => true,\n 'delete_private_posts' => true,\n 'delete_published_pages' => true,\n 'delete_published_posts' => true,\n 'delete_others_posts' => true,\n 'delete_others_pages' => true,\n 'manage_categories' => true,\n 'manage_links' => true,\n 'moderate_comments' => true,\n 'unfiltered_html' => true,\n 'upload_files' => true,\n 'export' => true,\n 'import' => true,\n 'list_users' => true\n ) );\n }", "public function getRole() {}", "public function testRoleGroups()\n {\n }", "function psp_add_role_caps()\n{\n $roles = array('manager');\n\n // Loop through each role and assign capabilities\n foreach ($roles as $the_role) {\n\n $role = get_role($the_role);\n\n $role->add_cap('read');\n $role->add_cap('create_cpt_project');\n $role->add_cap('create_private_cpt_project');\n $role->add_cap('read_cpt_project');\n $role->add_cap('read_private_cpt_project');\n $role->add_cap('edit_cpt_project');\n $role->add_cap('edit_published_cpt_project');\n $role->add_cap('publish_cpt_project');\n $role->add_cap('delete_private_cpt_project');\n $role->add_cap('delete_published_cpt_project');\n\n }\n}", "function get_user_roles()\n{\n $roles = get_acl()->getRoles();\n foreach ($roles as $key => $val) {\n $roles[$val] = __(Inflector::humanize($val));\n unset($roles[$key]);\n }\n return $roles;\n}", "public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }", "function rets_bsf_loadroles () {\n\n $role = array();\n $ary = user_roles();\n foreach ($ary as $key => $value) {\n\tswitch ($value) {\n\t case ('basic membership') :\n $role[$key] = 'Basic';\n\t break;\n\t case ('gold membership') :\n\t $role[$key] = 'Gold';\n\t break;\n case ('platinum membership') :\n $role[$key] = 'Platinum';\n\t break;\n case ('team membership') :\n $role[$key] = 'Team';\n\t break;\n\t\tcase ('Agent') :\t\t\t\t\t\t// agent sites only have \"agents\"\n \t$role[$key] = 'Agent';\n\t break;\n\t}\n }\n return $role;\n}", "function get_editable_roles()\n {\n }", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function setRoles()\n {\n if (!array_key_exists(User::ROLE_ADMINISTRATOR, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $array = Yii::$app->authManager->getRoles();\n unset($array[self::ADMINISTRATOR]);\n } else {\n $array = Yii::$app->authManager->getRoles();\n }\n\n $roles = ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name');\n\n $now = Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId());\n\n //unset($roles[array_search('super_administrator', $roles)]);\n unset($roles[array_search('user', $roles)]);\n\n foreach ($roles as $key => $role) {\n $roles[$key] = Yii::t('backend', $role);\n }\n\n if (array_key_exists(User::ROLE_CUSTOMER, Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()))) {\n $key = array_search(User::ROLE_CUSTOMER, $roles);\n $roles = array_intersect_key($roles, [$key => $roles[$key]]);\n }\n\n return $roles;\n }", "public function getAvailableRoles() ;", "public function getRoles(): array;", "function gdlr_lms_add_user_role(){\r\n\t\tadd_role('instructor', __('Instructor', 'gdlr-lms'), \r\n\t\t\tarray('instructor'=>true, 'read'=>true, 'edit_users'=>true, 'edit_dashboard'=>true, 'upload_files'=>true,\r\n\t\t\t\t 'edit_course'=>true, 'edit_courses'=>true, 'edit_published_courses'=>true, 'publish_courses'=>true, 'delete_course'=>true, 'delete_courses'=>true, 'delete_published_courses'=>true,\r\n\t\t\t\t 'edit_quiz'=>true, 'edit_quizzes'=>true, 'edit_published_quizzes'=>true,'publish_quizzes'=>true, 'delete_quiz'=>true, 'delete_quizzes'=>true, 'delete_published_quizzes'=>true,\r\n\t\t\t\t 'course_taxes'=>true )\r\n\t\t);\r\n\t\tadd_role('student', __('Student', 'gdlr-lms'));\r\n\t\t\r\n\t\t$administrator = get_role('administrator');\r\n\t\t\r\n\t\t$administrator->add_cap('course_taxes');\r\n\t\t$administrator->add_cap('course_taxes_edit');\r\n\t\t$administrator->add_cap('edit_course');\r\n\t\t$administrator->add_cap('read_course');\r\n\t\t$administrator->add_cap('delete_course');\r\n\t\t$administrator->add_cap('edit_courses');\r\n\t\t$administrator->add_cap('edit_others_courses');\r\n\t\t$administrator->add_cap('publish_courses');\r\n\t\t$administrator->add_cap('read_private_courses');\r\n $administrator->add_cap('delete_courses');\r\n $administrator->add_cap('delete_private_courses');\r\n $administrator->add_cap('delete_published_courses');\r\n $administrator->add_cap('delete_others_courses');\r\n $administrator->add_cap('edit_private_courses');\r\n $administrator->add_cap('edit_published_courses');\t\r\n\r\n\t\t$administrator->add_cap('edit_quiz');\r\n\t\t$administrator->add_cap('read_quiz');\r\n\t\t$administrator->add_cap('delete_quiz');\r\n\t\t$administrator->add_cap('edit_quizzes');\r\n\t\t$administrator->add_cap('edit_others_quizzes');\r\n\t\t$administrator->add_cap('publish_quizzes');\r\n\t\t$administrator->add_cap('read_private_quizzes');\r\n $administrator->add_cap('delete_quizzes');\r\n $administrator->add_cap('delete_private_quizzes');\r\n $administrator->add_cap('delete_published_quizzes');\r\n $administrator->add_cap('delete_others_quizzes');\r\n $administrator->add_cap('edit_private_quizzes');\r\n $administrator->add_cap('edit_published_quizzes');\t\t\r\n\t\t\r\n\t\t// 1.01 capability fix\r\n\t\t$instructor = get_role('instructor');\r\n\t\t$instructor->add_cap('edit_published_courses');\r\n\t\t$instructor->add_cap('edit_published_quizzes');\r\n\t}", "private function setRoles() {\r\n\t\t$all_roles = array(); $role = Model_Role::retrieve(); \r\n\t\tforeach ($role->fetchEntries(array(\r\n \t\t'NAME', 'PARENT' => new Data_Column('PARENT_ROLE_ID', null, $role, 'NAME'))) as $rel)\r\n\t\t{\t\r\n \t\t$all_roles[$rel['NAME']] = array($rel['PARENT']);\r\n\t\t}\r\n\t\t\r\n\t\t// get users with role reslationship \r\n\t\t$userRole = Model_User_Role::retrieve(); \r\n\t\tforeach ($userRole->fetchEntries(array(\r\n \t\t'NAME' => new Data_Column('USER_ID', null, $userRole, 'LOGIN'),\r\n \t\t'PARENT' => new Data_Column('ROLE_ID', null, $userRole, 'NAME')), null, true) as $rel)\r\n\t\t{\t\t\t\r\n\t\t // one user can belong to more than one role\r\n\t\t\tif (array_key_exists($rel['NAME'], $all_roles))\r\n\t\t array_push($all_roles[$rel['NAME']], $rel['PARENT']);\r\n\t\t else\r\n\t\t $all_roles[$rel['NAME']] = array($rel['PARENT']);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// now register all roles and users from database as application roles\r\n\t\tforeach ($all_roles as $name => $roles) {\r\n\t\t $this->_registerRole($name, $all_roles);\r\n\t\t}\r\n\t\t\r\n\t\t//$this->_registerRole('Guest', array());\r\n\t}", "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "function get_roles( $add_default = false, $exclude = null ){\r\n\t\t\tglobal $wp_roles;\r\n\r\n\t\t\tif ( empty( $wp_roles ) ) {\r\n\t\t\t\treturn array();\r\n\t\t\t}\r\n\r\n\t\t\t$roles = $wp_roles->role_names;\r\n\r\n\t\t\tif ( $add_default ) {\r\n\t\t\t\t$roles[0] = $add_default;\r\n\t\t\t}\r\n\r\n\t\t\tif ( $exclude ) {\r\n\t\t\t\tforeach( $exclude as $role ) {\r\n\t\t\t\t\tunset( $roles[$role] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $roles;\r\n\t\t}", "abstract protected function rolePerms($role);", "public function getRoles()\n {\n return array(\"ROLE_\".$this->getUserGroup());\n }", "function egsr_add_default_wp_roles()\n{\n // Exit if script is run from other than Admin\n if ( !current_user_can('administrator') ) {\n return;\n }\n $group_site_roles = egsr_default_wp_site_roles();\n foreach ($group_site_roles as $key => $value) {\n $role = get_role($key);\n // Check if Role doesn't exist already\n if(!isset($role->name) == $key){\n // Add role + capabilities\n add_role(\n $key,\n $value['label'],\n $value['caps']\n );\n }\n }\n}", "public function getProductionRoles();", "function get_term_roles( $taxonomy = 'category', $role_type = 'rs' ) {\n\t\treturn array();\n\t}", "function egsr_change_roles_names() {\n global $wp_roles;\n \n if ( ! isset( $wp_roles ) )\n $wp_roles = new WP_Roles();\n \n $wp_site_roles = egsr_default_wp_site_roles();\n foreach ($wp_site_roles as $key => $value) {\n // Change role name\n $wp_roles->roles[$key]['name'] = $wp_roles->roles[$key]['name'] .' (Deprecated)';\n $wp_roles->role_names['contributor'] = $wp_roles->role_names[$key] .'$wp_roles->roles[$key]'; \n }\n}", "private function _getRole()\n {\n //return role\n if(false/*logged_in*/){\n\n }else{\n $this->load->Model('user_roles/Mdl_roles');\n return $this->Mdl_roles->getRolesName();\n }\n }", "protected function _initRoles () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aRoleListing = $oAclCache->load(self::CACHE_IDENTIFIER_ROLES)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Roles from the Database\r\n\t\t\t$oDaoRole = Kwgl_Db_Table::factory('System_Role'); /* @var $oDaoRole Dao_System_Role */\r\n\t\t\t//$aRoleListing = $oDaoRole->fetchAll();\r\n\t\t\t$aRoleListing = $oDaoRole->getRoles();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aRoleListing, self::CACHE_IDENTIFIER_ROLES);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aRoleListing as $aRoleDetail) {\r\n\t\t\t$sRoleName = $aRoleDetail['name'];\r\n\t\t\tif (is_null($aRoleDetail['parent'])) {\r\n\t\t\t\t// Add the Role if it hasn't been defined yet\r\n\t\t\t\tif (!$this->hasRole($sRoleName)) {\r\n\t\t\t\t\t$this->addRole(new Zend_Acl_Role($sRoleName));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Parent Role assigned\r\n\t\t\t\t$sRoleParentName = $aRoleDetail['parent'];\r\n\t\t\t\t// Add the Parent Role if the Parent Role hasn't been defined yet\r\n\t\t\t\tif (!$this->hasRole($sRoleParentName)) {\r\n\t\t\t\t\t$this->addRole(new Zend_Acl_Role($sRoleParentName));\r\n\t\t\t\t}\r\n\t\t\t\t$this->addRole(new Zend_Acl_Role($sRoleName), $sRoleParentName);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getRoles()\n {\n return array('1');\n }", "function acf_get_user_role_labels($roles = array())\n{\n}", "function groups_calculate_role_people($rs,$context) {\n global $CFG;\n if(!$rs) {\n return false;\n }\n \n $roles = get_records_menu('role', null, 'name', 'id, name');\n $aliasnames = role_fix_names($roles, $context);\n\n // Array of all involved roles\n $roles=array();\n // Array of all retrieved users\n $users=array();\n // Fill arrays\n while($rec=rs_fetch_next_record($rs)) {\n // Create information about user if this is a new one\n if(!array_key_exists($rec->userid,$users)) {\n // User data includes all the optional fields, but not any of the\n // stuff we added to get the role details\n $userdata=clone($rec);\n unset($userdata->roleid);\n unset($userdata->roleshortname);\n unset($userdata->rolename);\n unset($userdata->userid);\n $userdata->id=$rec->userid;\n\n // Make an array to hold the list of roles for this user\n $userdata->roles=array();\n $users[$rec->userid]=$userdata;\n }\n // If user has a role...\n if(!is_null($rec->roleid)) {\n // Create information about role if this is a new one\n if(!array_key_exists($rec->roleid,$roles)) {\n $roledata=new StdClass;\n $roledata->id=$rec->roleid;\n $roledata->shortname=$rec->roleshortname;\n if(array_key_exists($rec->roleid,$aliasnames)) {\n $roledata->name=$aliasnames[$rec->roleid];\n } else {\n $roledata->name=$rec->rolename;\n }\n $roledata->users=array();\n $roles[$roledata->id]=$roledata;\n }\n // Record that user has role\n $users[$rec->userid]->roles[] = $roles[$rec->roleid];\n }\n }\n rs_close($rs);\n\n // Return false if there weren't any users\n if(count($users)==0) {\n return false;\n }\n\n // Add pseudo-role for multiple roles\n $roledata=new StdClass;\n $roledata->name=get_string('multipleroles','role');\n $roledata->users=array();\n $roles['*']=$roledata;\n\n // Now we rearrange the data to store users by role\n foreach($users as $userid=>$userdata) {\n $rolecount=count($userdata->roles);\n if($rolecount==0) {\n debugging(\"Unexpected: user $userid is missing roles\");\n } else if($rolecount>1) {\n $roleid='*';\n } else {\n $roleid=$userdata->roles[0]->id;\n }\n $roles[$roleid]->users[$userid]=$userdata;\n }\n\n // Delete roles not used\n foreach($roles as $key=>$roledata) {\n if(count($roledata->users)===0) {\n unset($roles[$key]);\n }\n }\n\n // Return list of roles containing their users\n return $roles;\n}", "function add_cacheonium_roles(){\n $remove_roles = array('subscriber', 'contributor', 'author', 'editor');\n\n foreach($remove_roles as $role){\n remove_role( $role );\n }\n\n\n /* Add Cache Makers Roles */\n\n $staff = add_role(\n 'staff',__( 'Staff' ),\n array(\n 'read' => true, // true allows this capability\n 'edit_posts' => true,\n 'delete_posts' => true, // Use false to explicitly deny\n 'publish_posts' => true,\n 'publish_pages' => true,\n ''\n ));\n\n $maker = add_role(\n 'maker',__( 'Maker' ),\n array(\n 'read' => true, // true allows this capability\n ));\n\n $leader = add_role(\n 'leader',__( 'Leader' ),\n array(\n 'read' => true, // true allows this capability\n 'edit_posts' => true,\n 'delete_posts' => true, // Use false to explicitly deny\n ));\n\n }", "public function actionRoles()\n\t{\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/roles');\n\t\t\n\t\t$dataProvider = new RAuthItemDataProvider('roles', array(\n\t\t\t'type'=>CAuthItem::TYPE_ROLE,\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsRoleTableSort',\n\t\t\t\t'element'=>'.role-table',\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\n\t\t\t),\n\t\t));\n\n\t\t// Render the view\n\t\t$this->render('roles', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\n\t\t));\n\t}", "public function getRole();", "public function getRole();", "function current_user_roles($user_id = null)\n{\n if (!is_null($user_id)) {\n return \\Yii::$app->authManager->getRolesByUser($user_id);\n }\n\n// return \\base\\libs\\Redis::getUserRoles($user_id);\n}", "function owa_translate_role($roles) {\r\n\t\r\n\tif (!empty($roles)) {\r\n\t\r\n\t\tif (in_array('administrator', $roles)) {\r\n\t\t\t$owa_role = 'admin';\r\n\t\t} elseif (in_array('editor', $roles)) {\r\n\t\t\t$owa_role = 'viewer';\r\n\t\t} elseif (in_array('author', $roles)) {\r\n\t\t\t$owa_role = 'viewer';\r\n\t\t} elseif (in_array('contributor', $roles)) {\r\n\t\t\t$owa_role = 'viewer';\r\n\t\t} elseif (in_array('subscriber', $roles)) {\r\n\t\t\t$owa_role = 'everyone';\r\n\t\t} else {\r\n\t\t\t$owa_role = 'everyone';\r\n\t\t}\r\n\t\t\r\n\t} else {\r\n\t\t$owa_role = 'everyone';\r\n\t}\r\n\t\r\n\treturn $owa_role;\r\n}", "protected function initRoles()\n {\n $this->roles = new ArrayCollection();\n }", "public function getRolesNames ();", "function get_role_list() {\n\t\treturn $this->db->get('system_security.security_role');\n\t\t\n\t}", "static public function set_core_roles_capabilities(){\n stablish_capabilities('administrator', TA_Roles_Plugin::get_capabilities() );\n\n stablish_capabilities('subscriber', TA_Roles_Plugin::get_capabilities(array(\n 'comments_pre_aproved',\n )) );\n\n stablish_capabilities('editor', TA_Roles_Plugin::get_capabilities(array(\n 'portada',\n 'micrositio_home',\n 'article_section_edit',\n 'article_place_edit',\n 'article_tema_edit',\n 'article_tag',\n 'article_author',\n 'article_micrositio',\n 'article_micrositio_edit',\n 'menus',\n 'articles_edit',\n 'articles_publish',\n 'media_uploads',\n 'ed_impresa',\n 'fotogaleria',\n 'taller',\n 'memberships',\n 'mailtrain',\n 'comments',\n 'extra',\n 'comments_pre_aproved',\n )) );\n }", "public function getRoles(){\n\n $roles = $this->visiteur_roles->map(function($role){\n return $role->getTitle();\n })->ToArray();\n\n $roles[]= 'ROLE_USER';\n \n return $roles;\n }", "public function roles(): MorphToMany;", "function setup_roles_and_memberships(){\n $data_node = load_csv('node', get_csv_data_filepath('mt_memberships', 'node'));\n $data_uc_products = load_csv('uc_products', get_csv_data_filepath('mt_memberships', 'uc_products'));\n $data_uc_product_features = load_csv('uc_product_features', get_csv_data_filepath('mt_memberships', 'uc_product_features'));\n $data_uc_roles_products = load_csv('uc_roles_products', get_csv_data_filepath('mt_memberships', 'uc_roles_products'));\n \n for($row=1;$row<=count($data_uc_products['uc_products']);$row++){\n create_membership_and_role(\n $data_node['node'][$row],\n $data_uc_products['uc_products'][$row],\n $data_uc_product_features['uc_product_features'][$row],\n $data_uc_roles_products['uc_roles_products'][$row]);\n }\n }", "function group_get_role_info($groupid) {\n $roles = get_records_sql_assoc('SELECT role, edit_views, see_submitted_views, gr.grouptype FROM {grouptype_roles} gr\n INNER JOIN {group} g ON g.grouptype = gr.grouptype\n WHERE g.id = ?', array($groupid));\n foreach ($roles as $role) {\n $role->display = get_string($role->role, 'grouptype.'.$role->grouptype);\n $role->name = $role->role;\n }\n return $roles;\n}", "public function checkRoles() {\n global $wp_roles;\n $settings = $this->getSettings();\n $rolesNew = explode(',', $settings->rolesAllowed);\n foreach ($wp_roles->roles as $key => $role) {\n if (strtolower($role['name']) != 'administrator') {\n $name = strtolower($role['name']);\n $name = str_replace(\" \", \"_\", $name);\n if (in_array($key, $rolesNew) || $role['name'] == \"Chat Operator\") {\n $wp_roles->add_cap($key, 'visual_chat');\n } else {\n $wp_roles->remove_cap($key, 'visual_chat');\n }\n }\n }\n }", "function vns_subscribe_order_add_access_capabilities() {\n $roles = array( 'administrator','editor' );\n foreach ( $roles as $role ) {\n \n $role = get_role( $role );\n if ( empty( $role ) ) {\n continue;\n }\n \n \n \n \n if(!$role->has_cap( 'vns_subscribe_order_view_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_view_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_add_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_add_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_edit_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_edit_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_delete_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_delete_news' );\n }\n \n \n \n }\n \n $user = wp_get_current_user();\n $user->get_role_caps();\n \n}", "function roles(){\n\t\t$this->pageauth->setPrivileges('roles');\n\t\t\n\t\t// see if user has delete privileges\n\t\tif (!$this->pageauth->loginHasPrivileges('delete')) :\n\t\t\n\t\t\t$json['error'] = \"You do not have access to add or edit these records\";\n\t\t\techo json_encode($json);\n\t\t\texit();\n\t\t\n\t\telse:\n\t\t\t\n\t\t\t$id = $this->input->post('id');\n\t\t\n\t\t\t$response = $this->platform->post('apadmin/role/delete',array('id'=>$id));\n\t\t\t\n\t\t\tif($response['success']) :\n\t\t\t\t\n\t\t\t\t$json['success'] = $response['success'];\n\t\t\t\techo json_encode($json);\n\t\t\t\t\n\t\t\t\telse:\n\t\t\t\t\n\t\t\t\t$json['error'] = $response['error'];\n\t\t\t\techo json_encode($json);\n\t\t\t\t\n\t\t\tendif;\n\t\tendif;\n\t}", "public function testAllRoles()\n {\n }", "function add_role_to_body($classes) {\n\tif (is_user_logged_in()) {\n\t\tglobal $current_user;\n\t\t$user_role = array_shift($current_user->roles);\n\t\t$classes[] = 'role-'. $user_role;\n\t}\n\treturn $classes;\n}", "static function getRoleOptions()\r\n\t{\r\n\t\t$roles = SiteRole::getRolesArray();\r\n\t\t$roles[\"visitor\"] = \"Visitor\";\t\r\n\t\treturn $roles;\r\n\t}", "public function getAllRoles(): array;", "function DoctorAppointment_role_caps() {\n $roles = array('receptionist');\n \n // Loop through each role and assign capabilities\n foreach($roles as $the_role) { \n\n $role = get_role($the_role);\n \n $role->add_cap( 'read' );\n $role->add_cap( 'read_DoctorAppointment');\n $role->add_cap( 'read_private_DoctorAppointments' );\n $role->add_cap( 'edit_DoctorAppointment' );\n $role->add_cap( 'edit_DoctorAppointments' );\n $role->add_cap( 'edit_others_DoctorAppointments' );\n $role->add_cap( 'edit_published_DoctorAppointments' );\n $role->add_cap( 'publish_DoctorAppointments' );\n $role->add_cap( 'delete_others_DoctorAppointments' );\n $role->add_cap( 'delete_private_DoctorAppointments' );\n $role->add_cap( 'delete_published_DoctorAppointments' );\n \n \n \n }\n}", "function get_legacy_roles() {\n return array(\n 'admin' => 'moodle/legacy:admin',\n 'coursecreator' => 'moodle/legacy:coursecreator',\n 'editingteacher' => 'moodle/legacy:editingteacher',\n 'teacher' => 'moodle/legacy:teacher',\n 'student' => 'moodle/legacy:student',\n 'guest' => 'moodle/legacy:guest',\n 'user' => 'moodle/legacy:user'\n );\n}", "public function getRole() : string;", "private function add_new_roles(){\n\t\tif( empty( $this->new_roles ) ) return true;\n\t\tif( ! in_array( 'administrator', $this->new_roles ) ) $this->new_roles[] = 'administrator'; // Ensure Max level of access\n\t\t$processed_roles = $this->process_roles( $this->new_roles );\n\t\tarray_walk( $processed_roles, function( $val, $role ){\n\t\t\t$this->wp_roles->add_role( $role, $val->name, $val->capabilities );\n\t\t});\n\t}", "public function getRoles()\n {\n return [$this->role];\n }", "public function getRoles()\n {\n return [$this->role];\n }", "public function prepare_roles () {\n $roles = [];\n // Get non-empty user roles.\n $available_roles = count_users();\n // Get role titles.\n $wp_roles = wp_roles();\n // Creates an array with each role's data\n foreach ($wp_roles->role_names as $role_name => $role_title) {\n if ( array_key_exists( $role_name, $available_roles['avail_roles'] ) && (int)$available_roles['avail_roles'][ $role_name ] ) {\n\n $roles[ $role_name ] = [\n 'name' => $role_name,\n 'title' => translate_user_role( $role_title ),\n 'count' => (int)$available_roles['avail_roles'][ $role_name ]\n ];\n }\n }\n $this->roles = $roles;\n }", "function extend_assignable_roles($context, $defaultrole) {\n global $DB;\n\n $roles = get_assignable_roles($context, ROLENAME_BOTH);\n if (!isset($roles[$defaultrole])) {\n if ($role = $DB->get_record('role', array('id'=>$defaultrole))) {\n $roles[$defaultrole] = role_get_name($role, $context, ROLENAME_BOTH);\n }\n }\n return $roles;\n }", "public function testSetRoleGroups()\n {\n }", "function create_role($name, $shortname, $description, $legacy='') {\n\n // check for duplicate role name\n\n if ($role = get_record('role','name', $name)) {\n error('there is already a role with this name!');\n }\n\n if ($role = get_record('role','shortname', $shortname)) {\n error('there is already a role with this shortname!');\n }\n\n $role = new object();\n $role->name = $name;\n $role->shortname = $shortname;\n $role->description = $description;\n\n //find free sortorder number\n $role->sortorder = count_records('role');\n while (get_record('role','sortorder', $role->sortorder)) {\n $role->sortorder += 1;\n }\n\n if (!$context = get_context_instance(CONTEXT_SYSTEM)) {\n return false;\n }\n\n if ($id = insert_record('role', $role)) {\n if ($legacy) {\n assign_capability($legacy, CAP_ALLOW, $id, $context->id);\n }\n\n /// By default, users with role:manage at site level\n /// should be able to assign users to this new role, and override this new role's capabilities\n\n // find all admin roles\n if ($adminroles = get_roles_with_capability('moodle/role:manage', CAP_ALLOW, $context)) {\n // foreach admin role\n foreach ($adminroles as $arole) {\n // write allow_assign and allow_overrid\n allow_assign($arole->id, $id);\n allow_override($arole->id, $id);\n }\n }\n\n return $id;\n } else {\n return false;\n }\n\n}", "public function getRoles(){\n\n return $this->_arrRoles;\n \n }", "public function roles()\r\n {\r\n return $this->belongsToMany(config('bootstrap-menu.models.role'), config('bootstrap-menu.relations.permission_role'))->withTimestamps();\r\n }", "public function getRoles() \n {\n return $this->roles;\n }", "static public function add()\n {\n add_role(\n self::ROLE_KEY, \n self::ROLE_NAME, \n [\n 'read' => true,\n 'edit_posts' => true, \n 'upload_files' => false,\n 'edit_others_posts' => true, //a tester a false\n\n 'edit_exercices' => true,\n 'publish_exercices' => false,\n 'read_exercice' => true,\n 'delete_exercice' => true,\n //'delete_exercices' => true,\n 'edit_others_exercices' => false,\n 'delete_others_exercices' => false,\n 'edit_exercice' => true,\n\n 'edit_lessons' => true,\n 'publish_lessons' => true,\n 'read_lesson' => true,\n 'delete_lesson' => true,\n 'edit_others_lessons' => false,\n 'delete_others_lessons' => false,\n 'edit_lesson' => true,\n\n 'manage_arts' => false,\n 'edit_arts' => false,\n 'delete_arts' => false,\n 'assign_arts' => true, \n ]\n\n );\n }" ]
[ "0.7782521", "0.7696201", "0.7696201", "0.7696201", "0.7696201", "0.75370044", "0.749545", "0.72671574", "0.7242646", "0.72290826", "0.7210035", "0.71732897", "0.71664774", "0.7130352", "0.7130352", "0.7130352", "0.71055824", "0.708331", "0.70611787", "0.70392215", "0.7025081", "0.7018864", "0.70153224", "0.6992746", "0.6946537", "0.6913357", "0.6895943", "0.6891327", "0.6864094", "0.6835795", "0.6811119", "0.6798757", "0.67968565", "0.6794775", "0.67459494", "0.6666876", "0.66024446", "0.65736026", "0.656044", "0.65594566", "0.65579134", "0.6548442", "0.6520799", "0.65185404", "0.64897114", "0.64826035", "0.6476329", "0.64659745", "0.64627546", "0.646115", "0.64404225", "0.6428146", "0.64266604", "0.642125", "0.6419623", "0.64138454", "0.63997036", "0.63917685", "0.6386027", "0.6377953", "0.6351187", "0.63430357", "0.6341987", "0.6341231", "0.6330951", "0.6312362", "0.6311757", "0.6306665", "0.6306665", "0.6304356", "0.62960446", "0.62734884", "0.6269733", "0.626839", "0.6268064", "0.6254496", "0.6243886", "0.6243041", "0.62411225", "0.6236587", "0.62252086", "0.62094253", "0.620834", "0.6200041", "0.6197562", "0.61920816", "0.6190936", "0.61865646", "0.6178405", "0.6166691", "0.6158374", "0.6158374", "0.6153323", "0.6150116", "0.6149979", "0.61461544", "0.61423695", "0.6136076", "0.61351514", "0.61304915" ]
0.6185253
88
Is the post allowed to be edited. This does not check if the current user has permission, just whether a post is currently in a status that is editable by a permitted user.
function eman_post_editable( $post ) { if ( is_numeric($post) ) $post = get_post($post); if ( ! is_object($post) ) return false; // Settings area always editable if ( emanager_post::is_settings($post) ) return true; $status = emanager_post::status($post, 'slug'); // If no status yet or is in draft or revise, it is editable if ( 'draft' == $status || 'revise' == $status ) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canEditPost(Post $post) {\n return ($this->isAdmin() || ($this->id == $post->getCreatorId()));\n }", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public static function can_edit_posts( $request ) {\n\t\treturn current_user_can( 'edit_post', $request->get_param( 'id' ) );\n\t}", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }", "function eman_can_edit( $post, $user_id=false )\n{\n\t/**\n\t * If you can't view this post, then you can't edit it...\n\t */\n\tif ( ! eman_can_view($post, $user_id) ) return false;\n\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! is_object($post) ) return false;\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\t$user = get_user_by('id', $user_id);\n\t$status = emanager_post::status($post, 'slug');\n\t$bic_userlogin = emanager_bic::get_bic($post, 'user_login');\n\n\t/**\n\t * Test if user has capability to edit\n\t */\n\n\t// Issues have different criteria\n\tif ( 'em_issue' == $post->post_type )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || eman_check_role('turner') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// PCO Request exception for allowances. Allow user to edit if in their court and status is before sent to owner.\n\tif ( 'em_noc' == $post->post_type )\n\t{\n\t\tif (($bic_userlogin === $user->user_login) && in_array($status, array('draft','manager','ready'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (eman_check_role('turner') && in_array($status, array('draft'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// If the post is editable\n\tif ( eman_post_editable($post) )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) ) {\n\t\t\treturn true;\n\t\t}\n\t\t// Same company as original author\n\t\telseif ( emanager_post::same_company_as_post($post) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function current_user_can_edit( $post_id, $post_type = '' ) {\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = get_post_type( $post_id );\n\t\t}\n\n\t\tswitch ( $post_type ) {\n\n\t\t\tcase 'page':\n\t\t\t\treturn current_user_can( 'edit_page', $post_id );\n\n\t\t\tcase 'post':\n\t\t\t\treturn current_user_can( 'edit_post', $post_id );\n\n\t\t\tdefault:\n\n\t\t\t\t// All post types\n\t\t\t\t$post_types = (array) get_post_types(\n\t\t\t\t\tarray(),\n\t\t\t\t\t'objects'\n\t\t\t\t);\n\n\t\t\t\treturn isset( $post_types[ $post_type ]->cap->edit_post ) &&\n\t\t\t\t current_user_can( $post_types[ $post_type ]->cap->edit_post, $post_id );\n\n\t\t}\n\n\t}", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function edit(User $user)\n {\n return $user->role->can_edit_post == 1;\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 canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}", "public function editPost(User $user, Post $post)\n {\n if ($post->trashed() && $user->cannot('forum-moderate-junked-post')) {\n return false;\n }\n\n if ($post->thread->locked) {\n return false;\n }\n\n // If user owns the post and...\n if ($user->owns($post)) {\n // the post is the first post and the user user can edit thread\n if ($post->isFirstPost() && $user->can('forum-edit-thread')) {\n return true;\n }\n // the user can edit post\n if ($user->can('forum-edit-post')) {\n return true;\n }\n }\n return false;\n }", "public function authorize()\n {\n if ($this->isMethod('POST')) {\n return true;\n }\n\n $thePost = Post::find($this->route('id'));\n return Auth::user()->can('update', $thePost) && Auth::user()->can('delete', $thePost);\n }", "protected function canEdit() {}", "public function isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function user_can_edit_post($user_id, $post_id, $blog_id = 1)\n {\n }", "function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function is_allowed_to_edit_content_object()\n {\n return $this->is_allowed(WeblcmsRights::EDIT_RIGHT, $this->publication) &&\n $this->publication->get_allow_collaboration();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n if ($this->route()->getName() === 'home.update') {\n $post = Post::findOrFail($this->id);\n return Auth::check() && Auth::user()->isAdminOrOwner($post->user_id);\n }\n return Auth::check();\n }", "public function can_edit() {\n return true;\n }", "public function canEdit()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'edit' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( isset( static::$ownerTypes['member'] ) and static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column and $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\tif( isset( static::$ownerTypes['group'] ) and static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\t\t\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }", "function caldol_can_edit_file($authorID){\n\tglobal $current_user;\n\n\t\n\t//echo $current_user->ID. \", \" . $post->post_author;\n\tif($current_user->ID == $authorID || current_user_can('edit_others_posts')){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function update(User $user, Post $post)\n {\n return $user->isAuthorOf($post) || $user->isAdmin();\n }", "public function canEdit()\n {\n return true;\n }", "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function editPost(User $user, Post $post)\n {\n return $user->id === $post->user_id;\n }", "public function getCanEditAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "private function is_editor() {\n\t\tif ( is_user_logged_in() ) {\n\t\t\t// A global admin can edit content or change options anywhere.\n\t\t\tif ( is_super_admin() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$user = wp_get_current_user();\n\n\t\t\t// On the WSUWP Platform, a network admin can edit content or change options\n\t\t\t// anywhere on an individual network and may not have a role assigned.\n\t\t\tif ( function_exists( 'wsuwp_is_network_admin' ) ) {\n\t\t\t\tif ( wsuwp_is_network_admin( $user->user_login ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Authors and above have (at least) the ability to publish content or delete\n\t\t\t// published content at some level.\n\t\t\t$allowed_roles = array( 'editor', 'administrator', 'author' );\n\t\t\tif ( array_intersect( $allowed_roles, $user->roles ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "protected function check_permissions( $post_id ){\n\t\t\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\n\t\t\treturn false;\n\n\t\t} // end if\n\n\t\t// Check the user's permissions.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( current_user_can( 'edit_page', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} else {\n\n\t\t\tif ( current_user_can( 'edit_post', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} // end if\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n {\n return true;\n }\n case 'POST':\n {\n return true;\n }\n case 'PUT':\n {\n if (Auth::user()->hasPermissionTo('post_update', 'blog')) {\n return true;\n } else {\n return true;\n }\n }\n default:\n break;\n }\n return true;\n }", "public function canEdit($userId) {\n\t\t$aCat = TeamCategory::read($this->getCategory());\n\t\treturn ($this->getAdmin() == $userId or $aCat->getUser() == $userId);\n\t}", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "protected function isPageEditable()\n {\n if ($this->getBackendUser()->isAdmin()) {\n return true;\n }\n return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::PAGE_EDIT);\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "function canEditPage(Page $page) {\n return ($this->isAdmin() || ($this->id == $page->getCreatorId()));\n }", "public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }", "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('table'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "public function update(User $user, Post $post): array|bool\n {\n return $user->ability(roles: 'admin', permissions: 'update_posts');\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "protected function CurrentUserHasEditPermissionToThisUser()\n {\n if (true === $this->IsOwner()) {\n return true;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(\n CmsPermissionAttributeConstants::TABLE_EDITOR_EDIT,\n $this->oTableConf\n )) {\n return false;\n }\n $user = $securityHelper->getUser();\n\n if (null === $user) {\n return false;\n }\n\n if (false === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n // Continue only if we have an ID. If we do not, this is a new record, so the check is not needed.\n if (null !== $this->sId && !empty($this->sId)) {\n $oTargetUser = TdbCmsUser::GetNewInstance();\n $oTargetUser->Load($this->sId);\n // If the target user is an admin, and the current user is not, then we do not grant edit permission.\n if ($oTargetUser->IsAdmin()) {\n return false;\n }\n\n // Also, the user may only edit users that have at least one portal in common.\n $allowedPortals = array_keys($user->getPortals());\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n if (count($portalsOfTargetUser) > 0\n && 0 === count(array_intersect($allowedPortals, $portalsOfTargetUser))) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }", "public function authorize()\n {\n return $this->user()->hasPermission('update-title');\n }", "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 canEdit($userId)\n {\n return ($userId > 0) && ($this->user_id == $userId);\n }", "public function canEdit($member = null) {\n if (!$member)\n $member = Member::currentUser();\n\n if ($member->ID == $this->OwnerID || Permission::check('CMS_ACCESS_CMSMain', 'any', $member)) {\n return true;\n }\n\n return false;\n }", "public function canEdit($election = null) {\n\t\tif(empty($election)) {\n\t\t\treturn $this->user['isAdmin'];\n\t\t}\n\t\tif($this->user['isSuperAdmin']) {\n\t\t\treturn true;\n\t\t}\n\t\treturn $election['userID'] == $this->user['userID'];\n\t}", "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 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}", "public function canEdit($user = null)\n {\n if (!$user = Auth::getUser()) {\n return false;\n }\n\n return $this->user_id == $user->id;\n }", "function eman_can_view( $post, $user_id=false )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Turner can view anything\n\tif ( eman_check_role('turner', $user_id) ) return true;\n\n\t// Pending can't view anything\n\tif ( eman_check_role('pending', $user_id) ) return false;\n\n\t// Test a post_type generally\n\tif ( is_string($post) && get_post_type_object($post) )\n\t{\n\t\t$post_type = $post;\n\t\t$is_post = false;\n\t}\n\t// Test a post specifically\n\telseif ( is_object($post) )\n\t{\n\t\t$post_type = $post->post_type;\n\t\t$is_post = true;\n\t\t// If BIC user, all set, they can view it\n\t\tif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\t// Settings for post type\n\t$cpt = ( $settings = eman_post_types($post_type) ) ? $settings : array();\n\n\t// Test settings permissions\n\tif ( ! empty($cpt['access']) )\n\t{\n\t\t// Owners have no access to settings\n\t\tif ( eman_check_role('owner', $user_id) && ! in_array('owner', $cpt['access']) ) return false;\n\n\t\t// Subs have limited access to settings\n\t\tif ( eman_check_role('sub', $user_id) && ! in_array('sub', $cpt['access']) ) return false;\n\t}\n\telseif ( eman_check_role('owner', $user_id) && ( ($is_post && 'noc' === eman_pco_or_noc($post)) || ( ! $is_post && 'em_noc' == $post_type && ! get_query_var('pco')) ) )\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\tif ( $is_post )\n\t{\n\t\t// Test if user is in same company or created post\n\t\tif ( $is_post && (emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || ('em_issue' == $post->post_type && eman_check_role('owner', $user_id)) | ('em_letter' == $post->post_type && eman_check_role('owner', $user_id)) ) ) return true;\n\n\t\t// If is NOC (not PCO), and is owner group, they can view\n\t\tif ( $is_post && 'pco' == eman_pco_or_noc($post) && eman_check_role('owner', $user_id) ) return true;\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\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 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 hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'core', 'members', 'member_edit' );\n\t}", "protected function isCurrentPageEditableByUser() {\n\n\t\t$title = $this->getTitle();\n\t\t$user = $this->getUser();\n\t\treturn $title->quickUserCan( 'edit', $user )\n\t\t\t&& ( $title->exists() || $title->quickUserCan( 'create', $user ) );\n\t}", "public function contentIsNotLockedForEditors()\n {\n return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::CONTENT_EDIT) === Permission::CONTENT_EDIT && !$this->pageinfo['editlock'];\n }", "protected function check_update_permission($post)\n {\n }", "protected function check_update_permission($post)\n {\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}", "function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\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 }", "public function getIsUserEditable()\n\t{\n\t\treturn $this->is_user_editable;\n\t}", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "protected function has_permission( $post_id ) {\n // autosave -> do nothing\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return false;\n }\n\n // Ajax -> do nothing\n if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n return false;\n }\n\n // no post found -> do nothing\n $post = get_post( $post_id );\n if ( $post === null ) {\n return false;\n }\n\n // current post type is not enabled for LaterPay -> do nothing\n if ( ! in_array( $post->post_type, $this->config->get( 'content.enabled_post_types' ), true ) ) {\n return false;\n }\n\n return true;\n }", "public function edit($id)\n {\n \n $editAblePost=Post::find($id);\n // if(Gate::allows('edit-post',$editAblePost)){\n // return view('posts.edit',compact('editAblePost'));\n // }\n \n if(auth::user()->can('update',$editAblePost)){\n\n return view('posts.edit',compact('editAblePost'));\n\n }\n else{\n\n return redirect('posts')->with(['msgClass'=>'alert-danger',\"message\"=>\"You are not allowed to edit this post\"]);\n\n }\n\n\n\n\n }", "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}", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function authorize() {\n\t\treturn $this->user()->hasPermission('edit.roles');\n\t}", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "public function canEdit($member = null)\n {\n if ($this->isValidEditingStatus()) {\n //If it has a valid status handle permissions normally\n return parent::canEdit($member);\n }\n return false;\n }", "public function check_read_permission($post)\n {\n }", "public function check_read_permission($post)\n {\n }", "public function authorize()\n {\n $user = Auth::user();\n\n if(!$user->can('update-role')) {\n return false;\n }\n\n return true;\n }", "function user_can_edit_post_date($user_id, $post_id, $blog_id = 1)\n {\n }", "public function isEditable()\n {\n // Need to be able to save the DataObject if this is being called during PublishTargetJob.\n if ($this->owner->getIsPublishJobRunning()) {\n return true;\n }\n\n // Need to be able to save the DataObject if this is being called during UnPublishTargetJob.\n if ($this->owner->getIsUnPublishJobRunning()) {\n return true;\n }\n\n if ($this->owner->config()->get('allow_embargoed_editing')) {\n return true;\n }\n\n if ($this->owner->getIsPublishScheduled()) {\n return false;\n }\n\n $embargoRecordIsEditable = $this->owner->invokeWithExtensions('embargoRecordIsEditable');\n if (in_array(false, $embargoRecordIsEditable)) {\n return false;\n }\n\n return true;\n }", "function is_post_status_viewable($post_status)\n {\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }", "protected function is_post_private( $post_object = null ) {\n\n\t\t$post_type_object = $this->post_type_object;\n\n\t\tif ( empty( $post_object ) ) {\n\t\t\t$post_object = $this->data;\n\t\t}\n\n\t\tif ( empty( $post_object ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * If the status is NOT publish and the user does NOT have capabilities to edit posts,\n\t\t * consider the post private.\n\t\t */\n\t\tif ( ! isset( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->edit_posts ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * If the owner of the content is the current user\n\t\t */\n\t\tif ( ( true === $this->owner_matches_current_user() ) && 'revision' !== $post_object->post_type ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * If the post_type isn't (not registered) or is not allowed in WPGraphQL,\n\t\t * mark the post as private\n\t\t */\n\n\t\tif ( empty( $post_type_object ) || empty( $post_type_object->name ) || ! in_array( $post_type_object->name, \\WPGraphQL::get_allowed_post_types(), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( 'private' === $this->data->post_status && ( ! isset( $post_type_object->cap->read_private_posts ) || ! current_user_can( $post_type_object->cap->read_private_posts ) ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( 'revision' === $this->data->post_type || 'auto-draft' === $this->data->post_status ) {\n\t\t\t$parent = get_post( (int) $this->data->post_parent );\n\n\t\t\tif ( empty( $parent ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$parent_post_type_obj = $post_type_object;\n\n\t\t\tif ( empty( $parent_post_type_obj ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( 'private' === $parent->post_status ) {\n\t\t\t\t$cap = isset( $parent_post_type_obj->cap->read_private_posts ) ? $parent_post_type_obj->cap->read_private_posts : 'read_private_posts';\n\t\t\t} else {\n\t\t\t\t$cap = isset( $parent_post_type_obj->cap->edit_post ) ? $parent_post_type_obj->cap->edit_post : 'edit_post';\n\t\t\t}\n\n\t\t\tif ( ! current_user_can( $cap, $parent->ID ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1)\n {\n }", "public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }", "private function UserCanEditTask($taskId)\r\n {\r\n $task = $this->TaskModel->getTask($taskId);\r\n if(!empty($task['users'])) {\r\n if ($task['IdUser'] == $this->userId)\r\n return true;\r\n }\r\n return false;\r\n }", "public function isEditor()\n {\n return $this->role()->where('id', $this->roles['EDITOR'])->exists();\n }", "public function isInAuthorPost()\n {\n return $this->object->isInAuthorPost();\n }" ]
[ "0.82246447", "0.8179985", "0.8062197", "0.7820332", "0.7810295", "0.7804649", "0.77726203", "0.7768972", "0.76149523", "0.75322396", "0.7519968", "0.7509877", "0.7421341", "0.74180424", "0.7360027", "0.72776985", "0.7257722", "0.7231762", "0.7213345", "0.7176713", "0.71743315", "0.7172099", "0.716168", "0.71362996", "0.7110271", "0.70893687", "0.70881087", "0.7084711", "0.70639986", "0.7047787", "0.7047218", "0.70217496", "0.7019448", "0.6978827", "0.6977741", "0.69490886", "0.69438654", "0.69396424", "0.693677", "0.6932944", "0.6925218", "0.691272", "0.690566", "0.6894727", "0.68761545", "0.6874605", "0.6869407", "0.685118", "0.6841114", "0.6840115", "0.6839932", "0.68383443", "0.68200374", "0.6811156", "0.6798841", "0.6788663", "0.678716", "0.67761075", "0.677234", "0.6771994", "0.6766537", "0.67571986", "0.6755675", "0.67490375", "0.6744863", "0.67338604", "0.672446", "0.67029834", "0.6687678", "0.6687678", "0.66634285", "0.6661837", "0.6660765", "0.665276", "0.66269726", "0.66165656", "0.6613548", "0.66078204", "0.6606845", "0.6601472", "0.6589682", "0.6578379", "0.6577405", "0.6576342", "0.6572336", "0.65562665", "0.65458435", "0.65458435", "0.6538062", "0.65353197", "0.6533143", "0.6532148", "0.6529472", "0.6524151", "0.6522571", "0.65215784", "0.65125364", "0.65088207", "0.6496718", "0.6490559" ]
0.7700109
8
Does the user have permission to edit the post
function eman_can_edit( $post, $user_id=false ) { /** * If you can't view this post, then you can't edit it... */ if ( ! eman_can_view($post, $user_id) ) return false; if ( is_numeric($post) ) $post = get_post($post); if ( ! is_object($post) ) return false; if ( ! $user_id ) $user_id = get_current_user_id(); $user = get_user_by('id', $user_id); $status = emanager_post::status($post, 'slug'); $bic_userlogin = emanager_bic::get_bic($post, 'user_login'); /** * Test if user has capability to edit */ // Issues have different criteria if ( 'em_issue' == $post->post_type ) { // Original author if ( emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || eman_check_role('turner') ) { return true; } } // PCO Request exception for allowances. Allow user to edit if in their court and status is before sent to owner. if ( 'em_noc' == $post->post_type ) { if (($bic_userlogin === $user->user_login) && in_array($status, array('draft','manager','ready'))) { return true; } if (eman_check_role('turner') && in_array($status, array('draft'))) { return true; } } // If the post is editable if ( eman_post_editable($post) ) { // Original author if ( emanager_post::is_author($post) ) { return true; } // Same company as original author elseif ( emanager_post::same_company_as_post($post) ) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "function canEditPost(Post $post) {\n return ($this->isAdmin() || ($this->id == $post->getCreatorId()));\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "function user_can_edit_post($user_id, $post_id, $blog_id = 1)\n {\n }", "public static function can_edit_posts( $request ) {\n\t\treturn current_user_can( 'edit_post', $request->get_param( 'id' ) );\n\t}", "protected function canEdit() {}", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public function can_edit() {\n return true;\n }", "public function edit($id)\n {\n \n $editAblePost=Post::find($id);\n // if(Gate::allows('edit-post',$editAblePost)){\n // return view('posts.edit',compact('editAblePost'));\n // }\n \n if(auth::user()->can('update',$editAblePost)){\n\n return view('posts.edit',compact('editAblePost'));\n\n }\n else{\n\n return redirect('posts')->with(['msgClass'=>'alert-danger',\"message\"=>\"You are not allowed to edit this post\"]);\n\n }\n\n\n\n\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "public function edit(User $user)\n {\n return $user->role->can_edit_post == 1;\n }", "function caldol_can_edit_file($authorID){\n\tglobal $current_user;\n\n\t\n\t//echo $current_user->ID. \", \" . $post->post_author;\n\tif($current_user->ID == $authorID || current_user_can('edit_others_posts')){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function canEdit()\n {\n return true;\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\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 canEdit()\n {\n return $this->is_locked == 0;\n }", "function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}", "function eman_post_editable( $post )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! is_object($post) ) return false;\n\n\t// Settings area always editable\n\tif ( emanager_post::is_settings($post) ) return true;\n\n\t$status = emanager_post::status($post, 'slug');\n\n\t// If no status yet or is in draft or revise, it is editable\n\tif ( 'draft' == $status || 'revise' == $status ) return true;\n\n\treturn false;\n}", "public function current_user_can_edit( $post_id, $post_type = '' ) {\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = get_post_type( $post_id );\n\t\t}\n\n\t\tswitch ( $post_type ) {\n\n\t\t\tcase 'page':\n\t\t\t\treturn current_user_can( 'edit_page', $post_id );\n\n\t\t\tcase 'post':\n\t\t\t\treturn current_user_can( 'edit_post', $post_id );\n\n\t\t\tdefault:\n\n\t\t\t\t// All post types\n\t\t\t\t$post_types = (array) get_post_types(\n\t\t\t\t\tarray(),\n\t\t\t\t\t'objects'\n\t\t\t\t);\n\n\t\t\t\treturn isset( $post_types[ $post_type ]->cap->edit_post ) &&\n\t\t\t\t current_user_can( $post_types[ $post_type ]->cap->edit_post, $post_id );\n\n\t\t}\n\n\t}", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n if ($this->isMethod('POST')) {\n return true;\n }\n\n $thePost = Post::find($this->route('id'));\n return Auth::user()->can('update', $thePost) && Auth::user()->can('delete', $thePost);\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "public function editPost(User $user, Post $post)\n {\n if ($post->trashed() && $user->cannot('forum-moderate-junked-post')) {\n return false;\n }\n\n if ($post->thread->locked) {\n return false;\n }\n\n // If user owns the post and...\n if ($user->owns($post)) {\n // the post is the first post and the user user can edit thread\n if ($post->isFirstPost() && $user->can('forum-edit-thread')) {\n return true;\n }\n // the user can edit post\n if ($user->can('forum-edit-post')) {\n return true;\n }\n }\n return false;\n }", "protected function check_update_permission($post)\n {\n }", "protected function check_update_permission($post)\n {\n }", "public function authorize()\n {\n return $this->user()->hasPermission('update-title');\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function check_read_permission($post)\n {\n }", "public function check_read_permission($post)\n {\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n {\n return true;\n }\n case 'POST':\n {\n return true;\n }\n case 'PUT':\n {\n if (Auth::user()->hasPermissionTo('post_update', 'blog')) {\n return true;\n } else {\n return true;\n }\n }\n default:\n break;\n }\n return true;\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 isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function editPost(User $user, Post $post)\n {\n return $user->id === $post->user_id;\n }", "public function edit($id)\n {\n $user = Auth::user();\n $post = Post::find($id);\n\n // menggunakan model user\n if ($user && $user->can('update', $post)) {\n return view('post-detail', ['msg' => 'User can edit post']); \n }else{\n abort(403);\n }\n\n // menggunakan response\n // $response = Gate::inspect('update', $post);\n\n // if ($response->allowed()) {\n // return view('post-detail', ['msg' => 'User can edit post']); \n // } else {\n // echo $response->message();\n // }\n }", "public function authorize()\n {\n if ($this->route()->getName() === 'home.update') {\n $post = Post::findOrFail($this->id);\n return Auth::check() && Auth::user()->isAdminOrOwner($post->user_id);\n }\n return Auth::check();\n }", "function canEditPage(Page $page) {\n return ($this->isAdmin() || ($this->id == $page->getCreatorId()));\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function edit($id)\n {\n //\n $post = Post::find($id);\n if (auth()->user()->can('update',$post)) \n return view('post_views/edit_post', compact('post'));\n else\n return redirect('not_found');\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "protected function check_read_permission($post)\n {\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }", "protected function check_edit_permission($comment)\n {\n }", "public function update(User $user, Post $post)\n {\n return $user->isAuthorOf($post) || $user->isAdmin();\n }", "public function getCanEditAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "function user_can_edit_post_date($user_id, $post_id, $blog_id = 1)\n {\n }", "abstract public function canEdit($user_guid = 0);", "function can_edit() {\n\n if ( ! strpos( $_SERVER['REQUEST_URI'], 'index.php') ) return false;\n\n $what = isset($_GET['what']) ? $_GET['what'] : false;\n $add = isset($_GET['add']) ? $_GET['add'] : false;\n\n // this is the rule for add posts\n return $what === 'bryndzoveHalusky' && $add == 1;\n}", "public static function edit($id){\n return Auth::check() && Auth::user()->id == $id;\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1)\n {\n }", "public function edit(Posts $post)\n {\n //if($post->user_id !== Auth::user()->id) abort(401); //AuthPolicy\n //$this->authorize('update',$post); // edit == update , set as global based Authorizaton\n return view('posts.edit',[\n 'post' => Posts::where('id',$post->id)->firstOrFail()\n ]);\n }", "protected function check_permissions( $post_id ){\n\t\t\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\n\t\t\treturn false;\n\n\t\t} // end if\n\n\t\t// Check the user's permissions.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( current_user_can( 'edit_page', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} else {\n\n\t\t\tif ( current_user_can( 'edit_post', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} // end if\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('table'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "public function edit(User $user)\n {\n return $user->hasPermission('user-edit');\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "public function authorize()\n {\n \t// var_dump(Auth::check());\n \t// $postId = $this->route('create');\n \t// var_dump($postId);\n \tif(session('statut') == 'admin')\n \t\treturn true;\n \telse\n \t\treturn false;\n\n \t// return Gate::allows('update', Post::findOrFail($postId));\n }", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "public function authorize() {\n\t\treturn $this->user()->hasPermission('edit.roles');\n\t}", "public function is_allowed_to_edit_content_object()\n {\n return $this->is_allowed(WeblcmsRights::EDIT_RIGHT, $this->publication) &&\n $this->publication->get_allow_collaboration();\n }", "public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }", "protected function check_read_post_permission($post, $request)\n {\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function edit($id)\n {\n //\n $post=Post::find($id);\n if (auth()->user()->can('edit', $post))\n return view('post.edit', compact('post'));\n else\n return redirect('not_found');\n\n }", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\treturn JFactory::getUser()->authorise('core.manage', $this->option);\n\t}", "public function canEdit($userId) {\n\t\t$aCat = TeamCategory::read($this->getCategory());\n\t\treturn ($this->getAdmin() == $userId or $aCat->getUser() == $userId);\n\t}", "public function edit($id) {\n $post = Post::findOrFail($id);\n //print_r($post->toArray());\n if (Gate::denies('update-post', $post)){\n // You can't edit this post\n Session::flash(\"no_permission\", \"You can't edit this post: $post->id\");\n return redirect()->route('post_index_path');\n }\n\t\treturn view('post.post_edit',['post'=>$post]);\n\t}", "public function edit()\n {\n session_start();\n\n // Falls der Benutzer eingeloggt ist wird ihm die Edit View angezeigt, ansonsten ein Fehler\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $post = $this->postRepository->readById($_GET['id']);\n $view = new View('post/edit');\n $view->title = 'Post editieren';\n $view->post = $post;\n $view->display();\n } else {\n header('Location: /user/index/?error=Du bist nicht eingeloggt!');\n }\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function edit($id)\n {\n// $post = Post::find($id);\n\n// // Check for correct 'user\n// if (auth() ->user()->id !== $post->user_id){\n// return redirect('/posts')->with('post', 'Unauthorized Page');\n// }\n// return view('posts.edit') ->with('post', $post);\n}", "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function update(User $user, Post $post): array|bool\n {\n return $user->ability(roles: 'admin', permissions: 'update_posts');\n }", "public function isEditAction() {}", "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 canEdit($userId)\n {\n return ($userId > 0) && ($this->user_id == $userId);\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }", "public function authorize()\n {\n $user = \\Auth::user();\n \n if($user->can('update', \\App\\Product::class)){\n return true;\n }\n \n return false;\n }", "public function authorize()\n {\n abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n return true;\n }", "function eman_can_view( $post, $user_id=false )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Turner can view anything\n\tif ( eman_check_role('turner', $user_id) ) return true;\n\n\t// Pending can't view anything\n\tif ( eman_check_role('pending', $user_id) ) return false;\n\n\t// Test a post_type generally\n\tif ( is_string($post) && get_post_type_object($post) )\n\t{\n\t\t$post_type = $post;\n\t\t$is_post = false;\n\t}\n\t// Test a post specifically\n\telseif ( is_object($post) )\n\t{\n\t\t$post_type = $post->post_type;\n\t\t$is_post = true;\n\t\t// If BIC user, all set, they can view it\n\t\tif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\t// Settings for post type\n\t$cpt = ( $settings = eman_post_types($post_type) ) ? $settings : array();\n\n\t// Test settings permissions\n\tif ( ! empty($cpt['access']) )\n\t{\n\t\t// Owners have no access to settings\n\t\tif ( eman_check_role('owner', $user_id) && ! in_array('owner', $cpt['access']) ) return false;\n\n\t\t// Subs have limited access to settings\n\t\tif ( eman_check_role('sub', $user_id) && ! in_array('sub', $cpt['access']) ) return false;\n\t}\n\telseif ( eman_check_role('owner', $user_id) && ( ($is_post && 'noc' === eman_pco_or_noc($post)) || ( ! $is_post && 'em_noc' == $post_type && ! get_query_var('pco')) ) )\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\tif ( $is_post )\n\t{\n\t\t// Test if user is in same company or created post\n\t\tif ( $is_post && (emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || ('em_issue' == $post->post_type && eman_check_role('owner', $user_id)) | ('em_letter' == $post->post_type && eman_check_role('owner', $user_id)) ) ) return true;\n\n\t\t// If is NOC (not PCO), and is owner group, they can view\n\t\tif ( $is_post && 'pco' == eman_pco_or_noc($post) && eman_check_role('owner', $user_id) ) return true;\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "function user_can_edit_user($user_id, $other_user)\n {\n }", "public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }", "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 authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }", "public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }", "public function edit()\n {\n return Auth::check();\n }", "public function edit(Post $post)\n {\n {\n if(Auth::id() == $post->user_id){\n $arr['post'] = $post;\n return view('posts.edit')->with($arr);}\n else{\n return view('posts.editnotallowed');\n }\n }\n }", "public function authorize()\n {\n return access()->can('edit-project');\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}", "public function is_editing() {\n\n\t\tif ( 'edit' !== Param::get( 'action' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn Param::get( 'redirection', false, FILTER_VALIDATE_INT );\n\t}", "public function edit($id)\n {\n \n $this->authorize('isUser');\n $post = Post::find($id);\n return ($post);\n \n \n \n \n \n \n \n }", "public function canEdit($user = null)\n {\n if (!$user = Auth::getUser()) {\n return false;\n }\n\n return $this->user_id == $user->id;\n }", "public function edit($id)\n {\n //return \"hola\";\n $post = BlogPost::findOrFail($id);\n\n $this->authorize('update',$post);\n\n return view('post.edit',['post' => $post]);\n }", "public function authorize()\n {\n $user = Auth::user();\n\n if(!$user->can('update-role')) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }" ]
[ "0.84221214", "0.83484954", "0.8106697", "0.8041006", "0.8019068", "0.80131185", "0.7856465", "0.778718", "0.7748919", "0.77367485", "0.7725223", "0.7720093", "0.76655984", "0.7615415", "0.7611155", "0.7602609", "0.75980103", "0.7595543", "0.7556069", "0.7499649", "0.7488245", "0.74641156", "0.7464107", "0.74484146", "0.74181247", "0.7396094", "0.7388678", "0.7388678", "0.73829484", "0.7378678", "0.7354945", "0.7354945", "0.73452884", "0.73363584", "0.7316844", "0.7303227", "0.7288152", "0.72737885", "0.7270244", "0.7253157", "0.7248867", "0.7229791", "0.7209036", "0.72070855", "0.7176637", "0.71562076", "0.7154704", "0.71541727", "0.7143805", "0.71412367", "0.7135247", "0.7114332", "0.70995617", "0.70848227", "0.7061683", "0.7057709", "0.70506364", "0.7050504", "0.70398456", "0.70337045", "0.7033267", "0.7032219", "0.70253485", "0.7023072", "0.7013625", "0.7013349", "0.7009024", "0.70005333", "0.69880754", "0.69756496", "0.6972497", "0.6971907", "0.6969694", "0.69668597", "0.6965045", "0.6962351", "0.696028", "0.69586784", "0.6957906", "0.69565177", "0.6949694", "0.69487464", "0.6942475", "0.69394714", "0.69319403", "0.6929784", "0.69285613", "0.6927885", "0.69221604", "0.69119304", "0.69110453", "0.6903299", "0.69005793", "0.6896361", "0.6895177", "0.6894982", "0.68902844", "0.68764126", "0.6876011", "0.6853156" ]
0.7857166
6
Does the user have permission to edit the post
function eman_can_view( $post, $user_id=false ) { if ( is_numeric($post) ) $post = get_post($post); if ( ! $user_id ) $user_id = get_current_user_id(); // Turner can view anything if ( eman_check_role('turner', $user_id) ) return true; // Pending can't view anything if ( eman_check_role('pending', $user_id) ) return false; // Test a post_type generally if ( is_string($post) && get_post_type_object($post) ) { $post_type = $post; $is_post = false; } // Test a post specifically elseif ( is_object($post) ) { $post_type = $post->post_type; $is_post = true; // If BIC user, all set, they can view it if ( $user_id == emanager_bic::get_bic($post, 'ID') ) { return true; } } else { return false; } // Settings for post type $cpt = ( $settings = eman_post_types($post_type) ) ? $settings : array(); // Test settings permissions if ( ! empty($cpt['access']) ) { // Owners have no access to settings if ( eman_check_role('owner', $user_id) && ! in_array('owner', $cpt['access']) ) return false; // Subs have limited access to settings if ( eman_check_role('sub', $user_id) && ! in_array('sub', $cpt['access']) ) return false; } elseif ( eman_check_role('owner', $user_id) && ( ($is_post && 'noc' === eman_pco_or_noc($post)) || ( ! $is_post && 'em_noc' == $post_type && ! get_query_var('pco')) ) ) { return true; } else { return false; } if ( $is_post ) { // Test if user is in same company or created post if ( $is_post && (emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || ('em_issue' == $post->post_type && eman_check_role('owner', $user_id)) | ('em_letter' == $post->post_type && eman_check_role('owner', $user_id)) ) ) return true; // If is NOC (not PCO), and is owner group, they can view if ( $is_post && 'pco' == eman_pco_or_noc($post) && eman_check_role('owner', $user_id) ) return true; return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "function canEditPost(Post $post) {\n return ($this->isAdmin() || ($this->id == $post->getCreatorId()));\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "function user_can_edit_post($user_id, $post_id, $blog_id = 1)\n {\n }", "public static function can_edit_posts( $request ) {\n\t\treturn current_user_can( 'edit_post', $request->get_param( 'id' ) );\n\t}", "protected function canEdit() {}", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "function eman_can_edit( $post, $user_id=false )\n{\n\t/**\n\t * If you can't view this post, then you can't edit it...\n\t */\n\tif ( ! eman_can_view($post, $user_id) ) return false;\n\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! is_object($post) ) return false;\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\t$user = get_user_by('id', $user_id);\n\t$status = emanager_post::status($post, 'slug');\n\t$bic_userlogin = emanager_bic::get_bic($post, 'user_login');\n\n\t/**\n\t * Test if user has capability to edit\n\t */\n\n\t// Issues have different criteria\n\tif ( 'em_issue' == $post->post_type )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || eman_check_role('turner') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// PCO Request exception for allowances. Allow user to edit if in their court and status is before sent to owner.\n\tif ( 'em_noc' == $post->post_type )\n\t{\n\t\tif (($bic_userlogin === $user->user_login) && in_array($status, array('draft','manager','ready'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (eman_check_role('turner') && in_array($status, array('draft'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// If the post is editable\n\tif ( eman_post_editable($post) )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) ) {\n\t\t\treturn true;\n\t\t}\n\t\t// Same company as original author\n\t\telseif ( emanager_post::same_company_as_post($post) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function can_edit() {\n return true;\n }", "public function edit($id)\n {\n \n $editAblePost=Post::find($id);\n // if(Gate::allows('edit-post',$editAblePost)){\n // return view('posts.edit',compact('editAblePost'));\n // }\n \n if(auth::user()->can('update',$editAblePost)){\n\n return view('posts.edit',compact('editAblePost'));\n\n }\n else{\n\n return redirect('posts')->with(['msgClass'=>'alert-danger',\"message\"=>\"You are not allowed to edit this post\"]);\n\n }\n\n\n\n\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "public function edit(User $user)\n {\n return $user->role->can_edit_post == 1;\n }", "function caldol_can_edit_file($authorID){\n\tglobal $current_user;\n\n\t\n\t//echo $current_user->ID. \", \" . $post->post_author;\n\tif($current_user->ID == $authorID || current_user_can('edit_others_posts')){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function canEdit()\n {\n return true;\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\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 canEdit()\n {\n return $this->is_locked == 0;\n }", "function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}", "function eman_post_editable( $post )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! is_object($post) ) return false;\n\n\t// Settings area always editable\n\tif ( emanager_post::is_settings($post) ) return true;\n\n\t$status = emanager_post::status($post, 'slug');\n\n\t// If no status yet or is in draft or revise, it is editable\n\tif ( 'draft' == $status || 'revise' == $status ) return true;\n\n\treturn false;\n}", "public function current_user_can_edit( $post_id, $post_type = '' ) {\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = get_post_type( $post_id );\n\t\t}\n\n\t\tswitch ( $post_type ) {\n\n\t\t\tcase 'page':\n\t\t\t\treturn current_user_can( 'edit_page', $post_id );\n\n\t\t\tcase 'post':\n\t\t\t\treturn current_user_can( 'edit_post', $post_id );\n\n\t\t\tdefault:\n\n\t\t\t\t// All post types\n\t\t\t\t$post_types = (array) get_post_types(\n\t\t\t\t\tarray(),\n\t\t\t\t\t'objects'\n\t\t\t\t);\n\n\t\t\t\treturn isset( $post_types[ $post_type ]->cap->edit_post ) &&\n\t\t\t\t current_user_can( $post_types[ $post_type ]->cap->edit_post, $post_id );\n\n\t\t}\n\n\t}", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n if ($this->isMethod('POST')) {\n return true;\n }\n\n $thePost = Post::find($this->route('id'));\n return Auth::user()->can('update', $thePost) && Auth::user()->can('delete', $thePost);\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "public function editPost(User $user, Post $post)\n {\n if ($post->trashed() && $user->cannot('forum-moderate-junked-post')) {\n return false;\n }\n\n if ($post->thread->locked) {\n return false;\n }\n\n // If user owns the post and...\n if ($user->owns($post)) {\n // the post is the first post and the user user can edit thread\n if ($post->isFirstPost() && $user->can('forum-edit-thread')) {\n return true;\n }\n // the user can edit post\n if ($user->can('forum-edit-post')) {\n return true;\n }\n }\n return false;\n }", "protected function check_update_permission($post)\n {\n }", "protected function check_update_permission($post)\n {\n }", "public function authorize()\n {\n return $this->user()->hasPermission('update-title');\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function check_read_permission($post)\n {\n }", "public function check_read_permission($post)\n {\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n {\n return true;\n }\n case 'POST':\n {\n return true;\n }\n case 'PUT':\n {\n if (Auth::user()->hasPermissionTo('post_update', 'blog')) {\n return true;\n } else {\n return true;\n }\n }\n default:\n break;\n }\n return true;\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 isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function editPost(User $user, Post $post)\n {\n return $user->id === $post->user_id;\n }", "public function edit($id)\n {\n $user = Auth::user();\n $post = Post::find($id);\n\n // menggunakan model user\n if ($user && $user->can('update', $post)) {\n return view('post-detail', ['msg' => 'User can edit post']); \n }else{\n abort(403);\n }\n\n // menggunakan response\n // $response = Gate::inspect('update', $post);\n\n // if ($response->allowed()) {\n // return view('post-detail', ['msg' => 'User can edit post']); \n // } else {\n // echo $response->message();\n // }\n }", "public function authorize()\n {\n if ($this->route()->getName() === 'home.update') {\n $post = Post::findOrFail($this->id);\n return Auth::check() && Auth::user()->isAdminOrOwner($post->user_id);\n }\n return Auth::check();\n }", "function canEditPage(Page $page) {\n return ($this->isAdmin() || ($this->id == $page->getCreatorId()));\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function edit($id)\n {\n //\n $post = Post::find($id);\n if (auth()->user()->can('update',$post)) \n return view('post_views/edit_post', compact('post'));\n else\n return redirect('not_found');\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }", "protected function check_read_permission($post)\n {\n }", "protected function check_edit_permission($comment)\n {\n }", "public function update(User $user, Post $post)\n {\n return $user->isAuthorOf($post) || $user->isAdmin();\n }", "public function getCanEditAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "function user_can_edit_post_date($user_id, $post_id, $blog_id = 1)\n {\n }", "abstract public function canEdit($user_guid = 0);", "function can_edit() {\n\n if ( ! strpos( $_SERVER['REQUEST_URI'], 'index.php') ) return false;\n\n $what = isset($_GET['what']) ? $_GET['what'] : false;\n $add = isset($_GET['add']) ? $_GET['add'] : false;\n\n // this is the rule for add posts\n return $what === 'bryndzoveHalusky' && $add == 1;\n}", "public static function edit($id){\n return Auth::check() && Auth::user()->id == $id;\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1)\n {\n }", "public function edit(Posts $post)\n {\n //if($post->user_id !== Auth::user()->id) abort(401); //AuthPolicy\n //$this->authorize('update',$post); // edit == update , set as global based Authorizaton\n return view('posts.edit',[\n 'post' => Posts::where('id',$post->id)->firstOrFail()\n ]);\n }", "protected function check_permissions( $post_id ){\n\t\t\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\n\t\t\treturn false;\n\n\t\t} // end if\n\n\t\t// Check the user's permissions.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( current_user_can( 'edit_page', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} else {\n\n\t\t\tif ( current_user_can( 'edit_post', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} // end if\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('table'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function edit(User $user)\n {\n return $user->hasPermission('user-edit');\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}", "public function authorize()\n {\n \t// var_dump(Auth::check());\n \t// $postId = $this->route('create');\n \t// var_dump($postId);\n \tif(session('statut') == 'admin')\n \t\treturn true;\n \telse\n \t\treturn false;\n\n \t// return Gate::allows('update', Post::findOrFail($postId));\n }", "public function authorize() {\n\t\treturn $this->user()->hasPermission('edit.roles');\n\t}", "public function is_allowed_to_edit_content_object()\n {\n return $this->is_allowed(WeblcmsRights::EDIT_RIGHT, $this->publication) &&\n $this->publication->get_allow_collaboration();\n }", "public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }", "protected function check_read_post_permission($post, $request)\n {\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function edit($id)\n {\n //\n $post=Post::find($id);\n if (auth()->user()->can('edit', $post))\n return view('post.edit', compact('post'));\n else\n return redirect('not_found');\n\n }", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\treturn JFactory::getUser()->authorise('core.manage', $this->option);\n\t}", "public function canEdit($userId) {\n\t\t$aCat = TeamCategory::read($this->getCategory());\n\t\treturn ($this->getAdmin() == $userId or $aCat->getUser() == $userId);\n\t}", "public function edit($id) {\n $post = Post::findOrFail($id);\n //print_r($post->toArray());\n if (Gate::denies('update-post', $post)){\n // You can't edit this post\n Session::flash(\"no_permission\", \"You can't edit this post: $post->id\");\n return redirect()->route('post_index_path');\n }\n\t\treturn view('post.post_edit',['post'=>$post]);\n\t}", "public function edit()\n {\n session_start();\n\n // Falls der Benutzer eingeloggt ist wird ihm die Edit View angezeigt, ansonsten ein Fehler\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $post = $this->postRepository->readById($_GET['id']);\n $view = new View('post/edit');\n $view->title = 'Post editieren';\n $view->post = $post;\n $view->display();\n } else {\n header('Location: /user/index/?error=Du bist nicht eingeloggt!');\n }\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function edit($id)\n {\n// $post = Post::find($id);\n\n// // Check for correct 'user\n// if (auth() ->user()->id !== $post->user_id){\n// return redirect('/posts')->with('post', 'Unauthorized Page');\n// }\n// return view('posts.edit') ->with('post', $post);\n}", "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function update(User $user, Post $post): array|bool\n {\n return $user->ability(roles: 'admin', permissions: 'update_posts');\n }", "public function isEditAction() {}", "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 canEdit($userId)\n {\n return ($userId > 0) && ($this->user_id == $userId);\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }", "public function authorize()\n {\n $user = \\Auth::user();\n \n if($user->can('update', \\App\\Product::class)){\n return true;\n }\n \n return false;\n }", "public function authorize()\n {\n abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n return true;\n }", "function user_can_edit_user($user_id, $other_user)\n {\n }", "public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }", "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 authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }", "public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }", "public function edit()\n {\n return Auth::check();\n }", "public function edit(Post $post)\n {\n {\n if(Auth::id() == $post->user_id){\n $arr['post'] = $post;\n return view('posts.edit')->with($arr);}\n else{\n return view('posts.editnotallowed');\n }\n }\n }", "public function authorize()\n {\n return access()->can('edit-project');\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}", "public function is_editing() {\n\n\t\tif ( 'edit' !== Param::get( 'action' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn Param::get( 'redirection', false, FILTER_VALIDATE_INT );\n\t}", "public function canEdit($user = null)\n {\n if (!$user = Auth::getUser()) {\n return false;\n }\n\n return $this->user_id == $user->id;\n }", "public function edit($id)\n {\n \n $this->authorize('isUser');\n $post = Post::find($id);\n return ($post);\n \n \n \n \n \n \n \n }", "public function edit($id)\n {\n //return \"hola\";\n $post = BlogPost::findOrFail($id);\n\n $this->authorize('update',$post);\n\n return view('post.edit',['post' => $post]);\n }", "public function authorize()\n {\n $user = Auth::user();\n\n if(!$user->can('update-role')) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }" ]
[ "0.8423035", "0.83486325", "0.810801", "0.8040089", "0.8019035", "0.80128634", "0.7857617", "0.7856601", "0.7787601", "0.7748365", "0.77378696", "0.77264553", "0.7719297", "0.7666172", "0.76168805", "0.76111805", "0.7603423", "0.7599395", "0.7596366", "0.75558656", "0.75001025", "0.74882853", "0.7464895", "0.74641246", "0.7449354", "0.74179834", "0.7396754", "0.73872066", "0.73872066", "0.7383001", "0.73806137", "0.7353203", "0.7353203", "0.7344901", "0.73361266", "0.7317592", "0.7304141", "0.7288379", "0.7274465", "0.72709024", "0.7253815", "0.72489965", "0.72300214", "0.7207779", "0.72071743", "0.7175506", "0.71572274", "0.71558833", "0.7152906", "0.7143691", "0.7140045", "0.7136589", "0.7115287", "0.71002215", "0.70840824", "0.706162", "0.7057358", "0.70513827", "0.7050896", "0.7041583", "0.7034519", "0.70328367", "0.7032703", "0.7026275", "0.7023336", "0.70132214", "0.70118403", "0.7008826", "0.7000832", "0.6988543", "0.6975511", "0.69736785", "0.6971524", "0.69701374", "0.6966829", "0.6965262", "0.6963248", "0.6960994", "0.69591504", "0.6958321", "0.6957116", "0.69492376", "0.69490576", "0.6942069", "0.6931861", "0.69302714", "0.69288594", "0.6927959", "0.69214803", "0.6913184", "0.69111586", "0.6903732", "0.6901", "0.6898045", "0.68971753", "0.6895622", "0.6890191", "0.68772715", "0.6876081", "0.68536985" ]
0.6938779
84
Test if the post is in a review phase, if so return the reviewer(s)
function eman_post_reviewable( $post ) { // Get current post status $status = emanager_post::status($post, 'slug'); if ( $status && ! in_array($status, array('void','approved','approve','draft','revise','executed')) ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isReviewed() {\n\t\t$this->getReviewed();\n\t}", "function eman_can_review( $post, $user_id=false ) {\n\t// Get the post if an id was provide\n\tif ( is_numeric($post) ) { $post = get_post($post); }\n\t// If no post then nothing to review\n\tif ( ! is_object($post) ) { return false; }\n\n\t// Get current user if no user provided\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Test if owner review phase (doesn't require bic)\n\t$owner_review = false;\n\t$status = emanager_post::status($post, 'slug');\n\tif ( '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') ) ) {\n\t\treturn true;\n\t}\n\n\t// Test if the post is currently reviewable, returns the reviews if so\n\tif ( eman_post_reviewable($post) ) {\n\t\tif ( 'em_letter' === get_post_type( $post ) && current_user_can('manage_options') ) {\n\t\t\treturn true;\n\t\t} elseif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function freelancer_review_action() {\n global $user_ID;\n $args = $_POST;\n $project_id = $args['project_id'];\n \n $status = get_post_status($project_id);\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = (int)get_post_field('post_author', $bid_id_accepted);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n /*\n * validate data\n */\n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate this project.', 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\n */\n if ($user_ID !== $author_bid || !$user_ID) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You don\\'t have permission to review.', ET_DOMAIN)\n ));\n }\n \n /*\n * check status of project\n */\n if ($status !== 'complete') {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You can\\'t not reivew on this project.', ET_DOMAIN)\n ));\n }\n \n /**\n * check user reviewed project owner or not\n * @author Dan\n */\n $role = ae_user_role($user_ID);\n $type = 'em_review';\n if ($role == FREELANCER) {\n $type = 'fre_review';\n }\n \n $comment = get_comments(array(\n 'status' => 'approve',\n 'type' => $type,\n 'post_id' => $project_id\n ));\n \n if (!empty($comment)) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You have reviewed on this project.', ET_DOMAIN)\n ));\n }\n \n // end check user review project owner\n \n // add review\n $args['comment_post_ID'] = $project_id;\n $args['comment_approved'] = 1;\n $this->comment_type = 'fre_review';\n $review = Fre_Review::get_instance(\"fre_review\");\n \n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire action after freelancer review employer base on project\n * @param int $int project id\n * @param Array $args submit args (rating score, comment)\n * @since 1.2\n * @author Dakachi\n */\n do_action('fre_freelancer_review_employer', $project_id, $args);\n \n //update project, bid, bid author, project author after review\n $this->update_after_fre_review($project_id, $comment);\n wp_send_json(array(\n 'success' => true,\n 'msg' => __(\"Your review has been submitted.\", ET_DOMAIN)\n ));\n } else {\n \n // revert bid status\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'publish'\n ));\n \n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "public function getReview()\n {\n return $this->review;\n }", "public function reviewed() {\n return $this->morphMany(Review::class, 'reviewer');\n }", "public function get_review() {\n return $this->targets;\n }", "public function getReview(){\r\n\t\treturn $this->SupportReviews();\r\n\t}", "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 getReviewstate() {}", "public function getPotherinreview()\n {\n return $this->potherinreview;\n }", "function getReviewers() {\n $strQuery = \"SELECT * FROM `users` WHERE `user_status` like '%Reviewer%'\";\n\n return $this->query($strQuery);\n }", "public function getReviewedBy()\n {\n return $this->reviewedBy;\n }", "public function isReviewer()\n {\n return $this->hasRole(HakAkses::REVIEWER);\n }", "public function inReview()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Review',\n ];\n });\n }", "function getReview()\n {\n $this->logged_in = $this->flexi_auth->is_logged_in();\n if (!$this->logged_in) {\n # if not logged show error message\n $dataArr = array();\n $pageArr = array('controller' => 'review', 'view' => 'error');\n $this->ajax->render($pageArr, $dataArr);\n }\n\n $receiver_id = intval($this->input->post('receiver_id'));\n if (!$receiver_id) {\n $dataArr = array();\n $pageArr = array('controller' => 'review', 'view' => 'error');\n $this->ajax->render($pageArr, $dataArr);\n }\n\n $login_id = $this->flexi_auth->get_user_id();\n $reviewDtlArr = $this->review->getReviewsByReceiver($receiver_id);\n $receiverArr = array();\n $userDtlArr = array();\n if (count($reviewDtlArr)) {\n foreach ($reviewDtlArr as $key => $value) {\n # code...\n array_push($receiverArr, $value['sender_id']);\n }\n array_push($receiverArr, $receiver_id);\n $receiverArr = array_unique($receiverArr);\n $receiverArr = array_filter($receiverArr);\n\n if (count($receiverArr)) {\n\n foreach ($receiverArr as $key_2 => $value_2) {\n # code...\n $tempUserArr = array();\n array_push($tempUserArr, $this->user->getUserDetailsById($value_2));\n $userDtlArr[$value_2] = isset($tempUserArr[0][0]) ? $tempUserArr[0][0] : '';\n }\n }\n $userDtlArr = array_filter($userDtlArr);\n\n $pageArr = array(\n 'controller' => 'review',\n 'view' => 'show_review'\n );\n $dataArr = array(\n 'receiver_id' => $receiver_id,\n 'review_count' => true,\n 'userDtlArr' => $userDtlArr,\n 'reviewDtlArr' => $reviewDtlArr\n );\n $this->ajax->render($pageArr, $dataArr);\n\n } else {\n $tempUserArr = $this->user->getUserDetailsById($receiver_id);\n $userDtlArr[$receiver_id] = isset($tempUserArr[0]) ? $tempUserArr[0] : '';\n #print_r($userDtlArr);\n $pageArr = array(\n 'controller' => 'review',\n 'view' => 'show_review'\n );\n $dataArr = array(\n 'receiver_id' => $receiver_id,\n 'review_count' => false,\n 'userDtlArr' => $userDtlArr\n );\n $this->ajax->render($pageArr, $dataArr);\n }\n\n\n }", "public function is_onreview() {\n $order = SalesOrder::load($this->orderno);\n\t\t\treturn $order->is_onreview();\n }", "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 getReviews()\n {\n if ($this->_aReviews === null) {\n $this->_aReviews = false;\n if ($this->getConfig()->getConfigParam('bl_perfLoadReviews')) {\n $this->_aReviews = $this->getProduct()->getReviews();\n }\n }\n\n return $this->_aReviews;\n }", "protected function get__reviews()\n\t{\n\t\treturn NULL;\n\t}", "protected function get__unapprovedReviews()\n\t{\n\t\treturn NULL;\n\t}", "public function review()\n\t{\n\t\treturn $this->hasOne('App\\Review');\n\t}", "function getReviewInfo($reviewPassed) {\n $author = $reviewPassed[0][1];\n $timestamp = $reviewPassed[1];\n $content = $reviewPassed[3];\n $stars = $reviewPassed[4];\n $fullreview = [$author, $timestamp, $content, $stars];\n return $fullreview;\n}", "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 }", "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 }", "function processreviewAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $this->view->setFile(\"content\", \"processreview.xml\");\r\n $this->view->setBlock(\"content\", \"review\");\r\n // Extract the block with marks.\r\n $this->view->set_block('review', \"review_mark\", \"review_marks\");\r\n // Extracts the block with answers\r\n $this->view->set_block('review', \"review_answer\", \"review_answers\");\r\n\r\n\r\n // Actions if the id of a paper is submitted\r\n if (isSet($_REQUEST['idPaper'])) {\r\n $idPaper = $this->getRequest()->getParam(\"idPaper\");\r\n $reviewTbl = new Review();\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n\r\n // Check that the paper is REALLY assigned to the reviewer\r\n if (is_object($review)) {\r\n\r\n // Put the review in the database\r\n $review->updateFromArray ($_POST);\r\n\r\n // Create the review presentation\r\n $this->view->review = $review->showReview($this->view, true) ;\r\n // Resolve the entities replacement\r\n $this->view->assign(\"content\", \"content\");\r\n \r\n // Send a mail to confirm review submission\r\n $mail = new Mail (Mail::SOME_USER, $this->texts->mail->subj_ack_review,\r\n $this->view->getScriptPaths());\r\n $mail->setFormat(Mail::FORMAT_HTML);\r\n $mail->setTo($this->user->email);\r\n\r\n $mail->loadTemplate ($this->lang, \"ack_review\");\r\n $mailViewEngine = $mail->getEngine();\r\n $mailViewEngine->setBlock(\"template\", \"template_mark\", \"template_marks\");\r\n $mailViewEngine->setBlock(\"template\", \"template_answer\", \"template_answers\");\r\n\r\n $instantiatedMail = $review->showReview($mailViewEngine, true, \"template\");\r\n $mail->setTemplate ($instantiatedMail);\r\n if ($this->config->mailOnReview == \"Y\") {\r\n $mail->setCopyToChair(true);\r\n }\r\n\r\n $mail->send();\r\n }\r\n else {\r\n $this->view->content = $this->texts->def->access_denied;;\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n echo $this->view->render(\"layout\");\r\n }", "public function getReviewId() {\n\t\t\t\treturn ($this->reviewId);\n\t\t\t}", "public function getReview()\n {\n return $this->hasOne(Review::className(), ['Id' => 'Id_review']);\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['author_id' => 'id']);\n }", "public function isReviewsEnabled()\n {\n return (bool)Mage::helper('core')->isModuleEnabled('Mage_Review');\n }", "public function wrote_review_or_commented() {\n\n\t\t$type = get_post_type();\n\n\t\tif ( $type == 'product' ) {\n\t\t\tif ( $this->event_name['wrote_review'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['wrote_review'], array( $this->property_name['product_name'] => get_the_title() ) );\n\t\t\t}\n\t\t} elseif ( $type == 'post' ) {\n\t\t\tif ( $this->event_name['commented'] ) {\n\t\t\t\t$this->api_record_event( $this->event_name['commented'], array( $this->property_name['post_title'] => get_the_title() ) );\n\t\t\t}\n\t\t}\n\t}", "function paperAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $reviewTbl = new Review();\r\n $paperTbl = new Paper();\r\n $messageTbl = new Message ();\r\n\r\n $this->view->setFile (\"content\", \"paper.xml\");\r\n $this->view->setBlock (\"content\", \"paper_status_link\");\r\n $this->view->setBlock (\"content\", \"message\", \"messages\");\r\n $this->view->setBlock(\"content\", \"review\", \"show_review\");\r\n $this->view->setBlock(\"review\", \"review_mark\", \"review_marks\");\r\n $this->view->setBlock(\"review\", \"review_answer\", \"review_answers\");\r\n $this->view->initial_message = \"\";\r\n\r\n // Am I an admin? If yes I want a link to the paper status page\r\n if (!$this->user->isAdmin()) {\r\n $this->view->paper_status_link =\"\";\r\n }\r\n\r\n $texts = $this->zmax_context->texts;\r\n\r\n if (isSet($_REQUEST['id_paper']) and $this->config->discussion_mode != Config::NO_DISCUSSION) {\r\n $idPaper = $this->getRequest()->getParam(\"id_paper\");\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n $paper = $paperTbl->find($idPaper)->current();\r\n $paper->putInView($this->view);\r\n\r\n // Check that the paper is REALLY assigned to the reviewer (or admin)\r\n if (is_object($review) or $this->user->isAdmin()) {\r\n\r\n // Show all other SUBMITTED reviews, do not propose to see only my review\r\n $this->view->show_review = \"\";\r\n $reviews = $paper->findReview();\r\n foreach ($reviews as $otherReview) {\r\n if (!empty($otherReview->overall)) {\r\n $this->view->show_review .= $otherReview->showReview($this->view);\r\n }\r\n }\r\n\r\n // Message submitted ? Store it in the DB\r\n if (isSet($_REQUEST['form_message'])) {\r\n $message = $messageTbl->createRow();\r\n $message->id_parent = $this->getRequest()->getParam(\"id_parent\");\r\n $message->id_user = $this->user->id;\r\n $message->id_paper =$this->getRequest()->getParam(\"id_paper\");\r\n $message->message = htmlSpecialChars($this->getRequest()->getParam(\"message\"), ENT_NOQUOTES);\r\n $message->date = date(\"Y-m-d H-i-s\");\r\n $message->save();\r\n\r\n // And now, we must send the message to the reviewers and to the PC chair.\r\n $mail = new Mail (Mail::SOME_USER,\r\n $this->texts->mail->subj_new_message . \" \" . $paper->id,\r\n $this->view->getScriptPaths());\r\n $mail->loadTemplate ($this->lang, \"new_message\");\r\n $mail->setFormat(Mail::FORMAT_HTML);\r\n $mail->getEngine()->base_url = $this->view->base_url;\r\n $mail->getEngine()->author_first_name = $this->user->first_name;\r\n $mail->getEngine()->author_last_name = $this->user->last_name;\r\n $paper->putInView ($mail->getEngine());\r\n $message->putInView($mail->getEngine());\r\n\r\n // Send the message to the PC chair.\r\n $fakeName = \"User\" . \"->first_name\";\r\n $mail->getEngine()->setVar($fakeName, $this->config->chair_names);\r\n $mail->setTo ($this->config->chairMail);\r\n $mail->send();\r\n\r\n // Now, mail to each OTHER reviewer\r\n $reviews = $paper->findReview();\r\n $mailOthers = $comma = \"\";\r\n foreach ($reviews as $review) {\r\n if ($review->id_user != $this->user->id) {\r\n $reviewer = $review->findParentUser();\r\n $reviewer->putInView($mail->getEngine());\r\n $mail->setTo ($reviewer->email);\r\n $mail->send();\r\n }\r\n }\r\n }\r\n\r\n // Show the tree of messages\r\n $this->view->messages = Message::display($paper->id, 0, $this->view);\r\n }\r\n else {\r\n $this->view->content = \"You do not have access to this paper!<br/>\";\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n\r\n \r\n echo $this->view->render(\"layout\");\r\n }", "function run()\n\t{\n\t\t// Find review, if there is one\n\t\t$individual_review_ratings=array();\n\t\t$review_rating=post_param('review_rating','');\n\t\tif ($review_rating!='')\n\t\t{\n\t\t\t$individual_review_ratings['']=array(\n\t\t\t\t'REVIEW_TITLE'=>'',\n\t\t\t\t'REVIEW_RATING'=>$review_rating,\n\t\t\t);\n\t\t}\n\n\t\t$poster_name=$GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\t\t$post=comcode_to_tempcode(post_param('post'));\n\n\t\t// OCF renderings of poster\n\t\tstatic $hooks=NULL;\n\t\tif (is_null($hooks)) $hooks=find_all_hooks('modules','topicview');\n\t\tstatic $hook_objects=NULL;\n\t\tif (is_null($hook_objects))\n\t\t{\n\t\t\t$hook_objects=array();\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\trequire_code('hooks/modules/topicview/'.filter_naughty_harsh($hook));\n\t\t\t\t$object=object_factory('Hook_'.filter_naughty_harsh($hook),true);\n\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t$hook_objects[$hook]=$object;\n\t\t\t}\n\t\t}\n\t\tif (!is_guest())\n\t\t{\n\t\t\trequire_code('ocf_members2');\n\t\t\t$poster_details=ocf_show_member_box(get_member(),false,$hooks,$hook_objects,false);\n\t\t} else\n\t\t{\n\t\t\t$custom_fields=new ocp_tempcode();\n\t\t\t$poster_details=new ocp_tempcode();\n\t\t}\n\t\tif (addon_installed('ocf_forum'))\n\t\t{\n\t\t\tif (!is_guest())\n\t\t\t{\n\t\t\t\t$poster=do_template('OCF_POSTER_MEMBER',array('ONLINE'=>true,'ID'=>strval(get_member()),'POSTER_DETAILS'=>$poster_details,'PROFILE_URL'=>$GLOBALS['FORUM_DRIVER']->member_profile_url(get_member(),false,true),'POSTER_USERNAME'=>$poster_name));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$poster=do_template('OCF_POSTER_GUEST',array('IP_LINK'=>'','POSTER_DETAILS'=>$poster_details,'POSTER_USERNAME'=>$poster_name));\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t$poster=make_string_tempcode(escape_html($poster_name)); // Should never happen actually, as applies discounts hook from even running\n\t\t}\n\n\t\t$highlight=false;\n\t\t$datetime_raw=time();\n\t\t$datetime=get_timezoned_date(time());\n\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url(get_member());\n\t\t$title=post_param('title','');\n\t\t$tpl=do_template('POST',array(\n\t\t\t'INDIVIDUAL_REVIEW_RATINGS'=>$individual_review_ratings,\n\t\t\t'HIGHLIGHT'=>$highlight,\n\t\t\t'TITLE'=>$title,\n\t\t\t'TIME_RAW'=>strval($datetime_raw),\n\t\t\t'TIME'=>$datetime,\n\t\t\t'POSTER_URL'=>$poster_url,\n\t\t\t'POSTER_NAME'=>$poster_name,\n\t\t\t'POST'=>$post,\n\t\t\t'POSTER_ID'=>strval(get_member()),\n\t\t\t'POSTER'=>$poster,\n\t\t\t'POSTER_DETAILS'=>$poster_details,\n\t\t\t'ID'=>'',\n\t\t\t'CHILDREN'=>'',\n\t\t\t'RATING'=>'',\n\t\t\t'EMPHASIS'=>'',\n\t\t\t'BUTTONS'=>'',\n\t\t\t'TOPIC_ID'=>'',\n\t\t\t'UNVALIDATED'=>'',\n\t\t\t'IS_SPACER_POST'=>false,\n\t\t\t'NUM_TO_SHOW_LIMIT'=>'0',\n\t\t));\n\t\treturn array($tpl,NULL);\n\t}", "function update_after_empoyer_review($project_id, $comment_id) {\n global $wpdb;\n \n $rate = 0;\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n $profile_id = get_user_meta($freelancer_id, 'user_profile_id', true);\n \n //update status for project\n wp_update_post(array(\n 'ID' => $project_id,\n 'post_status' => 'complete'\n ));\n \n //update rate for profile\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'complete'\n ));\n \n if (isset($_POST['score']) && $_POST['score']) {\n $rate = (int)$_POST['score'];\n if ($rate > 5) $rate = 5;\n update_comment_meta($comment_id, 'et_rate', $rate);\n update_post_meta($bid_id_accepted, 'rating_score', $rate);\n }\n \n $sql = \"select AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n from $wpdb->posts as p \n Join $wpdb->comments as C \n on p.ID = C.comment_post_ID \n join $wpdb->commentmeta as M \n on C.comment_ID = M.comment_id\n Where p.post_author = $freelancer_id\n and p.post_status ='complete'\n and p.post_type ='\" . BID . \"' \n and M.meta_key = 'et_rate'\n and C.comment_type ='em_review'\n and C.comment_approved = 1 \";\n \n $results = $wpdb->get_results($sql);\n \n // update post rating score\n if ($results) {\n wp_cache_set(\"reviews-{$freelancer_id}\", $results[0]->count);\n update_post_meta($profile_id, 'rating_score', $results[0]->rate_point);\n } else {\n update_post_meta($profile_id, 'rating_score', $rate);\n }\n \n // send mail to freelancer.\n $this->mail->review_freelancer_email($project_id);\n }", "public function getReviewerReviews($reviewer_id)\n {\n return $this->reviews()->where('reviewer_id', $reviewer_id)->get();\n }", "public function check_auth_reviews() {\n\t\tif ( isset( $_GET['wp_confirm_reviews_insurance'] ) ) {\n\n\t\t\t//check auth Code\n\t\t\t$comment_id = Helper::check_auth_comment( $_GET['wp_confirm_reviews_insurance'] );\n\t\t\tif ( $comment_id != false ) {\n\n\t\t\t\t//remove meta Key\n\t\t\t\tdelete_comment_meta( $comment_id, 'auth_key' );\n\n\t\t\t\t//Add Validate User Reviews\n\t\t\t\tupdate_comment_meta( $comment_id, 'comment_approve_user', 'yes' );\n\n\t\t\t\t//Show Alert\n\t\t\t\techo '<div class=\"confirm-review-alert\">' . WP_REVIEWS_INSURANCE::$option['email_thanks_text'] . '</div>';\n\t\t\t\techo '\n\t\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t jQuery(\".confirm-review-alert\").delay(1500).fadeOut(\"normal\"); \n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t}\n\t\t}\n\t}", "public function show(Review $review)\n {\n return $review;\n }", "public function getReview()\n\t{\n\t\tif (!is_null($this->review)) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$expression = new Expression;\n\t\t$expression->setBase('//*')->hasClass('hreview-aggregate');\n\n\t\t$this->review = $this->findOne($expression);\n\n\t\tif ($this->review->length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$votes = $this->review->selectOne('.count');\n\t\t$votes = $this->getValue($votes);\n\n\t\t$average = $this->review->selectOne('.rating');\n\t\t$averageTry = $average->selectOne('.average');\n\n\t\tif ($averageTry->length === 1) {\n\t\t\t$average = $averageTry;\n\t\t}\n\t\t$average = preg_match('/([0-5](?:\\.[0-9])?)/', $this->getValue($average), $matches);\n\t\t$average = $matches[0];\n\n\t\t$best = $this->review->selectOne('.rating .best');\n\n\t\tif ($best->length === 0) {\n\t\t\t$best = 5;\n\t\t} else {\n\t\t\t$best = $this->getValue($best);\n\t\t}\n\n\t\t$this->ratings = array(\n\t\t\t'rating' => $average,\n\t\t\t'best.rating' => $best,\n\t\t\t'total.votes' => preg_replace('/[^0-9]/', '', $votes)\n\t\t);\n\n\t\treturn $this;\n\t}", "public function getReviewText() : string {\n\t\treturn ($this->reviewText);\n\t}", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "function getReviews(){\n $reviews = $this->all('schema:reviews');\n if ($reviews){\n \tEasyRdf_TypeMapper::set('schema:Review', 'WorldCat\\Discovery\\Review');\n \t$reviews = static::reloadGraph($this->graph)->resource($this->getUri())->all('schema:reviews');\n \tEasyRdf_TypeMapper::delete('schema:Review');\n }\n return $reviews;\n }", "function review_handler($entry, $form)\n{\n\t$post_id = $entry['post_id'];\n\tif(get_post_type($post_id) != 'bi_review')\n\t\treturn;\n\tif(! is_user_logged_in())\n\t\treturn;\n\t$post = get_post($post_id);\n\t$post->comment_status = 'open';\n\t$post->post_title = $entry[13];\n\t$post->post_status = 'pending';\n\t$post->post_parent = get_post_meta($post_id, 'post_parent', true);\n //echo \"post->parent = \" . $post->post_parent . \"<br/>\";\n\twp_update_post( get_object_vars($post) );\n}", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['CommissionID' => 'CommissionID']);\n }", "public function show($id)\r\n\t{\r\n\t\t$submission = Submission::where('sub_id' , '=', $id)->get()->first();\r\n\r\n\t\t$conf = $submission->Conference()->first();\r\n\t\t$is_reviewer = DB::table('confuserrole')\r\n\t\t\t\t\t\t->select('role_id')\r\n\t\t\t\t\t\t->where('conf_id', '=', $conf->conf_id)\r\n\t\t\t\t\t\t->whereIn('role_id', array(7, 4))\r\n\t\t\t\t\t\t->where('user_id', '=', Auth::user()->user_id)\r\n\t\t\t\t\t\t->first();\r\n\t\tif ($is_reviewer != null) {\r\n\t\t\t$keywords = $submission->keywords()->get();\r\n\t\t\t$authors = $submission->authors()->get();\r\n\t\t\t// $reviews = $submission->reviews()->get();\r\n\t\t\t$reviews = DB::table('reviews')->join('users', 'reviews.user_id', '=', 'users.user_id')\r\n\t\t\t\t\t\t->select('users.firstname', 'users.lastname', 'reviews.comment', 'reviews.internal_comment', 'reviews.quality_score', 'reviews.significance_score', 'reviews.presentation_score', 'reviews.relevance_score', 'reviews.originality_score')->where('reviews.sub_id', '=', $id)->get();\r\n\t\t\t$sub_topics = DB::table('submission_topic')\r\n\t\t\t->leftJoin('conference_topic', 'submission_topic.topic_id', '=', 'conference_topic.topic_id')\r\n\t\t\t->select('submission_topic.topic_id', 'conference_topic.topic_name')->where('submission_topic.sub_id', '=', $id)->get();\r\n\r\n\t\t\treturn View::make('reviews.reviews')->withSubmission($submission)\r\n\t\t\t->with('sub_authors', $authors)\r\n\t\t\t->with('sub_topics', $sub_topics)\r\n\t\t\t->withReviews($reviews)\r\n\t\t\t->withKeyword($keywords);\r\n\t\t} else {\r\n\t\t\treturn Redirect::route('reviews.index')->withMessage('You do not have access to this page!');\r\n\t\t}\t\t\t\t\r\n\t\t\r\n\t}", "public function reviews() {\n return $this->morphMany(Review::class, 'reviewee');\n }", "public function review($post, $data, $comment = null, $admin = null)\n {\n $post = $this->repository->reviews($post, $data, $comment, $admin);\n\n SendReviewedPostToCustomerIo::dispatch($post);\n\n // Log that a post was reviewed.\n info('post_reviewed', [\n 'id' => $post->id,\n 'admin_northstar_id' => $admin ? $admin : auth()->id(),\n 'status' => $post->status,\n ]);\n\n return $post;\n }", "function reviewformAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n\r\n $reviewTbl = new Review();\r\n $this->view->setFile(\"content\", \"reviewform.xml\");\r\n $this->view->setBlock(\"content\", \"SECTION\", \"SECTIONS\");\r\n\r\n\r\n // Extract the blocks from the template\r\n $this->view->setFile(\"review\", \"form_review.xml\");\r\n $this->view->setBlock (\"review\", \"review_mark\", \"review_marks\");\r\n $this->view->setBlock (\"review\", \"review_answer\", \"review_answers\");\r\n\r\n $this->view->selected1 = $this->view->selected2 = $this->view->selected3 = \"\";\r\n\r\n // Actions if the id of a paper is submitted\r\n if (isSet($_REQUEST['id_paper'])) {\r\n $idPaper = $this->getRequest()->getParam(\"id_paper\");\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n\r\n // Check that the paper is REALLY assigned to the reviewer\r\n if (is_object($review)) {\r\n $this->view->review_form = $review->showReview($this->view, false);\r\n }\r\n else {\r\n $this->view->content = \"You do not have access to this paper!<br/>\";\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n \r\n echo $this->view->render(\"layout\");\r\n }", "function wp_is_post_revision($post)\n {\n }", "public function getReviewId(): int\n\t{\n\t\treturn $this->review_id;\n\t}", "public function get_review_logs() {\n return $this->c_review_logs;\n }", "function fre_freelancer_review_form() {\n wp_reset_query();\n global $user_ID;\n $status = get_post_status(get_the_ID());\n $bid_accepted = get_post_field('accepted', get_the_ID());\n $freelan_id = (int)get_post_field('post_author', $bid_accepted);\n $comment = get_comments(array(\n 'status' => 'approve',\n 'post_id' => get_the_ID() ,\n 'type' => 'fre_review'\n ));\n $review = isset($_GET['review']) ? (int)$_GET['review'] : 0;\n $status = get_post_status(get_the_ID());\n \n if (empty($comment) && $user_ID == $freelan_id && $review && $status == 'complete') { ?>\n <script type=\"text/javascript\">\n (function($, Views, Models, Collections) {\n $(document).ready(function(){\n this.modal_review = new AE.Views.Modal_Review();\n this.modal_review.openModal();\n });\n })(jQuery, AE.Views, AE.Models, AE.Collections);\n </script>\n\n <?php\n }\n }", "function update_after_fre_review($project_id, $comment_id) {\n global $wpdb;\n if (isset($_POST['score']) && $_POST['score']) {\n $rate = (int)$_POST['score'];\n if ($rate > 5) $rate = 5;\n update_comment_meta($comment_id, 'et_rate', $rate);\n update_post_meta($project_id, 'rating_score', $rate);\n }\n $employer_id = (int)get_post_field('post_author', $project_id);\n $profile_id = get_user_meta($employer_id, 'user_profile_id', true);\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n FROM $wpdb->posts as p \n join $wpdb->comments as C \n ON p.ID = C.comment_post_ID \n join $wpdb->commentmeta as M \n ON C.comment_ID = M.comment_id\n WHERE \n p.post_author = $employer_id\n AND p.post_status ='complete'\n AND p.post_type ='\" . PROJECT . \"' \n AND M.meta_key = 'et_rate'\n AND C.comment_type ='fr_review'\n AND C.comment_approved = 1\";\n \n $results = $wpdb->get_results($sql);\n \n if ($results) {\n wp_cache_set(\"reviews-{$employer_id}\", $results[0]->count);\n \n // update post rating score\n update_post_meta($profile_id, 'rating_score', $results[0]->rate_point);\n } else {\n update_post_meta($profile_id, 'rating_score', $rate);\n }\n\n // send mail to employer.\n $this->mail->review_employer_email($project_id);\n }", "public function review()\n {\n return view('review');\n }", "public function validateReviewer(): bool\n {\n $review = self::find()\n ->select(['shop_feedback.id', 'shop_feedback.shop_id', 'shop_feedback.created_by'])\n ->where(['shop_feedback.shop_id' => $this->shop_id, 'shop_feedback.created_by' => $this->created_by])\n ->asArray()\n ->one();\n if(!empty($review)){\n $this->addError('created_by',\n Yii::t('app', 'Вы уже добавляли отзыв об этом магазине, но Вы можете его изменить'));\n return false;\n } else {\n return true;\n }\n }", "public function updateProductReviews( $post_id=0 )\n\t\t{\n\t\t\t$asin = $this->the_plugin->get_post_meta( $post_id, '_amzASIN', true, false );\n\t\t\t\n\t\t\t$product = $this->aaAmazonWS->responseGroup('Reviews')->optionalParameters(array('MerchantId' => 'All'))->lookup( $asin );\n \n\t\t\tif($product['Items'][\"Request\"][\"IsValid\"] == \"True\"){\n\t\t\t\t$thisProd = isset($product['Items']['Item']) ? $product['Items']['Item'] : array();\n\t\t\t\tif (isset($product['Items']['Item']) && count($product['Items']['Item']) > 0){\n\t\t\t\t\t$reviewsURL = $thisProd['CustomerReviews']['IFrameURL'];\n\t\t\t\t\tif( trim($reviewsURL) != \"\" ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tab_data = array();\n\t\t\t\t\t\t$tab_data[] = array(\n\t\t\t\t\t\t\t'id' => 'amzAff-customer-review',\n\t\t\t\t\t\t\t'content' => '<iframe src=\"' . ( $reviewsURL ) . '\" width=\"100%\" height=\"450\" frameborder=\"0\"></iframe>'\n\t\t\t\t\t\t); \n\t\t\t\t\t\t\n\t\t\t\t\t\tupdate_post_meta( $post_id, 'amzaff_woo_product_tabs', $tab_data );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $reviewsURL; \n\t\t}", "public function actionReview(){\r\n $user = $_REQUEST['pro'];\r\n $list = MvCouiManager::getReview($user);\r\n $aclist = MvCouiManager::getAcreview($user);\r\n $nolist = MvCouiManager::getNoreview($user);\r\n $dellist = MvCouiManager::getDelreview();\r\n $this->render('review',array('list'=>$list,'aclist'=>$aclist,'nolist'=>$nolist,'dellist'=>$dellist));\r\n }", "public function reviews()\n {\n return $this->hasMany(Review::class, 'user_id');\n }", "public function actionReview($id)\n {\n $model = $this->findModel($id);\n\n if('in-review' == $model->status){\n /* no changing of reviewer permitted when module is in-review */\n $enquirySpecialistsList[\"$model->reviewer_id\"] = User::findOne($model->reviewer_id)['name'];\n } else { \n /* get (id,name) as (key,value) array/list of enquiry specialists */\n $subQuery = AuthAssignment::find()->where((['item_name' => 'enquiryspecialist']))->all();\n $subQuery = ArrayHelper::map($subQuery,'user_id','user_id');\n $mainQuery = User::find()->where(['in', 'id', $subQuery])->all();\n $enquirySpecialistsList = ArrayHelper::map($mainQuery, 'id', 'name' ); \n } \n $model->enquirySpecialistsList = $enquirySpecialistsList; \n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->status = 'in-review';\n if($model->owner_id == Yii::$app->user->getId()){\n /* meaning review is submitted by module owner. So review_status has to be 'in-review'*/\n $model->review_status = 'in-review'; \n } \n\n if( ($model->reviewer_id == Yii::$app->user->getId()) and ('approved' == $model->review_status)){\n /* review is approved so ALSO change model status to approved (along with review status).*/\n $model->status = 'approved';\n } \n\n /* adding review comment to review_comment model */\n $modelComment = new ReviewComment();\n $modelComment->commenter_id = Yii::$app->user->getId();\n $modelComment->module_id = $model->id;\n $modelComment->comment = $model->reviewComment;\n $modelComment->review_status_before = $model->review_status;\n $modelComment->review_status_after = $model->review_status;\n $modelComment->save();\n\n $model->save(); \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('review', [\n 'model' => $model,\n ]);\n }\n }", "protected static function reviewer()\n {\n return auth()->check() ? auth()->id() : 1;\n }", "public function getCurrentReview($id){\t\t\r\n \t\t$URLSegment = Convert::raw2sql($id);\r\n\t\tif($URLSegment && $Review = DataObject::get_one('SupportReview', \"URLSegment = '\" . $URLSegment . \"'\")){\r\n\t\t\treturn $Review;\r\n\t\t}\r\n\t}", "function peryear(SS_HTTPRequest $r){\t\t\r\n\t\t$years = (int) $r->param('ID');\r\n\t\t$filter = \"\";\r\n\t\t$start_date = false;\r\n\t\tif($years) {\r\n\t\t\t$ago = strtotime(\"$years years ago\");\t\t\t\r\n\t\t\t$start_date = date('Y-m-d', $ago);\r\n\t\t\t$filter = \"`DateOfReview` > '$start_date' AND \";\r\n\t\t}\r\n\t\t$locale = $this->Locale;\r\n\t\t$percat = DataObject::get(\"SupportReview\",\"$filter `Published` = true AND `Locale` ='\".$locale.\"'\", null, null, $this->getLimit());\r\n\t\tif(!$percat) {\r\n\t\t\t$percat = Array();\r\n\t\t\t// return $this->httpError(404, _t('SupportDocsPage.NOTFOUD',\"Sorry that review could not be found\"));\r\n\t\t}\r\n\t\treturn array(\r\n\t\t\t\"Reviews\" => $percat,\r\n\t\t\t\"Heading\" => $start_date ? \"Start date: $start_date\" : \"All reviews\" // Debugging purposes only. Feel free to change.\r\n\t\t);\r\n\t}", "public function reviews_data() {\n\t\tglobal $wpdb;\n\n\t\t$post_ids = $wpdb->get_col( $wpdb->prepare( \"\n\t\t\tSELECT comment_post_ID, AVG(meta_value) AS rating\n\t\t\tFROM {$wpdb->commentmeta}\n\t\t\tINNER JOIN {$wpdb->comments} ON {$wpdb->commentmeta}.comment_id = {$wpdb->comments}.comment_ID\n\t\t\tWHERE meta_key = %s AND {$wpdb->commentmeta}.comment_id IN (\n\t\t\t\tSELECT comment_id\n\t\t\t\tFROM {$wpdb->commentmeta}\n\t\t\t\tWHERE meta_key = %s AND meta_value = 1\n\t\t\t)\n\t\t\tGROUP BY {$wpdb->comments}.comment_post_ID\n\t\t\tORDER BY rating ASC\", 'edd_rating', 'edd_review_approved' ), 0 );\n\n\t\tif ( $post_ids ) {\n\t\t\t$this->total_count = count( $post_ids );\n\n\t\t\t$post_ids = array_map( 'intval', $post_ids );\n\n\t\t\t$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;\n\t\t\t$start = ( $pagenum - 1 ) * $this->per_page;\n\n\t\t\t$args = array(\n\t\t\t\t'numberposts' => $this->per_page,\n\t\t\t\t'offset' => $start,\n\t\t\t\t'post__in' => $post_ids,\n\t\t\t\t'orderby' => 'post__in',\n\t\t\t\t'post_type' => 'download'\n\t\t\t);\n\n\t\t\t$posts = get_posts( $args );\n\n\t\t\t$this->items = $posts;\n\n\t\t\treturn $posts;\n\t\t}\n\n\t\treturn null;\n\t}", "function save_review($post_id) {\n // Comprobar que el post no esté en autosave\n $is_autosave = wp_is_post_autosave($post_id);\n // Comprobar que el post no esté en revision\n $is_revision = wp_is_post_revision($post_id);\n // Comprobar el campo nonce - verificamos si es correcto y si no ha expirado\n $is_valid_nonce = (isset($_POST['review_metabox_nonce']) && wp_verify_nonce($_POST['my_app_metabox_nonce'], basename(__FILE__))) ? 'true' : 'false';\n // Comprobar que tenemos permiso\n if($is_autosave || $is_revision || !$is_valid_nonce) {\n return;\n }\n\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n\n // Saneamos los campos para evitar inyecciones de codigo\n if(isset($_POST['release'])) {\n $release = sanitize_text_field($_POST['release']);\n\n $pegi = sanitize_text_field( $_POST['my_app_pegi']);\n\n $pc = sanitize_text_field( $_POST['pc']);\n $ps4 = sanitize_text_field( $_POST['ps4']);\n $ps5 = sanitize_text_field( $_POST['ps5']);\n $xboxone = sanitize_text_field( $_POST['xboxone']);\n $xboxseriesx = sanitize_text_field( $_POST['xboxseriesx']);\n $switch = sanitize_text_field( $_POST['switch']);\n\n $action = sanitize_text_field( $_POST['my_action']);\n $adventure = sanitize_text_field( $_POST['my_adventure']);\n $rpg = sanitize_text_field( $_POST['my_rpg']);\n $strategy = sanitize_text_field( $_POST['my_strategy']);\n $platforms = sanitize_text_field( $_POST['my_platforms']);\n $puzzle = sanitize_text_field( $_POST['my_puzzle']);\n\n $developer = sanitize_text_field( $_POST['developer']);\n\n $points = sanitize_text_field( $_POST['points']);\n\n $textspanish = sanitize_text_field( $_POST['my_textspanish']);\n $textenglish = sanitize_text_field( $_POST['my_textenglish']);\n \n $voicesspanish = sanitize_text_field( $_POST['my_voicesspanish']);\n $voicesenglish = sanitize_text_field( $_POST['my_voicesenglish']);\n\n // GRABAMOS EN LA BASE DE DATOS\n update_post_meta($post_id, 'release', $release);\n update_post_meta($post_id, 'pegi', $pegi);\n\n update_post_meta($post_id, 'pc', $pc);\n update_post_meta($post_id, 'ps4', $ps4);\n update_post_meta($post_id, 'ps5', $ps5);\n update_post_meta($post_id, 'xboxone', $xboxone);\n update_post_meta($post_id, 'xboxseriesx', $xboxseriesx);\n update_post_meta($post_id, 'switch', $switch);\n\n update_post_meta($post_id, 'my_action', $action);\n update_post_meta($post_id, 'my_adventure', $adventure);\n update_post_meta($post_id, 'my_rpg', $rpg);\n update_post_meta($post_id, 'my_strategy', $strategy);\n update_post_meta($post_id, 'my_platforms', $platforms);\n update_post_meta($post_id, 'my_puzzle', $puzzle);\n\n update_post_meta($post_id, 'developer', $developer);\n\n update_post_meta($post_id, 'points', $points);\n\n update_post_meta($post_id, 'my_textspanish', $textspanish);\n update_post_meta($post_id, 'my_textenglish', $textenglish);\n\n update_post_meta($post_id, 'my_voicesspanish', $voicesspanish);\n update_post_meta($post_id, 'my_voicesenglish', $voicesenglish);\n }\n }", "public function scopeReviewed($query)\n {\n return $query->where('reviewed', '=', true);\n }", "public function reviews()\n\t{\n\t\treturn $this->hasMany(Review::class); \n\t}", "function getReviewerId() {\n\t\treturn $this->getData('reviewerId');\n\t}", "public function getReviewById($revId) {\t\n\t\t\n\t\t$key = $this->getReviewByIdKey($revId);\n\t\t$result = $this->getCached($key);\n\t\tif ($result) return $result;\n\t\t\n\t\t$mysqli = $this->getConn();\n\t\t\n\t\t$sql = sprintf(\"SELECT R.ID, R.USRID, R.SITEID, R.CATREVID, R.LANGCODE, R.DESCR, R.HOWTOARRIVE, R.WARNING, \n\t\t\t\t\t\t\t R.WHERETOEAT, R.COOKING, R.WHERETOSTAY, R.MYTH, R.DTINS, R.VOTE, R.COVERFILENAME, \n\t\t\t\t\t\t\t R.XDIM, R.YDIM, U.NAME, U.COVERFILENAME, S.SITENAME, S.LOCALITY, C.COUNTRY, G.PLACEID,\n\t\t\t\t\t\t\t SUM(ST.STAR) AS STAR, SUM(ST.SEE) AS SEE, SUM( CASE WHEN (POST = '' OR POST IS NULL ) THEN 0 ELSE 1 END ) AS POST\n\t\t\t\t\t\tFROM REVIEW R \n\t\t\t\t\t\t\tJOIN SITE S ON R.SITEID = S.ID\n\t\t\t\t\t\t\tJOIN GEO_SITE G ON G.ID = S.GEOSITEID\n\t\t\t\t\t\t\tJOIN USER U ON U.ID = R.USRID\n\t\t\t\t\t\t\tLEFT JOIN REVIEW_STAR ST ON ST.REVID = R.ID,\n\t\t\t\t\t\t\tCOUNTRY C\n\t\t\t\t\t\tWHERE R.ID = %d \n\t\t\t\t\t\tAND C.ID = S.COUNTRYID\n\t\t\t\t\t\tORDER BY DTINS DESC\", $revId);\n\t\tLogger::log(\"ReviewDAO :: getReviewById :: query: \".$sql, 3);\n\t\t//echo $sql; exit;\n\t\tif ($stmt = $mysqli->prepare($sql)) {\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($id, $usrId, $siteId, $catRevId, $langCode, $descr, $howToArrive, $warning, \n\t\t\t\t\t\t\t $whereToEat, $cooking, $whereToStay, $myth, $dtIns, $vote, $coverFileName, $xdim, $ydim,\n\t\t\t\t\t\t\t $userName, $userCoverFileName, $siteName, $localityName, $country, $placeId, $star, $see, $post);\n\t\t\tif($stmt->fetch()) {\n\t\t\t\t$descr = str_replace(\"\\r\\n\",'<br>', $descr);\n\t\t\t\t//Costruttore\n\t\t\t\t$reviewDO = New ReviewDO($id, $usrId, $siteId, $catRevId, $langCode, $descr, $howToArrive, $warning, $whereToEat, $cooking, \n\t\t\t\t\t\t\t\t\t\t $whereToStay, $myth, $dtIns, $vote, $coverFileName, $xdim, $ydim);\n\n\t\t\t\t//Setto i campi in relazione\n\t\t\t\t$reviewDO->setUsrName($userName);\n\t\t\t\t$reviewDO->setUserCoverFileName($userCoverFileName);\n\t\t\t\t$reviewDO->setSiteName($siteName);\n\t\t\t\t$reviewDO->setLocality($localityName);\n\t\t\t\t$reviewDO->setCountry($country);\n\t\t\t\t$reviewDO->setPlaceId($placeId);\n\t\t\t\t\n\t\t\t\t$reviewDO->setCntStar(isset($star)?$star:0);\n\t\t\t\t$reviewDO->setCntSee(isset($see)?$see:0);\n\t\t\t\t$reviewDO->setCntPost(isset($post)?$post:0);\n\t\t\t\t\n\t\t\t\t$stmt->free_result();\n\t\t\t\t$mysqli->close();\n\t\t\t\t$this->setCached($key, $reviewDO);\n\t\t\t\treturn $reviewDO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//close\n\t\t$mysqli->close();\n\t\treturn;\n\t}", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['callId' => 'callId']);\n }", "public function review()\n {\n return $this->morphTo();\n }", "public function get_review_all($adid) {\n $sql = \"select * from review where StatusID =1 and AdsID=?\";\n $data = $this->db->query($sql, array($adid));\n return $data->result();\n }", "public function getReviews()\n {\n return $this->hasMany(Review::className(), ['task_id' => 'id']);\n }", "function is_post_status_viewable($post_status)\n {\n }", "public function review($id)\n {\n // Get all the things.\n $application = Application::getUserApplication($id);\n $profile = Profile::getUserProfile($id);\n $scholarship = Scholarship::getScholarshipLabels();\n\n $vars = (object) $this->settings->getSpecifiedSettingsVars(['application_submit_help_text']);\n\n $prof_complete = Profile::isComplete(Auth::user()->id);\n if (!$prof_complete) {\n return Redirect::route('status')->with('flash_message', ['text' => 'Please go back and answer all required questions in ' . link_to_route('profile.create', 'basic info.'), 'class' => '-warning']);\n }\n\n return View::make('status.review', compact('application', 'profile', 'scholarship', 'vars'));\n }", "public function get_review_page() {\n $this->do_review_page();\n return $this->c_review_page;\n }", "public function review()\n {\n return view('company.review');\n }", "function &getReviewAssignment($submissionId, $reviewerId, $round, $stageId = null) {\n\t\t$params = array(\n\t\t\t(int) $submissionId,\n\t\t\t(int) $reviewerId,\n\t\t\t(int) $round\n\t\t);\n\t\tif ($stageId !== null) $params[] = (int) $stageId;\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT r.*, r2.review_revision, u.first_name, u.last_name\n\t\t\tFROM\treview_assignments r\n\t\t\t\tJOIN users u ON (r.reviewer_id = u.user_id)\n\t\t\t\tLEFT JOIN review_rounds r2 ON (r.submission_id = r2.submission_id AND r.round = r2.round)\n\t\t\tWHERE\tr.submission_id = ? AND\n\t\t\t\tr.reviewer_id = ? AND\n\t\t\t\tr.cancelled <> 1 AND\n\t\t\t\tr.round = ?' .\n\t\t\t\t($stageId !== null? ' AND r.stage_id = ?' : ''),\n\t\t\t$params\n\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_fromRow($result->GetRowAssoc(false));\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function return(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 // 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 }", "public function getReviewExistsAttribute()\n {\n $auth_user = Auth::user();\n\n if (array_search($auth_user->id, [$this->user_id, $this->seller_id])) {\n $result = $this->reviews()\n ->where('user_id', $auth_user->id)\n ->exists();\n }\n\n return $result ?? null;\n }", "private function reviewDestiny()\n {\n $this->setExpectations();\n return $this->reviewTicket();\n }", "public function getLastReviewed()\n {\n return $this->lastReviewed;\n }", "function getReviewRoundJoin() {\n\t\treturn false;\n\t}", "function getRCCACountUnderReview()\n{\n\tglobal $dbObjMirrors;\n\n\t$RCCAQuery = \"SELECT State,count(*) as cnt\n\t\t\t\t\tFROM [mirrors].[dbo].[View_LSIP2_RCCA]\n\t\t\t\t\tWHERE [mirrors].[dbo].[View_LSIP2_RCCA].[Ready_For_Arch_Review]='Yes' and State='Submitted'\n\t\t\t\t\tGROUP BY State\";\n\n\t$RCCAResult = $dbObjMirrors->executeQuery($RCCAQuery);\n\n\treturn $RCCAResult;\n}", "public function showApprovedPost();", "public function rebeccareviews()\n {\n return $this->hasMany(RebeccaReview::class);\n }", "function bwcr_process_review(){\n $items_reviewed = array();\n foreach( $_POST as $key => $data ){\n if( $key != \"username\" && $key != \"user_id\" && $key != 'action' ){\n\n // store items just reviewed for redirect\n array_push( $items_reviewed, $key );\n bwcr_insert_comment( $key, $data );\n // bwcr_process_the_ratings( $key, $data );\n }\n }\n wp_redirect( '/review?p_ids=' . implode( ',', $items_reviewed ) . '&action=thankyou' );\n}", "function is_approved() {\n\t\treturn $this->get_data( 'comment_approved' );\n\t}", "public function findReview(string $reviewId)\n {\n //\n }", "public function main($post_id) {\n \n if( !wpjb_candidate_have_access( get_the_ID() ) ) {\n \n if( wpjb_conf( \"cv_members_have_access\" ) == 1 ) {\n $msg = __(\"Only registered candidates have access to this page.\", \"wpjobboard\");\n } elseif( wpjb_conf( \"cv_members_have_access\" ) == 2 ) {\n $msg = sprintf( __('Only premium candidates have access to this page. Get your premium account <a href=\"%s\">here</a>', \"wpjobboard\"), get_the_permalink( wpjb_conf( \"urls_link_cand_membership\" ) ) );\n }\n \n $this->addError( $msg );\n return wpjb_flash();\n }\n \n $resume = wpjb_get_object_from_post_id($post_id);\n /* @var $resume Wpjb_Model_Resume */\n \n $this->view = new stdClass();\n $this->canView($resume->id);\n \n if(!$this->canBrowse($resume->id)) {\n if(wpjb_conf(\"cv_privacy\") == 1) {\n $this->canViewError();\n return false;\n }\n }\n \n $this->view->form_error = null;\n $this->view->tolock = apply_filters(\"wpjb_lock_resume\", array(\"user_email\", \"phone\", \"user_url\"));\n $this->view->current_url = wpjr_link_to(\"resume\", $resume);\n $this->view->resume = $resume;\n \n $this->form = array();\n $this->show = array(\"contact\"=>0, \"purchase\"=>0);\n \n if($this->getRequest()->get(\"form\") == \"contact\") {\n $show[\"contact\"] = 1;\n }\n if($this->getRequest()->get(\"form\") == \"purchase\") {\n $show[\"purchase\"] = 1;\n }\n \n if($this->view->button->contact == 1) {\n $this->form[\"contact\"] = new Wpjb_Form_Resumes_Contact;\n }\n if($this->view->button->purchase == 1) {\n $this->form[\"purchase\"] = new Wpjb_Form_Resumes_Purchase;\n }\n \n $contact = $this->handleContact($resume);\n $purchase = $this->handlePurchase($resume);\n \n if($purchase !== null) {\n return $purchase;\n }\n \n $this->view->f = $this->form;\n $this->view->show = (object)$this->show;\n \n return $this->render(\"resumes\", \"resume\");\n }", "function &getRevisionsByReviewRound($submissionId, $stageId, $round, $fileStage = null,\n\t\t\t$uploaderUserId = null, $uploaderUserGroupId = null) {\n\t\tif (!($stageId && $round)) {\n\t\t\t$nullVar = null;\n\t\t\treturn $nullVar;\n\t\t}\n\t\treturn $this->_getInternally($submissionId, $fileStage, null, null, null, null, $stageId, $uploaderUserId, $uploaderUserGroupId, $round);\n\t}", "public function reviews() {\n return $this->morphedByMany(Review::class, 'taggable');\n }", "public function getItemNeedReview()\n {\n if (array_key_exists(\"itemNeedReview\", $this->_propDict)) {\n return $this->_propDict[\"itemNeedReview\"];\n } else {\n return null;\n }\n }", "public function reviews()\n {\n $this->authCheck();\n\n /*$messagesData = DB::table('web_messages')\n ->get();*/\n\n $reviewsData = DB::table('reviews')->where('is_deleted', '=', 'No')->get();\n /*whereNull('is_deleted')->get();*/\n \n $reviews=view('admin.reviews')\n ->with('reviewsData',$reviewsData);\n\n return view('admin.master')\n ->with('main_content',$reviews);\n }", "public function testPostingASingleReview()\n {\n Bus::fake();\n\n // Create a post.\n $northstarId = $this->faker->northstar_id;\n $post = factory(Post::class)->create();\n\n $response = $this->withAccessToken($northstarId, 'admin')->postJson('api/v3/posts/' . $post->id . '/reviews', [\n 'status' => 'accepted',\n 'comment' => 'testing',\n ]);\n\n $response->assertStatus(201);\n Bus::assertDispatched(SendReviewedPostToCustomerIo::class);\n\n // Make sure the post status is updated & a review is created.\n $this->assertEquals('accepted', $post->fresh()->status);\n $this->assertDatabaseHas('reviews', [\n 'admin_northstar_id' => $northstarId,\n 'post_id' => $post->id,\n 'comment' => 'testing',\n ]);\n }", "public function getDisapprovedStatus()\n {\n sfContext::getInstance()->getConfiguration()->loadHelpers(array(\"I18N\"));\n\n $repproved = StudentRepprovedCourseSubjectPeer::retrieveByCareerSubjectIdAndStudentId($this->getCourseSubject()->getCareerSubjectSchoolYear()->getCareerSubjectId(), $this->getStudentId());\n\n if ($repproved)\n {\n return __(\"Previous\");\n }\n else\n {\n $c = new Criteria();\n $c->addDescendingOrderByColumn(CourseSubjectStudentExaminationPeer::EXAMINATION_NUMBER);\n $examinations = $this->getCourseSubjectStudentExaminations($c);\n return SchoolBehaviourFactory::getEvaluatorInstance()->getStringFor($examinations[0]->getExaminationNumber());\n }\n\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function ReviewRatedByActiveUser()\n {\n return array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION) && array_key_exists($this->id, $_SESSION['TPkgShopArticleReviewShopArticleReviewRated']);\n }", "function getReviews($which) {\n\n\t$id = getUserID();\n\t$reviews = array();\n\t\n\tif ($which == 'positive') {\n\t\t$query = \"SELECT * FROM reviews WHERE reviews.user_id = \".$id.\" AND reviews.is_positive\";\n\t} else {\n\t\t$query = \"SELECT * FROM reviews WHERE reviews.user_id = \".$id.\" AND !reviews.is_positive\";\n\t}\n\t\n\t$result = mysql_query($query) or die(mysql_error());\n\twhile($row = mysql_fetch_array($result)){\n\t\t$reviews[] = $row;\n\t}\n\t\n\treturn $reviews;\n}", "public function view(Review $review);" ]
[ "0.6868713", "0.6792641", "0.6603587", "0.65696305", "0.6429343", "0.63119996", "0.62915945", "0.6238787", "0.6211797", "0.59429663", "0.58551496", "0.5838472", "0.5837719", "0.58273524", "0.5820893", "0.5775277", "0.5742934", "0.5736777", "0.5731428", "0.57084596", "0.56440026", "0.563712", "0.5626272", "0.5576196", "0.55685014", "0.55638427", "0.55351466", "0.5518413", "0.5485215", "0.548137", "0.5438562", "0.543515", "0.5433492", "0.54315937", "0.5420571", "0.5407139", "0.53921956", "0.538971", "0.53690183", "0.5365678", "0.5363661", "0.5360319", "0.53553855", "0.53487754", "0.5338746", "0.5337316", "0.5330465", "0.5327765", "0.53106475", "0.5298154", "0.52931786", "0.52909666", "0.52890414", "0.52876794", "0.5272407", "0.52695423", "0.5258731", "0.5244899", "0.52352387", "0.5227043", "0.5207145", "0.51961726", "0.5189184", "0.5185961", "0.51850694", "0.5182501", "0.51811624", "0.5180015", "0.51784354", "0.5165136", "0.51648015", "0.5161728", "0.5156924", "0.51538473", "0.51514244", "0.5151233", "0.5149473", "0.5145997", "0.51459813", "0.51435316", "0.5143015", "0.514207", "0.514092", "0.513613", "0.51312625", "0.51279104", "0.5114155", "0.51132077", "0.5108902", "0.5099016", "0.5095454", "0.5093782", "0.50895834", "0.50760835", "0.50760835", "0.50760835", "0.50760835", "0.5072733", "0.5064475", "0.5064061" ]
0.65818036
3
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 }", "public function isUserAssignable()\r\n {\r\n return strpos($this->assignRole,'ROLE_USER') !== false ? true : false;\r\n }", "public function isAssigned($resource);", "protected function isCurrentPageEditableByUser() {\n\n\t\t$title = $this->getTitle();\n\t\t$user = $this->getUser();\n\t\treturn $title->quickUserCan( 'edit', $user )\n\t\t\t&& ( $title->exists() || $title->quickUserCan( 'create', $user ) );\n\t}", "public function edit(User $user)\n {\n return $user->role->can_edit_post == 1;\n }", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "public function hasAssigned($user): bool\n {\n return $this->users()->where('user_id', $user->id)->exists();\n }", "public function getReviewExistsAttribute()\n {\n $auth_user = Auth::user();\n\n if (array_search($auth_user->id, [$this->user_id, $this->seller_id])) {\n $result = $this->reviews()\n ->where('user_id', $auth_user->id)\n ->exists();\n }\n\n return $result ?? null;\n }", "protected function owner_matches_current_user()\n {\n }", "public function is_show_ask_for_review_notice() {\n return (\n nk_theme()->theme_dashboard()->theme_id &&\n nk_theme()->theme_dashboard()->theme_uri &&\n nk_theme()->theme_dashboard()->ask_for_review &&\n 'show' === nk_theme()->get_option( 'ask_for_review_status', 'first' )\n );\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }", "public function canBeReviewed(): bool\n {\n if (!$this->isOnline()) {\n return false;\n }\n\n if (new \\DateTimeImmutable('now') > $this->getReviewDeadline()) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }", "function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}", "public function editPost(User $user, Post $post)\n {\n return $user->id === $post->user_id;\n }", "public function isReviewer()\n {\n return $this->hasRole(HakAkses::REVIEWER);\n }", "public function hasRating()\n\t{\n\t\t$this->getReview();\n\n\t\treturn $this->review->length > 0;\n\t}", "public function pass(User $user, Post $post) {\n return $user->id == $post->user_id;\n }", "public function isPendingReview() {\n return $this->getStatus() === Status::PENDING_REVIEW;\n }", "public function getReviewedBy()\n {\n return $this->reviewedBy;\n }", "private function allowed_to_view_matches(){\n if(!rcp_user_can_access($this->user_id, $this->security_form_id) || !rcp_user_can_access($this->user_id, $this->defendant_id)){\n $this->error_message = esc_html__('You do not have access to this report.', 'pprsus');\n return false;\n }\n //are the variables even set\n if($this->security_form_id == '' || $this->defendant_id == '' || $this->token == ''){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n //is this a security form post type\n if(get_post_type($this->security_form_id) != 'security'){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n //does the security form or defendant belong to the current user\n $security_form_author = get_post_field('post_author', $this->security_form_id);\n if($security_form_author != $this->user_id){\n $this->error_message = esc_html__('This security report belongs to another user.', 'pprsus');\n return false;\n }\n\n $defendant_author = get_post_field('post_author', $this->defendant_id);\n if($defendant_author != $this->user_id){\n $this->error_message = esc_html__('This defendant belongs to another user.', 'pprsus');\n return false;\n }\n\n //is the token valid\n $token_from_post = get_post_meta((int)$this->security_form_id, 'secret_token', true);\n if($token_from_post != $this->token){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n return true;\n }", "protected function canRate(){\n //Check if there's even a logged in user to save some cycles doing all the calculations below\n if(!$this->canUserModify()){\n return false;\n }\n $commentRateObject = $this->createEmptyObjectWithAttachedComment('SocialQuestionCommentContentRating', $this->connectObj);\n // add a filler rating value\n $commentRateObject->RatingValue = 100;\n\n return $this->isActive() &&\n $this->isQuestionActive() &&\n !$this->isAuthor() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n $this->cachePerQuestion(PERM_SOCIALQUESTIONCOMMENTCONTENTRATING_CREATE, $commentRateObject);\n }", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function isOwnedBy($user)\n {\n if (($user === null) || ($user->user_id === null)) {\n return false;\n } else {\n return ($user->user_id === $this->user_id);\n }\n }", "public function is_onreview() {\n $order = SalesOrder::load($this->orderno);\n\t\t\treturn $order->is_onreview();\n }", "function is_post_publicly_viewable($post = \\null)\n {\n }", "function isSubmittedBy();", "public function userCanSubmit() {\n\t\tglobal $content_isAdmin;\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($content_isAdmin) return true;\n\t\t$user_groups = icms::$user->getGroups();\n\t\t$module = icms::handler(\"icms_module\")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);\n\t\treturn count(array_intersect($module->config['poster_groups'], $user_groups)) > 0;\n\t}", "public function update(User $user, Post $post)\n {\n return $user->isAuthorOf($post) || $user->isAdmin();\n }", "function eman_can_view( $post, $user_id=false )\n{\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\n\t// Turner can view anything\n\tif ( eman_check_role('turner', $user_id) ) return true;\n\n\t// Pending can't view anything\n\tif ( eman_check_role('pending', $user_id) ) return false;\n\n\t// Test a post_type generally\n\tif ( is_string($post) && get_post_type_object($post) )\n\t{\n\t\t$post_type = $post;\n\t\t$is_post = false;\n\t}\n\t// Test a post specifically\n\telseif ( is_object($post) )\n\t{\n\t\t$post_type = $post->post_type;\n\t\t$is_post = true;\n\t\t// If BIC user, all set, they can view it\n\t\tif ( $user_id == emanager_bic::get_bic($post, 'ID') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\t// Settings for post type\n\t$cpt = ( $settings = eman_post_types($post_type) ) ? $settings : array();\n\n\t// Test settings permissions\n\tif ( ! empty($cpt['access']) )\n\t{\n\t\t// Owners have no access to settings\n\t\tif ( eman_check_role('owner', $user_id) && ! in_array('owner', $cpt['access']) ) return false;\n\n\t\t// Subs have limited access to settings\n\t\tif ( eman_check_role('sub', $user_id) && ! in_array('sub', $cpt['access']) ) return false;\n\t}\n\telseif ( eman_check_role('owner', $user_id) && ( ($is_post && 'noc' === eman_pco_or_noc($post)) || ( ! $is_post && 'em_noc' == $post_type && ! get_query_var('pco')) ) )\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\tif ( $is_post )\n\t{\n\t\t// Test if user is in same company or created post\n\t\tif ( $is_post && (emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || ('em_issue' == $post->post_type && eman_check_role('owner', $user_id)) | ('em_letter' == $post->post_type && eman_check_role('owner', $user_id)) ) ) return true;\n\n\t\t// If is NOC (not PCO), and is owner group, they can view\n\t\tif ( $is_post && 'pco' == eman_pco_or_noc($post) && eman_check_role('owner', $user_id) ) return true;\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "protected\n function injection_author_owns( $post_object )\n {\n if ( is_null($this->injection_post) ) {\n $result = self::NO_POST_AUTHOR == $post_object->post_author;\n } else {\n $result = $this->injection_post->post_author == $post_object->post_author;\n }\n return $result;\n }", "public function canMyLikes() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\treturn true;\n }", "public function authorize()\n {\n // $user = app( 'auth' )->user();\n // $rsvp = Rsvp::findOrFail( $this->rsvps );\n\n // return $rsvp->user_id === $user->id;\n return true;\n }", "function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }", "public function view(User $user, Post $post): array|bool\n {\n return $user->ability(roles: 'admin', permissions: 'display_posts');\n }", "protected function wasActualUser()\n {\n return ($this->wrappedObject->user_id == $this->wrappedObject->revisionable_id || !$this->wrappedObject->user_id);\n }", "public function canUserAssignUsage()\n {\n $user = $this->getUser();\n\n return $user->isAdmin || \\in_array('tl_news::usage', $user->alexf, true);\n }", "public function isReported(User $user)\n {\n $userId = $user->getId();\n $redis = Yii::$app->redis;\n \n $key = 'postcomplains:'.$this->id;\n \n return($redis->sismember($key, $userId)); \n }", "public function isAssigned()\n\t{\n\t\treturn $this->assigned;\n\t}", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "function can_submit_detail_project_proposal(ProjectRequestDetail $projectRequestDetail)\n {\n return (auth()->user()->id == $projectRequestDetail->projectApprovedProposal->auth_user_id);\n }", "public function return(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 // 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 }", "protected function restrict_to_author() {\n if ($this->post->author_id != $this->current_user->id) {\n forbidden();\n }\n }", "function is_approved() {\n\t\treturn $this->get_data( 'comment_approved' );\n\t}", "public function view(User $user, Interview $interview)\n {\n if($user->hasPermissionTo('view interview')){\n if(!$user->hasAnyRole(['Super Admin', 'Admin'])){\n return $interview->user_id == $user->id;\n } else {\n return true;\n }\n }\n return true;\n }", "public function viewAny(User $user)\n {\n return $user->hasPermissionTo('view interview');\n }", "function is_post_status_viewable($post_status)\n {\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "function userLiked($post_id)\n{\n usersOnly();\n global $conn;\n$user_id=$_SESSION['id'];\n $sql = \"SELECT * FROM rating WHERE user_id=$user_id\n \t\t AND post_id=$post_id AND rating=1\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n \treturn true;\n }else{\n \treturn false;\n }\n}", "public function isUserAssigned(User $user)\n {\n foreach ($this->getUserTodos() as $ut) {\n if ($ut->getUser() == $user\n && $ut->getStatus() === UserTodo::STATUS_ASSIGNED\n ) {\n return true;\n }\n }\n\n return false;\n }", "public function test_a_user_can_vote_for_a_post()\n {\n $user = $this->defaultUser();\n\n $post = $this->createPost();\n\n $this->browse(function (Browser $browser) use($user,$post) {\n $browser->loginAs($user)\n ->visit($post->url)\n ->pressAndWaitFor('+1')\n ->assertSeeIn('current-vote',1);\n });\n }", "public function accessibleByCurrentUser(){\n // return true if AYC user\n if(\\Auth::isSuperAdmin()) return true;\n\n // otherwise check if personally added to this\n $allowedPages = \\Auth::getAllowedPages();\n if(in_array($this->id, $allowedPages)) return true;\n\n // if not specifically added personally to this page\n // check the user group can access this page\n if($this->groupHasPermission(\\Auth::getUserLevel())) return true;\n\n // otherwise return false\n return false;\n\n }", "function is_pro_user($user_id = false) {\r\n global $psts;\r\n\treturn $psts->is_pro_user($user_id);\r\n}", "public function validateReviewer(): bool\n {\n $review = self::find()\n ->select(['shop_feedback.id', 'shop_feedback.shop_id', 'shop_feedback.created_by'])\n ->where(['shop_feedback.shop_id' => $this->shop_id, 'shop_feedback.created_by' => $this->created_by])\n ->asArray()\n ->one();\n if(!empty($review)){\n $this->addError('created_by',\n Yii::t('app', 'Вы уже добавляли отзыв об этом магазине, но Вы можете его изменить'));\n return false;\n } else {\n return true;\n }\n }", "public function isOwnedBy(UserInterface $user);", "function publisher_userIsAuthor($itemObj)\r\n{\r\n global $xoopsUser;\r\n return (is_object($xoopsUser) && is_object($itemObj) && ($xoopsUser->uid() == $itemObj->uid()));\r\n}", "public function view(User $user, Post $post): bool\n {\n //\n }", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function isOwnedBy($comment, $user) {\n return $this->field('id', array('id' => $comment, 'user_id' => $user)) !== false;\n }", "function canEditPost(Post $post) {\n return ($this->isAdmin() || ($this->id == $post->getCreatorId()));\n }", "public function isReviewsEnabled()\n {\n return (bool)Mage::helper('core')->isModuleEnabled('Mage_Review');\n }", "public function isAuthorized($user) {\n if ($this->action === 'apply' || $this->action === 'saveProject'){\n if($user['role'] == 'student' || $user['role'] == 'staff'){\n return true; \n } \n }\n \n if ($this->action === 'applied' || $this->action === 'saved'){\n if($user['role'] == 'student' || $user['role'] == 'staff'){\n return true; \n }\n }\n \n if ($this->action === 'add' || $this->action === 'applicants') {\n if($user['role'] == 'research'){\n return true;\n }\n }\n \n if ($this->action === 'projects') {\n if($user['role'] == 'research'){\n return true;\n }\n }\n\n if (in_array($this->action, array('edit', 'delete'))) {\n $projectId = (int) $this->request->params['pass'][0];\n if ($this->Project->isOwnedBy($projectId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "public function iN_CheckPostOwnerStatus($userID, $postID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\t$postID = mysqli_real_escape_string($this->db, $postID);\n\t\t$checkOwnerStatus = mysqli_query($this->db, \"SELECT post_id, post_owner_id FROM i_posts WHERE post_id = '$postID' AND post_owner_id = '$userID'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($checkOwnerStatus) == 1) {\n\t\t\treturn true;\n\t\t} else {return false;}\n\t}", "function user_can_assign($context, $targetroleid) {\n\n // first check if user has override capability\n // if not return false;\n if (!has_capability('moodle/role:assign', $context)) {\n return false;\n }\n // pull out all active roles of this user from this context(or above)\n if ($userroles = get_user_roles($context)) {\n foreach ($userroles as $userrole) {\n // if any in the role_allow_override table, then it's ok\n if (get_record('role_allow_assign', 'roleid', $userrole->roleid, 'allowassign', $targetroleid)) {\n return true;\n }\n }\n }\n\n return false;\n}", "private function permissible($userId)\n {\n $authUser = Auth::user();\n return $authUser->role==config('USER.ROLE.ADMIN')||$authUser->id==$userId;\n }", "public function update(UsersRepository $user, Post $post)\n {\n return $user->role==='root';\n }", "public function checkUserReview($user, $company){\n\n\t\tforeach($company['reviews'] as $reviews){\n\t\t\tif($reviews['user'] == $user){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('table'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "public\n function is_author($user_id, $post_id)\n {\n // get original post\n $original_post_author = get_post_field('post_author', $post_id);\n // get proposal author\n $authors = $this->get_proposal_authors($post_id);\n $authors = $authors[0];\n // push original proposal\n array_push($authors, $original_post_author);\n // removes duplicates\n $authors = array_unique($authors);\n\n if (in_array($user_id, $authors)) {\n return true;\n } else {\n return false;\n }\n }", "function isViewer($wpUser){\n for($i = 0; $i < count($wpUser->roles); $i++){\n if(strpos($wpUser->roles[$i], SARON_ROLE_PREFIX . SARON_ROLE_VIEWER) !== FALSE){ // CHECK IF THE USER IS A MEMBER OF THE GROUP (test)saron_edit\n return true;\n }\n } \n return false; \n }", "function eman_can_edit( $post, $user_id=false )\n{\n\t/**\n\t * If you can't view this post, then you can't edit it...\n\t */\n\tif ( ! eman_can_view($post, $user_id) ) return false;\n\n\tif ( is_numeric($post) ) $post = get_post($post);\n\tif ( ! is_object($post) ) return false;\n\tif ( ! $user_id ) $user_id = get_current_user_id();\n\t$user = get_user_by('id', $user_id);\n\t$status = emanager_post::status($post, 'slug');\n\t$bic_userlogin = emanager_bic::get_bic($post, 'user_login');\n\n\t/**\n\t * Test if user has capability to edit\n\t */\n\n\t// Issues have different criteria\n\tif ( 'em_issue' == $post->post_type )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) || emanager_post::same_company_as_post($post) || eman_check_role('turner') ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// PCO Request exception for allowances. Allow user to edit if in their court and status is before sent to owner.\n\tif ( 'em_noc' == $post->post_type )\n\t{\n\t\tif (($bic_userlogin === $user->user_login) && in_array($status, array('draft','manager','ready'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (eman_check_role('turner') && in_array($status, array('draft'))) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// If the post is editable\n\tif ( eman_post_editable($post) )\n\t{\n\t\t// Original author\n\t\tif ( emanager_post::is_author($post) ) {\n\t\t\treturn true;\n\t\t}\n\t\t// Same company as original author\n\t\telseif ( emanager_post::same_company_as_post($post) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\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.57918996", "0.5777913", "0.57640064", "0.57605654", "0.5759665", "0.57398015", "0.5734231", "0.57328665", "0.5705606", "0.5695438", "0.5688676", "0.5685898", "0.568334", "0.56652683", "0.5645462", "0.5635615", "0.5635015", "0.5634794", "0.563475", "0.56303984", "0.56276023", "0.5613168", "0.5603655", "0.5596089", "0.55942464", "0.5577279", "0.557527", "0.55512387", "0.55483264", "0.55385196", "0.5532316", "0.55265737", "0.5525211", "0.5516796", "0.5510416", "0.5503135", "0.5498826", "0.54971373", "0.5495048", "0.54857886", "0.54848206", "0.5484723", "0.54750675", "0.54670775", "0.5464638", "0.5455568", "0.54540724", "0.5450711", "0.5448378", "0.54398614", "0.5435038", "0.5434401", "0.543101", "0.54203916", "0.5417364", "0.5415972", "0.54153526", "0.5415288", "0.5410272", "0.5407138", "0.54071075", "0.5404296", "0.54031354", "0.5393946", "0.5390333", "0.5389503", "0.53863156", "0.53844583", "0.53826463", "0.5381833" ]
0.72695756
0
add a payment method into the pool.
public function addMethod(PaymentInterface $instance): void { if (null === $instance->getCode()) { throw new \RuntimeException(sprintf('Payment handler of class %s must return a code on getCode method. Please refer to the documentation (https://sonata-project.org/bundles/ecommerce/master/doc/reference/bundles/payment/index.html)', \get_class($instance))); } $this->methods[$instance->getCode()] = $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_payment_method() {\n\t\t$this->log('add_payment_method called in Xendit');\n\t\tif ( empty( $_POST['xendit_token'] ) || ! is_user_logged_in() ) {\n\t\t\twc_add_notice( __( 'There was a problem adding the card.', 'xendit-woocommerce-gateway' ), 'error' );\n\t\t\treturn;\n\t\t}\n\n\n\t\tif ( is_wp_error( $card ) ) {\n\t\t\t$localized_messages = $this->get_localized_messages();\n\t\t\t$error_msg = __( 'There was a problem adding the card.', 'xendit-woocommerce-gateway' );\n\n\t\t\twc_add_notice( $error_msg, 'error' );\n\t\t\treturn;\n\t\t}\n\n\t\treturn array(\n\t\t\t'result' => 'success',\n\t\t\t'redirect' => wc_get_endpoint_url( 'payment-methods' ),\n\t\t);\n\t}", "public function addPaymentMethod()\n {\n return view('admin.delivery-and-payment-method', [\n 'delivery_and_payment_method' => new PaymentMethod,\n 'type' => 'payment_method',\n 'action' => route('admin.payment_method.create')\n ]);\n }", "public function add_payment( $methods ) {\r\n\t\t\t$methods['payir'] = 'LP_Gateway_Payir';\r\n\r\n\t\t\treturn $methods;\r\n\t\t}", "public function add_payment( $methods ) {\n\t\t\t$methods['stripe'] = 'LP_Gateway_Stripe';\n\n\t\t\treturn $methods;\n\t\t}", "private function registerPaymentMethods()\n {\n $pPosition = 0;\n foreach ($this->paymentMethods as $pValue => $pSub) {\n if ($this->isAboveShopwareVersion52()) {\n $action = 'payment_processor_csrf/process';\n } else {\n $action = 'payment_processor/process';\n }\n $this->createPayment(array(\n 'name' => $pValue,\n 'description' => $pSub['description'],\n 'action' => $action,\n 'active' => 0,\n 'position' => $pPosition,\n 'additionalDescription' => ''\n ));\n $pPosition++;\n }\n }", "public function add_payment_method() {\n\t\t$request = $this->prepare_request( self::TXN_TYPE_VERIFY );\n\t\t$redirect = wc_get_endpoint_url( 'payment-methods' );\n\n\t\ttry {\n\t\t\t$response = $this->submit_request( $request );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn array(\n\t\t\t\t'result' => 'failure',\n\t\t\t\t'redirect' => $redirect,\n\t\t\t);\n\t\t}\n\n\t\t$is_successful = $this->handle_response( $request, $response );\n\n\t\treturn array(\n\t\t\t'result' => $is_successful ? 'success' : 'failure',\n\t\t\t'redirect' => $redirect,\n\t\t);\n\t}", "public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }", "public function admin_add_paypal_payment() {\n\t\t$this->request->data['PaypalPaymentModule']['name'] = 'Paypal ' . $this->request->data['PaypalPaymentModule']['name'];\n\t\t\n\t\t$this->request->data['ShopsPaymentModule']['payment_module_id'] = PAYPAL_PAYMENT_MODULE;\n\t\t$this->request->data['ShopsPaymentModule']['shop_id'] = Shop::get('Shop.id');\n\t\t$this->request->data['ShopsPaymentModule']['display_name'] = $this->request->data['PaypalPaymentModule']['name'];\n\t\t\n\t\t$paymentModuleInShop = $this->Payment->ShopsPaymentModule;\n\t\t$paymentModule = $paymentModuleInShop->PaymentModule;\n\t\t\n\t\t$paymentModule->create();\n\t\t$paymentModuleInShop->create();\n\t\t\n\t\t\n\t\tif ($paymentModuleInShop->saveAll($this->request->data)) {\n\t\t\t$this->Session->setFlash(__('Paypal payment has been activated'), 'default', array('class'=>'flash_success'));\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Paypal payment could not be saved. Please, try again.'), 'default', array('class'=>'flash_failure'));\n\t\t}\n\t\t\n\t\t$this->redirect(array('action'=>'index'));\n\t}", "public function run()\n {\n PaymentMethod::create([\n 'description_payment_methods'=>'P3'\n ]);\n }", "abstract public function getPaymentMethod();", "function woocommerce_add_paycoingateway_gateway($methods) {\n\t\t\t$methods[] = 'WC_Gateway_PaycoinGateway';\n\t\t\treturn $methods;\n\t\t}", "public function createPayment()\n\t{\n\n\t}", "public function addPaymentMethod(CustomerInterface $customer, bool $set_as_default, ...$arguments): PaymentMethodInterface;", "public function addMethod(Method $method)\n {\n $this->methods[(string)$method->getFqsen()] = $method;\n }", "private function addPaymentToDatabase()\n {\n $this->setReceiptKey();\n \n $this->createDonorEntry();\n $this->createDonationEntry();\n $this->createDonationContentEntry();\n $this->createDonorAddressEntry();\n $this->addDonationToFundraisersTotalRaise();\n \n $this->redirect('donations');\n }", "public function add() \n { \n $data['delivery_method'] = $this->delivery_methods->add();\n $data['action'] = 'delivery_method/save';\n \n $this->template->js_add('\n $(document).ready(function(){\n // binds form submission and fields to the validation engine\n $(\"#form_delivery_method\").parsley();\n });','embed');\n \n $this->template->render('delivery_method/form',$data);\n\n }", "public function run()\n {\n PaymentMethods::create(['name' => 'PayPal_Express']); // Register PayPal\n\n PaymentMethods::create(['name' => 'Stripe']); // Register Stripe\n }", "public function createPaymentMethod(PaymentMethodInterface $payment_method, array $payment_details);", "public function dp_PaymentMethod_Insert($data)\n {\n return $this->call('dp_PaymentMethod_Insert', static::prepareParams($data, [\n 'CustomerVaultID' => ['string', 55], // Enter -0 to create a new Customer Vault ID record\n 'donor_id' => ['numeric'], //\n 'IsDefault' => ['bool'], // Enter 1 if this is will be the default EFT payment method. Note anything other than 1 (i.e. 0 or NULL fails and not sure why)\n 'AccountType' => ['string', 256], // e.g. ‘Visa’\n 'dpPaymentMethodTypeID' => ['string', 20], // e.g.; ‘creditcard’\n 'CardNumberLastFour' => ['string', 16], // e.g.; ‘4xxxxxxxxxxx1111\n 'CardExpirationDate' => ['string', 10], // e.g.; ‘0810’\n 'BankAccountNumberLastFour' => ['string', 50], //\n 'NameOnAccount' => ['string', 256], //\n 'CreatedDate' => ['date'], // Set as 'MM/DD/YYYY' only. Setting time values is not supported.\n 'ModifiedDate' => ['date'], // Set as 'MM/DD/YYYY' only. Setting time values is not supported.\n 'import_id' => ['numeric'], //\n 'created_by' => ['string', 20], //\n 'modified_by' => ['string', 20], //\n 'selected_currency' => ['string', 3], // e.g 'USD', 'CAD', per default currency used by the DonorPerfect client\n ]));\n }", "function updatePaymentMethodOptions() {\n try {\n $payments_table = TABLE_PREFIX . 'payments';\n\n if (!in_array('method', $this->listTableFields($payments_table))) {\n DB::execute(\"ALTER TABLE $payments_table ADD method VARCHAR(100) DEFAULT '' AFTER comment\");\n } // if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_common', 'payments', ?)\", serialize(array('Bank Deposit','Check','Cash','Credit','Debit')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_credit_card', 'payments', ?)\", serialize(array('Credit Card','Credit Card (Visa)','Credit Card (Mastercard)','Credit Card (Discover)','Credit Card (American Express)','Credit Card (Diners)')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_online', 'payments', ?)\", serialize(array('Online Payment', 'Online Payment (PayPal)', 'Online Payment (Authorize)')));\n\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function run()\n {\n PaymentMethod::insert(\n array(\n [\n 'name' => 'Mercado Pago',\n 'picture'=> 'visa-mastercard-amex.jpg',\n 'active' => 1\n ],\n [\n 'name' => 'Contra Entrega',\n 'picture'=> 'wire-transfer-white.png',\n 'active' => 1\n ],\n\n [\n 'name' => 'Transferencia bancaria',\n 'picture'=> 'wire-transfer-white.png',\n 'active' => 1\n ],\n\n )\n );\n }", "public function run()\n {\n PaymentMethod::create([\n \t\t'name' => 'Cash On Delivery'\n \t]);\n\n \tPaymentMethod::create([\n \t\t'name' => 'PayPal'\n \t]);\n }", "public function applyPaymentMethod($methodCode = null)\n {\n if (false === $methodCode) {\n return $this->getQuote()->removePayment();\n }\n\n $store = $this->getQuote() ? $this->getQuote()->getStoreId() : null;\n $methods = Mage::helper('payment')->getStoreMethods($store, $this->getQuote());\n $availablePayments = array();\n foreach ($methods as $key => $method) {\n if (!$method || !$method->canUseCheckout()) {\n continue;\n }\n if ($this->_canUsePaymentMethod($method)) {\n $availablePayments[] = $method;\n }\n }\n\n $found = false;\n $count = count($availablePayments);\n if (1 === $count) {\n $methodCode = $availablePayments[0]->getCode();\n $found = true;\n } elseif ($count) {\n if (!$methodCode) {\n $methodCode = $this->getQuote()->getPayment()->getMethod();\n }\n if ($methodCode) {\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n if (!$found || !$methodCode) {\n $methodCode = Mage::getStoreConfig('firecheckout/general/payment_method');\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n }\n\n if (!$found) {\n $this->getQuote()->removePayment();\n } elseif ($methodCode) {\n $payment = $this->getQuote()->getPayment();\n $payment->setMethod($methodCode);\n $payment->setMethodInstance(null); // fix for billmate payments\n $method = $payment->getMethodInstance();\n try {\n $data = new Varien_Object(array('method' => $methodCode));\n $method->assignData($data);\n } catch (Exception $e) {\n // Adyen HPP extension fix\n }\n\n if ($this->getQuote()->isVirtual()) { // discount are looking for method inside address\n $this->getQuote()->getBillingAddress()->setPaymentMethod($methodCode);\n } else {\n $this->getQuote()->getShippingAddress()->setPaymentMethod($methodCode);\n }\n }\n\n return $this;\n }", "function add_payment_pr($data){\n\t\tif($this->check_money($data['Clientpayment']['amount'])){\n\t\t\t\t$this->do_pr_invoice($data);\n\t\t}\n\t}", "function choosePaymentMethod() {\n $booking = $this->Session->read('booking');\n // find all unpaid bookings\n $unpaid = $this->Payment->Booking->User->findUnpaid($this->Auth->user('id'));\n if ($booking) {\n // it's probably appropriate to save it at this point\n if ($this->Session->read('booking.saved') == false) {\n $bid = $this->Payment->Booking->saveBooking($booking, $this->Auth->user('id'));\n if ($bid === false) {\n $this->setFlash('Error: Could Not Save Booking');\n } else {\n $this->Session->write('booking.saved', true);\n $newbooking = $this->Payment->Booking->find('first', array(\n 'conditions' => array('Booking.id' => $bid),\n 'recursive' => '2'\n ));\n array_push($unpaid, $newbooking);\n }\n }\n }\n $this->set('unpaid', $unpaid);\n $this->set('allowedPaymentTypes', $this->allowedPaymentTypes);\n }", "public function process_payment() {\n\n // Saves a suggestions group\n (new MidrubBasePaymentsCollectionBraintreeHelpers\\Process)->prepare();\n\n }", "protected function registerPayment()\n {\n $this->app->singleton('image', function ($app) {\n return new ImageService();\n });\n }", "public function add_payments() {\n\n global $redis;\n\n $user_id = $this->params['user_id'];\n $associate_id = !empty($this->params['associate_id']) ? $this->params['associate_id'] : 0;\n $payment_account_id = $this->params['payment_account_id'];\n $paypal_username = $this->params['paypal_username'];\n $account_dbobj = $this->params['account_dbobj'];\n\n // validate paypal username\n $paypal = new PaypalAccount($account_dbobj);\n $paypal->findOne(\"username='\".$account_dbobj->escape($paypal_username).\"'\");\n if($paypal->getId() === 0) {\n if(!$paypal->setUsername($paypal_username)) {\n $this->errnos[INVALID_PAYPAL_ACCOUNT] = 1;\n $this->status = 1;\n return;\n }\n }\n $paypal->save();\n\n $payment_account = new PaymentAccount($account_dbobj);\n if(!empty($payment_account_id)) {\n $payment_account->findOne('id='.$payment_account_id);\n }\n $payment_account->setPaypalAccountId($paypal->getId());\n $payment_account->save();\n\n $user = new User($account_dbobj);\n $user->findOne('id='.$user_id);\n BaseMapper::saveAssociation($user, $payment_account, $account_dbobj);\n\n if(!empty($associate_id) && $is_active_associate = AssociatesMapper::is_active_associate($associate_id, $account_dbobj)) {\n $associate = new Associate($account_dbobj);\n $associate->findOne('id='.$associate_id);\n $associate->setStatus(ACTIVATED);\n $associate->save();\n $redis->set(\"associate::$associate_id:status\", $associate->getStatus());\n }\n\n $this->response['paypal_account_id'] = $paypal->getId();\n $this->response['paypal_username'] = $paypal->getUsername();\n\n $this->status = 0;\n\n // warm up cache\n $redis->set(\"user:$user_id:payment_account_id\", $payment_account->getId());\n $redis->set(\"payment_account:{$payment_account->getId()}:paypal_account_id\",$paypal->getId());\n $paypal_account_id = $paypal->getId();\n $redis->set(\"paypal_account:$paypal_account_id:username\", $paypal->getUsername());\n $redis->set(\"paypal_account:$paypal_account_id:status\", $paypal->getStatus());\n $redis->set(\"paypal_account:$paypal_account_id:created\", $paypal->getCreated());\n $redis->set(\"paypal_account:$paypal_account_id:updated\", $paypal->getUpdated());\n\n\n }", "abstract public function add_subscription( Payment_Subscription $subscription );", "function add_paysera_gateway($methods) {\n $methods[] = 'WC_Paysera';\n return $methods;\n }", "public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }", "public function pay();", "public function saveNewPaymentMethod($name)\r\n\t {\r\n\t\t$this->validatePaymentMethod();\r\n\t\t\r\n\t\t if (empty($this->errors)) {\r\n\t\t\t\r\n\t\t\t$sql = 'INSERT INTO payment_methods_assigned_to_users (user_id, name) VALUES (:user_id, :name)';\r\n\r\n $db = static::getDB();\r\n $stmt = $db->prepare($sql);\r\n\r\n $stmt->bindValue(':user_id', $_SESSION['user_id'], PDO::PARAM_INT);\r\n $stmt->bindValue(':name', $name, PDO::PARAM_STR);\r\n\r\n return $stmt->execute();\r\n }\r\n\t\t\r\n return false;\r\n\t }", "public function method($method): self {\n\t\tif (in_array($method, $this->methods)) {\n\t\t\t$this->params['method'] = $method;\n\t\t\treturn $this;\n\t\t} else {\n\t\t\t// throw exception if not set payment method from array\n\t\t\tthrow new \\Exception('Set payment Method ' . implode(',', $this->methods));\n\t\t}\n\n\t}", "public function payment(){\n\n\t}", "function exn_wc_billplz_add_gateway( $methods ) {\n $methods[] = 'EXN_WC_Billplz';\n return $methods;\n }", "function add_payment_express_gateway( $methods ) {\n\t$methods[] = 'WC_Gateway_Payment_Express'; return $methods;\n}", "public function addMethod(MappedMethod $method): void\n {\n $this->methods[] = $method;\n }", "public static function register_addon() {\n\t\tEE_Register_Addon::register(\n\t\t\t'Secure_Submit_Payment_Method',\n\t\t\tarray(\n\t\t\t\t'version' \t\t\t\t\t=> EE_SECURE_SUBMIT_PAYMENT_METHOD_VERSION,\n\t\t\t\t'min_core_version' => '4.6.0.dev.000',\n\t\t\t\t'main_file_path' \t\t\t\t=> EE_SECURE_SUBMIT_PAYMENT_METHOD_PLUGIN_FILE,\n\t\t\t\t'admin_callback' => 'additional_admin_hooks',\n\t\t\t\t// if plugin update engine is being used for auto-updates. not needed if PUE is not being used.\n\t\t\t\t'pue_options'\t\t\t=> array(\n\t\t\t\t\t'pue_plugin_slug' => 'eea-secure-submit-payment-method',\n\t\t\t\t\t'plugin_basename' => EE_SECURE_SUBMIT_PAYMENT_METHOD_BASENAME,\n\t\t\t\t\t'checkPeriod' => '24',\n\t\t\t\t\t'use_wp_update' => FALSE,\n\t\t\t\t\t),\n\t\t\t\t'payment_method_paths' => array(\n\t\t\t\t\tEE_SECURE_SUBMIT_PAYMENT_METHOD_PATH . 'payment_methods/Secure_Submit_Payment_Method_Onsite',\n\t\t\t\t\t),\n\t\t));\n\t}", "public function addPayment($payment)\n {\n $this->payments[$payment->getVendorTxCode()] = $payment;\n }", "public function testPaymentMethodCreationAndUpdate() {\n $default_address = [\n 'country_code' => 'US',\n 'administrative_area' => 'SC',\n 'locality' => 'Greenville',\n 'postal_code' => '29616',\n 'address_line1' => '9 Drupal Ave',\n 'given_name' => 'Bryan',\n 'family_name' => 'Centarro',\n ];\n $default_profile = $this->createEntity('profile', [\n 'type' => 'customer',\n 'uid' => $this->user->id(),\n 'address' => $default_address,\n ]);\n\n /** @var \\Drupal\\commerce_payment_example\\Plugin\\Commerce\\PaymentGateway\\OnsiteInterface $plugin */\n $this->drupalGet($this->collectionUrl);\n $this->getSession()->getPage()->clickLink('Add payment method');\n $this->assertSession()->addressEquals($this->collectionUrl . '/add');\n // Confirm that the default profile's address is rendered.\n foreach ($default_address as $property => $value) {\n $prefix = 'add_payment_method[billing_information][address][0][address]';\n $this->assertSession()->pageTextContains($value);\n $this->assertSession()->fieldNotExists($prefix . '[' . $property . ']');\n }\n\n $form_values = [\n 'add_payment_method[payment_details][number]' => '4111111111111111',\n 'add_payment_method[payment_details][expiration][month]' => '01',\n 'add_payment_method[payment_details][expiration][year]' => date('Y') + 1,\n 'add_payment_method[payment_details][security_code]' => '111',\n ];\n $this->submitForm($form_values, 'Save');\n $this->assertSession()->addressEquals($this->collectionUrl);\n $this->assertSession()->pageTextContains('Visa ending in 1111 saved to your payment methods.');\n\n $payment_method = PaymentMethod::load(1);\n $billing_profile = $payment_method->getBillingProfile();\n $this->assertEquals($this->user->id(), $payment_method->getOwnerId());\n $this->assertEquals($default_address, array_filter($billing_profile->get('address')->first()->getValue()));\n $this->assertEquals(2, $payment_method->getBillingProfile()->id());\n\n $this->drupalGet($this->collectionUrl . '/' . $payment_method->id() . '/edit');\n // Confirm that the default profile's address is rendered.\n foreach ($default_address as $property => $value) {\n $prefix = 'add_payment_method[billing_information][address][0][address]';\n $this->assertSession()->pageTextContains($value);\n $this->assertSession()->fieldNotExists($prefix . '[' . $property . ']');\n }\n $this->getSession()->getPage()->pressButton('billing_edit');\n\n $form_values = [\n 'payment_method[payment_details][expiration][month]' => '02',\n 'payment_method[payment_details][expiration][year]' => '2026',\n 'payment_method[billing_information][address][0][address][given_name]' => 'Johnny',\n 'payment_method[billing_information][address][0][address][family_name]' => 'Appleseed',\n 'payment_method[billing_information][address][0][address][address_line1]' => '123 New York Drive',\n 'payment_method[billing_information][address][0][address][locality]' => 'New York City',\n 'payment_method[billing_information][address][0][address][administrative_area]' => 'NY',\n 'payment_method[billing_information][address][0][address][postal_code]' => '10001',\n ];\n $this->submitForm($form_values, 'Save');\n $this->assertSession()->addressEquals($this->collectionUrl);\n $this->assertSession()->pageTextContains('2/2026');\n\n \\Drupal::entityTypeManager()->getStorage('commerce_payment_method')->resetCache([1]);\n \\Drupal::entityTypeManager()->getStorage('profile')->resetCache([2]);\n $payment_method = PaymentMethod::load(1);\n $this->assertEquals('2026', $payment_method->get('card_exp_year')->value);\n /** @var \\Drupal\\profile\\Entity\\ProfileInterface $billing_profile */\n $billing_profile = $payment_method->getBillingProfile();\n $this->assertEquals($this->user->id(), $payment_method->getOwnerId());\n $this->assertEquals('NY', $billing_profile->get('address')->first()->getAdministrativeArea());\n $this->assertEquals(2, $payment_method->getBillingProfile()->id());\n // Confirm that the address book profile was updated.\n $default_profile = $this->reloadEntity($default_profile);\n $this->assertTrue($billing_profile->get('address')->equals($default_profile->get('address')));\n }", "public function processPayment();", "public function actionAddpayment() {\n\n $paymentmodel = new Payment();\n $paymentmodel->price = Yii::$app->request->post('price');\n $paymentmodel->id_orders = Yii::$app->request->post('id_orders');\n $paymentmodel->card_number = Yii::$app->request->post('card_number');\n $paymentmodel->expiration_year = Yii::$app->request->post('expiration_year');\n $paymentmodel->expiration_month = Yii::$app->request->post('expiration_month');\n $paymentmodel->cvcode = Yii::$app->request->post('cvcode');\n\n if(!$paymentmodel->validate()){\n \\Yii::$app->response->statusCode=409;\n return $paymentmodel->getErrors();\n }\n\n $paymentmodel->save();\n\n $last_payment = Payment::find()->orderBy(['id'=>SORT_DESC])->one();\n\n return [\"payment\"=>$last_payment];\n\n }", "public function makePayment() {\n\t\tLoggerRegistry::debug('CustomerModule::makePayment()');\n\t\t// TODO Payment gateway integration\n\t}", "public function paymentMethod($payment_method) {\n $this->data['attachment']['payload']['payment_method'] = $payment_method;\n\n return $this;\n }", "public function addMethod($method){\n //checking if the method variable is array and it has indexes\n if(is_array($method) && !empty($method)){\n //loop though it\n foreach($method as $hookedClassMethod){\n //append the method to the methods array\n $this->methods[] = $hookedClassMethod;\n \n }\n //if the method variable is not array but not empty then it should be a string or any other value\n //other checks might be valid such as making sure it is a string\n }elseif(!is_array($method) && !empty($method)){\n //append the method to the methods array\n $this->methods[] = $hookedClassMethod;\n \n }else{\n //throw an exception if the passed argument does not match our conditions\n throw new RuntimeException('addMethod expect 1 argument and it should not be empty');\n \n }\n }", "function wc_add_btcpay($methods)\n {\n // Add main BTCPay payment method class.\n $methods[] = 'WC_Gateway_BtcPay';\n\n // Add additional tokens as separate payment methods.\n if ($additional_tokens = btcpay_get_additional_tokens()) {\n foreach ($additional_tokens as $token) {\n $methods[] = $token['classname'];\n }\n }\n\n return $methods;\n }", "public function _add()\n {\n $type_code = post_param_string('type_code');\n $object = find_product($type_code);\n\n $amount = post_param_string('amount', '');\n if ($amount == '') {\n $products = $object->get_products(false, $type_code);\n $amount = $products[$type_code][1];\n if ($amount == '?') {\n warn_exit(do_lang_tempcode('INVOICE_REQUIRED_AMOUNT'));\n }\n }\n\n $to = post_param_string('to');\n $member_id = $GLOBALS['FORUM_DRIVER']->get_member_from_username($to);\n if (is_null($member_id)) {\n warn_exit(do_lang_tempcode('_MEMBER_NO_EXIST', escape_html($to)));\n }\n\n $id = $GLOBALS['SITE_DB']->query_insert('invoices', array(\n 'i_type_code' => $type_code,\n 'i_member_id' => $member_id,\n 'i_state' => 'new',\n 'i_amount' => $amount,\n 'i_special' => post_param_string('special'),\n 'i_time' => time(),\n 'i_note' => post_param_string('note')\n ), true);\n\n log_it('CREATE_INVOICE', strval($id), $type_code);\n\n send_invoice_notification($member_id, $id);\n\n $url = build_url(array('page' => '_SELF', 'type' => 'outstanding'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "public function takePayment() {\r\n if ($this->payment instanceof PayPal) {\r\n $this->payment->payByPayPal();\r\n }elseif ($this->payment instanceof SagePay) {\r\n $this->payment->payBySagePay();\r\n } elseif ($this->payment instanceof WorldPay) {\r\n $this->payment->payByWorldPay();\r\n }\r\n }", "abstract protected function getPaymentMethodCode();", "public function register_shipping_method( $method ) {\n\t\tif ( ! is_object( $method ) ) {\n\t\t\t$method = new $method();\n\t\t}\n\n\t\t$id = empty( $method->instance_id ) ? $method->id : $method->instance_id;\n\n\t\t$this->shipping_methods[ $id ] = $method;\n\t}", "public function calculatePayment()\n {\n }", "public function addPayment($listingId, $type, $duration, $amount, $token, $discount = null)\r\n\t{\r\n\t\t// Type to feature level magic number mapping\r\n\t\t$featureLevels = array(\r\n\t\t\t'regular' => 0,\r\n\t\t\t'featured' => 1,\r\n\t\t\t'newsletter' => 2\r\n\t\t);\r\n\r\n\t\t// Add payment\r\n\t\t$query = 'INSERT INTO marketplacePayments\r\n\t\t\tSET marketID = '.(int)$listingId.',\r\n\t\t\t\tmarketFeatured = '.(int)$featureLevels[$type].',\r\n\t\t\t\tmppDuration = '.(int)$duration.',\r\n\t\t\t\tmppAmount = '.(float)$amount.',\r\n\t\t\t\tmppToken = \"'.Database::escape($token).'\",\r\n\t\t\t\tmppDiscount = \"'.Database::escape($discount).'\",\r\n\t\t\t\tstartDate = NOW(),\r\n\t\t\t\tendDate = DATE_ADD(NOW(), INTERVAL '.$duration.' MONTH),\r\n\t\t\t\tpaid = 1';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$this->_db->query();\r\n\t\treturn $this->_db->getInsertID();\r\n\t}", "abstract protected function handlePayment();", "public function testPaymentMethodCreationAndUpdateWithoutBilling() {\n $this->paymentGateway->setPluginConfiguration([\n 'collect_billing_information' => FALSE,\n ]);\n $this->paymentGateway->save();\n\n /** @var \\Drupal\\commerce_payment_example\\Plugin\\Commerce\\PaymentGateway\\OnsiteInterface $plugin */\n $this->drupalGet($this->collectionUrl);\n $this->getSession()->getPage()->clickLink('Add payment method');\n $this->assertSession()->addressEquals($this->collectionUrl . '/add');\n $this->assertSession()->pageTextNotContains('Country');\n $form_values = [\n 'add_payment_method[payment_details][number]' => '4111111111111111',\n 'add_payment_method[payment_details][expiration][month]' => '01',\n 'add_payment_method[payment_details][expiration][year]' => date('Y') + 1,\n 'add_payment_method[payment_details][security_code]' => '111',\n ];\n $this->submitForm($form_values, 'Save');\n $this->assertSession()->addressEquals($this->collectionUrl);\n $this->assertSession()->pageTextContains('Visa ending in 1111 saved to your payment methods.');\n\n $payment_method = PaymentMethod::load(1);\n $this->assertNull($payment_method->getBillingProfile());\n\n $this->drupalGet($this->collectionUrl . '/' . $payment_method->id() . '/edit');\n $this->assertSession()->pageTextNotContains('Country');\n $form_values = [\n 'payment_method[payment_details][expiration][month]' => '02',\n 'payment_method[payment_details][expiration][year]' => '2026',\n ];\n $this->submitForm($form_values, 'Save');\n $this->assertSession()->addressEquals($this->collectionUrl);\n\n $this->assertSession()->pageTextContains('2/2026');\n\n \\Drupal::entityTypeManager()->getStorage('commerce_payment_method')->resetCache([1]);\n $payment_method = PaymentMethod::load(1);\n $this->assertEquals('2026', $payment_method->get('card_exp_year')->value);\n $this->assertNull($payment_method->getBillingProfile());\n }", "function wc_fabric_add_to_gateways( $methods ) {\n // Add\n $methods [] = __NAMESPACE__ . '\\\\WC_Fabric_Gateway';\n return $methods ;\n}", "public function setPaymentMethod($value)\n {\n return $this->set(self::payment_method, $value);\n }", "public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }", "public function addMethod(MethodDescriptor $method)\n {\n $this->_methods[$method->getName()] = $method;\n }", "public function add();", "public function add();", "public function actionAddPayment()\n {\n if (Yii::$app->request->isAjax) {\n $row = Yii::$app->request->post('Payment');\n if((Yii::$app->request->post('isNewRecord') && Yii::$app->request->post('_action') == 'load' && empty($row)) || Yii::$app->request->post('_action') == 'add')\n $row[] = [];\n return $this->renderAjax('_formPayment', ['row' => $row]);\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }", "public function addPayment(Money $payment)\n {\n $paidAmount = $this->getAmountPaid()->add($payment);\n\n $this->paidAmount = $paidAmount->getAmount();\n\n if ($this->paidAmount > $this->price) {\n $this->paid();\n }\n }", "protected function add() {\n\t}", "protected function _initPaymentMethod($paymentMethod)\n {\n /**\n *\n * @note Check if quote is free\n *\n */\n if ($this->_isFreeQuote()) {\n /**\n *\n * @note If it is a free quote then use free payment method\n *\n */\n $paymentMethod = Free::PAYMENT_METHOD_FREE_CODE;\n }\n\n /**\n *\n * @note Add payment method\n *\n */\n $data[PaymentInterface::KEY_METHOD] = $paymentMethod;\n\n /**\n *\n * @note Save payment information\n *\n */\n $this->savePayment($data);\n }", "function add_paysto_gateway($methods)\n {\n $methods[] = 'WC_PAYSTO';\n\n return $methods;\n }", "public function additionPayment()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `wayofpayment`(`namepa`, `namepe`, `numberp`, `deletp`)\n VALUES ('$this->namepa' ,'$this->namepe' ,'$this->numberp' ,'$this->deletp')\");\n $result = $sql->execute();\n $idp = $dbh->lastInsertId();\n return array ($result,$idp);\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function setPaymentMethod($payment) {\n if (!isset($payment['method'])) {\n Mage::throwException(Mage::helper('checkout')->__('Payment method is not defined'));\n }\n\n $quote = $this->getQuote();\n $quote->getPayment()->importData($payment);\n // shipping totals may be affected by payment method\n if (!$quote->isVirtual() && $quote->getShippingAddress()) {\n $quote->getShippingAddress()->setCollectShippingRates(true);\n $quote->setTotalsCollectedFlag(false)->collectTotals();\n }\n\n $quote->save();\n return $this;\n }", "public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }", "public function run()\n {\n $methods = [\n [\n 'payment_name' => 'BNI',\n 'payment_method_img' => 'bni.png',\n ],\n [\n 'payment_name' => 'BCA',\n 'payment_method_img' => 'bca.png',\n ],\n [\n 'payment_name' => 'BRI',\n 'payment_method_img' => 'bri.png',\n ],\n ];\n\n foreach ($methods as $key => $value) {\n Payment::create($value);\n \n }\n }", "public function withPaymentMethod($value)\n {\n $this->setPaymentMethod($value);\n return $this;\n }", "public function createPaymentMethod(Request $request)\n {\n $request->validate([\n 'name' => 'required|string|max:255',\n 'price' => 'required|numeric',\n 'description' => 'string|max:255'\n ], [], [\n 'name' => 'název',\n 'price' => 'cena',\n 'description' => 'popisek'\n ]);\n $payment_method = new PaymentMethod;\n $payment_method->fill($request->all());\n $payment_method->save();\n session()->flash('success_message', 'Nový způsob platby byl úspěšně přidán.');\n return redirect(route('admin.delivery_and_payment_methods'));\n }", "function addMethod($method)\n {\n if (is_string($method)) {\n $this->methods[] = $this->normalizeMethod($method);\n } else if (is_array($method)) {\n foreach ($method as $item) {\n $this->methods[] = $this->normalizeMethod($item);\n }\n } else {\n throw new \\InvalidArgumentException('Invalid $method argument type : expected string or array');\n }\n return $this;\n }", "public function addMethod(ClassMethod $method, $statement = null)\n {\n $methodName = strtolower($method->getName());\n if (isset($this->methods[$methodName])) {\n throw new CompilerException(\"Method '\" . $method->getName() . \"' was defined more than one time\", $statement);\n }\n\n $this->methods[$methodName] = $method;\n }", "function woocommerce_add_coinsimple_gateway($methods) {\n\t\t$methods[] = 'WC_coinsimple';\n\t\treturn $methods;\n\t}", "public function addPayment($data)\n {\n if ($this->db->insert('payslip', $data)) {\n return true;\n }\n return false;\n \n }", "public function setPayment($payment);", "public function place()\n {\n $this->_eventManager->dispatch('sales_order_payment_place_start', ['payment' => $this]);\n $order = $this->getOrder();\n\n $this->setAmountOrdered($order->getTotalDue());\n $this->setBaseAmountOrdered($order->getBaseTotalDue());\n $this->setShippingAmount($order->getShippingAmount());\n $this->setBaseShippingAmount($order->getBaseShippingAmount());\n\n $methodInstance = $this->getMethodInstance();\n $methodInstance->setStore($order->getStoreId());\n\n $orderState = Order::STATE_NEW;\n $orderStatus = $methodInstance->getConfigData('order_status');\n $isCustomerNotified = $order->getCustomerNoteNotify();\n\n // Do order payment validation on payment method level\n $methodInstance->validate();\n $action = $methodInstance->getConfigPaymentAction();\n $payment = $order->getPayment();\n $paymentMethodCode = $payment->getMethodInstance()->getCode();\n \n if ($action) {\n if ($methodInstance->isInitializeNeeded()) {\n $stateObject = new DataObject();\n // For method initialization we have to use original config value for payment action\n $methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject);\n\n if ($paymentMethodCode !== Bitcoin::CODE) {\n $orderState = $stateObject->getData('state') ?: $orderState;\n $orderStatus = $stateObject->getData('status') ?: $orderStatus;\n }\n\n $isCustomerNotified = $stateObject->hasData('is_notified')\n ? $stateObject->getData('is_notified')\n : $isCustomerNotified;\n }\n else {\n $this->processAction($action, $order);\n\n if ($paymentMethodCode !== Bitcoin::CODE){\n $orderState = Order::STATE_PROCESSING;\n $orderState = $order->getState() ? $order->getState() : $orderState;\n $orderStatus = $order->getStatus() ? $order->getStatus() : $orderStatus;\n }\n \n }\n } else {\n $order->setState($orderState)->setStatus($orderStatus);\n }\n\n $isCustomerNotified = $isCustomerNotified ?: $order->getCustomerNoteNotify();\n\n if (!array_key_exists($orderStatus, $order->getConfig()->getStateStatuses($orderState))) {\n $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);\n }\n\n $this->updateOrder($order, $orderState, $orderStatus, $isCustomerNotified);\n\n $this->_eventManager->dispatch('sales_order_payment_place_end', ['payment' => $this]);\n\n return $this;\n }", "function add() {\n }", "function pay() {\n if($this->active_invoice->isLoaded()) {\n\n if($this->request->isSubmitted()) {\n try {\n $payment_data = $this->request->post('payment');\n $payment_gateway_id = $this->request->post('payment_gateway_id');\n\n $payment_data['payment_gateway_id'] = $payment_gateway_id;\n\n $payer_email = $payment_data['payer_email'];\n if($payer_email && is_valid_email($payer_email)) {\n $payer = Users::findByEmail($payer_email);\n if(!$payer instanceof User) {\n $payer = new AnonymousUser($payer_email, $payer_email);\n } //if\n } //if\n\n if(!$payer instanceof IUser) {\n throw new Error('Please enter valid Email address');\n } //if\n\n $this->response->assign(array(\n 'payment_data'\t=> $payment_data,\n ));\n\n $cc_number = trim($payment_data['credit_card_number']);\n if($cc_number) {\n $response = is_valid_cc($cc_number);\n if($response !== true) {\n throw new Error($response);\n }//if\n }//if\n\n $payment_data['amount'] = str_replace(\",\",\"\",$payment_data['amount']);\n\n if(!is_numeric($payment_data['amount'])) {\n throw new Error('Total amount must be numeric value');\n }//if\n\n //check if this payment can proceed\n $this->active_invoice->payments()->canMarkAsPaid($payment_data['amount']);\n\n DB::beginWork('Creating new payment @ ' . __CLASS__);\n\n if($payment_gateway_id && $payment_gateway_id > 0) {\n $active_payment_gateway = PaymentGateways::findById($payment_gateway_id);\n if(!$active_payment_gateway instanceof PaymentGateway) {\n $this->response->notFound();\n }//if\n } else {\n throw new Error('Please select preferred payment option');\n }//if\n\n //if this method exists, please check is all necessery extension loaded\n if(method_exists($active_payment_gateway, 'checkEnvironment')) {\n $active_payment_gateway->checkEnvironment();\n }//if\n\n $active_payment = $active_payment_gateway->makePayment($payment_data, $this->active_invoice->getCurrency(), $this->active_invoice);\n\n if(!$active_payment->getIsError() && $active_payment instanceof Payment) {\n\n $active_payment->setIsPublic(true);\n $active_payment->setCreatedBy($payer);\n $active_payment->setParent($this->active_invoice);\n $active_payment->setAttributes($payment_data);\n $active_payment->setStatus(Payment::STATUS_PAID);\n $active_payment->setCurrencyId($this->active_invoice->getCurrency()->getId());\n\n //if we do express checkout\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $active_payment->setStatus(Payment::STATUS_PENDING);\n $active_payment->setReason(Payment::REASON_OTHER);\n $active_payment->setReasonText(lang('Waiting response from paypal express checkout'));\n } //if\n\n $active_payment->save();\n\n //TO-Do check this\n $this->active_invoice->payments()->changeStatus($payer, $active_payment, $payment_data);\n $this->active_invoice->activityLogs()->logPayment($payer);\n\n // Notify if not gagged\n if(!($active_payment instanceof PaypalExpressCheckoutPayment) && !$this->active_invoice->payments()->isGagged()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToFinancialManagers();\n }//if\n\n if($payer instanceof IUser && !$payer->isFinancialManager()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment_to_payer', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToUsers($payer);\n }//if\n\n $this->active_invoice->payments()->paymentMade($active_payment);\n\n DB::commit('Payment created @ ' . __CLASS__);\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $this->response->redirectToUrl($active_payment->getRedirectUrl());\n } //if\n } else {\n throw new Error($active_payment->getErrorMessage());\n } //if\n\n $this->response->assign(array(\n 'active_object'\t=> $this->active_invoice,\n ));\n } catch (Exception $e) {\n DB::rollback('Failed to make payment @ ' . __CLASS__);\n $this->response->assign('errors', $e);\n }//try\n } //if\n } else {\n $this->response->notFound();\n } // if\n }", "public function setPaymentMethod(PaymentMethodInterface $method, $amount = null);", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function store()\n\t\t{\n\t\t\t$validator_pm_form = Validator::make(Input::all(), PaymentMethod::$rules_pm_form, PaymentMethod::$messages);\n\n\t\t\tif($validator_pm_form->passes()) {\t\t \n\t\t\t $pm = new PaymentMethod;\n\n\t\t\t $pm->payment_method = Input::get('payment_method');\n\t\t\t $pm->description = Input::get('description');\n\t\t\t $pm->active = Input::get('active');\n\n\t\t\t $pm->save();\n\n\t\t\t return Redirect::route('payment_method_add_new_form')\n\t\t\t \t\t\t\t->with('success', 'Método de pago registrado correctamente');\n\n\t\t\t} else {\n\n\t\t\t\treturn Redirect::route('payment_method_add_new_form')\n\t\t\t\t\t\t\t\t->with('error', 'Revise los siguientes errores')\n\t\t\t ->withErrors($validator_pm_form)\n\t\t\t ->withInput();\n\t\t\t}\n\t\t}", "public function setMethod(BankPaymentType $method): self\n {\n $this->method = $method;\n\n return $this;\n }", "private function _proceedPayment()\n {\n $paymentInitModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentInit()\n );\n\n $result = $this->_service->xmlRequest($paymentInitModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_INIT',\n $result\n )\n ) {\n Shopware()->Session()->RatePAY['transactionId'] = $result->getElementsByTagName('transaction-id')->item(\n 0\n )->nodeValue;\n $this->_modelFactory->setTransactionId(Shopware()->Session()->RatePAY['transactionId']);\n $paymentRequestModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentRequest()\n );\n $result = $this->_service->xmlRequest($paymentRequestModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_REQUEST',\n $result\n )\n ) {\n $uniqueId = $this->createPaymentUniqueId();\n $orderNumber = $this->saveOrder(Shopware()->Session()->RatePAY['transactionId'], $uniqueId, 17);\n $paymentConfirmModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentConfirm()\n );\n $matches = array();\n preg_match(\"/<descriptor.*>(.*)<\\/descriptor>/\", $this->_service->getLastResponse(), $matches);\n $dgNumber = $matches[1];\n $result = $this->_service->xmlRequest($paymentConfirmModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_CONFIRM',\n $result\n )\n ) {\n if (Shopware()->Session()->sOrderVariables['sBasket']['sShippingcosts'] > 0) {\n $this->initShipping($orderNumber);\n }\n try {\n $orderId = Shopware()->Db()->fetchOne(\n 'SELECT `id` FROM `s_order` WHERE `ordernumber`=?',\n array($orderNumber)\n );\n Shopware()->Db()->update(\n 's_order_attributes',\n array(\n 'RatePAY_ShopID' => Shopware()->Shop()->getId(),\n 'attribute5' => $dgNumber,\n 'attribute6' => Shopware()->Session()->RatePAY['transactionId']\n ),\n 'orderID=' . $orderId\n );\n } catch (Exception $exception) {\n Shopware()->Log()->Err($exception->getMessage());\n }\n\n //set payments status to payed\n $this->savePaymentStatus(\n Shopware()->Session()->RatePAY['transactionId'],\n $uniqueId,\n 155\n );\n\n /**\n * unset DFI token\n */\n if (Shopware()->Session()->RatePAY['devicefinterprintident']['token']) {\n unset(Shopware()->Session()->RatePAY['devicefinterprintident']['token']);\n }\n\n /**\n * if you run into problems with the redirect method then use the forwarding\n * return $this->forward('finish', 'checkout', null, array('sUniqueID' => $uniqueId));\n **/\n \n $this->redirect(\n Shopware()->Front()->Router()->assemble(\n array(\n 'controller' => 'checkout',\n 'action' => 'finish',\n 'forceSecure' => true\n )\n )\n );\n } else {\n $this->_error();\n }\n } else {\n $this->_error();\n }\n } else {\n $this->_error();\n }\n }", "public function setClassPaymentByInstructor_post()\n {\n /* code goes here */\n }", "public function add() {\n $dataH['CustomerBankAccount'] = $_lib['sess']->get_companydef('BankAccount');\n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $dataH['CustomerAccountPlanID'] = strtolower(preg_replace($old_pattern, $new_pattern , $_lib['sess']->get_companydef('OrgNumber')));\n }", "public function payment($id)\n {\n\n\n }", "public function run()\n {\n PaymentOption::create([\n 'type' => 'Paid',\n\n ]);\n PaymentOption::create([\n 'type' => 'Pending',\n\n ]);\n }", "public function takePayment($id, \\Bkademy\\Webpos\\Api\\Data\\Checkout\\PaymentInterface $payment)\n {\n $order = $this->orderRepository->get($id);\n $additional_information = [];\n if($payment){\n $methodData = $payment->getMethodData();\n foreach ($methodData as $item){\n $orderPayment = $this->_orderPaymentFactory->create();\n $orderPayment->setData([\n 'order_id' => $order->getId(),\n 'real_amount' => $item[PaymentItem::KEY_REAL_AMOUNT],\n 'base_real_amount' => $item[PaymentItem::KEY_BASE_REAL_AMOUNT],\n 'payment_amount' => $item[PaymentItem::KEY_AMOUNT],\n 'base_payment_amount' => $item[PaymentItem::KEY_BASE_AMOUNT],\n 'method' => $item[PaymentItem::KEY_CODE],\n 'method_title' => $item[PaymentItem::KEY_TITLE],\n 'shift_id' => $item[PaymentItem::KEY_SHIFT_ID],\n 'reference_number' => $item[PaymentItem::KEY_REFERENCE_NUMBER]\n ]);\n $order->setBaseTotalPaid($order->getBaseTotalPaid() + $item[PaymentItem::KEY_BASE_AMOUNT]);\n $order->setTotalPaid($order->getTotalPaid() + $item[PaymentItem::KEY_AMOUNT]);\n $additional_information[] = $item->getAmount().' : '.$item->getTitle();\n try {\n $orderPayment->save();\n } catch (\\Exception $e) {\n $this->logger->critical($e);\n }\n }\n \n }\n try {\n $order->getPayment()\n //->setData($payment[PaymentItem::KEY_CODE].'_ref_no',$payment[PaymentItem::KEY_REAL_AMOUNT])\n ->setData('additional_information',$additional_information)\n ->setData('method','multipaymentforpos')\n ->save();\n if($order->getBaseTotalPaid()-$order->getBaseGrandTotal()>0){\n $order->setWebposBaseChange($order->getBaseTotalPaid()-$order->getBaseGrandTotal());\n $order->setWebposChange($order->getTotalPaid()-$order->getGrandTotal());\n }\n $order->save();\n } catch (\\Exception $e) {\n $this->logger->critical($e);\n }\n return $this->orderRepository->get($id);\n }", "public function addDeliveryMethod()\n {\n return view('admin.delivery-and-payment-method', [\n 'delivery_and_payment_method' => new DeliveryMethod,\n 'type' => 'delivery_method',\n 'action' => route('admin.delivery_method.create')\n ]);\n }", "public function store(ManagePaymentMethodRequest $request)\n {\n PaymentMethod::create($request->all());\n return redirect(route('payment-methods.index'))->with('success', 'Item Created Successfully');\n }", "static function init()\n\t\t{\n\t\t\t//make sure PayPal Express is a gateway option\n\t\t\tadd_filter('pmpro_gateways', array('PMProGateway_paypalexpress', 'pmpro_gateways'));\n\n\t\t\t//add fields to payment settings\n\t\t\tadd_filter('pmpro_payment_options', array('PMProGateway_paypalexpress', 'pmpro_payment_options'));\n\n\t\t\t/*\n\t\t\t\tFilter pmpro_next_payment to get actual value\n\t\t\t\tvia the PayPal API. This is disabled by default\n\t\t\t\tfor performance reasons, but you can enable it\n\t\t\t\tby copying this line into a custom plugin or\n\t\t\t\tyour active theme's functions.php and uncommenting\n\t\t\t\tit there.\n\t\t\t*/\n\t\t\t//add_filter('pmpro_next_payment', array('PMProGateway_paypalexpress', 'pmpro_next_payment'), 10, 3);\n\n\t\t\t/*\n\t\t\t\tThis code is the same for PayPal Website Payments Pro, PayPal Express, and PayPal Standard\n\t\t\t\tSo we only load it if we haven't already.\n\t\t\t*/\n\t\t\tglobal $pmpro_payment_option_fields_for_paypal;\n\t\t\tif(empty($pmpro_payment_option_fields_for_paypal))\n\t\t\t{\n\t\t\t\tadd_filter('pmpro_payment_option_fields', array('PMProGateway_paypalexpress', 'pmpro_payment_option_fields'), 10, 2);\n\t\t\t\t$pmpro_payment_option_fields_for_paypal = true;\n\t\t\t}\n\n\t\t\t//code to add at checkout\n\t\t\t$gateway = pmpro_getGateway();\n\t\t\tif($gateway == \"paypalexpress\")\n\t\t\t{\n\t\t\t\tadd_filter('pmpro_include_billing_address_fields', '__return_false');\n\t\t\t\tadd_filter('pmpro_include_payment_information_fields', '__return_false');\n\t\t\t\tadd_filter('pmpro_required_billing_fields', array('PMProGateway_paypalexpress', 'pmpro_required_billing_fields'));\n\t\t\t\tadd_filter('pmpro_checkout_new_user_array', array('PMProGateway_paypalexpress', 'pmpro_checkout_new_user_array'));\n\t\t\t\tadd_filter('pmpro_checkout_confirmed', array('PMProGateway_paypalexpress', 'pmpro_checkout_confirmed'));\n\t\t\t\tadd_action('pmpro_checkout_before_processing', array('PMProGateway_paypalexpress', 'pmpro_checkout_before_processing'));\n\t\t\t\tadd_filter('pmpro_checkout_default_submit_button', array('PMProGateway_paypalexpress', 'pmpro_checkout_default_submit_button'));\n\t\t\t\tadd_action('pmpro_checkout_after_form', array('PMProGateway_paypalexpress', 'pmpro_checkout_after_form'));\n\t\t\t\tadd_action('http_api_curl', array('PMProGateway_paypalexpress', 'http_api_curl'), 10, 3);\n\t\t\t}\n\t\t}", "public function processPayment(Payment $payment): void\n {\n }", "public function record_subscription_payment() { }", "public function addMethod(MethodInfo $method)\n {\n $this->methods[] = $method;\n return $this;\n }" ]
[ "0.64285123", "0.63144106", "0.6155572", "0.61236054", "0.60530025", "0.6011616", "0.59819007", "0.5875798", "0.5850535", "0.58154863", "0.57770324", "0.5771772", "0.57677287", "0.5737274", "0.5735655", "0.5734283", "0.57338744", "0.57293606", "0.5712686", "0.5706667", "0.5684798", "0.5657465", "0.56416774", "0.5625241", "0.56209075", "0.5619537", "0.56131536", "0.5600341", "0.5599232", "0.5586893", "0.55497634", "0.5508917", "0.54968536", "0.5495645", "0.549168", "0.5481125", "0.5475217", "0.54677427", "0.54617083", "0.5450564", "0.54431266", "0.5421322", "0.53516", "0.53478706", "0.5346283", "0.5342981", "0.5332612", "0.53282887", "0.5327914", "0.53267", "0.53110325", "0.5308175", "0.53016657", "0.52991647", "0.5290396", "0.52830124", "0.5278645", "0.5269053", "0.5269018", "0.52577233", "0.52577233", "0.52576035", "0.52575356", "0.52570784", "0.5243701", "0.52361315", "0.52332175", "0.5231442", "0.5231442", "0.5231442", "0.52283454", "0.522669", "0.52265847", "0.5226181", "0.52057964", "0.5198066", "0.5195334", "0.5194448", "0.51881313", "0.51873714", "0.5176288", "0.5162088", "0.5155463", "0.5152813", "0.51419663", "0.51419663", "0.51409054", "0.5132923", "0.51283896", "0.51254034", "0.51089084", "0.5108052", "0.51049954", "0.5102268", "0.5098647", "0.5079498", "0.5075058", "0.50635034", "0.5057486", "0.50516224" ]
0.5714812
18
return a PaymentInterface Object.
public function getMethod($code) { return $this->methods[$code] ?? null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentResource()\n {\n return new PaymentResource($this->paymentAdapter->getConfiguration(), new Curl());\n }", "public function createPayment() {\n $api = new ApiPayment($this->_clientId, $this->_clientSecret, $this->_isTest);\n return $api;\n }", "public function getPayment()\n {\n return new Payment($this->getSeller(),\n $this->getAmount(),\n $this->getCurrency(),\n $this->getDescription(),\n $this->getOrderId());\n }", "private function getPaymentMock()\n {\n $paymentDO = $this->getMockBuilder(PaymentDataObjectInterface::class)\n ->getMockForAbstractClass();\n\n return $paymentDO;\n }", "protected function createPayment() {\n /* @var \\Drupal\\commerce_payment\\Plugin\\Commerce\\PaymentGateway\\PaymentGatewayInterface $payment_gateway */\n $payment_gateway = $this->order->payment_gateway->entity;\n $payment_method = $this->order->payment_method->entity;\n\n $now = REQUEST_TIME;\n $mode = SIPSPaymentGateway::MODES[$payment_gateway->getPlugin()->configuration['mode']];\n\n // Create a payment entity which will be initially in \"pending mode\":\n // \"pending mode\": means that the payment was still not finished in SIPS,\n // so the user is in the platform filling in the credit card or he/she had\n // problems to pay that time (timeout/closed the browser/etc).\n $payment = Payment::create([\n 'order_id' => $this->order->id(),\n 'payment_method' => $payment_method->id(),\n 'payment_gateway' => $payment_gateway->id(),\n // Give it a status: pending/failed/done.\n 'state' => 'new',\n 'remote_state' => 'pending',\n // Give it a max_timestamp of 24 hours.\n 'authorization_expires' => $now + (24 * 60 * 60),\n // Give it a transaction reference.\n 'remote_id' => $this->order->id() . $now,\n 'test' => $mode != PaymentRequest::PRODUCTION,\n 'amount' => $this->order->getTotalPrice(),\n ]);\n\n $payment->save();\n\n return $payment;\n }", "function opalmembership_payment( $payment_id ){\n\treturn new OpalMembership_Payment( $payment_id );\n}", "public function payments()\n {\n return new Payment($this);\n }", "protected function _get_configuration(){\n\n return new Payment_Configuration();\n\n }", "abstract public function getPaymentInstance($payment, $order = array(), $config = array());", "private function getPaymentModel() {\n if ($this->_paymentModel == NULL) {\n //$this->_paymentModel = new PaymentModel($this->mangopay);\n $this->_paymentModel = \\App::make('\\App\\PaymentModel');\n }\n return $this->_paymentModel;\n }", "public function createPayment()\n\t{\n\n\t}", "public function payment()\n {\n return $this->hasOne('App\\Payment');\n }", "public function getPaymentProvider(): PaymentProvider\n {\n return $this->paymentProvider;\n }", "public function takePayment() {\r\n if ($this->payment instanceof PayPal) {\r\n $this->payment->payByPayPal();\r\n }elseif ($this->payment instanceof SagePay) {\r\n $this->payment->payBySagePay();\r\n } elseif ($this->payment instanceof WorldPay) {\r\n $this->payment->payByWorldPay();\r\n }\r\n }", "public function getPayment()\n {\n return $this->payment;\n }", "public function getPayment()\n {\n return $this->payment;\n }", "public function getPayment()\n {\n return $this->payment;\n }", "public function getPayment(int $paymentId): Payment\n {\n return Payment::findOrFail($paymentId);\n }", "public static function newPayment(){\n $result = mysql_query(\"INSERT INTO school_payments () VALUES()\") or die(mysql_error());\n $payment = new payment(mysql_insert_id());\n $payment->completed = date(\"Y-m-d H:i:s\");\n $payment->saveInfo();\n return $payment;\n }", "protected function getPaymentModel()\n {\n return Mage::getModel('paynow/payment');\n }", "public function generatePaymentModel ( ) {\n\t\t# Prepare\n\t\t$InvoiceItem = $this;\n\t\t$invoiceitem = $InvoiceItem->toArray(false);\n\t\t\n\t\t# Prepare PaymentInvoiceItem\n\t\t$PaymentInvoiceItem = new Bal_Payment_Model_InvoiceItem();\n\t\t\n\t\t# Adjust Keys\n\t\t$keys = $PaymentInvoiceItem->getKeys(); array_keys_keep($invoiceitem, $keys);\n\t\t\n\t\t# Apply the InvoiceItem\n\t\t$PaymentInvoiceItem->merge($invoiceitem);\n\t\t\n\t\t# Apply the Totals\n\t\t$PaymentInvoiceItem->applyTotals();\n\t\t\n\t\t# Validate\n\t\t$PaymentInvoiceItem->validate();\n\t\t\n\t\t# Return the PaymentInvoiceItem\n\t\treturn $PaymentInvoiceItem;\n\t}", "public function getPayment() {\n return $this->request(\n \"GET\",\n \"/shops/{$this->shop_id}/receipts/{$this->receipt_id}/payments\",\n \"Payment\"\n )\n ->first();\n }", "public function payment()\n {\n return $this->hasOne(Payment::class, 'reservation_id');\n }", "public static function getObject()\n {\n return new Payout(self::getJson());\n }", "public function paymentable()\n {\n return $this->morphTo();\n }", "function PaymentGateway()\n\t\t{\n\t\t\t// exit(\"Cannot instantiate this class directly\");\n\t\t}", "public static function getObject()\n {\n return new PayerInfo(self::getJson());\n }", "function payment() {\n\t\t$url = 'https://www.instawallet.org/api/v1/w/' . $wallet_id . '/payment';\n\t\t$json = file_get_contents($url);\n\t\treturn json_decode($json);\n\t}", "protected function getPayment()\n {\n return $this->getOrder()->getPayment();\n }", "public function paymentForm() {\n return new PaymentRequestForm();\n }", "function testingPayment(){\n\t\treturn $this->getTestingPayment();\n\t}", "public static function createFromData(PaymentProviderInterface $provider)\n {\n $payment = new static(\n $provider->getSeller(),\n $provider->getAmount(),\n $provider->getCurrency(),\n $provider->getDescription(),\n $provider->getId()\n );\n\n return $payment;\n }", "abstract public function getPaymentMethod();", "public function get_payment(PaymentRepositoryInterface $payment, $order_request_id);", "public static function getInstance() {\n if (!is_object(self::$_instance)) //or if( is_null(self::$_instance) ) or if( self::$_instance == null )\n self::$_instance = new Application_Model_PaymentBoleto();\n return self::$_instance;\n }", "public function getPay(User $user): ?PayInterface;", "protected function get_payment_aggregate()\n {\n if (!$this->_payment_aggregate)\n {\n require_once DIR_FS_CATALOG . 'includes/modules/payment/payneteasyform/paynet_payment_aggregate.php';\n $this->_payment_aggregate = new PaynetPaymentAggregate;\n }\n\n return $this->_payment_aggregate;\n }", "protected function getPaymentServiceObject($name = '')\n {\n $criteria = new Criteria();\n PaymentPeer::addPublicCriteria($criteria);\n \n if ($name == '') {\n $paymentService = PaymentPeer::retrieveById($this->getUser()->getAttribute('method_id', null, 'order/payment'), $criteria);\n }\n else {\n $paymentService = PaymentPeer::retrieveByName($name, $criteria);\n }\n \n if ($paymentService == null) {\n $this->logMessage('Payment (' . ucfirst($paymentService->getName()) \n . ' service): Some member to try use this service, but this service is inactive or does not exist.');\n $this->redirect('@payment_chargeFailed');\n }\n \n return $paymentService;\n }", "public function activatePayment()\n {\n $this->payment = new Payment();\n return $this;\n }", "public static function init(): self\n {\n return new self(new V1ListPaymentsResponse());\n }", "public function getGateway() {\n\n if (null === $this->_gateway) {\n $class = 'Engine_Payment_Gateway_Paynow';\n Engine_Loader::loadClass($class);\n $gateway = new $class(array(\n 'config' => (array) $this->_gatewayInfo->config,\n 'testMode' => $this->_gatewayInfo->test_mode,\n 'currency' => Engine_Api::_()->sitegateway()->getCurrency(),\n ));\n if (!($gateway instanceof Engine_Payment_Gateway)) {\n throw new Engine_Exception('Plugin class not instance of Engine_Payment_Gateway');\n }\n $this->_gateway = $gateway;\n }\n\n return $this->_gateway;\n }", "public function payment()\n {\n return $this->belongsTo(Payment::class);\n }", "public static function find($name) {\n $settings = (new PaymentGateway)->where('gateway', $name)->get();\n $object = new PaymentGateway();\n\n foreach ($settings as $setting) {\n $name = $setting->setting;\n $value = $setting->value;\n $object->$name = $value;\n }\n\n return $object;\n }", "public function purchase(): PurchaseReceiptInterface;", "public static function initializeWithRawData($data)\n {\n $item = new Payment();\n\n if(isset($data['amount'])) $item->setAmount($data['amount']);\n if(isset($data['paid_at'])) $item->setPaidAt(new \\DateTime('@' . strtotime($data['paid_at'])));\n if(isset($data['identifier'])) $item->setIdentifier($data['identifier']);\n\n return $item;\n }", "public function getMicroPaymentPayabale()\r\n {\r\n /**\r\n * if\r\n */\r\n }", "public function getPaymentType(){\n return $this->payment_type;\n }", "public function processPayment()\n {\n $paymentMethod = $this\n ->methodFactory\n ->create();\n\n /**\n * At this point, order must be created given a card, and placed in\n * PaymentBridge.\n *\n * So, $this->paymentBridge->getOrder() must return an object\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderLoad(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Order exists right here.\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderCreated(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Payment paid done.\n *\n * Paid process has ended (No matters result)\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderDone(\n $this->paymentBridge,\n $paymentMethod\n );\n\n /**\n * Payment paid successfully.\n *\n * Paid process has ended successfully\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderSuccess(\n $this->paymentBridge,\n $paymentMethod\n );\n\n return $this;\n }", "public function makePayment() {\n\t\tLoggerRegistry::debug('CustomerModule::makePayment()');\n\t\t// TODO Payment gateway integration\n\t}", "public function createSimplePayDriver()\n {\n return $this->repository(new SimplePay($this->dataRepository, $this->config));\n }", "public function payment($id)\n {\n\n\n }", "private function createPaymentModel(CreatePaymentData $paymentData, string $type): Payment\n {\n $payment = new Payment([\n 'type' => $type,\n 'amount' => $paymentData->getAmount(),\n 'paid_at' => $paymentData->getPaidAt(),\n 'reference' => $paymentData->getReference(),\n ]);\n\n $userId = $paymentData->getUserId();\n if (null !== $userId) {\n $payment->user_id = $userId;\n }\n\n return $payment;\n }", "public function createPayment(): ?array\n {\n // @TODO add the values amount from huwelijk object etc to array\n $paymentSchema = $this->gatewayResourceService->getSchema('https://huwelijksplanner.nl/schemas/hp.mollie.schema.json', 'common-gateway/huwelijksplanner-bundle');\n\n $redirectUrl = null;\n $application = $this->entityManager->getRepository('App:Application')->findOneBy(['reference' => 'https://huwelijksplanner.nl/application/hp.frontend.application.json']);\n if ($application !== null && $application->getDomains() !== null && count($application->getDomains()) > 0) {\n $domain = $application->getDomains()[0];\n $redirectUrl = 'https://'.$domain.'/voorgenomen-huwelijk/betalen/betaalstatus-verificatie';\n }\n\n $huwelijkObject = $this->validateHuwelijkId($this->data['query']);\n if ($huwelijkObject === null) {\n return null;\n }\n\n // Get all prices from the products\n $productPrices = $this->getSDGProductPrices($huwelijkObject->toArray());\n\n $paymentObject = new ObjectEntity($paymentSchema);\n $paymentArray = [\n 'amount' => [\n 'currency' => 'EUR',\n 'value' => $this->calculatePrice($productPrices, 'EUR'),\n // Calculate new price\n ],\n 'description' => 'Payment made for huwelijk with id: '.$huwelijkObject->getId()->toString(),\n 'redirectUrl' => $redirectUrl,\n 'webhookUrl' => $this->configuration['webhookUrl'],\n 'method' => $this->configuration['method'],\n 'status' => 'paid',\n // @TODO temporary set the status to paid\n ];\n $paymentObject->hydrate($paymentArray);\n $this->entityManager->persist($paymentObject);\n $this->entityManager->flush();\n\n // return $this->createMolliePayment($paymentArray);\n // todo: temporary, redirect to return [redirectUrl]. Instead of this $paymentArray and return^\n return [\n 'paymentId' => $paymentObject->getId()->toString(),\n 'redirectUrl' => $paymentObject->getValue('redirectUrl'),\n // @TODO set redirectUrl to the checkout url\n ];\n\n }", "public function paypalItem(){\n \treturn \\PaypalPayment::item()->setNAme($this->title)->setDescription($this->description)->setCurrency('USD')->setQuantity(1)->setPrice($this->pricing);\n }", "public static function createNew(): Invoice {\n return new Invoice();\n }", "public function get_pay()\n {\n// $core->toPay();\n $pay = new \\Wxpay\\Weixinpay();\n $order = array(\n 'body' => 'test',\n 'total_fee' => 1,\n 'out_trade_no' => strval(time()),\n 'product_id' => 1\n );\n $pay->pay($order);\n\n }", "public function payments() {\n\t\treturn $this;\n\t}", "protected function createPayment(Session $session, OrderInterface $order)\n {\n $payment = new Payment();\n $delivery = $this->getShippingDelivery($order);\n\n $total = $order->getSubtotal();\n\n $items = [];\n foreach ($order->getAllVisibleItems() as $item) {\n $items[] = new Product(\n $item->getName(),\n $item->getRowTotalInclTax(),\n $item->getQtyOrdered()\n );\n }\n\n // Secure delivery version adding shipping amount on payment processing side\n if (!$delivery && $order->getShippingAmount() > 0) {\n $items[] = new Product(\n $order->getShippingDescription(),\n $order->getShippingAmount(),\n 1\n );\n $total += $order->getShippingAmount();\n }\n\n $ok = $payment->create(\n $this->getPaymentConfig('merchant_id'),\n $session->id,\n $items,\n $total,\n PaymentType::HOLD == $this->getPaymentConfig('payment_type'),\n $order->getRealOrderId(),\n $delivery\n );\n\n if (!$ok) {\n $res = $payment->getResponse();\n $result = $this->resultFactory->create(ResultFactory::TYPE_JSON);\n $result->setHttpResponseCode(406);\n $data = [\n 'errors' => [\n $res instanceof ResponseError\n ? $res->message\n : __('Cannot post a payment')\n ],\n 'method' => 'createPayment',\n 'shipping' => $delivery\n ];\n if ($this->getPaymentConfig('debug')) {\n $data = array_merge($data, $this->getDebugInfo());\n }\n $result->setData($data);\n return $result;\n }\n return $payment;\n }", "public function create()\n {\n\n $this->validate($this->request, Payment::createRules());\n\n $payment = new Payment;\n\n $payment->bill_id= $this->request->bill_id;\n \n $payment->save();\n \n return $this->response(201,\"Payment\", $payment );\n\n\n }", "public function createPayment()\n {\n //return dd($payment);\n //return view('frontend.checkout')->with(['payment' => $payment]);\n }", "public function getPaymentResponse(): ?PaymentResponse\n {\n return $this->paymentResponse;\n }", "public function getSelectedPayment()\r\n {\r\n if (!empty($this->View()->sUserData['additional']['payment'])) {\r\n $payment = $this->View()->sUserData['additional']['payment'];\r\n } elseif (!empty($this->session['sPaymentID'])) {\r\n $payment = $this->admin->sGetPaymentMeanById($this->session['sPaymentID'], $this->View()->sUserData);\r\n }\r\n\r\n $paymentClass = $this->admin->sInitiatePaymentClass($payment);\r\n if ($payment && $paymentClass instanceof \\ShopwarePlugin\\PaymentMethods\\Components\\BasePaymentMethod) {\r\n $data = $paymentClass->getCurrentPaymentDataAsArray(Shopware()->Session()->sUserId);\r\n if (!empty($data)) {\r\n $payment['data'] = $data;\r\n }\r\n }\r\n\r\n if (!empty($payment)) {\r\n return $payment;\r\n }\r\n $payments = $this->getPayments();\r\n if (empty($payments)) {\r\n unset($this->session['sPaymentID']);\r\n return false;\r\n }\r\n $payment = reset($payments);\r\n $this->session['sPaymentID'] = (int) $payment['id'];\r\n return $payment;\r\n }", "public function create(){\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Set redirect URLs\n $redirectUrls = new RedirectUrls();\n\n if (App::environment() == 'production') {\n $app_url = \"https://doomus.com.br/public\";\n } else {\n $app_url = \"http://localhost:8000\";\n }\n\n $redirectUrls->setReturnUrl(\"$app_url/execute-payment\")\n ->setCancelUrl(\"$app_url/cancel-payment\");\n\n // Set payment amount\n if(session('cupom') !== null && session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(round(Cart::total(), 2) + str_replace(',','.', session('valorFrete')));\n }elseif(session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total() + str_replace(',','.', session('valorFrete')));\n }else{\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total());\n }\n\n // Set transaction object\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setDescription(\"Payment description\");\n\n // Create the full payment object\n $payment = new Payment();\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n // Create payment with valid API context\n try {\n $payment->create($this->_apiContext);\n \n // Get PayPal redirect URL and redirect the customer\n return redirect($payment->getApprovalLink());\n \n // Redirect the customer to $approvalUrl\n } catch (PayPalConnectionException $ex) {\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n } catch (Exception $ex) {\n die($ex);\n }\n }", "abstract protected function handlePayment();", "public function driver_payment()\n {\n return $this->hasOne('App\\Models\\Payment','trip_id','id');\n }", "public function payoutShouldCreatePaymentAndCallPayoutWithPayment(): void\n {\n $paymentType = (new SepaDirectDebit('1234'))->setId('typeId');\n $customer = (new Customer())->setId('customerId');\n $metadata = (new Metadata())->setId('metadataId');\n\n /** @var ResourceService|MockObject $resourceSrvMock */\n $resourceSrvMock = $this->getMockBuilder(ResourceService::class)->disableOriginalConstructor()->setMethods(['createResource'])->getMock();\n /** @noinspection PhpParamsInspection */\n $resourceSrvMock->expects(self::once())->method('createResource')\n ->with(self::callback(static function ($payout) use ($customer, $metadata) {\n return $payout instanceof Payout &&\n $payout->getAmount() === 1.23 &&\n $payout->getCurrency() === 'testCurrency' &&\n $payout->getPayment() instanceof Payment &&\n $payout->getReturnUrl() === 'http://return.url' &&\n $customer === $payout->getPayment()->getCustomer() &&\n $metadata === $payout->getPayment()->getMetadata();\n }));\n $heidelpay = (new Heidelpay('s-priv-123'))->setResourceService($resourceSrvMock);\n $heidelpay->getPaymentService()->payout(1.23, 'testCurrency', $paymentType, 'http://return.url', $customer, 'OrderId', $metadata);\n }", "private function getPayrollModel()\n\t{\n\t\treturn $this->payrollModel = new PayrollModel();\n\t}", "public function __construct($payment)\n {\n //\n $this->payment = $payment;\n }", "public function processPayment()\n {\n $cashOnDeliveryMethod = $this\n ->methodFactory\n ->create();\n\n /**\n * At this point, order must be created given a cart, and placed in PaymentBridge.\n *\n * So, $this->paymentBridge->getOrder() must return an object\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderLoad(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n /**\n * Order Not found Exception must be thrown just here.\n */\n if (!$this->paymentBridge->getOrder()) {\n throw new PaymentOrderNotFoundException();\n }\n\n /**\n * Order exists right here.\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderCreated(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n /**\n * Payment paid done.\n *\n * Paid process has ended ( No matters result )\n */\n $this\n ->paymentEventDispatcher\n ->notifyPaymentOrderDone(\n $this->paymentBridge,\n $cashOnDeliveryMethod\n );\n\n return $this;\n }", "public function payment(){\n\n\t}", "public function __construct(Payment $payment)\n {\n $this->payment = $payment;\n }", "public function __construct(Payment $payment)\n {\n $this->payment = $payment;\n }", "public function getPaymentType()\n {\n\n return 'IPAY';\n }", "public static function init(): self\n {\n return new self(new V1ListPaymentsRequest());\n }", "private function createPaymentRequest()\n {\n $helper = Mage::helper('pagseguro');\n\n // Get references that stored in the database\n $reference = $helper->getStoreReference();\n\n $paymentRequest = new PagSeguroPaymentRequest();\n $paymentRequest->setCurrency(PagSeguroCurrencies::getIsoCodeByName(self::REAL));\n $paymentRequest->setReference($reference . $this->order->getId()); //Order ID\n $paymentRequest->setShipping($this->getShippingInformation()); //Shipping\n $paymentRequest->setSender($this->getSenderInformation()); //Sender\n $paymentRequest->setItems($this->getItensInformation()); //Itens\n $paymentRequest->setShippingType(SHIPPING_TYPE);\n $paymentRequest->setShippingCost(number_format($this->order->getShippingAmount(), 2, '.', ''));\n $paymentRequest->setNotificationURL($this->getNotificationURL());\n $helper->getDiscount($paymentRequest);\n\n //Define Redirect Url\n $redirectUrl = $this->getRedirectUrl();\n\n if (!empty($redirectUrl) and $redirectUrl != null) {\n $paymentRequest->setRedirectURL($redirectUrl);\n } else {\n $paymentRequest->setRedirectURL(Mage::getUrl() . 'checkout/onepage/success/');\n }\n\n //Define Extra Amount Information\n $paymentRequest->setExtraAmount($this->extraAmount());\n\n try {\n $paymentUrl = $paymentRequest->register($this->getCredentialsInformation());\n } catch (PagSeguroServiceException $ex) {\n Mage::log($ex->getMessage());\n $this->redirectUrl(Mage::getUrl() . 'checkout/onepage');\n }\n\n return $paymentUrl;\n }", "public function payment(Request $request)\n {\n\n $payment = new Payment($request);\n\n $payment = $payment->paymentOrder(false);\n\n if ($payment instanceof ResponseInterface) {\n\n return json_decode($payment->getBody()->__toString());\n\n }\n\n return new JsonResponse($payment, 200);\n\n }", "public function processPayment();", "protected function _getApi()\n {\n if (!is_null($this->_api)) {\n return $this->_api;\n }\n $helper = Mage::helper('dpg');\n // Change to using the DataCash Direct Api\n $this->_api = Mage::getSingleton($this->_apiType);\n $config = $this->_getDpgConfig();\n $this->_api->setMerchantId($config->getApiMerchantId($this->getCode()));\n $this->_api->setMerchantPassword($config->getApiPassword($this->getCode()));\n // Set the sandboxed state\n $this->_api->setIsSandboxed($config->isMethodSandboxed($this->getCode()));\n \n $request = Mage::app()->getRequest();\n $this->_api->setBaseUrl(Mage::getBaseUrl())\n ->setPurchaseDescription('Purchase from ' . Mage::app()->getStore()->getGroup()->getName())\n ->setPurchaseDateTime(date('Y-m-d H:i:s'))\n ->setBrowserData(\n array(\n 'device_category' => $helper->getDeviceType($request->getHeader('USER_AGENT')),\n 'accept_headers' => $request->getHeader('ACCEPT'),\n 'user_agent' => $request->getHeader('USER_AGENT')\n )\n );\n\n $this->_api->setUseFraudScreening($this->getUseFraudScreening());\n $this->_api->setFraudScreeningPolicy($this->getFraudScreeningPolicy());\n\n return $this->_api;\n }", "public function getPaymentMethod()\n {\n \n //Fill POST fields array\n $ipPostFields = [\n 'InvoiceAmount' => session()->get('total_price'),\n 'CurrencyIso' => 'KWD'\n ];\n \n //Call endpoint\n $paymentMethods = $this->initiatePayment($this->apiURL, $this->apiKey, $ipPostFields);\n \n \n return view('site.payment.checkout', compact('paymentMethods')); // redirect to the pay method in the service classe with the paymentmedthod id\n \n \n }", "public function createPaypalPayment(){\n try {\n $client = new Client();\n $paymentResponse = $client->request('POST', $this->paypalPaymentUrl, [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $this->salesData->salesData()\n ]);\n $this->parsePaymentBody($paymentResponse);\n \n } catch (\\Exception $ex) {\n $error = $ex->getMessage();\n return $error;\n }\n return $this->paymentBody->id;\n\n }", "public function payable()\n {\n return $this->morphTo();\n }", "public function getPaymentDate();", "protected function getRemoteObject()\n {\n if (!class_exists('\\PromisePay\\PromisePay')) {\n throw new \\RuntimeException(\n 'The PromisePay SDK is required for this method'\n );\n }\n return PromisePay::Transaction()->get($this->getObject()->id);\n }", "private function getPayment() {\r\n\r\n\t\t\t$refreshed_token = new Token($this->id, $this->secret, null);\r\n\r\n\t\t\t// Get bill id from URI\r\n\t\t\t$sections = explode(\"/\", $_SERVER['REQUEST_URI']);\r\n\t\t\t$bill_id = $sections[1];\r\n\r\n\t\t\t$payments = $this->user->getPayments($bill_id);\r\n\r\n\t\t\tif($payments) {\r\n\r\n\t\t\t\techo json_encode([\r\n\t\t\t\t\t'code' => 200,\r\n\t\t\t\t\t'message' => 'OK',\r\n\t\t\t\t\t'payments' => $payments,\r\n\t\t\t\t\t'token' => $refreshed_token->getTokenString()\r\n\t\t\t\t]);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\techo json_encode([\r\n\t\t\t\t\t'code' => 404,\r\n\t\t\t\t\t'message' => 'Not found',\r\n\t\t\t\t\t'payments' => '',\r\n\t\t\t\t\t'token' => $refreshed_token->getTokenString()\r\n\t\t\t\t]);\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "public function purchaseBill()\n {\n return new PurchaseBill($this);\n }", "public function getPaymentIterator()\n {\n return new ArrayIterator($this->data->payments);\n }", "public function createInvoice()\n {\n $class = $this->class;\n\n return new $class;\n }", "public function getPaymentModel()\n {\n if ($this->validatePaymentClass()) {\n return $this->getPaymentClass()->getPaymentModel();\n }\n\n return parent::getPaymentModel();\n }", "protected static function newFactory(): Factory\n {\n return OrderPaymentFactory::new();\n }", "public function getPay(User $user): ?PayInterface\n {\n return null;\n }", "public function paymentForm() {\n return new GooglePayForm();\n }", "abstract public function test( Payment $payment );", "public function takePayment($id, \\Bkademy\\Webpos\\Api\\Data\\Checkout\\PaymentInterface $payment)\n {\n $order = $this->orderRepository->get($id);\n $additional_information = [];\n if($payment){\n $methodData = $payment->getMethodData();\n foreach ($methodData as $item){\n $orderPayment = $this->_orderPaymentFactory->create();\n $orderPayment->setData([\n 'order_id' => $order->getId(),\n 'real_amount' => $item[PaymentItem::KEY_REAL_AMOUNT],\n 'base_real_amount' => $item[PaymentItem::KEY_BASE_REAL_AMOUNT],\n 'payment_amount' => $item[PaymentItem::KEY_AMOUNT],\n 'base_payment_amount' => $item[PaymentItem::KEY_BASE_AMOUNT],\n 'method' => $item[PaymentItem::KEY_CODE],\n 'method_title' => $item[PaymentItem::KEY_TITLE],\n 'shift_id' => $item[PaymentItem::KEY_SHIFT_ID],\n 'reference_number' => $item[PaymentItem::KEY_REFERENCE_NUMBER]\n ]);\n $order->setBaseTotalPaid($order->getBaseTotalPaid() + $item[PaymentItem::KEY_BASE_AMOUNT]);\n $order->setTotalPaid($order->getTotalPaid() + $item[PaymentItem::KEY_AMOUNT]);\n $additional_information[] = $item->getAmount().' : '.$item->getTitle();\n try {\n $orderPayment->save();\n } catch (\\Exception $e) {\n $this->logger->critical($e);\n }\n }\n \n }\n try {\n $order->getPayment()\n //->setData($payment[PaymentItem::KEY_CODE].'_ref_no',$payment[PaymentItem::KEY_REAL_AMOUNT])\n ->setData('additional_information',$additional_information)\n ->setData('method','multipaymentforpos')\n ->save();\n if($order->getBaseTotalPaid()-$order->getBaseGrandTotal()>0){\n $order->setWebposBaseChange($order->getBaseTotalPaid()-$order->getBaseGrandTotal());\n $order->setWebposChange($order->getTotalPaid()-$order->getGrandTotal());\n }\n $order->save();\n } catch (\\Exception $e) {\n $this->logger->critical($e);\n }\n return $this->orderRepository->get($id);\n }", "public function createPayment(Paysera_WalletApi_Entity_Payment $payment)\n {\n return $this->mapper->decodePayment($this->client->post('payment', $this->mapper->encodePayment($payment)));\n }", "public function calculatePayment()\n {\n }", "function createObject() {\n\t\treturn new InstitutionalSubscription();\n\t}", "function pay() {\n if($this->active_invoice->isLoaded()) {\n\n if($this->request->isSubmitted()) {\n try {\n $payment_data = $this->request->post('payment');\n $payment_gateway_id = $this->request->post('payment_gateway_id');\n\n $payment_data['payment_gateway_id'] = $payment_gateway_id;\n\n $payer_email = $payment_data['payer_email'];\n if($payer_email && is_valid_email($payer_email)) {\n $payer = Users::findByEmail($payer_email);\n if(!$payer instanceof User) {\n $payer = new AnonymousUser($payer_email, $payer_email);\n } //if\n } //if\n\n if(!$payer instanceof IUser) {\n throw new Error('Please enter valid Email address');\n } //if\n\n $this->response->assign(array(\n 'payment_data'\t=> $payment_data,\n ));\n\n $cc_number = trim($payment_data['credit_card_number']);\n if($cc_number) {\n $response = is_valid_cc($cc_number);\n if($response !== true) {\n throw new Error($response);\n }//if\n }//if\n\n $payment_data['amount'] = str_replace(\",\",\"\",$payment_data['amount']);\n\n if(!is_numeric($payment_data['amount'])) {\n throw new Error('Total amount must be numeric value');\n }//if\n\n //check if this payment can proceed\n $this->active_invoice->payments()->canMarkAsPaid($payment_data['amount']);\n\n DB::beginWork('Creating new payment @ ' . __CLASS__);\n\n if($payment_gateway_id && $payment_gateway_id > 0) {\n $active_payment_gateway = PaymentGateways::findById($payment_gateway_id);\n if(!$active_payment_gateway instanceof PaymentGateway) {\n $this->response->notFound();\n }//if\n } else {\n throw new Error('Please select preferred payment option');\n }//if\n\n //if this method exists, please check is all necessery extension loaded\n if(method_exists($active_payment_gateway, 'checkEnvironment')) {\n $active_payment_gateway->checkEnvironment();\n }//if\n\n $active_payment = $active_payment_gateway->makePayment($payment_data, $this->active_invoice->getCurrency(), $this->active_invoice);\n\n if(!$active_payment->getIsError() && $active_payment instanceof Payment) {\n\n $active_payment->setIsPublic(true);\n $active_payment->setCreatedBy($payer);\n $active_payment->setParent($this->active_invoice);\n $active_payment->setAttributes($payment_data);\n $active_payment->setStatus(Payment::STATUS_PAID);\n $active_payment->setCurrencyId($this->active_invoice->getCurrency()->getId());\n\n //if we do express checkout\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $active_payment->setStatus(Payment::STATUS_PENDING);\n $active_payment->setReason(Payment::REASON_OTHER);\n $active_payment->setReasonText(lang('Waiting response from paypal express checkout'));\n } //if\n\n $active_payment->save();\n\n //TO-Do check this\n $this->active_invoice->payments()->changeStatus($payer, $active_payment, $payment_data);\n $this->active_invoice->activityLogs()->logPayment($payer);\n\n // Notify if not gagged\n if(!($active_payment instanceof PaypalExpressCheckoutPayment) && !$this->active_invoice->payments()->isGagged()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToFinancialManagers();\n }//if\n\n if($payer instanceof IUser && !$payer->isFinancialManager()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment_to_payer', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToUsers($payer);\n }//if\n\n $this->active_invoice->payments()->paymentMade($active_payment);\n\n DB::commit('Payment created @ ' . __CLASS__);\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $this->response->redirectToUrl($active_payment->getRedirectUrl());\n } //if\n } else {\n throw new Error($active_payment->getErrorMessage());\n } //if\n\n $this->response->assign(array(\n 'active_object'\t=> $this->active_invoice,\n ));\n } catch (Exception $e) {\n DB::rollback('Failed to make payment @ ' . __CLASS__);\n $this->response->assign('errors', $e);\n }//try\n } //if\n } else {\n $this->response->notFound();\n } // if\n }", "public function pay();", "protected function _paymentFromArray($arr)\n\t{\n\t\t$ReceivePayment = new QuickBooks_Object_ReceivePayment();\n\t\t\n\t\t$map = array(\n\t\t\t'CustomerID' => \t\t\tarray( 'setCustomerApplicationID', 'CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, 'setCustomerListID' ), \n\t\t\t'ARAccountID' => \t\t\tarray( 'setARAccountApplicationID', 'ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID, 'setARAccountListID' ), \n\t\t\t'ARAccountListID' => \t\tarray( 'setARAccountListID', 'ARAccountRef ListID' ), \n\t\t\t'ARAccountName' => \t\t\tarray( 'setARAccountName', 'ARAccountRef FullName' ), \n\t\t\t'DepositToAccountID' => \tarray( 'setDepositToAccountApplicationID', 'DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID, 'setDepositToAccountListID' ), \n\t\t\t'DepositToAccountListID' => array( 'setDepositToAccountListID', 'DepositToAccountRef ListID', ), \n\t\t\t'DepositToAccountName' => \tarray( 'setDepositToAccountName', 'DepositToAccountRef FullName' ), \n\t\t\t'PaymentMethodID' => \t\tarray( 'setPaymentMethodApplicationID', 'PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID, 'setPaymentMethodListID' ), \n\t\t\t'PaymentMethodListID' => \tarray( 'setPaymentMethodListID', 'PaymentMethodRef ListID' ), \n\t\t\t'PaymentMethodName' => \t\tarray( 'setPaymentMethodName', 'PaymentMethodRef FullName' ), \n\t\t\t'Memo' => \t\t\t\t\tarray( 'setMemo', 'Memo' ), \n\t\t\t'IsAutoApply' => \t\t\tarray( 'setIsAutoApply', 'IsAutoApply' ), \n\t\t\t'TxnDate' => \t\t\t\tarray( 'setTransactionDate', 'TxnDate' ), \n\t\t\t'RefNumber' => \t\t\t\tarray( 'setRefNumber', 'RefNumber' ), \n\t\t\t'TotalAmount' => \t\t\tarray( 'setTotalAmount', 'TotalAmount' ), \n\t\t\t);\n\t\t\n\t\t$ReceivePayment = $this->_applyBaseMap($arr, $map, $ReceivePayment, QUICKBOOKS_OBJECT_RECEIVEPAYMENT);\n\t\t\n\t\treturn $ReceivePayment;\n\t}", "protected function _getApi()\n {\n return Mage::getSingleton('payments/api');\n }", "public function getId()\n {\n return $this->savePayment();\n }" ]
[ "0.743964", "0.7359942", "0.72701216", "0.7057427", "0.69820875", "0.6887184", "0.67597795", "0.6679508", "0.66530794", "0.6619033", "0.65809214", "0.6579237", "0.6428244", "0.64203614", "0.6407989", "0.6407989", "0.6407989", "0.64060456", "0.63535506", "0.6353416", "0.6338861", "0.6319879", "0.6311854", "0.6300538", "0.62503916", "0.6236651", "0.6164106", "0.6112649", "0.60980606", "0.6097897", "0.60503054", "0.6033165", "0.6032575", "0.60028404", "0.59576416", "0.59511393", "0.59215033", "0.5919095", "0.59187657", "0.59133697", "0.5903777", "0.58990496", "0.58959585", "0.58827215", "0.58648115", "0.585695", "0.5856604", "0.5848212", "0.5794741", "0.57838666", "0.5765376", "0.57204974", "0.571576", "0.5695025", "0.569256", "0.56917983", "0.5687946", "0.5673526", "0.565753", "0.5657175", "0.56557244", "0.56536305", "0.56430644", "0.5641306", "0.5635756", "0.56333953", "0.5632636", "0.5623959", "0.5622733", "0.5620529", "0.56102455", "0.56102455", "0.55817413", "0.5571534", "0.5567849", "0.5560591", "0.55592257", "0.5559155", "0.5556541", "0.55533653", "0.5539757", "0.5528977", "0.5525607", "0.55160946", "0.5508262", "0.5504047", "0.55033624", "0.55007523", "0.54936725", "0.54923505", "0.5489502", "0.5484523", "0.54837847", "0.5480125", "0.54764766", "0.546653", "0.546289", "0.54627734", "0.54609", "0.545686", "0.54566497" ]
0.0
-1
Test bad gender value
public function testBadGender() { $gender1 = new GenderEntity(); $gender1->setGender('w'); $this->_em->persist($gender1); $this->_em->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isGenderUnknown() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they aren't\n if($USER['gender']==\"u\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function _normalize_gender($value)\r\n{\r\n\t// normalize gender\r\n\tif ( is_string($value) )\r\n\t{\r\n\t\t$gender = substr($value,0,1);\r\n\t\t$gender = strtoupper($value);\r\n\t}\r\n\t\r\n\t// validity check\r\n\tif ( !in_array($value, $this->VALID['GENDER']) )\r\n\t{\r\n\t\t$list = print_r($this->VALID['GENDER'],1);\r\n\t\ttrigger_error(\"invalid gender value -- must set to one of following: $list\", E_USER_WARNING);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\t// set gender number and abbreviation\r\n\tif ( is_numeric($value) )\r\n\t{\r\n\t\t$this->gender = $value;\r\n\t\tif ( $value == $this->m_val ) $this->gender_name = $this->m_abr;\r\n\t\telse $this->gender_name = $this->f_abr;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $value;\r\n\t\tif ( $value == $this->m_abr ) $this->gender = $this->m_val;\r\n\t\telse $this->gender = $this->f_val;\r\n\t}\r\n\t\r\n\treturn;\r\n}", "public function check_gender($gen){\n\t\tif($gen == '1'){\n\t\t\t$txt = 'Male';\n\t\t}else if($gen == '2'){\n\t\t\t$txt = 'Female';\n\t\t}\n\t\treturn $txt;\n }", "function isGirl() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return false; //If we don't know guess they aren't\n if($USER['gender']==\"f\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function sexFormat ($value){\n \n if(strlen($value) == 0){\n return true;\n }\n \n else if(!preg_match(VALID_SEX_FORMAT,$value)){\n return false;\n }\n \n return true;\n}", "public function it_has_correct_allowed_values_for_gender(): void\n {\n $allowed = [\n 'male','female','diverse',\n ];\n\n $sut = new Address();\n $this->assertMethodExists($sut, 'getGenderAllowableValues');\n $this->assertEquals($allowed, $sut->getGenderAllowableValues());\n }", "function vSex ( $sex ) \r\n\t\t{\r\n\t\t\t# Strip string down to first character\r\n\t\t\t$sex = strtolower( substr( $sex, 0, 1) );\r\n\t\t\t\r\n\t\t\t# Checks if result is 'f' or 'm'\r\n\t\t\tif ( $sex != \"f\" OR $sex != \"m\" )\r\n\t\t\t\t$sex = true;\r\n\t\t\t\t\r\n\t\t\telse \r\n\t\t\t\t$sex = false;\r\n\t\t\t\r\n\t\t\treturn $sex;\r\n\t\t\t\r\n\t\t}", "private function setGenderValue()\n {\n $value = $this->getData(self::$genderAttributeCode);\n \n if (!$value) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n return;\n }\n\n try {\n $attributeMetadata = $this->customerMetadata->getAttributeMetadata(self::$genderAttributeCode);\n $option = $attributeMetadata->getOptions()[$value];\n $this->setCustomAttribute(self::$genderAttributeCode, $option->getLabel());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n }\n }", "private function getGender(){\n $gender_array= array(\"male\",\"female\");\n return $gender_array[rand(0,1)];\n }", "protected function format_gender( $p_value ) {\n\t\t$value = strtoupper(substr(str_replace(' ','',trim($p_value)),0,1));\n\n\t\t// if not M or F, return empty\n\t\tif ( $value != 'M' && $value != 'F' ) {\n\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" Invalid gender '\" . $p_value . \"'\",null);\n\t\t}\n\n\t\treturn $this->return_handler->results(200,\"\",$value);\n\t}", "function set_gender($gender='*')\r\n{\r\n\t$this->gender = 0;\t\t// return\r\n\r\n\t// normalize gender\r\n\tif ( is_string($gender) )\r\n\t{\r\n\t\t$gender = substr($gender,0,1);\r\n\t\t$gender = strtoupper($gender);\r\n\t}\r\n\r\n\t// validity check\r\n\tif ( $gender != '*' && !in_array($gender, $this->VALID['GENDER']) )\r\n\t{\r\n\t\ttrigger_error('invalid value -- gender will be picked at random', E_USER_NOTICE);\r\n\t\t$gender = '*';\r\n\t}\r\n\t\r\n\t// random gender\r\n\tif ( $gender == '*' )\r\n\t{\r\n\t\t$this->gender = mt_rand(1,2);\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telseif ( is_numeric($gender) )\r\n\t{\r\n\t\t$this->gender = $gender;\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $gender;\r\n\t\t$this->_normalize_gender($this->gender_name);\r\n\t}\r\n\r\n\treturn $this->gender;\r\n}", "public function updateGender($something=null) {\n if($something == 'male' || $something == 'female') {\n $this->gender = $something;\n $this->gender_probability = 1;\n\n return true;\n }\n\n // for facebook GraphNodes\n if(method_exists($something, 'getField')) {\n $gender = $something->getField('gender');\n if($gender) {\n $this->gender = $gender;\n $this->gender_probability = 1;\n\n return true;\n }\n }\n\n // try to find by first_name but only for weak matches\n if($this->first_name && $this->gender_probability < 0.9) {\n $client = new Client();\n\n $res = $client->request('GET', 'https://api.genderize.io/', [\n 'query' => ['name' => $this->first_name, 'country_id' => 'pl'],\n ]);\n\n if($res->getStatusCode() == 200) {\n $json = json_decode($res->getBody());\n\n if($json->gender && $json->probability > $this->gender_probability) {\n $this->gender = $json->gender;\n $this->gender_probability = $json->probability;\n\n return true;\n }\n }\n\n // wild guess - only if there was no other option\n if($this->gender_probability == 0) {\n if(ends_with($this->first_name, 'a')) {\n $this->gender = 'female';\n $this->gender_probability = 0.01;\n } else {\n $this->gender = 'male';\n $this->gender_probability = 0.01;\n }\n\n return true;\n }\n }\n\n return false;\n }", "function isBoy() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they are\n if($USER['gender']==\"m\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function testSetAndGetGender()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Gender\r\n $testObj->setGender('Male');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that Gender field was updated\r\n $this->assertEquals('Male', $testObj->getGender());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'Gender');\r\n }", "public function getGender(){ // fungsi get untuk mengambil nilai dari gender\n printNumC();//\n return $this->gender;\n }", "function getGender($userid) {\n return NULL;\n }", "function getGender($user, $gender) {\n\t$result = dbQuery(\"SELECT * FROM users WHERE username = '$user'\");\n\t$row = mysql_fetch_array($result);\n\n\t if( $row['gender'] == $gender ) \n\t {\n\t\t return true;\n\t\t } \n\t\t else\n\t\t {\n\t\t \t return false;\n\t\t }\n}", "public static function is_valid($gender = null)\n {\n if (is_null($gender)) {\n throw new \\InvalidArgumentException('Please enter a valid gender.');\n }\n\n if (empty($gender) || strlen((string)$gender) > 1) {\n return false;\n }\n\n if (is_numeric($gender)) {\n return false;\n }\n\n return in_array($gender, ['f', 'm']);\n }", "public function hasGender() {\n return $this->_has(1);\n }", "public function isGenderNotEmpty()\n {\n $customerGender = $this->getCustomerGender();\n\n if (!empty($customerGender)) {\n return true;\n }\n return false;\n }", "function validateGender($id){\n global $isValidSSWelcome;\n if (in_array($id, array(1,2,3,4))){\n return;\n }\n else{\n echo \"<p>Please select a Gender</p>\";\n $isValidSSWelcome = false;\n\n }\n}", "public function getGender()\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $nr = (int)($J . $K . $L);\n\n return ($nr < 500) ? self::GENDER_MALE : self::GENDER_FEMALE;\n }", "public function getWholeGender()\n\t{\n\t\tif($this->gender == \"m\"){\n\t\t\treturn \"muž\";\n\t\t}elseif($this->gender == \"f\"){\n\t\t\treturn \"žena\";\n\t\t}\n\t\treturn;\n\t}", "public function getGender($name)\n {\n $arrayName = explode(\" \", $name);\n $data = json_decode(file_get_contents('https://gender-api.com/get?key=' . $this->tokenGender . '&name=' . urlencode($arrayName[0])));\n return ($data->gender) ? (($data->gender == 'male') ? 1 : 0) : 0;\n }", "public function testGetGenderOptions()\n {\n $options = [\n ['label' => __('Male'), 'value' => 'M'],\n ['label' => __('Female'), 'value' => 'F'],\n ['label' => __('Not Specified'), 'value' => 'NA']\n ];\n\n $this->attribute->expects($this->once())->method('getOptions')->will($this->returnValue($options));\n $this->assertSame($options, $this->block->getGenderOptions());\n }", "public static function getRandomGender()\n {\n $genders = self::getGenders();\n return (integer)$genders[array_rand($genders)];\n }", "public function getGender(){\n $name = '';\n if ($this->gender =='N') {\n $name = 'Preferred not to tell';\n }elseif ($this->gender =='M') {\n $name = 'Male';\n }else{\n $name = 'Female';\n }\n return $name;\n }", "public function testValidateForenemes_ReturnsValid_GivenRegnalNumberRequiredFalse()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'valid',\n $person->validateForenemes(\"George VI\", false)\n );\n }", "public function getGenderName(): string\n {\n return match ($this->gender) {\n 1 => 'Laki-laki',\n 2 => 'Perempuan'\n };\n }", "function setGender( $gender )\n {\n\t if (is_int($gender)) {\n\t\t \n\t\t switch ( $gender ) {\n\t\t\t \n\t\t\t case RowManager_PersonManager::GENDER_MALE:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_MALE );\n\t\t\t \tbreak;\n\t\t\t \t\n\t\t\t case RowManager_PersonManager::GENDER_FEMALE:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_FEMALE );\n\t\t\t \tbreak;\n\t\t\t default:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_UNKNOWN );\n\t\t }\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$gender = mb_convert_case($gender, MB_CASE_UPPER);\n\t \tswitch( $gender ) {\n\t\t \n\t\t \tcase 'M':\n\t\t \tcase 'MALE':\n \t\t\t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_MALE );\n \t\t\tbreak;\n \t\tcase 'F':\n \t\tcase 'FEMALE':\n \t\t\t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_FEMALE );\n \t\t\tbreak; \n\t\t \tdefault:\n\t\t\t \t$this->setValueByFieldName( 'gender_id', RowManager_PersonManager::GENDER_UNKNOWN ); \t\t\t \t\t\n \t\t}\n \t\t}\n \t\t\n return;\n }", "public function getCustomerGender();", "protected function createGender($value) {\r\n switch ($value) {\r\n case \"m\":\r\n return Person::TYPE_GENDER_MALE;\r\n break;\r\n case \"f\":\r\n return Person::TYPE_GENDER_FEMALE;\r\n break;\r\n case \"c\":\r\n return Person::TYPE_GENDER_UNDEFINED;\r\n break;\r\n default:\r\n return null;\r\n break;\r\n }\r\n }", "public function useGender($flag = false) {\n $this->use_gender = ($flag !== false);\n }", "static function cat_gender()\n {\n global $post;\n\n // Nonce field to validate form request came from current site\n wp_nonce_field(basename(__FILE__), 'cat_fields');\n\n // Get the gender data if it's already been entered\n $gender = get_post_meta($post->ID, 'gender', true);\n\n // Output the field\n echo sprintf('<input type=\"radio\" id=\"male\" name=\"gender\" %s value=\"male\">\n <label for=\"male\">Male</label><br>\n <input type=\"radio\" id=\"female\" name=\"gender\" %s value=\"female\">\n <label for=\"female\">Female</label><br><br>', $gender == 'male' ? 'checked' : '', $gender == 'female' ? 'checked' : '');\n }", "function getGender($user, $name, $description) {\r\n\t$api = 'http://textalytics.com/core/userdemographics-1.0';\r\n\t$key = '0e70ff2a84eab3fda9019ab2202cd91e';\r\n\t\r\n\t// We make the request and parse the response to an array\r\n\t$response = sendPost($api, $key, $user, $name, $description);\r\n\t$json = json_decode($response, true);\r\n\r\n\t$gd = '';\r\n\tif(isset($json['gender'])) {\r\n\t if($json['gender'] == 'M')\r\n\t\t$gd = 'MALE';\r\n\t else if($json['gender'] == 'F')\r\n\t\t$gd = 'FEMALE';\r\n\t}\r\n\t\r\n\treturn $gd;\r\n\r\n}", "public function getsex()\n {\n return $this->sex;\n }", "function getGenders() {\n\treturn array('m' => 'Male', 'f' => 'Female', 'n/a' => 'Other');\n}", "function getFieldGender(){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_sex');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_sex');\n\t\t$tooltip = setToolTipNotification(\"gender\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('gender') === 'gender' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input class='gender' type='radio' name='sex' value='M' data-value='Male' checked>&nbsp;&nbsp;Male</br><input class='gender' type='radio' name='sex' data-value='Female' value='F'>&nbsp;&nbsp;Female<br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function validAge($age)\r\n {\r\n\r\n return !empty($age) && ctype_digit($age);\r\n }", "function getGender($firstname) {\n $url=\"https://addressok.blue-l.de/ajax/jsonCheckName.php?name=\".$firstname;\n try {\n $ret = maierlabs\\lpfw\\htmlParser::loadUrl($url);\n $ret = json_decode($ret);\n } catch (Exception $e) {\n Logger::_(\"Get gender for $firstname \".$e->getMessage(), LoggerLevel::error);\n }\n\n if (isset($ret->countAll) && $ret->countAll>0) {\n $genderM=0;\n $genderF=0;\n $genderN=0;\n foreach ($ret as $r) {\n if (is_object($r)) {\n if ($r->gender=='m') $genderM++;\n if ($r->gender=='n') $genderN++;\n if ($r->gender=='f') $genderF++;\n }\n }\n } else {\n return \"\";\n }\n\n if ($genderM==0 && $genderF==0)\n return \"\";\n\n return $genderM>$genderF?'m':'f';\n}", "public function hasSex(){\r\n return $this->_has(6);\r\n }", "function validate_players ($gender)\n{\n // Build the indicies into the $_POST array appropriate for the specified\n // gender\n\n $min = 'MinPlayers' . $gender;\n $pref = 'PrefPlayers' . $gender;\n $max = 'MaxPlayers' . $gender;\n\n // Validate the individual numbers\n\n if (! (validate_int ($min, 0, 100, \"Min $gender Players\") &&\n\t validate_int ($max, 0, 100, \"Max $gender Players\") &&\n\t validate_int ($pref, 0, 100, \"Preferred $gender Players\")))\n return false;\n\n // If the user didn't fill in the preferred number, default it to the\n // maximum\n\n if (0 == $_POST[$pref])\n $_POST[$pref] = $_POST[$max];\n\n if ((int)$_POST[$min] > (int)$_POST[$pref])\n return display_error (\"Min $gender Players must be less than or equal to Preferred $gender Players\");\n\n if ((int)$_POST[$pref] > (int)$_POST[$max])\n return display_error (\"Preferred $gender Players must be less than or equal to Max $gender Players\");\n\n return true;\n}", "public function setGender($value)\n {\n return $this->setParameter('gender', $value);\n }", "public function getGenderAttribute($value)\n {\n return $value === 'L' ? 'Laki-laki' : 'Perempuan';\n }", "function female() \n { \n $this->sex_id=\"F\";\n $this->sex_name=\"Female\";\n return($this->sex_id);\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}", "public function getGender()\n {\n return $this->getParameter('gender');\n }", "public function getGenderAttribute($val) {\n return $val == 1 ? \"male\" : \"female\";\n }", "public function hasSex(){\n return $this->_has(2);\n }", "public function hasSex(){\n return $this->_has(2);\n }", "public function testInvalidFurCondition(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => 'White Dresser',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '5',\n\t\t\t\t'fur_condition' => ''\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "protected function _buddy_gender_guess() {\n return 'LOOKUP';\n}", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function Semprop_gender($gender){\n\t\t$query = \"SELECT COUNT(mahasiswa_metopen.nim) AS jum_lulus, seminar_proposal.status AS stt\n\t\t\t\t FROM mahasiswa_metopen JOIN seminar_proposal ON mahasiswa_metopen.nim = seminar_proposal.nim \n\t\t\t\t WHERE seminar_proposal.status = 'lulus' AND mahasiswa_metopen.jenis_kelamin = '$gender' GROUP BY seminar_proposal.status\"; // query untuk menampilkan jumlah mahasiswa yang lulus ujian semprop bedasarkan inputan jenis kelamin\n\t\t$this->eksekusi($query); //mengeksekusi query diatas\n\t\treturn $this->result; //untuk hasil query diatas\n\t}", "function getGender() {\n return $this->gender;\n }", "public function get_no_gender($gender,$usertype){\r\n $sch_id = $_SESSION['sch_id'];\r\n $this->db->select(\"*\");\r\n $this->db->from('acadah_users');\r\n $this->db->where('sch_id',$sch_id);\r\n $this->db->where('user_type',$usertype);\r\n $this->db->where('gender',$gender);\r\n $query = $this->db->get();\r\n return $query->num_rows();\r\n }", "protected function getGender() {\n\t\treturn array(\n\t\t\t'1' => TranslateUtility::assureLabel('application.gender.w', 'Profession'),\n\t\t\t'2' => TranslateUtility::assureLabel('application.gender.m', 'Profession')\n\t\t);\n\t}", "public function hasSex(){\n return $this->_has(3);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['number'] === null) {\n $invalidProperties[] = \"'number' can't be null\";\n }\n $allowedValues = $this->getGenderAllowableValues();\n if (!is_null($this->container['gender']) && !in_array($this->container['gender'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'gender', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function getGender() {\n\t\treturn $this->gender;\n\t}", "public function getGender() {\n return $this->gender;\n }", "public function getGenderCode()\n {\n return $this->genderCode;\n }", "public function testTitleFemale0()\n{\n\n $actual = $this->person->titleFemale();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function get_gender(){\n $query = $this->db->get('gender_14');\n if($query){\n return $query->result_array();\n }\n else{\n return false;\n }\n }", "function birthdate_error($date_of_birth) //day-month-year\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif (!$day || !$month || !$year || $day < 1 || $day > 31 || $month < 1 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()))\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif (checkdate($month, $day, $year) === false)\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif ($this->get_age($date_of_birth) < $config['minimum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_YOUNG';\n\t\t\t}\n\t\t\tif (!empty($config['maximum_age']) && $this->get_age($date_of_birth) > $config['maximum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_OLD';\n\t\t\t}\n\t\t\treturn(false);\n\t\t}", "public function testInvalidFurName(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '5',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function testFieldIsRequiredAndHasDefault()\n {\n $tableName = 'ramp_enumTesting';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'gender';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isRequired());\n $this->assertFalse($field->isPrimaryKey());\n $this->assertFalse($field->isAutoIncremented());\n $this->assertSame('Unknown', $field->getDefault());\n // User does not have to provide this value; default will serve.\n $this->assertFalse($field->valueNecessaryForAdd());\n }", "public function setGender($gender_name){\n $this->gender = $gender_name;\n }", "public function testTitleMale0()\n{\n\n $actual = $this->person->titleMale();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function validAge($age) {\r\n return is_numeric($age) && $age >= 18 && $age <= 118;\r\n}", "public function getGender(): Gender\n {\n return $this->gender;\n }", "public function testValidateForenemes_ReturnsValid_GivenRegnalNumberRequiredTrue()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'valid',\n $person->validateForenemes(\"George VI\", true)\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 }", "public function getGenderTextAttribute()\n {\n return static::genderTextMap[$this->gender];\n }", "public function getGender() {\n\t\treturn $this->_gender;\n\t}", "function compare($age, $gender){\n if($gender == 'Homme' && $age >= 18){\n //on stock nos message dans une variable $message car un seul return pour toute une fonction.\n $message = 'Vous êtes un homme et vous êtes majeur.';\n }elseif($gender == 'Homme' && $age < 18){\n $message = 'Vous êtes un homme et vous êtes mineur.';\n }elseif($gender == 'Femme' && $age >= 18){\n $message = 'Vous êtes une femme et vous êtes majeure.';\n }else{\n $message = 'Vous êtes une femme et vous êtes mineure.';\n }\n return $message;\n //on nous retourne le $message correspondant.\n}", "function _isValidpercentage()\r\n {\r\n if ($this->data[$this->name]['charity_percentage'] != 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function testValidateForenemes_ReturnsValid_GivenWilliamHenryRequiredFalse()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'valid',\n $person->validateForenemes(\"William Henry\", false)\n );\n }", "public function testInvalidFurTwo(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => 'White Dresser',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '2',\n\t\t\t\t'fur_condition' => ''\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function getGenderString()\n\t{\n\t\tswitch ($this->getGender()) {\n\t\t\tcase self::G_MALE:\n\t\t\t\treturn 'Male';\n\t\t\tcase self::G_FEMALE:\n\t\t\t\treturn 'Female';\n\t\t\tcase self::G_OTHER:\n\t\t\t\treturn 'Other';\n\t\t\tdefault:\n\t\t\t\treturn 'Other';\n\t\t}\n\t}", "public function getShowGender()\n\t{\n\t\treturn $this->show_gender;\n\t}", "function is_invalid($err)\n{\n // TODO: megírni. Csak akkor printelje ki a hiba-class-t ha tényleg hibás a mező\n if (!$err == null)\n echo $err . ' is-invalid';\n}", "public function setGenderAttribute($gender)\n {\n $this->attributes['gender'] = empty($gender) ? 'M' : strtoupper($gender);\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n }", "function calcBMR($sex, $weight, $height, $age)\r\n{\r\n if ($sex == 'M' || $sex == 'm' || $sex == 'MALE' || $sex == 'male')\r\n {\r\n echo \"<div style=\\\"text-align:center\\\">\";\r\n\r\n $BMR = 66.4720 + (13.7516 * $weight) + (5.0033 * $height) - (6.7550 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else if ($sex == 'F' || $sex == 'f' || $sex == 'FEMALE' || $sex == 'female')\r\n {\r\n $BMR = 655.0955 + (9.5634 * $weight) + (1.8496 * $height) - (4.6756 * $age);\r\n echo \"<br> Your BMR = \";\r\n echo number_format($BMR, 1);\r\n \r\n }\r\n\r\n else\r\n {\r\n echo \"<br> Error in value entered. Results will be incorrect. Please take the test again. Thanks!\";\r\n $BMR = 0; \r\n \r\n }\r\n\r\n return $BMR;\r\n\r\n}", "public function testInvalidFurniture(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => '',\n\t\t\t\t'price' => '',\n\t\t\t\t'categoryId' => '',\n\t\t\t\t'fur_condition' => ''\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function testEnumDataType()\n {\n $tableName = 'ramp_enumTesting';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'gender';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertTrue($field->isEnum());\n $this->assertSame(\"enum('Unknown','M','F')\", $field->getDataType());\n $this->assertSame(array('Unknown','M','F'),\n array_keys($field->getEnumValues()));\n $this->assertSame('Unknown', $field->getDefault());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "public function testIfWrongValueThrows() : void\n {\n\n $this->expectException(FieldValueInproperException::class);\n\n // Create Field.\n $field = new EnumField('test_name');\n $field->setModel(( new Model() )->setName('test'));\n $field->setValues('one', 'two', 'three');\n\n // Test.\n $this->assertFalse($field->isValueValid('four'));\n }", "public function validate($data)\n {\n // TODO create enum for gender\n\n $email_validator = new EmailValidator('errors.email.invalid');\n $fname_validator = new MinLengthValidator('errors.fname.minLength', 3);\n $lname_validator = new MinLengthValidator('errors.lname.minLength', 3);\n $gender_validator = new MinLengthValidator('errors.gender.minLength', 4);\n $birthdate_validator = new MinLengthValidator('errors.birthdate.minLength', 10);\n $errors = [];\n $email_validator->isValid($data['email']) ? true : array_push($errors, $email_validator->getMessage());\n\n $fname_validator->isValid($data['first_name']) ? true : array_push($errors, $fname_validator->getMessage());\n\n $lname_validator->isValid($data['last_name']) ? true : array_push($errors, $lname_validator->getMessage());\n\n $gender_validator->isValid($data['gender']) ? true : array_push($errors, $gender_validator->getMessage());\n\n $birthdate_validator->isValid($data['birth_date']) ? true : array_push($errors, $birthdate_validator->getMessage());\n\n return $errors;\n }", "public function testBadgeAttentionRequiredFilter(): void\n {\n $actual = true;\n $expected = '<span class=\"badge badge-danger\">trans.payment.attention-required</span>';\n self::assertSame($expected, $this->extension->badgeAttentionRequiredFilter($actual));\n\n $actual = false;\n $expected = '';\n self::assertSame($expected, $this->extension->badgeAttentionRequiredFilter($actual));\n }", "function __cek_gender() {\r\n $user_id = func_arg(0);\r\n $gender = \"male\";\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Users');\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data = $lilo_mongo->findOne(array('user_id' => $user_id));\r\n if ($data) {\r\n $conf_ = json_decode(str_replace(\"'\", '\"', $data['configuration']));\r\n if (is_array($conf_)) {\r\n foreach ($conf_ as $dt) {\r\n if ($dt->tipe == 'gender') {\r\n return str_replace(\"_base\", \"\", $dt->element);\r\n }\r\n }\r\n }\r\n } else {\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data2 = $lilo_mongo->findOne(array('lilo_id' => $user_id));\r\n if (!isset($data2['sex'])) {\r\n $gender = \"male\";\r\n } else {\r\n $gender = $data2['sex'];\r\n }\r\n }\r\n return $gender;\r\n}", "function sSex ( $sex ) \r\n\t\t{\r\n\t\t\treturn strtolower(substr($sex, 0, 1));\r\n\t\t\t\r\n\t\t}", "public function testInvalidFurFour(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '',\n\t\t\t\t'categoryId' => '',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function isFemale($word){\n\t\t$length = i18n::strlen($word);\n\t\tforeach($this->_locale->getWordRules('female') as $wordEnd){\n\t\t\tif(i18n::substr($word, $length-i18n::strlen($wordEnd))===$wordEnd){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function getGenderAllowableValues()\n {\n return [\n self::GENDER_MALE,\n self::GENDER_FEMALE,\n self::GENDER_UNKNOWN,\n ];\n }" ]
[ "0.73266035", "0.69541395", "0.6916479", "0.68498904", "0.67447263", "0.66706026", "0.6614684", "0.65241253", "0.6401441", "0.638639", "0.6293059", "0.62637305", "0.619047", "0.6151729", "0.6070673", "0.60691273", "0.6065757", "0.602593", "0.5984099", "0.59706736", "0.59175545", "0.59172976", "0.5893082", "0.58717424", "0.58625007", "0.58549666", "0.58495444", "0.57897663", "0.5784059", "0.57736313", "0.5771727", "0.5741125", "0.57127386", "0.5712672", "0.5671108", "0.565962", "0.5646679", "0.56444556", "0.56399053", "0.563436", "0.5631795", "0.56010884", "0.55970925", "0.55892867", "0.5576558", "0.5575904", "0.5575904", "0.5575904", "0.5575904", "0.5573377", "0.5568319", "0.5549438", "0.5540812", "0.5540812", "0.5540535", "0.5517388", "0.5510075", "0.5510075", "0.54934067", "0.5490053", "0.5489943", "0.54851234", "0.548432", "0.546628", "0.54340947", "0.543324", "0.5433215", "0.54284596", "0.5422703", "0.5414224", "0.54037", "0.5385166", "0.53688204", "0.53653175", "0.53633857", "0.5357608", "0.53503036", "0.5349922", "0.5348555", "0.5345972", "0.53266704", "0.5326225", "0.5325024", "0.5288345", "0.52702576", "0.52372617", "0.52338064", "0.52322733", "0.52295345", "0.5223011", "0.52073693", "0.5204253", "0.52022296", "0.5197808", "0.51932955", "0.5173656", "0.5167242", "0.5159214", "0.51571167", "0.5154721" ]
0.6907328
3
TODO: Implement calculateCurrency() method.
function calculateCurrency($prijs, $country) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrency();", "public function getCurrency();", "public function getSourceCurrency();", "public function getCurrency(): Currency;", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getTargetCurrency();", "public function getCurrency(){\n return $this->currency;\n }", "public function getCurrency(): string;", "public function getCurrency(): string;", "public function getCurrency()\r\n\t{\r\n\t\treturn $this->getTransaction()->getCurrency();\r\n\t}", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "public function getOrderCurrencyCode();", "public function getBaseCurrencyCode();", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "function getExchangeRate($currency);", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }", "public function currencyPrice()\n {\n \t$this->currencyPrice = CurrencyPrice::getCurrencyPrices($this->sellPrices->CurrencyNo)->BuyPrice;\n \treturn $this->currencyPrice > 0 ? $this->currencyPrice : 1 ;\n }", "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "public function getStoreCurrencyCode();", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "public function getCurrencies();", "function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "public function toCurrency()\n {\n return $this->amount * config('foria.tokens.value');\n }", "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrentCurrencyRate() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyRate();\r\n\t}", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getGlobalCurrencyCode();", "protected function get_currency() {\n\t\treturn $this->currency;\n\t}", "function formatcurrency($floatcurr, $curr = \"USD\")\n{\n $currencies['ARS'] = array(2,',','.'); // Argentine Peso\n $currencies['AMD'] = array(2,'.',','); // Armenian Dram\n $currencies['AWG'] = array(2,'.',','); // Aruban Guilder\n $currencies['AUD'] = array(2,'.',' '); // Australian Dollar\n $currencies['BSD'] = array(2,'.',','); // Bahamian Dollar\n $currencies['BHD'] = array(3,'.',','); // Bahraini Dinar\n $currencies['BDT'] = array(2,'.',','); // Bangladesh, Taka\n $currencies['BZD'] = array(2,'.',','); // Belize Dollar\n $currencies['BMD'] = array(2,'.',','); // Bermudian Dollar\n $currencies['BOB'] = array(2,'.',','); // Bolivia, Boliviano\n $currencies['BAM'] = array(2,'.',','); // Bosnia and Herzegovina, Convertible Marks\n $currencies['BWP'] = array(2,'.',','); // Botswana, Pula\n $currencies['BRL'] = array(2,',','.'); // Brazilian Real\n $currencies['BND'] = array(2,'.',','); // Brunei Dollar\n $currencies['CAD'] = array(2,'.',','); // Canadian Dollar\n $currencies['KYD'] = array(2,'.',','); // Cayman Islands Dollar\n $currencies['CLP'] = array(0,'','.'); // Chilean Peso\n $currencies['CNY'] = array(2,'.',','); // China Yuan Renminbi\n $currencies['COP'] = array(2,',','.'); // Colombian Peso\n $currencies['CRC'] = array(2,',','.'); // Costa Rican Colon\n $currencies['HRK'] = array(2,',','.'); // Croatian Kuna\n $currencies['CUC'] = array(2,'.',','); // Cuban Convertible Peso\n $currencies['CUP'] = array(2,'.',','); // Cuban Peso\n $currencies['CYP'] = array(2,'.',','); // Cyprus Pound\n $currencies['CZK'] = array(2,'.',','); // Czech Koruna\n $currencies['DKK'] = array(2,',','.'); // Danish Krone\n $currencies['DOP'] = array(2,'.',','); // Dominican Peso\n $currencies['XCD'] = array(2,'.',','); // East Caribbean Dollar\n $currencies['EGP'] = array(2,'.',','); // Egyptian Pound\n $currencies['SVC'] = array(2,'.',','); // El Salvador Colon\n $currencies['ATS'] = array(2,',','.'); // Euro\n $currencies['BEF'] = array(2,',','.'); // Euro\n $currencies['DEM'] = array(2,',','.'); // Euro\n $currencies['EEK'] = array(2,',','.'); // Euro\n $currencies['ESP'] = array(2,',','.'); // Euro\n $currencies['EUR'] = array(2,',','.'); // Euro\n $currencies['FIM'] = array(2,',','.'); // Euro\n $currencies['FRF'] = array(2,',','.'); // Euro\n $currencies['GRD'] = array(2,',','.'); // Euro\n $currencies['IEP'] = array(2,',','.'); // Euro\n $currencies['ITL'] = array(2,',','.'); // Euro\n $currencies['LUF'] = array(2,',','.'); // Euro\n $currencies['NLG'] = array(2,',','.'); // Euro\n $currencies['PTE'] = array(2,',','.'); // Euro\n $currencies['GHC'] = array(2,'.',','); // Ghana, Cedi\n $currencies['GIP'] = array(2,'.',','); // Gibraltar Pound\n $currencies['GTQ'] = array(2,'.',','); // Guatemala, Quetzal\n $currencies['HNL'] = array(2,'.',','); // Honduras, Lempira\n $currencies['HKD'] = array(2,'.',','); // Hong Kong Dollar\n $currencies['HUF'] = array(0,'','.'); // Hungary, Forint\n $currencies['ISK'] = array(0,'','.'); // Iceland Krona\n $currencies['INR'] = array(2,'.',','); // Indian Rupee\n $currencies['IDR'] = array(2,',','.'); // Indonesia, Rupiah\n $currencies['IRR'] = array(2,'.',','); // Iranian Rial\n $currencies['JMD'] = array(2,'.',','); // Jamaican Dollar\n $currencies['JPY'] = array(0,'',','); // Japan, Yen\n $currencies['JOD'] = array(3,'.',','); // Jordanian Dinar\n $currencies['KES'] = array(2,'.',','); // Kenyan Shilling\n $currencies['KWD'] = array(3,'.',','); // Kuwaiti Dinar\n $currencies['LVL'] = array(2,'.',','); // Latvian Lats\n $currencies['LBP'] = array(0,'',' '); // Lebanese Pound\n $currencies['LTL'] = array(2,',',' '); // Lithuanian Litas\n $currencies['MKD'] = array(2,'.',','); // Macedonia, Denar\n $currencies['MYR'] = array(2,'.',','); // Malaysian Ringgit\n $currencies['MTL'] = array(2,'.',','); // Maltese Lira\n $currencies['MUR'] = array(0,'',','); // Mauritius Rupee\n $currencies['MXN'] = array(2,'.',','); // Mexican Peso\n $currencies['MZM'] = array(2,',','.'); // Mozambique Metical\n $currencies['NPR'] = array(2,'.',','); // Nepalese Rupee\n $currencies['ANG'] = array(2,'.',','); // Netherlands Antillian Guilder\n $currencies['ILS'] = array(2,'.',','); // New Israeli Shekel\n $currencies['TRY'] = array(2,'.',','); // New Turkish Lira\n $currencies['NZD'] = array(2,'.',','); // New Zealand Dollar\n $currencies['NOK'] = array(2,',','.'); // Norwegian Krone\n $currencies['PKR'] = array(2,'.',','); // Pakistan Rupee\n $currencies['PEN'] = array(2,'.',','); // Peru, Nuevo Sol\n $currencies['UYU'] = array(2,',','.'); // Peso Uruguayo\n $currencies['PHP'] = array(2,'.',','); // Philippine Peso\n $currencies['PLN'] = array(2,'.',' '); // Poland, Zloty\n $currencies['GBP'] = array(2,'.',','); // Pound Sterling\n $currencies['OMR'] = array(3,'.',','); // Rial Omani\n $currencies['RON'] = array(2,',','.'); // Romania, New Leu\n $currencies['ROL'] = array(2,',','.'); // Romania, Old Leu\n $currencies['RUB'] = array(2,',','.'); // Russian Ruble\n $currencies['SAR'] = array(2,'.',','); // Saudi Riyal\n $currencies['SGD'] = array(2,'.',','); // Singapore Dollar\n $currencies['SKK'] = array(2,',',' '); // Slovak Koruna\n $currencies['SIT'] = array(2,',','.'); // Slovenia, Tolar\n $currencies['ZAR'] = array(2,'.',' '); // South Africa, Rand\n $currencies['KRW'] = array(0,'',','); // South Korea, Won\n $currencies['SZL'] = array(2,'.',', '); // Swaziland, Lilangeni\n $currencies['SEK'] = array(2,',','.'); // Swedish Krona\n $currencies['CHF'] = array(2,'.','\\''); // Swiss Franc \n $currencies['TZS'] = array(2,'.',','); // Tanzanian Shilling\n $currencies['THB'] = array(2,'.',','); // Thailand, Baht\n $currencies['TOP'] = array(2,'.',','); // Tonga, Paanga\n $currencies['AED'] = array(2,'.',','); // UAE Dirham\n $currencies['UAH'] = array(2,',',' '); // Ukraine, Hryvnia\n $currencies['USD'] = array(2,'.',','); // US Dollar\n $currencies['VUV'] = array(0,'',','); // Vanuatu, Vatu\n $currencies['VEF'] = array(2,',','.'); // Venezuela Bolivares Fuertes\n $currencies['VEB'] = array(2,',','.'); // Venezuela, Bolivar\n $currencies['VND'] = array(0,'','.'); // Viet Nam, Dong\n $currencies['ZWD'] = array(2,'.',' '); // Zimbabwe Dollar\n\n function formatinr($input){\n //CUSTOM FUNCTION TO GENERATE ##,##,###.##\n $dec = \"\";\n $pos = strpos($input, \".\");\n if ($pos === false){\n //no decimals \n } else {\n //decimals\n $dec = substr(round(substr($input,$pos),2),1);\n $input = substr($input,0,$pos);\n }\n $num = substr($input,-3); //get the last 3 digits\n $input = substr($input,0, -3); //omit the last 3 digits already stored in $num\n while(strlen($input) > 0) //loop the process - further get digits 2 by 2\n {\n $num = substr($input,-2).\",\".$num;\n $input = substr($input,0,-2);\n }\n return $num . $dec;\n }\n\n\n if ($curr == \"INR\"){ \n return formatinr($floatcurr);\n } else {\n return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);\n }\n \n\n}", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrentBaseCurrency() {\n $currencysymbol = $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' );\n\n return $currencysymbol->getStore ()->getCurrentCurrencyCode ();\n }", "public function getCurrencyPrice()\n {\n return isset($this->currencyPrice) ? $this->currencyPrice : null;\n }", "public function getToCurrency()\n {\n return $this->toCurrency;\n }", "public function calculateCurrencyAction()\n {\n $data = $this->Request()->getParams();\n $positions = json_decode($data['positions']);\n\n if ($data['oldCurrencyId'] < 1) {\n return;\n }\n\n /** @var Shopware\\Models\\Shop\\Currency $oldCurrencyModel */\n $oldCurrencyModel = Shopware()->Models()->find('Shopware\\Models\\Shop\\Currency', $data['oldCurrencyId']);\n\n /** @var Shopware\\Models\\Shop\\Currency $newCurrencyModel */\n $newCurrencyModel = Shopware()->Models()->find('Shopware\\Models\\Shop\\Currency', $data['newCurrencyId']);\n\n foreach ($positions as &$position) {\n $position->price = $position->price / $oldCurrencyModel->getFactor();\n $position->price = $position->price * $newCurrencyModel->getFactor();\n\n $position->total = $position->price * $position->quantity;\n\n $position->price = $this->roundPrice($position->price);\n $position->total = $this->roundPrice($position->total);\n }\n\n $data['shippingCosts'] = $data['shippingCosts'] / $oldCurrencyModel->getFactor();\n $data['shippingCosts'] = $data['shippingCosts'] * $newCurrencyModel->getFactor();\n $data['shippingCosts'] = $this->roundPrice($data['shippingCosts']);\n\n $data['shippingCostsNet'] = $data['shippingCostsNet'] / $oldCurrencyModel->getFactor();\n $data['shippingCostsNet'] = $data['shippingCostsNet'] * $newCurrencyModel->getFactor();\n $data['shippingCostsNet'] = $this->roundPrice($data['shippingCostsNet']);\n\n $data['positions'] = $positions;\n\n $this->view->assign(\n [\n 'data' => $data,\n 'success' => true\n ]\n );\n }", "public function toMoney();", "public function getQuoteCurrency()\n {\n return $this->quote_currency;\n }", "public static function currency() {\n\t\treturn self::$currency;\n\t}", "function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "public function getOriginalCurrency()\n {\n return $this->originalCurrency;\n }", "public function getCurrentPrice() : float;", "public function getFinanceFromPrice()\n {\n $product = $this->getProduct();\n $finaceFromPrice = $product->getData('finance_from_price');\n $price = Mage::helper('core')->currency($finaceFromPrice, true, false);\n\n return $price;\n }", "public function getCurrency()\n {\n return isset($this->Currency) ? $this->Currency : null;\n }", "public function getCurrentCurrencyPriceOfSellerProduct()\n {\n $sp_id = $this->sp_id;\n $user_helper = new UserHelper;\n $to_curr_id = $user_helper-> getCurrentUserChoiceCurrencyId();\n $price = $this->getPriceOfSellerProduct($sp_id);\n $from_curr_id = $this->getCurrentPriceObjectOfSellerProduct($sp_id)->curr_id;\n $currency_helper = new CurrencyHelper;\n return $currency_helper->currencyConvert($from_curr_id,$to_curr_id,$price);\n }", "protected function getCurrency()\n {\n return $this->checkoutSession->getLastRealOrder()->getOrderCurrencyCode();\n }", "function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}", "public function getRate(Currency $currency);", "public function preferredCurrencyCode()\n {\n return CulqiCashier::usesCurrency();\n }", "private function convertCurrencyByAmount($transaction) {\nlist($currency, $amount)=explode(\" \", $transaction);\n\n$stmt=$this->mysqli->prepare(\"SELECT currencyType, currencyRate FROM currencyrates WHERE currencyType=?\");\n$stmt->bind_param(\"s\", $currency);\n$stmt->execute();\n$res=$stmt->get_result();\n$row=$res->fetch_assoc();\n$stmt->close();\n\nreturn $this->basecurrency . ' ' . number_format((float)$row['currencyRate'] * (float)$amount, 2);\n}", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "abstract public function getExchangeRate($fromCurrency, $toCurrency);", "public function Amount() {\n\t\t// TODO: Multi currency\n\t\t$shopConfig = ShopConfig::current_shop_config();\n\n\t\t$amount = Price::create();\n\t\t$price = $this->OnSpecial() ? $this->SpecialPrice : $this->Price;\n\t\t$amount->setAmount($price);\n\t\t$amount->setCurrency($shopConfig->BaseCurrency);\n\t\t$amount->setSymbol($shopConfig->BaseCurrencySymbol);\n\n\t\t// Transform amount for applying discounts etc.\n\t\t$this->extend('updateAmount', $amount);\n\n\t\treturn $amount;\n\t}", "public static function usesCurrency()\n {\n return static::$currency;\n }", "public function getDollarPrice(): float;", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "private function convertToCurrencyCode($price, $currency){\n\t\t\t\t\t\n\t\t// exchange rates are supplied in EUR so first convert it to GBP\n\t\t$GBPrate = $this->currencyRates['GBP'];\n\t\t\n\t\t$GBPrate = (float)$GBPrate * 100;\n\t\t\n\t\tif(!is_numeric($GBPrate)){\n\t\t\t$this->error = \"ERROR - there was an error converting the data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the amount of euros for £1 sterling\n\t\tif($currency == \"EUR\"){\n\t\t\treturn round(((1 / $GBPrate) * $price) * 100, 2); \n\t\t}\n\t\t\n\t\t// convert the sterling to euro\n\t\t$Euros = 1 / $GBPrate;\n\t\t\n\t\t// multiply the $price var with the euro value\n\t\t$Euros = $Euros * $price;\n\t\t\n\t\t// find the exchange rate for the currency required\n\t\t$currencyRate = $this->currencyRates[$currency];\n\t\t\n\t\t// output the calculation \n\t\treturn round(($Euros * $currencyRate) * 100, 2); \n\t\t\n\t}", "public function formatCurrency($amount);", "function order_currency( $currency ) {\r\n\r\n\t\t\tglobal $post;\r\n\r\n\t\t\tif ( $post && $post->post_type == 'shop_order' ) {\r\n\r\n\t\t\t\tglobal $theorder;\r\n\t\t\t\tif ( $theorder ) {\r\n\t\t\t\t\treturn $theorder->order_currency;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn $currency;\r\n\t\t}", "public function getTransactionCurrency()\n {\n return $this->transactionCurrency;\n }", "public function getCurrency()\n {\n if ($this->accountType !== 'starter') {\n return $this->request('currency');\n }\n\n $this->errors[ 301 ] = 'Unsupported Get Currency. Tipe akun starter tidak mendukung pengecekan currency.';\n\n return false;\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function ConvertCurrency($input_value, $input_currency_code, $target_currency_code) {\n // Convert input to base, then to target currency\n $rate_in = GetConversionRate($input_currency_code);\n $rate_out = GetConversionRate($target_currency_code);\n\n $output = ($input_value/$rate_in) * $rate_out;\n return number_format($output, 2, '.', '');\n }", "public static function getCurrencyOrDefault()\n {\n return self::getCurrency() ? self::getCurrency() : \\Bitrix\\Currency\\CurrencyManager::getBaseCurrency();\n }", "function currency( $c_f_x )\t\r\n {\r\n \t$c_f_x = round($c_f_x, 2);\t//THIS WILL ROUND THE ACCEPTED PARAMETER TO THE \r\n \t\t\t\t\t\t\t //PRECISION OF 2\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n \t$temp_c_f_variable = strstr(round($c_f_x,2), \".\");\t//THIS WILL ASSIGN THE \".\" AND WHAT EVER \r\n \t\t\t\t\t\t\t\t//ELSE COMES AFTER IT. REMEMBER DUE TO \r\n \t\t\t\t\t\t\t\t//ROUNDING THERE ARE ONLY THREE THINGS\r\n \t\t\t\t\t\t\t\t//THIS VARIABLE CAN CONTAIN, A PERIOD \r\n \t\t\t\t\t\t\t\t//WITH ONE NUMBER, A PERIOD WITH TWO NUMBERS,\r\n \t\t\t\t\t\t\t\t//OR NOTHING AT ALL\r\n \t\t\t\t\t\t\t\t//EXAMPLE : \".1\",\".12\",\"\"\r\n\t\t\t\t\t\t\t\t\t\r\n \tif (strlen($temp_c_f_variable) == 2)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \".1\" SO YOU WOULD ADD A ZERO TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT \r\n \t{\r\n \t\t$c_f_x = $c_f_x . \"0\";\r\n \t}\r\n\t\t\r\n \tif (strlen($temp_c_f_variable) == 0)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \"\" SO YOU WOULD ADD TWO ZERO'S TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT\r\n \t{\r\n \t\t$c_f_x = $c_f_x . \".00\";\r\n \t}\r\n\t\t\r\n\t\t$c_f_x = \"$\" . $c_f_x;\t//THIS WILL ADD THE \"$\" TO THE FRONT \r\n\r\n \treturn $c_f_x;\t//THIS WILL RETURN THE VARIABLE IN A NICE FORMAT\r\n \t\t\t\t\t//BUT REMEMBER THIS NEW VARIABLE WILL BE A STRING \r\n \t\t\t\t\t//THEREFORE CAN BE USED IN ANY FURTHER CALCULATIONS\r\n \t\t\r\n }", "public function getBaseCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getBaseCurrencyCode();\r\n\t}", "public static function getCurrencyForCurrentLocale()\r\n {\r\n\treturn Currency::getInstanceForLocale( self::getCurrentLocale() );\r\n }", "public function OriginalAmount() {\n\t\t// TODO: Multi currency\n\t\t$shopConfig = ShopConfig::current_shop_config();\n\n\t\t$amount = Price::create();\n\t\t$price = $this->Price;\n\t\t$amount->setAmount($price);\n\t\t$amount->setCurrency($shopConfig->BaseCurrency);\n\t\t$amount->setSymbol($shopConfig->BaseCurrencySymbol);\n\n\t\t// Transform amount for applying discounts etc.\n\t\t$this->extend('updateOriginalAmount', $amount);\n\n\t\treturn $amount;\n\t}", "function calculateTotalPrice()\n {\n $this->sellingPrice = $this->bid;\n $this->buyersPremium = $this->sellingPrice * 0.1;\n $this->totalPrice = $this->sellingPrice + $this->buyersPremium;\n\n return $this->totalPrice;\n }", "public function Price() {\n\t\t$amount = $this->Amount();\n\n\t\t//Transform price here for display in different currencies etc.\n\t\t$this->extend('updatePrice', $amount);\n\n\t\treturn $amount;\n\t}", "function calculateFeeInBaseCurrencyForFeePaidInQuoteCurrency($feeInQuoteCurrency, $costInQuoteCurrencyNotIncludingFees, $priceInQuoteCurrency, $volumeInBaseCurrency)\n\t{\n\t\t$feePercentageOfCost\t\t\t\t\t= $feeInQuoteCurrency / ($priceInQuoteCurrency * $volumeInBaseCurrency);\n\t\t\n\t\t// verify that cost in quote currency matches price * volume\n\t\t\n\t\tif ($costInQuoteCurrencyNotIncludingFees != ($priceInQuoteCurrency * $volumeInBaseCurrency))\n\t\t{\n\t\t\terrorLog(\"calculateFeeInBaseCurrencyForFeePaidInQuoteCurrency error: cost value includes fees \");\n\t\t}\n\t\t\n\t\t$feeInBaseCurrency\t\t\t\t\t\t= $volumeInBaseCurrency * $feePercentageOfCost;\n\t\t\n\t\treturn $feeInBaseCurrency;\n\t}", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function convertCurrency($transaction) {\n if (is_array($transaction)) {\nreturn $this->convertCurrencyByArray($transaction);\n} else {\nreturn $this->convertCurrencyByAmount($transaction);\n}\n}", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "function __formatCurrency($value)\n {\n if ($this->__init['definitions']['currency_type'] === 'dolar') {\n if (preg_match('/(([0-9]+)\\.([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode('.', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else if ($this->__init['definitions']['currency_type'] === 'real') {\n if (preg_match('/(([0-9]+)\\,([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode(',', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else return $value;\n }", "function convert_price_default_currency($price,$rate=1)\n{\n\treturn sprintf('%0.2f',($price/$rate));\n}", "public function getTotalPrice(): float;", "public function get_total_debit(){\n return $this->get_storage_cost() + $this->get_services_cost();\n }", "protected function calculatePrice()\n {\n $amount = 5 * $this->rate;\n $this->outputPrice($amount);\n }", "public function getTotalPrice()\n {\n // use format_currency to get correct decimals and avoid rounding errors\n return $this->getQuantity() * format_currency($this->getProductPrice(),null, true);\n// return $this->getQuantity() * format_currency($this->getNetPrice(),null, true);\n }", "function getWithCurrency($amount, $decimals = 2)\n{\n return FormatNumber($amount, $decimals) . \\Config::get('website.currency');\n}", "public function getPriceCurrency(): ?string\n {\n return $this->priceCurrency;\n }" ]
[ "0.79235417", "0.79235417", "0.7536152", "0.75107527", "0.73531413", "0.73531413", "0.73531413", "0.72994137", "0.7285341", "0.7284654", "0.7284654", "0.72460514", "0.7207526", "0.72067976", "0.72017", "0.7176202", "0.7124177", "0.7124177", "0.7124177", "0.7124177", "0.7124177", "0.7124177", "0.7124177", "0.7124177", "0.7114419", "0.71026784", "0.70999146", "0.7073768", "0.7072895", "0.70407397", "0.7016687", "0.6963047", "0.69539446", "0.69454324", "0.69285595", "0.6910047", "0.68897843", "0.68883723", "0.6885246", "0.67769057", "0.6704109", "0.6704109", "0.6703866", "0.6677466", "0.66744745", "0.6669669", "0.6660943", "0.66477066", "0.66439706", "0.6631952", "0.66277546", "0.6627688", "0.6624387", "0.66164994", "0.6615318", "0.66036564", "0.6586984", "0.6576718", "0.65721905", "0.65605587", "0.65587914", "0.6558258", "0.6550614", "0.6544249", "0.65114504", "0.65046006", "0.6493171", "0.6493171", "0.6493171", "0.6493171", "0.6493171", "0.64758724", "0.6473921", "0.647243", "0.64699405", "0.6451782", "0.64247555", "0.6424736", "0.64159536", "0.64054704", "0.6403698", "0.6396752", "0.63893163", "0.63779294", "0.63746643", "0.636558", "0.63605267", "0.63594395", "0.6329955", "0.632664", "0.63190293", "0.6312341", "0.6299763", "0.6295091", "0.6293703", "0.6288349", "0.6282559", "0.6282267", "0.62817127", "0.6278547" ]
0.78123957
2
load page with initial data
public function index() { return Group::latest()->paginate(10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadPage()\n\t{\n\t $data = $this->getData();\n \t \n\t $this->load->view('index', $data);\n\t}", "public function ee_breakouts_page_load() {}", "public function initPage() {}", "public function initPage() {}", "public function loadData()\n\t{\n\t\t$this->load->view('data_page');\n\t}", "public function loadPage() {\n //We have to insert the following pages.\n /*\n * 1. Header\n\t\t *\t-> Admin Ajax / User Ajax\n * 2. Navigation Bar\n\t\t *\t-> Admin navBar / User navBar\n * 3. Main Body\n * 4. Footer\n */\n\t\t//First we decide whether the page is an admin page or not.\n\t\tglobal $session;\n\t\tif(stripos($this->pageName, 'admin') === false)\t{\n\t\t\t$navBarType = 'user';\n\t\t\t$this->setTemplateVar('isadmin', 0);\n\t\t\t//We Load the data for the top fixed infobar.\n\t\t\t$this->setTemplateVar('currentBalance', getCurrentBalance());\n\t\t\t$this->setTemplateVar('prodQueueCount', getProdQueueCount());\n\t\t\t$this->setTemplateVar('username', $session->getUserName());\n\t\t} else {\n\t\t\t$navBarType = 'admin';\n\t\t\t$this->setTemplateVar('isadmin', 1);\n\t\t}\n\t\t\n\t\t//Now we also have to note wheather the user is an admin user or not.\n\t\t$this->setTemplateVar('isAdminUser', ($session->isAdminUser() ? 1 : 0));\n\t\t\n\t\t//Now we load all the pages.\n\t\tinclude $this->rootPath.'templates/header.php';\n\t\tinclude $this->rootPath.'templates/'.$navBarType.'_navbar.php';\n\t\tinclude $this->rootPath.'templates/t_'.$this->pageName.'.php';\n\t\tinclude $this->rootPath.'templates/footer.html';\n }", "function initiate_page() {\n\t\t$THIS = get_instance();\n\t\t$THIS->load->model('model_users', 'users');\n\n\t\t$logged_in = $THIS->users->check_logged_in();\n\t\t\n\t\tif($logged_in === FALSE) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t\t\n\t\t$user_data = $logged_in;\n\t\t\n\t\t$data = array(\n\t\t\t'user_id' => $user_data['id'],\n\t\t\t'username' => $user_data['username'],\n\t\t\t'user_email' => $user_data['email'],\n\t\t\t'user_type' => $user_data['type'],\n\t\t);\n\t\t\n\t\treturn $data;\n\t}", "protected function loadHtml()\n {\n $this->html = $this->fsio->get($this->page->getTarget());\n }", "public function page_init() {\n }", "function init_page() {\n\n $this->is_logged_in = qa_get_logged_in_userid();\n $this->timer = microtime(true);\n $this->cache_file = $this->get_filename();\n\n if (CACHE_STATUS && $this->check_cache() && $this->do_caching()) {\n $this->get_cache();\n } else if (CACHE_STATUS && $this->do_caching()) {\n ob_start();\n } else {\n return;\n }\n }", "protected function setupPage() {}", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "protected function LoadData()\n\t{\n\t\t$head = $this->GetProject()->GetHeadCommit();\n\t\t$this->tpl->assign(\"head\",$head);\n\n\t\t$this->tpl->assign('page', $this->params['page']);\n\t\t$skip = $this->params['page'] * 100;\n\n\t\t$headlist = $this->GetProject()->GetHeadList()->GetOrderedHeads('-committerdate', 101, $skip);\n\t\tif (isset($headlist) && (count($headlist) > 0)) {\n\t\t\tif (count($headlist) > 100) {\n\t\t\t\t$headlist = array_slice($headlist, 0, 100);\n\t\t\t\t$this->tpl->assign('hasmoreheads', true);\n\t\t\t}\n\t\t\t$this->tpl->assign(\"headlist\", $headlist);\n\t\t}\n\t}", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "public function load() {\n\t\t$this->init();\n\t\t$action = $this->action;\n\t\t$view = $this->$action();\n\n\t\tif ($view instanceof View && !$this->app->isErrorPage()):\n\t\t\t$this->app->view = $view;\n\t\tendif;\n\n\t\t$this->app->view->mergeData($this->data);\n\t\t$this->app->view->validate();\n\t}", "public function index()\n {\n load_datatable($this->data);\n load_daterangepicker($this->data);\n echo $this->blade->view()->make('page/page', $this->data)->render();\n }", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function loadPage()\n {\n /*if(!isset(self::$user_id)) {\n self::$user_id = $_GET['user_id'];\n self::$id_wp_user = $_GET['id_wp_page'];\n self::$id_post = $_GET['id_post'];\n self::$nonce_img_upload = \"<input type='hidden' id='nonce_img_upload' name='nonce_img_upload' value='{$_GET['nonce_img_upload']}'>\n <input type='hidden' name='_wp_http_referer' value='/stomshop/'>\";\n self::$nonce_img_del = \"<input type='hidden' id='nonce_img_del' name='nonce_img_del' value='{$_GET['nonce_img_del']}'>\n <input type='hidden' name='_wp_http_referer' value='/stomshop/'>\";\n Profile_user::getUserListGods($_GET['id_wp_page']);\n self::$list = Profile_user::$page;\n self::$profile = Profile_user::getUserProfileObject($_GET['id_wp_page'])[0];\n }\n $page = $_GET['page']??0;\n $this->get_page($page = parent::$list[$page]);*/\n }", "public function testLoadLandingPage()\n {\n $this->visit('/')\n ->see('<div class=\"title\">Risk and Control</div>');\n }", "function startup_view()\n\t{\n\t\t$data['error_msg'] = $this->error_msg;\n\t\t$response_body = $this->template_html($this->html_template_path,$data);\n\t\t$this->return_response($response_body);\n\t}", "public function _render_page($data = [])\n {\n \t$this->load->view('layouts/main', $data);\n }", "public function init() {\n $this->uri = ''; //En un futuro esto tomara pararemetros q vengan de GET\n session_start();\n //$this->generateFakeData();\n $this->validatePost();\n $this->requireView(); \n }", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "public function loadContent($page_name)\n\t{\n\t\tinclude(\"resource/view/\".$page_name.\".php\");\n\t}", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function pageLoad() {\n $objCore = new Core();\n $objCustomer = new Customer();\n\n // end of page load\n }", "function page_content()\n {\n //This needs to deliver page data that is requested by the ROUTE.\n }", "public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "function pageLoad () {\n\tglobal $pageBegin, $pageEnd, $tableRow;\n\t$page = page_load (\"search_results.html\");\n\n\t$tableRow = page_split ($page, \"[[\", \"]]\");\n\t$pageBegin = $tableRow[0];\n\t$pageEnd = $tableRow[2];\n\t$tableRow = $tableRow[1];\n}", "private function warmUp()\r\n\t{\r\n\t\t$this->loadPage( 1 );\r\n }", "public function web_load(){\n\t\t$this->common();\n\t}", "public function load_pages($body,$data)\n {\n $page_path = 'frontend/pages/'.$body ;\n\n $this->load->view('frontend/includes/header',$data);\n $this->load->view($page_path,$data);\n $this->load->view('frontend/includes/footer',$data);\n }", "public function load( $data ){\n\t\t\n\t\t//\tshow current user\n\t\tif($this->currentUser){\n\t\t\t$data['currentUser'] = $this->ci->load->view('templates/current_user', $this->currentUser, TRUE);\n\t\t} else {\n\t\t\t$data['currentUser'] = '';\n\t\t}\n\t\t\n\t\t$data['title'] = $this->PRE_TITLE . $data['title'];\n\t\t\n\t\t//\tprep JavaScript\n\t\tif( empty( $data['js'] ) || !isset( $data['js'] ) ){\n\t\t\t$data['js'] = array( 'main.js' );\n\t\t} else {\n\t\t\tarray_unshift( $data['js'], 'main.js' );\t\n\t\t}\n\t\t//\tprepend JS url to each\n\t\tfor($i=0; $i<count($data['js']); $i++){\n\t\t\tif( strpos( $data['js'][$i], 'http' ) === FALSE ){\n\t\t\t\t$data['js'][$i] = $this->JS_URL . $data['js'][$i];\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\tprep CSS\n\t\tif( empty( $data['css'] ) || !isset( $data['css'] ) ){\n\t\t\t$data['css'] = $this->CSS_URL . 'main.css';\n\t\t} else {\n\t\t\t$data['css'] = $this->CSS_URL . $data['css'];\n\t\t}\n\t\t\n\t\t$this->ci->load->view('templates/template', $data);\n\t}", "public function getInitialData() \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n { $this->autorender = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t\t$this->layout = null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t $this->render('ajax');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $params = json_decode(file_get_contents('php://input'),true); //\n// $fileURL=$params['fileURL'];\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t//\n Controller::loadModel('Bugs');\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $bugData=$this->Bugs->find('all', array('conditions' => array('status' => '0', 'parentid' => '0'))); //\n echo(json_encode($bugData)); //\n }", "public function loadForView();", "protected function _preloadContainerData()\r\n\t{\r\n\t\t$this->preloadTemplate('page_nav');\r\n\t}", "private function load()\n\t{\n\t\tglobal $mediaWiki;\n\t\t\n\t\t$title = Title::newFromText( $this->title );\n\t\t \n\t\t// Can't load page if title is invalid.\n\t\tif ($title == null)\n\t\t\treturn;\n\t\t\n\t\t$article = $mediaWiki->articleFromTitle($title);\n\t\t\n\t\t// Also, if article can't be found, bail out.\n\t\tif ($article == null )\n\t\t\treturn;\n\t\t\n\t\t// Let's try fetching the page content.\n\t\t$article->loadContent();\n\t\t\n\t\t// V1.3 security feature.\n\t\t// At this point, the page's restriction\n\t\t// is loaded. Get 'edit' protection state.\n\t\t$state = $title->getRestrictions('edit');\n $this->protectState = false;\n $state = $title->getRestrictions('edit');\n foreach ($state as $index => $group )\n if ( $group == 'sysop' )\n $this->protectState = true;\n\t\t\n\t\tif (! $this->protectState)\n\t\t\treturn; \n\t\t\n\t\t# if no page or an empty one\n\t\tif (!$article->mDataLoaded)\n\t\t\treturn;\n\t\t \n\t\t$this->content = $article->mContent;\n\t\t$this->raw = $article->mContent;\n\t\t\n\t\t// Now, let's analyse the page\n\t\t// to determine things like page type.\n\t\t$this->analyse();\n\t}", "public function setupPageData($page_no) \n {\n //NB: gets login page defaults all messages/errors\n $this->data['login'] = $this->user->viewLogin();\n $this->saveData('data');\n }", "public function prePageContent();", "public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }", "protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }", "private function content() {\n $this->checkPost();\n\n if (isset($_SESSION['CREATE'])) {\n\n switch ($_SESSION['CREATE']['page']) {\n case 0:\n $this->pageAgreement();\n break;\n case 1:\n $this->pageNameIntro();\n break;\n case 2:\n $this->pageMark();\n break;\n case 3:\n $this->pageFinal();\n break;\n default:\n echo '<h1>Error: Page Invalid<h1>';\n break;\n }\n\n }else\n echo '<h1>Error: Session invalid</h1>';\n }", "function InitializePage();", "public function page(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/page', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "function index() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(5);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "public function loadHTML();", "function load_page($args=''){//$page,$maxrows,$order,$ordertype,$capa,\n\t\t$r= getResponse();\t\t\n\t\tsetLocaleMode();\n\t\tif (!xvalidaAcceso($r,PAGE_PRIV)){\n\t\t\t$r->assign($capa,inner,'Acceso denegado');\n\t\t\treturn $r;\n\t\t}\n\t\t\n\t\t//$r->alert($args);\n\t\t$c = new connection();\n\t\t$c->open();\n\t\t\n\t\t\n\t\t$sa_paquetes = $c->sa_v_paquetes;\n\t\t$query = new query($c);\n\t\t$query->add($sa_paquetes);\n\t\t$paginador = new fastpaginator('xajax_load_page',$args,$query);\n\t\t$arrayFiltros=array(\n\t\t\t'Empresa'=>array(\n\t\t\t\t'change'=>'h_empresa',\n\t\t\t\t'addevent'=>\"obj('empresa').value='';\"\n\t\t\t),\n\t\t\t'busca'=>array(\n\t\t\t\t'title'=>'B&uacute;squeda',\n\t\t\t\t'event'=>'restablecer();'\n\t\t\t),\n\t\t\t'fecha'=>array(\n\t\t\t\t'title'=>'Fecha'\n\t\t\t)\n\t\t);\n\t\t$argumentos = $paginador->getArrayArgs();\n\t\t$aplica_iva=($argumentos['iva']==1);\n\t\t$id_empresa=$argumentos['h_empresa'];\n\t\t$query->where(new criteria(sqlEQUAL,$sa_paquetes->id_empresa,$id_empresa));\n\t\t\n\t\tif($id_empresa==null){\n\t\t\t$r->assign($paginador->layer,inner,'Seleccione una Empresa');\n\t\t\treturn $r;\n\t\t}\n\t\t\n\t\t$rec=$paginador->run();\n\t\tif($rec){\n\t\t\tforeach($rec as $v){\n\t\t\t\t//buscando las unidades basicas del paquete\n\t\t\t\t$unidades=$c->sa_v_informe_tempario_unidades->doSelect($c, new criteria(sqlEQUAL,'id_paquete',$v->id_paquete))->getAssoc('id_paq_unidad','nombre_unidad_basica');\n\t\t\t\t$lista_unidades=implode(',',$unidades);\n\t\t\t\t$html.='<table class=\"order_table\"><col width=\"20%\" /><col width=\"40%\" /><col width=\"40%\" /><thead>';\n\t\t\t\t\n\t\t\t\t$html.='<tr><td>PAQUETE</td><td>Descripci&oacute;n</td><td>Unidades</td></tr></thead><tbody>';\n\t\t\t\t$html.='<tr><td>'.$v->codigo_paquete.'</td><td>'.$v->descripcion_paquete.'</td><td>'.$lista_unidades.'</td></tr></tbody></table>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$html.='<table class=\"order_table\"><col width=\"20%\" /><col width=\"40%\" /><col width=\"20%\" /><thead><tr><td>Codigo</td><td>Descripci&oacute;n</td><td>Unidad</td><td>Cantidad</td><td style=\"display:none;\">Precio</td><td style=\"display:none;\">Importe</td></tr></thead><tbody>';\n\t\t\t\t//cargando los detalles de tempario\n\t\t\t\t$sa_v_paq_tempario=$c->sa_paq_tempario;\n\t\t\t\t$sa_tempario= new table('sa_v_tempario','',$c);\n\t\t\t\t$join= $sa_tempario->join($sa_v_paq_tempario,$sa_tempario->id_tempario,$sa_v_paq_tempario->id_tempario);\n\t\t\t\t$qdet=new query($c);\n\t\t\t\t$qdet->add($join);\n\t\t\t\t$qdet->where(new criteria(sqlEQUAL,$sa_v_paq_tempario->id_paquete,$v->id_paquete));\n\t\t\t\t//$r->alert($qdet->getSelect());\n\t\t\t\t$recdet=$qdet->doSelect();\n\t\t\t\tif($recdet){\n\t\t\t\t\tforeach($recdet as $temp){\n\t\t\t\t\t\t$html.='<tr><td>'.$temp->codigo_tempario.'</td><td>'.$temp->descripcion_tempario.'</td><td>'.$temp->descripcion_modo.'</td><td>N/A</td><td style=\"display:none;\">'.$temp->precio.'</td><td style=\"display:none;\">'.$temp->precio.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sa_v_paq_repuestos=$c->sa_paquete_repuestos;\n\t\t\t\t$iv_articulos= new table('iv_articulos','',$c);\n\t\t\t\t$join= $iv_articulos->join($sa_v_paq_repuestos,$iv_articulos->id_articulo,$sa_v_paq_repuestos->id_articulo);\n\t\t\t\t$qdet=new query($c);\n\t\t\t\t$qdet->add($join);\n\t\t\t\t$qdet->where(new criteria(sqlEQUAL,$sa_v_paq_repuestos->id_paquete,$rec->id_paquete));\n\t\t\t\t//$r->alert($qdet->getSelect());\n\t\t\t\t$recdet=$qdet->doSelect();\n\t\t\t\t$recdet=$qdet->doSelect();\n\t\t\t\tif($recdet){\n\t\t\t\t\tforeach($recdet as $rep){\n\t\t\t\t\t\t$html.='<tr><td>'.$rep->codigo_articulo.'</td><td>'.$rep->descripcion.'</td><td>'.$rep->unidad.'</td><td>'.$rep->cantidad.'</td><td style=\"display:none;\">'.$rep->precio.'</td><td style=\"display:none;\">'.$rep->precio.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html.='</tbody></table><br />';\n\t\t\t}\n\t\t}\n\t\t$html.='<br />Informe Generado el '.date(DEFINEDphp_DATETIME12).' - Empresa: '.$argumentos['Empresa'].'<strong>'.$tiva.'</strong>';\n\t\t$r->assign('paginador',inner,'<hr><div class=\"ifilter\">Mostrando '.$paginador->count.' resultados de un total de '.$paginador->totalrows.' '.$paginador->getPages(false).'</div>');\n\t\t\n\t\t/*if($argumentos['busca']!=''){\n\t\t\t$query->where(\n\t\t\t\tnew criteria(sqlOR, array(\n\t\t\t\t\tnew criteria(' like ',$sa_paquetes->descripcion_paquete,\"'%\".$argumentos['busca'].\"%'\")//,\n\t\t\t\t\t//new criteria(' like ',$sa_paquetes->chasis,\"'%\".$argumentos['busca'].\"%'\"),\n\t\t\t\t\t//new criteria(' like ',$sa_paquetes->color,\"'%\".$argumentos['busca'].\"%'\"),\n\t\t\t\t\t//new criteria(' like ',$c->pg_empresa->nombre_empresa,\"'%\".$argumentos['busca'].\"%'\")\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\t\t\t\n\t\t}\n\t\tif($argumentos['fecha']!=''){\n\t\t\t$query->where(new criteria(' = ',\"DATE_FORMAT(\".$sa_paquetes->fecha_rev.\",'%d-%m-%Y')\",\"'\".$argumentos['fecha'].\"'\"));\t\t\t\n\t\t}\n\t\tif($argumentos['h_empresa']!=''){\n\t\t\t$query->where(new criteria(sqlEQUAL,\"id_empresa\",\"'\".$argumentos['h_empresa'].\"'\"));\t\t\t\n\t\t}else{\n\t\t\t$arrayFiltros['Empresa']['hidden']=1;\n\t\t}*/\n\t\t//$r->alert($argumentos['h_empresa']);\n\t\t\n\t\t//$rec=$paginador->run();\n\t\t\n\t\t/*if($rec){\n\t\t\tif($rec->getNumRows()==0){\n\t\t\t\t$html.='<div class=\"order_empty\">No se han encontrado registros</div>';\n\t\t\t}else{\n\t\t\t\t$html.='<table class=\"order_table\"><thead><tr class=\"xajax_order_title\">\n\t\t\t\t\n\t\t\t\t<td>'.$paginador->get($sa_paquetes->id_paquete,'ID').'</td>\n\t\t\t\t<td>'.$paginador->get($sa_paquetes->codigo_paquete,'C&oacute;digo').'</td>\n\t\t\t\t<td>'.$paginador->get($sa_paquetes->descripcion_paquete,'Descripci&oacute;n').'</td>\n\t\t\t\t<td>'.$paginador->get($sa_paquetes->nombre_empresa_sucursal,'Empresa').'</td>\n\t\t\t\t<td>'.$paginador->get($sa_paquetes->fecha_rev,'Fecha').'</td>\n\t\t\t\t</tr></thead><tbody>';\n\t\t\t\t$class='';\n\t\t\t\tforeach($rec as $v){\n\t\t\t\t\tif ($rec->parcial == '1')\n\t\t\t\t\t\t$parcial = 'Si';\n\t\t\t\t\telse\n\t\t\t\t\t\t$parcial = 'No';\n\t\t\t\t\t$html.='<tr class=\"'.$class.'\">\n\t\t\t\t\t\n\t\t\t\t\t<td align=\"center\">'.$rec->id_paquete.'</td>\n\t\t\t\t\t<td align=\"center\">'.$rec->codigo_paquete.'</td>\n\t\t\t\t\t<td align=\"center\">'.$rec->descripcion_paquete.'</td>\n\t\t\t\t\t<td align=\"center\">'.$rec->nombre_empresa_sucursal.'</td>\n\t\t\t\t\t<td align=\"center\">'.$rec->fecha_rev.'</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t\tif($class==''){\n\t\t\t\t\t\t$class='impar';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$class='';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html.='</tbody></table>';\n\t\t\t}\n\t\t\t\n\t\t}*/\n\t\t\n\t\t$r->assign($paginador->layer,inner,$html);\n\t\t\n\t\t\n\t\t//$r->assign('paginador',inner,'<hr><div class=\"ifilter\">Mostrando '.$paginador->count.' resultados de un total de '.$paginador->totalrows.' '.$paginador->getPages(false).'</div><div class=\"ifilter\">'.$paginador->getRemoveFilters('datos',$arrayFiltros).'</div>');\n\n\t\t$r->assign('campoFecha','value',$fec);\n\t\t\n\t\t$r->script($paginador->fillJS('datos'));\n\t\n\t\t$c->close();\n\t\treturn $r;\n\t}", "protected function _load()\r\n {\r\n $page = new Model_Page();\r\n $children = $page->getChildren($this->_parentId);\r\n if ($children != null && $children->count() > 0) {\r\n foreach ($children as $child) {\r\n if ($child->show_on_menu == 1) {\r\n $this->items[] = new Digitalus_Menu_Item($child);\r\n }\r\n }\r\n }\r\n }", "function force_initial_load()\n\t{\n\t\t$this->no_ajax = TRUE;\n\t}", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "function admin_page_load() {\n\t\t$this->jetpack->admin_page_load();\n\t}", "public function loadNextPage()\n {\n $nextPage = $this->results->getNextPage();\n $this->search($nextPage);\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function __construct ()\n {\n if(preg_match(\"/ajax/i\", $_SERVER['REQUEST_URI'])) {\n Helper::render ();\n } else {\n $this->setupPage();\n $this->callTemplateParts($this->templateFiles);\n $this->setupPageEnd();\n }\n }", "public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}", "protected function getPageFile()\n\t{\n\t\t// empty the html property (although it's probably empty anyway if we're here)\n\t\t$this->html = '';\n\n\t\t// get the data\n\t\t$this->html = file_get_contents($this->url);\n\t}", "function loadPage($template, $data = null)\n {\n $data['template_name'] = $template;\n $data['data'] = $data;\n // $data \t\t\t\t\t\t= \thtml_escape($this->security->xss_clean($data));\n $this->load->view('user/user_master-template', $data);\n }", "public function load_pagination_entries() {\n\t\t// Validate nonce\n\t\tforminator_validate_ajax( \"forminator_popup_pagination_entries\" );\n\n\t\t$html = forminator_template( 'settings/popup/edit-pagination-entries-content' );\n\n\t\twp_send_json_success( $html );\n\t}", "public function initData()\r\n {\r\n $this->data['page_class'] = strtolower('page-' . $this->classname . '-' . $this->methodname) . ' ';\r\n $this->data['class_name'] = $this->classname;\r\n $this->data['method_name'] = $this->methodname;\r\n\r\n //default description and keyword\r\n $this->data['keywords'] = '';\r\n $this->data['description'] = '';\r\n \r\n $this->data['language'] = $this->session->userdata('language');\r\n\r\n if ($this->config->item('test_mode') == TRUE)\r\n {\r\n $this->output->enable_profiler('true');\r\n }\r\n \r\n //see any notifications to display\r\n if (!empty($this->session->flashdata('notification'))) {\r\n $this->data['notification'] = $this->session->flashdata('notification');\r\n $this->data['notification_type'] = $this->session->flashdata('notification_type');\r\n }\r\n\r\n // set csrf\r\n $this->data['csrf'] = array(\r\n 'token_name' => $this->security->get_csrf_token_name(),\r\n 'hash' => $this->security->get_csrf_hash(),\r\n 'cookie_name' => $this->config->item('csrf_cookie_name'),\r\n );\r\n }", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "function home()\n {\n $data=$this->model->getProfes();\n $this->addData($data);\n //rebuilding with new data\n $this->view->__construct($this->dataView,$this->dataTable);\n $this->view->show();\n \t\t}", "public function invoke()\r\n\t{\r\n\t\tif(isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$pageName = $_GET['page'];\r\n\t\t\t$this->loadPage($pageName);\r\n\t\t}\r\n\t\telseif(!isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$this->loadPage('home');\r\n\t\t}\r\n\t}", "public function demos_page() {\n\t\t\t//delete_transient( 'wpex_demos_data' );\n\t\t\t$this->init_checks = self::init_checks();\n\n\t\t\tif ( 'passed' != $this->init_checks ) {\n\t\t\t\tinclude_once( 'views/not-supported.php' );\n\t\t\t} else {\n\t\t\t\t$this->init_demos_data();\n\t\t\t}\n\n\t\t\tif ( ! $this->demos ) {\n\t\t\t\tdelete_transient( 'wpex_demos_data' );\n\t\t\t\tinclude_once( 'views/no-demos.php' );\n\t\t\t} else {\n\t\t\t\tinclude_once( 'views/demos.php' );\n\t\t\t}\n\t\t}", "public function run()\n {\n //\n $page = [\n [\n 'id' => 1,\n 'name' => 'home',\n 'url' => '/'\n ],\n [\n 'id' => 2,\n 'name' => 'service',\n 'url' => '/services'\n ],\n [\n 'id' => 3,\n 'name' => 'promotion',\n 'url' => '/promotions'\n ],\n [\n 'id' => 4,\n 'name' => 'event',\n 'url' => '/events'\n ]\n ];\n Page::insert($page);\n }", "public function load($html);", "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "public function renderLoadsHtml()\n {\n $steps = json_decode(file_get_contents($this->file), true);\n if (empty($_GET['operation'])) {\n $namespaces = $this->loadNamespaces($steps);\n\n $template = new Template();\n $template->assign('id', $this->id);\n $template->assign('file', realpath($this->file));\n $template->assign('section', 'sequence');\n $template->assign('resource', $this->getResourcePath());\n $template->assign('steps', json_encode($steps));\n $template->assign('namespaces', json_encode($namespaces));\n\n echo $template->fetch('sequence');\n } else {\n switch($_GET['operation']) {\n case 'delete':\n $steps = $this->remove($steps, $_GET['step']);\n }\n file_put_contents($this->file, json_encode($steps, JSON_PRETTY_PRINT));\n $namespaces = $this->loadNamespaces($steps);\n\n echo json_encode(['steps' => $steps, 'namespaces' => $namespaces]);\n }\n }", "function init()\r\n\t{\r\n\t\t$projet = unserialize($_SESSION['session']->projet);\r\n\t\t$this->view->nom_complet = $projet->nom_complet;\r\n\t\t$this->view->desc_projet = $projet->description_projet;\r\n\t\t$this->view->employe = unserialize($_SESSION['session']->account)->account_lid;\r\n\t}", "function load() {\n\n\t}", "protected function loadView()\n {\n }", "protected function loadView()\n {\n }", "public function init()\n {\n \t$arr_sitemap_nodes_main = CMS_Model_CMSSitemap::getSitemapByHandle('MAIN')->getSitemapNodes(6);\n \t\n \t$this->view->assign('arr_sitemap_nodes_main',$arr_sitemap_nodes_main);\n }", "public function init_settings_page()\n\t\t{\n\n\t\t\t$this->template_header();\n\t\t\t$this->template_body();\n\t\t\t$this->template_footer();\n\n\t\t}", "private function loadHTML(&$data,$page,$error = '') {\n\t\t$this->loadError($data,$error);\n\t\t$data['page']['header'] = $this->load->view('templates/header',$data,true);\n\t\t$data['page']['menu'] = $this->load->view('templates/menu',$data,true);\n\t\t$data['page']['footer'] = $this->load->view('templates/footer',$data,true);\n\t\t$this->load->view('pages/'.$page,$data);\n\t\t$this->loadError($data);\n\t}", "protected function loadPageObject()\n\t{\n\t\treturn $this->PoObj->run();\n\t}", "public function onLoad() {\n \n }", "public function load_table_page() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t\t}\n\n\t\t\t// Render the settings template\n\t\t\trequire_once( dirname( __FILE__ ) . '/pages/table.php' );\n\t\t\twp_enqueue_script( 'data-tables', '/wp-content/plugins/amz-affiliate/js/vendor/data-tables.js', 'jquery' );\n\t\t\twp_enqueue_script( 'amz-commons', '/wp-content/plugins/amz-affiliate/js/commons.js', 'jquery' );\n\t\t\twp_enqueue_script( 'amz-table', '/wp-content/plugins/amz-affiliate/js/table.js', 'jquery' );\n\t\t\twp_enqueue_style( 'amz-tables-styles', '/wp-content/plugins/amz-affiliate/css/table-admin.css' );\n\t\t\twp_enqueue_style( 'data-tables-styles', '/wp-content/plugins/amz-affiliate/css/vendor/data-tables.css' );\n\n\t\t}", "public function load() {\n\t\t$this -> template = TemplateManager::load(\"ForumPreference\");\n\t\t$this -> template -> insert(\"profileImage\", $this -> user -> getProfileImage());\n\t\t$this -> template -> insert(\"signature\", $this -> user -> getSignature());\n\t\t$this -> display();\n\t}", "public function index()\n {\n $this->data['list'] = $this->cms_page_model->get_all();\n \n $this->template->load_asset(array('datatable', 'dialog', 'bootstrap_switch'));\n \n $this->template->build('admin/cms/page/index', $this->data);\n }", "public function index()\n\t{\n\t\t$this->load->model('Model_testimoni');\n\n\t\t$data = array(\n\t\t\t'testimoni' => $this->Model_testimoni->getTestimoniForLandingPage(5),\n\t\t);\n\n\t\t// dd($data);\n\t\t$this->load->view('landingpage/index' ,$data);\n\t}", "function run() {\n\t\t$view = new View();\n\t\t\n\t\t$students = new Student();\n\t\tif ($view->students_tbl = $students->get_students_as_tbl_arr() ) {\n\t\t\t$view->error = $students->get_error();\n\t\t}\n\n\t\t$view->student_desc = $students->get_student_desc();\n\t\t$view->render('main_page.php');\n\t}", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "protected function displayPage()\n {\n parent::initContent();\n\n $path = $this->module->getPathUri();\n $this->addCSS(\n array(\n $path . 'views/css/auto-test.css?v=' . $this->module->version,\n $path . 'views/css/packlink.css?v=' . $this->module->version,\n $path . 'views/css/bootstrap-prestashop-ui-kit.css?v=' . $this->module->version,\n ),\n 'all',\n null,\n false\n );\n $this->addJS(\n array(\n $path . 'views/js/core/UtilityService.js?v=' . $this->module->version,\n $path . 'views/js/core/TemplateService.js?v=' . $this->module->version,\n $path . 'views/js/core/AjaxService.js?v=' . $this->module->version,\n $path . 'views/js/core/ResponseService.js?v=' . $this->module->version,\n $path . 'views/js/core/AutoTestController.js?v=' . $this->module->version,\n $path . 'views/js/core/StateUUIDService.js?v=' . $this->module->version,\n $path . 'views/js/PrestaFix.js?v=' . $this->module->version,\n ),\n false\n );\n\n // assign template variables\n $this->context->smarty->assign(\n array(\n 'dashboardLogo' => $path . 'views/img/logo-pl.svg',\n 'startTestUrl' => $this->getAction('PacklinkAutoTest', 'start'),\n 'checkStatusUrl' => $this->getAction('PacklinkAutoTest', 'checkStatus'),\n 'downloadLogUrl' => $this->getAction('PacklinkAutoTest', 'exportLogs', false),\n 'systemInfoUrl' => $this->getAction('Debug', 'getSystemInfo', false),\n 'moduleUrl' => $this->getAction('Packlink', '', false),\n )\n );\n // render template and assign it to the page\n $content = $this->context->smarty->fetch($this->getTemplatePath() . 'auto-test.tpl');\n $this->context->smarty->assign(\n array(\n 'content' => $content,\n )\n );\n }", "function index() {\r\n $this->page();\r\n }", "public function show() {\n\t\t$variables = $this->sanitize($this->data);\n\t\tif (is_array($variables)) {\n\t\t\textract($variables);\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tob_start();\n\t\tif ($this->isPartial) {\n\t\t\trequire_once $this->pathToPartial;\n\t\t} else {\n\t\t\trequire_once $this->pathToLayout;\n\t\t}\n\t\t$this->performReplacements();\n\t\tif (ob_get_length() !== false) {\n\t\t\tob_end_flush();\n\t\t}\n\t}", "public function our_story() {\n $data[\"js\"] = \"our_story.js\";\n $this->load->view('header', $data);\n $this->load->view('our_story');\n $this->load->view('footer');\n }", "public function initPage( OutputPage $out ) {\n parent::initPage( $out );\n }", "function onLoad($param)\n\t{\n\t\tparent::onLoad($param);\n\n\t\t$this->dataBind();\n\n\t\t//on loading the page for the first time, \n\t\t//initialize the drop down lists\n\t\tif(!$this->Page->IsPostBack)\n\t\t{\n\t\t\t$step1 = $this->Page->RentalWizard->Step1;\n\n\t\t\t//set the default vehicle category and types\n\t\t\t$cat = $step1->VehicleCat->Items[0]->Text;\n\t\t\t$this->setVehicleTypes($cat);\t\n\t\t\t$type = $this->VehicleType->Items[0]->Text;\n\t\t\t$this->setVehicleList($cat, $type);\n\t\t}\n\t}", "public function loadContents() {}", "public function render_page() {\n\t\t$this->render_template();\n\t}", "public function loadContents() {}", "public function loadContents() {}", "public function loadContents() {}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "function wisdom() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(6);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "public function getData(): ContuctUsPage;" ]
[ "0.7552917", "0.73957604", "0.70848686", "0.70848686", "0.7008991", "0.664286", "0.64589596", "0.6418176", "0.64003956", "0.63648957", "0.6333083", "0.6283925", "0.6272305", "0.6236029", "0.6234139", "0.62139904", "0.62098414", "0.61889726", "0.6183714", "0.6144319", "0.6126279", "0.6105274", "0.6070268", "0.6050066", "0.6015783", "0.5986117", "0.59573454", "0.59569806", "0.59344304", "0.59330666", "0.59177434", "0.5916144", "0.5913882", "0.5912457", "0.5895894", "0.58941686", "0.5886587", "0.586478", "0.58619136", "0.58611965", "0.5857409", "0.58558667", "0.5849144", "0.5842776", "0.58409417", "0.5834253", "0.583051", "0.5827429", "0.58250153", "0.5821576", "0.5821402", "0.5804002", "0.5803574", "0.5773169", "0.57679784", "0.5761628", "0.5755165", "0.575262", "0.57506365", "0.5747449", "0.5742649", "0.5740872", "0.5736751", "0.5727444", "0.57231855", "0.5720179", "0.5715859", "0.570737", "0.57018757", "0.570161", "0.5694643", "0.5686448", "0.5682057", "0.5682057", "0.568097", "0.5680149", "0.5678092", "0.56770265", "0.56727445", "0.56527305", "0.56525266", "0.56497085", "0.56484926", "0.5647002", "0.5646503", "0.5638889", "0.5636325", "0.5625764", "0.56242746", "0.56230754", "0.56219697", "0.56151533", "0.5612751", "0.5612453", "0.56123", "0.56123", "0.56112045", "0.5605333", "0.5605333", "0.56050485", "0.56025314" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // update data $group = Group::findOrFAil($id); $this->validate($request, [ 'name' => 'required|string|max:255|min:2', ]); $group->update($request->all()); return ['message'=>'Getting id is: ' . $id]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { Group::findOrFail($id)->delete(); return ['message' => 'Group deleted successfully']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
sms config update form for sending sms
public function sms_configuration_form(){ $CI =& get_instance(); $CI->load->model('dashboard/Sms_model','sms_model'); $setting_detail = $CI->sms_model->retrieve_sms_editdata(); return $setting_detail; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function room_reservations_admin_settings_sms_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $sms_option = $form_state['values']['sms_option'];\n $confirmation = ROOM_RESERVATIONS_SAVE_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_SAVE_ERROR_MSG;\n }\n if ($form_state['clicked_button']['#value'] == t('Reset to defaults')) {\n $sms_option = 0;\n $confirmation = ROOM_RESERVATIONS_RESET_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_RESET_ERROR_MSG;\n }\n $result = _room_reservations_set_variable('sms_option', $sms_option);\n if (!$result) {\n $errors = TRUE;\n }\n if ($errors) {\n drupal_set_message(check_plain($error), 'error');\n }\n else {\n drupal_set_message(check_plain($confirmation));\n }\n}", "public function action_cloud_sms_settings() {\n\n $usertype = $_SESSION['user_type'];\n\n $package = Model::factory('package');\n $errors = array();\n $smssettings_submit = arr::get($_REQUEST, 'btn_sms_activate');\n\n $post_values = array();\n\n $sms_id = '';\n $company_id = 1;\n $smssettings = $package->sms_settings();\n if (empty($smssettings)) {\n\n $smssettings[0]['sms_account_id'] = '';\n $smssettings[0]['sms_auth_token'] = '';\n $smssettings[0]['sms_from_number'] = '';\n $smssettings[0]['sms_id'] = '';\n $sms_id = $smssettings[0]['sms_id'];\n } else {\n $sms_id = 1;\n }\n\n if ($smssettings_submit && Validation::factory($_POST)) {\n $post_values = $_POST;\n\n $validator = $package->validate_update_smssettings(arr::extract($_POST, array('sms_account_id', 'sms_auth_token', 'sms_from_number')));\n //'site_city';\n if ($validator->check()) {\n $status = $package->update_sms_settings($_POST, $company_id, $sms_id);\n\n if ($status == 1) {\n Message::success(__('sucessful_settings_update'));\n } else {\n Message::error(__('not_updated'));\n }\n\n $this->request->redirect(\"package/cloud_sms_settings\");\n } else {\n $errors = $validator->errors('errors');\n }\n }\n //$id = $this->request->param('id');\n // $id=1;\n\n $this->selected_page_title = __(\"sms_settings\");\n $view = View::factory(ADMINVIEW . 'package_plan/sms_settings')\n ->bind('validator', $validator)\n ->bind('errors', $errors)\n ->bind('postvalue', $post_values)\n ->bind('smssettings', $smssettings);\n\n $this->template->title = CLOUD_SITENAME . \" | \" . __('sms_settings');\n $this->template->page_title = __('sms_settings');\n $this->template->content = $view;\n }", "function room_reservations_admin_settings_sms($form, &$form_state) {\n $default_sms_option = _room_reservations_get_variable('sms_option');\n $form['#tree'] = TRUE;\n $form['sms_option'] = array(\n '#title' => t('SMS option'),\n '#type' => 'checkbox',\n '#return_value' => 1,\n '#default_value' => $default_sms_option,\n '#description' => t('Give users the option of receiving confirmation\n messages and reminders as SMS text messages.'),\n '#weight' => -110,\n );\n $form['carriers'] = array(\n '#type' => 'fieldset',\n '#title' => t('Wireless carriers'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#weight' => -100,\n );\n $sql = \"\n SELECT id, value\n FROM {room_reservations_variables}\n WHERE name = '%s'\n ORDER BY value\n \";\n $result = db_query($sql, 'carrier');\n if ($result) {\n $options = array();\n $form['carriers']['list_0'] = array(\n '#value' => '<table><tr><th>' . t('Wireless carrier') . '</th><th>' .\n t('Domain name') . '</th></tr>',\n '#weight' => -99,\n );\n $x = 0;\n while ($data = db_fetch_object($result)) {\n $x++;\n $id = $data->id;\n $values = explode('~', $data->value);\n $options[strval($id)] = $values[0];\n $form['carriers']['list_' . $x] = array(\n '#value' => '<tr><td>' . check_plain($values[0]) . '</td><td>' .\n check_plain($values[1]) . '</td></tr>',\n '#weight' => -99 + $x,\n );\n $x++;\n }\n $form['carriers']['list_' . $x] = array(\n '#value' => '</table>',\n '#weight' => -99 + $x,\n );\n }\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}", "function room_reservations_admin_settings_text_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $enable_text = $form_state['values']['enable_text'];\n $from_address = $form_state['values']['from_address'];\n $confirmation_header = $form_state['values']['confirmation_header'];\n $confirmation_owner = $form_state['values']['confirmation_owner'];\n $reminder_header = $form_state['values']['reminder_header'];\n $reminder_owner = $form_state['values']['reminder_owner'];\n $confirmation = ROOM_RESERVATIONS_SAVE_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_SAVE_ERROR_MSG;\n }\n elseif ($form_state['clicked_button']['#value'] == t('Reset to defaults')) {\n $enable_text = 0;\n $confirmation_header = '';\n $confirmation_owner = '';\n $reminder_header = '';\n $reminder_owner = '';\n $confirmation = ROOM_RESERVATIONS_RESET_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_RESET_ERROR_MSG;\n }\n $errors = FALSE;\n $result = _room_reservations_set_variable('enable_text', $enable_text);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('from_address_sms', $from_address);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_header_text_sms', \n $confirmation_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_owner_text_sms', \n $confirmation_owner);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_header_text_sms', \n $reminder_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_owner_text_sms', \n $reminder_owner);\n if (!$result) {\n $errors = TRUE;\n }\n if ($errors) {\n drupal_set_message(check_plain($error), 'error');\n }\n else {\n drupal_set_message(check_plain($confirmation));\n }\n}", "function messenger_config_form($form, &$form_state)\n{\n\n $form[MESSENGER_URL] = array(\n '#type' => 'textfield',\n '#title' => t('API url'),\n '#default_value' => variable_get(MESSENGER_URL, ''),\n '#description' => t('The api url. eg: http://api.domain.com'),\n '#required' => TRUE,\n );\n\n $form[MESSENGER_SECRET] = array(\n '#type' => 'textfield',\n '#title' => t('Secret'),\n '#default_value' => variable_get(MESSENGER_SECRET, ''),\n '#description' => t('API secret.'),\n '#required' => TRUE,\n );\n\n $form[GIPHY_API] = array(\n '#type' => 'textfield',\n '#title' => t('Giphy api key'),\n '#default_value' => variable_get(GIPHY_API, DEFAULT_GIPHY_API),\n '#description' => t('Enter Giphy api.'),\n '#required' => TRUE,\n );\n\n $form[GIPHY_EXCLUDE_KEYWORD] = array(\n '#type' => 'textarea',\n '#title' => t('Giphy exclude keywords'),\n '#default_value' => variable_get(GIPHY_EXCLUDE_KEYWORD, ''),\n '#description' => t('Enter a word per line'),\n '#required' => FALSE,\n );\n\n //MESSENGER_OFFSET\n $form[MESSENGER_OFFSET] = array(\n '#type' => 'textfield',\n '#title' => t('Inbox Offset Height'),\n '#default_value' => variable_get(MESSENGER_OFFSET, 300),\n '#description' => t('Use offset to calculate height of inbox'),\n '#required' => FALSE,\n );\n\n return system_settings_form($form);\n\n\n}", "function update_sms_field_values()\n { \n $msg='';\n $status=0;\n \n if (isset($_POST['edit_sms_gateway'])) {\n \n if (DEMO) {\n $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2);\n redirect(URL_SMS_GATEWAYS);\n }\n \n $sms_gateway_id = $this->input->post('sms_gateway_id');\n \n if ($sms_gateway_id > 0) {\n $sms_gateway_details = $this->base_model->fetch_records_from(TBL_SETTINGS_FIELDS, array('sms_gateway_id'=>$sms_gateway_id));\n \n $sms_gateways = $this->base_model->fetch_records_from(\n TBL_SMS_GATEWAYS, array('sms_gateway_id'=>$sms_gateway_id)\n );\n \n if (empty($sms_gateway_details) || empty($sms_gateways)) {\n $msg .= get_languageword('record_not_found');\n $status=1;\n \n $this->prepare_flashmessage($msg, $status);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n } else {\n $this->data['sms_gateway_details']= $sms_gateway_details;\n \n $this->data['activemenu'] = \"master_settings\";\n $this->data['actv_submenu'] = 'sms_gateways';\n \n $this->data['pagetitle'] = $sms_gateways[0]->sms_gateway_name; \n $this->data['content'] = PAGE_SMS_UPDATE_FIELD_VALUES;\n $this->_render_page(TEMPLATE_ADMIN, $this->data);\n }\n } else {\n redirect(URL_SMS_GATEWAYS);\n }\n \n } else if (isset($_POST['update_sms_gateway'])) {\n \n if (DEMO) {\n $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2);\n redirect(URL_SMS_GATEWAYS);\n }\n \n $field_values = $this->input->post();\n \n foreach ($field_values as $field_id => $val) {\n $fld_id = explode('_', $field_id);\n \n if (is_array($fld_id) && isset($fld_id[1])) {\n \n $data = array();\n $data = array(\n 'field_output_value' => $val,\n 'updated' => date('Y-m-d H:i:s'));\n $where = array('field_id' => $fld_id[1]);\n $this->base_model->update_operation($data, TBL_SETTINGS_FIELDS, $where);\n unset($data, $where);\n }\n } \n $msg .= get_languageword('details_updated_successfully');\n $status=0;\n \n $this->prepare_flashmessage($msg, $status);\n redirect(URL_SMS_GATEWAYS, REFRESH); \n } else {\n redirect(URL_SMS_GATEWAYS);\n }\n }", "function send_sms()\n\t{\n\t\t$config['functions']['send_sms'] = array('function' => 'Xmlrpc.rpc_send_sms');\n\t\t$this->xmlrpcs->initialize($config);\n\t\t$this->xmlrpcs->serve();\n\t}", "public function email_sms_setting()\n\t{\n\t\t$data['email'] = $this->db->select('*')->from('sms_email_send_setup')->where('method','email')->get()->row();\n\t\t$data['sms'] = $this->db->select('*')->from('sms_email_send_setup')->where('method','sms')->get()->row();\n\t\t$data['title'] = display('fees_setting');\n\t\t$data['content'] = $this->load->view('backend/dashboard/email_and_sms_setting',$data,true);\n\t\t$this->load->view('backend/layout/main_wrapper',$data);\n\t}", "public function updateSmsSetting(Request $request)\n {\n //\n }", "public function sendsms(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n set_time_limit(3600);\n $redir=$this->CONT_ROOT.'?tab=sms';\n $form=$this->input->safe_post();\n $required=array('message');\n foreach ($required as $key) {\n if(!isset($form[$key]) || empty($form[$key])){\n $this->session->set_flashdata('error', 'Please enter message');\n redirect($redir);\n }\n }\n $mobile=$this->SETTINGS[$this->system_setting_m->_SMS_API_USERNAME];\n $apikey=$this->SETTINGS[$this->system_setting_m->_SMS_API_KEY];\n $mask=$this->SETTINGS[$this->system_setting_m->_SMS_MASK];\n if(!$this->is_valid_params($mobile,$apikey,$mask)){\n $this->session->set_flashdata('error', 'Invalid api details. Please update vendor api details first!!!');\n redirect($redir);\n }\n //////////////////////////////////////////////////////////////////\n $classes=$this->class_m->get_values_array('','name',array());\n $filter=array();\n\n if(isset($form['class_id']) && !empty($form['class_id'])){$filter['class_id']=$form['class_id'];}\n if(isset($form['group_id']) && !empty($form['group_id'])){$filter['group_id']=$form['group_id'];}\n if(isset($form['section_id']) && !empty($form['section_id'])){$filter['section_id']=$form['section_id'];}\n if(isset($form['student_id']) && !empty($form['student_id'])){$filter['student_id']=$form['student_id'];}\n $students=$this->student_m->get_rows($filter,array('select'=>'mid,student_id,name,mobile,father_name,roll_number,class_id,date'));\n\n if(count($students)<1){\n $this->session->set_flashdata('error', 'There are no students for selected criteria!!!');\n redirect($redir);\n }\n $message=htmlspecialchars_decode($form['message']);\n $i=0;\n $failed=0;\n $new_pass='';\n $ch=$this->open_curl();\n foreach ($students as $row) { \n $to=$row['mobile'];\n if(strlen($row['mobile'])>8){\n $i++; \n ///////////////////////////////////////\n if(strpos($message, \"{NEWPASSWORD}\") !== false){\n $new_pass=mt_rand(11111,99999);\n $this->student_m->save(array('password'=>$this->student_m->hash($new_pass)),$row['mid']);\n }\n ///////////////////////////////////////\n //conversion keys\n $key_vars=array(\n '{NAME}'=>$row['name'],\n '{ID}'=>$row['student_id'],\n '{ROLLNO}'=>$row['roll_number'],\n '{CLASS}'=>$classes[$row['class_id']],\n '{NEWPASSWORD}'=>$new_pass\n );\n ////////////////////////////////////////\n $sms=strtr($message, $key_vars);\n $this->send_message($ch,$mobile,$apikey,$mask,$to,$sms);\n }else{\n $failed++;\n } \n }\n $this->close_curl($ch);\n ////////////////////////////////////////////////////////////////////////////////\n $this->session->set_flashdata('success', 'Message sent to '.$i.' students and failed for '.$failed.' students.');\n redirect($redir);\n }", "function room_reservations_admin_settings_sms_add($form, &$form_state) {\n $form['carrier'] = array(\n '#title' => t('Wireless carrier'),\n '#type' => 'textfield',\n '#maxlength' => 50,\n '#size' => 50,\n '#description' => t('The name of the wireless carrier, such as !att or\n !verizon.', array(\n '!att' => 'AT&T',\n '!verizon' => 'Verizon',\n )),\n '#weight' => -20,\n );\n $form['domain'] = array(\n '#title' => t('Domain name'),\n '#type' => 'textfield',\n '#maxlength' => 50,\n '#size' => 50,\n '#description' => t('The domain name of the wireless carrier, such as\n !att or !verizon.', array(\n '!att' => '@txt.att.net',\n '!verizon' => '@vtext.com',\n )),\n '#weight' => -10,\n );\n $form['add_carrier']['add'] = array(\n '#type' => 'submit',\n '#value' => t('Add'),\n '#weight' => 100,\n );\n return $form;\n}", "public function update_sender()\n\t{\n\t\t$email = $this->input->post('email');\n\t\t$sms = $this->input->post('sms');\n\n\t\tif($email!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$email)->update('sms_email_send_setup',$data);\n\t\t}\n\t\tif($sms!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$sms)->update('sms_email_send_setup',$data);\n\t\t}\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\t\tredirect('backend/dashboard/setting/email_sms_setting');\n\t}", "function room_reservations_admin_settings_text($form, &$form_state) {\n $default_enable_text\n = _room_reservations_get_variable('enable_text');\n $default_from_address\n = _room_reservations_get_variable('from_address_sms');\n $default_confirmation_header_text\n = _room_reservations_get_variable('confirmation_header_text_sms');\n $default_confirmation_owner_text\n = _room_reservations_get_variable('confirmation_owner_text_sms');\n $default_reminder_header_text\n = _room_reservations_get_variable('reminder_header_text_sms');\n $default_reminder_owner_text\n = _room_reservations_get_variable('reminder_owner_text_sms');\n $tokens = array(\n '%reservation_name' => t('The name given to the reservation to identify it\n on the reservation calendar.'),\n '%room' => t('The room that has been reserved.'),\n '%month' => t('The full name of the month of the reservation date.'),\n '%month_number' => t('The month number of the reservation date.'),\n '%day' => t('The numeric day of the month of the reservation date.'),\n '%day_of_the_week' => t('The full name of the day of the week of the\n reservation date.'),\n '%time' => t('The time of the reservation.'),\n '%minutes' => t('The length of the reservation in minutes.'),\n );\n $token_display = '<p>' .\n t('The following tokens will be replaced with dynamic values in any of the\n fields below.') . '</p><ul>';\n foreach ($tokens as $key => $value) {\n $token_display .= '<li>' . $key . ' - ' . $value . '</li>';\n }\n $token_display .= '</ul>';\n $form['enable_text'] = array(\n '#title' => t('Enable SMS text messages.'),\n '#type' => 'checkbox',\n '#return_value' => 1,\n '#default_value' => $default_enable_text,\n '#description' => t('Enable the ability of users to receive reservation\n confirmations and reminders by text message.'),\n '#weight' => -120,\n );\n $form['from_address'] = array(\n '#title' => t('From address'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The from address on all text messages.'),\n '#default_value' => $default_from_address,\n '#weight' => -110,\n );\n $form['tokens'] = array(\n '#type' => 'fieldset',\n '#title' => t('Token values'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => -100,\n );\n $form['tokens']['values'] = array(\n '#value' => $token_display,\n );\n $form['confirmation_header'] = array(\n '#title' => t('Confirmation heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for confirmation text messages.'),\n '#default_value' => $default_confirmation_header_text,\n '#weight' => -97,\n );\n $form['confirmation_owner'] = array(\n '#title' => t('Confirmation body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation text message body.'),\n '#default_value' => $default_confirmation_owner_text,\n '#weight' => -95,\n );\n $form['reminder_header'] = array(\n '#title' => t('Reminder heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for reminder text messages.'),\n '#default_value' => $default_reminder_header_text,\n '#weight' => -85,\n );\n $form['reminder_owner'] = array(\n '#title' => t('Reminder body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder text message body.'),\n '#default_value' => $default_reminder_owner_text,\n '#weight' => -80,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}", "public function editSmsSetting()\n {\n return view('admin.setting.sms.edit');\n }", "public function update_sms_gateway()\n\t{\n\t\t$sms = $this->input->post('es_id');\n\t\t\n\t\t$pass = '';\n\t\t$password = $this->db->select('password')->from('email_sms_gateway')->where('es_id', 2)->get()->row();\n\t\t\n\t\tif($password->password == base64_decode($this->input->post('password'))){\n\t\t $pass = $password->password;\n\t\t \n\t\t}else{\n\t\t $pass = $this->input->post('password');\n\t\t \n\t\t}\n\n\t\t$data = array(\n\t\t\t'gatewayname' \t=>$this->input->post('gatewayname'),\n\t\t\t'title' \t\t=>$this->input->post('title'),\n\t\t\t'host' \t\t\t=>$this->input->post('host'),\n\t\t\t'user' \t\t\t=>$this->input->post('user'),\n\t\t\t'userid' \t\t=>$this->input->post('userid'),\n\t\t\t'password' \t\t=>$pass,\n\t\t\t'api' \t\t\t=>$this->input->post('api')\n\t\t);\n\n\t\t$this->db->where('es_id',$sms)->update('email_sms_gateway',$data);\n\n\t\t\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\t\t\n\t\t\n\t\tredirect('backend/dashboard/setting/sms_gateway');\n\t}", "public function save_smtp_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $smtp_settings_val = $this->input->post(\"smtp\");\n $config = '<?php ';\n foreach ($smtp_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_smtp_settings.php';\n\t\t\t\t file_put_contents($file, $config);\n $this->setErrorMessage('success', 'SMTP settings updated successfully','admin_adminlogin_smtp_settings_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_smtp_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "function gwm_initiate_twilio_settings() {\n\tif(isset($_POST[\"form2\"])) {\n\t\tif(isset($_POST['gwm_twilio_field_message']) && isset($_POST['gwm_twilio_field_numbers'])) {\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message1', wp_kses_post( $_POST['gwm_twilio_field_message1'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message2', wp_kses_post( $_POST['gwm_twilio_field_message2'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message3', wp_kses_post( $_POST['gwm_twilio_field_message3'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message4', wp_kses_post( $_POST['gwm_twilio_field_message4'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message5', wp_kses_post( $_POST['gwm_twilio_field_message5'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_message6', wp_kses_post( $_POST['gwm_twilio_field_message6'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_phone', wp_kses_post( $_POST['gwm_twilio_phone'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_key', wp_kses_post( $_POST['gwm_twilio_field_key'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_field_secret', wp_kses_post( $_POST['gwm_twilio_field_secret'] ) );\n\t\t\tupdate_usermeta( absint( get_current_user_id() ), 'gwm_twilio_myaccount_url', wp_kses_post( $_POST['gwm_twilio_myaccount_url'] ) );\n\t\t} else echo '<p>Please fill in the meassage to send.</p>';\n\t}\n\t//test_handle_post();\n\techo '<div class=\"wrap\">';\n\t\techo '<form method=\"post\" action=\"options.php\">'; ?>\n\t\t\t<?php settings_fields( 'gwm-twilio-sms-settings-group' ); ?>\n\t\t\t<?php do_settings_sections( 'gwm-twilio-sms-settings-group' ); ?>\n\t\t\t<?php\n\t\t\techo '<div class=\"wrap\">';\n\t\t\t\t?><a href=\"<?php get_home_url(); ?>/wp-admin/admin.php?page=gwm-twilio-sms-settings\">Settings</a> | <a href=\"<?php get_home_url(); ?>/wp-admin/admin.php?page=gwm-twilio-sms\">Send Texts</a><?php\n\t\t\t\techo '<p>Fill in the fields and hit save.</p>';\n\t\t\t\techo '<p>Account Phone <input type=\"text\" name=\"gwm_twilio_phone\" value=\"' . esc_attr( get_option('gwm_twilio_phone') ). '\" style=\"width:100%;\" />';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Account SID <input type=\"text\" name=\"gwm_twilio_field_key\" value=\"' . esc_attr( get_option('gwm_twilio_field_key') ). '\" style=\"width:100%;\" />';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Auth Token <input type=\"text\" name=\"gwm_twilio_field_secret\" value=\"' . esc_attr( get_option('gwm_twilio_field_secret') ) . '\" style=\"width:100%;\" />';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>My Account Url Segment - If you are using SEO keywords in the url segment my-account else leave blank.<input type=\"text\" name=\"gwm_twilio_myaccount_url\" value=\"' . esc_attr( get_option('gwm_twilio_myaccount_url') ) . '\" style=\"width:100%;\" />';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 1<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message1\">'. esc_attr( get_option('gwm_twilio_field_message1') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 2<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message2\">'. esc_attr( get_option('gwm_twilio_field_message2') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 3<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message3\">'. esc_attr( get_option('gwm_twilio_field_message3') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 4<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message4\">'. esc_attr( get_option('gwm_twilio_field_message4') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 5<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message5\">'. esc_attr( get_option('gwm_twilio_field_message5') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p>Message 6<br /><textarea style=\"width:100%;\" name=\"gwm_twilio_field_message6\">'. esc_attr( get_option('gwm_twilio_field_message6') ) .'</textarea>';\n\t\t\t\techo '</p>';\n\t\t\t\techo '<p><input type=\"submit\" class=\"button\" name=\"form2\" value=\"Save Settings\" /></p>';\n\t\t\techo '</div>';\n\t\techo '</form>';\n\techo '</div>';\n}", "function update_sms_field_values($sms_gateway_id='')\n\t{\t\t\n\t\tif($this->input->post()){\n\t\t\t$this->check_isdemo(URL_SMS_GATEWAYS);\n\t\t\t$field_values = $this->input->post();\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($field_values); die();\n\t\t\tforeach($field_values as $field_id => $val) {\n\t\t\t\t$fld_id = explode('_',$field_id);\n\t\t\t\tif(is_array($fld_id) && isset($fld_id[1])){\n\t\t\t\t\t$inputdata = array(\n\t\t\t\t\t\t'field_output_value' => $val,\n\t\t\t\t\t\t'updated' => date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t//\techo $fld_id[1];\t\n\t\t\t\t$where = array('field_id' => $fld_id[1]);\n\t\t\t//\tdie();\n\t\t\t\t$this->base_model->update_operation( $inputdata, TBL_SETTINGS_FIELDS, $where );\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\t\n\t\t\t$msg = (isset($this->phrases['updated successfully'])) ? $this->phrases['updated successfully'] : \"Updated Successfully\";\n\t\t $this->prepare_flashmessage($msg, 0);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\tif(empty($sms_gateway_id)){\n\t\t\t $msg = (isset($this->phrases['record not found'])) ? $this->phrases['record not found'] : \"Record not found\";\n\t\t $this->prepare_flashmessage($msg, 2);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\t$sms_gateway_details = $this->base_model->fetch_records_from(TBL_SETTINGS_FIELDS,array('sms_gateway_id'=>$sms_gateway_id));\n\t\t$sms_gateways \t\t\t\t\t\t= $this->base_model->fetch_records_from(\n\t\tTBL_SMS_GATEWAYS,array('sms_gateway_id'=>$sms_gateway_id));\n\t\tif(empty($sms_gateway_details) || empty($sms_gateways)){\n\t\t\t$msg = (isset($this->phrases['record not found'])) ? $this->phrases['record not found'] : \"Record not found\";\n\t\t $this->prepare_flashmessage($msg, 2);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\t\t\t\n\t\t$this->data['sms_gateway_details']\t\t= $sms_gateway_details;\n\t\t$this->data['active_class'] \t\t\t= ACTIVE_MASTER_SETTINGS;\n\t\t$this->data['title'] \t\t\t\t\t= $sms_gateways[0]->sms_gateway_name; \n\t\t$this->data['content'] \t\t\t\t\t= 'sms_update_field_values';\n\t\t$this->_render_page(TEMPLATE_ADMIN, $this->data);\n\t}", "function settings() {\n\t\tglobal $core, $db, $lang;\n\t\t$result = NULL;\n\n\t\tif(isset($_POST['save'])) {\n\t\t\t$error = 0;\n\t\t\tforeach($_POST as $key => $value) {\n\t\t\t\tif($key != 'save') {\n\t\t\t\t\t$query = $db->select('shoutbox_settings', array('field'=>$key));\n\t\t\t\t\t$record = $query[0];\n\t\t\t\t\tif(!$db->update('shoutbox_settings', array('field'=>$key), array($record['id'],$key,stripslashes($value)))) $error++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($error) $core->notify($lang['shoutbox']['update fail'],2);\n\t\t\telse $core->notify($lang['shoutbox']['update success'],1);\n\t\t}\n\n\t\t//Get settings from DB\n\t\tif($query = $db->select('shoutbox_settings')) {\n\t\t\tforeach((array)$query as $record) $settings[$record['field']] = $record['value'];\n\t\t\t//Define all inputs\n\t\t\t$form['top'] = '<form name=\"settings\" method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\">';\n\t\t\t\n\t\t\t$form['nick_min_chars'] = '<label>'.$lang['shoutbox']['nick min chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"nick_min_chars\" value=\"'.$settings['nick_min_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['nick_max_chars'] = '<label>'.$lang['shoutbox']['nick max chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"nick_max_chars\" value=\"'.$settings['nick_max_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['post_max_chars'] = '<label>'.$lang['shoutbox']['post max chars'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"post_max_chars\" value=\"'.$settings['post_max_chars'].'\" />';\n\t\t\t\t\n\t\t\t$form['posts_refresh_time'] = '<label>'.$lang['shoutbox']['posts reflash time'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"posts_refresh_time\" value=\"'.$settings['posts_refresh_time'].'\" />';\n\t\t\t\t\n\t\t\t$form['posts_limit'] = '<label>'.$lang['shoutbox']['posts limit'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"posts_limit\" value=\"'.$settings['posts_limit'].'\" />';\n\n\t\t\t$form['time_anti_flood'] = '<label>'.$lang['shoutbox']['time_anti_flood'].'\n\t\t\t\t</label>\n\t\t\t\t<input type=\"text\" name=\"time_anti_flood\" value=\"'.$settings['time_anti_flood'].'\" />';\n\t\t\t\n\t\t\t$form['save'] = '<button type=\"submit\" name=\"save\" value=\"save\">'.$lang['shoutbox']['save'].'</button>';\n\t\t\t\n\t\t\t$form['bottom'] = '</form>';\n\t\t\t\n\t\t\t//Return form\n\t\t\tforeach($form as $input) $result .= $input.\"\\n\";\n\t\t\treturn $result;\n\t\t}\n\t}", "public function sendstaffsms(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n\n set_time_limit(3600);\n $redir=$this->CONT_ROOT.'?tab=staffsms';\n $form=$this->input->safe_post();\n $required=array('message');\n foreach ($required as $key) {\n if(!isset($form[$key]) || empty($form[$key])){\n $this->session->set_flashdata('error', 'Please enter message');\n redirect($redir);\n }\n }\n $mobile=$this->SETTINGS[$this->system_setting_m->_SMS_API_USERNAME];\n $apikey=$this->SETTINGS[$this->system_setting_m->_SMS_API_KEY];\n $mask=$this->SETTINGS[$this->system_setting_m->_SMS_MASK];\n if(!$this->is_valid_params($mobile,$apikey,$mask)){\n $this->session->set_flashdata('error', 'Invalid api details. Please update api details first!!!');\n redirect($redir);\n }\n //////////////////////////////////////////////////////////////////\n $filter=array();\n if(isset($form['staff_id']) && !empty($form['staff_id'])){$filter['staff_id']=$form['staff_id'];}\n $teachers=$this->staff_m->get_rows($filter,array('select'=>'mid,staff_id,name,mobile,father_name,date'));\n\n if(count($teachers)<1){\n $this->session->set_flashdata('error', 'There are no staff for selected criteria!!!');\n redirect($redir);\n }\n $message=htmlspecialchars_decode($form['message']);\n $i=0;\n $failed=0;\n $new_pass='';\n $ch=$this->open_curl();\n foreach ($teachers as $row) { \n $to=$row['mobile'];\n if(strlen($row['mobile'])>8){\n $i++; \n ///////////////////////////////////////\n if(strpos($message, \"{NEWPASSWORD}\") !== false){\n $new_pass=mt_rand(11111,99999);\n $this->staff_m->save(array('password'=>$this->staff_m->hash($new_pass)),$row['mid']);\n }\n ///////////////////////////////////////\n //conversion keys\n $key_vars=array(\n '{NAME}'=>$row['name'],\n '{ID}'=>$row['staff_id'],\n '{NEWPASSWORD}'=>$new_pass\n );\n ////////////////////////////////////////\n $sms=strtr($message, $key_vars);\n $this->send_message($ch,$mobile,$apikey,$mask,$to,$sms);\n }else{\n $failed++;\n } \n }\n $this->close_curl($ch);\n ////////////////////////////////////////////////////////////////////////////////\n $this->session->set_flashdata('success', 'Message sent to '.$i.' teachers and failed for '.$failed.' teachers.');\n redirect($redir);\n }", "public function edit(sms $sms)\n {\n //\n }", "function schedulesms() {\n \t\t\n \t\tConfigure::write('debug', 0);\n \t\t\n \t\t$this->send(true, $_REQUEST['message'], $_REQUEST['mobile'], $_REQUEST['skey'], $_REQUEST['senderid'], \n \t\t\t\t\t\t\t$_REQUEST['group'], $_REQUEST['tag'], $_REQUEST['date'], $_REQUEST['response']);\n \t\t\n \t}", "public function send($config) {\n //echo $this->LMaccount_username.\"<br>\".$this->LMaccount_password.\"<br>\".$this->LMaccount_clientapi;exit;\n foreach ($config as $k => $v) {\n $this->$k = $v;\n }\n\n if (is_array($this->to)) {\n\t $to_str = implode(\"</msisdn><msisdn>\", $this->to);\n } else {\n\t $to_str = $this->to;\n }\n\n if(isset($this->sender)){\n\t $sender_str = \"<tpoa>\".$this->sender.\"</tpoa>\";\n } else {\n $sender_str = \"\";\n }\n\n $to_message = urlencode(htmlspecialchars($this->message, ENT_QUOTES));\n\n $url = 'https://api.labsmobile.com/clients/'.$this->LMaccount_clientapi.\"/\";\n $sms_format = \"<sms>\n <recipient>\n <msisdn>$to_str</msisdn>\n </recipient>\n $sender_str\n <message>$to_message</message>\n </sms>\";\n \n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n //curl_setopt($ch, CURLOPT_USERPWD, $this->LMaccount_username.':'.$this->LMaccount_password);\n curl_setopt($ch, CURLOPT_USERPWD, '[email protected]:mk43sc94');\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, 'XmlData='.$sms_format);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n $result = curl_exec($ch);\n curl_close($ch);\n \n if(stripos($result, \"<code>\") !== FALSE) {\n\t return $this->_xml_extract(\"code\", $result);\n } else {\n\t return 30;\n }\n }", "public function sms(){\n//\t$this->coreApp();\n}", "function admin_change_smtp_config()\n{\n global $app;\n\n $mail_data = $app->request()->put();\n $app->getLog()->debug('admin_change_smtp_configuration: ' . var_export($mail_data, true));\n $mail_config = [SMTP_USER => $mail_data['username'],\n SMTP_PASSWORD => $mail_data['password'],\n SMTP_SERVER => $mail_data['smtpserver'],\n SMTP_PORT => $mail_data['smtpport'],\n SMTP_ENCRYPTION => $mail_data['smtpenc']];\n $app->bbs->saveConfigs($mail_config);\n $resp = $app->response();\n $app->render('admin_mail.html', [\n 'page' => mkPage(getMessageString('admin_smtp'), 0, 2),\n 'mail' => $mail_data,\n 'encryptions' => mkEncryptions(),\n 'isadmin' => is_admin()]);\n}", "function btpay_mail_config_action()\n {\n global $wpdb;\n if (!empty($_POST))\n {\n if (isset($_POST['update_mail']))\n {\n $id = $_POST['update_mail'];\n btpay_handle_config_update();\n include BT_PLUGIN_DIR . '/pages/btpay-config-mail-page.php';\n }\n }\n else\n {\n include BT_PLUGIN_DIR . '/pages/btpay-config-mail-page.php';\n }\n }", "public function showSendSMSForm(\\App\\Request $request)\n\t{\n\t\t$sourceModule = $request->getModule();\n\t\t$moduleName = 'SMSNotifier';\n\t\t$selectedIds = $request->get('selected_ids');\n\t\t$excludedIds = $request->get('excluded_ids');\n\t\t$cvId = $request->get('viewname');\n\n\t\t$moduleModel = Vtiger_Module_Model::getInstance($sourceModule);\n\t\t$phoneFields = $moduleModel->getFieldsByType('phone');\n\t\t$viewer = $this->getViewer($request);\n\n\t\tif (is_array($selectedIds) && count($selectedIds) === 1) {\n\t\t\t$recordId = current($selectedIds);\n\t\t\t$selectedRecordModel = Vtiger_Record_Model::getInstanceById($recordId, $sourceModule);\n\t\t\t$viewer->assign('SINGLE_RECORD', $selectedRecordModel);\n\t\t}\n\t\t$viewer->assign('VIEWNAME', $cvId);\n\t\t$viewer->assign('MODULE', $moduleName);\n\t\t$viewer->assign('SOURCE_MODULE', $sourceModule);\n\t\t$viewer->assign('SELECTED_IDS', $selectedIds);\n\t\t$viewer->assign('EXCLUDED_IDS', $excludedIds);\n\t\t$viewer->assign('PHONE_FIELDS', $phoneFields);\n\n\t\t$searchKey = $request->get('search_key');\n\t\t$searchValue = $request->get('search_value');\n\t\t$operator = $request->get('operator');\n\t\tif (!empty($operator)) {\n\t\t\t$viewer->assign('OPERATOR', $operator);\n\t\t\t$viewer->assign('ALPHABET_VALUE', $searchValue);\n\t\t\t$viewer->assign('SEARCH_KEY', $searchKey);\n\t\t}\n\n\t\t$searchParams = $request->get('search_params');\n\t\tif (!empty($searchParams)) {\n\t\t\t$viewer->assign('SEARCH_PARAMS', $searchParams);\n\t\t}\n\n\t\techo $viewer->view('SendSMSForm.tpl', $moduleName, true);\n\t}", "public function actionSendSMSCommand()\n {\n $form = new SMSCommandSendForm();\n\n /**\n * Update sms status\n */\n if (isset($_GET['view_id']) || isset($_GET['sms_command_id'])) {\n if (isset($_GET['view_id'])) $form->setSMS(SMSCommand::model()->findByPk($_GET['view_id']));\n if (isset($_GET['sms_command_id'])) $form->setSMS(SMSCommand::model()->findByPk($_GET['sms_command_id']));\n if (Yii::app()->request->isAjaxRequest) {\n return $this->renderPartial('__sms_command_status', ['sms' => $form->getSMS()]);\n }\n }\n\n /**\n * Delete sms\n */\n if (isset($_GET['delete_id'])) {\n SMSCommand::model()->deleteByPk($_GET['delete_id']);\n }\n\n /**\n * Create sms\n */\n if (isset($_POST['SMSCommandSendForm'])) {\n if ($_POST['send']) {\n $form->setScenario($form::SCENARIO_SEND);\n $form->setAttributes($_POST['SMSCommandSendForm']);\n\n if ($form->validate()) {\n $form->getSMS()->setAttributes($form->getAttributes());\n\n if ($form->getSMS()->save()) {\n $form = (new SMSCommandSendForm())->setSMS(SMSCommand::model()->findByPk($form->getSMS()->sms_command_id));\n Yii::app()->user->setFlash('SendSMSCommandForm_success', \"Command send!\");\n }\n }\n }\n }\n\n /**\n * Grid\n */\n\n if (isset($_POST['date_range'])) {\n\n if (preg_match(\"/([\\d]{1,2})\\/([\\d]{1,2})\\/([\\d]{2,4})/i\",$_POST['SMSCommand']['updated_from'],$matches1)) {\n $dateFromViewFormat = $matches1[0];\n $dateFrom = $matches1[3].'-'.$matches1[1].'-'.$matches1[2].' 00:00:00';\n Yii::app()->request->cookies['dateFrom'] = new CHttpCookie('dateFrom', $dateFromViewFormat);\n Yii::app()->request->cookies['from_date'] = new CHttpCookie('from_date', $dateFrom);\n } else {\n unset(Yii::app()->request->cookies['dateFrom']);\n unset(Yii::app()->request->cookies['from_date']);\n }\n\n if (preg_match(\"/([\\d]{1,2})\\/([\\d]{1,2})\\/([\\d]{2,4})/i\",$_POST['SMSCommand']['updated_to'],$matches2)) {\n $dateToViewFormat = $matches2[0];\n $dateTo = $matches2[3].'-'.$matches2[1].'-'.$matches2[2].' 23:59:59';\n Yii::app()->request->cookies['dateTo'] = new CHttpCookie('dateTo', $dateToViewFormat);\n Yii::app()->request->cookies['to_date'] = new CHttpCookie('to_date', $dateTo);\n } else {\n unset(Yii::app()->request->cookies['dateTo']);\n unset(Yii::app()->request->cookies['to_date']);\n }\n\n }\n\n if (isset($_GET['reset'])) {\n unset(Yii::app()->request->cookies['dateFrom']);\n unset(Yii::app()->request->cookies['dateTo']);\n unset(Yii::app()->request->cookies['from_date']);\n unset(Yii::app()->request->cookies['to_date']);\n }\n\n\n $SMSCommand = new SMSCommand();\n $SMSCommand->unsetAttributes();\n\n $SMSCommand->from_date = Yii::app()->request->cookies['from_date'];\n $SMSCommand->to_date = Yii::app()->request->cookies['to_date'];\n\n if ($_GET['SMSCommand']) {\n $SMSCommand->attributes = $_GET['SMSCommand'];\n }\n $dataProvider = $SMSCommand->search();\n\n //csv\n if ($_GET['getcsv']) {\n $items = $dataProvider->model->findAll($dataProvider->criteria);\n if (!is_null($items)) {\n\n $data = array();\n foreach ($items as $item) {\n $dataItem = $item->getAttributes();\n $data[] = $dataItem;\n }\n\n $ECSVExporter = new ECSVExporter($data);\n It::downloadFile($ECSVExporter->getString(), 'csv.csv', 'text/csv');\n exit;\n }\n }\n\n return $this->render('send_sms_command',['form' => $form, 'dataProvider' => $dataProvider,'dateFrom'=>Yii::app()->request->cookies['dateFrom'], 'dateTo'=>Yii::app()->request->cookies['dateTo']]);\n }", "public function setSendSMS($send_sms){\n $this->send_sms = $send_sms;\n }", "public function updateScheduleSMS()\n {\n return view('client.update-schedule-sms');\n }", "public function processConfiguration()\n\t{\n\t\t// Check if the value sent on form submit matches one of either $_POST or $_GET keys \n\t\tif (Tools::isSubmit('submit_emailmystock_form'))\n\t\t{\n\t\t\t$enable_emails = Tools::getValue('enable_emails');\n\t\t\t// Update configuration value to database\n\t\t\tConfiguration::updateValue('MYMOD_EMAILS', $enable_emails);\n\t\t\t// Allows the Smarty object to display a confirmation message when the configuration is saved (see top of getContent.tpl)\n\t\t\t$this->context->smarty->assign('confirmation', 'ok');\n\t\t}\n\t}", "public function update(Request $request, sms $sms)\n {\n //\n }", "public function admin_smtp_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n\t\t\t if ($this->lang->line('admin_settings_smtp_settings') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_settings_smtp_settings')); \n\t\t else $this->data['heading'] = 'SMTP Settings';\n $this->data['admin_settings'] = $result = $this->admin_model->get_selected_fields(ADMIN, array(), array('smtp'));\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/smtp_settings', $this->data);\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "public function actionSms() {\n// $model->sendSms(13760671419, 112,ApiMember::SMS_TYPE_ONLINE_ORDER,0,ApiMember::SKU_SEND_SMS);\n }", "public function sms($phone,$message)\n\t{\n\t\t// max of 160 characters\n\t\t// to get a unique name make payment of 8700 to Africastalking/SMSLeopard\n\t\t// unique name should have a maximum of 11 characters\n\t\t\n\t\tif (substr($phone, 0, 1) === '0') \n\t\t{\n\t\t\t$phone = ltrim($phone, '0');\n\t\t}\n\t\t\n\t\t$phone_number = '+254'.$phone;\n\t\t//$phone_number = $phone;\n\t\t// get items \n\n\t\t$configuration = $this->admin_model->get_configuration();\n\n\t\t$mandrill = '';\n\t\t$configuration_id = 0;\n\t\t\n\t\tif($configuration->num_rows() > 0)\n\t\t{\n\t\t\t$res = $configuration->row();\n\t\t\t$configuration_id = $res->configuration_id;\n\t\t\t$mandrill = $res->mandrill;\n\t\t\t$sms_key = $res->sms_key;\n\t\t\t$sms_user = $res->sms_user;\n\n\t\t\t$actual_message = $message;\n\t\t\t// var_dump($actual_message); die();\n\t\t\t// get the current branch code\n\t\t\t$params = array('username' => $sms_user, 'apiKey' => $sms_key); \n\t\n\t\t\t$this->load->library('africastalkinggateway', $params);\n\t\t\t// var_dump($params)or die();\n\t\t\t// Send the message\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message, $sms_from=22384);\n\t\t\t\t$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message);\n\t\t\t\t\n\t\t\t\t//var_dump($results);die();\n\t\t\t\t$number = $phone_number;\n\t\t\t\t$status = 'unsent';\n\t\t\t\t\n\t\t\t\tforeach($results as $result) \n\t\t\t\t{\n\t\t\t\t\t$number = $result->number;\n\t\t\t\t\t$status = $result->status;\n\t\t\t\t\t$messageId = $result->messageId;\n\t\t\t\t\t$cost = $result->cost;\n\t\t\t\t\t// status is either \"Success\" or \"error message\"\n\t\t\t\t\t// echo \" Number: \" .$result->number;\n\t\t\t\t\t// echo \" Status: \" .$result->status;\n\t\t\t\t\t// echo \" MessageId: \" .$result->messageId;\n\t\t\t\t\t// echo \" Cost: \" .$result->cost.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$save_data = array(\n\t\t\t\t\t\"sms_result_message\" => $actual_message,\n\t\t\t\t\t\"sms_result_phone\" => $phone_number,\n\t\t\t\t\t\"message_id\" => $messageId,\n\t\t\t\t\t\"sms_result_cost\" => $cost,\n\t\t\t\t\t\"created\" => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\tif($this->db->insert('sms_result', $save_data))\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number.'. Response not saved';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcatch(AfricasTalkingGatewayException $e)\n\t\t\t{\n\t\t\t\t// echo \"Encountered an error while sending: \".$e->getMessage();\n\t\t\t\treturn $e->getMessage();\n\t\t\t}\n\t \n\t\t}\n\t else\n\t {\n\t return 'Configuration not set';\n\t }\n }", "function tvchat_config_form()\n{\n $config = _tvchat_query();\n\n /* check in */\n $form['checkin'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Check In'),\n\t\t'#description' => t('Check In 기능에 대한 설정'),\n );\n\n $form['checkin']['max_checkin_day'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('하루 최대 Check In 회수 '),\n\t\t'#weight' => 0,\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['max_checkin_day'],\n\t\t'#description' => t('하루에 최대로 Check In 할 수 있는 회수'),\n );\n\n $form['checkin']['reset_checkin'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('어제까지의 체크인 내역 초기화'),\n\t\t'#weight' => 1,\n\t\t'#default_value' => 0,\n\t\t'#description' => t('어제까지의 모든 체크인 내역을 초기화한다.'),\n );\n\n $form['checkin']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n\t\t'#weight' => 2,\n );\n\n\t/* TV Show */\n $form['tvshow'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('TV 프로그램 등수 산정 가중치'),\n\t\t'#description' => t('각 TV 프로그램의 등수 산정을 위한 가중치'),\n );\n\n $form['tvshow']['checkin_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Check In 회수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['checkin_count'],\n\t\t'#description' => t('Check In 회수에 대한 가중치'),\n );\n\n $form['tvshow']['favorite_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Follow 사용자 수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['favorite_count'],\n\t\t'#description' => t('Follow 사용자수에 대한 가중치'),\n );\n\n $form['tvshow']['comment_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Comment 사용자 수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['comment_count'],\n\t\t'#description' => t('Comment 사용자수에 대한 가중치'),\n );\n\n $form['tvshow']['rate_now'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('TV 프로그램 등수 계산'),\n\t\t'#default_value' => 0,\n\t\t'#description' => t('어제까지의 사용자 활동 내역을 바탕으로 TV 프로그램 등수를 계산한다.'),\n );\n\n\n $form['tvshow']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n\t/* TV Episode */\n $form['episode'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('TV 프로그램 에피소드 관리'),\n\t\t'#description' => t('각 TV 프로그램의 에피소드에 대한 설정 관리'),\n );\n\n $form['episode']['create_episode'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('오늘 방송될 에피소드 생성'),\n\t\t'#default_value' => 0,\n\t\t'#description' => t('오늘 방송될 에피소드를 생성한다.'),\n );\n\n $form['episode']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n\t/* TV Chat Configuration */\n $form['environ'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple 환경 설정 관리'),\n\t\t'#description' => t('각 TV 프로그램의 에피소드에 대한 설정 관리'),\n );\n\n $form['environ']['dir_timetable'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('TimeTable Directory'),\n\t\t'#default_value' => '/var/www/data/timetable',\n\t\t'#description' => t('편성표가 저장되는 장소이다.'),\n );\n\n $form['environ']['max_top_show'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('인기 프로그램 수'),\n\t\t'#size' => 5,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => 5,\n\t\t'#description' => t('매일 변경되는 인기 프로그램의 갯수'),\n );\n\n $form['environ']['url_intro_shorten'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Introduction Page URL (shorten)'),\n\t\t'#default_value' => 'http://goo.gl/VL6Ww',\n\t\t'#description' => t('teeple의 소개페이지 URL이다.'),\n );\n\n $form['environ']['apns_request_url'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('APNS REQUEST URL '),\n\t\t'#default_value' => 'http://newbiz.uangel.com/tvchat/ApnsPHP/sample_push.php',\n\t\t'#description' => t('teeple의 APNS request URL이다.'),\n );\n\n $form['environ']['xmpp_send_cmd'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('XMPP Send Command'),\n\t\t'#default_value' => 'echo newbiz.123 | sudo -S /usr/sbin/ejabberdctl send_message_chat %s %s \\'%s\\'',\n\t\t'#description' => t('teeple의 APNS request URL이다.'),\n );\n\n $form['environ']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n /* SMS Link Configuration */\n $form['smsgw'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple SMS 링크 설정 관리'),\n\t\t'#description' => t('Teeple SMS 링크에 대한 설정 관리'),\n );\n\n $form['smsgw']['cmp_usr_id'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('CMP USER ID'),\n\t\t'#default_value' => '21105',\n\t\t'#description' => t('SMS링크 전달 Unique ID.'),\n );\n\n $form['smsgw']['snd_phn_id'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('SMS 전송자 폰 번호'),\n\t\t'#default_value' => '0317103953',\n\t\t'#description' => t('SMS 전송자 폰 번호임.'),\n );\n\n $form['smsgw']['callback'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('SMS 전송자 번호 - phone에 표시됨'),\n\t\t'#default_value' => '0317103953',\n\t\t'#description' => t('SMS 전송자 번호 - 받는 사람 폰에 표시되는 번호'),\n );\n\n $form['smsgw']['auth_msg'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('인증 번호 전송 메시지'),\n\t\t'#default_value' => '귀하의 인증 번호는 [%s]입니다.',\n\t\t'#description' => t('인증 번호 전송 메시지'),\n );\n\n $form['smsgw']['invite_msg'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('서비스 초대 메시지'),\n\t\t'#default_value' => '친구 %s(%s)분이 Teeple서비스(%s)에 초대하셨습니다.',\n\t\t'#description' => t('서비스 초대 메시지'),\n );\n\n $form['smsgw']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n /* Tracking Configuration */\n $form['tracking'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple Tracking을 위한 설정 관리'),\n\t\t'#description' => t('Teeple Service Tracking을 위한 설정 관리'),\n );\n\n $form['tracking']['usernames_for_tracking'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('User names for tracking '),\n\t\t'#default_value' => '[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]',\n\t\t'#description' => t('User names for tracking.'),\n );\n\n $form['tracking']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n return $form;\n}", "function tvchat_config_form_submit( $form, &$form_state)\n{\n\t$config = array(\n\t\t'max_checkin_day' => $form_state['values']['max_checkin_day'],\n\t\t'reset_checkin' => $form_state['values']['reset_checkin'],\n\t\t'checkin_count' => $form_state['values']['checkin_count'],\n\t\t'favorite_count' => $form_state['values']['favorite_count'],\n\t\t'comment_count' => $form_state['values']['comment_count'],\n\t\t'rate_now' => $form_state['values']['rate_now'],\n\t\t'create_episode' => $form_state['values']['create_episode'],\n\t\t'dir_timetable' => $form_state['values']['dir_timetable'],\n\t\t'apns_request_url' => $form_state['values']['apns_request_url'],\n\t\t'xmpp_send_cmd' => $form_state['values']['xmpp_send_cmd'],\n\t\t'url_intro_shorten' => $form_state['values']['url_intro_shorten'],\n\t\t'max_top_show' => $form_state['values']['max_top_show'],\n\t\t'cmp_usr_id' => $form_state['values']['cmp_usr_id'],\n\t\t'snd_phn_id' => $form_state['values']['snd_phn_id'],\n\t\t'callback' => $form_state['values']['callback'],\n\t\t'auth_msg' => $form_state['values']['auth_msg'],\n\t\t'invite_msg' => $form_state['values']['invite_msg'],\n\t\t'usernames_for_tracking' => $form_state['values']['usernames_for_tracking'],\n\t);\n\n//\tdrupal_set_message( print_r( $form_state, TRUE).'\\n'.print_r( $config, TRUE));\n\n $result = _tvchat_update( $config);\n if ( $result) {\n drupal_set_message( t('Configuration updated successfully.'));\n }\n else {\n drupal_set_message( t('Failed to update configuration.'));\n }\n}", "public function displaySendSingleSMS()\n {\n if (Tools::getValue('SEND_SINGLE_SMS_MOBILE') == null) {\n $this->context->smarty->assign('smsMobileNo', '');\n }\n if (Tools::getValue('SEND_SINGLE_SENDER_ID') == null) {\n $this->context->smarty->assign('smsSenderid', '');\n }\n if (Tools::getValue('SEND_SINGLE_SMS_LABEL') == null) {\n $this->context->smarty->assign('smsLabel', '');\n }\n if (Tools::getValue('SEND_SINGLE_SMS_TEMPLATE') == null) {\n $this->context->smarty->assign('smsTemplate', '');\n }\n if (Tools::getValue('SEND_SIGNLE_SMS_BODY') == null) {\n $this->context->smarty->assign('templateBody', '');\n }\n if (_PS_VERSION_ > 1.5) {\n return $this->display(__FILE__, 'send_single_sms.tpl');\n } else {\n return $this->display(dirname(__FILE__), '/views/templates/front/send_single_sms.tpl');\n }\n }", "public function sendSMSWithApplyLink(){\n\t}", "function w2s_dashboard_widget_setup() {\n\t\n\t// Save the data\n\tif ( isset( $_POST['widget_id'] ) && ( $_POST['widget_id'] == 'way2sms-wp-plugin' ) )\n\t\tupdate_option( 'way2sms', array( 'username' => $_POST['way2sms_username'], 'password' => $_POST['way2sms_password'] ) );\n\t\n\t// Build the form\n\t$way2sms = get_option( 'way2sms' );\n?>\n\t<style type=\"text/css\">\n\t\t#way2sms-wp-plugin .dashboard-widget-control-form label {\n\t\t\twidth: 70px;\n\t\t\tdisplay: block;\n\t\t\tfloat: left;\n\t\t\tpadding-top:5px;\n\t\t}\n\t</style>\n\t<label for=\"way2sms_username\">Username</label>\n\t<input type=\"text\" name=\"way2sms_username\" id=\"way2sms_username\" value=\"<?php echo $way2sms['username']; ?>\" />\n\t<br />\n\t<label for=\"way2sms_password\">Password</label>\n\t<input type=\"password\" name=\"way2sms_password\" id=\"way2sms_password\" value=\"<?php echo $way2sms['password']; ?>\" />\n\t\n<?php\n}", "function room_reservations_admin_settings_mobile_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $mobile_url = trim($form_state['values']['mobile_url']);\n $main_database = trim($form_state['values']['main_database']);\n $confirmation = ROOM_RESERVATIONS_SAVE_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_SAVE_ERROR_MSG;\n }\n elseif ($form_state['clicked_button']['#value'] == t('Reset to defaults')) {\n $mobile_url = '';\n $main_database = '';\n $confirmation = ROOM_RESERVATIONS_RESET_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_RESET_ERROR_MSG;\n }\n $errors = FALSE;\n $result = _room_reservations_set_variable('mobile_url', $mobile_url);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('main_database', $main_database);\n if (!$result) {\n $errors = TRUE;\n }\n if ($errors) {\n drupal_set_message(check_plain($error), 'error');\n }\n else {\n drupal_set_message(check_plain($confirmation));\n }\n}", "public function updateBasicSettings()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\n\t\t$this->initBasicSettingsForm();\n\n\t\tif ($this->form->checkInput())\n\t\t{\n\t\t\tif (ilUtil::isWindows())\n\t\t\t{\n\t\t\t\t$fs = array(\"datadir_path\", \"log_path\", \"convert_path\", \"zip_path\",\n\t\t\t\t\t\"unzip_path\", \"ghostscript_path\", \"java_path\", \"htmldoc_path\", \"ffmpeg_path\");\n\t\t\t\tforeach ($fs as $f)\n\t\t\t\t{\n\t\t\t\t\t$_POST[$f] = str_replace(\"\\\\\", \"/\", $_POST[$f]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$this->setup->checkLogSetup($_POST))\n\t\t\t{\n\t\t\t\t$i = $this->form->getItemByPostVar(\"log_path\");\n\t\t\t\t$i->setAlert($this->lng->txt($this->setup->getError()));\n\t\t\t\tilUtil::sendFailure($this->lng->txt(\"form_input_not_valid\"),true);\n\t\t\t}\n\t\t\telse if (!$this->setup->updateMasterSettings($_POST))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tilUtil::sendSuccess($this->lng->txt(\"settings_saved\"),true);\n\t\t\t\tilUtil::redirect(\"setup.php?cmd=mastersettings\");\n\t\t\t}\n\t\t}\n\n\t\t$this->form->setValuesByPost();\n\t\t$this->changeMasterSettings(true);\n\t}", "function simplenews_node_tab_send_form_handler_update($form, $form_state) {\n return empty($form['simplenews']['recipient_handler_settings']) ? array('#markup' => '<div id=\"recipient-handler-settings\"></div>') : $form['simplenews']['recipient_handler_settings'];\n}", "function oncall_config_extra_form($form, &$form_state) {\n $form['intro'] = array(\n '#type' => 'item', \n '#markup' => t('A few additional settings for the On Call module'),\n );\n\n $form['oncall_phone_number'] = array(\n '#type' => 'textfield',\n '#title' => t('Application Phone Number'),\n '#default_value' => variable_get('oncall_phone_number', ''),\n '#description' => t('Your application phone number is your Twilio number that will be used to access this On Call module. This is needed here to send SMS messages.'),\n );\n\n $form['oncall_validate_phone'] = array(\n '#type' => 'select', \n '#title' => t('Phone Number Validation'), \n '#default_value' => variable_get('oncall_validate_phone', 'us'), \n '#empty_option' => t('No Validation'), \n '#options' => array('us' => 'United States', 'uk' => 'United Kingdom', 'uae' => 'United Arab Emirates', 'nz' => 'New Zealand'), \n '#tree' => FALSE, \n '#description' => t('Should the phone number entered by team members be validated? And if so, what country phone number pattern should it be validated against?'),\n );\n\n // times are 6 hours, 12 hours, 18 hours, 1 day, 2 days, 1 week --- 6 hours = 6*60*60 = 21600\n $form['oncall_expire_status_msg'] = array(\n '#type' => 'select', \n '#title' => t('Status Message Expiration'), \n '#default_value' => variable_get('oncall_expire_status_msg', 86400), \n '#options' => array(0 => t('Never')) + drupal_map_assoc(array(21600, 43200, 64800, 86400, 172800, 604800), 'format_interval'),\n '#tree' => FALSE,\n '#description' => t('How much time should pass before the most recent status message expires? Expired messages will not play on the phone message.'),\n );\n\n return system_settings_form($form);\n}", "function room_reservations_admin_settings_mobile($form, &$form_state) {\n $default_mobile_url = _room_reservations_get_variable('mobile_url');\n $default_main_database = _room_reservations_get_variable('main_database');\n $form['mobile_url'] = array(\n '#title' => t('Mobile site url'),\n '#type' => 'textfield',\n '#description' => t('Display the mobile version of Room Reservations for this url.'),\n '#default_value' => $default_mobile_url,\n '#maxlength' => 80,\n '#size' => 80,\n '#weight' => -90,\n );\n $form['main_database'] = array(\n '#title' => t('Main site database name'),\n '#type' => 'textfield',\n '#description' => t('Enter the name of the database used by your main (non-mobile) website.'),\n '#default_value' => $default_main_database,\n '#maxlength' => 80,\n '#size' => 80,\n '#weight' => -80,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n\n return $form;\n}", "function Admin_Messages_admin_updateconfig()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n $itemsperpage = pnVarCleanFromInput('itemsperpage');\n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n return true;\n }\n\n // Update module variables. Note that depending on the HTML structure used\n // to obtain the information from the user it is possible that the values\n // might be unset, so it is important to check them all and assign them\n // default values if required\n if (empty($itemsperpage)) {\n $itemsperpage = 10;\n }\n pnModSetVar('Admin_Messages', 'itemsperpage', $itemsperpage);\n\n // Let any other modules know that the modules configuration has been updated\n pnModCallHooks('module','updateconfig','Admin_Messages', array('module' => 'Admin_Messages'));\n\n\t// the module configuration has been updated successfuly\n\tpnSessionSetVar('statusmsg', _CONFIGUPDATED);\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n\n // Return\n return true;\n}", "function oncall_config_form_submit($form, &$form_state) {\n // set all team members to zero, then update the team member to leader\n db_update('oncall_team')\n ->fields(array('leader' => 0))\n ->execute();\n\n db_update('oncall_team')\n ->fields(array('leader' => 1))\n ->condition('ocid', $form_state['values']['oncall_point'], '=')\n ->execute();\n \n variable_set('oncall_sms_msg', $form_state['values']['oncall_sms']);\n\n $welcome_msg = $form_state['values']['oncall_welcome'];\n oncall_save_uploaded_message($welcome_msg, 'welcome');\n\n $nostatus_msg = $form_state['values']['oncall_nostatus'];\n oncall_save_uploaded_message($nostatus_msg, 'nostatus');\n}", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "function mci_twilio_admin_form($form, &$form_state) {\n $form['mci_twilio_account'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Account SID'),\n '#default_value' => variable_get('mci_twilio_account'),\n '#description' => t('Enter your Twilio account id'),\n );\n $form['mci_twilio_token'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Auth Token'),\n '#default_value' => variable_get('mci_twilio_token'),\n '#description' => t('Enter your Twilio token id'),\n );\n $form['mci_twilio_number'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Phone Number'),\n '#default_value' => variable_get('mci_twilio_number'),\n '#description' => t('Enter your Twilio phone number'),\n );\n\n $form['mci_twilio_country_codes_container'] = array(\n '#type' => 'fieldset',\n '#title' => t('Country codes'),\n '#description' => t('Select the country codes you would like available, If none are selected all will be available.'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['mci_twilio_country_codes_container']['twilio_country_codes'] = array(\n '#type' => 'checkboxes',\n '#options' => mci_twilio_country_codes(TRUE),\n '#default_value' => variable_get('mci_twilio_country_codes', array()),\n );\n\n return system_settings_form($form);\n}", "function isms_component_send_sms($args, &$outargs)\n{\n\n $number = grab_array_var($args, \"number\");\n $message = grab_array_var($args, \"message\");\n\n // bail if empty number or message\n if ($number == \"\" || $message == \"\")\n return 1;\n\n // load settings\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n\n $address = grab_array_var($settings, \"address\");\n $http_port = grab_array_var($settings, \"http_port\");\n $username = grab_array_var($settings, \"username\");\n $password = grab_array_var($settings, \"password\");\n\n // bail out if we don't have the required info\n if ($address == \"\" || $http_port == \"\" || $username == \"\" || $password == \"\")\n return 1;\n\n // construct the URL for the send API\n $url = \"http://\" . $address . \":\" . $http_port . \"/sendmsg?user=\" . $username . \"&passwd=\" . $password . \"&cat=1&to=\\\"\" . urlencode($number) . \"\\\"&text=\" . rawurlencode($message);\n\n // send the request\n $urloutput = load_url($url, array('method' => 'get', 'return_info' => false));\n\n // check output for indication of success\n $res = strpos($urloutput, \"ID:\");\n if ($res === FALSE)\n return 1;\n\n $outargs = array();\n $outargs[\"url\"] = $url;\n $outargs[\"result\"] = $urloutput;\n\n return 0;\n}", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "public function actionConfig()\n {\n $form = new ConfigureForm();\n \n $form->gcmAPIKey = Setting::Get('gcmAPIKey', 'gcm');\n //$form->gcmURL = Setting::Get('gcmURL', 'gcm');\n if (!$form->gcmURL = Setting::Get('gcmURL', 'gcm')) $form->gcmURL = 'https://android.googleapis.com/gcm/send';\n if ($form->load(Yii::$app->request->post()) && $form->validate()) {\n $form->gcmAPIKey = Setting::Set('gcmAPIKey', $form->gcmAPIKey, 'gcm');\n $form->gcmURL = Setting::Set('gcmURL', $form->gcmURL, 'gcm');\n return $this->redirect(['/gcm/config/config']);\n }\n\n return $this->render('config', array(\n 'model' => $form\n ));\n }", "function simplenews_admin_settings_mail($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_mail_backend']['simplenews_use_cron'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use cron to send newsletters'),\n '#default_value' => variable_get('simplenews_use_cron', TRUE),\n '#description' => t('When checked cron will be used to send newsletters (recommended). Test newsletters and confirmation emails will be sent immediately. Leave unchecked for testing purposes.'),\n );\n\n $sources = simplenews_get_source_caches();\n $sources_labels = array();\n $sources_descriptions = '';\n foreach ($sources as $name => $source) {\n $sources_labels[$name] = $source['label'];\n $sources_descriptions .= t('<strong>@label</strong>: @description <br />', array('@label' => $source['label'], '@description' => $source['description']));\n }\n\n $form['simplenews_mail_backend']['simplenews_source_cache'] = array(\n '#type' => 'select',\n '#title' => t('Cache'),\n '#description' => t('Chosing a different cache implementation allows for a different behavior during sending mails.') . '<br /><br />' . $sources_descriptions,\n '#options' => $sources_labels,\n '#default_value' => variable_get('simplenews_source_cache', 'SimplenewsSourceCacheBuild'),\n );\n\n $throttle = drupal_map_assoc(array(1, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000));\n $throttle[SIMPLENEWS_UNLIMITED] = t('Unlimited');\n if (function_exists('getrusage')) {\n $description_extra = '<br />' . t('Cron execution must not exceed the PHP maximum execution time of %max seconds. You find the time spend to send emails in the <a href=\"/admin/reports/dblog\">Recent log entries</a>.', array('%max' => ini_get('max_execution_time')));\n }\n else {\n $description_extra = '<br />' . t('Cron execution must not exceed the PHP maximum execution time of %max seconds.', array('%max' => ini_get('max_execution_time')));\n }\n $form['simplenews_mail_backend']['simplenews_throttle'] = array(\n '#type' => 'select',\n '#title' => t('Cron throttle'),\n '#options' => $throttle,\n '#default_value' => variable_get('simplenews_throttle', 20),\n '#description' => t('Sets the numbers of newsletters sent per cron run. Failure to send will also be counted.') . $description_extra,\n );\n $form['simplenews_mail_backend']['simplenews_spool_expire'] = array(\n '#type' => 'select',\n '#title' => t('Mail spool expiration'),\n '#options' => array(\n 0 => t('Immediate'),\n 1 => format_plural(1, '1 day', '@count days'),\n 7 => format_plural(1, '1 week', '@count weeks'),\n 14 => format_plural(2, '1 week', '@count weeks'),\n ),\n '#default_value' => variable_get('simplenews_spool_expire', 0),\n '#description' => t('Newsletter mails are spooled. How long must messages be retained in the spool after successful sending. Keeping the message in the spool allows mail statistics (which is not yet implemented). If cron is not used, immediate expiration is advised.'),\n );\n $form['simplenews_mail_backend']['simplenews_debug'] = array(\n '#type' => 'checkbox',\n '#title' => t('Log emails'),\n '#default_value' => variable_get('simplenews_debug', FALSE),\n '#description' => t('When checked all outgoing simplenews emails are logged in the system log. A logged email does not guarantee that it is send or will be delivered. It only indicates that a message is sent to the PHP mail() function. No status information is available of delivery by the PHP mail() function.'),\n );\n return system_settings_form($form);\n}", "private function getConfigurationForm()\n {\n $form = array(\n 'form' => array(\n 'id_form' => 'module_config',\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => array(\n array(\n 'label' => $this->l('Enable/Disable'),\n 'type' => 'switch',\n 'name' => 'kbpushnotification[enable]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable the plugin')\n ),\n array(\n 'label' => $this->l('Enable/Disable Order Status Update'),\n 'type' => 'switch',\n 'name' => 'kbpushnotification[enable_order_status]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable the order status update')\n ),\n array(\n 'label' => $this->l('Enable/Disable Abandoned Cart alert'),\n 'type' => 'switch',\n 'name' => 'kbpushnotification[enable_abandoned_cart]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable the abandoned cart alert')\n ),\n array(\n 'label' => $this->l('Enable/Disable Product Price alert'),\n 'type' => 'switch',\n 'name' => 'kbpushnotification[enable_product_price_alert]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable the product price alert')\n ),\n array(\n 'label' => $this->l('Enable/Disable Product back in stock alert'),\n 'type' => 'switch',\n 'name' => 'kbpushnotification[enable_product_stock_alert]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable the product back in stock alert')\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right kbph_general_btn'\n ),\n ),\n );\n return $form;\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}", "public function getSendSMS(){\n return $this->send_sms;\n }", "public function form()\n\t{\n\t\tglobal $L;\n\t\t$sentEmails = $this->getSentEmailsArray();\n\n\t\t$html = '<div class=\"alert alert-primary\" role=\"alert\">';\n\t\t$html .= $this->description();\n\t\t$html .= '</div>';\n\n\t\t$html .= '<div>';\n\t\t// API key\n\t\t$html .= '<label><strong>Buttondown API Key</strong></label>';\n\t\t$html .= '<input id=\"apiKey\" name=\"apiKey\" type=\"text\" value=\"'.$this->getValue('apiKey').'\">';\n\t\t$html .= '<span class=\"tip\">Copy your API key on https://buttondown.email/settings/programming </span>';\n\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('paused').'</label>';\n\t\t$html .= '<select id=\"paused\" name=\"paused\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('paused')===true?'selected':'').'>'.$L->get('is-paused').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('paused')===false?'selected':'').'>'.$L->get('is-active').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('paused-tip').'</span>';\n\n\t\t// Start date\n\t\t$html .= '<label>'.$L->get('send-after').'</label>';\n\t\t$html .= '<input id=\"startDate\" name=\"startDate\" type=\"text\" value=\"'.$this->getValue('startDate').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('send-after-tip').'</span>';\n\t\t// Subject Prefix\n\t\t$html .= '<label>'.$L->get('subject-prefix').'</label>';\n\t\t$html .= '<input id=\"subjectPrefix\" name=\"subjectPrefix\" type=\"text\" value=\"'.$this->getValue('subjectPrefix').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('subject-prefix-tip').'</span>';\n\t\t\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('include-cover').'</label>';\n\t\t$html .= '<select id=\"includeCover\" name=\"includeCover\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('includeCover')===true?'selected':'').'>'.$L->get('yes').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('includeCover')===false?'selected':'').'>'.$L->get('no').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('include-cover-tip').'</span>';\n\t\t$html .= '</div><hr>';\n\t\t// List of page keys for which mail was sent \n\t\t$html .= '<h4>'.$L->get('sent-list').'</h4>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('sent-list-tip').'</span>';\n\t\t$html .= '<div style=\"overflow-y: scroll; height:400px;\"><ul>';\n\t\tforeach ($sentEmails as $sentKey):\n\t\t\t$html .= '<li>'.$sentKey.'</li>';\n\t\tendforeach;\n\t\t$html .= '</ul></div>';\n\t\t$html .= '<div><a target=\"_blank\" rel=\"noopener\" href=\"https://buttondown.email/archive\">Buttondown Archive</a></div>';\n\t\treturn $html;\n\t}", "public function __construct()\n\t{\n\t\t$this->setting = array_merge($this->setting, config('setting_epay', 'sms'));\n\t}", "public function edit(SmsSwitch $smsSwitch)\n {\n //\n }", "function mci_twilio_admin_test_form($form, &$form_state) {\n $form['country'] = array(\n '#type' => 'select',\n '#title' => t('Country code'),\n '#options' => mci_twilio_country_codes(),\n );\n $form['number'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Phone Number'),\n '#description' => t('The number to send your message to. Include all numbers except the country code'),\n );\n $form['message'] = array(\n '#type' => 'textarea',\n '#required' => TRUE,\n '#title' => t('Message'),\n '#description' => t(\"The body of your SMS message.\")\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Send SMS'),\n );\n return $form;\n}", "function sendSmsDynamic1($con,$caid, $msg, $mobile, $schedule=\"\", $sentid=\"\", $action=1)\n{\n $sttSms = \"select * from sms_info where caid='$caid'\";\n\t$sqlSms = mysqli_query($con,$sttSms);\n\t$cntsms = mysqli_num_rows($sqlSms);\n\tif($cntsms==0)\n\t{\n\t $caid=1;\n\t}\n\t$sttSms = \"select * from sms_info where caid='$caid'\";\n\t$sqlSms = mysqli_query($con,$sttSms);\n\t$rowSms = mysqli_fetch_assoc($sqlSms);\n\t//die;\n\t\n\t$smsuname = $rowSms['smsuname']; // sms user name \n\t$smspass = $rowSms['smspass']; // sms password \n\t$smssender = $rowSms['smssender']; // sms sender id\n\t$veruname = $rowSms['veruname']; // variable name of user name\n\t$verpass = $rowSms['verpass']; // variable name of password\n\t$versender = $rowSms['versender']; // variable name of sender id\n\t$vermessage = $rowSms['vermessage']; // variable name of message\n\t$vermob = $rowSms['vermob']; // variable name of to (mobile no)\n\t\n\t$verdate = $rowSms['verdate']; // variable of date field for schedule sms\n\t$verpatter = $rowSms['verpatter']; // pattern of date field e.g. ddmmyyyy\n\t$working_key = $rowSms['working_key'];// working key\n\t$verkey = $rowSms['verkey']; // variable name of working key\n\t\n\t$api_url = $rowSms['api_url']; // API URL\n\t$send_api = $rowSms['send_api']; // sending page name \n\t\n\t$chk_bal_api = $rowSms['chk_bal_api'];// balance check api\n\t$sch_api = $rowSms['sch_api']; // schedule api\n\t$status_api = $rowSms['status_api']; // status api\n\t\n\t\n\t//echo \"Called\";\n\t$request = \"\"; //initialize the request variable\n\t\n\tif($working_key == \"\")\n\t{\n\t\t$param[$veruname] = $smsuname; //this is the username of our TM4B account\n\t\t$param[$verpass] = $smspass; //this is the password of our TM4B account\n\t\t\n\t\tif($action==1)\n\t\t$param[$vermob] = $mobile; //these are the recipients of the message\n\t}\n\telse\n\t{\n\t\t$param[$verkey] = $working_key; //this is the key of our TM4B account\n\t\t\n\t\tif($action==1)\n\t\t$param[$vermob] = \"91\".$mobile; //these are the recipients of the message\n\t}\n\t\n\tif($action==1)\n\t{\n\t\t$param[$versender] = $smssender;//this is our sender \n\t\t$param[$vermessage] = $msg; //this is the message that we want to send\n\t}\n\telse if($action==2)\n\t{\n\t\t$param['messageid'] = $sentid;//this is our sender \n\t}\n\t\n\t// for schedule //\n\tif($schedule!=\"\")\n\t{\n\t\t$timearr = explode(\" \",$schedule);\n\t\t\n\t\t$dateoftime = $timearr[0];\n\t\t$timeoftime = $timearr[1];\n\t\t\n\t\t$datearr = explode(\"-\",$dateoftime); // explode Date //\n\t\t$yyyy = $datearr[0]; // year\n\t\t$mm = $datearr[1]; // month\n\t\t$dd = $datearr[2]; // day\n\t\t\n\t\t$datearr = explode(\":\",$timeoftime);\n\t\t$hh = $datearr[0];\n\t\t$mmt = $datearr[1];\n\t\t$ss = $datearr[2];\n\t\t\n\t\t$scdltime = strtolower($verpatter);\n\t\t$scdltime = str_replace(\"yyyy\",$yyyy,$scdltime);\n\t\t$scdltime = str_replace(\"dd\",$dd,$scdltime);\n\t\t$scdltime = str_replace(\"hh\",$hh,$scdltime);\n\t\t$scdltime = str_replace(\"ss\",$ss,$scdltime);\n\t\t$scdltime = preg_replace('/mm/i', $mm, $scdltime, 1);\n\t\t$scdltime = str_replace(\"mm\",$mmt,$scdltime);\n\t\t\n\t\t\n\t\t $param[$verdate] = $scdltime; //this is the schedule datetime //\n\t\t\n\t}\n\t//print_r($param);\t\n\tforeach($param as $key=>$val) //traverse through each member of the param array\n\t{ \n\t\t$request.= $key.\"=\".urlencode($val); //we have to urlencode the values\n\t\t$request.= \"&\"; //append the ampersand (&) sign after each paramter/value pair\n\t}\n\t$request = substr($request, 0, strlen($request)-1); //remove the final ampersand sign from the request\n\t//echo $request;\n\n\tif($action==\"1\") // 1 for send sms //\n\t$process_api = trim($send_api,\"/\");\n\telse if($action==\"2\") // 2 for Delivery report //\n\t$process_api = trim($status_api,\"/\");\n\telse if($action==\"3\") // 3 for check balance //\n\t$process_api = trim($chk_bal_api,\"/\");\n\t\n\t\n\t//First prepare the info that relates to the connection\n\t$host = $api_url;\n\t$script = \"/$process_api\";\n\t$request_length = strlen($request);\n\t$method = \"POST\"; // must be POST if sending multiple messages\n\tif ($method == \"GET\") \n\t{\n\t $script .= \"?$request\";\n\t}\n\t\n\t//Now comes the header which we are going to post. \n\t$header = \"$method $script HTTP/1.1\\r\\n\";\n\t$header .= \"Host: $host\\r\\n\";\n\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t$header .= \"Content-Length: $request_length\\r\\n\";\n\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t$header .= \"$request\\r\\n\";\n\t\n\t//echo $header;\n\t//Now we open up the connection\n\t$socket = @fsockopen($host, 80, $errno, $errstr); \n\tif ($socket) //if its open, then...\n\t{ \n\t fputs($socket, $header); // send the details over\n\t while(!feof($socket))\n\t {\n\t\t $output[] = fgets($socket); //get the results \n\t\t\t\t\n\t }\n\t fclose($socket); \n\t}\n\t\n\tif($action==1)\n\t{ \n\t\t$cntOutput = count($output);\n\t\t$lastValue = $output[$cntOutput-1];\n\t\t$expLastValue = explode(\"=\",$lastValue);\n\t\t$cntLastValue = count($expLastValue);\n\t\t$messageid = $expLastValue[$cntLastValue-1];\n\t\t\n\t\treturn $messageid;\n\t}\n\telse if($action==2 || $action==3)\n\t{\n\t\treturn $output;\n\t}\n}", "function pmxc_AdmBlock_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t// define the settings options\n\t\techo '\n\t\t\t\t\t<td class=\"pmxfloattd\">\n\t\t\t\t\t\t<div class=\"bmcustheight\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings]\" value=\"\" />\n\t\t\t\t\t\t\t<textarea style=\"display:none;\" name=\"content\">'. $this->cfg['content'] .'</textarea>';\n\n\t\t// define numeric vars to check\n\t\techo '\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxlen], 100\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxshouts], 50\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxheight], 250\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings][boxcollapse]\" value=\"1\" />';\n\n\t\t// show the settings screen\n\t\techo '\n\t\t\t\t\t\t\t<div class=\"cat_bar catbg_grid grid_padd\">\n\t\t\t\t\t\t\t\t<h4 class=\"catbg catbg_grid\">\n\t\t\t\t\t\t\t\t\t<span class=\"cat_msg_title\">'. sprintf($txt['pmx_blocks_settings_title'], $this->register_blocks[$this->cfg['blocktype']]['description']) .'</span>\n\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_maxlen'] .'</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxlen]\" value=\"' .(isset($this->cfg['config']['settings']['maxlen']) ? $this->cfg['config']['settings']['maxlen'] : '100'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">&nbsp;'. $txt['pmx_shoutbox_maxshouts'] .'\n\t\t\t\t\t\t\t\t\t<a href=\"', $scripturl, '?action=helpadmin;help=pmx_shoutbox_maxshouthelp\" onclick=\"return reqOverlayDiv(this.href);\" class=\"help\"><span class=\"generic_icons help\" title=\"', $txt['help'],'\"></span></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxshouts]\" value=\"' .(isset($this->cfg['config']['settings']['maxshouts']) ? $this->cfg['config']['settings']['maxshouts'] : '50'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_maxheight'] .'</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxheight]\" value=\"' .(isset($this->cfg['config']['settings']['maxheight']) ? $this->cfg['config']['settings']['maxheight'] : '250'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_check\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_allowedit'] .'</span>\n\t\t\t\t\t\t\t\t<div><input class=\"input_check\" type=\"checkbox\" name=\"config[settings][allowedit]\" value=\"1\"' .(isset($this->cfg['config']['settings']['allowedit']) && $this->cfg['config']['settings']['allowedit'] == 1 ? ' checked=\"checked\"' : ''). ' /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[show_sitemap]\" value=\"0\" />\n\t\t\t\t\t\t\t<div class=\"adm_input adm_sel\">\n\t\t\t\t\t\t\t\t<span>'. $txt['pmx_shoutbox_canshout'] .'</span>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings][shout_acs][]\" value=\"\" />\n\t\t\t\t\t\t\t\t<select style=\"width:83%;\" name=\"config[settings][shout_acs][]\" multiple=\"multiple\" size=\"5\">';\n\n\t\tforeach($this->pmx_groups as $grp)\n\t\t\tif($grp['id'] != '-1')\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t<option value=\"'. $grp['id'] .'\"'. (!empty($this->cfg['config']['settings']['shout_acs']) && in_array($grp['id'], $this->cfg['config']['settings']['shout_acs']) ? ' selected=\"selected\"' : '') .'>'. $grp['name'] .'</option>';\n\t\techo '\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>';\n\n\t\t// return the default classnames\n\t\treturn $this->block_classdef;\n\t}", "public function update_config_form() {\n\t\tif ( !SourceSVNPlugin::$config_form_handled ) {\n\t\t\tSourceSVNPlugin::$config_form_handled = true;\n\n\t\t\t$t_svnpath = plugin_config_get( 'svnpath', '' );\n\t\t\t$t_svnargs = plugin_config_get( 'svnargs', '' );\n\t\t\t$t_svnssl = plugin_config_get( 'svnssl', '' );\n\t\t\t$t_winstart = plugin_config_get( 'winstart', '' );\n\n?>\n\t<tr class=\"spacer\"></tr>\n\t<tr>\n\t\t<td colspan=\"2\"><h4><?php echo plugin_lang_get( 'title' ) ?></h4></td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"category\">\n\t\t\t<label for=\"plugin_SourceSVN_svnpath\"><?php echo plugin_lang_get( 'svnpath' ) ?></label>\n\t\t</td>\n\t\t<td>\n\t\t\t<input type=\"text\" id=\"plugin_SourceSVN_svnpath\" name=\"plugin_SourceSVN_svnpath\" value=\"<?php echo string_attribute( $t_svnpath ) ?>\" size=\"40\"/>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"category\">\n\t\t\t<label for=\"plugin_SourceSVN_svnargs\"><?php echo plugin_lang_get( 'svnargs' ) ?></label>\n\t\t</td>\n\t\t<td class=\"category\"><?php echo plugin_lang_get( 'svnargs' ) ?></td>\n\t\t<td>\n\t\t\t<input type=\"text\" id=\"plugin_SourceSVN_svnargs\" name=\"plugin_SourceSVN_svnargs\" value=\"<?php echo string_attribute( $t_svnargs ) ?>\" size=\"40\"/>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"category\">\n\t\t\t<label for=\"plugin_SourceSVN_svnssl\"><?php echo plugin_lang_get( 'svnssl' ) ?></label>\n\t\t</td>\n\t\t<td>\n\t\t\t<label>\n\t\t\t\t<input id=\"plugin_SourceSVN_svnssl\" name=\"plugin_SourceSVN_svnssl\" type=\"checkbox\" class=\"ace\" <?php check_checked( (bool)$t_svnssl ) ?>/>\n\t\t\t\t<span class=\"lbl\"></span>\n\t\t\t</label>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"category\">\n\t\t\t<label for=\"plugin_SourceSVN_winstart\"><?php echo plugin_lang_get( 'winstart' ) ?></label>\n\t\t</td>\n\t\t<td>\n\t\t\t<label>\n\t\t\t\t<input id=\"plugin_SourceSVN_winstart\" name=\"plugin_SourceSVN_winstart\" type=\"checkbox\" class=\"ace\" <?php check_checked( (bool)$t_winstart ) ?>/>\n\t\t\t\t<span class=\"lbl\"></span>\n\t\t\t</label>\n\t\t</td>\n\t</tr>\n\t<tr class=\"spacer\"></tr>\n\n<?php\n\t\t}\n\t}", "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}", "function send_sms($msg,$phone_number){\r\n /**\r\n * This is for Twilo\r\n */\r\n if(config('sms-gateway',1) == 1){\r\n //require_once path('plugins/sms/pages/Twilio.php');\r\n $sid = config('twilio-account-id',''); // Your Account SID from www.twilio.com/user/account\r\n $token = config('twilio-token-id',''); // Your Auth Token from www.twilio.com/user/account\r\n\r\n // Get the PHP helper library from twilio.com/docs/php/install\r\n //$client = new Services_Twilio($sid, $token);\r\n //$sms = $client->account->sms_messages->create(config('from-twilio-number',''),$phone_number, $msg, array());\r\n\r\n //using curl\r\n $ch = curl_init('https://api.twilio.com/2010-04-01/Accounts/'.$sid.'/Messages.json');\r\n $data = array(\r\n 'To' => $phone_number,\r\n 'From' => config('from-twilio-number',''),\r\n 'Body' => $msg,\r\n );\r\n $auth = $sid .\":\". $token;\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\r\n curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla 5.0');\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n }\r\n elseif(config('sms-gateway',1) == 2){\r\n //46elks\r\n $url = 'https://api.46elks.com/a1/SMS';\r\n $username = config('46elks_app_id');\r\n $password = config('46elks_api_password');\r\n $sms = array('from' => config('sms-from','Lightedphp'),\r\n 'to' => $phone_number,\r\n 'message' => $msg);\r\n\r\n $context = stream_context_create(array(\r\n 'http' => array(\r\n 'method' => 'POST',\r\n 'header' => \"Authorization: Basic \".\r\n base64_encode($username.':'.$password). \"\\r\\n\".\r\n \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'content' => http_build_query($sms),\r\n 'timeout' => 10\r\n )\r\n ));\r\n $response = file_get_contents($url, false, $context);\r\n }\r\n elseif(config('sms-gateway',1) == 3){\r\n $url = 'http://api.clickatell.com/http/sendmsg';\r\n $user = config('clickatell-username','');\r\n $password = config('clickatell-password','');\r\n $api_id = config('clickatell-app_id');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'user' => $user,\r\n 'password'=>$password,\r\n 'api_id'=>$api_id,\r\n 'to'=>$to,\r\n 'text' => $text\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n if ($result === FALSE) { /* Handle error */ }\r\n return $result;\r\n // return var_dump($result);\r\n }\r\n elseif(config('sms-gateway',4) == 4){\r\n //echo \"Quick sms\";\r\n $url = 'http://www.quicksms1.com/api/sendsms.php';\r\n $user = config('quicksms_username','');\r\n $password = config('quicksms_password','');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'username' => $user,\r\n 'password'=>$password,\r\n 'sender'=>config('sms-from','Betayan'),\r\n 'message'=>$text,\r\n 'recipient'=>$to,\r\n 'convert'=> 1\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n\r\n return $result;\r\n // print_r($result);\r\n // exit;\r\n }elseif(config('sms-gateway',1) == 10){\r\n //Text local\r\n $apiKey = config('text-local-api-key','');\r\n $apiKey = urlencode($apiKey);\r\n\r\n // Message details\r\n $numbers = array($phone_number);\r\n $sender = urlencode(config('sms-from','LightedPHP'));\r\n $message = rawurlencode($msg);\r\n\r\n $numbers = implode(',', $numbers);\r\n\r\n // Prepare data for POST request\r\n $data = array('apikey' => $apiKey, 'numbers' => $numbers, \"sender\" => $sender, \"message\" => $message);\r\n\r\n // Send the POST request with cURL\r\n $ch = curl_init('https://api.textlocal.in/send/');\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n // Process your response here\r\n print_r($response);die();\r\n\r\n }\r\n return true;\r\n}", "public function manageUpdateScheduleSMS($id)\n {\n $sh = CampaignSubscriptionList::find($id);\n\n if ($sh) {\n return view('client.manage-update-schedule-sms', compact('sh'));\n } else {\n return redirect('user/sms/campaign-reports')->with([\n 'message' => language_data('Please try again', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n }", "function room_reservations_admin_settings_email_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $from_address = $form_state['values']['from_address'];\n $confirmation_header = $form_state['values']['confirmation_header'];\n $confirmation_owner = $form_state['values']['confirmation_owner'];\n $confirmation_group = $form_state['values']['confirmation_group'];\n $reminder_header = $form_state['values']['reminder_header'];\n $reminder_owner = $form_state['values']['reminder_owner'];\n $reminder_group = $form_state['values']['reminder_group'];\n $confirmation = ROOM_RESERVATIONS_SAVE_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_SAVE_ERROR_MSG;\n }\n elseif ($form_state['clicked_button']['#value'] == t('Reset to defaults')) {\n $confirmation_header = '';\n $confirmation_owner = '';\n $confirmation_group = '';\n $reminder_header = '';\n $reminder_owner = '';\n $reminder_group = '';\n $confirmation = ROOM_RESERVATIONS_RESET_CONFIRMATION_MSG;\n $error = ROOM_RESERVATIONS_RESET_ERROR_MSG;\n }\n $errors = FALSE;\n $result = _room_reservations_set_variable('from_address', $from_address);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_header_text', \n $confirmation_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_owner_text', \n $confirmation_owner);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('confirmation_group_text', \n $confirmation_group);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_header_text', \n $reminder_header);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_owner_text', \n $reminder_owner);\n if (!$result) {\n $errors = TRUE;\n }\n $result = _room_reservations_set_variable('reminder_group_text', \n $reminder_group);\n if (!$result) {\n $errors = TRUE;\n }\n if ($errors) {\n drupal_set_message(check_plain($error), 'error');\n }\n else {\n drupal_set_message(check_plain($confirmation));\n }\n}", "public function edit(ReceiveSms $receiveSms)\n {\n //\n }", "function update_driver_details_in_sent_manifesto()\r\n\t\t{\r\n\t\t\t$user=$this->erpm->auth();\r\n\t\t\tif(!$_POST)\r\n\t\t\t\tdie;\r\n\t\t\t$send_sms=array();\r\n\t\t\t$manifesto_sentid=$this->input->post('manifesto_sent_id');\r\n\t\t\t$start_km=$this->input->post('start_km');\r\n\t\t\t$amount=$this->input->post('amount');\r\n\t\t\t$send_sms[]=$territory_manager=$this->input->post('tm');\r\n\t\t\t$send_sms[]=$bussiness_executive=$this->input->post('BE');\r\n\t\t\t$send_sms=array_filter($send_sms);\r\n\t\t\t\r\n\t\t\tif($manifesto_sentid)\r\n\t\t\t{\r\n\t\t\t\t\t$this->db->query(\"update pnh_m_manifesto_sent_log set modified_on=?,modified_by=?,start_meter_rate=?,amount=?,status=3 where id=?\",array(cur_datetime(),$user['userid'],$start_km,$amount,$manifesto_sentid));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//update shiped status\r\n\t\t\t\t\t$manifesto_id_det=$this->db->query(\"select manifesto_id from pnh_m_manifesto_sent_log where id=?\",$manifesto_sentid)->result_array();\r\n\t\t\t\t\t$manifesto_id=$manifesto_id_det[0]['manifesto_id'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$prama3=array();\r\n\t\t\t\t\t$prama3['shipped']=1;\r\n\t\t\t\t\t$prama3['shipped_on']=cur_datetime();\r\n\t\t\t\t\t$prama3['shipped_by']=$user['userid'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->where('inv_manifesto_id',$manifesto_id);\r\n\t\t\t\t\t$this->db->update(\"shipment_batch_process_invoice_link\",$prama3);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// check if the invoice is return invoice and update shipped status in return module \r\n\t\t\t\t\t$return_inv_list_res = $this->db->query(\"select invoice_no from shipment_batch_process_invoice_link where inv_manifesto_id = ? and is_returned = 1 \",$manifesto_id);\r\n\t\t\t\t\tif($return_inv_list_res->num_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach($return_inv_list_res->result_array() as $return_inv)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$return_id = $this->db->query(\"select return_id from pnh_invoice_returns where invoice_no = ? \",$return_inv['invoice_no'])->row()->return_id;\r\n\t\t\t\t\t\t\t$this->db->query('update pnh_invoice_returns_product_link set is_shipped = 1 where return_id = ? ',$return_id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//sent a sms\r\n\t\t\t\t\t$sent_invoices=$this->db->query('select a.sent_invoices,b.name,a.hndleby_name,b.contact_no,a.hndleby_contactno,a.hndleby_vehicle_num,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tc.name as bus_name,d.contact_no as des_contact,b.job_title2,a.id \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom pnh_m_manifesto_sent_log a\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join m_employee_info b on b.employee_id = a.hndleby_empid\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join pnh_transporter_info c on c.id=a.bus_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join pnh_transporter_dest_address d on d.id=a.bus_destination and d.transpoter_id=a.bus_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere a.id=?',$manifesto_sentid)->result_array();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$invoices=$sent_invoices[0]['sent_invoices'];\r\n\t\t\t\t\t$hndbyname=$sent_invoices[0]['name'];\r\n\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['contact_no'];\r\n\t\t\t\t\t$vehicle_num=$sent_invoices[0]['hndleby_vehicle_num'];\r\n\t\t\t\t\tif(!$hndbyname)\r\n\t\t\t\t\t\t$hndbyname=$sent_invoices[0]['hndleby_name'];\r\n\t\t\t\t\tif(!$hndbyname)\r\n\t\t\t\t\t\t$hndbyname=$sent_invoices[0]['bus_name'].' Travels';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!$hndbycontactno)\r\n\t\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['hndleby_contactno'];\r\n\t\t\t\t\tif(!$hndbycontactno)\r\n\t\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['des_contact'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->query(\"update pnh_invoice_transit_log set status = 1,logged_on=now() where sent_log_id = ? and status = 0 \",$manifesto_sentid);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->db->affected_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sms_msg='';\r\n\t\t\t\t\t\tif($sent_invoices[0]['job_title2']=='7')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$sms_msg = 'Dear [To],Shipment for the town [Town_name] sent via Driver '.ucwords($hndbyname).'('.$hndbycontactno.') vehicle no ['.$vehicle_num.'],Manifesto id: '.$sent_invoices[0]['id'];\r\n\t\t\t\t\t\t}else if($sent_invoices[0]['job_title2']=='6'){\r\n\t\t\t\t\t\t\t$sms_msg = 'Dear [To],Shipment for the town [Town_name] sent via Fright-Cordinator '.ucwords($hndbyname).'('.$hndbycontactno.') ,Manifesto id: '.$sent_invoices[0]['id'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// send sms to tm and exec fc for towns\r\n\t\t\t\t\t\t$employees_list=$this->erpm->get_emp_by_territory_and_town($invoices);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($employees_list)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tforeach($employees_list as $emp)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$emp_name=$emp['name'];\r\n\t\t\t\t\t\t\t\t\t$emp_id=$emp['employee_id'];\r\n\t\t\t\t\t\t\t\t\t$town_name=$emp['town_name'];\r\n\t\t\t\t\t\t\t\t\t$territory_id=$emp['territory_id'];\r\n\t\t\t\t\t\t\t\t\t$town_id=$emp['town_id'];\r\n\t\t\t\t\t\t\t\t\t$job_title=$emp['job_title2'];\r\n\t\t\t\t\t\t\t\t\t$send_sms_status=$emp['send_sms'];\r\n\t\t\t\t\t\t\t\t\t$emp_contact_nos = explode(',',$emp['contact_no']);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(!in_array($job_title,$send_sms))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\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$sms_msg=str_ireplace('[To]',$emp_name,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t$sms_msg=str_ireplace('[Town_name]',$town_name,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$temp_emp=array();\t\r\n\t\t\t\t\t\t\t\t\tforeach($emp_contact_nos as $emp_mob_no)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif(isset($temp_emp[$emp_id]))\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t$temp_emp[$emp_id]=1;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif($send_sms_status)\r\n\t\t\t\t\t\t\t\t\t\t\t$this->erpm->pnh_sendsms($emp_mob_no,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t\t//\techo $emp_mob_no,$sms_msg;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm=array();\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['emp_id']=$emp_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['contact_no']=$emp_mob_no;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['type']=4;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['territory_id']=$territory_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['town_id']=$town_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['grp_msg']=$sms_msg;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['created_on']=cur_datetime();\r\n\t\t\t\t\t\t\t\t\t\t$this->erpm->insert_pnh_employee_grpsms_log($log_prm);\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}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Your selected invoices are shipped\");\r\n\t\t\t}\r\n\t\t\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}", "public function storeSms(Request $request)\n {\n if (!Sentinel::hasAccess('communication.create')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n $body = \"\";\n $recipients = 1;\n if (Setting::where('setting_key', 'sms_enabled')->first()->setting_value == 1) {\n if ($request->send_to == 0) {\n\n $active_sms = Setting::where('setting_key', 'active_sms')->first()->setting_value;\n foreach (Borrower::all() as $borrower) {\n $body = $request->message;\n//lets build and replace available tags\n $body = str_replace('{borrowerTitle}', $borrower->title, $body);\n $body = str_replace('{borrowerFirstName}', $borrower->first_name, $body);\n $body = str_replace('{borrowerLastName}', $borrower->last_name, $body);\n $body = str_replace('{borrowerAddress}', $borrower->address, $body);\n $body = str_replace('{borrowerMobile}', $borrower->mobile, $body);\n $body = str_replace('{borrowerEmail}', $borrower->email, $body);\n $body = str_replace('{borrowerTotalLoansDue}',\n round(GeneralHelper::borrower_loans_total_due($borrower->id), 2), $body);\n $body = str_replace('{borrowerTotalLoansBalance}',\n round((GeneralHelper::borrower_loans_total_due($borrower->id) - GeneralHelper::borrower_loans_total_paid($borrower->id)),\n 2), $body);\n $body = str_replace('{borrowerTotalLoansPaid}',\n GeneralHelper::borrower_loans_total_paid($borrower->id),\n $body);\n $email = $borrower->email;\n $body = trim(strip_tags($body));\n if (!empty($borrower->mobile)) {\n $active_sms = Setting::where('setting_key', 'active_sms')->first()->setting_value;\n if ($active_sms == 'twilio') {\n $twilio = new Twilio(Setting::where('setting_key', 'twilio_sid')->first()->setting_value,\n Setting::where('setting_key', 'twilio_token')->first()->setting_value,\n Setting::where('setting_key', 'twilio_phone_number')->first()->setting_value);\n $twilio->message('+' . $borrower->mobile, $body);\n }\n if ($active_sms == 'routesms') {\n $host = Setting::where('setting_key', 'routesms_host')->first()->setting_value;\n $port = Setting::where('setting_key', 'routesms_port')->first()->setting_value;\n $username = Setting::where('setting_key', 'routesms_username')->first()->setting_value;\n $password = Setting::where('setting_key', 'routesms_password')->first()->setting_value;\n $sender = Setting::where('setting_key', 'sms_sender')->first()->setting_value;\n $SMSText = $body;\n $GSM = $borrower->mobile;\n $msgtype = 2;\n $dlr = 1;\n $routesms = new RouteSms($host, $port, $username, $password, $sender, $SMSText, $GSM,\n $msgtype,\n $dlr);\n $routesms->Submit();\n }\n if ($active_sms == 'clickatell') {\n $clickatell = new Rest(Setting::where('setting_key',\n 'clickatell_api_id')->first()->setting_value);\n $response = $clickatell->sendMessage(array($borrower->mobile), $body);\n }\n if ($active_sms == 'infobip') {\n $infobip = new Infobip(Setting::where('setting_key',\n 'sms_sender')->first()->setting_value, $body,\n $borrower->mobile);\n }\n\n }\n $recipients = $recipients + 1;\n }\n $sms = new Sms();\n $sms->user_id = Sentinel::getUser()->id;\n $sms->message = $body;\n $sms->gateway = $active_sms;\n $sms->branch_id = session('branch_id');;\n $sms->recipients = $recipients;\n $sms->send_to = 'All borrowers';\n $sms->save();\n GeneralHelper::audit_trail(\"Sent SMS to all borrower\");\n Flash::success(\"SMS successfully sent\");\n return redirect('communication/sms');\n } else {\n $body = $request->message;\n $borrower = Borrower::find($request->send_to);\n //lets build and replace available tags\n $body = str_replace('{borrowerTitle}', $borrower->title, $body);\n $body = str_replace('{borrowerFirstName}', $borrower->first_name, $body);\n $body = str_replace('{borrowerLastName}', $borrower->last_name, $body);\n $body = str_replace('{borrowerAddress}', $borrower->address, $body);\n $body = str_replace('{borrowerMobile}', $borrower->mobile, $body);\n $body = str_replace('{borrowerEmail}', $borrower->email, $body);\n $body = str_replace('{borrowerTotalLoansDue}',\n round(GeneralHelper::borrower_loans_total_due($borrower->id), 2), $body);\n $body = str_replace('{borrowerTotalLoansBalance}',\n round((GeneralHelper::borrower_loans_total_due($borrower->id) - GeneralHelper::borrower_loans_total_paid($borrower->id)),\n 2), $body);\n $body = str_replace('{borrowerTotalLoansPaid}', GeneralHelper::borrower_loans_total_paid($borrower->id),\n $body);\n $body = trim(strip_tags($body));\n if (!empty($borrower->mobile)) {\n $active_sms = Setting::where('setting_key', 'active_sms')->first()->setting_value;\n if ($active_sms == 'twilio') {\n $twilio = new Twilio(Setting::where('setting_key', 'twilio_sid')->first()->setting_value,\n Setting::where('setting_key', 'twilio_token')->first()->setting_value,\n Setting::where('setting_key', 'twilio_phone_number')->first()->setting_value);\n $twilio->message('+' . $borrower->mobile, $body);\n }\n if ($active_sms == 'routesms') {\n $host = Setting::where('setting_key', 'routesms_host')->first()->setting_value;\n $port = Setting::where('setting_key', 'routesms_port')->first()->setting_value;\n $username = Setting::where('setting_key', 'routesms_username')->first()->setting_value;\n $password = Setting::where('setting_key', 'routesms_password')->first()->setting_value;\n $sender = Setting::where('setting_key', 'sms_sender')->first()->setting_value;\n $SMSText = $body;\n $GSM = $borrower->mobile;\n $msgtype = 2;\n $dlr = 1;\n $routesms = new RouteSms($host, $port, $username, $password, $sender, $SMSText, $GSM, $msgtype,\n $dlr);\n $routesms->Submit();\n }\n if ($active_sms == 'clickatell') {\n $clickatell = new Rest(Setting::where('setting_key',\n 'clickatell_api_id')->first()->setting_value);\n $response = $clickatell->sendMessage(array($borrower->mobile), $body);\n }\n if ($active_sms == 'infobip') {\n $infobip = new Infobip(Setting::where('setting_key',\n 'sms_sender')->first()->setting_value, $body,\n $borrower->mobile);\n\n }\n $sms = new Sms();\n $sms->user_id = Sentinel::getUser()->id;\n $sms->message = $body;\n $sms->gateway = $active_sms;\n $sms->recipients = $recipients;\n $sms->branch_id = session('branch_id');;\n $sms->send_to = $borrower->first_name . ' ' . $borrower->last_name . '(' . $borrower->unique_number . ')';\n $sms->save();\n Flash::success(\"SMS successfully sent\");\n return redirect('communication/sms');\n }\n\n }\n GeneralHelper::audit_trail(\"Sent SMS to borrower\");\n Flash::success(\"Sms successfully sent\");\n return redirect('communication/sms');\n } else {\n Flash::warning('SMS service is disabled, please go to settings and enable it');\n return redirect('setting/data')->with(array('error' => 'SMS is disabled, please enable it.'));\n }\n }", "function send_sms_or_email($inputarray1 = array(), $inputarray2 = array(), $insert = 1, $update = 0, $from_modaration = 0) {\n $choice1 = isset($inputarray1['choice']) ? $inputarray1['choice'] : '';\n $message_id = isset($inputarray1['message_id']) ? $inputarray1['message_id'] : '';\n $smsto = isset($inputarray1['smsto']) ? $inputarray1['smsto'] : '';\n $message = isset($inputarray1['message']) ? $inputarray1['message'] : '';\n\n $name = isset($inputarray2->name) ? $inputarray2->name : '';\n $fatheremail = isset($inputarray2->father_email) ? $inputarray2->father_email : '';\n $fatheremobile = isset($inputarray2->father_mobile) ? $inputarray2->father_mobile : '';\n $email = isset($inputarray2->email) ? $inputarray2->email : '';\n $mobile = isset($inputarray2->mobile) ? $inputarray2->mobile : '';\n $db_students_number = isset($inputarray2->students_number) ? $inputarray2->students_number : '';\n $db_user_name = isset($inputarray2->name) ? $inputarray2->name : '';\n\n //chcking string replace starts here\n //first prepare array of the possible place holders\n $vars = array('%sname%' => $name);\n $message = str_replace(array_keys($vars), $vars, $message);\n //log_message('error', 'composed message: '.$message);\t\t\t\n //chcking string replace ends here\n\n $requireddata = array();\n $requireddata['message'] = $message;\n\n\n //insert the data in student_messages table\n $db_messagetype = '';\n $db_student_id = isset($inputarray2->user_id) ? $inputarray2->user_id : '';\n $db_status = '';\n if (IS_MODARATION_REQUIRES == TRUE && $from_modaration == 0) {\n $db_status = 'modaration';\n }\n\n\n $db_sentto = '';\n $db_message_error = 'no_error';\n if ($choice1 == 1) {\n $db_messagetype = 'email';\n //email\n //now check for parent or student\n if ($smsto == 'parent') {\n //now take parent email\n $requireddata['contactpoint'] = $fatheremail;\n $db_sentto = $personval = 'parent';\n } else if ($smsto == 'student') {\n //now take student email\n $requireddata['contactpoint'] = $email;\n $db_sentto = $personval = 'student';\n } else {\n return;\n }\n\n if (!empty($requireddata['contactpoint'])) {\n if ($db_status == '') {\n $db_status = 'sent';\n $this->load->library('my_email_lib');\n $this->my_email_lib->html_email($requireddata['contactpoint'], $message);\n //now send email\n //log_message('error', 'email sending to'.$requireddata['contactpoint']);\n }\n } else {\n\n //if($db_status=='')\n //{\n $db_status = 'failed';\n //}\n\n if ($personval == 'student') {\n $db_message_error = 'stu_email';\n } else {\n $db_message_error = 'parent_email';\n }\n log_message('error', 'no email present for ' . $personval);\n }\n //now send email using email library\n } else if ($choice1 == 2) {\n $db_messagetype = 'sms';\n //now check for parent or student\n if ($smsto == 'parent') {\n //now take parent mobile number\n $requireddata['contactpoint'] = $fatheremobile;\n $db_sentto = $personval = 'parent';\n } else if ($smsto == 'student') {\n //now take student mobile\n $requireddata['contactpoint'] = $mobile;\n $db_sentto = $personval = 'student';\n } else {\n return;\n }\n\n //now send sms using sms library\t\t\t\n if (!empty($requireddata['contactpoint'])) {\n if ($db_status == '') {\n $db_status = 'sent';\n //now send sms\n //log_message('error', 'sms sending to'.$requireddata['contactpoint']);\n $this->load->library('sms_lib');\n $this->sms_lib->send_sms($requireddata['contactpoint'], $message);\n }\n } else {\n //if($db_status=='')\n //{\n $db_status = 'failed';\n //}\n if ($personval == 'student') {\n $db_message_error = 'stu_mobile';\n } else {\n $db_message_error = 'parent_mobile';\n }\n log_message('error', 'no mobile number present for ' . $personval);\n }\n } else {\n return;\n }\n if ($insert == 1) {\n $insertqstr = \"insert into student_messages(user_id,student_number,user_name,message,message_type,status,sent_to,message_error,more_info) \n\t\t\t\tvalues('\" . $db_student_id . \"','\" . $db_students_number . \"','\" . $db_user_name . \"','\" . addslashes($message) . \"','\" . $db_messagetype . \"','\" . $db_status . \"','\" . $db_sentto . \"','\" . $db_message_error . \"','\" . serialize($inputarray2) . \"')\";\n //log_message('error', 'insert str '.$insertqstr);\n $this->db->query($insertqstr);\n }\n\n if ($update == 1 && $message_id != '') {\n $updatestr = \"update student_messages set sent_date='\" . date('Y-m-d H:i:s') . \"',status='\" . $db_status . \"' where id=\" . $message_id;\n $this->db->query($updatestr);\n }\n }", "function vals_soc_admin_messages_form($form, $form_state) {\n $complete_this_section = t('Complete this section');\n $accepted_orgs_prev_input = variable_get('vals_accepted_organisations_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_accepted_organisations_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Accepted organisations message'),\n '#default_value' => $accepted_orgs_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $rejected_orgs_prev_input = variable_get('vals_rejected_organisations_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_rejected_organisations_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Rejected organisations message'),\n '#default_value' => $rejected_orgs_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $mentor_welcome_prev_input = variable_get('vals_mentor_welcome_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_mentor_welcome_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Mentor welcome message'),\n '#default_value' => $mentor_welcome_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $student_welcome_prev_input = variable_get('vals_student_welcome_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_student_welcome_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Student welcome message'),\n '#default_value' => $student_welcome_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $accepted_students_prev_input = variable_get('vals_accepted_students_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_accepted_students_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Accepted students message'),\n '#default_value' => $accepted_students_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $rejected_students_prev_input = variable_get('vals_rejected_students_message', array('value' => $complete_this_section, 'format' => 'full_html'));\n $form['vals_rejected_students_message'] = array(\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#title' => t('Rejected students message'),\n '#default_value' => $rejected_students_prev_input['value'],\n '#suffix' => '<p></p>',\n );\n $form['vals_messages_test_email'] = array(\n '#type' => 'textfield',\n '#title' => t('Test email address'),\n '#default_value' => '', // dont store this\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => FALSE,\n '#prefix' => '',\n '#suffix' => '<div>' . t('Email address to which test messages must be sent. If provided, a ' .\n 'test email is sent for each of the messages on this page to the given address') . '.</div>',\n );\n $form['vals_messages_test_cron_email'] = array(\n '#type' => 'checkbox',\n '#title' => 'cron email test',\n '#tree' => TRUE,\n '#default_value' => 0,\n );\n $form['#validate'][] = 'vals_soc_admin_messages_form_validate';\n $form['#submit'][] = 'vals_soc_admin_messages_form_submit';\n return system_settings_form($form);\n}", "public function maz_hspm_settings_content() {\n ?>\n <div class=\"wrap\">\n <h2>Halve Spacers On Mobile Settings</h2>\n <form method=\"post\" action=\"options.php\">\n <br>\n <hr>\n <br>Breakpoint configures the screen width in pixels when the spacers change size.\n <br>Ratio defines the amount of change. For example, 0.5 will halve the size, 2 will double it.\n <br>\n\n <?php\n # Places all the fields defined above and the submit button in the markup\n settings_fields( 'maz_hspm_fields' );\n do_settings_sections( 'maz_hspm_fields' );\n submit_button();\n ?>\n </form>\n <div class=\"\">\n A Plugin by Moritz Zimmer, 2020\n </div>\n </div>\n <?php\n }", "public function setConfig()\n {\n $this->postcode = isset($_POST['postcode']) ? htmlspecialchars($_POST['postcode']) : '000-0000';\n $this->maptype = isset($_POST['maptype']) ? htmlspecialchars($_POST['maptype']) : 'Static MAP';\n $this->unit = isset($_POST['unit']) ? htmlspecialchars($_POST['unit']) : 'CELSIUS';\n $this->apiLocation = isset($_POST['apiLocation']) ? htmlspecialchars($_POST['apiLocation']) : 'Google';\n $this->apiWeather = isset($_POST['apiWeather']) ? htmlspecialchars($_POST['apiWeather']) : 'OpenWeatherMap';\n }", "public function passwordChange($observer)\n{\n\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = $observer->getEvent()->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n if ($telephone) {\n $text = Mage::getStoreConfig('smsnotifications/customer_notification/change_password');\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n // $text = str_replace('{{name}}', $customer_name, $text);\n }\n array_push($settings['order_noficication_recipients'], $telephone);\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return $this;\n}", "function send_sms_client()\n\t{\n\t\t$this->load->helper('url');\n\t\t$server_url = site_url('plugin/xmlrpc/send_sms');\n\n\t\t$this->xmlrpc->server($server_url, 80);\n\t\t$this->xmlrpc->method('send_sms');\n\t\t//$this->xmlrpc->set_debug(TRUE);\n\n\t\t$request = array('1234', 'Testing XMLRPC');\n\t\t$this->xmlrpc->request($request);\n\n\t\tif ( ! $this->xmlrpc->send_request())\n\t\t{\n\t\t\techo $this->xmlrpc->display_error();\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo '<pre>';\n\t\t\tprint_r($this->xmlrpc->display_response());\n\t\t\techo '</pre>';\n\t\t}\n\t}", "public function settings($h)\n {\n // If the form has been submitted, go and save the data...\n if ($h->cage->post->getAlpha('submitted') == 'true') { \n $this->saveSettings($h); \n } \n\n if ($h->cage->post->getAlpha('tested') == 'true') { \n $this->testSpam($h); \n } \n \n // Get settings from database if they exist...\n $stop_spam_key = $h->getSetting('stop_spam_key');\n $stop_spam_type = $h->getSetting('stop_spam_type');\n \n $h->pluginHook('stop_spam_settings_get_values');\n \n //...otherwise set to blank:\n if (!$stop_spam_key) { $stop_spam_key = ''; } \n if (!$stop_spam_type) { $stop_spam_type = 'go_pending'; }\n \n // determine which radio button is checked\n if ($stop_spam_type == 'go_pending') { \n $go_pending = 'checked'; \n $block_reg = ''; \n } else {\n $go_pending = ''; \n $block_reg = 'checked'; \n }\n \n $h->showMessages();\n \n echo \"<form name='stop_spam_settings_form' action='\" . BASEURL . \"admin_index.php?page=plugin_settings&amp;plugin=stop_spam' method='post'>\\n\";\n \n echo \"<p>\" . $h->lang[\"stop_spam_settings_instructions\"] . \"</p><br />\";\n \n echo \"<p>\" . $h->lang[\"stop_spam_settings_key\"] . \" <input type='text' size=30 name='stop_spam_key' value='\" . $stop_spam_key . \"'></p>\\n\"; \n \n echo \"<p><input type='radio' name='ss_type' value='go_pending' \" . $go_pending . \"> \" . $h->lang[\"stop_spam_settings_go_pending\"] . \"</p>\\n\"; \n echo \"<p><input type='radio' name='ss_type' value='block_reg' \" . $block_reg . \"> \" . $h->lang[\"stop_spam_settings_block_reg\"] . \"</p>\\n\"; \n \n $h->pluginHook('stop_spam_settings_form');\n \n echo \"<br /><br />\\n\"; \n echo \"<input type='hidden' name='submitted' value='true' />\\n\";\n echo \"<input type='submit' class='btn btn-primary' value='\" . $h->lang[\"main_form_save\"] . \"' />\\n\";\n echo \"<input type='hidden' name='csrf' value='\" . $h->csrfToken . \"' />\\n\";\n echo \"</form>\\n\";\n \n \n echo \"<h3>\" . $h->lang[\"stop_spam_test_title\"] . \"</h3>\"; \n echo \"<p>\" . $h->lang[\"stop_spam_test_instructions\"] . \"</p><br />\";\n \n echo \"<form name='stop_spam_test_form' action='\" . BASEURL . \"admin_index.php?page=plugin_settings&amp;plugin=stop_spam' method='post'>\\n\";\n \n //echo '<div class=\"input-prepend\"><span class=\"add-on\">@</span><input class=\"span8\" id=\"stop_spam_test_username\" name=\"stop_spam_test_username\" type=\"text\" placeholder=\"Username\"></div>';\n //echo '<br/>';\n echo '<div class=\"input-prepend\"><span class=\"add-on\"><i class=\"icon-envelope\"></i></span><input class=\"span8\" id=\"stop_spam_test_email\" name=\"stop_spam_test_email\" type=\"email\" placeholder=\"Email\"></div>';\n echo '<br/>';\n echo '<div class=\"input-prepend\"><span class=\"add-on\">::</span><input class=\"span8\" id=\"stop_spam_test_ip\" name=\"stop_spam_test_ip\" type=\"text\" placeholder=\"IP Address\"></div>';\n \n echo \"<br />\\n\"; \n echo \"<input type='hidden' name='tested' value='true' />\\n\";\n echo \"<input type='submit' class='btn' value='Test' />\\n\";\n echo \"<input type='hidden' name='csrf' value='\" . $h->csrfToken . \"' />\\n\";\n echo \"</form>\\n\";\n }", "function settings_page_callback() {\n\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tif (!current_user_can('edit_pages')) {\n\t\t\t\twp_die('Unauthorized user!');\n\t\t\t}\n\n\t\t\tcheck_admin_referer( 'mfsn_nonce' );\n\t\t\t\n\t\t\t$value = $_POST['mfsn_enable'] === 'on' ? 'on' : '';\n\t\t\tupdate_option( 'mfsn_enable', $value );\n\n\t\t\tif (isset($_POST['mfsn_message'])) {\n\t\t\t\t$value = wp_kses_post( $_POST['mfsn_message'] );\n\t\t\t\tupdate_option( 'mfsn_message', $value );\n\t\t\t}\n\t\t\tif (isset($_POST['mfsn_source'])) {\n\t\t\t\t$value = $_POST['mfsn_source'] !== '0' ? intval($_POST['mfsn_source']) : '' ;\n\t\t\t\tupdate_option( 'mfsn_source', $value );\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t<form method='post'>\n\t\t\t<?php wp_nonce_field( 'mfsn_nonce' ); ?>\n\t\t\t<h2>Sitewide Notice Settings</h2>\n\t\t\t<table class=\"form-table\" role=\"presentation\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th scope=\"row\"><label for='mfsn_enable'>Notice Sitewide?</label></th>\n\t\t\t\t\t\t<td scope=\"row\">\n\t\t\t\t\t\t\t<input type='checkbox' id=\"mfsn_enable\" name=\"mfsn_enable\" <?php echo get_option( 'mfsn_enable' ) === 'on' ? 'checked' : ''; ?>>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th scope=\"row\"><label for='mfsn_message'>Notice Text</label></th>\n\t\t\t\t\t\t<td scope=\"row\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\twp_editor(\n\t\t\t\t\t\t\t\tstripslashes( get_option( 'mfsn_message' ) ),\n\t\t\t\t\t\t\t\t'mfsn_message',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'textarea_name' => 'mfsn_message',\n\t\t\t\t\t\t\t\t\t'wpautop' => true,\n\t\t\t\t\t\t\t\t\t'tinymce' => array(\n\t\t\t\t\t\t\t\t\t\t'quicktags' => array( 'buttons' => 'strong,em,del,ul,ol,li,close' ),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th scope=\"row\"><label for='mfsn_source'>Source Site ID (optional)</label></th>\n\t\t\t\t\t\t<td scope=\"row\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$sites = get_sites(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'number' => '10000', //Arbitrary high number of sites.\n\t\t\t\t\t\t\t\t\t'orderby' => 'path',\n\t\t\t\t\t\t\t\t\t'public' => 1,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<select id=\"mfsn_source\" name=\"mfsn_source\">\n\t\t\t\t\t\t\t\t<option value='' <?php echo '' === get_option( 'mfsn_source' ) ? 'selected=\"true\"' : '' ?>>[none]</option>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tforeach( $sites as $site ) {\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<option value='<?php echo $site->blog_id ?>' <?php echo $site->blog_id === (string)get_option( 'mfsn_source' ) ? 'selected=\"true\"' : '' ?>><?php echo $site->path ?></option>\n\t\t\t\t\t\t\t\t\t\t<?php\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</select>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td><input type=\"submit\" value=\"Save\" class=\"button button-primary button-large\"></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</form>\n\t\t<?php\n\t}", "function my_twilio_admin_form($form, &$form_state) {\n $form['my_twilio_account'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Account SID'),\n '#default_value' => variable_get('my_twilio_account'),\n '#description' => t('Enter your Twilio account id'),\n );\n $form['my_twilio_token'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Auth Token'),\n '#default_value' => variable_get('my_twilio_token'),\n '#description' => t('Enter your Twilio token id'),\n );\n $form['my_twilio_number'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Twilio Phone Number'),\n '#default_value' => variable_get('my_twilio_number'),\n '#description' => t('Enter your Twilio phone number'),\n );\n\n $form['my_twilio_country_codes_container'] = array(\n '#type' => 'fieldset',\n '#title' => t('Country codes'),\n '#description' => t('Select the country codes you would like available, If none are selected all will be available.'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['my_twilio_country_codes_container']['twilio_country_codes'] = array(\n '#type' => 'checkboxes',\n '#options' => my_twilio_country_codes(TRUE),\n '#default_value' => variable_get('my_twilio_country_codes', array()),\n );\n\n return system_settings_form($form);\n}", "function room_reservations_admin_settings_sms_delete($form, &$form_state) {\n $sql = \"\n SELECT id, value\n FROM {room_reservations_variables}\n WHERE name = '%s'\n ORDER BY value\n \";\n $result = db_query($sql, 'carrier');\n if ($result) {\n $options = array();\n $options[strval(0)] = t('Select a wireless carrier');\n $x = 0;\n while ($data = db_fetch_object($result)) {\n $x++;\n $id = $data->id;\n $values = explode('~', $data->value);\n $options[strval($id)] = $values[0];\n $x++;\n }\n }\n if ($options) {\n $form['carrier'] = array(\n '#type' => 'select',\n '#title' => t('Wireless carrier'),\n '#options' => $options,\n '#weight' => 25,\n );\n $form['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 30,\n );\n }\n return $form;\n}", "function my_twilio_admin_test_form($form, &$form_state) {\n $form['country'] = array(\n '#type' => 'select',\n '#title' => t('Country code'),\n '#options' => my_twilio_country_codes(),\n );\n $form['number'] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Phone Number'),\n '#description' => t('The number to send your message to. Include all numbers except the country code'),\n );\n $form['message'] = array(\n '#type' => 'textarea',\n '#required' => TRUE,\n '#title' => t('Message'),\n '#description' => t(\"The body of your SMS message.\")\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Send SMS'),\n );\n return $form;\n}", "function se_sms($user_id = 0) {\n\n\t $this->user_id = $user_id;\n\n\t}", "function sendSmsdynamic($link,$msg, $mobile, $schedule=\"\", $sentid=\"\", $action=1,$lang=0)\n{\n\t//$smspass = \"Right@12\";//$rowSms['smspass']; // sms password \n\t//$smssender = \"PROSYS\"; //$rowSms['smssender']; // sms sender id\t\n\t\n\t$smsuname = \"opencompas\"; //$rowSms['smsuname']; // sms user name \n\t$smspass = \"welcome@123\";//$rowSms['smspass']; // sms password \n\t$smssender = \"COMPAS\"; //$rowSms['smssender']; // sms sender id\n\t$veruname = \"username\"; //$rowSms['veruname']; // variable name of user name\n\t$verpass = \"pass\";//$rowSms['verpass']; // variable name of password\n\t$versender = \"senderid\";//$rowSms['versender']; // variable name of sender id\n\t$vermessage = \"message\";//$rowSms['vermessage']; // variable name of message\n\t$vermob = \"dest_mobileno\";//$rowSms['vermob']; // variable name of to (mobile no)\n\t\n\t$verdate = \"dt\";//$rowSms['verdate']; // variable of date field for schedule sms\n\t$verpatter = \"yyyy-mm-dd hh:mm:ss\";//$rowSms['verpatter']; // pattern of date field e.g. ddmmyyyy\n\t$working_key = \"\"; //$rowSms['working_key'];// working key\n\t$verkey = \"workingkey\";// $rowSms['verkey']; // variable name of working key\n\t\n\t$api_url = \"smsjust.com\";//\"dndsms.reliableindya.info\";//$rowSms['api_url']; // API URL\n\t$send_api = \"/sms/user/urlsms.php\";//$rowSms['send_api']; // sending page name \n\t\n\t$chk_bal_api = \"/sms/user/balance_check.php\";//$rowSms['chk_bal_api'];// balance check api\n\t$sch_api = \"/sms/user/urlsms.php\";// $rowSms['sch_api']; // schedule api\n\t$status_api = \"/sms/user/response.php\";//$rowSms['status_api']; // status api\n\t\n\t\n\t//echo \"Called\";\n\t$request = \"\"; //initialize the request variable\n\tif($api_url==\"smsjust.com\" )\n\t{\n\t\t$api_url='smsjust.com';\n\t\t$host='smsjust.com';\n\t\t$ch = curl_init();\n\t}\n\t\n\tif($working_key == \"\")\n\t{\n\t\tif(($action==2 && ($api_url == \"smsjust.com\" )))\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$veruname] = $smsuname; //this is the username of our TM4B account\n\t\t\t$param[$verpass] = $smspass; //this is the password of our TM4B account\n\t\t\t\n\t\t\tif($action==1)\n\t\t\t$param[$vermob] = $mobile; //these are the recipients of the message\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(($action==2 && ($api_url == \"smsjust.com\")))\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$verkey] = $working_key; //this is the key of our TM4B account\n\t\t\t\n\t\t\tif($action==1)\n\t\t\t$param[$vermob] = \"91\".$mobile; //these are the recipients of the message\n\t\t}\n\t}\n\t\n\tif($action==1)\n\t{\n\t\t$param[$versender] = $smssender;//this is our sender \n\t\t$param[$vermessage] = $msg; //this is the message that we want to send\n\t}\n\telse if($action==2)\n\t{\n\t\tif($api_url == \"smsjust.com\" )\n\t\t{\n\t\t\t$param['Scheduleid'] =$sentid;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t$param['messageid'] = $sentid;//this is our sender \n\t\t}\n\t}\n\tif(( $api_url==\"smsjust.com\") && $action!=2)\n\t{\n\t\t$param['response'] = 'Y';// variable name of responce for websms\n\t}\n\t// for schedule //\n\tif($schedule!=\"\")\n\t{\n\t\t$timearr = explode(\" \",$schedule);\n\t\t\n\t\t$dateoftime = $timearr[0];\n\t\t$timeoftime = $timearr[1];\n\t\t\n\t\t$datearr = explode(\"-\",$dateoftime); // explode Date //\n\t\t$yyyy = $datearr[0]; // year\n\t\t$mm = $datearr[1]; // month\n\t\t$dd = $datearr[2]; // day\n\t\t\n\t\t$datearr = explode(\":\",$timeoftime);\n\t\t$hh = $datearr[0];\n\t\t$mmt = $datearr[1];\n\t\t$ss = $datearr[2];\n\t\t\n\t\t$scdltime = strtolower($verpatter);\n\t\t$scdltime = str_replace(\"yyyy\",$yyyy,$scdltime);\n\t\t$scdltime = str_replace(\"dd\",$dd,$scdltime);\n\t\t$scdltime = str_replace(\"hh\",$hh,$scdltime);\n\t\t$scdltime = str_replace(\"ss\",$ss,$scdltime);\n\t\t$scdltime = preg_replace('/mm/i', $mm, $scdltime, 1);\n\t\t$scdltime = str_replace(\"mm\",$mmt,$scdltime);\n\t\tif(($api_url==\"smsjust.com\"))\n\t\t{\n\t\t\t$param['dt'] = \"$yyyy-$mm-$dd\";\n\t\t\t$param['tm'] = \"$hh-$mmt-$ss\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$verdate] = $scdltime; //this is the schedule datetime //\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}\n\t//print_r($param);\t\n\tforeach($param as $key=>$val) //traverse through each member of the param array\n\t{ \n\t\t$request.= $key.\"=\".urlencode($val); //we have to urlencode the values\n\t\t$request.= \"&\"; //append the ampersand (&) sign after each paramter/value pair\n\t}\n\tif($lang!=0 && $api_url!=\"smsjust.com\")\n\t{\n\t\t$request.=\"unicode=1&\";\n\t}\n\telseif($lang!=0 && ($api_url==\"smsjust.com\"))\n\t{\n\t\t$request.=\"msgtype=UNI&\";\n\t}\n\t\n\t\n\t$request = substr($request, 0, strlen($request)-1); //remove the final ampersand sign from the request\n\t//echo $request;\n\n\tif($action==\"1\") // 1 for send sms //\n\t$process_api = trim($send_api,\"/\");\n\telse if($action==\"2\") // 2 for Delivery report //\n\t$process_api = trim($status_api,\"/\");\n\telse if($action==\"3\") // 3 for check balance //\n\t$process_api = trim($chk_bal_api,\"/\");\n\t\n\t\n\t//First prepare the info that relates to the connection\n\t$host = $api_url;\n\t$script = \"/$process_api\";\n\t$request_length = strlen($request);\n\t$method = \"POST\"; // must be POST if sending multiple messages\n\tif ($method == \"GET\") \n\t{\n\t $script .= \"?$request\";\n\t}\n\tif($api_url == \"smsjust.com\" )\n\t{\n\t\t $url=\"http://$host$script?$request\";\n\t\t curl_setopt($ch,CURLOPT_URL, $url);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t$output= curl_exec($ch);\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t//if($action == 1)die;\n\t}\n\telse\n\t{\n\t\t//Now comes the header which we are going to post. \n\t\t$header = \"$method $script HTTP/1.1\\r\\n\";\n\t\t$header .= \"Host: $host\\r\\n\";\n\t\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t$header .= \"Content-Length: $request_length\\r\\n\";\n\t\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t\t$header .= \"$request\\r\\n\";\n\t\t\n\t\t//echo $header;\n\t\t//Now we open up the connection\n\t\t$socket = @fsockopen($host, 80, $errno, $errstr); \n\t\tif ($socket) //if its open, then...\n\t\t{ \n\t\t fputs($socket, $header); // send the details over\n\t\t while(!feof($socket))\n\t\t {\n\t\t\t $output[] = fgets($socket); //get the results \n\t\t\t\t\t\n\t\t }\n\t\t fclose($socket); \n\t\t}\n\t}\n\t\t\n\tif($action==1) // sent sms //\n\t{\n\t\tif($api_url==\"alerts.reliableindya.info\")\n\t\t{\n\t\t\t$cntOutput = count($output);\n\t\t\t$lastValue = $output[$cntOutput-1];\n\t\t\t\n\t\t\t$expLastValue = explode(\"=\",$lastValue);\n\t\t\t$cntLastValue = count($expLastValue);\n\t\t\t$messageid = $expLastValue[$cntLastValue-1];\n\t\t\t\n\t\t\treturn $messageid;\n\t\t}\n\t\telse if($api_url==\"dndsms.reliableindya.info\" || $api_url==\"bulk.reliableindya.info\" || $api_url==\"dndsms.reliableservices.org\")\n\t\t{\n\t\t\t//$messageid = trim($output[22]).\"||\".trim($output[21]);\n\t\t\t$messageid = trim($output[22]);\n\t\t\treturn $messageid; //substr($lastBal,4);\n\t\t}\n\t\tif($api_url==\"smsjust.com\")\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t}\n\telse if($action==2) // delivery report //\n\t{\n\t\treturn $output;\n\t}\n\telse if($action==3) // check balance //\n\t{\n\t\tif($api_url==\"alerts.reliableindya.info\")\n\t\t{\n\t\t\t$balamount = \"\";\n\t\t\t//print_r($output);\n\t\t\tforeach($output as $op)\n\t\t\t{\n\t\t\t\tif(strpos($op,'credits')!==false)\n\t\t\t\t$balamount = $op;\n\t\t\t}\n\t\t\t//return preg_replace(\"/[^0-9]/\",\"\",$output[9]);\n\t\t\treturn preg_replace(\"/[^0-9.]/\",\"\",$balamount);\n\t\t}\n\t\telse if($api_url==\"smsjust.com\")\n\t\t{\n\t\t\t$outArr = explode(\":\",$output);\n\t\t\t$output = trim($outArr[1]);\n\t\t\treturn $output;\n\t\t}\n\t}\n\t\n}", "function room_reservations_admin_settings_email($form, &$form_state) {\n $default_from_address\n = _room_reservations_get_variable('from_address');\n $default_confirmation_header_text\n = _room_reservations_get_variable('confirmation_header_text');\n $default_confirmation_owner_text\n = _room_reservations_get_variable('confirmation_owner_text');\n $default_confirmation_group_text\n = _room_reservations_get_variable('confirmation_group_text');\n $default_reminder_header_text\n = _room_reservations_get_variable('reminder_header_text');\n $default_reminder_owner_text\n = _room_reservations_get_variable('reminder_owner_text');\n $default_reminder_group_text\n = _room_reservations_get_variable('reminder_group_text');\n $tokens = array(\n '%reservation_name' => t('The name given to the reservation to identify it\n on the reservation calendar.'),\n '%room' => t('The room that has been reserved.'),\n '%month' => t('The full name of the month of the reservation date.'),\n '%month_number' => t('The month number of the reservation date.'),\n '%day' => t('The numeric day of the month of the reservation date.'),\n '%day_of_the_week' => t('The full name of the day of the week of the\n reservation date.'),\n '%time' => t('The time of the reservation.'),\n '%minutes' => t('The length of the reservation in minutes.'),\n );\n $token_display = '<p>' .\n t('The following tokens will be replaced with dynamic values in any of the\n fields below.') . '</p><ul>';\n foreach ($tokens as $key => $value) {\n $token_display .= '<li>' . $key . ' - ' . $value . '</li>';\n }\n $token_display .= '</ul>';\n $form['from_address'] = array(\n '#title' => t('From address'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The from address on all email messages.'),\n '#default_value' => $default_from_address,\n '#weight' => -110,\n );\n $form['tokens'] = array(\n '#type' => 'fieldset',\n '#title' => t('Token values'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => -100,\n );\n $form['tokens']['values'] = array(\n '#value' => $token_display,\n );\n $form['confirmation_header'] = array(\n '#title' => t('Confirmation heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all confirmation messages.'),\n '#default_value' => $default_confirmation_header_text,\n '#weight' => -97,\n );\n $form['confirmation_owner'] = array(\n '#title' => t('Confirmation body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_confirmation_owner_text,\n '#weight' => -95,\n );\n $form['confirmation_group'] = array(\n '#title' => t('Confirmation to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_confirmation_group_text,\n '#weight' => -90,\n );\n $form['reminder_header'] = array(\n '#title' => t('Reminder heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all reminder messages.'),\n '#default_value' => $default_reminder_header_text,\n '#weight' => -85,\n );\n $form['reminder_owner'] = array(\n '#title' => t('Reminder body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_reminder_owner_text,\n '#weight' => -80,\n );\n $form['reminder_group'] = array(\n '#title' => t('Reminder to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_reminder_group_text,\n '#weight' => -75,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}", "public function save_settings()\n\t{\n\t\tif ( $_POST && wp_verify_nonce( $_POST['save-confirm-user-registration-settings-nonce'], 'save-confirm-user-registration-settings' ) ) :\n\t\t\t$options = array(\n\t\t\t\t'error' => $_POST['error'],\n\t\t\t\t'from' => $_POST['from'],\n\t\t\t\t'subject' => $_POST['subject'],\n\t\t\t\t'message' => $_POST['message']\n\t\t\t);\n\n\t\t\t$options = apply_filters( 'confirm-user-registration-save-options', $options );\n\t\t\tupdate_site_option( 'confirm-user-registration', $options);\n\n\t\t\t?>\n\t\t\t<div class=\"updated message\">\n\t\t\t\t<p><?php _e( 'Saved' ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t}", "public function send_sms($order_no=null,$customer_id=null,$type=null){\n\n $CI =& get_instance();\n $CI->load->model('dashboard/Sms_model','sms_model');\n $gateway = $CI->sms_model->retrieve_active_getway();\n $sms_template = $CI->db->select('*')->from('sms_template')->where('type',$type)->get()->row();\n $sms = $CI->db->select('*')->from('sms_configuration')->get()->row();\n\t\t$customer_info=$CI->db->select('customer_phone')->from('customer_info')->where('customer_id',$customer_id)->get()->row();\n\t\t$recipients = $customer_info->customer_phone;\n\t\t\n\t\t $sms_type= strtolower($sms_template->type);\n if($sms_type == \"neworder\" || $sms_type == \"completeorder\" || $sms_type == \"processing\" || $sms_type == \"cancel\"){ \n $message= str_replace('{id}', $order_no, $sms_template->message);\n }\n if(1 == $gateway->id ){\n\n\n /****************************\n * SMSRank Gateway Setup\n ****************************/\n $CI =& get_instance();\n $url = \"http://api.smsrank.com/sms/1/text/singles\"; \n $username = $gateway->user_name;\n $password=base64_encode($gateway->password); \n $message=base64_encode($message);\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL, \"$url?username=$username&password=$password&to=$recipients&text=$message\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';\n curl_setopt($curl, CURLOPT_USERAGENT, $agent);\n $output = json_decode(curl_exec($curl), true);\n return true;\n curl_close($curl);\n }\n if( 2 == $gateway->id ){\n /****************************\n * nexmo Gateway Setup\n ****************************/\n $api = $gateway->user_name;\n $secret_key = $gateway->password;\n $message = $message;\n $from = $gateway->sms_from; \n\n $data = array(\n 'from' => $from,\n 'text' => $message,\n 'to' => $recipients\n );\n require_once APPPATH.'libraries/nexmo/vendor/autoload.php';\n $basic = new \\Nexmo\\Client\\Credentials\\Basic($api, $secret_key);\n $client = new \\Nexmo\\Client($basic);\n $message = $client->message()->send($data);\n if(!$message) \n { \n return json_encode(array(\n 'status' => false,\n 'message' => 'Curl error: '\n ));\n } else { \n return json_encode(array(\n 'status' => true,\n 'message' => \"success: \"\n )); \n }\n }\n\n if( 3 == $gateway->id ){\n /****************************\n * budgetsms Gateway Setup\n ****************************/\n $message = $message;\n $from = $gateway->sms_from; \n $userid = $gateway->userid; \n $username = $gateway->user_name; \n $handle = $gateway->password; \n\n $data = array(\n 'handle' => $handle,\n 'username' => $username,\n 'userid' => $userid,\n 'from' => $from,\n 'msg' => $message,\n 'to' => $recipients\n );\n\t\t\t\t\n\t\t$url = \"https://api.budgetsms.net/sendsms/?\"; \n\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n $response = curl_exec($curl); \n\t\t \n if(curl_errno($curl)) \n { \n return json_encode(array(\n 'status' => false,\n 'message' => 'Curl error: ' . curl_error($curl)\n ));\n } else { \n return json_encode(array(\n 'status' => true,\n 'message' => \"success: \". $response\n )); \n } \n\n curl_close($curl);\n\n\n }\n\n}", "function message()\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$this->common_header('domessage', 'Board Message', 'You may change the configuration below. HTML is enabled, and BBCode will be enabled in later versions.');\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>Turn the message system off?</b>\",\r\n\t\t $SKIN->form_yes_no(\"global_message_on\", $INFO['global_message_on'])\r\n\t\t ));\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>The message to display</b>\",\r\n\t\t $SKIN->form_textarea(\"global_message\", $INFO['global_message'])\r\n\t\t ));\r\n\r\n\t\t$this->common_footer();\r\n\r\n\t}", "public function admin_edit_mainmail(){\n\t\t\t$this->loadModel(\"Support\");\n\t\t\t$mail=$this->Support->findById(1);\n\t\t\t\n\t\t\t/*if data sended by form*/\n\t\t\tif ($this->request->is('post')) {\n\n\t\t\t\t/*get new parameters from form*/\n\t\t\t\t$new=array(\t'mail_from'=>$this->data['Module']['adress'],\n\t\t\t\t\t\t\t'host'=>$this->data['Module']['host'],\n\t\t\t\t\t\t\t'password'=>$this->data['Module']['password'],\n\t\t\t\t\t\t\t'port'=>$this->data['Module']['port'],\n\t\t\t\t\t\t\t);\n\n\t\t\t\t/*save new adress to table \"mail_dests\"*/\n\t\t\t\t$this->Support->id=1;\n\t\t\t\t$this->Support->save($new);\n\n\t\t\t\t/*back*/\n\t\t\t\t$this->redirect(array('action'=>'admin_mail'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Configuration\");\n\t\t\t$this->set(\"legend\", \"Edit adress\");\n\t\t\t$this->set(compact('mail'));\n\t\t\t}", "public function update_email_gateway()\n\t{\n\t\t$email = $this->input->post('es_id');\n\t\t\n\t\t$pass = '';\n\t\t$password = $this->db->select('password')->from('email_sms_gateway')->where('es_id', 2)->get()->row();\n\t\t\n\t\tif($password->password == base64_decode($this->input->post('email_password'))){\n\t\t $pass = $password->password;\n\t\t \n\t\t}else{\n\t\t $pass = $this->input->post('email_password');\n\t\t \n\t\t}\n\t\t$data = array(\n\t\t\t'title' \t=>$this->input->post('email_title'),\n\t\t\t'protocol' \t=>$this->input->post('email_protocol'),\n\t\t\t'host' \t\t=>$this->input->post('email_host'),\n\t\t\t'port' \t\t=>$this->input->post('email_port'),\n\t\t\t'user' \t\t=>$this->input->post('email_user'),\n\t\t\t'password' \t=>$pass,\n\t\t\t'mailtype' \t=>$this->input->post('email_mailtype'),\n\t\t\t'charset' \t=>$this->input->post('email_charset')\n\t\t);\n\t\t\t\n\t\t$this->db->where('es_id', $email)->update('email_sms_gateway',$data);\n\t\t\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\n\t\tredirect('backend/dashboard/setting/email_gateway');\n\t}", "function ssbd_staticpage_settings_form($form, &$form_state) {\n $form['ssbd_staticpage_simulate_mobile'] = array(\n '#title' => t('Simulate Mobile'),\n '#type' => 'checkbox',\n '#required' => FALSE,\n '#default_value' => variable_get('ssbd_staticpage_simulate_mobile', NULL),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save settings'),\n );\n return $form;\n}", "private function saveConfig(){\n\t\tif(!isset($_POST['services_ipsec_settings_enabled'])){\n\t\t\t$this->data['enable'] = 'false';\n\t\t}\n\t\telseif($_POST['services_ipsec_settings_enabled'] == 'true'){\n\t\t\t$this->data['enable'] = 'true';\n\t\t}\n\t\t\n\t\t$this->config->saveConfig();\n\t\t$this->returnConfig();\n\t}", "function makedefault()\n {\n $msg='';\n $status=0;\n \n if (isset($_POST['sms_gateway'])) {\n \n if (DEMO) {\n $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2);\n redirect(URL_SMS_GATEWAYS);\n }\n \n $details = $this->base_model->fetch_records_from(TBL_SMS_GATEWAYS);\n \n if (!empty($details)) {\n \n $this->db->query('UPDATE '.TBL_PREFIX.TBL_SMS_GATEWAYS.' SET is_default=\"No\"');\n \n $sms_gateway_id = $this->input->post('sms_gateway_id');\n \n if ($sms_gateway_id > 0) {\n if ($this->db->query('UPDATE '.TBL_PREFIX.TBL_SMS_GATEWAYS.' SET is_default=\"Yes\" WHERE sms_gateway_id = '.$sms_gateway_id)) {\n $msg .= get_languageword('updated_successfully');\n $status = 0;\n } else {\n $msg .= get_languageword('not_updated');\n $status = 1;\n }\n } else {\n $msg .= get_languageword('invalid_updated');\n $status = 1;\n }\n }\n }\n \n if ($msg != '') {\n $this->prepare_flashmessage($msg, $status);\n }\n redirect(URL_SMS_GATEWAYS, REFRESH); \n }", "public function send_reminder()\n\t{\n\t\t$apikey = $this->input->post('apikey');\n\t\t$ip_add = $_SERVER['REMOTE_ADDR'];\n\n\t\tif($apikey=='smsatlosbanos'){\n\t \t\t$contact_number = '0'.substr($this->input->post('contact_number'), -10);\n\t \t\t$name = $this->input->post('name');\n\t \t\t$vac_date = $this->input->post('vac_date');\n\t \t\t$vac_site = $this->input->post('vac_site');\n\t \t\t$time_schedule = $this->input->post('time_schedule');\n\t \t\t$device_id = $this->input->post('device_id');\n\t \t\t$dose = $this->input->post('dose');\n\n\t \t\tif($vac_site==1){\n\t \t\t\t$site_text = 'Batong Malake Covered Court';\n\t \t\t}elseif($vac_site==2){\n\t \t\t\t$site_text = 'UPLB Copeland';\n\t \t\t}elseif($vac_site==3){\n\t \t\t\t$site_text = 'LB Evacuation Center';\n\t \t\t}\n\n\t\t\t$message = 'LB RESBAKUNA REMINDER';\n\t\t\t$message .= \"\\n\".$name;\n\t\t\t$message .= \"\\n\".date('F d, Y', strtotime($vac_date)).' At '. $time_schedule;\n\t \t\t$message .= \"\\n\".$site_text;\n\t \t\t$message .= \"\\nWear facemask and faceshield properly. Bring Ballpen.\";\n\t \t\t$message .= \"\\nSalamat po.\";\n\t\t\t$this->send_text($message,$contact_number,$device_id);\n\t\t}\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Twispay settings'),\n 'icon' => 'icon-cogs',\n ),\n /** Form fields */\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'TWISPAY_LIVE_MODE',\n 'is_bool' => false,\n 'desc' => $this->l('Select \"YES\" if you wish to use the payment gateway in Production or \"No\" if you want to use it in staging mode.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-lock\"></i>',\n 'desc' => $this->l('Enter the SITE ID for staging mode'),\n 'name' => 'TWISPAY_SITEID_STAGING',\n 'label' => $this->l('Staging Site ID'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Enter the Private key for staging mode'),\n 'name' => 'TWISPAY_PRIVATEKEY_STAGING',\n 'label' => $this->l('Staging Private key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-lock\"></i>',\n 'desc' => $this->l('Enter the SITE ID for live mode'),\n 'name' => 'TWISPAY_SITEID_LIVE',\n 'label' => $this->l('Live Site ID'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Enter the Private key for live mode'),\n 'name' => 'TWISPAY_PRIVATEKEY_LIVE',\n 'label' => $this->l('Live Private key'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable iframe payment form'),\n 'name' => 'TWISPAY_IFRAME_FORM',\n 'is_bool' => false,\n 'desc' => $this->l('Select \"YES\" if you wish to use the iframe payment form.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-link\"></i>',\n 'desc' => $this->l('Put this URL in your twispay account'),\n 'name' => 'TWISPAY_NOTIFICATION_URL',\n 'label' => $this->l('Server-to-server notification URL'),\n 'readonly' => true,\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function admin_config() {\n\t\t\tglobal $wpdb, $Html, $Db, $Subscriber, $Latestpost, $wpmlCountry, $Mailinglist;\n\t\t\t\n\t\t\tdo_action('newsletters_admin_settings');\n\t\t\t\n\t\t\tif (!empty($_GET['reset']) && $_GET['reset'] == 1) {\n\t\t\t\t$this -> update_options();\n\t\t\t\t$this -> redirect($this -> url);\n\t\t\t}\n\t\t\t\n\t\t\t$method = (empty($_GET['method'])) ? false : $_GET['method'];\n\t\n\t\t\tswitch ($method) {\n\t\t\t\tcase 'managementpost'\t:\n\t\t\t\t\t$this -> get_managementpost(false, true);\n\t\t\t\t\t$msg_type = 'message';\n\t\t\t\t\t$message = __('Manage subscriptions post/page has been created', $this -> plugin_name);\n\t\t\t\t\t$this -> redirect($this -> referer, $msg_type, $message);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkdb'\t\t\t:\n\t\t\t\t\t$this -> check_roles();\n\t\t\t\t\t$this -> check_tables();\n\t\t\t\t\t\n\t\t\t\t\tif (!empty($this -> tablenames)) {\n\t\t\t\t\t\tforeach ($this -> tablenames as $table) {\n\t\t\t\t\t\t\t$query = \"OPTIMIZE TABLE `\" . $table . \"`\";\n\t\t\t\t\t\t\t$wpdb -> query($query);\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$this -> delete_option('hidedbupdate');\n\t\t\t\t\t\n\t\t\t\t\tflush_rewrite_rules();\n\t\t\t\t\t\n\t\t\t\t\t$msg_type = 'message';\n\t\t\t\t\t$message = __('All database tables have been checked and optimized.', $this -> plugin_name);\n\t\t\t\t\t$this -> redirect($this -> referer, $msg_type, $message);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'clearlpshistory'\t:\n\t\t\t\t\tif (!empty($_GET['id'])) {\n\t\t\t\t\t\t$clearquery = \"DELETE FROM \" . $wpdb -> prefix . $Latestpost -> table . \" WHERE `lps_id` = '\" . $_GET['id'] . \"'\";\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$clearquery = \"TRUNCATE TABLE \" . $wpdb -> prefix . $Latestpost -> table . \"\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($wpdb -> query($clearquery)) {\n\t\t\t\t\t\t$msg_type = 'message';\n\t\t\t\t\t\t$message = __('Latest Posts Subscription history has been cleared.', $this -> plugin_name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$msg_type = 'error';\n\t\t\t\t\t\t$message = __('Latest Posts Subscription history could not be cleared, please try again.', $this -> plugin_name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this -> redirect($this -> referer, $msg_type, $message);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'reset'\t\t\t:\n\t\t\t\t\t$query = \"TRUNCATE TABLE `\" . $wpdb -> prefix . \"\" . $wpmlCountry -> table . \"`\";\n\t\t\t\t\t$wpdb -> query($query);\n\t\t\t\t\n\t\t\t\t\t$query = \"DELETE FROM `\" . $wpdb -> prefix . \"options` WHERE `option_name` LIKE '\" . $this -> pre . \"%';\";\n\t\t\t\t\n\t\t\t\t\tif ($wpdb -> query($query)) {\t\t\t\t\n\t\t\t\t\t\t$msg_type = 'message';\n\t\t\t\t\t\t$message = __('All configuration settings have been reset', $this -> plugin_name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$msg_type = 'error';\n\t\t\t\t\t\t$message = __('Configuration settings cannot be reset', $this -> plugin_name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this -> redirect($Html -> retainquery('reset=1', $this -> url), $msg_type, $message);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault\t\t\t\t\t:\t\t\t\t\t\t\t\n\t\t\t\t\t//make sure that data has been posted\n\t\t\t\t\tif (!empty($_POST)) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//unset values that are not required\n\t\t\t\t\t\tunset($_POST['save']);\n\t\t\t\t\t\tdelete_option('tridebugging');\n\t\t\t\t\t\t$this -> delete_option('inlinestyles');\n\t\t\t\t\t\t$this -> delete_option('themeintextversion');\n\t\t\t\t\t\t$this -> delete_option('emailarchive');\n\t\t\t\t\t\t$this -> delete_option('excerpt_settings');\n\t\t\t\t\t\t$this -> delete_option('defaulttemplate');\n\t\t\t\t\t\t$this -> delete_option('loadstyles');\n\t\t\t\t\t\t$this -> delete_option('loadscripts');\n\t\t\t\t\t\t$this -> delete_option('remove_width_height_attr');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($_FILES)) {\n\t\t\t\t\t\t\tforeach ($_FILES as $fkey => $fval) {\n\t\t\t\t\t\t\t\tswitch ($fkey) {\n\t\t\t\t\t\t\t\t\tcase 'tracking_image_file'\t\t\t:\n\t\t\t\t\t\t\t\t\t\t$tracking_image_file = $this -> get_option('tracking_image_file');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (!empty($_POST['tracking']) && $_POST['tracking'] == \"Y\" && !empty($_POST['tracking_image']) && $_POST['tracking_image'] == \"custom\") {\n\t\t\t\t\t\t\t\t\t\t\tif (!empty($_FILES['tracking_image_file']['name'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t$tracking_image_file = $_FILES['tracking_image_file']['name'];\n\t\t\t\t\t\t\t\t\t\t\t\t$tracking_image_path = $Html -> uploads_path() . DS . $this -> plugin_name . DS;\n\t\t\t\t\t\t\t\t\t\t\t\t$tracking_image_full = $tracking_image_path . $tracking_image_file;\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 (move_uploaded_file($_FILES['tracking_image_file']['tmp_name'], $tracking_image_full)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this -> update_option('tracking_image_file', $tracking_image_file);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this -> render_error(__('Tracking image file could not be moved from /tmp', $this -> plugin_name));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif (empty($tracking_image_file)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this -> render_error(__('No image was specified', $this -> plugin_name));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($_POST as $key => $val) {\t\t\n\t\t\t\t\t\t\t$this -> update_option($key, $val);\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch ($key) {\n\t\t\t\t\t\t\t\tcase 'defaulttemplate'\t\t:\n\t\t\t\t\t\t\t\t\tif (!empty($val)) {\n\t\t\t\t\t\t\t\t\t\t$this -> update_option('defaulttemplate', true);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'debugging'\t\t\t:\n\t\t\t\t\t\t\t\t\tif (!empty($val)) {\n\t\t\t\t\t\t\t\t\t\tupdate_option('tridebugging', 1);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'embed'\t\t\t\t:\n\t\t\t\t\t\t\t\t\tif ($this -> language_do()) {\n\t\t\t\t\t\t\t\t\t\tif (!empty($val) && is_array($val)) {\n\t\t\t\t\t\t\t\t\t\t\tforeach ($val as $vkey => $vval) {\n\t\t\t\t\t\t\t\t\t\t\t\t$val[$vkey] = $this -> language_join($vval);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\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$this -> update_option('embed', $val);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'excerpt_more'\t\t\t:\n\t\t\t\t\t\t\t\t\tif ($this -> language_do()) {\n\t\t\t\t\t\t\t\t\t\t$this -> update_option($key, $this -> language_join($val));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this -> update_option($key, $val);\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'customcsscode'\t\t:\n\t\t\t\t\t\t\t\t\tif (!empty($_POST['customcss']) && $_POST['customcss'] == \"Y\") {\n\t\t\t\t\t\t\t\t\t\t$this -> update_option('customcss', \"Y\");\n\t\t\t\t\t\t\t\t\t\t$this -> update_option('customcsscode', $_POST['customcsscode']);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this -> update_option('customcss', \"N\");\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'emailarchive'\t\t\t:\n\t\t\t\t\t\t\t\t\tif (!empty($val)) {\n\t\t\t\t\t\t\t\t\t\t$this -> emailarchive_scheduling();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update scheduling\n\t\t\t\t\t\t$this -> scheduling();\n\t $this -> pop_scheduling();\n\t $this -> optimize_scheduling();\n\t \n\t if (!empty($_POST['latestposts_updateinterval']) && $_POST['latestposts_updateinterval'] == \"Y\") {\n\t \t$this -> latestposts_scheduling();\n\t }\n\t\n\t\t\t\t\t\t$message = 6;\n\t\t\t\t\t\t$this -> redirect(admin_url('admin.php?page=' . $this -> sections -> settings), 'message', $message);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$mailinglists = $Mailinglist -> get_all('*', true);\n\t\t\t\t\t$this -> delete_all_cache('all');\n\t\t\t\t\t$this -> render_admin('settings', array('mailinglists' => $mailinglists));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function update_network_settings() {\n\t\tif ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'simple-smtp-ms' ) ) {\n\t\t\twp_die( esc_attr_e( 'Your nonce key has expired.', 'simple-smtp' ) );\n\t\t}\n\n\t\tif ( ! is_multisite() && ! current_user_can( 'manage_network_options' ) ) {\n\t\t\twp_die( esc_attr_e( 'You do not have permission to use this endpoint.', 'simple-smtp' ) );\n\t\t}\n\n\t\t// Save per-site configurations for access.\n\t\t$sites = get_sites();\n\t\tforeach ( $sites as $site ) {\n\t\t\t$id = $site->blog_id;\n\t\t\t$set_val = ( isset( $_REQUEST[ \"wpssmtp_perm_set_s{$id}\" ] ) && '1' === $_REQUEST[ \"wpssmtp_perm_set_s{$id}\" ] ) ? 1 : 0;\n\t\t\t$log_val = ( isset( $_REQUEST[ \"wpssmtp_perm_log_s{$id}\" ] ) && '1' === $_REQUEST[ \"wpssmtp_perm_log_s{$id}\" ] ) ? 1 : 0;\n\n\t\t\tupdate_network_option( $site->blog_id, 'wpssmtp_disable_settings', $set_val );\n\t\t\tupdate_network_option( $site->blog_id, 'wpssmtp_disable_logging', $log_val );\n\t\t}\n\n\t\t// Save over-ruling SMTP configurations.\n\t\tif ( isset( $_REQUEST['wpssmtp_smtp'] ) ) {\n\t\t\t$settings = [];\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['host'] ) ) {\n\t\t\t\t$settings['host'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['host'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['port'] ) ) {\n\t\t\t\t$settings['port'] = (int) $_REQUEST['wpssmtp_smtp']['port']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['auth'] ) ) {\n\t\t\t\t$settings['auth'] = (int) $_REQUEST['wpssmtp_smtp']['auth']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['user'] ) ) {\n\t\t\t\t$settings['user'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['user'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['pass'] ) ) {\n\t\t\t\tif ( $this->dummy_password === $_REQUEST['wpssmtp_smtp']['pass'] ) {\n\t\t\t\t\t$settings['pass'] = get_site_option( 'wpssmtp_smtp_ms', [ 'pass' => null ] )['pass'];\n\t\t\t\t} else {\n\t\t\t\t\t$settings['pass'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['pass'] ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['from'] ) ) {\n\t\t\t\t$settings['from'] = sanitize_email( wp_unslash( $_REQUEST['wpssmtp_smtp']['from'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['fromname'] ) ) {\n\t\t\t\t$settings['fromname'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['fromname'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['sec'] ) && 'def' !== $_REQUEST['wpssmtp_smtp']['sec'] ) {\n\t\t\t\t$settings['sec'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['sec'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['noverifyssl'] ) ) {\n\t\t\t\t$settings['noverifyssl'] = (int) $_REQUEST['wpssmtp_smtp']['noverifyssl']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['disable'] ) ) {\n\t\t\t\t$settings['disable'] = (int) $_REQUEST['wpssmtp_smtp']['disable']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['log'] ) ) {\n\t\t\t\t$settings['log'] = (int) $_REQUEST['wpssmtp_smtp']['log']; }\n\n\t\t\tupdate_site_option( 'wpssmtp_smtp_ms', $settings );\n\t\t}\n\n\t\t// Done with saving - send them back.\n\t\twp_safe_redirect( network_admin_url( 'settings.php?page=wpsimplesmtpms' ) );\n\t\texit;\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "public function postUpdateScheduleSMS(Request $request)\n {\n\n $cmd = $request->cmd;\n\n $v = \\Validator::make($request->all(), [\n 'phone_number' => 'required', 'schedule_time' => 'required'\n ]);\n\n if ($v->fails()) {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->withErrors($v->errors());\n }\n\n\n $sms_info = CampaignSubscriptionList::find($cmd);\n\n if (!$sms_info) {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->with([\n 'message' => language_data('SMS info not found', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n\n\n if (\\DateTime::createFromFormat('m/d/Y h:i A', $request->schedule_time) !== FALSE) {\n $schedule_time = date('Y-m-d H:i:s', strtotime($request->schedule_time));\n } else {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->with([\n 'message' => language_data('Invalid time format', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n\n $blacklist = BlackListContact::select('numbers')->where('user_id', Auth::guard('client')->user()->id)->get()->toArray();\n\n if ($blacklist && is_array($blacklist) && count($blacklist) > 0) {\n $blacklist = array_column($blacklist, 'numbers');\n }\n\n if (in_array($request->phone_number, $blacklist)) {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->with([\n 'message' => language_data('Phone number contain in blacklist', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n\n\n $client = Client::find(Auth::guard('client')->user()->id);\n\n if ($client == '') {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->with([\n 'message' => language_data('Client info not found', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n\n\n $campaign = Campaigns::where('campaign_id', $sms_info->campaign_id)->first();\n\n if (!$campaign) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => 'SMS info not found',\n 'message_important' => true\n ]);\n }\n\n if ($campaign->user_id != $client->id) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => 'Invalid access',\n 'message_important' => true\n ]);\n }\n\n $msg_type = $campaign->sms_type;\n $message = $request->message;\n\n if ($msg_type == 'plain' || $msg_type == 'voice' || $msg_type == 'mms') {\n\n\n if (strlen($message) != strlen(utf8_decode($message))) {\n return redirect('user/sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => 'SMS contain unicode characters',\n 'message_important' => true\n ]);\n }\n\n $msgcount = strlen(preg_replace('/\\s+/', ' ', trim($message)));\n if ($msgcount <= 160) {\n $msgcount = 1;\n } else {\n $msgcount = $msgcount / 157;\n }\n }\n if ($msg_type == 'unicode' && $msg_type == 'arabic') {\n $msgcount = mb_strlen(preg_replace('/\\s+/', ' ', trim($message)), 'UTF-8');\n\n if ($msgcount <= 70) {\n $msgcount = 1;\n } else {\n $msgcount = $msgcount / 67;\n }\n }\n\n $msgcount = ceil($msgcount);\n\n $phone = str_replace(['(', ')', '+', '-', ' '], '', $request->phone_number);\n\n if ($sms_info->amount < $msgcount) {\n $c_phone = PhoneNumber::get_code($phone);\n\n $sms_cost = IntCountryCodes::where('country_code', $c_phone)->where('active', '1')->first();\n\n if ($sms_cost) {\n\n\n $phoneUtil = PhoneNumberUtil::getInstance();\n $phoneNumberObject = $phoneUtil->parse('+' . $phone, null);\n $area_code_exist = $phoneUtil->getLengthOfGeographicalAreaCode($phoneNumberObject);\n\n if ($area_code_exist) {\n $format = $phoneUtil->format($phoneNumberObject, PhoneNumberFormat::INTERNATIONAL);\n $get_format_data = explode(\" \", $format);\n $operator_settings = explode('-', $get_format_data[1])[0];\n\n } else {\n $carrierMapper = PhoneNumberToCarrierMapper::getInstance();\n $operator_settings = $carrierMapper->getNameForNumber($phoneNumberObject, 'en');\n }\n\n $get_operator = Operator::where('operator_setting', $operator_settings)->where('coverage_id', $sms_cost->id)->first();\n\n if ($get_operator) {\n\n $sms_charge = $get_operator->plain_price;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $get_operator->plain_price;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $get_operator->voice_price;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $get_operator->mms_price;\n }\n\n $existing_price = $sms_charge * $sms_info->amount;\n $total_cost = ($sms_charge * $msgcount) - $existing_price;\n\n } else {\n $sms_charge = $sms_cost->plain_tariff;\n\n if ($msg_type == 'plain' || $msg_type == 'unicode' || $msg_type == 'arabic') {\n $sms_charge = $sms_cost->plain_tariff;\n }\n\n if ($msg_type == 'voice') {\n $sms_charge = $sms_cost->voice_tariff;\n }\n\n if ($msg_type == 'mms') {\n $sms_charge = $sms_cost->voice_tariff;\n }\n\n $existing_price = $sms_charge * $sms_info->amount;\n $total_cost = ($sms_charge * $msgcount) - $existing_price;\n }\n\n if ($total_cost == 0) {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->with([\n 'message' => language_data('You do not have enough sms balance', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n\n if ($total_cost > $client->sms_limit) {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->with([\n 'message' => language_data('You do not have enough sms balance', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n } else {\n return redirect('user/sms/manage-update-schedule-sms/' . $cmd)->withInput($request->all())->with([\n 'message' => language_data('Phone Number Coverage are not active', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n } else {\n $total_cost = 0;\n }\n\n if (app_config('fraud_detection') == 1) {\n $spam_word = SpamWord::all()->toArray();\n if (isset($spam_word) && is_array($spam_word) && count($spam_word) > 0) {\n $spam_word = array_column($spam_word, 'word');\n $check = array_filter($spam_word, function ($word) use ($message) {\n if (strpos($message, $word)) {\n return true;\n }\n return false;\n });\n\n if (isset($check) && is_array($check) && count($check) > 0) {\n BlockMessage::create([\n 'user_id' => Auth::guard('client')->user()->id,\n 'sender' => $campaign->sender,\n 'receiver' => $phone,\n 'message' => $message,\n 'scheduled_time' => $schedule_time,\n 'use_gateway' => $campaign->use_gateway,\n 'status' => 'block',\n 'type' => $msg_type\n ]);\n\n $sysUrl = url('clients/view/' . Auth::guard('client')->user()->id);\n $user_name = Auth::guard('client')->user()->username;\n $client_email = Auth::guard('client')->user()->email;\n\n \\Mail::to(app_config('Email'))->send(new \\App\\Mail\\BlockMessage($user_name, $client_email, $message, $sysUrl));\n\n return redirect('user/sms/update-schedule-sms')->with([\n 'message' => language_data('SMS are scheduled. Deliver in correct time', Auth::guard('client')->user()->lan_id)\n ]);\n\n }\n\n }\n }\n\n CampaignSubscriptionList::where('id', $request->cmd)->where('campaign_id', $campaign->campaign_id)->update([\n 'number' => $phone,\n 'amount' => $msgcount,\n 'message' => $message,\n 'submitted_time' => $schedule_time\n ]);\n\n $remain_sms = $client->sms_limit - $total_cost;\n $client->sms_limit = $remain_sms;\n $client->save();\n\n return redirect('user/sms/manage-campaign/' . $campaign->id)->with([\n 'message' => language_data('SMS are scheduled. Deliver in correct time', Auth::guard('client')->user()->lan_id)\n ]);\n\n }", "public function form()\n {\n\n $this->display('id', '申请ID')->default($this->payload['id']);\n $this->display('uid', '申请人UID')->default($this->payload['uid']);\n $this->display('status', '状态')->default(\\App\\Admin\\Repositories\\BusinessApply::$statusLabel[$this->payload['status']]);\n\n\n $this->radio('process', '处理')\n ->options([\n 1 => '通过',\n 2 => '拒绝',\n ]);\n\n $this->text('msg', '审核回复');\n\n }", "public function update(Request $request, ReceiveSms $receiveSms)\n {\n //\n }" ]
[ "0.7377929", "0.7066406", "0.6825808", "0.6762988", "0.65102875", "0.649229", "0.6467846", "0.641201", "0.639927", "0.6369663", "0.63397586", "0.6336609", "0.6266326", "0.62467176", "0.6231464", "0.6198391", "0.6107992", "0.60989505", "0.60700464", "0.60573393", "0.60550106", "0.6023315", "0.5999626", "0.5982328", "0.597585", "0.5956784", "0.59372765", "0.5926612", "0.5907139", "0.5896652", "0.5883211", "0.5876748", "0.5861534", "0.5835534", "0.5805245", "0.57991755", "0.5798961", "0.57977504", "0.57964617", "0.5792998", "0.5782452", "0.5713803", "0.57115513", "0.570217", "0.57004386", "0.56950307", "0.56923217", "0.56887126", "0.56860757", "0.5664817", "0.56332195", "0.5626654", "0.5610637", "0.56026006", "0.5565228", "0.5558457", "0.5551343", "0.5525603", "0.552176", "0.55002075", "0.5489576", "0.54892135", "0.548553", "0.54822254", "0.5481604", "0.5470918", "0.5468523", "0.5468408", "0.546686", "0.5463629", "0.5462536", "0.5458908", "0.54562646", "0.54512346", "0.5447702", "0.54475385", "0.543852", "0.54362786", "0.54312146", "0.54252255", "0.54197264", "0.54179895", "0.5417322", "0.5412325", "0.54085636", "0.54069513", "0.5403702", "0.5403195", "0.540103", "0.5394119", "0.5392974", "0.53905576", "0.5384022", "0.537228", "0.53680164", "0.5367907", "0.5362263", "0.535185", "0.53415656", "0.5338405" ]
0.67104524
4
send sms after order completed
public function send_sms($order_no=null,$customer_id=null,$type=null){ $CI =& get_instance(); $CI->load->model('dashboard/Sms_model','sms_model'); $gateway = $CI->sms_model->retrieve_active_getway(); $sms_template = $CI->db->select('*')->from('sms_template')->where('type',$type)->get()->row(); $sms = $CI->db->select('*')->from('sms_configuration')->get()->row(); $customer_info=$CI->db->select('customer_phone')->from('customer_info')->where('customer_id',$customer_id)->get()->row(); $recipients = $customer_info->customer_phone; $sms_type= strtolower($sms_template->type); if($sms_type == "neworder" || $sms_type == "completeorder" || $sms_type == "processing" || $sms_type == "cancel"){ $message= str_replace('{id}', $order_no, $sms_template->message); } if(1 == $gateway->id ){ /**************************** * SMSRank Gateway Setup ****************************/ $CI =& get_instance(); $url = "http://api.smsrank.com/sms/1/text/singles"; $username = $gateway->user_name; $password=base64_encode($gateway->password); $message=base64_encode($message); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "$url?username=$username&password=$password&to=$recipients&text=$message"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)'; curl_setopt($curl, CURLOPT_USERAGENT, $agent); $output = json_decode(curl_exec($curl), true); return true; curl_close($curl); } if( 2 == $gateway->id ){ /**************************** * nexmo Gateway Setup ****************************/ $api = $gateway->user_name; $secret_key = $gateway->password; $message = $message; $from = $gateway->sms_from; $data = array( 'from' => $from, 'text' => $message, 'to' => $recipients ); require_once APPPATH.'libraries/nexmo/vendor/autoload.php'; $basic = new \Nexmo\Client\Credentials\Basic($api, $secret_key); $client = new \Nexmo\Client($basic); $message = $client->message()->send($data); if(!$message) { return json_encode(array( 'status' => false, 'message' => 'Curl error: ' )); } else { return json_encode(array( 'status' => true, 'message' => "success: " )); } } if( 3 == $gateway->id ){ /**************************** * budgetsms Gateway Setup ****************************/ $message = $message; $from = $gateway->sms_from; $userid = $gateway->userid; $username = $gateway->user_name; $handle = $gateway->password; $data = array( 'handle' => $handle, 'username' => $username, 'userid' => $userid, 'from' => $from, 'msg' => $message, 'to' => $recipients ); $url = "https://api.budgetsms.net/sendsms/?"; $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($curl); if(curl_errno($curl)) { return json_encode(array( 'status' => false, 'message' => 'Curl error: ' . curl_error($curl) )); } else { return json_encode(array( 'status' => true, 'message' => "success: ". $response )); } curl_close($curl); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function action_woocommerce_send_sms_order_completed($order_id) {\n $log = new WC_Logger();\n if(get_qt_options( 'enable_sms_completed_order' ) && get_qt_options( 'enable_sms_completed_order' ) == \"on\") {\n $sms = new SMS_Sender();\n $message = $sms->generateMessage( get_qt_options('sms_completed_order_pattern'), 'order', $order_id );\n $response = $sms->sendSMS( $message );\n $log->log( 'action_woocommerce_send_sms_order_completed', print_r( $response, true ) );\n }\n}", "function action_woocommerce_send_sms_order_pending($order_id) {\n // $log = new WC_Logger();\n // if(get_qt_options( 'enable_sms_completed_order' ) && get_qt_options( 'enable_sms_completed_order' ) == \"on\") {\n // $sms = new SMS_Sender();\n // $message = $sms->generateMessage( get_qt_options('sms_completed_order_pattern'), 'order', $order_id );\n // $response = $sms->sendSMS( $message );\n // $log->log( 'action_woocommerce_send_sms_order_pending', print_r( $response, true ) );\n // }\n}", "function action_woocommerce_send_sms_order_hold($order_id) {\n # code...\n}", "function action_woocommerce_send_sms_order_processing($order_id) {\n # code...\n}", "public function actionSms() {\n// $model->sendSms(13760671419, 112,ApiMember::SMS_TYPE_ONLINE_ORDER,0,ApiMember::SKU_SEND_SMS);\n }", "function action_woocommerce_send_sms_order_refunded($order_id) {\n # code...\n}", "public function complete()\n\t{\t\n\t\t// Get transaction ID returning from PayPal\n\t\t$hash = e(Input::get('hash'));\n\t\t// Find Transaction details from Database\n\t\t$order = BillingLog::findOrFail($hash);\n\t\t// Confirm Transation has been compleated\n\t\t$order->completed = 'true';\n\n\t\t$order->save();\n\n\t\t// Get Customer Email from database\n\t\t$confirmed_bill=$order['attributes'];\n\t\t$email = $confirmed_bill['email'];\n\t\t\n\t\t// Manufacturers Email and Phone\n\t\t$shopEmail = '[email protected]';\n\t\t$shopPhone = '12501112222'; // sample phone number\n\n\t\t// Send Customer an Invoice\n\t\tMail::send('emails.invoice', ['invoice'=>$confirmed_bill], function($message) use ($email)\n\t\t\t{\n\t\t\t $message->to($email, 'Cloud')->subject('Thank You!');\n\t\t\t});\n\n\t\t// Send Order to Manufacturer\n\t\tMail::send('emails.order', ['invoice'=>$confirmed_bill], function($message) use ($shopEmail)\n\t\t\t{\n\t\t\t $message->to($shopEmail, 'Cloud')->subject('New Order!');\n\t\t\t});\n\n\t\t// Send Text Message to Maufacturer\n\t\t$account_sid = $_ENV['TWILIO_ID']; \n\t\t$auth_token = $_ENV['TWILIO_AUTH']; \n\t\t$client = new Services_Twilio($account_sid, $auth_token); \n\t\t \n\t\t$client->account->messages->create(array( \n\t\t\t'To' => $shopPhone, \n\t\t\t'From' => \"+13345641913\", \n\t\t\t'Body' => \"You have a New Order from LittleHelper.Chainsaw, check your email.\", \n\t\t));\n\n\t\t// Takes Client to Thank You page\n\t\treturn View::make('buy/complete');\n\t}", "function schedulesms() {\n \t\t\n \t\tConfigure::write('debug', 0);\n \t\t\n \t\t$this->send(true, $_REQUEST['message'], $_REQUEST['mobile'], $_REQUEST['skey'], $_REQUEST['senderid'], \n \t\t\t\t\t\t\t$_REQUEST['group'], $_REQUEST['tag'], $_REQUEST['date'], $_REQUEST['response']);\n \t\t\n \t}", "public function manualSmsotpsend(Request $request)\n {\n $this->validate($request, [\n 'orderid' => 'required',\n ]);\n\n $currentdtaetime=date(\"Y-m-d H:i:s\", strtotime(\"+30 minutes\"));\n $mainorderinfo = Ordercollection::where('id',$request->orderid)->where('okupdate','0')->where('totalamount','!=','0')->where('verifiedmobilecode','!=','')->get();\n if(count($mainorderinfo) > 0){\n $mainorderinfo=$mainorderinfo->first();\n $updateorders=Ordercollection::where('id',$request->orderid)->where('okupdate','0')->where('totalamount','!=','0')->where('verifiedmobilecode','!=','')->\n update(['otpferifiedat'=>$currentdtaetime]);\n \n\n\n \n\n $outletidd=$mainorderinfo->outletid;\n $marchantidinfo = Marchantlist::where('id',$outletidd)->get(['currentavailable'])->first();\n $newcurrentavailable=$marchantidinfo->currentavailable;\n $newsms=\"Dear+Merchant,for+your+UBL+order+reff.+invoice+\".$mainorderinfo->invoiceid.\"+your+loan+amount=\".$mainorderinfo->dueamount.\"FairBanc+credit+Available=\".$newcurrentavailable.\"Tk+and+Confirmation+OTP=\".$mainorderinfo->verifiedmobilecode;\n \n $newurls='http://alphasms.biz/index.php?app=ws&u=indexer&h=351794a3122fab8ff8bbc78b8092797b&op=pv&to='.$mainorderinfo->outletmobileno.'&msg='.$newsms;\n\n \n $curl = curl_init();\n // Set some options - we are passing in a useragent too here\n curl_setopt_array($curl, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => $newurls,\n CURLOPT_USERAGENT => 'SMS mobile Request'\n ));\n // Send the request & save response to $resp\n $resp = curl_exec($curl);\n // Close request to clear up some resources\n curl_close($curl);\n\n if($resp){\n $newsavedta= new Manualotpsmssent;\n $newsavedta->sentbyid=$request->user()->id;\n $newsavedta->sentfororderid=$request->orderid;\n $newsavedta->invoiceidfor=$mainorderinfo->invoiceid;\n $newsavedta->updated_by=$request->user()->id;\n $newsavedta->save();\n }\n \n return response()->json([\n 'message' => 'SMS sent complete'\n ], 200);\n\n\n }\n return response()->json([\n 'response' => 'error',\n 'message' => 'Problem in data'\n ], 400); \n \n }", "private function sendSms($order_id,$mobile_no,$msg){\r\n// $language->load($order_info['language_filename']);\r\n// $language->load('sms/order');\r\n\r\n if(SMS_OPEN=='ON'){\r\n $pdate= new DateTime();\r\n\r\n $this->log_admin->debug('IlexDebug:: Send SMS for order '.$order_id);\r\n if($mobile_no!=''&&SMS_OPEN=='ON'){\r\n $mobilephone=trim($mobile_no);\r\n //手机号码的正则验证\r\n if(mobile_check($mobilephone)){\r\n // send sms\r\n $sms=new Sms();\r\n\r\n $this->log_admin->debug('IlexDebug:: 发送短信: '.$msg);\r\n\r\n $msg =$msg;\r\n\t\t\t\t\t$sms->send($mobilephone, $msg);\r\n $this->log_admin->debug('IlexDebug::Already Sended SMS for order '.$order_id);\r\n $this->log_admin->debug('IlexDebug::Already Sended SMS '.$mobilephone.',content '.$msg);\r\n return true;\r\n }else{\r\n //手机号码格式不对\r\n $this->log_admin->debug('IlexDebug:: Wrong Number,dun send sms : sub_order_id '.$order_id);\r\n return false;\r\n }\r\n }\r\n }else{\r\n $this->log_admin->debug('IlexDebug:: SMS_OPEN :'.SMS_OPEN.' sub_order_id '.$order_id);\r\n return false;\r\n }\r\n }", "public function index()\n {\n// $sms= $AT->sms();\n// $sms->send([\n// 'to' => '0704522671',\n// 'message' => 'It worked'\n//\n// ]);\n\n $smsJob = (new SendSmsJob())->delay(Carbon::now()->addSeconds(3));\n dispatch($smsJob);\n\n echo 'message sent';\n\n }", "public function salesOrderSaveAfter($observer)\n\t{\n\t\t// Get the settings\n\t\t$settings = Mage::helper('smsnotifications/data')->getSettings();\n\n\t\t// Get the new order object\n\t\t$order = $observer->getEvent()->getOrder();\n\n\t\t// Get the old order data\n\t\t$oldOrder = $order->getOrigData();\n\n\t\t// If the order status hasn't changed, don't do anything\n\t\tif($oldOrder['status'] === $order->getStatus()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the order status has changed, check if a notification should be sent\n\t\t// for the new status. If not, don't do anything\n\t\tif($order->getStatus() !== $settings['order_notification_status']) {\n\t\t\treturn;\n\t\t}\n\n\t\tMage::log('sending', null, 'm.txt');\n\n\t\t// Generate the body for the notification\n\t\t$store_name = Mage::app()->getStore()->getFrontendName();\n\t\t$customer_name = $order->getCustomerFirstname();\n\t\t$customer_name .= ' ' . $order->getCustomerLastname();\n\t\t$order_amount = $order->getBaseCurrencyCode();\n\t\t$order_amount .= ' ' . $order->getBaseGrandTotal();\n\n\t\t$body = sprintf('%s: %s has just placed an order for %s', $store_name, $customer_name, $order_amount);\n\n\t\t// If no recipients have been set, we can't do anything\n\t\tif(!count($settings['order_noficication_recipients'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Send the order notification by SMS\n\t\t$result = Mage::helper('smsnotifications/data')->sendSms($body, $settings['order_noficication_recipients']);\n\n\t\t// Check if the sending was successful\n\t\tif(!$result) {\n\t\t\t// If an error occured, notify the administrator\n\t\t\tMage::helper('smsnotifications/data')->sendAdminEmail(sprintf('%s was unable to send one or more order notifications to the specified number(s). Please check your configuration to make sure that your Twilio API settings are correct!', Mage::helper('smsnotifications/data')->app_name));\n\t\t}\n\t}", "public function sendOrder(Mage_Sales_Model_Order $order)\n {\n try{\n\t\t\t$this->_eventType = 'placeOrder';\n\t\t\t$amount\t\t= number_format($order->getGrandTotal(),2);\n\t\t\t$samount\t= number_format($order->getSubtotal(),2);\n\t\t\t$tax \t\t= number_format($order->getBaseTaxAmount(),2);\n\t\t\t$shipping \t= number_format($order->getBaseShippingAmount(),2);\n\t\t\t$discounts \t= number_format($order->getDiscountAmount(),2);\n\t\t\t$shippingAddressData \t= $order->getShippingAddress()->getData();\n\t\t\t$billingAddressData \t= $order->getBillingAddress()->getData();\n\t\t\t$shippingMethod \t \t= $order->_data[\"shipping_description\"];\n\t\t\t$paymentMethod \t \t \t= $order->getPayment()->getMethodInstance()->getTitle();\n\t\t\t$customerId \t\t\t= $order->getCustomerId();\n\t\t\t$websiteId \t\t\t\t= 1;\n\t\t\t$balanceModel \t\t\t= Mage::getModel('enterprise_customerbalance/balance')\n\t\t \t\t\t\t \t->setCustomerId($customerId)\n\t\t \t\t\t\t \t->setWebsiteId($websiteId)\n\t\t \t\t\t\t\t->loadByCustomer();\t\n\t\t $storeCredit\t\t\t= ($balanceModel->getId())? number_format($balanceModel->getAmount(),2) :'0' ; \t\t\t\t\t\t\n $data = array(\n 'email' => $order->getCustomerEmail(),\n 'items' => $this->_getItems($order->getAllVisibleItems()),\n 'adjustments' => $this->_getAdjustments($order),\n 'message_id' => $this->getMessageId(),\n 'send_template' => 'Purchase Receipt',\n 'tenders' => $this->_getTenders($order),\n 'vars'\t=> array ( 'order#'=> $order->getIncrementId(),\n\t\t\t\t\t\t\t\t\t'subtotal'=> $samount,\n\t\t\t\t\t\t\t\t\t'shipping_and_handling'=> $shipping,\n\t\t\t\t\t\t\t\t\t'sale_tax'=> $tax,\n\t\t\t\t\t\t\t\t\t'billing_address'=> $shippingAddressData,\n\t\t\t\t\t\t\t\t\t'shipping_address'=> $billingAddressData,\n\t\t\t\t\t\t\t\t\t'shipping_method'=> $shippingMethod,\n\t\t\t\t\t\t\t\t\t'payment_method'=> $paymentMethod,\n\t\t\t\t\t\t\t\t\t'store_credit' => $storeCredit\n\t\t\t ),\n \t);\n /**\n * Send order data to purchase API\n */\n $responsePurchase = $this->apiPost('purchase', $data);\n\t\t\t\n\t\t\t/****Update product sku in following items for price alert****/\n $productSku = array();\n\t\t\tforeach ($order->getAllVisibleItems() as $item) {\n\t\t\t\tif($item->getProductType() == 'configurable') {\n\t\t\t\t\t$productSku[] = $item->getProduct()->getData('sku');\n\t\t\t\t}\n\t\t\t}\n $sailthru_userdata = $this->apiGet('user', array('id' => $order->getCustomerEmail()));\n\t\t\tif(isset($sailthru_userdata['vars']['following_items']) && $productSku) {\n\t\t\t\t$sailthru_followingItems = $sailthru_userdata['vars']['following_items'];\n\t\t\t\t$sailthru_followingItems = array_values($sailthru_followingItems);\n\t\t\t\t$sailthru_followingItems = array_diff($sailthru_followingItems,$productSku);\n\t\t\t\t$sailthru_followingItems = array_unique($sailthru_followingItems);\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\"id\" => $order->getCustomerEmail(),\n\t\t\t\t\t\t\"vars\" => array(\"following_items\" => $sailthru_followingItems)\n\t\t\t\t\t\t);\n\t\t\t\t$response = $this->apiPost('user', $data);\n\t\t\t}\n /*************************************************/\n\t\t\t\n /**\n * Send customer data to user API\n */\n //$responseUser = Mage::getModel('sailthruemail/client_user')->sendCustomerData($customer);\n }catch (Exception $e) {\n Mage::logException($e);\n return false;\n }\n }", "function action_woocommerce_send_sms_order_failed($order_id) {\n # code...\n}", "function sendEmail_admin($details, $sitetitle) {\n\t\t\t\t$currencycode = $details->currCode;\n\t\t\t $currencysign = $details->currSymbol;\n\n\t\t\t $custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$custemail = $details->accountEmail;\n\t\t\t\t$additionaNotes = $details->additionaNotes;\n\t\t\t\t$sendto = $this->adminemail;\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingorderadmin\");\n\t\t\t\t$details = email_template_detail(\"bookingorderadmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingorderadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingorderadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public static function MarkOrderProcessAsCompleted()\n {\n $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS] = true;\n }", "private function deliverySms($type,$state,$messageID,$from,$to,$message,$count){\n $datum = Date(\"Y-m-d\");\n $count = $count + 1;\n\n if (isset($this->_stateIDs[$state])){\n $stateId = $this->_stateIDs[$state]; \n } else {\n $stateId = 0;\n }\n \n /*\n * Uncomment if is needed to disable sending at specific time\n */\n // $sleep_time = date('H');\n // $sleep = array('21', '22','23','00','01','02','03','04','05','06');\n\n // if not between 21:00 - 07:00\n // if(!in_array($sleep_time, $sleep)){\n\n if ($type !== \"bulk\") { \n $to = $this->cleanMob($to, $state);\n if ($to == false) { \n return \"wrong number\";\n }\n }\n //ucitavanje liste odjava \n if ($type == \"reorder\") { \n $suppression = $this->getSuppressionList($state);\n $supArr = array();\n\n foreach ($suppression as $sNumber){\n array_push($supArr, $sNumber['number']);\n }\n\n if (in_array($to, $supArr) == true) {\n return \"number unsubscribed\";\n }\n } \n\n // konacno filtriranje samo brojeva \n $to = preg_replace('/[^0-9]/', '', $to);\n\n $firstTwo = substr($to, 0, 2);\n\n if ($state == \"XK\" && $firstTwo == \"49\") {\n $responsePhone = \"+386\".$to; \n $to = \"00386\".$to;\n } else {\n $responsePhone = \"+\".$this->_areaCodes[$state].$to; \n $to = \"00\".$this->_areaCodes[$state].$to;\n }\n\n \n $message = strip_tags($message);\n\n $msg = $this->cleanUTF($message, $state);\n $ch = curl_init('http://bulk.mobile-gw.com:9000/?');\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"username=*******&password=*********&allow_adaption=1&messageid={$messageID}&status_report=3&origin={$from}&call-number={$to}&text=\".urlencode($msg));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $send_response = curl_exec ($ch);\n curl_close ($ch);\n\n $getRow = explode(\"\\n\", $send_response);\n //******** Hvatanje SMSID broja\n // $getId = explode(\":\", $getRow[2]);\n // $smsId = trim($getId[1]);\n\n\n $getId = explode(\":\", $getRow[2]);\n $smsIdRaw = trim($getId[1]);\n\n $countSeparator = substr_count($smsIdRaw,\";\");\n $messageNumber = $countSeparator + 1;\n $smsIdExploaded = explode(\";\", $smsIdRaw);\n\n $smsId = $smsIdExploaded[0];\n //******** Hvatanje Statusa slanja\n $getSecond = explode(\":\", $getRow[6]); \n $getCode = explode(\",\", $getSecond[1]);\n $statusCode = trim($getCode[0]);\n\n $statusNum = 0;\n if ($statusCode == \"00\"){\n $statusNum = 1;\n } else {\n $statusNum = 3;\n }\n\n $this->insertMessage($smsId,$from,$to,$messageID,$msg,$statusNum,$messageNumber,$stateId); \n if($type == \"bulk\"){\n //echo json_encode(array(\"count\"=>$count, \"number\"=>$to, \"response\"=>$send_response));\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\"},\\n';\n $file = fopen($this->_logRoot.\"reports/bulk/\".$messageID.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/bulk/\".$messageID.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n } else if ($type == \"reorder\"){\n //echo json_encode(array(\"count\"=>$count, \"number\"=>$to, \"response\"=>$send_response));\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\"},\\n';\n $file = fopen($this->_logRoot.\"reports/reorder/\".$messageID.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/reorder/\".$messageID.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n } else {\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\",\"Quantity\":\"'.$messageNumber.'\"},\\n';\n $existCount2 = 0;\n if (file_exists($this->_logRoot.\"reports/orders/\".$datum.\".txt\")){\n $existCount2 = 1;\n }\n\n $file = fopen($this->_logRoot.\"reports/orders/\".$datum.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/orders/\".$datum.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n\n if ($existCount2 == 0){\n chmod($this->_logRoot.\"reports/orders/\".$datum.\".txt\", 0777);\n }\n }\n $responseJson = '{\"status\":\"'.$statusNum.'\",\"msisdn\":\"'.$responsePhone.'\"}';\n return $responseJson;\n // }else{\n // return 'sleep time';\n // }\n }", "function action_woocommerce_send_sms_order_cancelled($order_id) {\n # code... \n}", "public function successAction() {\n\t\t\n\t\t//echo \"in b2b\";die;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t$privateId = $session->getPrivateId();\n\t\t\n\t\t\n\t\t\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['customer']['email'];\n\t\t\t$mobile = $orderDetails['customer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['customer']['deliveryAddress']['firstName'];\n\t\t\t$lastName = $orderDetails['customer']['deliveryAddress']['lastName'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['customer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['customer']['billingAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['billingAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['billingAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['billingAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['billingAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['billingAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['deliveryAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t//$paymentMethod = 'collectorpay';\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t$session->unsPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t//Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "public function runordersyncAction()\n {\n $result = Mage::getModel('ddg_automation/cron')->orderSync();\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "function paid_sendEmail_admin($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$additionaNotes = $details->additionaNotes;\t\t\t\t\n\t\t\t\t$sendto = $this->adminemail;\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidadmin\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidadmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "function order_success()\n{\n\n}", "public function sendMessage()\n {\n $this->processData($this->orderModel);\n $this->getTemplate('order_refund_apply');\n $this->organizeData();\n \\Log::debug(\"新版公众号消息-退款申请1\",$this->template_id);\n \\Log::debug(\"新版公众号消息-退款申请2\",$this->fans->openid);\n \\Log::debug(\"新版公众号消息-退款申请3\",$this->data);\n $result = (new OfficialMessageNotice($this->temp_id,$this->fans->openid,$this->data,[],1,$this->url))->sendMessage();\n\n if ($result['status'] == 0) {\n \\Log::debug($result['message']);\n }\n }", "function easysms_sendsms($smsmessage,$to=null) {\n\t\n\t $mySMS = new EasySMS('balexiou', '92527');\n\t //get the account balance\n\t echo 'BALANCE:' . $mySMS->getbalance();\n\t //get the delivery reports\n\t echo 'REPORT:' . $mySMS->getDeliveryReports();\n\t //send sms\n\t $ret = $mySMS->sendSMS($to,\t\t //the target mobile number\n\t\t\t\t\t\t $smsmessage,\t\t\t//the message\n\t\t\t\t\t\t true, \t \t\t //request delivery report\n\t\t\t\t\t\t false,\t\t\t\t//not as flash sms\n\t\t\t\t\t\t $this->sender\t\t//set the originator\n\t\t\t\t\t );\n\t\t\t\t\t\t \n\t echo 'SMS:' . $ret;\t\t\t\t\t \n\t \n\t return $ret;\n\t}", "function sendEmail_supplier($details, $sitetitle) {\n\t\t\t$currencycode = $details->currCode;\n\t\t\t $currencysign = $details->currSymbol;\n\n\t\t\t $custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$custemail = $details->accountEmail;\n\t\t\t\t$additionaNotes = $details->additionaNotes;\n\t\t\t\t$sendto = $this->supplierEmail($details->module, $details->itemid);\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingordersupplier\");\n\t\t\t\t$details = email_template_detail(\"bookingordersupplier\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingorderadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingorderadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\n\t\t}", "public function salesOrderShipmentSaveAfter($observer)\n {\n\n // Get the settings\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $arr = $settings['order_status'];\n $a = explode(',', $settings['order_status']);\n $b = explode(',', $settings['order_status']);\n $final_array = array_combine($a, $b);\n \n if (!$settings['shipment_notification_message']) {\n return;\n }\n $order = $observer->getEvent()->getShipment()->getOrder();\n \n $billingAdress = $order->getBillingAddress();\n $shippingAdress = $order->getShippingAddress();\n\n if ($order->getCustomerFirstname()) {\n $customer_name = $order->getCustomerFirstname();\n $customer_name .= ' '.$order->getCustomerLastname();\n } elseif ($billingAdress->getFirstname()) {\n $customer_name = $billingAdress->getFirstname();\n $customer_name .= ' '.$billingAdress->getLastname();\n } else {\n $customer_name = $shippingAdress->getFirstname();\n $customer_name .= ' '.$shippingAdress->getLastname();\n }\n\n $order_id = $order->getIncrementId();\n $order_amount = $order->getBaseCurrencyCode();\n $order_amount .= ' '.$order->getBaseGrandTotal();\n\n $telephoneNumber = trim($shippingAdress->getTelephone());\n\n $shipment = $order->getShipmentsCollection()->getFirstItem();\n $shipId = $shipment->getIncrementId();\n\n // Check if a telephone number has been specified\n if(in_array('shippment', $final_array)){\n if ($telephoneNumber) {\n // Send the shipment notification to the specified telephone number\n $text = $settings['shipment_notification_message'];\n $text = str_replace('{{name}}', $customer_name, $text);\n $text = str_replace('{{order}}', $order_id, $text);\n $text = str_replace('{{amount}}', $order_amount, $text);\n $text = str_replace('{{shipmentno}}', $shipId, $text);\n\n array_push($settings['order_noficication_recipients'], $telephoneNumber);\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n // Display a success or error message\n if ($result) {\n $recipients_string = implode(',', $settings['order_noficication_recipients']);\n Mage::getSingleton('adminhtml/session')->addSuccess(sprintf('The shipment notification has been sent via SMS to: %s', $recipients_string));\n } else {\n Mage::getSingleton('adminhtml/session')->addError('There has been an error sending the shipment notification SMS.');\n }\n }\n } \n}", "function send_sms()\n\t{\n\t\t$config['functions']['send_sms'] = array('function' => 'Xmlrpc.rpc_send_sms');\n\t\t$this->xmlrpcs->initialize($config);\n\t\t$this->xmlrpcs->serve();\n\t}", "function sendSmsFromWoocommercePages()\n {\n $sms = isset($_POST['sms']) ? true : false;\n if (isset($_POST['post_type']) && $_POST['post_type'] == 'shop_order') {\n $order = new WC_Order(intval($_POST['post_id']));\n $phone = get_post_meta(intval($_POST['post_id']), '_billing_phone', true);\n $buyer_sms_data['number'] = explode(',', $phone);\n $buyer_sms_data['number'] = fa_en_mobile_woo_sms($buyer_sms_data['number']);\n $buyer_sms_data['sms_body'] = esc_textarea($_POST['textareavalue']);\n if (!$buyer_sms_data['number'] || empty($buyer_sms_data['number'])) {\n wp_send_json_error(array('message' => 'شماره ای برای دریافت وجود ندارد'));\n exit;\n } elseif (!$buyer_sms_data['sms_body'] || empty($buyer_sms_data['sms_body'])) {\n wp_send_json_error(array('message' => 'متن پیامک خالی است'));\n exit;\n } else {\n $buyer_response_sms = WoocommerceIR_Gateways_SMS::init()->sendSMSir($buyer_sms_data);\n if(ob_get_length())\n ob_clean();\n header('Content-Type: application/json');\n\n if ($buyer_response_sms) {\n $order->add_order_note(sprintf('پیامک با موفقیت به خریدار با شماره موبایل %s ارسال شد . <br/>متن پیامک : %s', $phone, $buyer_sms_data['sms_body']));\n wp_send_json_success(array('message' => 'پیامک با موفقیت ارسال شد'));\n exit;\n } else {\n $order->add_order_note(sprintf('پیامک به خریدار با شماره موبایل %s ارسال نشد . خطایی رخ داده است .<br/>متن پیامک : %s', $phone, $buyer_sms_data['sms_body']));\n wp_send_json_success(array('message' => 'پیامک ارسال نشد. خطایی رخ داده است'));\n exit;\n }\n }\n }\n\n if (isset($_POST['post_type']) && $_POST['post_type'] == 'product') {\n $buyer_sms_data['sms_body'] = esc_textarea($_POST['textareavalue']);\n if (!$buyer_sms_data['sms_body'] || empty($buyer_sms_data['sms_body'])) {\n wp_send_json_error(array('message' => 'متن پیامک خالی است'));\n exit;\n }\n $product_id = intval($_POST['post_id']);\n $group = isset($_POST['group']) ? $_POST['group'] : '';\n if ($group) {\n $product_metas = get_post_meta($product_id, '_ipeir_sms_notification', true) ? get_post_meta($product_id, '_ipeir_sms_notification', true) : '';\n $contacts = explode('***', $product_metas);\n $numbers_list_sms = array();\n\n foreach ((array) $contacts as $contact_type) {\n $contact_types = explode('_vsh_', $contact_type);\n if (count($contact_types) == 2) {\n list( $contact , $type ) = $contact_types;\n } else {\n $contact = $contact_type;\n $type = '';\n }\n\n if (strlen($contact) < 2)\n break;\n list($number, $groups) = explode('|', $contact);\n $groups = explode(',', $groups);\n $type = $type == '' ? '' : explode(',', $type);\n if (in_array($group, $groups)) {\n if (strlen($number) > 5 ) {\n $numbers_list_sms[] = $number;\n }\n }\n }\n $numbers_list_sms = array_unique(explode(',', implode(',', $numbers_list_sms)));\n $numbers_list_sms = array_filter($numbers_list_sms);\n $count_sms = count($numbers_list_sms);\n\n if ($count_sms < 1 || empty($numbers_list_sms)) {\n wp_send_json_error(array('message' => 'شماره ای برای دریافت وجود ندارد'));\n exit;\n }\n $buyer_sms_data['number'] = $numbers_list_sms;\n $buyer_sms_data['number'] = fa_en_mobile_woo_sms($buyer_sms_data['number']);\n $buyer_response_sms = WoocommerceIR_Gateways_SMS::init()->sendSMSir($buyer_sms_data);\n\n if (ob_get_length())\n ob_clean();\n header('Content-Type: application/json');\n\n if ($buyer_response_sms) {\n wp_send_json_success(array('message' => sprintf('پیامک با موفقیت به %s شماره موبایل ارسال شد', $count_sms)));\n exit;\n } else {\n wp_send_json_success(array('message' => 'پیامک ارسال نشد. خطایی رخ داده است'));\n exit;\n }\n }\n }\n }", "public function finish()\n\t{\n\t\t//first we deactivate the quote\n\t\t$this->_getQuote()->setIsActive(false)->save();\n\t\t\n\t\t//now we add the payment information to the order payment\n\t\t$this->_getMethodInstance()->addRequestData($this->getResponse());\n\t\t\n\t\t//now we authorise the payment\n\t\tif(false === $this->_getMethodInstance()->authPayment($this->getResponse())){\n\t\t\tMage::throwException(\"Payment Failure\");\n\t\t}\n\t\t\n\t\t//now we shift the order to either pending state, \n\t\t// or processing state (with invoice) depending on the capture settings.\n\t\t$this->_getMethodInstance()->process($this->getResponse());\n\t\t\n\t\t//send off the new order email\n\t\t$this->_getOrder()->sendNewOrderEmail();\n\t}", "public function runquotesyncAction()\n {\n\n $result = Mage::getModel('ddg_automation/cron')->quoteSync();\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "public function processQueue()\n {\n $gate_arr = config('gates');\n foreach ($gate_arr as $gate_item) {\n $this->sendSmsOne($gate_item['name']);\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 send()\n {\n if (!Mage::getStoreConfig(Epoint_SwissPostSales_Helper_Order::ENABLE_SEND_ORDER_CONFIG_PATH)) {\n return;\n }\n // Check if the date is configured.\n if(!Mage::getStoreConfig(\n Epoint_SwissPostSales_Helper_Order::XML_CONFIG_PATH_FROM_DATE \n )){\n \tMage::helper('swisspost_api')->log(\n Mage::helper('core')->__('Error on send order cron, from date filter is not configured!')\n );\n return ; \n }\n $status_filter = explode(',', \n \tMage::getStoreConfig(self::ENABLE_SEND_ORDER_STATUS_CONFIG_PATH)\n );\n if(is_array($status_filter)){\n \t$status_filter = array_map('trim', $status_filter);\n }\t\n $from_date = date('Y-m-d H:i:s', strtotime(Mage::getStoreConfig(\n Epoint_SwissPostSales_Helper_Order::XML_CONFIG_PATH_FROM_DATE)\n )\n );\n // All orders without odoo code id\n $order_collection = Mage::getModel('sales/order')\n ->getCollection()\n // Join invoices, send only \n ->join(array('invoice' => 'sales/invoice'), \n 'invoice.order_id=main_table.entity_id', \n array('invoice_entity_id'=>'entity_id'), null , 'left')\n ->addAttributeToFilter(\n 'main_table.created_at',\n array('gt' => $from_date)\n )\n ->addFieldToFilter(\n 'main_table.status',\n array(array('in'=>array($status_filter)))\n )\n ->addAttributeToFilter(\n 'main_table.'.Epoint_SwissPostSales_Helper_Data::ORDER_ATTRIBUTE_CODE_ODOO_ID,\n array(array('null' => true),\n array('eq' => 0)\n )\n );\n // Add group \n $order_collection->getSelect()->group('main_table.entity_id');\n // Add Limit \n $order_collection->getSelect()->limit((int)Mage::getStoreConfig(Epoint_SwissPostSales_Helper_Order::XML_CONFIG_PATH_CRON_LIMIT)); \n foreach ($order_collection as $order_item) {\n $order = Mage::getModel('sales/order')->load($order_item->getId());\n // check if can be sent again\n if(Mage::helper('swisspostsales/Order')->isConnected($order)){\n \t Mage::helper('swisspost_api')->log(\n Mage::helper('core')->__('Stop sending again order: %s, odoo id: %s', $order->getId(), \n $order->getData(Epoint_SwissPostSales_Helper_Data::ORDER_ATTRIBUTE_CODE_ODOO_ID)\n )\n );\n \tcontinue;\n }\n // The order was not invoiced ???\n if(!$order->getInvoiceCollection()){\n \tMage::helper('swisspost_api')->log(\n Mage::helper('core')->__('Stop sending again order, no invoice: %s', $order->getId()\n )\n );\n \tcontinue;\n }\n Mage::helper('swisspost_api/Order')->createSaleOrder($order);\n }\n }", "function paid_sendEmail_supplier($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$sendto = $this->supplierEmail($details->module, $details->itemid);\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidsupplier\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidsupplier\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function sms($phone,$message)\n\t{\n\t\t// max of 160 characters\n\t\t// to get a unique name make payment of 8700 to Africastalking/SMSLeopard\n\t\t// unique name should have a maximum of 11 characters\n\t\t\n\t\tif (substr($phone, 0, 1) === '0') \n\t\t{\n\t\t\t$phone = ltrim($phone, '0');\n\t\t}\n\t\t\n\t\t$phone_number = '+254'.$phone;\n\t\t//$phone_number = $phone;\n\t\t// get items \n\n\t\t$configuration = $this->admin_model->get_configuration();\n\n\t\t$mandrill = '';\n\t\t$configuration_id = 0;\n\t\t\n\t\tif($configuration->num_rows() > 0)\n\t\t{\n\t\t\t$res = $configuration->row();\n\t\t\t$configuration_id = $res->configuration_id;\n\t\t\t$mandrill = $res->mandrill;\n\t\t\t$sms_key = $res->sms_key;\n\t\t\t$sms_user = $res->sms_user;\n\n\t\t\t$actual_message = $message;\n\t\t\t// var_dump($actual_message); die();\n\t\t\t// get the current branch code\n\t\t\t$params = array('username' => $sms_user, 'apiKey' => $sms_key); \n\t\n\t\t\t$this->load->library('africastalkinggateway', $params);\n\t\t\t// var_dump($params)or die();\n\t\t\t// Send the message\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message, $sms_from=22384);\n\t\t\t\t$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message);\n\t\t\t\t\n\t\t\t\t//var_dump($results);die();\n\t\t\t\t$number = $phone_number;\n\t\t\t\t$status = 'unsent';\n\t\t\t\t\n\t\t\t\tforeach($results as $result) \n\t\t\t\t{\n\t\t\t\t\t$number = $result->number;\n\t\t\t\t\t$status = $result->status;\n\t\t\t\t\t$messageId = $result->messageId;\n\t\t\t\t\t$cost = $result->cost;\n\t\t\t\t\t// status is either \"Success\" or \"error message\"\n\t\t\t\t\t// echo \" Number: \" .$result->number;\n\t\t\t\t\t// echo \" Status: \" .$result->status;\n\t\t\t\t\t// echo \" MessageId: \" .$result->messageId;\n\t\t\t\t\t// echo \" Cost: \" .$result->cost.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$save_data = array(\n\t\t\t\t\t\"sms_result_message\" => $actual_message,\n\t\t\t\t\t\"sms_result_phone\" => $phone_number,\n\t\t\t\t\t\"message_id\" => $messageId,\n\t\t\t\t\t\"sms_result_cost\" => $cost,\n\t\t\t\t\t\"created\" => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\tif($this->db->insert('sms_result', $save_data))\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number.'. Response not saved';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcatch(AfricasTalkingGatewayException $e)\n\t\t\t{\n\t\t\t\t// echo \"Encountered an error while sending: \".$e->getMessage();\n\t\t\t\treturn $e->getMessage();\n\t\t\t}\n\t \n\t\t}\n\t else\n\t {\n\t return 'Configuration not set';\n\t }\n }", "public function sendPaymentNotification(){\n\n $sms_recipients=\"0712345648\";//empty string\n $username = Constants::$username;\n $apiKey = Constants::$apiKey;\n $from = Constants::$from;\n // dd($apiKey);\n\n $AT = new AfricasTalking($username, $apiKey);\n // // Get one of the services\n $recipients=\"\";\n $sms = $AT->sms();\n //user has a valid mobile number\n $phone = substr($sms_recipients,1);\n $recipients='+254'.$phone;//$data['phone'];//'+254712345678'\n // dd($recipients);\n\n // // Set the numbers you want to send to in international format\n \n // // Set your message\n $message = \"Testing SMS.\";\n\n // // Set your shortCode or senderId\n \n // Get one of the services\n try {\n // Thats it, hit send and we'll take care of the rest\n $result = $sms->send([\n 'to' => $recipients,\n 'message' => $message,\n 'from' => $from\n ]);\n\n print_r($result);\n \n } catch (Exception $e) {\n //echo \"Error: \".$e->getMessage();\n $result=$e->getMessage();\n print_r($result);\n }\n\n \n }", "function cod_confirmation_block($order_id)\n {\n\t\t//echo $order_id;exit;\n\t\t$order = new WC_Order($order_id );\n\n\t\t$orderdetail=$order-> order_custom_fields;\n\t\t$bilphnno=$orderdetail['_billing_phone'];\n\t\t$bilphnno= $bilphnno[0]; \n $smsstatus=get_post_meta($order->id ,'cod_confirm',true);\n $bilphnno=\"0\".$bilphnno;\n\t\t//echo \"phn no\".$bilphnno;exit;\n \n if($order->status != 'failed' )\n {\n if($order->payment_method == 'cod'){\n $order_status=get_post_meta($order->id,'cod_confirm',true);\n if($order_status!=4)\n {\n $thanksblock='<div class=\"tickicon_orange\">Congratulations, your order has been placed.</div>';\n $thanksblock.='<div class=\"tickicon_green\" style=\"display: none\">Congratulations, your order has been placed.</div>';\n $thanksblock.=' <div class=\"sucessfully_order\">Your order has been successfully placed. Please Verify your mobile number to help us process your order immediately.</div>';\n $thanksblock.='<div class=\"sucessfully_order_cod_confirm\" style=\"display:none\">Your order has been placed sucessfully and right now is in processing.</div>';\n }else{\n $thanksblock=\"<div class='tickicon_green'>Congratulations, your order has been placed.</div>\";\n //$thanksblock.='<div class=\"congrat\">Congratulation! Your order has been confirmed successfully</div>';\n //$thanksblock.='<div class=\"sucessfully_order\">Your order id is #'.$order_id.'. A confirmation mail regarding this order has been send to <strong>'.$order->billing_email.'</strong></div>';\n\t\t\t\t\t\t\t$thanksblock.='<div class=\"sucessfully_order green_success\">Your order has been successfully placed and being processed. A confirmation mail regarding this order has been send to <strong>'.$order->billing_email.'</strong></div>';\n //$thanksblock.='<div class=\"cls_cn\">Your order will be processed as per the delivery details.</div>\n \n }\n }else{\n $thanksblock.=\"<div class='tickicon_green'>Congratulations, your order has been placed.</div>\";\n }\n $thanksblock.='<div class=\"confirmation_order\" style=\"display:none\" >You can track your order from your account page. A confirmation mail regarding this order has been send to <strong>'.$order->billing_email.'</strong></div>';\n\t\t\t\t\t\n }\n $cod_form=$thanksblock;\n $cod_form.= '<div>';\n $cod_form.='<form id=\"cod_form\" method=\"post\" action=\"\">\n\t\t\n\t\t<div class=\"mobileno_block\">\n\t\t<div class=\"cover_block1\">\n\t\t<div class=\"mobileno_headingblock\">Mobile No: <strong>'.$bilphnno.'</strong></div>\n\t\t<div class=\"mobile_text\">\n\t\t\t<span class=\"mobile_title\">Verify Code:</span>\n\t\t\t<input type=\"hidden\" id=\"cod_code_gen\" value=\"'.get_post_meta($order_id ,'_order_confirmation_code',true).'\"/>\n\t\t\t<input type=\"hidden\" id=\"path\" value=\"'.plugins_url().'\"/>\n\t\t\t<input type=\"hidden\" id=\"order_id\" value=\"'.$order_id.'\"/>\n\t\t\t<input type=\"hidden\" id=\"order_status\" value=\"'.$smsstatus.'\"/>\n\t\t\t<input type=\"text\" id=\"cod_code\"/>\n\t\t\t<input type=\"button\" id=\"cod_submit\" value=\"Verify Now\"/>\n\t\t\t\n\t\t\t<span id=\"cod_resent_icon\" style=\"display: none\">Resent</span>\n\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div class=\"verify_textblock\">Verification code sent to <strong>'.$bilphnno.'</strong>.If you have not recieved it, Resend it by clicking the link \n <span><input type=\"button\" value=\"Resend Verification Code\"/></span>\n\t\t</div>\n\t\t</div>\n <div class=\"clear\"></div>\n\t\t\n\t\t\n\t\t<span id=\"cod_confirm_msg\" style=\"display: none\">Your Order has been confirmed successfully</span>\n <span id=\"cod_error_msg\" style=\"display: none\">Please enter the valid confirmation code.</span>\n <span id=\"cod_resend_msg\" style=\"display: none\">The confirmation code has been resent to your number.</span>\n\t\t</form>\n </div>';\n if($smsstatus == 4)\n {\n $cod_form = $thanksblock.' <input type=\"hidden\" id=\"order_status\" value=\"'.$smsstatus.'\"/>';\n }\n echo $cod_form;\n }", "public function traveler_cancelation_sms_send($tourwise_id)\n{\n $sq_tourwise = mysql_fetch_assoc(mysql_query(\"select * from tourwise_traveler_details where id='$tourwise_id'\"));\n $sq_personal_info = mysql_fetch_assoc(mysql_query(\"select * from traveler_personal_info where tourwise_traveler_id='$tourwise_id'\"));\n $sq_tour = mysql_fetch_assoc(mysql_query(\"select * from tour_master where tour_id='$sq_tourwise[tour_id]'\"));\n $sq_tour_group = mysql_fetch_assoc(mysql_query(\"select * from tour_groups where group_id='$sq_tourwise[tour_group_id]'\"));\n\n $sq_traveler = mysql_fetch_assoc(mysql_query(\"select * from travelers_details where traveler_group_id='$sq_tourwise[traveler_group_id]'\"));\n\n $tour_group = date('d-m-Y', strtotime($sq_tour_group['from_date'])).' to '.date('d-m-Y', strtotime($sq_tour_group['to_date']));\n\n $message = 'We are accepting your cancellation request with below details. Tour Name : '.$sq_tour['tour_name'].' Tour Date :'.$tour_group;\n global $model;\n $model->send_message($sq_personal_info['mobile_no'], $message);\n}", "public function send()\n {\n /* Load helpers */\n $this->load->helper('Twispay_TW_Helper_Notify');\n $this->load->helper('Twispay_TW_Logger');\n $this->load->model('checkout/order');\n $this->language->load('extension/payment/twispay');\n\n /* Get order info */\n $order_id = $this->session->data['order_id'];\n $order_info = $this->model_checkout_order->getOrder($order_id);\n\n /* Get the Site ID and the Private Key. */\n if (!$this->config->get('twispay_testMode')) {\n $this->hostName = ControllerExtensionPaymentTwispay::$live_host_name;\n $this->siteID = $this->config->get('twispay_live_site_id');\n $this->secretKey = $this->config->get('twispay_live_site_key');\n } else {\n $this->hostName = ControllerExtensionPaymentTwispay::$stage_host_name;\n $this->siteID = $this->config->get('twispay_staging_site_id');\n $this->secretKey = $this->config->get('twispay_staging_site_key');\n }\n\n if ($order_info) {\n /* Extract the customer details. */\n $customer = [ 'identifier' => (0 == $order_info['customer_id']) ? ('p_o2_' . $order_id . '_' . date('YmdHis')) : ('p_o2_' . $order_info['customer_id'] . '_' . date('YmdHis'))\n , 'firstName' => ($order_info['payment_firstname']) ? ($order_info['payment_firstname']) : ($order_info['shipping_firstname'])\n , 'lastName' => ($order_info['payment_lastname']) ? ($order_info['payment_lastname']) : ($order_info['shipping_lastname'])\n , 'country' => ($order_info['payment_iso_code_2']) ? ($order_info['payment_iso_code_2']) : ($order_info['shipping_iso_code_2'])\n , 'city' => ($order_info['payment_city']) ? ($order_info['payment_city']) : ($order_info['shipping_city'])\n , 'zipCode' => ($order_info['payment_postcode']) ? ($order_info['payment_postcode']) : ($order_info['shipping_postcode'])\n , 'address' => ($order_info['payment_address_1']) ? ($order_info['payment_address_1'].' '.$order_info['payment_address_2']) : ($order_info['shipping_address_1'].' '.$order_info['shipping_address_2'])\n , 'phone' => ((strlen($order_info['telephone']) && $order_info['telephone'][0] == '+') ? ('+') : ('')) . preg_replace('/([^0-9]*)+/', '', $order_info['telephone'])\n , 'email' => $order_info['email']\n ];\n\n /* Get items */\n $products = $this->cart->getProducts();\n\n /* Extract the items details. */\n $items = array();\n foreach ($products as $item) {\n $items[] = [ 'item' => $item['name']\n , 'units' => $item['quantity']\n , 'unitPrice' => $this->currency->format($item['price'], $order_info['currency_code'] , false, false)\n ];\n }\n\n /* Calculate the backUrl through which the server will provide the status of the order. */\n $backUrl = $this->url->link('extension/payment/twispay/callback');\n\n /* Build the data object to be posted to Twispay. */\n $orderData = [ 'siteId' => $this->siteID\n , 'customer' => $customer\n , 'order' => [ 'orderId' => (isset($_GET['tw_reload']) && $_GET['tw_reload']) ? ($order_id . '_' . date('YmdHis')) : ($order_id)\n , 'type' => 'purchase'\n , 'amount' => $this->currency->format($order_info['total'], $order_info['currency_code'], false, false)\n , 'currency' => $order_info['currency_code']\n , 'items' => $items\n ]\n , 'cardTransactionMode' => 'authAndCapture'\n /* , 'cardId' => 0 */\n , 'invoiceEmail' => ''\n , 'backUrl' => $backUrl\n /* , 'customData' => [] */\n ];\n\n $base64JsonRequest = Twispay_TW_Helper_Notify::getBase64JsonRequest($orderData);\n $base64Checksum = Twispay_TW_Helper_Notify::getBase64Checksum($orderData, $this->secretKey);\n\n $htmlOutput = \"<form action='\".$this->hostName.\"' method='POST' accept-charset='UTF-8' id='twispay_payment_form'>\r\n <input type='hidden' name='jsonRequest' value='\".$base64JsonRequest.\"'>\r\n <input type='hidden' name='checksum' value='\".$base64Checksum.\"'>\r\n <input type='submit' data-loading-text='\".$this->lang('button_processing').\"' value='\".$this->lang(\"button_retry\").\"' class='btn btn-primary disabled' disabled='disabled' id='submit_form_button' />\r\n </form>\";\n\n echo $htmlOutput;\n }\n }", "public function main()\n {\n $sms = $this->SmsService->smsList();\n $sendId= [];\n $cnt = count($sms);\n $this->log(\"Send Message count \".$cnt,'debug');\n if($cnt>0){\n $refKey = \"FCCTV\".time();\n $api = new gabiaSmsApi('brickcommerce','6caf388099c1c8f8a782dfa57534b1dc');\n\n foreach($sms as $key => $info){\n try{\n //$sendId[]=$info->id;\n $r = $api->sms_send($info->recv_phone_number, \"070-5015-6383\",$info->message,$refKey);\n\n if ($r == gabiaSmsApi::$RESULT_OK)\n {\n $this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number. \" : \" . $api->getResultMessage() . \"이전 : \" . $api->getBefore() . \" : 이후 : \" . $api->getAfter(),'debug');\n $this->SmsService->smsSendUpdate($info->id);\n }\n\n //$this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number,'debug');\n }catch (Exception $e){\n $this->log($e->getMessage(),'error');\n }\n\n }\n\n $result = $api->get_status_by_ref($refKey);\n $this->log(\"CODE : \".$result[\"CODE\"].\"::::::MESG : \".$result[\"MESG\"],'debug');\n\n }\n }", "public function successAfter($observer) {\r\n $sellerDefaultCountry = '';\r\n $nationalShippingPrice = $internationalShippingPrice = 0;\r\n $orderIds = $observer->getEvent()->getOrderIds();\r\n $order = Mage::getModel('sales/order')->load($orderIds [0]);\r\n $customer = Mage::getSingleton('customer/session')->getCustomer();\r\n $getCustomerId = $customer->getId();\r\n $grandTotal = $order->getGrandTotal();\r\n $status = $order->getStatus();\r\n $itemCount = 0;\r\n $shippingCountryId = '';\r\n $items = $order->getAllItems();\r\n $orderEmailData = array();\r\n foreach ($items as $item) {\r\n\r\n $getProductId = $item->getProductId();\r\n $createdAt = $item->getCreatedAt();\r\n $is_buyer_confirmation_date = '0000-00-00 00:00:00';\r\n $paymentMethodCode = $order->getPayment()->getMethodInstance()->getCode();\r\n $products = Mage::helper('marketplace/marketplace')->getProductInfo($getProductId);\r\n $products_new = Mage::getModel('catalog/product')->load($item->getProductId());\r\n if($products_new->getTypeId() == \"configurable\")\r\n {\r\n $options = $item->getProductOptions() ;\r\n\r\n $sku = $options['simple_sku'] ;\r\n $getProductId = Mage::getModel('catalog/product')->getIdBySku($sku);\r\n }\r\n else{\r\n $getProductId = $item->getProductId();\r\n }\r\n\r\n\r\n\r\n $sellerId = $products->getSellerId();\r\n $productType = $products->getTypeID();\r\n /**\r\n * Get the shipping active status of seller\r\n */\r\n $sellerShippingEnabled = Mage::getStoreConfig('carriers/apptha/active');\r\n if ($sellerShippingEnabled == 1 && $productType == 'simple') {\r\n /**\r\n * Get the product national shipping price\r\n * and international shipping price\r\n * and shipping country\r\n */\r\n $nationalShippingPrice = $products->getNationalShippingPrice();\r\n $internationalShippingPrice = $products->getInternationalShippingPrice();\r\n $sellerDefaultCountry = $products->getDefaultCountry();\r\n $shippingCountryId = $order->getShippingAddress()->getCountry();\r\n }\r\n /**\r\n * Check seller id has been set\r\n */\r\n if ($sellerId) {\r\n $orderPrice = $item->getBasePrice() * $item->getQtyOrdered();\r\n $productAmt = $item->getBasePrice();\r\n $productQty = $item->getQtyOrdered();\r\n if ($paymentMethodCode == 'paypaladaptive') {\r\n $credited = 1;\r\n } else {\r\n $credited = 0;\r\n }\r\n\r\n /* check for checking if payment method is credit card or cash on delivery and if method\r\n is cash on delivery then it will check if the order status of previous orders are complete or not\r\n no need to disable sending email from admin*/\r\n\r\n /*-----------------Adding Failed Delivery Value--------------------------*/\r\n Mage::helper('progos_ordersedit')->getFailedDeliveryStatus($order);\r\n /*----------------------------------------------------------------------*/\r\n\r\n if ($paymentMethodCode == 'ccsave' || $paymentMethodCode == 'telrpayments_cc' || $paymentMethodCode == 'telrtransparent' ) {\r\n $is_buyer_confirmation = 'No';\r\n $is_buyer_confirmation_date = $createdAt;\r\n $item_order_status = 'pending_seller';\r\n $data = 0;\r\n\r\n /*---------------------------Updating comment----------------------*/\r\n /*\r\n * Elabelz-2057\r\n */\r\n /*$product = Mage::getModel(\"catalog/product\")->load($getProductId);\r\n $comment = \"Order Item having SKU '{$product->getSku()}' is <strong>accepted</strong> by buyer\";\r\n $order->addStatusHistoryComment($comment, $order->getStatus())\r\n ->setIsVisibleOnFront(0)\r\n ->setIsCustomerNotified(0);\r\n $order->save();*/\r\n /*---------------------------Updating comment----------------------*/\r\n\r\n } elseif ($paymentMethodCode == 'cashondelivery' || $paymentMethodCode == 'msp_cashondelivery') {\r\n\r\n $counter = 0;\r\n $orders = Mage::getModel('sales/order')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('customer_id', Mage::getSingleton('customer/session')->getId());\r\n foreach ($orders as $ord) {\r\n if ($ord->getStatus() == \"complete\"):\r\n $counter = $counter + 1;\r\n endif;\r\n }\r\n if ($counter != 0) {\r\n $is_buyer_confirmation = 'Yes';\r\n $is_buyer_confirmation_yes = \"Accepted\";\r\n $item_order_status = 'pending_seller';\r\n $data = 0;\r\n\r\n /*---------------------------Updating comment----------------------*/\r\n $product = Mage::getModel(\"catalog/product\")->load($getProductId);\r\n $comment = \"Order Item having SKU '{$product->getSku()}' is <strong>accepted</strong> by buyer\";\r\n $order->addStatusHistoryComment($comment, $order->getStatus())\r\n ->setIsVisibleOnFront(0)\r\n ->setIsCustomerNotified(0);\r\n $order->save();\r\n /*---------------------------Updating comment----------------------*/\r\n\r\n } else {\r\n $is_buyer_confirmation = 'No';\r\n $item_order_status = 'pending';\r\n $tel = $order->getBillingAddress()->getTelephone();\r\n $nexmoActivated = Mage::getStoreConfig('marketplace/nexmo/nexmo_activated');\r\n $nexmoStores = Mage::getStoreConfig('marketplace/nexmo/nexmo_stores');\r\n $nexmoStores = explode(',', $nexmoStores);\r\n $currentStore = Mage::app()->getStore()->getCode();\r\n #check nexmo sms module is active or not and check on which store its enabled\r\n $reservedOrderId = $order->getIncrementId();\r\n $mdlEmapi = Mage::getModel('restmob/quote_index');\r\n $id = $mdlEmapi->getIdByReserveId($reservedOrderId);\r\n if ($nexmoActivated == 1 && in_array($currentStore, $nexmoStores) && !$id) {\r\n # code...\r\n $data = Mage::helper('marketplace/marketplace')->sendVerify($tel);\r\n $data = $data['request_id'];\r\n\r\n }\r\n //$data = 0;\r\n\r\n }\r\n }\r\n\r\n\r\n // $orderPriceToCalculateCommision = $products_new->getPrice() * $item->getQtyOrdered();\r\n $shippingPrice = Mage::helper('marketplace/market')->getShippingPrice($sellerDefaultCountry, $shippingCountryId, $orderPrice, $nationalShippingPrice, $internationalShippingPrice, $productQty);\r\n /**\r\n * Getting seller commission percent\r\n */\r\n $sellerCollection = Mage::helper('marketplace/marketplace')->getSellerCollection($sellerId);\r\n $percentperproduct = $sellerCollection ['commission'];\r\n $commissionFee = $orderPrice * ($percentperproduct / 100);\r\n\r\n // Product price after deducting\r\n // $productAmt = $products_new->getPrice() - $commissionFee;\r\n\r\n $sellerAmount = $shippingPrice - $commissionFee;\r\n\r\n if($item->getProductType() == 'simple')\r\n {\r\n $getProductId = $item->getProductId();\r\n }\r\n\r\n /**\r\n * Storing commission information in database table\r\n */\r\n\r\n if ($commissionFee > 0 || $sellerAmount > 0) {\r\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($getProductId);\r\n $parent_product = Mage::getModel('catalog/product')->load($parentIds[0]);\r\n\r\n if ($parent_product->getSpecialPrice()) {\r\n $orderPrice_sp = $parent_product->getSpecialPrice() * $item->getQtyOrdered();\r\n $orderPrice_base = $parent_product->getPrice() * $item->getQtyOrdered();\r\n\r\n $commissionFee = $orderPrice_sp * ($percentperproduct / 100);\r\n $sellerAmount = $orderPrice_sp - $commissionFee;\r\n } else {\r\n $orderPrice_base = $item->getBasePrice() * $item->getQtyOrdered();\r\n $commissionFee = $orderPrice_base * ($percentperproduct / 100);\r\n $sellerAmount = $shippingPrice - $commissionFee;\r\n }\r\n\r\n $commissionDataArr = array(\r\n 'seller_id' => $sellerId,\r\n 'product_id' => $getProductId,\r\n 'product_qty' => $productQty,\r\n 'product_amt' => $productAmt,\r\n 'commission_fee' => $commissionFee,\r\n 'seller_amount' => $sellerAmount,\r\n 'order_id' => $order->getId(),\r\n 'increment_id' => $order->getIncrementId(),\r\n 'order_total' => $grandTotal,\r\n 'order_status' => $status,\r\n 'credited' => $credited,\r\n 'customer_id' => $getCustomerId,\r\n 'status' => 1,\r\n 'created_at' => $createdAt,\r\n 'payment_method' => $paymentMethodCode,\r\n 'item_order_status' => $item_order_status,\r\n 'is_buyer_confirmation' => $is_buyer_confirmation,\r\n 'sms_verify_code' => $data,\r\n 'is_buyer_confirmation_date'=> $is_buyer_confirmation_date,\r\n 'is_seller_confirmation_date'=> '0000-00-00 00:00:00',\r\n 'shipped_from_elabelz_date'=> '0000-00-00 00:00:00',\r\n 'successful_non_refundable_date'=> '0000-00-00 00:00:00',\r\n 'commission_percentage' => $sellerCollection ['commission']\r\n );\r\n\r\n $commissionId = $this->storeCommissionData($commissionDataArr);\r\n $orderEmailData [$itemCount] ['seller_id'] = $sellerId;\r\n $orderEmailData [$itemCount] ['product_qty'] = $productQty;\r\n $orderEmailData [$itemCount] ['product_id'] = $getProductId;\r\n $orderEmailData [$itemCount] ['product_amt'] = $productAmt;\r\n $orderEmailData [$itemCount] ['commission_fee'] = $commissionFee;\r\n $orderEmailData [$itemCount] ['seller_amount'] = $sellerAmount;\r\n $orderEmailData [$itemCount] ['increment_id'] = $order->getIncrementId();\r\n $orderEmailData [$itemCount] ['customer_firstname'] = $order->getCustomerFirstname();\r\n $orderEmailData [$itemCount] ['customer_email'] = $order->getCustomerEmail();\r\n $orderEmailData [$itemCount] ['product_id_simple'] = $getProductId;\r\n $orderEmailData [$itemCount] ['is_buyer_confirmation'] = $is_buyer_confirmation_yes;\r\n $orderEmailData [$itemCount] ['itemCount'] = $itemCount;\r\n $itemCount = $itemCount + 1;\r\n }\r\n }\r\n // if ($paymentMethodCode == 'paypaladaptive') {\r\n // $this->updateCommissionPA($commissionId);\r\n // }\r\n }\r\n\r\n if ($paymentMethodCode == 'ccsave' || $paymentMethodCode == 'telrpayments_cc' || $paymentMethodCode == 'telrtransparent' ) {\r\n /*if (Mage::getStoreConfig('marketplace/admin_approval_seller_registration/sales_notification') == 1) {\r\n $this->sendOrderEmail($orderEmailData);\r\n }*/\r\n } elseif ($paymentMethodCode == 'cashondelivery' || $paymentMethodCode == 'msp_cashondelivery') {\r\n $counter = 0;\r\n $orders = Mage::getModel('sales/order')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('customer_id', Mage::getSingleton('customer/session')->getId());\r\n foreach ($orders as $ord) {\r\n if ($ord->getStatus() == \"complete\"){\r\n $counter = $counter + 1;\r\n }\r\n }\r\n if ($counter != 0) {\r\n if (Mage::getStoreConfig('marketplace/admin_approval_seller_registration/sales_notification') == 1) {\r\n\r\n $this->sendOrderEmail($orderEmailData);\r\n }\r\n }\r\n }\r\n\r\n //$this->enqueueDataToFareye($observer);\r\n\r\n }", "public function action_order() {\n $field = $this->field($_POST[\"fieldid\"]);\n // Load pre-set emailaddress\n $address = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"emailaddress\")->load()->data;\n if (empty($address)) {\n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$(wi3.popup.getDOM()).fadeOut(100,function() { $(this).html('Bestelling kon <strong>niet</strong> geplaatst worden! Stel de eigenaar van de site hiervan op de hoogte.').fadeIn(); } );\"\n )\n )\n );\n } else {\n // Send an email to client and to the pre-set emailaddress\n $presetemailaddress = $address;\n // Set folder to $_POST to store\n $folderid = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"folder\")->load()->data;\n $_POST[\"folderid\"] = $folderid;\n // Store order\n $orders = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"orders\")->load();\n if (!$orders->loaded())\n {\n $orders->create();\n }\n $ordersdata = unserialize($orders->data);\n $ordersdata[] = $_POST;\n $orders->data = serialize($ordersdata);\n $orders->update();\n // Create mail\n $message = $this->view(\"mail\")->set(\"post\", $_POST)->render();\n $clientmessage = $this->view(\"clientmail\")->set(\"post\", $_POST)->render();\n $subject = \"Bestelling foto's\";\n // Send mail to 'us' and to client\n mail($presetemailaddress, $subject, $message);\n mail($_POST[\"emailaddress\"], $subject, $clientmessage);\n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$(wi3.popup.getDOM()).fadeOut(100,function() { $(this).html('Bestelling succesvol geplaatst!').fadeIn(); } );\"\n )\n )\n );\n }\n }", "public function sendSMSWithApplyLink(){\n\t}", "public function rewardsSmsQueue()\n {\n $sms_queue = RewardSms::where(\"sent\", 0)->get()->take(5);\n \n foreach ($sms_queue as $key => $queue) {\n \n $this->sendSms($queue->phone, $queue->text);\n \n $sms_obj = RewardSms::where(\"rewards_sms_id\", $queue->rewards_sms_id)->get()->first();\n $sms_obj->sent = 1;\n $sms_obj->save();\n }\n }", "static public function quote()\n {\n $jiekou = Jiekou::where(['id'=>2])->first();\n while (1){\n $response = Curl::to($jiekou->url)\n ->get();\n $obj_xml = simplexml_load_string($response);\n $items = $obj_xml->Body->Deliver;\n if (!$obj_xml->Body->Deliver){\n break;\n } else {\n $jiekou->updated_at = \\Carbon\\Carbon::createFromTimeStamp(time(), 'Asia/Shanghai')->toDateTimeString();\n $jiekou->save();\n foreach($items as $item) {\n $sms = new Smss();\n $sms->jiekouid = $jiekou->id;\n $sms->caller = $item->Caller;\n $sms->msg = urldecode($item->Msg);\n $sms->deliverdate = str_replace(\"/\",\"-\",$item->DeliverDate);\n $sms->save();\n }\n }\n }\n }", "public function sendQuoteAction()\n\t{\n\t\tif(is_array($this->quote_creation->select_missions['missions_selected']))\n\t\t{\n\t\t\t//$this->quote_creation->custom['mission_added'];\n\t\t\t//getting Quote user details of selected Bo user\n\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t$quote_by=$this->quote_creation->create_step1['quote_by'];\n\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($quote_by);\n\t\t\tif($bo_user_details!='NO')\n\t\t\t{\n\t\t\t\t$this->quote_creation->create_mission['quote_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\t\t\t\t$this->quote_creation->create_mission['email']=$bo_user_details[0]['email'];\n\t\t\t\t$this->quote_creation->create_mission['phone_number']=$bo_user_details[0]['phone_number'];\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t$this->_view->create_mission=$this->quote_creation->create_mission;\n\t\t\t$this->_view->create_step1=$this->quote_creation->create_step1;\n\t\t $this->_view->select_missions=$this->quote_creation->select_missions;\n\t\t $this->_view->custom=$this->quote_creation->custom;\n\t\t $this->_view->quote_missions=$this->quote_creation->create_mission['quote_missions'];\n\t\t $this->_view->sales_manager_holiday=$this->configval[\"sales_manager_holiday\"];\n\t\t\t$this->_view->user_type=$this->adminLogin->type;\n\t\t //Added w.r.t edit/duplicate\n\t\t $this->_view->send_quote=$this->quote_creation->send_quote;\n\n\t\t\t$this->render('send-quote');\n\t\t}\n\t\telse\n\t\t\t$this->_redirect(\"/quote/create-quote-step1?submenuId=ML13-SL2\");\t\n\t}", "public function bsuccessAction() {\n\t\t\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t\n\t\t\n\t\t$typeData = $session->getTypeData();\n\t\t\n\t\t$privateId = $session->getBusinessPrivateId();\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t//echo \"<pre>business \";print_r($orderData);die;\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['businessCustomer']['email'];\n\t\t\t$mobile = $orderDetails['businessCustomer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$lastName = $orderDetails['businessCustomer']['referencePerson'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['invoiceAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['invoiceAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['invoiceAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['invoiceAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['invoiceAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['deliveryAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\t\t\t//die;\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->unsBusinessPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "function refund_sms_notification_send($tourwise_id)\n{\n $sq_personal_info = mysql_fetch_assoc(mysql_query(\"select mobile_no from traveler_personal_info where tourwise_traveler_id='$tourwise_id'\"));\n $mobile_no = $sq_personal_info['mobile_no'];\n\n $message = \"We are providing the refunds considering your cancellation request of the genuine reason. Pls, contact us for the future journey.\";\n global $model;\n $model->send_message($mobile_no, $message);\n}", "public function FinishOrder()\n\t\t{\n\t\t\t// Orders are still incomplete, so we need to validate them\n\t\t\tif($this->pendingData['status'] == ORDER_STATUS_INCOMPLETE) {\n\t\t\t\t// Verify the pending order\n\t\t\t\t$newStatus = VerifyPendingOrder($this->orderToken);\n\n\t\t\t\t// Order was declined and we're rejecting all declined payments\n\t\t\t\tif($newStatus == ORDER_STATUS_DECLINED) {\n\t\t\t\t\t$Msg = sprintf(GetLang('ErroOrderDeclined'), GetConfig('OrderEmail'), GetConfig('OrderEmail'));\n\t\t\t\t\t$this->BadOrder(GetLang('YourPaymentWasDeclined'), $Msg);\n\t\t\t\t}\n\t\t\t\t// This order is valid\n\t\t\t\telseif($newStatus !== false) {\n\n\t\t\t\t\t$prodOrdered = array();\n\t\t\t\t\t$items = getCustomerQuote()->getItems();\n\t\t\t\t\tforeach($items as $item) {\n\t\t\t\t\t\t$productId = $item->getProductId();\n\t\t\t\t\t\tif($productId > 0) {\n\t\t\t\t\t\t\t$prodOrdered[] = $productId;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$_SESSION['ProductJustOrdered'] = implode(',',$prodOrdered);\n\t\t\t\t\t}\n\t\t\t\t\tif(CompletePendingOrder($this->orderToken, $newStatus)) {\n\t\t\t\t\t\t// Order was saved. Show the confirmation screen and email an invoice to the customer\n\t\t\t\t\t\t$this->ThanksForYourOrder();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we're still here, either the order didnt complete or the order was invalid\n\t\t\t\t$this->BadOrder();\n\t\t\t}\n\t\t\t// Order is already complete - there's a good chance the customer has refreshed the page,\n\t\t\t// or they've come back from somewhere like PayPal who in the mean time has already sent\n\t\t\t// us a ping back to validate and begin processing the order - show the thank you page\n\t\t\telse if($this->pendingData['status'] == ORDER_STATUS_DECLINED) {\n\t\t\t\t\t$Msg = sprintf(GetLang('ErroOrderDeclined'), GetConfig('OrderEmail'), GetConfig('OrderEmail'));\n\t\t\t\t\t$this->BadOrder(GetLang('YourPaymentWasDeclined'), $Msg);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->ThanksForYourOrder();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "public function sendSMS($data)\n {\n Mobily::send($data['mobile'], $data['message']);\n }", "public function customerRegisterSuccess($observer)\n{\n\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $customer = $observer->getEvent()->getCustomer();\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n\n $telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n\n if ($telephone) {\n $text =$settings['customer_notification_message'];\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n }\n \n array_push($settings['order_noficication_recipients'], $telephone);\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return;\n}", "public function orderDeliverySuccess($id){\n $products = Orderdetail::where('order_id',$id)->get();\n foreach ($products as $product){\n Product::where('id', $product->product_id)->update([\n 'product_quantity' => DB::raw('product_quantity-'.$product->qty)\n ]);\n }\n\n $deliverySuccess = Order::findOrFail($id);\n $deliverySuccess->status = 3;\n $deliverySuccess->save();\n\n Toastr::success('Order delivery done');\n return redirect()->route('delivered.order');\n\n }", "protected function doActionSendTracking()\n {\n \\XLite\\Core\\Mailer::sendOrderTrackingInformationCustomer($this->getOrder());\n\n \\XLite\\Core\\TopMessage::addInfo('Tracking information has been sent');\n }", "function email_instructions( $order, $sent_to_admin ) {\n\n\t\t\tif ( $sent_to_admin ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $order->status !== 'on-hold' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $order->payment_method !== 'esewa' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $description = $this->get_description() ) {\n\t\t\t\techo wpautop( wptexturize( $description ) );\n\t\t\t}\n\t\t}", "public static function Order($order){\n\n $chatID = \"-1001270503780\"; //local\n // $chatID = \"-1001347027599\"; //server\n\n $str = ''; \n $i = 1; \n foreach($order->details as $detail){\n$str.= $i.'. '.$detail->menu->name.' x '.$detail->pending_notification_qty.'\n'; \n $i++; \n }\n\n $type = !is_null($order->last_notify_at) ? 'ហៅថែម':'ការកម្មង់ថ្មី'; \n \n $botRes = TelegramBot::sendMessage([\n 'chat_id' => $chatID, \n 'text' => '<b> '.$type.' : វិក័យបត្រលេខ #'.$order->receipt_number. '</b>\n'.$str, \n 'parse_mode' => 'HTML'\n ]);\n\n return $botRes; \n \n }", "public function shippingOrder()\n {\n $order = Order::where('id', request()->order_id)->firstOrFail();\n $order->update([\n 'status' => 3,\n 'tracking_number' => request()->tracking_number,\n ]);\n Mail::to($order->customer->email)->send(new OrderMail($order));\n\n return back()->withToastSuccess('Mail Sent');\n }", "function sen_sms($to,$text)///ส่ง sms\n{ //create client with api key and secret\n $rest = substr($to, 1);\n $client = new Nexmo\\Client(new Nexmo\\Client\\Credentials\\Basic('c21feb7d', 'yrxEwwXERXj8yv7L'));\n $message = $client->message()->send([\n 'to' => '66'.$rest,\n 'from' => 'RFLpang',\n 'text' => $text,\n 'type' => 'unicode'\n ]);\n //array access provides response data\n //echo \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n\n return \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n}", "public function saveOrder()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$modelUserCart = $this->getModel('usercart');\n\n\t\t$modelUserCart->storeUserOrder();\n\t\t$modelUserCart->sendOrderMail();\n\t\t$modelUserCart->emptyCart();\n\t\t$params = $app->getParams('com_simpleshop');\n\t\t$return_url = $params->get('return_url');\n\n\n\t\t$app->redirect($return_url);\n\n\t}", "public function salesOrderInvoiceSaveAfter($observer)\n {\n\n // Get the settings\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $arr = $settings['order_status'];\n $a = explode(',', $settings['order_status']);\n $b = explode(',', $settings['order_status']);\n $final_array = array_combine($a, $b);\n\n $text = Mage::getStoreConfig('smsnotifications/invoice_notification/message');\n // If no invoice notification has been specified, no notification can be sent\n if (!$text) {\n return;\n }\n\n $order = $observer->getEvent()->getInvoice()->getOrder();\n $order_id = $order->getIncrementId();\n\n $invoice = $order->getInvoiceCollection()->getFirstItem();\n $invoiceId = $invoice->getIncrementId();\n\n $store_name = Mage::app()->getStore()->getFrontendName();\n\n $billingAdress = $order->getBillingAddress();\n $shippingAdress = $order->getShippingAddress();\n\n if ($order->getCustomerFirstname()) {\n $customer_name = $order->getCustomerFirstname();\n $customer_name .= ' '.$order->getCustomerLastname();\n } elseif ($billingAdress->getFirstname()) {\n $customer_name = $billingAdress->getFirstname();\n $customer_name .= ' '.$billingAdress->getLastname();\n } else {\n $customer_name = $shippingAdress->getFirstname();\n $customer_name .= ' '.$shippingAdress->getLastname();\n }\n\n $order_amount = $order->getBaseCurrencyCode();\n $order_amount .= ' '.$order->getBaseGrandTotal();\n\n $telephoneNumber = trim($shippingAdress->getTelephone());\n\n // Check if a telephone number has been specified\n if(in_array('invoice', $final_array)){\n if ($telephoneNumber) {\n $text = Mage::getStoreConfig('smsnotifications/invoice_notification/message');\n $text = $settings['invoice_notification_message'];\n $text = str_replace('{{name}}', $customer_name, $text);\n $text = str_replace('{{order}}', $order_id, $text);\n $text = str_replace('{{amount}}', $order_amount, $text);\n $text = str_replace('{{invoiceno}}', $invoiceId, $text);\n\n array_push($settings['order_noficication_recipients'], $telephoneNumber );\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n if ($result) {\n $recipients_string = implode(',', $settings['order_noficication_recipients']);\n Mage::getSingleton('adminhtml/session')->addSuccess(sprintf('The invoice notification has been sent via SMS to: %s', $recipients_string));\n } else {\n Mage::getSingleton('adminhtml/session')->addError('There has been an error sending the invoice notification SMS.');\n }\n }\n }\n}", "public function sendMarketing()\n {\n }", "function paid_sendEmail_customer($details) {\n\t\t\t\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\n\t\t\t\t$total_amount = $details->checkoutTotal;\n\t\t\t\t $abc = $details->Extra_data->normal_price - $total_amount;\n if($abc < 0){\n $save = '0';\n\n }else{\n $save = number_format($details->Extra_data->normal_price - $total_amount,0);\n\t\t\t\t\t}\n\n\t\t\t\t$id = $details->id;\n\t\t\t\t$itemid = $details->itemid;\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$stars = $details->stars;\n\t\t\t\t$code = $details->code;\n\t\t\t\t$booking_adults = $details->Extra_data->adults;\n\t\t\t\t$child = $details->Extra_data->child;\n\t\t\t\t\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$deposit = $details->subItem->price;\n\t\t\t\t$quantity = $details->subItem->quantity;\n\t\t\t\t$hotel_title = $details->subItem->title;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$sendto = $details->accountEmail;\n\n\t\t\t\t$additionaNotes = $details->additionaNotes;\n\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$HOTEL_NAME = $details->title;\n\t\t\t\t$location = $details->location;\n\t\t\t\t$room_name = $details->subItem->title;\n\t\t\t\t$booking_adults = $details->subItem->booking_adults;\n\t\t\t\t$room_price = $details->subItem->price;\n\t\t\t\t\n\t\t\t\t$checkin = $details->checkin;\n\t\t\t\t\n\t\t\t\t$checkout = $details->checkout;\n\t\t\t\t$couponRate = $details->couponRate;\n\t\t\t\t\n\t\t\t\t$date = date ( \"m/d/Y\" , strtotime ( \"-1 day\" , strtotime ( $details->checkin ) ) );\n\t\t\t\t$no_of_room = $details->subItem->quantity;\n\t\t\t\t$thumbnail = str_replace(\"demo.tarzango.com/\",\"tarzango.com/\",$details->thumbnail);\n\t\t\t\t$hotel_id = $details->itemid;\n\n\t\t\t\t$guest_name = $details->Extra_data->guest_name;\n\t\t\t\t$guest_age = $details->Extra_data->guest_age;\n\t\t\t\t$chil = $details->Extra_data->child;\n\t\t\t\t$child_name = isset($details->Extra_data->child_name) ? $details->Extra_data->child_name : 0;\n\t\t\t\t$child_age = isset($details->Extra_data->child_age) ? $details->Extra_data->child_age : 0;\n\t\t\t\t\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"\";\n\t\t\t\t\n\t\t\t\t$sendto = $details->accountEmail;\n\t\t\t\t\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t/*$template = $this->shortcode_variables(\"bookingpaidcustomer\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidcustomer\");*/\n\n\t\t\t\t $book_room = $no_of_room;\n \n $room_per_guest = $booking_adults / $book_room;\n \n for ($r_i=0; $r_i < $book_room ; $r_i++) {\n \t$cc = $r_i+1;\n \t$no_top_hotel .= '<li class=\"title\" style=\"float: left; width: 100%; list-style-type: none; margin-left:0px;\">\n <p style=\"font-size: 11px;color: #a5a6b4;padding-top: 15px;margin-left: -30px;\">ROOM '.$cc.'</p>\n </li>';\n\t for($g_d_a=0; $g_d_a < $room_per_guest; $g_d_a++){\n\n\t $jj = $g_d_a + $r_i;\n\t $dd = $guest_name[$jj];\n\t $age = $guest_age[$jj];\n\t \n\n\t \t$no_top_hotel .= '<li class=\"username\" style=\"list-style-type: none;width: 100%;float:left;border-bottom: 1px solid #e6e7ed; margin-left:0px; \">\n\t\t <h5 class=\"left\" style=\"font-size: 16px;color: #0c134f;float: left; margin-left: -30px;\">'.$dd.'</h5>\n \t\t<h5 class=\"right\" style=\"float:right;font-size: 16px;color: #0c134f;margin-right: 5px;\">'.$age.' Years</h5>\n\t\t </li>';\n\t }\n }\n\n if($chil > 0){\n\t $no_top_hotel .= ' <li class=\"title\" style=\"float: left; width: 100%; list-style-type: none; margin-left:0px; \">\n \t\t\t\t <p style=\"font-size: 11px;color: #a5a6b4;padding-top: 15px;\">CHILD DETAILS</p>\n \t\t\t\t </li>';\n \t for($c_i=0;$c_i<$chil;$c_i++){\n \t \t $ii = $c_i;\n\t \t\t $child_name1 = $child_name[$ii];\n\t \t\t $child_age1= $child_age[$ii];\n \t \t\n \t \t $no_top_hotel .= '<li class=\"username\" style=\"list-style-type: none;width: 96%;float:left;border-bottom: 1px solid #e6e7ed; margin-left:0px;\">\n \t\t\t<h5 class=\"left\" style=\"font-size: 16px;color: #0c134f;float: left; margin-left: -30px;\">'.$child_name1.'</h5>\n \t\t<h5 class=\"right\" style=\"font-size: 16px;color: #0c134f;float: right;margin-right: 5px;\"><img src=\"'.$email_temp_img.'paynow_icon8.png\"> '.$child_age1.' Years</h5>\n \t\t\t</li>';\n \t}\n }\n\n \t$this->db->select('hotel_latitude,hotel_longitude,hotel_desc,hotel_map_city,hotel_stars');\n\t\t \t$this->db->where('hotel_id', $itemid);\n\t\t \t$query = $this->db->get('pt_hotels');\t\n\t\t \t$hotel_data = $query->result();\n\n\t\t \t$star_temp_img = $uu.$ptheme.'/images/';\n\n\t\t\t\t\t/*echo $hotel_data[0]->hotel_stars;*/\n\n\t\t\t\t\t$aaa = '';\n\t\t\t\t\tfor ($st_i=0; $st_i < 5 ; $st_i++) { \n \tif($st_i < $hotel_data[0]->hotel_stars){\n \t\t$aaa .= '<img src=\"'.$star_temp_img.'/star-on.png\">';\n \t}else{\n \t\t$aaa .= '<img src=\"'.$star_temp_img.'/star-off.png\">';\n \t}\n }\n\n\t\t \t$arrayInfo['checkIn'] = date(\"m/d/Y\", strtotime(\"+1 days\"));\n\t\t \t$arrayInfo['checkOut'] = date(\"m/d/Y\", strtotime(\"+2 days\"));\n\t\t \t$arrayInfo['adults'] = '1';\n\t\t \t$arrayInfo['child'] = '';\n\t\t \t$arrayInfo['room'] = '1';\n\t\t \t/*error_reporting(E_ALL);*/\n\t\t \t\t//$this->ci = & get_instance();\n\t\t\t\t\t\t// $this->db = $this->ci->db;\n\t\t\t\t\t$this->load->model('hotels/hotels_model');\n\t\t \t\n\t\t \t$local_hotels = $this->hotels_model->search_hotels_by_lat_lang($hotel_data[0]->hotel_latitude, $hotel_data[0]->hotel_longitude,$arrayInfo);\n\n\t\t \t$top_hotel = '<div class=\"col-sm-12 hotels\">';\n\n\t\t \tfor ($i=0; $i < count($local_hotels['hotels']) ; $i++) { \n\t\t \t\tif($i < 3){\n\t\t \t\t $image = str_replace(\"demo.tarzango.com/\",\"tarzango.com/\",$bb[$i]->thumbnail);\n\t\t \t\t$bb = $local_hotels['hotels'];\n\t\t \t\t $bb[$i]->title;\n\t\t \t\t$top_hotel .= '<a class=\"col-sm-4\" href=\"'.$bb[$i]->slug.'\" style=\"margin-left: 2%;padding:10px;text-decoration: none; width:27.3333%;float: left; box-sizing: border-box;position: relative;\">';\n\t\t \t\t\t\t\t\tif($image == \"\"){\n\n\t\t\t\t\t\t\t\t\t\t\t$top_hotel .= '<img height=185px class=\"img-responsive\" src=\"'.$uu.$ptheme.'/email_temp_img/gb_email_temp_img/email-d-lasvegas.png\" style=\"width: 100%; min-height: 185px; height: 185px; max-height: 185px;\">';\n\t\t\t\t\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t\t\t\t\t$top_hotel .= '<img height=185px class=\"img-responsive\" src=\"'.$image.'\" style=\"width: 100%; min-height: 185px; height: 185px; max-height: 185px;\">';\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$top_hotel .= '<p style=\"text-align:center;margin:0px;color: rgb(12, 19, 79);font-size: 14px;margin: 20px 0 10px;font-family: \\'Roboto\\',sans-serif;\">'.$this->custom_echo($bb[$i]->title, 25).'</p>\n\t\t\t\t\t\t\t\t\t\t\t<h4 style=\" text-align:center;margin:0px; color: rgb(28, 192, 251);font-size: 20px;font-weight: 600;font-family: \\'Roboto\\',sans-serif;\">'.$bb[$i]->currCode.$bb[$i]->price.'</h4>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t \t} \n\t\t }\n\n\t\t \t$map = '<div class=\"col-sm-12 map\" style=\"width: 100%;padding-left: 0;float: left; box-sizing: border-box;min-height: 1px; padding-right:0px; position: relative;\">\n\t\t\t\t\t\t\t\t <a href=\"http://maps.google.com/?daddr={hotel_name}\" target=\"_blank\"> \n <img style=\"width:100%\" border=\"0\" src=\"https://maps.googleapis.com/maps/api/staticmap?center='.$hotel_data[0]->hotel_latitude.','.$hotel_data[0]->hotel_longitude.'&zoom=14&size=620x260&markers=size:mid%7Ccolor:red%7C'.$hotel_data[0]->hotel_latitude.','.$hotel_data[0]->hotel_longitude.'&key=AIzaSyAH65sTGsDsP4mMpmbHC8zqRiM1Qh07iL8\" alt=\"Google map\"></a>\n\t\t\t\t\t\t\t</div>';\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t\n\n\t\t\t\t$template = array(\"{invoice_id}\", \"{hotel_name}\", \"{stars}\", \"{location}\", \"{code}\",\"{invoice_code}\", \"{deposit_amount}\", \"{total_amount}\", \"{customer_email}\", \"{customer_id}\", \"{country}\", \"{phone}\", \"{currency_code}\", \"{currency_sign}\", \"{invoice_link}\", \"{site_title}\", \"{remaining_amount}\", \"{fullname}\",\"{room_name}\",\"{date}\",\"{checkin}\",\"{checkout}\",\"{no_of_room}\",\"{thumbnail}\",\"{booking_adults}\",\"{room_price}\",\"{couponRate}\",\"{additionaNotes}\",\"{email_temp_img}\",\"{quantity}\",\"{hotel_title}\",\"{booking_adults}\",\"{child}\",\"{no_top_hotel}\",\"{top_hotel}\",\"{map}\",\"{aaa}\",\"{save}\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidcustomer\");\n\t\t\t\t$values = array($invoiceid, $HOTEL_NAME, $stars, $location, $code, $refno, $deposit, $total_amount, $sendto, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $remaining , $name, $room_name, $date, $checkin, $checkout, $no_of_room, $thumbnail,$booking_adults,$room_price,$couponRate,$additionaNotes,$email_temp_img, $quantity,$hotel_title,$booking_adults,$child,$no_top_hotel,$top_hotel,$map,$aaa,$save);\n\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/invoice.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\n\t\t\t\t\n\t\t\t\t/*$message = $this->mailHeader;*/\n\t\t\t\t/*echo '<pre>'.json_encode($message).'</pre>';\n\t\t\t\texit();*/\n\t\t\t\t/*$details = $this->html_template_booking($hotel_id,$invoiceid);\n\t\t\t\t$message .= str_replace($template, $values, $details);*/\n\t\t\t\t//$message .= $this->mailFooter;\n\t\t\t\t/*echo $message;\n\t\t\t\texit;*/\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"bookingpaidcustomer\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Thanks for Booking at the '.$HOTEL_NAME);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t\n\t\t}", "function sendSMS($sender, $text, $phone, $datetime, $sms_lifetime){\n\t\treturn $this->gateway->execCommad('sendSMS',array('sender' => $sender, 'text' => $text, 'phone' => $phone, 'datetime' => $datetime, 'sms_lifetime' => $sms_lifetime, 'type' => 2));\n\t}", "public function send_order($data){\n \treturn $this->db->add_row( $data, $this->order );\n }", "function _process($data)\n {\t\t\n\t\t$post = JFactory::getApplication()->input->get($_POST);\n \t\n \t$orderpayment_id = @$data['ssl_invoice_number'];\n \t\n \t$errors = array();\n \t$send_email = false;\n \t\n \t// load the orderpayment record and set some values\n JTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n $orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n $orderpayment->load( $orderpayment_id );\n if (empty($orderpayment_id) || empty($orderpayment->orderpayment_id))\n {\n $errors[] = JText::_('VIRTUALMERCHANT MESSAGE INVALID ORDERPAYMENTID');\n return count($errors) ? implode(\"\\n\", $errors) : '';\n }\n $orderpayment->transaction_details = $data['ssl_result_message'];\n $orderpayment->transaction_id = $data['ssl_txn_id'];\n $orderpayment->transaction_status = $data['ssl_result'];\n \n // check the stored amount against the payment amount \n \tTienda::load( 'TiendaHelperBase', 'helpers._base' );\n $stored_amount = TiendaHelperBase::number( $orderpayment->get('orderpayment_amount'), array( 'thousands'=>'' ) );\n $respond_amount = TiendaHelperBase::number( $data['ssl_amount'], array( 'thousands'=>'' ) );\n if ($stored_amount != $respond_amount ) {\n \t$errors[] = JText::_('VIRTUALMERCHANT MESSAGE AMOUNT INVALID');\n \t$errors[] = $stored_amount . \" != \" . $respond_amount;\n }\n \n // set the order's new status and update quantities if necessary\n Tienda::load( 'TiendaHelperOrder', 'helpers.order' );\n Tienda::load( 'TiendaHelperCarts', 'helpers.carts' );\n $order = JTable::getInstance('Orders', 'TiendaTable');\n $order->load( $orderpayment->order_id );\n if (count($errors)) \n {\n // if an error occurred \n $order->order_state_id = $this->params->get('failed_order_state', '10'); // FAILED\n }\n\t\telse\n {\n $order->order_state_id = $this->params->get('payment_received_order_state', '17');; // PAYMENT RECEIVED\n\n // do post payment actions\n $setOrderPaymentReceived = true;\n \n // send email\n $send_email = true;\n }\n\n // save the order\n if (!$order->save())\n {\n \t$errors[] = $order->getError();\n }\n \n // save the orderpayment\n if (!$orderpayment->save())\n {\n \t$errors[] = $orderpayment->getError(); \n }\n \n if (!empty($setOrderPaymentReceived))\n {\n $this->setOrderPaymentReceived( $orderpayment->order_id );\n }\n \n if ($send_email)\n {\n // send notice of new order\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\n $helper = TiendaHelperBase::getInstance('Email');\n $model = Tienda::getClass(\"TiendaModelOrders\", \"models.orders\");\n $model->setId( $orderpayment->order_id );\n $order = $model->getItem();\n $helper->sendEmailNotices($order, 'new_order');\n }\n\n return count($errors) ? implode(\"\\n\", $errors) : ''; \n\n \treturn true;\n }", "function send_sms($to, $message) {\n\n\tLOG_MSG('INFO',\"send_sms(): START to=[$to]\");\n\n\t// Retrieve SMS Gateway Details\n\t$smsgateway_resp=db_lib_smsgateway_select();\n\tif ( $smsgateway_resp[0]['STATUS'] != 'OK' ) {\n\t\tLOG_MSG('ERROR',\"send_sms(): Error loading sms gateway\");\n\t}\n\n\t// Send SMS only if Gateway is found\n\tif ( $smsgateway_resp[0]['NROWS'] == 1 ) {\n\t\t$plain_message=$message;\n\t\t$smsgateway_id=$smsgateway_resp[0]['smsgateway_id'];\n\n\t\t$status='FAILED';\n\t\t$username=$smsgateway_resp[0]['username'];\n\t\t$password=$smsgateway_resp[0]['password'];\n\t\t$api_key=$smsgateway_resp[0]['api_key'];\n\t\t$default_sender_id=$smsgateway_resp[0]['default_sender_id'];\n\t\t$to=urlencode($to);\n\t\t$message=urlencode($message);\n\t\t$gateway_url=$smsgateway_resp[0]['gateway_url'];\n\n\t\t// Generate the URL base on the provider\n\t\tif ( $smsgateway_resp[0]['name'] == 'SolutionsInfini' ) {\n\t\t\t// http://alerts.sinfini.com/api/web2sms.php?workingkey=##API_KEY##&sender=##DEFAULT_SENDER_ID##&to=##MOBILE_TO##&message=##MESSAGE##\n\t\t\t$search=array('##API_KEY##', '##DEFAULT_SENDER_ID##', '##MOBILE_TO##', '##MESSAGE##');\n\t\t\t$replace=array($api_key, $default_sender_id, $to, $message);\n\t\t\t$url=str_replace($search,$replace,$gateway_url);\n\t\t} elseif ( $smsgateway_resp[0]['name'] == 'SMSGupshup' ) {\n\t\t\t// http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to=##MOBILE_TO##&msg=##MESSAGE##&msg_type=TEXT&userid=##USERNAME##&auth_scheme=plain&password=##PASSWORD##&v=1.1&format=text\t\n\t\t\t$search=array('##USERNAME##', '##PASSWORD##', '##MOBILE_TO##', '##MESSAGE##');\n\t\t\t$replace=array($username, $password, $to, $message);\n\t\t\t$url=str_replace($search,$replace,$gateway_url);\n\t\t}\n\n\t\t// Send SMS\n\t\t$ch=curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response=curl_exec($ch);\n\t\tcurl_close($ch); \n\t\tif ( strpos($response,'GID') ) $status='SUCCESS';\n\t\tLOG_MSG('INFO',\"send_sms(): $response\");\n\n\t\t// Add SMS Sent Details\n\t\t$smssent_resp=db_smssent_insert(\n\t\t\t\t\t\t\t$smsgateway_id,\n\t\t\t\t\t\t\t$default_sender_id,\n\t\t\t\t\t\t\t$to,\n\t\t\t\t\t\t\t$plain_message,\n\t\t\t\t\t\t\t$url,\n\t\t\t\t\t\t\t$response,\n\t\t\t\t\t\t\t$status);\n\t\tif ( $smssent_resp['STATUS'] != 'OK' ) {\n\t\t\tLOG_MSG('ERROR',\"send_sms(): Error while inserting in SMSSent talble from=[$from] to=[$to]\");\n\t\t}\n\t}\n\n\tLOG_MSG('INFO',\"send_sms(): END\");\n\treturn true;\n}", "public function gw_send_sms($user,$pass,$sms_from,$sms_to,$sms_msg) \n { \n $query_string = \"api.aspx?apiusername=\".$user.\"&apipassword=\".$pass;\n $query_string .= \"&senderid=\".rawurlencode($sms_from).\"&mobileno=\".rawurlencode($sms_to);\n $query_string .= \"&message=\".rawurlencode(stripslashes($sms_msg)) . \"&languagetype=1\"; \n $url = \"http://gateway.onewaysms.com.au:10001/\".$query_string; \n $fd = @implode ('', file ($url)); \n if ($fd) \n { \n if ($fd > 0) {\n Print(\"MT ID : \" . $fd);\n $ok = \"success\";\n } \n else {\n print(\"Please refer to API on Error : \" . $fd);\n $ok = \"fail\";\n }\n } \n else \n { \n // no contact with gateway \n $ok = \"fail\"; \n } \n return $ok; \n }", "function SBSC_SendOrder($token, \n\t\t\t\t\t\t\t$order_no,\n\t\t\t\t\t\t\t$order_date,\n\t\t\t\t\t\t\t$order_type_code,\n\t\t\t\t\t\t\t$order_type_name, \n\t\t\t\t\t\t\t$asc_code, \n\t\t\t\t\t\t\t$asc_name, \n\t\t\t\t\t\t\t$asc_address, \n\t\t\t\t\t\t\t$asc_postcode,\n\t\t\t\t\t\t\t$sender_name, \n\t\t\t\t\t\t\t$sender_phone, \n\t\t\t\t\t\t\t$sender_city_code,\n\t\t\t\t\t\t\t$sender_city_name, \n\t\t\t\t\t\t\t$receive_code, \n\t\t\t\t\t\t\t$receive_name,\n\t\t\t\t\t\t\t$receive_address,\n\t\t\t\t\t\t\t$receive_postcode,\n\t\t\t\t\t\t\t$receive_person,\n\t\t\t\t\t\t\t$receive_phone,\n\t\t\t\t\t\t\t$receive_city_code,\n\t\t\t\t\t\t\t$receive_city_name,\n\t\t\t\t\t\t\t$box_number,\n\t\t\t\t\t\t\t$box_no_list,\n\t\t\t\t\t\t\t$goods_price,\n\t\t\t\t\t\t\t$insurance_price,\n\t\t\t\t\t\t\t$model_no,\n\t\t\t\t\t\t\t$serial_no,\n\t\t\t\t\t\t\t$description )\n\t{\n\t\tglobal $JSON, $arrErrMsg, $link;\n\t\t$funcName = 'SBSC_SendOrder';\n\n\t\tif ( strlen( trim( $token ) ) <= 0 ) \n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_TOKEN ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_TOKEN, 'err_msg' => $arrErrMsg[ QLM_NO_TOKEN ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $order_no ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty order no' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $order_date ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty order date' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $order_date ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty order date' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $order_type_code ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty order type code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $order_type_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty order type name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $asc_code ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty ASC code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $asc_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty ASC name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $asc_address ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty ASC address' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $asc_postcode ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty ASC code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $sender_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty sender name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $sender_phone ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty sender phone' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $sender_city_code ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty sender city code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $sender_city_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty sender city name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_code ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_address ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive address' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_postcode ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive post code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_person ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive person' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\t\t\t \n\t\tif ( strlen( trim( $receive_phone ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive phone' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_city_code ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive city code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $receive_city_name ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty receive city name' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $box_number ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty box number' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( strlen( trim( $box_no_list ) ) <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty box number list' );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\n\t\t$arrClientInfo = getClientInfoFromToken( $token );\n\t\t$client_id = $arrClientInfo['company_id'];\n\n\t\t$bCheck = getFunctionPermission( $arrClientInfo['company_id'], $funcName );\n\n\t\tif ( $bCheck <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_PERMISSION_FUNCTION ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_PERMISSION_FUNCTION, 'err_msg' => $arrErrMsg[ QLM_NO_PERMISSION_FUNCTION ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t//check if already exist same order no\n\t\t$bCheck = getDataByMySQLFunc( 'tblordermaster', ' where order_no = \\'' . db_sql( $order_no ) . '\\'', 'no', 'count' );\n\t\tif ( $bCheck > 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Already exist same order no' );\n\t\t\t$arrRet = array( 'err_code' => QLM_INVALID_PARAM, 'err_msg' => $arrErrMsg[ QLM_INVALID_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t//check order type - order type code must be 'HS', 'YF', 'TH'...\n\t\tif ( $order_type_code != 'HS' && $order_type_code != 'YF' && $order_type_code != 'TH' )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Wrong order type code' );\n\t\t\t$arrRet = array( 'err_code' => QLM_INVALID_PARAM, 'err_msg' => $arrErrMsg[ QLM_INVALID_PARAM ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t//check box number is int\n\t\tif ( (int)$box_number <= 0 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_BOX_NUMBER ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_BOX_NUMBER, 'err_msg' => $arrErrMsg[ QLM_NO_BOX_NUMBER ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t//check box count and box number list\n\t\tif ( (int)$box_number != (int)count( jsonDecode( $box_no_list ) ) )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_MATCH_BOX ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_NO_MATCH_BOX, 'err_msg' => $arrErrMsg[ QLM_NO_MATCH_BOX ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\tif ( $order_type_code == 'HS' )\n\t\t{\n\t\t\tif ( strlen( trim( $goods_price ) ) <= 0 )\n\t\t\t{\n\t\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_GOODS_PRICE ] );\n\t\t\t\t$arrRet = array( 'err_code' => QLM_NO_GOODS_PRICE, 'err_msg' => $arrErrMsg[ QLM_NO_GOODS_PRICE ] );\n\t\t\t\treturn $JSON->encode( $arrRet );\n\t\t\t}\n\n\t\t\tif ( strlen( trim( $insurance_price ) ) <= 0 )\n\t\t\t{\n\t\t\t\tregisterFailedOrderList( $order_no, 'SBSC', 'Empty insurance price' );\n\t\t\t\t$arrRet = array( 'err_code' => QLM_NO_PARAM, 'err_msg' => $arrErrMsg[ QLM_NO_PARAM ] );\n\t\t\t\treturn $JSON->encode( $arrRet );\n\t\t\t}\n\t\t}\n\t\telse if ( $order_type_code == 'YF' )\n\t\t{\n\t\t\tif ( strlen( trim( $goods_price ) ) <= 0 )\n\t\t\t{\n\t\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_GOODS_PRICE ] );\n\t\t\t\t$arrRet = array( 'err_code' => QLM_NO_GOODS_PRICE, 'err_msg' => $arrErrMsg[ QLM_NO_GOODS_PRICE ] );\n\t\t\t\treturn $JSON->encode( $arrRet );\n\t\t\t}\n\t\t}\n\t\telse if ( $order_type_code == 'TH' )\n\t\t{\n\t\t\tif ( strlen( trim( $model_no ) ) <= 0 )\n\t\t\t{\n\t\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_MODELNO ] );\n\t\t\t\t$arrRet = array( 'err_code' => QLM_NO_MODELNO, 'err_msg' => $arrErrMsg[ QLM_NO_MODELNO ] );\n\t\t\t\treturn $JSON->encode( $arrRet );\n\t\t\t}\n\t\t\t\n\t\t\tif ( strlen( trim( $serial_no ) ) <= 0 )\n\t\t\t{\n\t\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NO_SERIALNO ] );\n\t\t\t\t$arrRet = array( 'err_code' => QLM_NO_SERIALNO, 'err_msg' => $arrErrMsg[ QLM_NO_SERIALNO ] );\n\t\t\t\treturn $JSON->encode( $arrRet );\n\t\t\t}\n\t\t}\n\n\t\t//check order_date validation\n\t\t$arrDate = explode( '-', $order_date );\n\t\tif ( count( $arrDate ) < 3 )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_NOT_MACH_DATE_FORMAT ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_NOT_MACH_DATE_FORMAT, 'err_msg' => $arrErrMsg[ QLM_NOT_MACH_DATE_FORMAT ] );\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t$order_timestamp = mktime( 0, 0, 0, $arrDate[1], $arrDate[2], $arrDate[0] );\n\t\t//now insert order info in table\n\t\t$sql = 'insert into tblsbscorderlist set ';\n\t\t$sql .= ' order_no\t\t\t\t= \\'' . db_sql( $order_no ) . '\\'';\n\t\t$sql .= ', order_date\t\t\t= \\'' . db_sql( $order_timestamp ) . '\\'';\n\t\t$sql .= ', order_type_code\t\t= \\'' . db_sql( $order_type_code ) . '\\'';\n\t\t$sql .= ', order_type_name\t\t= \\'' . db_sql( $order_type_name ) . '\\'';\n\t\t$sql .= ', asc_code\t\t\t\t= \\'' . db_sql( $asc_code ) . '\\'';\n\t\t$sql .= ', asc_name\t\t\t\t= \\'' . db_sql( $asc_name ) . '\\'';\n\t\t$sql .= ', asc_address\t\t\t= \\'' . db_sql( $asc_address ) . '\\'';\n\t\t$sql .= ', asc_postcode\t\t\t= \\'' . db_sql( $asc_postcode ) . '\\'';\n\t\t$sql .= ', sender_name\t\t\t= \\'' . db_sql( $sender_name ) . '\\'';\n\t\t$sql .= ', sender_phone\t\t\t= \\'' . db_sql( $sender_phone ) . '\\'';\n\t\t$sql .= ', sender_city_code\t\t= \\'' . db_sql( $sender_city_code ) . '\\'';\n\t\t$sql .= ', sender_city_name\t\t= \\'' . db_sql( $sender_city_name ) . '\\'';\n\t\t$sql .= ', receive_code\t\t\t= \\'' . db_sql( $receive_code ) . '\\'';\n\t\t$sql .= ', receive_name\t\t\t= \\'' . db_sql( $receive_name ) . '\\'';\n\t\t$sql .= ', receive_address\t\t= \\'' . db_sql( $receive_address ) . '\\'';\n\t\t$sql .= ', receive_postcode\t\t= \\'' . db_sql( $receive_postcode ) . '\\'';\n\t\t$sql .= ', receive_person\t\t= \\'' . db_sql( $receive_person ) . '\\'';\n\t\t$sql .= ', receive_phone\t\t= \\'' . db_sql( $receive_phone ) . '\\'';\n\t\t$sql .= ', receive_city_code\t= \\'' . db_sql( $receive_city_code ) . '\\'';\n\t\t$sql .= ', receive_city_name\t= \\'' . db_sql( $receive_city_name ) . '\\'';\n\t\t$sql .= ', box_number\t\t\t= \\'' . db_sql( $box_number ) . '\\'';\n\t\t$sql .= ', box_no_list\t\t\t= \\'' . db_sql( $box_no_list ) . '\\'';\n\t\t$sql .= ', goods_price\t\t\t= \\'' . db_sql( $goods_price ) . '\\'';\n\t\t$sql .= ', insurance_price\t\t= \\'' . db_sql( $insurance_price ) . '\\'';\n\t\t$sql .= ', model_no\t\t\t\t= \\'' . db_sql( $model_no ) . '\\'';\n\t\t$sql .= ', serial_no\t\t\t= \\'' . db_sql( $serial_no ) . '\\'';\n\t\t$sql .= ', description\t\t\t= \\'' . db_sql( $description ) . '\\'';\n\t\t$sql .= ', is_processed\t\t\t= \\'' . db_sql( '0' ) . '\\'';\n\n\t\t$query = db_query( $sql, $link );\n\t\t\n\t\tif ( !$query )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_SYSTEM_ERR ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_SYSTEM_ERR, 'err_msg' => $arrErrMsg[ QLM_SYSTEM_ERR ], 'token' => '' );\t\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\t\n\t\t//get customer company's code\n\t\t$customerInfo = getData( 'tblcustomercompany', ' where company_id = \\'' . db_sql( $client_id ) . '\\'', 'company_code' );\n\n\t\t//and insert master table\n\t\t$sql = 'insert into tblordermaster set';\n\t\t$sql .= ' order_no\t\t\t= \\'' . db_sql( $order_no ) . '\\'';\n\t\t$sql .= ', order_date\t\t= \\'' . db_sql( $order_timestamp ) . '\\'';\n\t\t$sql .= ', order_type_code\t= \\'' . db_sql( $order_type_code ) . '\\'';\n\t\t$sql .= ', order_type_name\t= \\'' . db_sql( $order_type_name ) . '\\'';\n\t\t$sql .= ', company_code\t\t= \\'' . db_sql( $customerInfo['company_code'] ) . '\\'';\n\t\t$sql .= ', is_processed\t\t= \\'' . db_sql( '0' ) . '\\'';\n\n\t\t$query = db_query( $sql, $link );\n\t\t\n\t\tif ( !$query )\n\t\t{\n\t\t\tregisterFailedOrderList( $order_no, 'SBSC', $arrErrMsg[ QLM_SYSTEM_ERR ] );\n\t\t\t$arrRet = array( 'err_code' => QLM_SYSTEM_ERR, 'err_msg' => $arrErrMsg[ QLM_SYSTEM_ERR ], 'token' => '' );\t\n\t\t\treturn $JSON->encode( $arrRet );\n\t\t}\n\n\t\t//update current session time\n\t\t$sql = 'update tblsession set';\n\t\t$sql .= ' last_time = \\'' . time() . '\\'';\n\t\t$sql .= ' where token = \\'' . db_sql( $token ) . '\\'';\n\t\t\n\t\tdb_query( $sql, $link );\n\n\t\t$arrRet = array( 'err_code' => QLM_SUCCESS, 'err_msg' => $arrErrMsg[ QLM_SUCCESS ] );\n\n\t\treturn $JSON->encode( $arrRet );\n\t}", "public function send_keys_for_order($order_id)\n {\n $is_full_filled = get_post_meta($order_id, CodesWholesaleConst::ORDER_FULL_FILLED_PARAM_NAME);\n\n if ($is_full_filled == CodesWholesaleOrderFullFilledStatus::FILLED) {\n return;\n }\n\n WC()->mailer()->emails[\"CW_Email_Notify_Low_Balance\"] = include(\"emails/class-cw-email-notify-low-balance.php\");\n WC()->mailer()->emails[\"CW_Email_Customer_Completed_Order\"] = include(\"emails/class-cw-email-customer-completed-order.php\");\n WC()->mailer()->emails[\"CW_Email_Order_Error\"] = include(\"emails/class-cw-email-order-error.php\");\n WC()->mailer()->emails[\"CW_Email_Notify_Preorder\"] = include(\"emails/class-cw-email-notify-preorder.php\");\n\n $order = new WC_Order($order_id);\n $attachments = array();\n $keys = array();\n $error = null;\n $balance_value = doubleval(get_option(CodesWholesaleConst::NOTIFY_LOW_BALANCE_VALUE_OPTION_NAME));\n\n $items = $order->get_items();\n\n foreach ($items as $item_key => $item) {\n\n $pre_orders = 0;\n $product_id = $item[\"product_id\"];\n $qty = $item[\"qty\"];\n $cw_product_id = get_post_meta($product_id, CodesWholesaleConst::PRODUCT_CODESWHOLESALE_ID_PROP_NAME, true);\n\n $links = array();\n\n try {\n\n $cw_product = \\CodesWholesale\\Resource\\Product::get($cw_product_id);\n $codes = \\CodesWholesale\\Resource\\Order::createBatchOrder($cw_product, array('quantity' => $qty));\n\n foreach ($codes as $code) {\n\n if ($code->isImage()) {\n $attachments[] = \\CodesWholesale\\Util\\CodeImageWriter::write($code, CW()->plugin_path() . \"/temp\");\n }\n\n if ($code->isPreOrder()) {\n $pre_orders++;\n }\n\n $links[] = $code->getHref();\n }\n\n $keys[] = array(\n 'item' => $item,\n 'codes' => $codes\n );\n\n wc_add_order_item_meta($item_key, CodesWholesaleConst::ORDER_ITEM_LINKS_PROP_NAME, json_encode($links), true);\n\n } catch (\\CodesWholesale\\Resource\\ResourceError $e) {\n\n $this->support_resource_error($e, $order);\n $error = $e;\n break;\n\n } catch (Exception $e) {\n\n $this->support_error($e, $order);\n $error = $e;\n break;\n\n }\n\n if ($pre_orders > 0) {\n do_action(\"codeswholesale_preordered_codes\", array('item' => $item, 'count' => $pre_orders, 'order' => $order));\n $order->add_order_note(\n sprintf(\"Pre-ordered keys %d, for product: %s\", $pre_orders, $item['name'])\n );\n $pre_orders = 0;\n }\n }\n\n if (!$error) {\n\n $account = CW()->get_codes_wholesale_client()->getAccount();\n\n if ($balance_value >= doubleval($account->getCurrentBalance())) {\n do_action(\"codeswholesale_balance_to_low\", $account);\n }\n\n update_post_meta($order_id, CodesWholesaleConst::ORDER_FULL_FILLED_PARAM_NAME, CodesWholesaleOrderFullFilledStatus::FILLED);\n\n $email = new CW_Email_Customer_Completed_Order($order);\n $email->send_keys($keys, $attachments);\n\n $order->add_order_note(\"Game keys sent - done.\");\n\n } else {\n\n $order->add_order_note(\"Game keys weren't sent due to script errors: \" . $error->getMessage());\n\n }\n\n foreach ($attachments as $attachment) {\n if (file_exists($attachment)) {\n unlink($attachment);\n }\n }\n }", "public function send() {\r\n\t\t\t$this->sent = true;\r\n\t\t}", "public function confirmOrder()\n {\n $order = Order::query()->findOrFail(request()->input('order'));\n\n if ($order->orderStatus->slug !== OrderStatus::PROCESSED) {\n return redirect()->back();\n }\n\n $order->delivery_tracking = request()->input('delivery_tracking');\n\n $order->setStatusSent();\n\n $order->save();\n\n $order->user->notify(new OrderSent($order));\n\n return redirect(backpack_url('order?status=2')) //http://lucilevilaine.local/admin/order?status=2\n ->with('success', 'La commande a bien été confirmé');\n }", "function ywraq_get_message_after_request_quote_sending( $new_order ) {\n\n\t\tif ( get_option( 'ywraq_activate_thank_you_page' ) == 'yes' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$ywraq_message_after_sent_the_request = get_option( 'ywraq_message_after_sent_the_request' );\n\t\t$ywraq_message_to_view_details = get_option( 'ywraq_message_to_view_details' );\n\n\t\t$quote_number = apply_filters( 'ywraq_quote_number', $new_order );\n\t\tif ( is_user_logged_in() && ( get_option( 'ywraq_enable_link_details' ) == \"yes\" && get_option( 'ywraq_enable_order_creation', 'yes' ) == 'yes' ) ) {\n\t\t\t$message = sprintf( __( '%s %s <a href=\"%s\">#%s</a>', 'yith-woocommerce-request-a-quote' ), $ywraq_message_after_sent_the_request, $ywraq_message_to_view_details, YITH_YWRAQ_Order_Request()->get_view_order_url( $new_order ), $quote_number );\n\t\t} else {\n\t\t\t$message = $ywraq_message_after_sent_the_request;\n\t\t}\n\n\t\treturn $message;\n\t}", "function deliverOrder($orderNum)\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t $query = \" update check_tb set status = '2' where id='\".$orderNum.\"' \"; \n $res=$mysqli->query($query) or die (mysqli_error($mysqli));\n $mysqli->query(\"CREATE EVENT updateStatus\".$orderNum.\" ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE DO \n \tupdate check_tb set status = '1' where id='\".$orderNum.\"' ;\n \t\") or die (mysqli_error($mysqli));\n\t\t\tif($res)\n\t\t\t{\n\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t}", "function taqnyatSms($msgBody , $reciver)\n{\n $setting = \\App\\Setting::find(1);\n $bearer = $setting->bearer_token;\n $sender = $setting->sender_name;\n $taqnyt = new TaqnyatSms($bearer);\n\n $body = $msgBody;\n $recipients = $reciver;\n $message =$taqnyt->sendMsg($body, $recipients, $sender);\n// print $message;\n}", "public static function adminOrderMessageNotice(Order $order)\n {\n\n $notification = new Notification;\n //We check the status of the order if it's Active and add user_id\n //That means we will also add a client_id on notifications, which we have done\n if ($order->user) {\n $notification->user_id = $order->user->id;\n }\n if ($order->client_ID) {\n $notification->client_id = $order->client_ID;\n }\n $notification->order_id = $order->id;\n $notification->type = 'admin_order_message';\n $notification->message ='New Message';\n\n $notification->save();\n $admins = User::where('ni_admin', 1)->get();\n // foreach ($admins as $admin) {\n // # code...\n // $admin_email = $admin->email;\n // $admin_name = $admin->first_name;\n\n // Mail::queue('emails.admin_order_message',['order'=>$order, 'notification'=>$notification],function ($m) use ($admin_email, $admin_name, $order)\n // {\n // $m->from('[email protected]','ARA');\n\n // $m->to($admin_email, $admin_name)->subject('Academicresearch: You have a New message on order '.$order->order_no);\n // });\n\n // //We send an sms notification to the User for order Message;\n // // For the purpose of the text I save the admin as the user\n // $user = $admin;\n // $txt = 'There is a new Message on Order '.$order->order_no.' Kindly check the order to respond'.\"\\n\".' Academicresearchassistants.com';\n // $send_sms =self::sendSMSnotice($user,$txt);\n // }\n $admin_email = \"[email protected]\";\n $admin_name = \"Morgan\";\n Mail::queue('emails.admin_order_message',['order'=>$order, 'notification'=>$notification],function ($m) use ($admin_email, $admin_name, $order)\n {\n $m->from('[email protected]','ARA');\n\n $m->to($admin_email, $admin_name)->subject('Academicresearch: You have a New message on order '.$order->order_no);\n });\n\n }", "public function saveDataAftersaveAction() {\n $result = array();\n $error = true;\n $userId = Mage::helper('webpos/permission')->getCurrentUser();\n $isInvoice = Mage::helper('webpos/permission')->canManageOrder($userId, $this->getRequest()->getParam('order_id'));\n $orderId = $this->getRequest()->getParam('order_id');\n $order = Mage::getModel('sales/order')->load($orderId);\n $create_shipment = $this->getRequest()->getParam('create_shipment');\n $create_invoice = $this->getRequest()->getParam('create_invoice');\n $invoice_error = '';\n $invoice_message = '';\n $shipment_error = '';\n $shipment_message = '';\n\n\n if ($isInvoice == false) {\n $result['message'] = $this->__(\"Access denied! You don't have the permission to process this action.\");\n $result['error'] = true;\n $this->getResponse()->setBody(Zend_Json::encode($result));\n return;\n }\n //end vietdq\n if ($orderId && $order && $order->getId()) {\n $result['error'] = false;\n if ($create_invoice) {\n try {\n $invoice = $this->_initInvoice($orderId);\n if ($invoice) {\n if (!empty($data['capture_case'])) {\n $invoice->setRequestedCaptureCase($data['capture_case']);\n }\n $invoice->register();\n $invoice->setEmailSent(true);\n $invoice->getOrder()->setCustomerNoteNotify(true);\n $invoice->getOrder()->setIsInProcess(true);\n $transactionSave = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n\n $shipment = false;\n if ((int) $invoice->getOrder()->getForcedDoShipmentWithInvoice()) {\n $shipment = $this->_prepareShipment($invoice);\n if ($shipment) {\n $shipment->setEmailSent($invoice->getEmailSent());\n $transactionSave->addObject($shipment);\n }\n }\n\n $transactionSave->save();\n if (Mage::helper('webpos/customer')->isEnableAutoSendEmail('invoice')) {\n $template_invoice = Mage::helper('webpos/customer')->getWebposEmailTemplate('invoice');\n if (isset($template_invoice['guest']) && $template_invoice['guest'] != '') {\n Mage::app()->getStore()->setConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_EMAIL_GUEST_TEMPLATE, $template_invoice['guest']);\n }\n if (isset($template_invoice['customer']) && $template_invoice['customer'] != '') {\n Mage::app()->getStore()->setConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_EMAIL_TEMPLATE, $template_invoice['customer']);\n }\n $invoice->sendEmail($order->getCustomerEmail(), '');\n }\n $invoice_error = false;\n $invoice_message = $this->__('The invoice has been created.');\n } else {\n $invoice_error = true;\n $invoice_message = $this->__('The invoice is not exist');\n }\n } catch (Mage_Core_Exception $e) {\n $invoice_error = true;\n $invoice_message = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $invoice_error = true;\n $invoice_message = $this->__('Unable to save the invoice.');\n }\n }\n\n if ($create_shipment) {\n try {\n $shipment = $this->_initShipment($orderId);\n if ($shipment) {\n $shipment->register();\n $shipment->setEmailSent(true);\n $shipment->getOrder()->setCustomerNoteNotify(true);\n $this->_saveShipment($shipment);\n if (Mage::helper('webpos/customer')->isEnableAutoSendEmail('shipment')) {\n $shipment->sendEmail($order->getCustomerEmail());\n }\n $shipment_error = false;\n $shipment_message = $this->__('The shipment has been created.');\n } else {\n $shipment_error = true;\n $shipment_message = $this->__('An error occurred while creating shipment.');\n }\n } catch (Mage_Core_Exception $e) {\n $shipment_error = true;\n $shipment_message = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $shipment_error = true;\n $shipment_message = $this->__('An error occurred while creating shipment.');\n }\n }\n } else {\n $result['error'] = true;\n $result['message'] = $this->__('The order does not exist');\n $this->getResponse()->setBody(Zend_Json::encode($result));\n return;\n }\n\n $result['create_invoice'] = $create_invoice;\n $result['create_shipment'] = $create_shipment;\n if ($create_shipment && $create_invoice && !$invoice_error && !$shipment_error) {\n $result['apply_message'] = $this->__('The invoice and shipment have been created.');\n } else {\n if ($create_invoice) {\n // $result['create_invoice'] = $create_invoice;\n $result['invoice_error'] = $invoice_error;\n $result['invoice_message'] = $invoice_message;\n }\n if ($create_shipment) {\n // $result['create_shipment'] = $create_shipment;\n $result['shipment_error'] = $shipment_error;\n $result['shipment_message'] = $shipment_message;\n }\n }\n $result['createCustomerForm'] = $this->getLayout()->createBlock('webpos/customer')\n ->setTemplate('webpos/webpos/createcustomer.phtml')\n ->toHtml();\n $result['totals'] = $this->getLayout()->createBlock('webpos/cart_totals')\n ->setTemplate('webpos/webpos/review/totals.phtml')\n ->toHtml();\n $this->getResponse()->setBody(Zend_Json::encode($result));\n }", "public function onSendMail(OrderItemStateEvent $event) {\n $line = $event->getOrderItem();\n if ($line->get('field_estado')->value == 'enviado') {\n $order = $line->getOrder();\n if ($this->checkOrderSent($order)) {\n $commerce_order = new OrderController($order);\n /** @var User $proveedor */\n $proveedor = User::load($this->account->id());\n $lines = $commerce_order->getOrderItemsProvider($proveedor);\n\n $mail = Mail::load(Mail::TYPE_SENT_ORDER_PROVIDER);\n if ($mail instanceof Mail) {\n $subject = $mail->getSubject();\n $body = $mail->getBody();\n\n if ($customer = $order->getCustomer()) {\n $langcode = $customer->getPreferredLangcode();\n }\n else {\n $langcode = $this->languageManager->getDefaultLanguage()->getId();\n }\n\n $to = $order->getEmail();\n\n $profiles = $order->collectProfiles();\n $envio = '';\n if (isset($profiles['shipping']) && $profiles['shipping'] instanceof Profile) {\n $envio = [\n '#theme' => 'correo_informacion_envio',\n '#profile' => $profiles['shipping'],\n ];\n $envio = \\Drupal::service('renderer')->render($envio);\n }\n\n $token_service = \\Drupal::token();\n $subject = $token_service->replace($subject, [\n 'commerce_order' => $order\n ]);\n $body = $token_service->replace($body, [\n 'commerce_order' => $order\n ]);\n $body = str_replace('[datos_envio]', $envio, $body);\n\n $resumen = [\n '#theme' => 'correo_resumen_pedido_proveedor',\n '#order_items' => $lines,\n ];\n $resumen = \\Drupal::service('renderer')->render($resumen);\n $body = str_replace('[resumen]', $resumen, $body);\n $params = [\n 'from' => $order->getStore()->getEmail(),\n 'subject' => $subject,\n 'body' => ['#markup' => Markup::create($body)],\n ];\n\n $this->mailManager->mail('commerce', 'receipt', $to, $langcode, $params);\n\n \\Drupal::logger('correo')->info('Pedido #' . $order->id() . ' enviado a ' . $to);\n\n }\n }\n $this->checkOrderCompleted($order);\n }\n }", "public function sendsms(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n set_time_limit(3600);\n $redir=$this->CONT_ROOT.'?tab=sms';\n $form=$this->input->safe_post();\n $required=array('message');\n foreach ($required as $key) {\n if(!isset($form[$key]) || empty($form[$key])){\n $this->session->set_flashdata('error', 'Please enter message');\n redirect($redir);\n }\n }\n $mobile=$this->SETTINGS[$this->system_setting_m->_SMS_API_USERNAME];\n $apikey=$this->SETTINGS[$this->system_setting_m->_SMS_API_KEY];\n $mask=$this->SETTINGS[$this->system_setting_m->_SMS_MASK];\n if(!$this->is_valid_params($mobile,$apikey,$mask)){\n $this->session->set_flashdata('error', 'Invalid api details. Please update vendor api details first!!!');\n redirect($redir);\n }\n //////////////////////////////////////////////////////////////////\n $classes=$this->class_m->get_values_array('','name',array());\n $filter=array();\n\n if(isset($form['class_id']) && !empty($form['class_id'])){$filter['class_id']=$form['class_id'];}\n if(isset($form['group_id']) && !empty($form['group_id'])){$filter['group_id']=$form['group_id'];}\n if(isset($form['section_id']) && !empty($form['section_id'])){$filter['section_id']=$form['section_id'];}\n if(isset($form['student_id']) && !empty($form['student_id'])){$filter['student_id']=$form['student_id'];}\n $students=$this->student_m->get_rows($filter,array('select'=>'mid,student_id,name,mobile,father_name,roll_number,class_id,date'));\n\n if(count($students)<1){\n $this->session->set_flashdata('error', 'There are no students for selected criteria!!!');\n redirect($redir);\n }\n $message=htmlspecialchars_decode($form['message']);\n $i=0;\n $failed=0;\n $new_pass='';\n $ch=$this->open_curl();\n foreach ($students as $row) { \n $to=$row['mobile'];\n if(strlen($row['mobile'])>8){\n $i++; \n ///////////////////////////////////////\n if(strpos($message, \"{NEWPASSWORD}\") !== false){\n $new_pass=mt_rand(11111,99999);\n $this->student_m->save(array('password'=>$this->student_m->hash($new_pass)),$row['mid']);\n }\n ///////////////////////////////////////\n //conversion keys\n $key_vars=array(\n '{NAME}'=>$row['name'],\n '{ID}'=>$row['student_id'],\n '{ROLLNO}'=>$row['roll_number'],\n '{CLASS}'=>$classes[$row['class_id']],\n '{NEWPASSWORD}'=>$new_pass\n );\n ////////////////////////////////////////\n $sms=strtr($message, $key_vars);\n $this->send_message($ch,$mobile,$apikey,$mask,$to,$sms);\n }else{\n $failed++;\n } \n }\n $this->close_curl($ch);\n ////////////////////////////////////////////////////////////////////////////////\n $this->session->set_flashdata('success', 'Message sent to '.$i.' students and failed for '.$failed.' students.');\n redirect($redir);\n }", "public function complete($token = null)\n\t{\n\t\t/*Loads the Order data model */\n\t\t$this->load->model('order_model');\n\n\t\t/* Get the Order ID for further references */\n\t\t$orderId = $this->order_model->getRealID($token);\n\n\t\t/* Sets the order as complete */\n $data = array('order_status' => 1);\n\t\t$this->order_model->update($orderId, $data);\n\n\t\t/* Get the Order Information to prepare the Email */\n\t\t$orderInfo = $this->order_model->request($orderId);\n\n\t\t/* Prepares the email to be sent*/\n\t\t//$this->email_notify($orderInfo->order_email);\n\n /* Cleans the CI Shopping Cart*/\n $this->cart->destroy();\n\n\t\theader(\"Location: \" . base_url() . \"order/$token\");\n\t}", "function resend_invoice($details) {\n\t\t\t\t$name = $details[0]->ai_first_name . \" \" . $details[0]->ai_last_name;\n\t\t\t\t$invoiceid = $details[0]->booking_id;\n\t\t\t\t$refno = $details[0]->booking_ref_no;\n\t\t\t\t$sendto = $details[0]->accounts_email;\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear \" . $name . \",<br>\";\n\t\t\t\t$message .= \"You may review your invoice by visiting at: <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Invoice');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function actionSend(): void\n {\n $prizes = UserPrize::find()->alias('user_prize')->JoinWith(['prize','user'])\n ->where([\n 'user_prize.status' => UserPrize::STATUS_RECEIVED,\n 'prize_type' => Prize::TYPE_MONEY,\n ])\n ->limit(self::DEFAULT_NUMBER)\n ->all();\n\n if ($prizes) {\n $this->stdout(\\Yii::t('app', 'Sending {prizes} prize(s)...' . PHP_EOL,\n ['prizes' => count($prizes)]), Console::FG_GREEN);\n } else {\n $this->stdout(\\Yii::t('app', 'Nothing to send!' . PHP_EOL), Console::FG_YELLOW);\n }\n\n foreach ($prizes as $prize) {\n\n $prize->status = UserPrize::STATUS_SENT;\n $prize->save(false);\n\n $this->stdout(\\Yii::t('app', 'Sending {money} money to user {user}...', [\n 'money' =>$prize->quantity,\n 'user' => $prize->user->email\n ]));\n\n\n $this->stdout(\\Yii::t('app', ' [SENT]' . PHP_EOL), Console::FG_GREEN);\n }\n }", "function sendOrderMail(&$do){\n if (isset($do['oCUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $lang_save = XShell::getLangUser();\n $_REQUEST['LANG_USER']=$do['oCUSTOMERLANG']->raw;\n $_REQUEST['LANG_DATA']=$do['oCUSTOMERLANG']->raw;\n $foo = XShell::getLangUser();\n $foo = XShell::getLangData(NULL, true);\n }\n\n $r = $this->displayOrder($do['oid']);\n\n $xt = new XTemplate('file:'.$GLOBALS['USER_TEMPLATES_DIR'].$this->defaultStepTemplates['recepisse']);\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n if (isset($GLOBALS['eplmailscolors'])){\n $colors = $GLOBALS['eplmailscolors'];\n } else {\n $colors = array();\n }\n $tpldata = array('br'=>$r, 'colors'=>$colors);\n\n $content=$xt->parse($tpldata,$r3,NULL);\n\n $subject = $GLOBALS['XSHELL']->labels->getCustomSysLabel('titre_mail_commande');\n if (empty($subject))\n $subject = '[Votre commande]';\n\n $subject = XIni::get('societe').' '.$subject;\n\n // mail et nom du client commande\n $to = array('email'=>$do['oCUSTOMEREMAIL']->raw, 'name'=>$do['oCUSTOMERNOM']->raw. ' '. $do['oCUSTOMERPRENOM']->raw);\n\n $this->modcustomer->sendMailTo($content, $subject, NULL, $to);\n\n if (isset($do['CUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $_REQUEST['LANG_USER'] = $lang_save;\n $_REQUEST['LANG_DATA'] = $lang_save;\n $foo = XShell::getLangUser(NULL, true);\n $foo = XShell::getLangData(NULL, true);\n }\n }", "public function email_buyer_service_purchase(){\n\t\t$data = array('workstream'=>$this,'from' => NOTIFICATION_EMAIL,'from_name' => NOTIFICATION_NAME,'to' =>$this->buyer->email,'fname' =>$this->buyer->fname,'sender_name'=> $this->seller->fname,'subject' => $this->buyer->fname.' your service purchase order is successful.');\n\t\tMail::send('emails.workstream/buyer_service_purchase', $data, function($message) use ($data)\n\t\t{\n\t\t $message->to($data['to'], $data['fname'])->subject($data['subject']);\n\t\t\t$message->from($data['from'],$data['from_name']);\n\t\t});\n\t\treturn TRUE;\n\t\t\n\t}", "function sendnow() {\n \t\t\n \t\tset_time_limit(0);\n \t\tini_set('memory_limit', '256M');\n \t\t\n \t\t$this->checkAccess('bulksms');\n \t\t\n \t\tif(isset($this->data)) {\n \t\t\t\n \t\t\tif(BULK_SMS_SERVER_DOWN) {\n \t\t\t\t$error[] = UNAVAILABLE_MESSAGE;\n \t\t\t}\n\n\t\t\tif($this->data['type'] && NINE_TO_NINE_ACTIVATED) {\n\t \t\t\t$error[] = NINE_TO_NINE_ACTIVATED_MESSAGE;\n\t \t\t}\t\t\t\n \t\t\t\n \t\t\t// Sender ID is optional\n \t\t\tif(isset($this->data['bulk_senderid_id'])) $bulk_senderid_id = filter_var(trim($this->data['bulk_senderid_id']), FILTER_VALIDATE_INT);\n \t\t\telse $bulk_senderid_id = 0;\n \t\t\t\n \t\t\t$bulk_group_id = filter_var(trim($this->data['bulk_group_id']), FILTER_VALIDATE_INT);\n \t\t\t$bulk_tag_id = filter_var(trim($this->data['bulk_tag_id']), FILTER_VALIDATE_INT);\n \t\t\t$message = urldecode(trim($this->data['message']));\n \t\t\t$number = filter_var(trim($this->data['number']), FILTER_SANITIZE_STRING);\n \t\t\t$day = filter_var(trim($this->data['day']), FILTER_VALIDATE_INT);\n \t\t\t$month = filter_var(trim($this->data['month']), FILTER_VALIDATE_INT);\n \t\t\t$year = filter_var(trim($this->data['year']), FILTER_VALIDATE_INT);\n \t\t\t$hours = filter_var(trim($this->data['hours']), FILTER_VALIDATE_INT);\n \t\t\t$minutes = filter_var(trim($this->data['minutes']), FILTER_VALIDATE_INT);\n \t\t\t\n \t\t\t/*\tCorrect Encoding\t*/\n \t\t\t$message = iconv('UTF-8', 'ASCII//TRANSLIT', $message);\n \t\t\t\n \t\t\tif(empty($message)) $error[] = 'Message Cannot Be Empty';\n \t\t\t//if(empty($bulk_group_id)) $error[] = 'Invalid Group';\n \t\t\t//if(empty($bulk_tag_id)) $error[] = 'Invalid Tag';\n \t\t\t\n \t\t\t$n = 0;\n \t\t\tif(empty($number) && empty($bulk_group_id)) $error[] = 'Enter Mobile Numbers or select a Group';\n \t\t\telse {\n \t\t\t\tif(!empty($number)) {\n \t\t\t\t\t$n = explode(',', $number);\n \t\t\t\t\t$n = array_filter($n);\n \t\t\t\t\tforeach($n as $k => $v) {\n \t\t\t\t\t\t$v = trim($v);\n \t\t\t\t\t\tif(!$this->checkNumber($v)) $inv_num[] = $v;\n \t\t\t\t\t\t$new_n[] = $v; \n \t\t\t\t\t}\n \t\t\t\t\t$n = $new_n;\n \t\t\t\t\tif(isset($inv_num)) $error[] = 'Invalid Mobile Number(s) '.implode(',', $inv_num);\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(!empty($bulk_group_id) && !$this->checkBulkGroupId($bulk_group_id)) $error[] = 'Invalid Group ID';\n\n \t\t\t}\n \t\t\t\n \t\t\tif(!empty($bulk_senderid_id) && !$this->checkBulkSenderId($bulk_senderid_id)) $error[] = 'Invalid Sender ID';\n \t\t\t//if(!$this->checkBulkGroupId($bulk_group_id)) $error[] = 'Invalid Group ID';\n \t\t\tif(!$this->checkBulkTagId($bulk_tag_id)) $error[] = 'Invalid Tag ID';\n \t\t\t\n \t\t\t//check if the group empty or not\n \t\t\tif(!empty($bulk_group_id)) {\n\t \t\t\t$c['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t$c['BulkAddressbook.status'] = '0';\n\t \t\t\tif($this->BulkAddressbook->find('count', array('conditions'=>$c)) == '0') {\n\t \t\t\t\t$error[] = 'Group is empty';\n\t \t\t\t} else {\n \t\t\t\t\t\n\t \t\t\t\t// Get mobile numbers\n\t \t\t\t\tif(isset($this->data['mobile_list'])) $mobile_list = $this->data['mobile_list'];\n\t \t\t\t\telse {\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t\t$mc['fields'] = array('BulkAddressbook.id');\n\t \t\t\t\t\t$mobile_list = $this->BulkAddressbook->find('list', $mc);\n\t \t\t\t\t}\n\t \t\t\t\t\n\t \t\t\t\t//SEND NOW\n \t\t\t\t\tif($this->data['type']) {\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.id'] = $mobile_list;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t\t$mc['fields'] = array('BulkAddressbook.mobile');\n\t \t\t\t\t\t$mobile_list = $this->BulkAddressbook->find('list', $mc);\n\t \t\t\t\t\t\n\t \t\t\t\t\tunset($new_n);\n\t \t\t\t\t\tforeach($mobile_list as $k => $v) {\n\t \t\t\t\t\t\t$new_n[] = $v; \n\t \t\t\t\t\t}\n\t \t\t\t\t\t$n = !empty($n) ? array_merge($n, $new_n) : $new_n;\n \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}\n\t \t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//SEND NOW\n \t\t\tif($this->data['type']) {\n \t\t\t\t\n \t\t\t\tif(!isset($error)) {\n \t\t\t\t\t\n \t\t\t\t\tif(strlen($message) > MAX_CHARS)\n \t\t\t\t\t\t$message = substr($message, 0, MAX_CHARS);\n \t\t\t\t\t\n \t\t\t\t\t//get sms vendor details\n\t\t \t\t\t$this->getBulkSmsVendor($this->Session->read('user_id'));\n\t\t \t\t\t//pr($this->sms_vendor_details);\n \t\t\t\t\t\n \t\t\t\t\tunset($v);\n \t\t\t\t\t$v['message'] = $message;\n \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n \t\t\t\t\t$v['sms_count'] = $this->sms_count($message);\n \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(', ', $n) : '0';\n \t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t$v['bulk_tag_id'] = $bulk_tag_id;\n \t\t\t\t\t$v['ip'] = ip2long($_SERVER['REMOTE_ADDR']);\n \t\t\t\t\t$v['sms_vendor_id'] = $this->sms_vendor_id;\n \t\t\t\t\t$this->BulkSmsLog->save($v);\n \t\t\t\t\t$bulk_sms_log_lid = $this->BulkSmsLog->getLastInsertId();\n \t\t\t\t\t\n \t\t\t\t\tif(count($n) < BULK_SMS_CLI_DECIDER) {\n \t\t\t\t\t\t\n\t\t\t\t\t\t//SEND SMS\n \t\t\t\t\t\t$this->_sendBulkMessage($bulk_group_id, $bulk_senderid_id, $message, $bulk_sms_log_lid, $this->Session->read('user_id'), $n, false, $this->sms_vendor_id);\n \t\t\t\t\t\n \t\t\t\t\t} else {\n\n \t\t\t\t\t\t//SAVE SMS IN TEMP TABLE\n\t \t\t\t\t\tunset($v);\n\t \t\t\t\t\t$v['message'] = $message;\n\t \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(', ', $n) : '0';\n\t \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n\t\t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t\t$v['bulk_sms_log_id'] = $bulk_sms_log_lid;\n \t\t\t\t\t\t$v['sms_vendor_id'] = $this->sms_vendor_id;\n \t\t\t\t\t\t$this->BulkSmsCli->save($v);\n\t \t\t\t\t\t$lastinsertid = $this->BulkSmsCli->getLastInsertId();\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\t//CALL CLI TO SEND SMS\n \t\t\t\t\t\t$path = \"php \" . WWW_ROOT . \"cron_dispatcher.php /bulksms/send_using_cli/\".$lastinsertid;\n \t\t\t\t\t\t$outputfile = \"/tmp/output.cli.\".$lastinsertid;\n \t\t\t\t\t\t$pidfile = \"/tmp/pid.cli.\".$lastinsertid;\n \t\t\t\t\t\texec(sprintf(\"%s > %s 2>&1 & echo $! >> %s\", $path, $outputfile, $pidfile));\n \t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t//GET GROUP NAME\n \t\t\t\t\t$groupname = $number = '';\n \t\t\t\t\tif(!empty($bulk_group_id)) {\n\t \t\t\t\t\t$this->BulkGroup->id = $bulk_group_id;\n\t \t\t\t\t\t$groupname = '<br/>Contact(s) from '.$this->BulkGroup->field('name') . ' Group';\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tif(!empty($n)) {\n \t\t\t\t\t\t$number = '<br/>Mobile Numbers(s) '.implode(', ', $n);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t$return_data = 'Message Successfully Send To:'.$groupname.$number;\n\t\t\t \t\tif(strlen($return_data) > 250) $return_data = substr($return_data, 0, 200).'..';\n\t\t\t \t\t\n\t\t\t \t\t$return_data .= '<br/><a href=\"/bulksms/showdetailedreport/'.$bulk_sms_log_lid.'\">View Detailed Delivery Report</a>';\n\t\t\t \t\t\n \t\t\t\t\t$this->Session->write('success', $return_data);\n \t\t\t\t\t$this->redirect('/bulksms/sendnow');\n \t\t\t\t\texit;\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\t$this->set('error', $error);\n \t\t\t\t\t$this->set('message', $message);\n \t\t\t\t\t$this->set('number', $number);\n \t\t\t\t\t$this->set('day', $day);\n \t\t\t\t\t$this->set('month', $month);\n \t\t\t\t\t$this->set('year', $year);\n \t\t\t\t\t$this->set('hour', $hours);\n \t\t\t\t\t$this->set('minutes', $minutes);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//SCHEDULE\t\n \t\t\t} else {\n \t\t\t\t\n \t\t\t\t/*if($day == '' || $month == '' || $year == '' || $hours == '' || $minutes == '') { \n \t\t\t\t\t$error[] = 'Invalid Date Entered';\n \t\t\t\t} else {*/\n \t\t\t\t\t$date = date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year));\n \t\t\t\t\tif($date < date('Y-m-d H:i:s')) $error[] = 'Please select a future date';\n \t\t\t\t//}\n \t\t\t\t\n\t\t\t\tif(!($hours > '08' && $hours < '21')) {\n \t\t\t\t\t$error[] = NINE_TO_NINE_ACTIVATED_MESSAGE;\n \t\t\t\t}\n\n \t\t\t\tif(isset($mobile_list) && !empty($mobile_list)) {\n\t \t\t\t\tunset($c);\n\t \t\t\t\tif(count($mobile_list) == 1) $mobile_list = $mobile_list['0'];\n\t \t\t\t\t$c['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t$c['conditions']['BulkAddressbook.id NOT'] = $mobile_list;\n\t \t\t\t\t$c['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t$c['fields'] = array('BulkAddressbook.id');\n\t \t\t\t\t$not_included = $this->BulkAddressbook->find('list', $c);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(!isset($error)) {\n \t\t\t\t\t\n \t\t\t\t\t$date = date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year));\n \t\t\t\t\t$udate = date('jS M, Y g:i a', strtotime($date));\n \t\t\t\t\t\n \t\t\t\t\tunset($v);\n \t\t\t\t\t$v['message'] = $message;\n \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(',', $n) : '0';\n \t\t\t\t\t$v['not_included'] = !empty($not_included) ? implode(',', $not_included) : '0';\n \t\t\t\t\t$v['scheduledate'] = $date;\n \t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t$v['bulk_tag_id'] = $bulk_tag_id;\n \t\t\t\t\t$v['ip'] = ip2long($_SERVER['REMOTE_ADDR']);\n \t\t\t\t\t$this->BulkSmsSchedule->save($v);\n \t\t\t\t\t\n \t\t\t\t\t$this->Session->write('success', 'Message Successfully Scheduled on '.$udate);\n \t\t\t\t\t$this->redirect('/bulksms/sendnow');\n \t\t\t\t\texit;\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\t$this->set('error', $error);\n \t\t\t\t\t$this->set('message', $message);\n \t\t\t\t\t$this->set('number', $number);\n \t\t\t\t\t$this->set('day', $day);\n \t\t\t\t\t$this->set('month', $month);\n \t\t\t\t\t$this->set('year', $year);\n \t\t\t\t\t$this->set('hour', $hours);\n \t\t\t\t\t$this->set('minutes', $minutes);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t\tunset($cond);\n \t\t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$group = $this->BulkGroup->find('list', $cond);\n\t \t$groupname = '<option value=\"0\">Select Group</option>';\n\t \t\n\t \tforeach($group as $key => $value) {\n\t \t\t$groupname .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('groupname', $groupname);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['publish'] = '1';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$sender = $this->BulkSenderid->find('list', $cond);\n\t \t$senderid = '';\n\t \t\n\t \tforeach($sender as $key => $value) {\n\t \t\t$senderid .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('senderid', $senderid);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$data = $this->BulkSmsTag->find('list', $cond);\n\t \t$tag = '';\n\t \t\n\t \tforeach($data as $key => $value) {\n\t \t\t$tag .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('tag', $tag);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['BulkAccount.status'] = '0';\n\t \t$cond['conditions']['BulkAccount.bulk_user_id'] = $this->Session->read('user_id');\n\t \t$quantity = $this->BulkAccount->field('BulkAccount.quantity', $cond['conditions']);\n\t \t$this->set('quantity', $quantity);\n\t \t\n \t\t$this->layout = 'bulksms';\n \t\t$this->set('tab', array('2'));\n\t\t//$this->getFeedback();\n\t\t\n \t\tif($this->Session->check('success')) {\n \t\t\t$this->set('success', $this->Session->read('success'));\n \t\t\t$this->Session->delete('success');\n \t\t}\n \n \t}", "function send_sms($phone, $msg,$acct) {\n $message = urlencode($msg);\n $user=\"borngreat\";\n $password=\"3635\";\n\n \n$sender2=\"+2348084733894\";\n\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender2&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n\n $sender3=\"+2348034311177\";\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender3&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n\n $sender4=\"+2348033954892\";\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender4&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n}", "public function hookorderConfirmation($params)\n {\n // For order confirmation\n $isActivate = $this->isRulesetActive('order_confirmation');\n if ($isActivate != null && $isActivate != '' && $this->smsAPI != null && $this->smsAPI != '') {\n $param = $params['objOrder'];\n $order = new Order((int)$param->id);\n \n if ($order) {\n $address = new Address((int)$order->id_address_delivery);\n $legendstemp = $this->replaceOrderLegends(\n $isActivate[0]['template'],\n $order,\n $address\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $address->phone_mobile\n );\n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog('Confirmed', $legendstemp, $address->phone_mobile);\n $productArray = $order->getProducts();\n if ($productArray) {\n foreach ($productArray as $product) {\n $this->productOutofOrderProcess($product['product_id']);\n }\n }\n }\n }\n }", "function send()\n {\n try{\n $client = new Client();\n $response = $client->request('POST', $this->base_url_SendSMS, [\n 'form_params' => [\n 'Userid' => $this->username,\n 'pwd' => $this->password,\n 'APIKEY' => $this->apikey,\n 'MSG' => $this->msgtext,\n 'FROM' => $this->from,\n 'To' => $this->to,\n ]\n ]);\n\n echo $response->getStatusCode(); // 200\n $response->getReasonPhrase(); // OK\n $response->getProtocolVersion(); // 1.1\n }\n catch(\\GuzzleHttp\\Exception\\ClientException $e){\n echo $e->getMessage();\n }\n catch(ErrorException $e){\n echo $e->getMessage();\n }\n }", "function reply($id, $mobile, $message, $cost = 0);", "public function processSMS(Request $request)\n {\n \t$countAfterCommas = substr_count($request->recipient, \",\");\n \t$total = $countAfterCommas + 1;\n\n \t$amount = $total * 3.00;\n\n \t$title = 'SMS'. \" to \" . $total .\" Numbers for N\".$amount.'.00' ;\n\n \t// check users balance\n if(Auth::user()->wallet->skill_coin_balance < $amount){\n return redirect()->back()->with('error', 'you have an insufficent balance to make transactions');\n } \n\n $api_provider = ServiceSetting::where('code', 'sms')->where('type', 'sms')->first();\n\n if ($api_provider === NULL){\n return redirect()->back()->with('error', 'Service is unavailable at the moment. Please Try again Later');\n }\n if ($api_provider->api_provider == \"skillpyersms.com\"){\n\n $response = $this->sendSmsFromApi($request);\n\n if ($response['msg_id'] != NULL){\n\n \t// since no commission just deduct\n $amount_paid = $amount;\n\n // find the user\n $find_wallet = Wallet::where('user_id', Auth::id())->first();\n\n // deduct wallet\n $find_wallet->skill_coin_balance -= $amount_paid;\n\n // foreach ($numbers as $number) {\n\t\t // $check_number = PhoneBook::where('number', $number)->first();\n\t\t // if($check_number === null){\n\t\t // $new_number = new Tag;\n\t\t // $new_number->number = $number;\n\t\t // $new_number->user_id = Auth::id();\n\t\t // $new_number->save();\n\t\t // }else{\n\t\t // // dd('good');\n\t\t // $advert->tags()->attach($check_tag->id);\n\t\t // }\n\t\t // }\n \n\n $transaction = new SmsTextTransaction;\n\n $transaction->title = $title;\n $transaction->receiver = $request->recipient;\n $transaction->network = 'any';\n $transaction->amount = $amount;\n $transaction->amount_paid = $amount_paid;\n $transaction->commission_applied = 0;\n $transaction->transaction_id = $response['msg_id'];\n $transaction->email = 'NULL';\n $transaction->phone = 'NULL';\n $transaction->vtu_type = 'SMS';\n $transaction->vtu_code = 'SMS';\n $transaction->api_used = $api_provider->api_provider;\n $transaction->api_response = $response['msg_id'];\n $transaction->status = 'Fulfilled';\n $transaction->user_id = Auth::id();\n\n $transaction->save();\n $find_wallet->save();\n\n $walletReport = new WalletTransaction;\n\n $walletReport->title = $title;\n $walletReport->identifier = $transaction->identifier;\n $walletReport->user_id = Auth::id();\n $walletReport->details = $title;\n $walletReport->amount = $amount_paid;\n $walletReport->amount_paid = $amount_paid;\n $walletReport->category = 'SMS';\n $walletReport->remarks = 'successful';\n $walletReport->transaction_type = 'Debit';\n $walletReport->balance = $find_wallet->skill_coin_balance;\n\n $walletReport->save();\n \n if($amount_paid >= 1000){\n $this->getReward($amount_paid, $transaction->identifier);\n }\n\n return redirect()->back()->with('success', 'Your transaction was successful');\n \n }else{\n $transaction = new SMSTextingTransaction;\n $transaction->title = $title;\n $transaction->receiver = $request->recipient;\n $transaction->network = 'any';\n $transaction->amount = $amount;\n $transaction->amount_paid = $amount_paid;\n $transaction->commission_applied = 0;\n $transaction->api_response = $response['msg_id'];\n $transaction->email = 'NULL';\n $transaction->phone = \"NULL\";\n $transaction->vtu_type = 'SMS';\n $transaction->vtu_code = 'SMS';\n $transaction->api_used = $api_provider->api_provider;\n $transaction->api_response = $response['msg_id'];\n $transaction->status = 'Failed';\n $transaction->user_id = Auth::id();\n \n $transaction->save();\n return redirect()->back()->with('error', 'Sorry cannot complete transaction at the moment. Please try again later!!');\n }\n }\n\n }", "public function sentSms()\n {\n if ($this->shouldDisableApiCall()) {\n return;\n }\n\n $apiKey = $this->config->getApiKey();\n $accountId = $this->config->getAccountId();\n\n $data = $this->thinqMessage->getMessage();\n\n $authorization = base64_encode($apiKey);\n $url = \"https://api.thinq.com/account/{$accountId}/product/origination/sms/send\";\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n \"Authorization: Basic {$authorization}\",\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen(json_encode($data)))\n );\n\n $result = curl_exec($ch);\n\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if($httpcode >= 400) {\n throw new Exception($result);\n }\n }", "public function sendEvent() {\n $objectCollection = Mage::getModel('radial_core/retryQueue')->getCollection()->setPageSize(100);\n\t$order = Mage::getModel('sales/order');\n\n\t$pages = $objectCollection->getLastPageNumber();\n $currentPage = 1;\n\n do\n {\n\t\t$objectCollection->setCurPage($currentPage);\n $objectCollection->load();\n\n \tforeach( $objectCollection as $object )\n \t{\n\t\t\t$this->payloadXml = null;\n \t$apiConfig = null;\n \t$this->_request = $this->_getNewSdkInstance('Radial_RiskService_Sdk_Request');\n \t$this->_OCrequest = $this->_getNewSdkInstance('Radial_RiskService_Sdk_OrderConfirmationRequest');\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( $object->getDeliveryStatus() < $this->_config->getMaxRetries())\n\t\t\t\t{\n\t\t\t\t\tif( strcmp($object->getEventName(), \"order_confirmation_request\") === 0)\n \t\t\t{\n \t\t\t$this->_payloadXml = $this->_OCrequest->deserialize($object->getMessageContent());\n \t\t\t$apiConfig = $this->_setupApiConfig($this->_payloadXml, $this->_getNewOCREmptyResponse());\n \t\t\t} else {\n \t\t\t$this->_payloadXml = $this->_request->deserialize($object->getMessageContent());\n \t\t\t$apiConfig = $this->_setupApiConfig($this->_payloadXml, $this->_getNewEmptyResponse());\n \t\t\t}\n\n \t\t\t\t$response = $this->_sendRequest($this->_getApi($apiConfig), $order, $object->getMessageContent(), 1 );\n\t\t\t\t\tif( $response )\n\t\t\t\t\t{\n\t\t\t\t\t\t$object->delete();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//Queue up for retry\n \t\t\tif (strlen($object->getMessageContent()) > 0) {\n \t\t\tif( $object->getDeliveryStatus() < $this->_config->getMaxRetries())\n \t\t\t{\n \t\t\t$previousStatus = $object->getDeliveryStatus();\n \t\t\t$object->setDeliveryStatus($previousStatus+1);\n \t\t\t$object->save();\n \t\t\t} else {\n \t\t\t$logMessage = sprintf('[%s] Error Transmitting Message (MAX RETRIES) - Body: %s', __CLASS__, $e->getMessage());\n \t \t\tMage::log($logMessage, Zend_Log::ERR);\n\t\n \t \t\t\t$fraudEmailA = explode(',', $this->_config->getFraudEmail());\n\n \t\t\t\t\tif( !empty($fraudEmailA) )\n \t\t\t\t\t{\n \t\t\t\t\tforeach( $fraudEmailA as $fraudEmail )\n \t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$fraudName = Mage::app()->getStore()->getName() . ' - ' . 'Fraud Admin';\n\n \t\t\t\t\t\t$emailTemplate = Mage::getModel('core/email_template')->loadDefault('custom_email_template1');\n\t\n \t \t\t\t\t\t//Create an array of variables to assign to template\n \t \t\t\t\t\t$emailTemplateVariables = array();\n \t \t\t\t\t\t$emailTemplateVariables['myvar1'] = gmdate(\"Y-m-d\\TH:i:s\\Z\");\n \t\t\t\t\t\t$emailTemplateVariables['myvar2'] = $e->getMessage();\n\t\t\t\t\t\t\t\t\t\t$emailTemplateVariables['myvar3'] = $e->getTraceAsString();\n\t\t\t\t\t\t\t\t\t\t$emailTemplateVariables['myvar4'] = htmlspecialchars($object->getMessageContent());\n\n \t\t\t\t\t\t$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);\n\t\n\t\t\t\t\t\t\t\t\t\t//Sending E-Mail to Fraud Admin Email.\n\t\t\t\t\t\t\t\t\t\t$mail = Mage::getModel('core/email')\n \t\t\t\t\t\t\t\t\t\t\t->setToName($fraudName)\n \t\t\t\t\t\t\t\t\t\t\t->setToEmail($fraudEmail)\n \t\t\t\t\t\t\t\t\t\t\t->setBody($processedTemplate)\n \t\t\t\t\t\t\t\t\t\t\t->setSubject('Fraud Exception Report From: '. __CLASS__ . ' on ' . gmdate(\"Y-m-d\\TH:i:s\\Z\") . ' UTC')\n \t\t\t\t\t\t\t\t\t\t\t->setFromEmail(Mage::getStoreConfig('trans_email/ident_general/email'))\n \t\t\t\t\t\t\t\t\t\t\t->setFromName($fraudName)\n \t\t\t\t\t\t\t\t\t\t\t->setType('html');\n \t\t\t\t\t\t\t\t\t\ttry{\n \t\t\t\t\t\t\t\t\t\t\t//Confimation E-Mail Send\n \t\t\t\t\t\t\t\t\t\t\t$mail->send();\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\tcatch(Exception $error)\n \t\t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\t\t$logMessage = sprintf('[%s] Error Sending Email: %s', __CLASS__, $error->getMessage());\n \t\t\t\t\t\t\t\tMage::log($logMessage, Zend_Log::ERR);\n\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n \t\t\t}\n \t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch( Exception $e ) {\n\t\t\t \t$logMessage = sprintf('[%s] Error JOB Retransmission: %s', __CLASS__, $e->getMessage());\n \tMage::log($logMessage, Zend_Log::ERR);\n\n \t$fraudEmailA = explode(',', $this->_config->getFraudEmail());\n\n \tif( !empty($fraudEmailA) )\n \t{\n \tforeach( $fraudEmailA as $fraudEmail )\n \t{\n\t\t\t\t\t\t$fraudName = Mage::app()->getStore()->getName() . ' - ' . 'Fraud Admin';\n\n \t\t$emailTemplate = Mage::getModel('core/email_template')->loadDefault('custom_email_template1');\n\n \t\t//Create an array of variables to assign to template\n \t\t$emailTemplateVariables = array();\n \t\t$emailTemplateVariables['myvar1'] = gmdate(\"Y-m-d\\TH:i:s\\Z\");\n \t\t$emailTemplateVariables['myvar2'] = $e->getMessage();\n\t\t\t\t\t\t$emailTemplateVariables['myvar3'] = $e->getTraceAsString();\n\t\t\t\t\t\t$emailTemplateVariables['myvar4'] = htmlspecialchars($object->getMessageContent());\n\n \t\t$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);\n \t\t\t//Sending E-Mail to Fraud Admin Email.\n \t\t$mail = Mage::getModel('core/email')\n ->setToName($fraudName)\n ->setToEmail($fraudEmail)\n ->setBody($processedTemplate)\n ->setSubject('Fraud Exception Report From: '. __CLASS__ . ' on ' . gmdate(\"Y-m-d\\TH:i:s\\Z\") . ' UTC')\n ->setFromEmail(Mage::getStoreConfig('trans_email/ident_general/email'))\n ->setFromName($fraudName)\n ->setType('html');\n \t\ttry { \n \t \t\t//Confimation E-Mail Send\n \t \t\t$mail->send();\n \t\t}\n \t\tcatch(Exception $error)\n \t\t{\n \t\t\t$logMessage = sprintf('[%s] Error Sending Email: %s', __CLASS__, $error->getMessage());\n \t\tMage::log($logMessage, Zend_Log::ERR);\n \t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}\n\n\t\t$currentPage++;\n $objectCollection->clear();\n } while ($currentPage <= $pages);\n }", "public function complete( $order ){\n\t\t$order->complete();\n\t}", "public function sendOrdersInComming()\n {\n $subject = '[QS-IMS MAILER] DANH SÁCH ĐIỀU ĐỘNG QUÁ HẠN ÁP DỤNG ĐIỀU ĐỘNG';\n $mail = array();\n $sMail = '';\n $to = array();\n $i = 0;\n\n $sql = sprintf('\n\t\t\t\t SELECT\n\t\t\t\t qsiforms.*,\n\t\t\t\t ddtb.*,\n\t\t\t\t qsusers.*,\n \t\t ODanhSachNhanVien.Email AS Email2\n\t\t\t\t FROM OLichThietBi AS ddtb\n\t\t INNER JOIN qsiforms ON qsiforms.IFID = ddtb.IFID_M706\n\t\t\t\t INNER JOIN qsusers ON qsusers.UID = qsiforms.UID\n\t\t INNER JOIN ODanhSachNhanVien ON qsusers.UID = ODanhSachNhanVien.Ref_TenTruyCap\n\t\t\t\t WHERE qsiforms.Status = 1 and qsusers.isActive = 1\n\t\t and ddtb.NgayBatDau <= %1$s\n\t\t\t\t ', $this->_db->quote(date('Y-m-d')));\n $dataSql = $this->_db->fetchAll($sql);\n\n if(count($dataSql) && count($this->to))\n {\n foreach($dataSql as $item)\n {\n if(!isset($to[$item->EMail]))\n {\n $to[$item->EMail] = $item->UserName;\n }\n\n if(!isset($mail[$item->EMail]))\n {\n $mail[$item->EMail] = array();\n }\n\n $mail[$item->EMail][$i]['SoPhieu'] = $item->SoPhieu;\n $mail[$item->EMail][$i]['NgayBatDau'] = $item->NgayBatDau;\n $mail[$item->EMail][$i]['NgayKetThuc'] = $item->NgayKetThuc;\n $mail[$item->EMail][$i]['DeptID'] = $item->DeptID;\n $mail[$item->EMail][$i]['IFID'] = $item->IFID_M706;\n $i++;\n }\n\n if(count($mail))\n {\n foreach($to as $email=>$user)\n {\n if(isset($mail[$email]))\n {\n $sMail = '';\n $sMail .= '<h1>DANH SÁCH ĐIỀU ĐỘNG QUÁ HẠN ÁP DỤNG ĐIỀU ĐỘNG</h1>';\n $sMail .= '<br/>';\n $sMail .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\">';\n $sMail .= '<tr>';\n $sMail .= '<th> SỐ PHIẾU </th>';\n $sMail .= '<th> NGÀY BẮT ĐẦU </th>';\n $sMail .= '<th> NGÀY KẾT THÚC </th>';\n $sMail .= '</tr>';\n\n foreach($mail[$email] as $item)\n {\n $sMail .= '<tr>';\n $sMail .= '<td><a target=\"_blank\" href=\"http://'.$this->domain.'/user/form/edit?ifid='.$item['IFID'].'&deptid='.$item['DeptID'].'\">'.$item['SoPhieu'].'</a></td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayBatDau) . '</td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayKetThuc) . '</td>';\n $sMail .= '</tr>';\n }\n\n $sMail .= '</table>';\n $sMail .= '<br/>';\n $sMail .= '<p style=\"text-align:right\" > <b>QS-IMS Mailer</b> </p>';\n $this->_sendMail($subject, array($email=>$user), $sMail, $this->cc);\n }\n }\n }\n }\n }", "function sms_text_order_shortcode()\n{\n return \"\n\t\t<strong>جزییات سفارش : </strong><br/>\n\t\t<code>{phone}</code> = شماره موبایل خریدار ، \n\t\t<code>{email}</code> = ایمیل خریدار ، \t\n\t\t<code>{order_id}</code> = شماره سفارش ، \n\t\t<code>{post_id}</code> = شماره پست (شماره سفارش اصلی) ، \n\t\t<code>{status}</code> = وضعیت سفارش<br/> \n\t\t<code>{price}</code> = مبلغ سفارش ، \n\t\t<code>{all_items}</code> = آیتم های سفارش ، \n\t\t<code>{all_items_qty}</code> = آیتم های سفارش همراه تعداد ، \n\t\t<code>{count_items}</code> = تعداد آیتم های سفارش <br/> \n\t\t<code>{payment_method}</code> = روش پرداخت ، \n\t\t<code>{shipping_method}</code> = روش ارسال ، \n\t\t<code>{description}</code> = توضیحات خریدار ، \n\t\t<code>{transaction_id}</code> = شماره تراکنش<br/><br/>\n\t\t\n\t\t<strong>جزییات صورت حساب : </strong><br/>\n\t\t<code>{b_first_name}</code> = نام خریدار ، \n\t\t<code>{b_last_name}</code> = نام خانوادگی خریدار ، \n\t\t<code>{b_company}</code> = نام شرکت <br/> \n\t\t<code>{b_country}</code> = کشور ، \n\t\t<code>{b_state}</code> = ایالت/استان ، \n\t\t<code>{b_city}</code> = شهر ، \n\t\t<code>{b_address_1}</code> = آدرس 1 ، \n\t\t<code>{b_address_2}</code> = آدرس 2 ، \n\t\t<code>{b_postcode}</code> = کد پستی<br/><br/>\n\t\t\n\t\t\n\t\t<strong>جزییات حمل و نقل : </strong><br/>\n\t\t<code>{sh_first_name}</code> = نام خریدار ، \n\t\t<code>{sh_last_name}</code> = نام خانوادگی خریدار ، \n\t\t<code>{sh_company}</code> = نام شرکت <br/> \n\t\t<code>{sh_country}</code> = کشور ، \n\t\t<code>{sh_state}</code> = ایالت/استان ، \n\t\t<code>{sh_city}</code> = شهر ، \n\t\t<code>{sh_address_1}</code> = آدرس 1 ،\n\t\t<code>{sh_address_2}</code> = آدرس 2 ، \n\t\t<code>{sh_postcode}</code> = کد پستی<br/><br/>\n\t\t\n\t\";\n}", "public function paymentComplete()\n {\n // Create a unique download token\n do {\n $this->download_token = str_random(12);\n } while (self::whereDownloadToken($this->download_token)->exists());\n\n $this->logStatus('complete');\n\n // Send the success email\n Mail::send('bedard.photography::mail.complete', $this->attributes, function ($message) {\n $message->to($this->email, $this->name);\n });\n }", "public function serverresultAction()\n {\n $boError = false;\n $model = Mage::getModel('paymentsensegateway/direct');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $szMessage = $this->getRequest()->getPost('Message');\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n \n try\n {\n // finish off the transaction: if StatusCode = 0 create an order otherwise do nothing\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $szMessage,\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szErrorMessage = $exc->getMessage();\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n if($boError == true)\n {\n $this->getResponse()->setBody('StatusCode=30&Message='.$szErrorMessage);\n }\n else\n {\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n // if the payment was successful clear the session so that if the customer navigates back to the Magento store\n // the shopping cart will be emptied rather than 'uncomplete'\n if($this->getRequest()->getPost('StatusCode') == '0')\n {\n Mage::getSingleton('checkout/session')->clear();\n \n if($nVersion >= 1410)\n {\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szMessage);\n }\n }\n \n $this->getResponse()->setBody('StatusCode=0');\n }\n }", "public function notime_shipping_sales_order_complete(Varien_Event_Observer $observer) {\n\n $_order = $observer->getEvent()->getOrder();\n\n if(Mage_Sales_Model_Order::STATE_COMPLETE == $_order->getStatus()) {\n\n // check if order use Notime shipping\n if('notime_notime' == $_order->getShippingMethod()) {\n\n $resource = Mage::getSingleton('core/resource');\n $readConnection = $resource->getConnection('core_read');\n $writeConnection = $resource->getConnection('core_write');\n\n $query = 'SELECT shipment_id FROM notime_shipping WHERE `status` = 0 AND quote_id = '. $_order->getQuoteId() .' LIMIT 1';\n $shipment_id = $readConnection->fetchOne($query);\n if($shipment_id) {\n try {\n\n // send POST request to Notime\n $shipment_id = $shipment_id;\n if($shipment_id) {\n\n // get customer shipping address\n $_shippingAddress = $_order->getShippingAddress();\n if($_shippingAddress->getId()) {\n $params = array(\n 'ShipmentId' => $shipment_id,\n 'Dropoff' => array(\n 'Name' => $_shippingAddress->getFirstname() .' '. $_shippingAddress->getLastname(),\n 'ContactName' => $_shippingAddress->getFirstname() .' '. $_shippingAddress->getLastname(),\n 'Phone' => $_shippingAddress->getTelephone(),\n 'City' => $_shippingAddress->getCity(),\n 'CountryCode' => $_shippingAddress->getCountryId(),\n 'Postcode' => $_shippingAddress->getPostcode(),\n 'Streetaddress' => implode(' ',$_shippingAddress->getStreet()),\n 'ContactEmailAddress' => $_shippingAddress->getEmail()\n ),\n 'EndUser' => array(\n 'FullName' => $_shippingAddress->getFirstname() .' '. $_shippingAddress->getLastname(),\n 'Phone' => $_shippingAddress->getTelephone(),\n 'Email' => $_shippingAddress->getEmail()\n )\n );\n\n $client = new Varien_Http_Client();\n\n $client->setUri('https://v1.notimeapi.com/api/shipment/approve')\n ->setConfig(array('timeout' => 30, 'keepalive' => 1))\n ->setHeaders(array(\n 'Ocp-Apim-Subscription-Key' => '493dc25bf9674ccb9c5920a035c1f777',\n ))\n ->setRawData(json_encode($params), 'application/json')\n ->setMethod(Zend_Http_Client::POST);\n\n $client->setHeaders(array('Content-Type: application/json'));\n\n $response = $client->request();\n\n if($response->isSuccessful()){\n // update status\n $writeConnection->update(\n 'notime_shipping',\n array('status' => 1),\n 'quote_id='.$_order->getQuoteId()\n );\n $_order->addStatusHistoryComment('Notime->Success: Shipment was approved successfully!')->save();\n } else {\n Mage::log('ERROR:'.$response->getMessage(),false,'notime-shipping.log');\n }\n }\n }\n } catch (Exception $e) {\n Mage::log($e->getMessage(),false,'notime-shipping.log');\n }\n }\n }\n }\n }", "public static function geoCart_process_orderDisplay()\n {\n $cart = geoCart::getInstance();\n\n self::_successFailurePage(true, $cart->order->getStatus(), true, $cart->order->getInvoice());\n\n //send email to admin if he wants it\n if ($cart->db->get_site_setting('user_set_hold_email')) {\n //echo $item_sell_class->db->get_site_setting('user_set_hold_email').\" is the setting for hold email<br />\";\n //echo \"email should be sent for ad on hold<br />\";\n $subject = \"An order has been placed!!\";\n $message = \"Admin,\\n\\n\";\n $message .= \"An order has been placed and is on hold because a \" . self::gateway_name . \" type was chosen. See the unapproved orders section of the admin.\\n\\n\";\n $message .= \"Additional orders may be in the unapproved ads section that you were not sent an email. These will be failed auto pay attempts or if you are approving all ads.\\n\\n\";\n geoEmail::sendMail($cart->db->get_site_setting('site_email'), $subject, $message);\n }\n\n //gateway is last thing to be called, so it needs to be the one that clears the session...\n $cart->removeSession();\n }", "function send($mobile, $message);", "public function process()\n {\n // check order configurations for funny PT case\n foreach ($this->order_configurations as $config) {\n $products = $config->getProductArray(true);\n $hasPreceptorTraining = in_array(\"9\", $products);\n\n // we found preceptor training and other products\n //(we need an addtional serial number, therefor an additional config)\n if (count($products) > 1 && $hasPreceptorTraining && !$this->upgrade_purchase) {\n $this->addPreceptorTrainingConfig($config->quantity);\n }\n }\n\n //Mark order as completed\n $this->completed = true;\n $this->order_date = new \\DateTime();\n\n //Either apply upgrades or generate new serial numbers\n if ($this->upgrade_purchase) {\n $this->applyUpgradesAndDowngrades();\n } else {\n $this->generateSerialNumbers();\n }\n\n //Send email to interested parties, unless this is an instant order by Staff\n if ($this->order_type->id != 3) {\n $this->emailSerialNumbers();\n }\n\n //Generate invoice number and email the invoice if appropriate\n if ($this->payment_method->id == 1 && !$this->isFreeOrder()) {\n $this->generateInvoiceNumber();\n $this->emailInvoicePdf();\n }\n \n $session = new \\Zend_Session_Namespace(\"OrdersController\");\n $session->unsetAll();\n }", "public function onAfterWrite() {\n parent::onAfterWrite();\n\n // Check if an order number has been generated, if not, add it and save again\n if(!$this->OrderNumber) {\n $this->OrderNumber = $this->generate_order_number();\n $this->write();\n }\n\n // Deal with sending the status email\n if($this->isChanged('Status') && in_array($this->Status, array('failed','paid','processing','dispatched')) ) {\n $siteconfig = SiteConfig::current_site_config();\n\n $from = $siteconfig->EmailFromAddress;\n\n $vars = array(\n 'Order' => $this,\n 'SiteConfig' => $siteconfig\n );\n\n // Deal with customer email\n if($siteconfig->sendCommerceEmail('Customer', $this->Status)) {\n // if subsites installed, then get the native language for that site\n $current_i18n = i18n::get_locale();\n if($this->SubsiteID && class_exists('Subsite') && $this->Subsite())\n i18n::set_locale($this->Subsite()->Language);\n\n $subject = _t('CommerceEmail.Order', 'Order') . \" {$this->OrderNumber} {$this->getTranslatedStatus()}\";\n\n $body = $this->renderWith('OrderEmail_Customer', $vars);\n $email = new Email($from,$this->Email,$subject,$body);\n $email->sendPlain();\n\n // If subsites enabled, set the language back\n if($this->SubsiteID && class_exists('Subsite') && $this->Subsite())\n i18n::set_locale($current_i18n);\n }\n\n // Deal with vendor email\n if($siteconfig->sendCommerceEmail('Vendor', $this->Status)) {\n $subject = _t('CommerceEmail.Order', 'Order') . \" {$this->OrderNumber} {$this->getTranslatedStatus()}\";\n switch($this->Status) {\n case 'paid':\n $email_to = $siteconfig->PaidEmailAddress;\n case 'processing':\n $email_to = $siteconfig->ProcessingEmailAddress;\n case 'dispatched':\n $email_to = $siteconfig->DispatchedEmailAddress;\n }\n\n if(isset($email_to)) {\n $body = $this->renderWith('OrderEmail_Vendor', $vars);\n $email = new Email($from,$email_to,$subject,$body);\n $email->sendPlain();\n }\n }\n\n\n }\n }" ]
[ "0.7785686", "0.7736203", "0.70642453", "0.7045813", "0.6902287", "0.6810297", "0.672946", "0.66964304", "0.66045296", "0.6541491", "0.6518679", "0.6506084", "0.6487713", "0.64792156", "0.6429101", "0.63885206", "0.6361394", "0.63177717", "0.6299142", "0.6282297", "0.6272114", "0.6254592", "0.623477", "0.62221336", "0.62060934", "0.6167287", "0.61495674", "0.6126061", "0.6112223", "0.61054295", "0.61001956", "0.60967267", "0.60798395", "0.6075769", "0.607348", "0.6051742", "0.6041692", "0.6040705", "0.60367125", "0.60339814", "0.6020389", "0.6008877", "0.6008277", "0.59825975", "0.59824467", "0.59691805", "0.5966471", "0.5960791", "0.59421355", "0.59121335", "0.59074706", "0.5897099", "0.58956116", "0.5886243", "0.5886083", "0.5879652", "0.5864393", "0.5862494", "0.58584714", "0.5845147", "0.58441323", "0.5839725", "0.583972", "0.58358055", "0.58340245", "0.58270365", "0.58265316", "0.58230406", "0.5816255", "0.58132184", "0.58111906", "0.5805598", "0.580348", "0.58026665", "0.58002627", "0.5792186", "0.57895577", "0.5785913", "0.57808673", "0.5780247", "0.5764045", "0.5759723", "0.5756753", "0.57549816", "0.5752435", "0.5751894", "0.5750914", "0.5744545", "0.5741622", "0.5737727", "0.5735021", "0.5734302", "0.5731702", "0.57299155", "0.5728695", "0.57262623", "0.57258636", "0.57233316", "0.5721477", "0.5715372" ]
0.6545153
9
$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}", "public function getSystemUserGroups()\n {\n $system_user_groups = array();\n \n // load the related System_user_group objects\n //Busca grupo para professor\n $system_user_system_user_groups = SystemGroup::where('name','like','%- Professor%')->load();\n if (isset($system_user_system_user_groups[0]))\n {\n $group_id = $system_user_system_user_groups[0];\n }\n $system_user_groups[] = new SystemGroup( $group_id->id );\n //var_dump($system_user_groups);\n return $system_user_groups;\n \n }", "private function setGroup2() {\n $this->qestion->groupBy(\"moods.id\");\n //$this->qestion->havingRaw(\"CASE WHEN count(forwarding_drugs.id_mood) = 0 THEN 1 else forwarding_drugs.id_mood END \");\n }", "public function tags()\n {\n return $this->belongsToMany('App\\Models\\Tags\\TagsEloquent', 'shop_tags', 'shop_id', 'tag_id')->orderBy('display_order', 'asc')->withTimestamps();\n }", "public function a4(){\n $pengumumans=Pengumuman::whereHas('user',function (Builder $query){\n $query->whereHas('galeris','function'( $query){\n $query->where('id',269)\n });\n })->with('user.galeris')->get();\n return $pengumumans;\n }", "public function shop(Request $request, $sme){\n\n //$username = DB::table('businesses')->distinct()->select('email')->where('slug','=',$sme)->get();\n //$username = ((array) $username[0])['email'];\n //$business = DB::table('businesses')->where('email','=',$username)->get();\n $business= Business::where('business_slug','=',$sme)->get();\n\n $products = Product::where('bid','=',$business[0]->id)->orderBy('product_shelf', 'asc')->get();\n $shelves = Shelf::distinct()->select('product_shelf')->where('bid','=',$business[0]->id)->get();\n //return $products;\n return view('shop',compact('products','shelves','business'));\n }", "public function index()\n {\n return Auth::user()->groups()->orderBy('order')->get();\n }", "public function productos()\n {\n return $this->hasMany(User::class);\n }", "public function allGoods()\n {\n $query = [];\n $unwind = [\n '$unwind' => '$awards',\n ];\n array_push($query, $unwind);\n $groupBy = [\n '$group' => [\n '_id' => '$awards.items.classification.description',\n 'count' => ['$sum' => 1],\n ],\n ];\n array_push($query, $groupBy);\n $result = OcdsRelease::raw(\n function ($collection) use ($query) {\n return $collection->aggregate($query);\n }\n );\n\n return ($result);\n\n }", "public function getData(){\n return Offer::select('id','name')->get();\n }", "public function groups()\n {\n return $this->belongsToMany('DvsGroup', 'group_user', 'user_id', 'group_id');\n }", "public function groups()\n {\n return $this->belongsToMany(Group::class, 'user_group');\n }", "public function getShop() {\n return $this->request(\n \"GET\",\n \"/application/users/{$this->user_id}/shops\",\n \"Shop\"\n );\n }", "public function groups()\n {\n return $this->belongsToMany(Group::class)->withPivot('created_at', 'updated_at');\n }", "public function groups()// minuscula_plural_modeloforeano\n {\n return $this->belongsToMany('App\\Group'); //direecion modeloforeano\n }", "public function getAllUser(){\n $empdata = DB::table('users')\n ->select('*')\n ->get(); \n return $empdata;\n \n }", "public function grupos(){\n return $this->hasMany(Ciclo::class);\n }", "public function tagging()\n {\n return $this->hasMany('App\\ActivityTags', 'user_id')->groupBy('name');\n }", "public function users()\n {\n return $this->belongsToMany(User::class, 'group_users');\n }", "public function getInfoGroupUser(Request $request)\n {\n $tabGroups = [];\n $gestionUser = new GestionUserInfos($request->user());\n\n // Récupération des informations groupes / users\n $tGroup = Group::query()->get();\n if($tGroup->count() > 0) {\n foreach($tGroup as $group) {\n $tabGroups['Groups'][] = [\n 'id' => $group->id,\n 'name' => $group->name,\n 'users' => $group->user()->orderBy('users.id')->pluck('users.id'),\n ];\n }\n }\n\n // Détail des users pour rapprochement groupes\n $tUser = $gestionUser->getShareUser();\n if($tUser->count() > 0) {\n foreach($tUser as $user) {\n $tabGroups['Users'][] = [\n 'id' => $user->id,\n 'name' => $user->name,\n ];\n }\n }\n\n return $tabGroups;\n }", "public function getProductsByUserId($id)\n {\n if($id==0){\n $product = UserProduct::distinct()->pluck('product_id');\n }else{\n $product = UserProduct::where(\"user_id\",$id)->distinct()->pluck('product_id');\n }\n\n if (count($product)>0){\n $res['product_ids']=$product;\n return response()->json(['status_code' => 200, 'message' => 'product list', 'data' => $res]);\n\n }else{\n return response()->json(['status_code' => 404, 'message' => 'Record not found']);\n }\n\n }", "public function group()\n {\n\n \treturn $this-> belongsTo(Group::class);\n }", "public function grupos()\n {\n return $this->belongsTo(GrupoInteres::class, 'FK_DAE_GruposInteres', 'PK_GIT_Id');\n }", "public function index()\n {\n //Vind alle groeperingen waar de gebruiker id in voor komt\n //Daarna vind het alle groepen waar de gebruiker inzit met gebruik van groupeduser\n //returned de groups waar de gebruiker in zit naar de view\n\n $user = User::find(1)->groupedusers()->where('user_id', Auth::User()->id)->get();\n dump($user);\n $newarray = array();\n for ($i = 0; $i < count($user); $i++){\n array_push($newarray, DB::table('groups')->where('id', $user[$i]->group_id)->first());\n }\n\n\n\n\n dump($newarray);\n return view('group', ['groups' => $newarray]);\n\n }", "public function me()\n {\n $id = auth()->id();\n $shop=Shop::with(['city','province'])->find($id);\n $club_count = SubCode::where('shop_id',$id)->where('customer_id','!=',null )->distinct('customer_id')->count();\n return response()->json($shop);\n }", "public function query(User $model)\n {\n $wallet = $model->where('users.user_type',$this->user_type)\n ->join('wallet', function($join) {\n $join->on('users.id', '=', 'wallet.user_id');\n }) \n ->select('users.id as id', 'users.first_name', 'users.last_name','users.email','wallet.currency_code as currency_code','wallet.amount as amount','users.gender')\n ->groupBy('id');\n return $wallet;\n }", "public function byUser()\n {\n # code...\n $garages = Garage::with('state', 'images', 'tags')->where('user_id', auth()->user()->id)->orderBy('id', 'desc')->get();\n return response()->json($garages, 200);\n }", "public function groupflowermembers()\n {\n return $this->hasMany('App\\GroupFlowersMembers', 'group_flower_id','id')->select(['group_flower_id','position_id',DB::raw('COUNT(id) as total_positions')])->groupBy('position_id');\n }", "public function groups()\n {\n return $this->hasMany('App\\ERP\\SItemGroup');\n }", "public function preferredShop()\n {\n //get user id\n $id = \\Auth::user()->id;\n //select favorites shops for current user\n $shops = DB::select('SELECT id,shop_name,shop_description FROM t_shop WHERE id in (select shop_id from t_liked where user_id= :id)', ['id' => $id]);\n return response()->json($shops);\n }", "public function groups()\n {\n return $this->belongsToMany(Group::class);\n }", "public function groupBy($columns);", "public function groups()\n\t{\n\t\treturn $this->belongsToMany('Group');\n\t}", "public function getIndexGudang(){\n return Gudang::with('barang')->groupBy('item_id')->selectRaw('*, sum(amount_in) as sum_in, sum(amount_out) as sum_out')->get();\n }", "public function group() {\n return $this->belongsTo('Groups','groupID','groupID');\n\n }", "function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }", "public function grados()\n {\n return $this->belongsToMany('DSIproject\\Grado', 'alumno_valor')\n ->withPivot(['valor_id', 'trimestre', 'nota'])\n ->withTimestamps();\n }", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.clave,u.nivel_usuario,u.status,u.ultimo_login,u.name,u.IdDepartamento,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.nivel_usuario ORDER BY u.clave ASC\";\n $result = find_by_sql($sql);\n return $result;\n}", "public function groups()\n {\n return $this->groupModel\n ->orderBy('name', 'asc')\n ->findAll();\n }", "function grouping(){\n\n return $this->db->table('posts')\n ->groupStart()\n ->where(['post_id >'=> '25', 'post_created_at <' => '1990-01-01 00:00:00'])\n ->groupEnd()\n ->orWhere('post_author', 10)\n ->join('users', 'posts.post_author=users.user_id')\n ->get()\n ->getResult();\n }", "public function UserGroup() {\n return $this->belongsTo('UserGroup', 'group_id');\n }", "public function get(){\nreturn $this->db->query('select id, name, color from categories')->fetchAll();\n}", "public function UserVideogames(){\n return $this->belongsTo(User::class,'user_id');\n }", "public function getAllGroups(){\n // Get list\n $lists = array(); \n $data = Group::where('account_id', $this->getAccountId()) \n ->where('user_id', $this->user_id)\n ->get() \n ->toArray();\n $lists = $data;\n return $lists;\n }", "public function get_groups(Request $request)\n {\n $id_company=$request['company_id'];\n $company_group=CompanyGroup::select(['id as cp_id','company_id','group_id'])->where('company_id',$id_company)->get();\n $group=array();\n foreach($company_group as $key=>$cg){\n $temp=array(\n 'cp_id'=>$cg->cp_id,\n 'group'=>$cg->group\n );\n array_push($group,$temp);\n }\n \\Log::info($group);\n return response()->json($group);\n }", "public function getAllUsersSpacebar()\n {\n $sql = \"SELECT Users.username, Users.country, Scores.score from Users join Scores on Users.ID = Scores.user_ID WHERE Scores.game_ID = 1 ORDER BY Score DESC\";\n\t $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function query(User $model)\n {\n return $model->select('id','name','email','created_at');\n }", "protected function getGroupByAttribute()\n {\n return $this->fetchData[self::GROUP_CLAUSE];\n }", "public function index()\n {\n //$user_id = Auth::id();\n\n $featuredServices = Service::where('is_featured', 1)->with('user')->get();\n\n return view('/', compact(['featuredServices']));\n\n // $products = Product::with('user')->get();\n // return view('shop.index', compact(['products']));\n\n // Product::where('user_id', Auth::user()->id)->with('product.purchases')\n\n\n // $results = User::where('this', '=', 1)\n //->get();\n\n }", "public function query(User $model)\n {\n return $model->select('users.id as id', 'users.first_name', 'users.last_name', 'users_phone_numbers.phone_code', 'users_phone_numbers.phone_number', 'users.email', 'users.status','users.created_at','users.updated_at', 'users.verification_status','users.languages')\n ->leftJoin('users_phone_numbers', function($join) {\n $join->on('users_phone_numbers.user_id', '=', 'users.id');\n })->groupBy('id');\n }", "function getHistoryList(Request $request)\n {\n\n\n\n $historyData=PracticesHistory::selectRaw('count(id_category) as totalCategory ,id_category ')->where('id_users',$request->idUsers)->groupBy(\"id_category\")\n ->get();\n\n //$historyData=DB::select(DB::raw('SELECT id_category,count(id_category) as totalCategory FROM `practices_history` where id_users=1 group by(id_category)'));\n // return $historyData;\n return Response::json(array('success' => TRUE, 'data' => $historyData,'totalQuestions' => count($historyData)), 200);\n }", "public function user_group()\n {\n return $this->belongsTo('App\\UserGroup');\n }", "public function users()\n {\n return $this->hasMany('App\\Models\\User', 'user_group_id');\n }", "public function getItemOpponents($id)\n { \n $records = Items::with(['user.country'])->where('category_id',$id)->groupBy('user_id')->get(); \n /*$item_ids = Categories::select('id')->where('parent_id' ,$id)->pluck('id');\n $records = Items::with(['user.country'])->whereIn('category_id',$item_ids)->groupBy('user_id')->get();*/\n $records->map(function ($record) use ($id) {\n $user_score = Items::select('score')->where(['category_id' => $id, 'user_id' => $record->user->id])->pluck('score');\n \n $record->score = str_pad($record->score,7,0,STR_PAD_LEFT);\n $record['avg_score'] = str_pad(ceil($user_score->avg()),7,0,STR_PAD_LEFT);\n $record['max_score'] = str_pad($user_score->max(),7,0,STR_PAD_LEFT);\n $record['min_score'] = str_pad($user_score->min(),7,0,STR_PAD_LEFT);\n $record['user_score'] = str_pad($user_score->sum(),7,0,STR_PAD_LEFT);\n\n $record->user['profile_thumbnail'] = checkImage('users/thumbs/'. $record->user->profile_image);\n $record->user['profile_image'] = checkImage('users/'. $record->user->profile_image);\n $record->user['records_count'] = str_pad(Items::where(['category_id' => $id, 'user_id' => $record->user->id])->count(),7,0,STR_PAD_LEFT);\n $record->user->user_score = str_pad($record->user->user_score,7,0,STR_PAD_LEFT);\n\n\n return $record;\n });\n return $records;\n }", "public function shoppingCarts()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n \treturn $this->hasMany('App\\ShoppingCart','spsd_id','spsd_id');\n }", "public static function getwithlessonidnew($id){\n return $updateoptions = User_package::where('course_id',$id)->groupBy('name')->get(); \n \n }", "public function userGroups()\n {\n return $this->belongsToMany(UserGroup::class, 'user_group_users', 'user_id', 'user_group_id')\n ->withPivot('joined_at');\n }", "public function groups()\n {\n return $this->hasMany('Group');\n }", "public function getGroupByResults()\n {\n return $this->group_by_results;\n }", "public static function get()\n {\n $data = static::select(\n 'id',\n 'distributor_id',\n 'distributor_name',\n 'product_id',\n 'barcode',\n 'product_name',\n 'delivery_date',\n 'total_product',\n 'stock_product',\n 'purchase_price',\n 'selling_price',\n 'distributor_products_list_id',\n 'profit'\n )\n ->orderBy('product_name', 'asc')\n ->get();\n return $data;\n }", "public function show(){\n\n\t$allshow=Shop::OrderBy('id','DESC')->get();\n\n\treturn view('backend.shopdetails.all',compact('allshow'));\n}", "public function getOptionGroupsOfSellerProduct($sp_id)\n\t{\n\t\t//options of a product\n\t\t$sp_options = SPOptionRelation::with('option.optionGroup')->where('sp_id','=',$sp_id)->get();\n\t\t$option_groups = [];\n\t\tforeach ($sp_options as $key => $sp_option) {\n\t\t\t$og = ucfirst($sp_option->option->optionGroup->option_g_name);\n // dd($og);\n\t\t\tif(!array_has($option_groups,$og)){\n\t\t\t\t$option_groups[$og]=array();\n\t\t\t}\n\t\t}\n\t}", "public function getUserSalSlip($userid){\n $empdata = DB::table('salary_slip')\n ->select('*')\n ->where('emp_id',$userid)\n ->orderBy('created_at','desc')\n ->take(1)\n ->get(); \n return $empdata;\n }", "public function index()\n {\n $shops = Shop::all();\n $categories = Category::all()->pluck('name','id');\n return view('index',['shops' => $shops, 'categories' => $categories]);\n }", "private function sql_groupBy()\n {\n // Get WHERE statement\n $groupBy = $this->curr_tableField;\n\n // RETURN GROUP BY statement without GROUP BY\n return $groupBy;\n }", "function group_by($columns = array())\n {\n if (!isset($this->object->_query_args['group_by_columns'])) {\n $this->object->_query_args['group_by_columns'] = $columns;\n } else {\n $this->object->_query_args['group_by_columns'] = array_merge($this->object->_query_args['group_by_columns'], $columns);\n }\n return $this->object;\n }", "public function getnombre_sede_institucion(Request $request)\n\n{\n\n $sede_institucion= DB::table(\"sede_institucion\")\n\n ->where(\"id_tipo_institucion\",$request->id_tipo_institucion)\n\n ->pluck(\"nombre_sede_institucion\",\"id_sede_institucion\");\n\n return response()->json($sede_institucion);\n\n}", "public function buscaTurnos($grado,$anio){\n //public function buscaTurnos($grado){\n $match = ['grado' => $grado, 'anios_id' => $anio];\n //$turnos=Grado::where('grado',$grado)->select('turnos_id')->groupBy('turnos_id')->get();\n $turnos=Grado::where($match)->select('turnos_id')->groupBy('turnos_id')->get();\n //$turnos_values=Arr::flatten($turnos);\n return $turnos;\n }", "public static function getvendorData()\n {\n\n $value=DB::table('users')->where('user_type','=','vendor')->where('drop_status','=','no')->orderBy('id', 'desc')->get(); \n return $value;\n\t\n }", "public function usersCount()\n {\n return $this->belongsToMany(User::class,'user_user_groups','group_id','user_id')\n ->selectRaw('count(user_id) as aggregate')\n ->groupBy('pivot_group_id');\n }", "function ListUsersGroup($id = null)\n {\n if ($id != null) {\n $this->db->where('id', $id);\n }\n $this->db->order_by('name','asc');\n $query = $this->db->get('users');\n return $query;\n }" ]
[ "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.5281991", "0.5280641", "0.52632254", "0.52529305", "0.5250557", "0.5228982", "0.5227659", "0.52256083", "0.52218413", "0.52130604", "0.5204912", "0.5199424", "0.5194767", "0.5193366", "0.51838964", "0.51786155", "0.5177216", "0.517614", "0.5175477", "0.5171809", "0.51689947", "0.5159269", "0.5151088", "0.5147793", "0.5142715", "0.5140323", "0.5139908", "0.51201445", "0.5114644", "0.5111445", "0.5107556", "0.510273", "0.50903845", "0.50886863", "0.5082312", "0.50795454", "0.50739795", "0.5070031", "0.5069421", "0.50589424", "0.50527567", "0.5049171", "0.50478417", "0.5042405", "0.5032845", "0.5031025", "0.5030274", "0.5029103", "0.50257266", "0.50171715", "0.50131994", "0.5009084", "0.5006746", "0.5005622", "0.5005616", "0.5004467", "0.49951828", "0.4985826", "0.4984843", "0.49839488", "0.49790528", "0.49765512", "0.4966936", "0.49640915", "0.496268", "0.49617553", "0.4958825", "0.49537325", "0.49522114", "0.49509272" ]
0.62329465
0
Perform postregistration booting of services.
public function boot() { $config_file = __DIR__.'/config/config.php'; $this->publishes([ $config_file => config_path('snap_scan.php'), ], 'config'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->registerHandler();\n\n // Register publish groups\n $this->publishGroups();\n\n // Failed jobs listener\n $this->registerFailedJobsListener();\n }", "public function boot()\n\t{\n\t\t$this->registerTranslations();\n\t\t$this->registerConfig();\n\t\t$this->registerViews();\n\t}", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n $this->registerResources();\n $this->registerTab();\n $this->registerViewComposer();\n // $this->publishFiles();\n //$this->registerListener();\n }", "public function boot()\n {\n $this->registerPolicies();\n $this->registerPassport();\n }", "public function boot()\n {\n $this->composeCityInfo();\n $this->composeNavbarUserInfo();\n }", "public function boot()\n\t{\n $this->composeNavigation();\n $this->composeTags();\n $this->composeRecent();\n $this->composeProducts();\n $this->composeListGroup();\n $this->composeAdsIndex();\n }", "public function boot()\n {\n // Event Listeners\n $this->eventListeners($this->events);\n\n // Event Subscriptions\n $this->eventSubscriptions($this->eventSubscribers);\n\n // Observers\n $this->addObservers($this->observers);\n\n // Extensions\n $this->registerExtensions($this->extensions);\n\n // Features\n $this->registerFeatures($this->features);\n\n // Permissions\n $this->registerPermissions($this->permissions);\n }", "public function boot()\n {\n $this->registerPolicies();\n $this->registerMemberPolicies(); \n $this->registerUserPolicies(); \n $this->registerGeneralAccess();\n\n\n //\n }", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n $this->registerGate();\n\n $this->registerDirectives();\n\n $this->publishResources();\n }", "public function boot() {\n $this->registerTranslations();\n $this->registerConfig();\n $this->registerViews();\n \n /*Register alias*/\n $this->registerAlias();\n }", "public function boot()\n {\n// $this->registerLogger();\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMigrations();\n $this->registerPublishing();\n }", "public function boot()\n {\n $this->registerPublishers();\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }" ]
[ "0.7523447", "0.72817886", "0.720491", "0.71984196", "0.7176205", "0.71662176", "0.71574175", "0.71444714", "0.714033", "0.7099516", "0.70984703", "0.70885664", "0.7087128", "0.70815575", "0.7077817", "0.7070107", "0.706762", "0.70658684", "0.7060647", "0.70550144", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663", "0.7054663" ]
0.0
-1
Register any package services.
public function register() { $this->app->bind('SnapScanHandler', function ($app) { return new SnapScanHandler(new SnapScanHandler()); }); $this->app->alias('SnapScanHandler',SnapScanHandler::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerServices(): void\n {\n $this->registerKernels();\n $this->registerFactories();\n $this->registerMicroServices();\n }", "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "protected function registerServices()\n {\n $this->app->singleton('components', function($app) {\n $path = $app['config']->get('components.paths.components');\n\n return new Repository($app, $path);\n });\n }", "public function register()\n {\n \n //require __DIR__ . '/../vendor/autoload.php';\n\n // use when developing\n //require __DIR__ . '/../../slack/src/SlackServiceProvider.php';\n\n // find out what this does\n //$this->mergeConfigFrom( __DIR__ . '/config/base.php', 'providers' );\n\n // register package dependency \n $this->app->register('Baytree\\Slack\\SlackServiceProvider');\n\n // register package events\n $this->app->register('Baytree\\KnowItFirst\\EventServiceProvider');\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n // Bind Credential Contract with Service\n $this->app->bind(Credentials::class, function ($app){\n return new CredentialsManger($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n\n // Bind Caption Contract with Service\n $this->app->bind(Configuration::class, function ($app){\n return new ConfigurationManager($app->make('filesystem.disk'));\n });\n\n // Inject dependencies into Auth Service.\n $this->app->singleton(Post::class, function ($app){\n return new PostService(new Instagram(true, true), $app->make(Credentials::class));\n });\n\n // Inject Guzzle Into Reddit Service\n $this->app->singleton(Scraper::class, function ($app){\n return new ScraperService(new Client(['base_uri' => 'http://www.reddit.com']), $app->make(Configuration::class), $app->make('filesystem.disk'));\n });\n\n $this->app->bind(Caption::class, function ($app){\n return new CaptionManager($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n }", "public function register()\n {\n $this->app->bind(\n ClientServiceInterface::class,\n ClientService::class\n );\n\n $this->app->bind(\n ProjectServiceInterface::class,\n ProjectService::class\n );\n\n $this->app->bind(\n ActionServiceInterface::class,\n ActionService::class\n );\n }", "public function register(): void {\n $this->app->bind(ItemAffixService::class, function ($app) {\n return new ItemAffixService();\n });\n\n $this->app->bind(AssignSkillService::class, function ($app) {\n return new AssignSkillService();\n });\n\n $this->app->bind(UpdateCharacterStatsService::class, function ($app) {\n return new UpdateCharacterStatsService();\n });\n\n $this->app->bind(UserService::class, function($app) {\n return new UserService();\n });\n\n $this->app->bind(ItemsService::class, function($app) {\n return new ItemsService();\n });\n\n $this->app->bind(QuestService::class, function() {\n return new QuestService();\n });\n\n $this->app->bind(InfoPageService::class, function() {\n return new InfoPageService();\n });\n\n $this->app->bind(GuideQuestService::class, function() {\n return new GuideQuestService();\n });\n\n $this->app->bind(LocationService::class, function($app) {\n return new LocationService($app->make(CoordinatesCache::class));\n });\n\n $this->commands([CreateAdminAccount::class, GiveKingdomsToNpcs::class]);\n }", "public function register()\n {\n // Config\n $this->mergeConfigFrom( __DIR__ . '/../config/package.php', 'package');\n\n // Controllers\n $this->app->make('Nabeeljavaid\\Package\\Controllers\\PackageController');\n }", "public function register()\n {\n // merge in df config, https://laravel.com/docs/5.4/packages#resources\n $configPath = __DIR__ . '/../config/config.php';\n $this->mergeConfigFrom($configPath, 'df');\n\n // Add our service types.\n $this->app->resolving('df.service', function (ServiceManager $df){\n $df->addType(\n new ServiceType([\n 'name' => 'local_file',\n 'label' => 'Local File Storage',\n 'description' => 'File service supporting the local file system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => LocalFileConfig::class,\n 'factory' => function ($config){\n return new LocalFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'ftp_file',\n 'label' => 'FTP File Storage',\n 'description' => 'File service supporting the FTP protocol.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => FTPFileConfig::class,\n 'factory' => function ($config){\n return new FTPFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'sftp_file',\n 'label' => 'SFTP File Storage',\n 'description' => 'File service supporting the SFTP protocol.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => SFTPFileConfig::class,\n 'factory' => function ($config){\n return new SFTPFileService($config);\n },\n ])\n );\n\n $df->addType(\n new ServiceType([\n 'name' => 'webdav_file',\n 'label' => 'WebDAV File Storage',\n 'description' => 'File service supporting WebDAV.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => WebDAVFileConfig::class,\n 'factory' => function ($config){\n return new WebDAVFileService($config);\n },\n ])\n );\n });\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n // Automatically apply the package configuration\n if (!$this->app->isLocal()) {\n if (class_exists(\\Laravel\\Telescope\\TelescopeServiceProvider::class)) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n }\n \n if (class_exists(Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class)) {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }\n }", "public function register()\n {\n if ($this->app->isLocal()) {\n $this->app->register(TelescopeServiceProvider::class);\n $this->app->register(DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register() {\n\t\t$this->app->bind(SymfonyContract::class, function () {\n\t\t\t$api = app(GithubAPIContract::class);\n\t\t\treturn new SymfonyService($api);\n\t\t});\n\t}", "public function register()\n {\n $this->app->singleton(\n FileImportServiceInterface::class,\n FileImportService::class\n );\n $this->app->singleton(\n CustomerServiceInterface::class,\n CustomerService::class\n );\n }", "public function register()\n\t{\n\t\t$this->app->register('Tlr\\Menu\\Laravel\\MenuServiceProvider');\n\t\t$this->app->register('Tlr\\Routing\\EventServiceProvider');\n\t\t$this->app->register('Tlr\\Auth\\AuthServiceProvider');\n\t\t$this->app->register('Tlr\\Types\\TypeServiceProvider');\n\n\t\t$this->commands('Tlr\\Cms\\InstallCommand');\n\n\t\t$this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n\t}", "public function register()\n {\n $this->app->registerDeferredProvider(GeneratorServiceProvider::class);\n $this->app->registerDeferredProvider(AccessServiceProvider::class);\n $this->app->register(ThemeServiceProvider::class);\n $this->app->register(PaymentServiceProvider::class);\n if ($this->app->runningInConsole()) {\n $this->commands([\n ClearCommand::class,\n GenerateJsRouteCommand::class,\n GeneratePermissionCommand::class,\n ]);\n }\n\n self::addMacros();\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n $this->app->bind(SoapService::class, PhpSoapService::class);\n\n $this->registerSaman();\n\n $this->app->singleton(NikPayFactory::class, function () {\n return new NikPayFactory();\n });\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n //Bind all interfaces with repositories\n $this->app->bind(UserRepository::class, UserRepositoryImpl::class);\n $this->app->bind(ProductRepository::class, ProductRepositoryImpl::class);\n }", "public function register(): void\n {\n $this->configure();\n $this->registerServices();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'StartMeUp\\Services\\Registrar'\n\t\t);\n\n\t\t$repositories = [\n\t\t\t'Company',\n\t\t];\n\t\tforeach ($repositories as $repository) {\n\t\t\t$this->bindRepository($repository);\n\t\t}\n\n\t}", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function registerServices()\n {\n $this->app->bind('helpers.lib', function($app) {\n return new LibHelper;\n });\n $this->app->bind('helpers.theme', function($app) {\n return ThemeHelper::instance();\n });\n $this->app->bind('helpers.acf', function($app) {\n $helper = AcfHelper::instance();\n $helper->setThemeHelper($this->app['helpers.theme']);\n $helper->setLib($this->app['helpers.lib']);\n\n return $helper;\n });\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register() \n { \n $this->app->bind(PoBomInterface::class, PoBomRepository::class);\n $this->app->bind(EmployeeInterface::class, EmployeeRepository::class);\n $this->app->bind(SalaryInterface::class, SalaryRepository::class);\n $this->app->bind(BonusInterface::class, BonusRepository::class);\n $this->app->bind(AttendanceProcessInterface::class, AttendanceProcessRepository::class);\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n foreach (static::$repositories as $repository) {\n $this->app->singleton(\n $repository[0],\n $repository[1]\n );\n }\n }", "public function register()\n {\n $this->app->bind('maxfactor', Maxfactor::class);\n $this->app->bind('mx-countries', Countries::class);\n $this->app->bind('mx-format', Format::class);\n $this->app->bind('mx-video', Video::class);\n $this->app->bind('mx-search', Search::class);\n\n $this->publishConfigs();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->app->singleton(CriteriaInterface::class, CriteriaService::class);\n $this->app->bind(UserRepositoryContract::class, UserRepository::class);\n $this->app->bind(CheckAttributeRepositoryContract::class, CheckAttributeRepository::class);\n $this->app->bind(CheckRepositoryContract::class, CheckRepository::class);\n $this->app->bind(RatingRepositoryContract::class, RatingRepository::class);\n $this->app->bind(PharmacyRepository::class, PharmacyRepository::class);\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n IMEIValidatorInterface::class,\n IMEIValidator::class\n );\n\n $this->app->bind(\n GeoInterface::class,\n GoogleGeo::class\n );\n }", "public function register()\n {\n// bind repo\n $this->app->bind(ParcelRepositoryContract::class, ParcelRepository::class);\n $this->app->bind(ShippingRequestRepositoryContract::class, ShippingRequestRepository::class);\n $this->app->bind(ParcelImageRepositoryContract::class, ParcelImageRepository::class);\n\n// bind service\n $this->app->bind(ParcelServiceContract::class, ParcelService::class);\n }", "public function register()\n {\n // Register package dependencies' service providers and aliases (so the user doesn't have to in app/config/app.php)\n $this->app->register('Radweb\\JsonExceptionFormatter\\JsonExceptionFormatterServiceProvider');\n\n // Register package interfaces with their corresponding implementations\n $this->app->bind('Radweb\\JsonExceptionFormatter\\FormatterInterface', 'Antarctica\\JsonExceptionFormatter\\Formatter\\JsonExceptionFormatter');\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n $this->app->alias('bugsnag.logger', Log::class);\n $this->app->alias('bugsnag.logger', LoggerInterface::class);\n\n $this->registerGenerators();\n $this->registerRoutes();\n }", "public function register()\n {\n $this->app->resolving('df.service', function (ServiceManager $df) {\n $df->addType(\n new ServiceType([\n 'name' => 'rackspace_cloud_files',\n 'label' => 'Rackspace Cloud Files',\n 'description' => 'File service supporting Rackspace Cloud Files Storage system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => RackspaceCloudFilesConfig::class,\n 'factory' => function ($config) {\n return new OpenStackObjectStore($config);\n },\n ])\n );\n $df->addType(\n new ServiceType([\n 'name' => 'openstack_object_storage',\n 'label' => 'OpenStack Object Storage',\n 'description' => 'File service supporting OpenStack Object Storage system.',\n 'group' => ServiceTypeGroups::FILE,\n 'config_handler' => OpenStackObjectStorageConfig::class,\n 'factory' => function ($config) {\n return new OpenStackObjectStore($config);\n },\n ])\n );\n });\n }", "public function register()\n {\n $this->app->singleton(ISalesOrderService::class, SalesOrderServiceImpl::class);\n }", "public function registerServices(){\n }", "protected function registerServices()\n {\n $this->app->bind(SocialProvidersManager::class, SocialiteProvidersManager::class);\n\n $this->app->singleton(TwoFactor::class, function () {\n return new AuthyTwoFactor(new Client());\n });\n }", "public function register()\n {\n $this->app->bind(\\App\\Service\\Theme\\ThemeService::class, \\App\\Service\\Theme\\Theme::class);\n }", "public function register()\n {\n $this->mergeConfigurations();\n \n $this->registerServiceProviders();\n $this->registerComponentsServiceProviders();\n \n $this->app['jarboe'] = $this->app->share(function($app) {\n return new Jarboe();\n });\n\n $this->doCommandsRegister();\n }", "public function register()\n {\n if ('local' === $this->app->environment()) {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Reliese\\Coders\\CodersServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n }\n }", "public function register()\n {\n defined('XS_APP_ROOT') || define('XS_APP_ROOT', config_path());\n $this->app->singleton(XunsearchService::class, function ($app) {\n return new XunsearchService();\n });\n $this->app->alias(XunsearchService::class, 'xunsearch');\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n {\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\RouteServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\ListenerServiceProvider');\n $this->app->register('Anomaly\\Streams\\Addon\\Module\\Resources\\Provider\\InterfaceServiceProvider');\n }", "public function register()\n {\n $this->app->singleton(EntityCacheService::class, function ($app) {\n return new EntityCacheService();\n });\n $this->app->singleton(CampaignCacheService::class, function ($app) {\n return new CampaignCacheService();\n });\n $this->app->singleton(UserCacheService::class, function ($app) {\n return new UserCacheService();\n });\n $this->app->singleton(PostCacheService::class, function ($app) {\n return new PostCacheService();\n });\n\n $this->app->alias(EntityCacheService::class, 'entitycache');\n $this->app->alias(CampaignCacheService::class, 'campaigncache');\n $this->app->alias(UserCacheService::class, 'usercache');\n $this->app->alias(PostCacheService::class, 'postcache');\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/config/sweetalert.php', 'sweetalert');\n\n // Binding required classes to app\n $this->app->bind(\n 'RealRashid\\SweetAlert\\Storage\\SessionStore',\n 'RealRashid\\SweetAlert\\Storage\\AlertSessionStore',\n 'RealRashid\\SweetAlert\\ToSweetAlert'\n );\n\n // Register the main class to use with the facade\n $this->app->singleton('alert', function ($app) {\n return $this->app->make(Toaster::class);\n });\n\n if ($this->app->runningInConsole()) {\n // Registering package commands.\n $this->commands([\n Console\\PublishCommand::class,\n ]);\n }\n }", "public function register()\n {\n $this->app->bind(CardService::class, function(){\n return new CardService(cache()->store());\n });\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n if ($this->app->environment() == 'dev') {\n $this->app->register(\\Way\\Generators\\GeneratorsServiceProvider::class);\n $this->app->register(\\Xethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider::class);\n }\n }", "public function register(): void\n {\n $this->app->bind(ValidatorServiceInterface::class, ValidatorService::class);\n }", "public function register()\n {\n App::singleton(UtilsServiceCatalog::CacheService, 'services\\\\utils\\\\RedisCacheService');\n\t App::singleton(UtilsServiceCatalog::TransactionService, 'services\\\\utils\\\\EloquentTransactionService');\n\n App::resolving('redis',function($redis){\n $cache_service = App::make(UtilsServiceCatalog::CacheService);\n $cache_service->boot();\n });\n\n $this->app['serverconfigurationservice'] = App::share(function ($app) {\n return new ServerConfigurationService(App::make(UtilsServiceCatalog::CacheService),App::make(UtilsServiceCatalog::TransactionService));\n });\n\n // Shortcut so developers don't need to add an Alias in app/config/app.php\n App::booting(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('ServerConfigurationService', 'services\\\\facades\\\\ServerConfigurationService');\n });\n\n App::singleton(UtilsServiceCatalog::LogService, 'services\\\\utils\\\\LogService');\n App::singleton(UtilsServiceCatalog::LockManagerService, 'services\\\\utils\\\\LockManagerService');\n App::singleton(UtilsServiceCatalog::ServerConfigurationService, 'services\\\\utils\\\\ServerConfigurationService');\n App::singleton(UtilsServiceCatalog::BannedIpService, 'services\\\\utils\\\\BannedIPService');\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n\t{\n\t\tapp()->bind(UtilityServiceInterface::class, UtilityService::class);\n\t}", "public function register()\n {\n $this->app->bind(AtomDecorator::class, ModelDecorator::class);\n $this->registerServiceProviders();\n $this->registerAliases();\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'mongicommerce');\n\n // Register the main class to use with the facade\n $this->app->singleton('mongicommerce', function () {\n return new Mongicommerce;\n });\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n //\n $this->app->register(RepositoryServiceProvider::class);\n if ($this->app->environment() !== 'production') {\n $this->app->register(IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n Schema::defaultStringLength(199);\n\n $this->app->bind(\n 'App\\Helper\\ICheckAction',\n 'App\\Helper\\CheckAction'\n );\n\n $this->app->bind(\n 'App\\Helper\\IGetDateTime',\n 'App\\Helper\\GetDateTime'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AnnouceRepository\\IAnnouceRepository',\n 'App\\Repositories\\AnnouceRepository\\AnnouceRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AjaxRepository\\IAjaxRepository',\n 'App\\Repositories\\AjaxRepository\\AjaxRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\UserRepository\\IUserRepository',\n 'App\\Repositories\\UserRepository\\UserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionRepository\\IPermissionRepository',\n 'App\\Repositories\\PermissionRepository\\PermissionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionDetailRepository\\IPermissionDetailRepository',\n 'App\\Repositories\\PermissionDetailRepository\\PermissionDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AreaRepository\\IAreaRepository',\n 'App\\Repositories\\AreaRepository\\AreaRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\TableRepository\\ITableRepository',\n 'App\\Repositories\\TableRepository\\TableRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\GroupMenuRepository\\IGroupMenuRepository',\n 'App\\Repositories\\GroupMenuRepository\\GroupMenuRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ToppingRepository\\IToppingRepository',\n 'App\\Repositories\\ToppingRepository\\ToppingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialRepository\\IMaterialRepository',\n 'App\\Repositories\\MaterialRepository\\MaterialRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialDetailRepository\\IMaterialDetailRepository',\n 'App\\Repositories\\MaterialDetailRepository\\MaterialDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialActionRepository\\IMaterialActionRepository',\n 'App\\Repositories\\MaterialActionRepository\\MaterialActionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\SupplierRepository\\ISupplierRepository',\n 'App\\Repositories\\SupplierRepository\\SupplierRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookRepository\\ICookRepository',\n 'App\\Repositories\\CookRepository\\CookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookScreenRepository\\ICookScreenRepository',\n 'App\\Repositories\\CookScreenRepository\\CookScreenRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DishRepository\\IDishRepository',\n 'App\\Repositories\\DishRepository\\DishRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\OrderRepository\\IOrderRepository',\n 'App\\Repositories\\OrderRepository\\OrderRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PayRepository\\IPayRepository',\n 'App\\Repositories\\PayRepository\\PayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseRepository\\IWarehouseRepository',\n 'App\\Repositories\\WarehouseRepository\\WarehouseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseCookRepository\\IWarehouseCookRepository',\n 'App\\Repositories\\WarehouseCookRepository\\WarehouseCookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ImportCouponRepository\\IImportCouponRepository',\n 'App\\Repositories\\ImportCouponRepository\\ImportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ExportCouponRepository\\IExportCouponRepository',\n 'App\\Repositories\\ExportCouponRepository\\ExportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ShiftRepository\\IShiftRepository',\n 'App\\Repositories\\ShiftRepository\\ShiftRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PositionRepository\\IPositionRepository',\n 'App\\Repositories\\PositionRepository\\PositionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ReportRepository\\IReportRepository',\n 'App\\Repositories\\ReportRepository\\ReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\BookingRepository\\IBookingRepository',\n 'App\\Repositories\\BookingRepository\\BookingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DayRepository\\IDayRepository',\n 'App\\Repositories\\DayRepository\\DayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\VoucherRepository\\IVoucherRepository',\n 'App\\Repositories\\VoucherRepository\\VoucherRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MethodRepository\\IMethodRepository',\n 'App\\Repositories\\MethodRepository\\MethodRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PlanRepository\\IPlanRepository',\n 'App\\Repositories\\PlanRepository\\PlanRepository'\n );\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->register(ModuleConfigServiceProvider::class);\n $this->app->register(ModuleKernelHandlerServiceProvider::class);\n //$this->app->register(ModuleLanguageServiceProvider::class);\n $this->app->register(ModuleViewServiceProvider::class);\n }", "public function register()\n {\n $this->app->when('\\Lotto\\Services\\DrawMainService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n $this->app->when('\\Lotto\\Services\\DrawPowerballService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n $this->app->when('\\Lotto\\Services\\ExportGamesService')\n ->needs('Lotto\\Interfaces\\LottoGameRepositoryInterface')\n ->give('\\Lotto\\Repositories\\LottoGameRepository');\n\n }", "public function register()\n {\n $this->app->bind(ItemService::class, function () {\n return new ItemService();\n });\n }", "protected function registerServiceProviders()\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }" ]
[ "0.76041543", "0.7520954", "0.7361004", "0.7352219", "0.7302387", "0.7252181", "0.7216501", "0.71864396", "0.7177226", "0.71727633", "0.7171777", "0.7163188", "0.7162261", "0.7150864", "0.7143927", "0.71338046", "0.71206653", "0.71104735", "0.7097425", "0.7096296", "0.7090195", "0.7088529", "0.70872414", "0.70755213", "0.7072487", "0.70705366", "0.70624954", "0.70614535", "0.7042107", "0.7039099", "0.7037531", "0.703597", "0.7026005", "0.70244455", "0.7007157", "0.70016664", "0.69997483", "0.69968367", "0.6994065", "0.69910353", "0.698988", "0.69887257", "0.6983771", "0.6980137", "0.6976828", "0.69749385", "0.6972553", "0.6970908", "0.6957935", "0.6957839", "0.6957121", "0.6947053", "0.6944185", "0.6940272", "0.6939868", "0.69304836", "0.69278365", "0.6923854", "0.691859", "0.69173014", "0.6915032", "0.6909023", "0.6907271", "0.69055545", "0.6899306", "0.6894439", "0.68940777", "0.68808377", "0.68763727", "0.68759245", "0.6874582", "0.6873008", "0.68725055", "0.6871472", "0.6870793", "0.68699485", "0.6868812", "0.68684727", "0.68682516", "0.6866824", "0.6865474", "0.68639255", "0.6862692", "0.68568933", "0.6856427", "0.68539006", "0.6852762", "0.68519944", "0.6851153", "0.684908", "0.6849009", "0.684683", "0.68463165", "0.68447155", "0.6842651", "0.683857", "0.6836065", "0.6835924", "0.6835796", "0.6833104", "0.6827545" ]
0.0
-1
Get the services provided by the provider.
public function provides() { return ['SnapScanHandler']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "protected function getServices()\n {\n return $this->services;\n }", "protected static function getServiceProviders()\n {\n return [];\n }", "public static function get_service_providers(): array {\n\t\treturn self::$service_providers;\n\t}", "public function getServices();", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function getServiceProviders();", "public function getServices() {\n\n return $this->services;\n\n }", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public static function getServices(): array\n {\n return static::$services;\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function getServiceLocator()\n {\n return $this->services;\n }", "public function getServiceProviderList()\n {\n return $this->providers;\n }", "public function services()\n {\n return $this->getAngularLocation($this->service_path);\n }", "public function provides()\n {\n return [Client::class, Services\\OAuth::class];\n }", "public function getServices(): array;", "public function getServiceProvider();", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "public function provides()\n {\n return [\n SerasaService::class\n ];\n }", "public function serviceProviders(): ?Collection;", "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "public function loadServices($providers);", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function getRequestedServices();", "public function getProviders();", "public function getProviders();", "protected function getUserServices()\n\t{\n\t\treturn $this->userServices = new UsersService();\n\t}", "protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}", "public static function get_providers() {\n\t\treturn self::$providers;\n\t}", "public function getRequiredServices();", "public function getModulesServiceProviders()\n {\n $modulesNamespace = ModulesConfig::getModulesNamespace();\n\n foreach (ModulesConfig::getModulesNames() as $moduleName) {\n // get the Module extra service providers (extra service providers are defined in the modules config file)\n foreach (ModulesConfig::getModulesExtraServiceProviders($moduleName) as $provider) {\n $allServiceProviders[] = $provider;\n }\n // append the Module main service provider\n $allServiceProviders[] = ModulesConfig::buildMainServiceProvider($modulesNamespace, $moduleName);\n }\n\n return array_unique($allServiceProviders) ? : [];\n }", "public function provides()\n {\n return [\n RouteServiceProvider::class,\n MenuServiceProvider::class,\n ];\n }", "public function getUsersServices()\r\n {\r\n return $this->usersServices = new UsersService();\r\n }", "public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}", "public function providerGet()\n {\n $getList = $this->getMethodsName('get');\n $provider = [];\n\n foreach ($getList as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'arguments' => $this->getArgumentsForMethod($name),\n ];\n }\n\n return $provider;\n }", "public function findServices(): array;", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }", "protected function getProviders() {\n\n\t\treturn $this->providers;\n\t}", "public function provides()\n {\n return [\n 'sm.callback.factory',\n 'sm.event.dispatcher',\n 'sm.factory',\n Debug::class,\n ];\n }", "public function get_providers()\n {\n }", "public function provides()\n {\n return [\n 'freshdesk.factory',\n 'freshdesk',\n 'freshdesk.connection',\n ];\n }", "public function provides()\n {\n return [\\App\\Services\\ApiPlatformProductFactoryService::class];\n }", "public function getServiceProvider($provider);", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "protected function registerServiceProviders()\n {\n if ($this->active()->has('providers')) {\n $providers = $this->active()->get('providers');\n\n foreach ($providers as $provider) {\n App::register($provider);\n }\n }\n }", "public function provides()\n\t{\n\t\treturn array(\n\t\t\t'mosms',\n\t\t\t'moclient',\n\t\t\t);\n\t}", "public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }", "public function getLoadedProviders(): array\n {\n return $this->loadServiceProviders;\n }", "public function provides()\n {\n AchieveLogger::info(\"Deferred true and I am here in provides()\");\n return['App\\Services\\Utility\\AchieveLoggerService'];\n }", "public function getModuleServiceProvider()\n {\n return isset($this->config['module']['providers']) ? $this->config['module']['providers'] : [];\n }", "public function provides()\n {\n return [\n CreateService::class,\n CreateInterface::class,\n CreateProvider::class,\n ];\n }", "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "public function provides()\n {\n return [\n ZhyuInfoServiceProvider::class,\n ];\n }", "public function getProviders()\n {\n return $this->providers;\n }", "public function getProviders()\n {\n return $this->providers;\n }", "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "public function getProviders(): array\n {\n return $this->providers;\n }", "public function getProviders(): array\n {\n return $this->providers;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "public function provides()\n {\n return [\n 'digitalocean.adapterfactory',\n 'digitalocean.factory',\n 'digitalocean',\n 'digitalocean.connection',\n ];\n }", "public function provides()\n {\n return [\n 'dubbo_cli',\n 'dubbo_cli.factory',\n ];\n }", "public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }", "public function getDependencies()\n {\n return array(\n MongoServiceProvider::SERVICE_NAME\n );\n }", "protected function getAuth_Provider_Oauth_ServiceCollectionService()\n {\n $this->services['auth.provider.oauth.service_collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('auth.provider.oauth.service.bitly');\n $instance->add('auth.provider.oauth.service.facebook');\n $instance->add('auth.provider.oauth.service.google');\n $instance->add('auth.provider.oauth.service.twitter');\n\n return $instance;\n }", "public function provides()\n {\n return [CardService::class];\n }", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "public function provides()\n {\n return [\n 'auth',\n 'Permit\\CurrentUser\\ContainerInterface',\n 'Permit\\Access\\CheckerInterface',\n 'Permit\\CurrentUser\\LoginValidatorInterface'\n ];\n }", "public function getProviders($provider)\n {\n $name = is_string($provider) ? $provider : getClass($provider, true);\n \n return Arr::where($this->serviceProviders, function ($value) use ($name) {\n return $value instanceof $name;\n });\n }", "public function getServiceCheckProviders(): array\n {\n return $this->serviceCheckProviders;\n }", "public static function getDeferredServices(){\n return \\Illuminate\\Foundation\\Application::getDeferredServices();\n }", "abstract public function getProviders();", "private function providers()\n {\n $this->register(new CorsServiceProvider());\n $this->register(new HmacServiceProvider());\n }", "public function getDeferredServices(): array\n {\n return $this->deferredServices;\n }", "public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }", "public function provides()\n {\n return [\n EventDispatcher::class,\n Repository::class,\n ];\n }", "public function getServiceProvider(): Provider\n {\n return $this->serviceProvider;\n }", "protected function getPuntoAtencionServices()\n {\n return $this->container->get('snc.services.puntoatencion');\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function provides()\n {\n return [\n Factory::class,\n 'flipbox.sdk',\n ];\n }", "public function provides()\n {\n return array(\n 'icsconfig',\n 'icsview',\n 'icsmessage',\n 'icspdf'\n );\n }", "public function getAvailableServices();", "public function provides()\n {\n return [\n ZhyuAuthServiceProvider::class,\n ];\n }", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function providers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/providers');\n }", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function getPayrollServices()\n\t{\n\t\treturn $this->payrollServices = new PayrollServices();\n\t}", "public function provides()\n {\n return ['shppcart_service'];\n }", "public function provides()\n {\n return ['vk_service'];\n }", "public function provides() {\n\t\treturn array();\n\t}" ]
[ "0.79039633", "0.7667588", "0.76229626", "0.75573224", "0.7470691", "0.7423859", "0.7423859", "0.7423859", "0.7409516", "0.736475", "0.736475", "0.7363987", "0.7322196", "0.71889", "0.7162814", "0.71509963", "0.7137116", "0.70622355", "0.7047945", "0.70362085", "0.70213807", "0.69303095", "0.6916005", "0.689161", "0.6809766", "0.6804473", "0.6777694", "0.67695314", "0.67489713", "0.6727971", "0.6722673", "0.6699434", "0.66944385", "0.6651968", "0.6645622", "0.66324407", "0.66324407", "0.6616089", "0.6613961", "0.6610317", "0.66008735", "0.6567814", "0.6562319", "0.6529889", "0.6500722", "0.6480351", "0.64535", "0.645232", "0.6418372", "0.6416018", "0.6413331", "0.6397339", "0.63955915", "0.63899195", "0.6379133", "0.63766354", "0.63379693", "0.63369566", "0.63356155", "0.6335485", "0.6318311", "0.6316751", "0.63084865", "0.62963986", "0.6278965", "0.6264424", "0.6264424", "0.62581587", "0.6252555", "0.6252555", "0.62434787", "0.62404764", "0.623751", "0.62194616", "0.6210146", "0.6203944", "0.62002736", "0.6197869", "0.61938506", "0.6188146", "0.61726904", "0.6170289", "0.6163297", "0.61600006", "0.61570746", "0.6152867", "0.6147815", "0.6147383", "0.61295825", "0.6126574", "0.6124758", "0.61204225", "0.6100293", "0.60957974", "0.6073751", "0.6072919", "0.60692966", "0.6069216", "0.60561067", "0.604959", "0.60481" ]
0.0
-1
Mocks don't work on this gateway because it has to call cURL directly.
public function testPurchaseSuccess() { // $this->setMockHttpResponse('WebservicePurchaseSuccess.txt'); $data = file_get_contents(__DIR__ . '/Mock/WebservicePurchaseSuccess.txt'); $purchase = $this->gateway->purchase($this->options); $response = $purchase->createResponse($data); // echo "Response data =\n"; // print_r($response->getData()); // echo "\nEnd Response data\n"; $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertEquals('259611::1452486844', $response->getTransactionReference()); $this->assertNull($response->getMessage()); $this->assertEquals('APPROVED', $response->getCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setUpCurl()\n {\n $this->curl = $this->get('app.curl.connector');\n $this->curl->setEndPointBaseUrl($this->getParameter('themoviedb_endpoint_url'));\n $this->curl->setExtraHeaders([\n CURLOPT_HEADER => false,\n CURLOPT_HTTPHEADER => [\"Accept: application/json\"],\n CURLOPT_SSL_VERIFYPEER => false\n ]);\n }", "private function init() {\n $this->_cm = curl_init();\n curl_setopt($this->_cm, CURLOPT_PROXY, $config['curl']['proxy']);\n curl_setopt($this->_cm, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->_cm, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($this->_cm, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->_cm, CURLOPT_TIMEOUT, $config['curl']['timeout']);\n curl_setopt($this->_cm, CURLOPT_POST, true); \n }", "public function calls_are_proxied()\n {\n // Arrange\n $service = new Service;\n $methods = array('get', 'put', 'post', 'patch', 'delete', 'head');\n $url = 'users/me';\n $client = Mockery::mock('GuzzleHttp\\Client');\n $response = Mockery::mock('GuzzleHttp\\Message\\Response');\n\n foreach ($methods as $method) {\n $client->shouldReceive($method)->once()\n ->with($url)->andReturn($response);\n $service->setClient($client);\n\n // Act\n $result = $service->$method($url);\n\n // Assert\n $this->assertEquals($response, $result);\n }\n }", "private function configureCurl ()\n {\n curl_setopt_array($this->cURL, [\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => true\n ]);\n }", "private function initCurl()\n {\n $this->curlObj = curl_init();\n curl_setopt_array($this->curlObj, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_FORBID_REUSE => true,\n CURLOPT_HEADER => false,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 2,\n CURLOPT_HTTPHEADER => [\"Connection: Keep-Alive\", \"Keep-Alive: 120\"]\n ));\n }", "private function dispatch(): void {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"{$this->apiUrl}/{$this->endpoint}\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => \"CURL_HTTP_VERSION_1_1\",\n CURLOPT_CUSTOMREQUEST => $this->method\n ));\n\n $this->response = curl_exec($curl); \n curl_close($curl);\n }", "public function test_get_gateway()\n {\n\n $payum = m::spy('Payum\\Core\\Payum');\n $request = m::spy('Illuminate\\Http\\Request');\n $responseFactory = m::spy('Illuminate\\Contracts\\Routing\\ResponseFactory');\n $converter = m::spy('Payum\\Core\\Bridge\\Symfony\\ReplyToSymfonyResponseConverter');\n\n $gateway = m::spy('Payum\\Core\\GatewayInterface');\n $gatewayName = 'foo.gateway';\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $payum\n ->shouldReceive('getGateway')->andReturn($gateway);\n\n $payumService = new PayumService($payum, $request, $responseFactory, $converter);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $this->assertSame($gateway, $payumService->getGateway($gatewayName));\n $payum->shouldHaveReceived('getGateway')->with($gatewayName)->once();\n }", "function updateCurl($url,$method){\r\n \r\n $curl = curl_init();\r\n // Set some options - we are passing in a useragent too here\r\n curl_setopt_array($curl, array(\r\n CURLOPT_RETURNTRANSFER => 1,\r\n CURLOPT_URL => $url,\r\n CURLOPT_USERAGENT => 'Codular Sample cURL Request'\r\n ));\r\n // Send the request & save response to $resp\r\n $resp = curl_exec($curl);\r\n // Close request to clear up some resources\r\n curl_close($curl);\r\n return $resp;\r\n \r\n \r\n}", "protected function init()\n {\n $this->curl = curl_init();\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n // this line makes it work under https\n curl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_REFERER, $this->referer);\n if (isset($this->encoding)) {\n curl_setopt($this->curl, CURLOPT_ENCODING, $this->encoding);\n }\n if ($this->omitSSLVerification) {\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n if (isset($this->userAuthData)) {\n curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->curl, CURLOPT_USERPWD, $this->userAuthData);\n }\n if ($this->proxy != '') {\n curl_setopt($this->curl, CURLOPT_PROXY, $this->proxy);\n if ($this->proxyType == self::PROXY_TYPE_SOCKS4) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);\n } else if ($this->proxyType == self::PROXY_TYPE_SOCKS5) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);\n }\n }\n $this->errorno = false;\n $this->error = false;\n }", "public function sendCurl() {\n\t\t$this->curlResponse = $this->curl->exec();\n\t}", "function curlWrap($url, $json)\n{\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($ch, CURLOPT_URL, ZDURL . $url);\n curl_setopt($ch, CURLOPT_USERPWD, ZDUSER . \"/token:\" . ZDAPIKEY);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-type: application/json'\n ));\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\n $info = curl_getinfo($ch);\n $output = curl_exec($ch);\n curl_close($ch);\n $decoded = json_decode($output);\n return $decoded;\n\n $info = curl_getinfo($ch);\n return $info;\n\n}", "public function setupCurl()\n {\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL,\"https://jsonplaceholder.typicode.com/posts\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n return $ch;\n }", "private function http($url, $method = \"GET\", $postfields=NULL){\n $this->http_info = array();\n $handle = curl_init();\n /* Curl settings */\n curl_setopt($handle, CURLOPT_HEADER, FALSE);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);\n curl_setopt($handle, CURLOPT_HTTPHEADER, array('Expect:'));\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, $this->verifypeer);\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($handle, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($handle, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($handle, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n \n if ($this->proxy_settings['behind_proxy']){\n curl_setopt($ci, CURLOPT_PROXY, $this->proxy_settings['host']);\n curl_setopt($ci, CURLOPT_PROXYPORT, $this->proxy_settings['port']);\n curl_setopt($ci, CURLOPT_PROXYUSERPWD, \"{$this->proxy_settings['user']}:{$this->proxy_settings['pass']}\");\n curl_setopt($ci, CURLOPT_PROXYTYPE, $this->proxy_settings['type']);\n curl_setopt($ci, CURLOPT_PROXYAUTH, $this->proxy_settings['auth']);\n }\n \n switch($method){\n case self::$METHOD_POST:\n curl_setopt($handle, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($handle, CURLOPT_POSTFIELDS, $postfields);\n }\n break;\n case self::$METHOD_DELETE:\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)){\n $url .= \"?\".OAuthUtil::build_http_query($postfields);\n }\n break;\n }\n curl_setopt($handle, CURLOPT_URL, $url);\n $response = curl_exec($handle);\n $this->http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($handle));\n $this->url = $url;\n curl_close($handle);\n return $response;\n }", "function api_test_curl()\r\n\t{\r\n\t\techo \"true\";\r\n\t}", "public function __construct(){\n $this->connection = curl_init();\n }", "private function sendQueryByCurl() {\n $this->curl = curl_init();\n\n // JSON data request\n $jsonData = $this->getJsonData();\n\n // some params\n $urlParams = $this->getParamsUrlFormat();\n\n $this->setCurlOpts($this->curl, $jsonData, $urlParams);\n $this->setResult(curl_exec($this->curl));\n $this->setHttpCode(curl_getinfo($this->curl, CURLINFO_HTTP_CODE));\n\n curl_close($this->curl);\n }", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "function basicCurl($curlURL) {\n $url = $curlURL;\n $cURL = curl_init();\n curl_setopt($cURL, CURLOPT_URL, $url);\n curl_setopt($cURL, CURLOPT_HTTPGET, true);\n curl_setopt($cURL, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Accept: application/json'\n ));\n curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_USERAGENT, \"spider\");\n $result = curl_exec($cURL);\n \nif ($result === FALSE) {\n return \"cURL Error: \" . curl_error($cURL);\n} else {\n\treturn $result;\n}\n curl_close($cURL);\n \n}", "public function CB_Test_Gateway()\r\n {\r\n $request_command = $this->_REST_Handle();\r\n \r\n // Benchmark purpose\r\n if ($this->dump_benchmark_file === True)\r\n {\r\n $data = \"\\tCB_Test_gateway\";\r\n write_file($this->benchmark_dump_file, $data, 'a+');\r\n \r\n }\r\n \r\n if($request_command[\"AUTH\"] == True)\r\n {\r\n echo json_encode(\"Test: Success to Authenticate the request by Webservice\");\r\n }\r\n else\r\n {\r\n echo json_encode(\"Test: Failed to Authenticate the request by Webservice\");\r\n }\r\n }", "public function __construct() {\n $this->curl_handle = curl_init();\n curl_setopt($this->curl_handle, CURLOPT_TIMEOUT, $this->time_out);\n curl_setopt($this->curl_handle, CURLOPT_CONNECTTIMEOUT, $this->connect_time_out);\n curl_setopt($this->curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl_handle, CURLOPT_AUTOREFERER, true);\n curl_setopt($this->curl_handle, CURLOPT_FOLLOWLOCATION, true);\n }", "public function setCurlCall($data, $address, $method = 'POST'){\n\n $apiUrl=Mage::getStoreConfig('paynovapayment/settings/api_live_url');\n $apiTest=Mage::getStoreConfig('paynovapayment/settings/api_test_url');\n $apiMode=Mage::getStoreConfig('paynovapayment/settings/api_mode');\n $password=Mage::helper('core')->decrypt(Mage::getStoreConfig('paynovapayment/settings/password'));\n $username=Mage::getStoreConfig('paynovapayment/settings/merchant_id');\n\n $paynova_url = $apiUrl;\n if($apiMode!='1') {\n $paynova_url = $apiTest;\n }\n\n //check if https:// or http:// exist in URL.\n $prot_sec = \"https://\";\n $prot_uns = \"http://\";\n\n $pos = stripos($paynova_url, $prot_sec);\n if ($pos === false) {\n $pos = stripos($paynova_url, $prot_uns);\n if ($pos === false) {\n $paynova_url = $prot_sec.$paynova_url;\n } else if ($pos>0){\n $paynova_url = $prot_sec.$paynova_url;\n }\n } else if ($pos>0){\n $paynova_url = $prot_sec.$paynova_url;\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"$paynova_url$address\");\n curl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n if($method == 'POST') {\n curl_setopt($ch, CURLOPT_POST, 1);\n if ($data) {\n $data = json_encode($data);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n }\n\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); //\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n $output = curl_exec($ch);\n curl_close($ch);\n\n Mage::helper('paynovapayment')->log(\"Curl call to: \".$paynova_url.$address);\n Mage::helper('paynovapayment')->log($data);\n if ($address !=\"/paymentoptions/\") {\n Mage::helper('paynovapayment')->log(json_decode($output));\n }\n return json_decode($output);\n }", "private function mockCurl($requestBody, $statusCode = 200, $response = '', $error = '', $pages = 1)\n {\n $curl = m::mock('overload:' . Curl::class);\n\n $curl->shouldReceive('setDataType')\n ->once()\n ->with('application/json');\n\n $curl->shouldReceive('post')\n ->with('http://127.0.0.1/delta/', $requestBody)\n ->times(1);\n\n $curl->shouldReceive('getStatus')\n ->times($pages)\n ->andReturn($statusCode);\n\n $curl->shouldReceive('getError')\n ->times($pages)\n ->andReturn($error);\n\n $curl->shouldReceive('getBody')\n ->times($pages)\n ->andReturn($response);\n\n return $curl;\n }", "protected function setUp(): void\n\t{\n\t\t$this->httpClient = new \\GuzzleHttp\\Client(\\App\\Utils::merge(\\App\\RequestHttp::getOptions(), [\n\t\t\t'base_uri' => \\App\\Config::main('site_URL') . 'webservice/ManageConsents/',\n\t\t\t'Content-Type' => 'application/json',\n\t\t\t'Accept' => 'application/json',\n\t\t\t'timeout' => 60,\n\t\t\t'connect_timeout' => 60,\n\t\t\t'http_errors' => false,\n\t\t\t'headers' => [\n\t\t\t\t'x-raw-data' => 1,\n\t\t\t],\n\t\t]));\n\t}", "public function testDoTokenRequest() {\n $params = [\n 'redirect_uri' => 'http://localhost/eloqua_api_redux/callback',\n 'grant_type' => 'refresh_token',\n 'refresh_token' => 'SplxlOBeZQQYbYS6WxSbIA',\n ];\n $mockedResponse = new Response(200,\n ['Content-Type' => 'application/json'],\n $this->getMockResponseContents(self::ACCESS_TOKEN_RESPONSE)\n );\n\n $httpClientFactory = $this->getMockBuilder('Drupal\\Core\\Http\\ClientFactory')\n ->disableOriginalConstructor()\n ->setMethods(['fromOptions'])\n ->getMock();\n\n $guzzleClient = $this->getMockBuilder('GuzzleHttp\\Client')\n ->disableOriginalConstructor()\n ->setMethods(['request'])\n ->getMock();\n\n $guzzleClient->expects($this->any())\n ->method('request')\n ->will($this->returnValue($mockedResponse));\n\n $httpClientFactory->expects($this->any())\n ->method('fromOptions')\n ->will($this->returnValue($guzzleClient));\n\n $eloquaApiClient = $this->getMockBuilder('Drupal\\eloqua_api_redux\\Service\\EloquaApiClient')\n ->setConstructorArgs([\n $this->configFactory,\n $this->loggerFactory,\n $this->cacheBackend,\n $httpClientFactory,\n ])\n ->setMethods(['setEloquaApiCache', 'doBaseUrlRequest'])\n ->getMock();\n\n $eloquaApiClient->expects($this->at(0))\n ->method('setEloquaApiCache')\n ->with('access_token');\n $eloquaApiClient->expects($this->at(1))\n ->method('setEloquaApiCache')\n ->with('refresh_token');\n\n $eloquaApiClient->expects($this->any())\n ->method('setEloquaApiCache');\n\n $response = $eloquaApiClient->doTokenRequest($params);\n $this->assertNotEmpty($response);\n }", "public static function connect($XCurlObject)\t{\n\n // Initialisation de la connexion CURL\n $CurlConnection = curl_init();\n\n // Affectation des paramètres d'authentification\n if ($XCurlObject->authentication() != null) {\n $authentication_string = \"Authorization:Basic \".$XCurlObject->authentication();\n $current_header = $XCurlObject->header();\n $current_header[] = $authentication_string;\n $XCurlObject->setHeader($current_header);\n }\n\n // Mise en place des identifiants\n $proxy_ids = \"\";\n if ($XCurlObject->proxy_login() != \"\" && $XCurlObject->proxy_pwd() != \"\") {\n $proxy_ids = $XCurlObject->proxy_login().\":\".$XCurlObject->proxy_pwd().\"@\";\n }\n\n // Paramétrage du proxy\n if ($XCurlObject->proxy() === true) {\n curl_setopt($CurlConnection, CURLOPT_PROXY, $XCurlObject->proxy_protocol().\"://\".$proxy_ids.$XCurlObject->proxy_server().\":\".$XCurlObject->proxy_port());\n }\n\n // Mise en place de la connexion en méthode POST\n if ($XCurlObject->type() == 1) {\n curl_setopt($CurlConnection, CURLOPT_POST, true);\n curl_setopt($CurlConnection, CURLOPT_POSTFIELDS, $XCurlObject->request());\n } else {\n // curl_setopt($CurlConnection, CURLOPT_POST, false);\n }\n\n // Affectation des paramètres\n curl_setopt($CurlConnection, CURLOPT_URL, $XCurlObject->url());\n curl_setopt($CurlConnection, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($CurlConnection, CURLOPT_HTTPHEADER, $XCurlObject->header());\n curl_setopt($CurlConnection, CURLOPT_CONNECTTIMEOUT, $XCurlObject->connection_timeout());\n curl_setopt($CurlConnection, CURLOPT_TIMEOUT, $XCurlObject->request_timeout());\n curl_setopt($CurlConnection, CURLOPT_VERBOSE, $XCurlObject->verbose());\n curl_setopt($CurlConnection, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\n // Exécution de la connexion\n $CurlConnectionResult = curl_exec($CurlConnection);\n\n // Récupération des informations de la connexion\n $CurlConnectionInformations = curl_getinfo($CurlConnection);\n\n // Récupération des erreurs liées à la connexion\n $CurlConnectionErrors = curl_error($CurlConnection);\n\n // Fermeture de la connexion\n curl_close($CurlConnection);\n\n return $CurlConnectionResult;\n\n\t}", "public function testCurlAction()\n {\n \t$username = '[email protected]';\n \t$password = 'strip0';\n \n \t$payloadName = array('ddd' => 'ddd');\n \n \t$path_to_log_file = APPLICATION_PATH . \"/../corn/provision.zip\";\n \n \t// $file_name_with_full_path = '';\n \n \t$post['provisions'] = '@'.$path_to_log_file;\n \n \n \t$process = curl_init('http://api.nexva.com/metaflow/submit');\n \t//curl_setopt($process, CURLOPT_HTTPHEADER, array('Content-Type: application/xml', $additionalHeaders));\n \t// curl_setopt($process, CURLOPT_HEADER, 1);\n \tcurl_setopt($process, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n \tcurl_setopt($process, CURLOPT_USERPWD, $username . \":\" . $password);\n \tcurl_setopt($process, CURLOPT_TIMEOUT, 30);\n \tcurl_setopt($process, CURLOPT_POST, 1);\n \tcurl_setopt($process, CURLOPT_POSTFIELDS, $post);\n \tcurl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);\n \t$return = curl_exec($process);\n \n \n \tZend_Debug::dump( $return );\n \tdie();\n \n \n \t$request_xml = null;\n \n \t$ch = curl_init();\n \tcurl_setopt($ch, CURLOPT_URL, 'http://api.nexva.com/metaflow/submit ');\n \tcurl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n \tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n \tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n \tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \tcurl_setopt($ch, CURLOPT_TIMEOUT, 4);\n \tcurl_setopt($ch, CURLOPT_POSTFIELDS, $request_xml);\n \t// curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));\n \n \t//Execute the request and also time the transaction ( optional )\n \t$start = array_sum(explode(' ', microtime()));\n \t$result = curl_exec($ch);\n \t$stop = array_sum(explode(' ', microtime()));\n \t$totalTime = $stop - $start;\n \n \t//Check for errors ( again optional )\n \tif ( curl_errno($ch) ) {\n \t\t$result = 'ERROR -> ' . curl_errno($ch) . ': ' . curl_error($ch);\n \t} else {\n \t\t$returnCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);\n \t\tswitch($returnCode){\n \t\t\tcase 200:\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\t$result = 'HTTP ERROR -> ' . $returnCode;\n \t\t\t\tbreak;\n \t\t}\n \t}\n \n \t//Close the handle\n \tcurl_close($ch);\n \n \t//Output the results and time\n \techo 'Total time for request: ' . $totalTime . \"\\n\";\n \techo $result;\n \n \n }", "private function initCurl()\n\t{\n\t\t$this->_curl = curl_init();\n\t\t//TODO: delete useless lines\n\t\tcurl_setopt ($this->_curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt ($this->_curl, CURLOPT_TIMEOUT, 4000);\n\t\tcurl_setopt ($this->_curl, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEJAR, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEFILE, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_POST, 1);\n\t}", "public function __construct()\n {\n $this->ch = curl_init();\n $this->initialize();\n }", "public function execute(Carerix_Api_Rest_Request $request)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $request->getUrl());\n // This constant is not available when open_basedir or safe_mode are enabled.\n// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // [AY] CURLOPT_VERBOSE, CURLOPT_HEADER required for capturing response headers\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLINFO_HEADER_OUT, 1); // [AY] required for capturing request headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Expect:']);\n curl_setopt($ch, CURLOPT_USERAGENT, __CLASS__);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n $proxy = $request->getProxy();\n if ($proxy) {\n $proxy = parse_url($proxy);\n curl_setopt($ch, CURLOPT_PROXY, $proxy['host']);\n if (array_key_exists('port', $proxy)) {\n curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']);\n }\n }\n\n $username = $request->getUsername();\n $password = $request->getPassword();\n\n if ($username && $password) {\n curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);\n }\n\n switch ($request->getMethod()) {\n case self::POST:\n case self::PUT:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getMethod());\n switch ($request->getResponseType()) {\n case 'xml':\n $contentType = 'application/xml';\n break;\n\n case 'json':\n $contentType = 'application/json';\n break;\n\n case 'sencha':\n case 'js':\n $contentType = 'application/javascript';\n break;\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: ' . $contentType]);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request->getBody());\n break;\n case self::DELETE:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n case self::GET:\n default:\n break;\n }\n\n $response = curl_exec($ch);\n\n $this->last_request = curl_getinfo($ch, CURLINFO_HEADER_OUT);\n $this->last_request .= $request->getBody();\n // [AY] in case of 204 No content response response is always empty\n if ($response === false) {\n $errorNumber = curl_errno($ch);\n $error = curl_error($ch);\n curl_close($ch);\n\n throw new Exception($errorNumber . ': ' . $error);\n }\n\n $response = $this->parseResponse($response);\n $this->last_response = $response;\n\n [$header, $body] = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (!in_array($code, ['200', '201', '204'])) {\n throw new Carerix_Api_Rest_Exception($body, $code);\n }\n curl_close($ch);\n\n return $body;\n }", "public function __construct()\n\t{\n\t\t$this->curl = curl_init();\n\t}", "public function testobtenerInstituciones()\n {\n $this->withoutExceptionHandling();\n $response = $this->call('POST','/obtenerInstituciones');\n $this->assertEquals(200, $response->getStatusCode());\n //$response->assertStatus(200);\n \n \n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n $this->http_info = array();\r\n $ci = curl_init();\r\n /* Curl settings */\r\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r\n if (version_compare(phpversion(), '5.4.0', '<')) {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\r\n } else {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);\r\n }\r\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\r\n switch ($method) {\r\n case 'POST':\r\n curl_setopt($ci, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n $this->postdata = $postfields;\r\n }\r\n break;\r\n case 'DELETE':\r\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url = \"{$url}?{$postfields}\";\r\n }\r\n }\r\n\r\n if ( isset($this->access_token) && $this->access_token )\r\n $headers[] = \"Authorization: OAuth2 \".$this->access_token;\r\n\r\n if ( !empty($this->remote_ip) ) {\r\n if ( defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\r\n } else {\r\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\r\n }\r\n } else {\r\n if ( !defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n }\r\n }\r\n curl_setopt($ci, CURLOPT_URL, $url );\r\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n $response = curl_exec($ci);\r\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n $this->url = $url;\r\n\r\n if ($this->debug) {\r\n echo \"=====post data======\\r\\n\";\r\n var_dump($postfields);\r\n\r\n echo \"=====headers======\\r\\n\";\r\n print_r($headers);\r\n\r\n echo '=====request info====='.\"\\r\\n\";\r\n print_r( curl_getinfo($ci) );\r\n\r\n echo '=====response====='.\"\\r\\n\";\r\n print_r( $response );\r\n }\r\n curl_close ($ci);\r\n return $response;\r\n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\n $this->http_info = array();\n $ci = curl_init();\n /* Curl settings */\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n switch ($method) {\n case 'POST':\n curl_setopt($ci, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n $this->postdata = $postfields;\n }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n if (isset($this->access_token) && $this->access_token)\n $headers[] = \"Authorization: OAuth2 \" . $this->access_token;\n if (!empty($this->remote_ip)) {\n if (defined('SAE_ACCESSKEY')) {\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\n } else {\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\n }\n } else {\n if (!defined('SAE_ACCESSKEY')) {\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\n }\n }\n curl_setopt($ci, CURLOPT_URL, $url);\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);\n $response = curl_exec($ci);\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n $this->url = $url;\n if ($this->debug) {\n echo \"=====post data======\\r\\n\";\n var_dump($postfields);\n echo \"=====headers======\\r\\n\";\n print_r($headers);\n echo '=====request info=====' . \"\\r\\n\";\n print_r(curl_getinfo($ci));\n echo '=====response=====' . \"\\r\\n\";\n print_r($response);\n }\n curl_close($ci);\n return $response;\n }", "public function testCurlError()\n {\n $expectedBody = $this->getExpectedBody(\n [\n ['SKU' => 'test123']\n ],\n []\n );\n\n $this->mockEndpoint();\n $this->mockCurl($expectedBody, 500, '', 'Some error');\n\n $error = '';\n try {\n $this->subject->addData(['SKU' => 'test123']);\n $this->subject->send();\n } catch (Exception $e) {\n $error = $e->getMessage();\n }\n\n $this->assertEquals(\n 'Error: HTTP 500 Response | Error Message: Some error | Body: ',\n $error\n );\n }", "private function sendCurl($url) {\n $handle = curl_init();\n $opts = curl_setopt_array($handle, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => 'https://' . $url . \"&method=CURL\",\n CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],\n CURLOPT_POST => 1,\n CURLOPT_POSTFIELDS => $this->payload\n ));\n // Send the request & save response to $resp\n $exec = curl_exec($handle);\n // Close request to clear up some resources\n $close = curl_close($handle);\n\n //$json_array = json_decode($exec, TRUE);\n\n if($this->testing) echo \"<hr /><h1>JSON RESPONSE:</h1><br />$exec <hr />\";\n }", "function init_curl()\n\t{\n\t\t$this->ch = curl_init();\n\t\t$user_agent = $this->user_agent;\n\t\t$header[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header[] = \"Accept-Language: en-US\";\n\t\t$header[] = \"User-Agent: \" . $user_agent;\n\t\t$header[] = \"Connection: Keep-Alive\";\n\t\t$header[] = \"Pragma:\";\n\t\t$header[] = \"Expect:\";\n\t\t$header[] = \"Content-Type:\";\n\n\t\t$this->header = $header;\n\n\t\t$header2[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header2[] = \"Accept-Language: en-US\";\n\t\t$header2[] = \"User-Agent: \" . $user_agent;\n\t\t$header2[] = \"Connection: Keep-Alive\";\n\t\t$header2[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header2[] = \"Pragma:\";\n\t\t$header2[] = \"Expect:\";\n\n\t\t$this->header_post = $header2;\n\n\t\t$header3[] = \"Accept: application/json, text/javascript, */*\";\n\t\t$header3[] = \"Accept-Language: en-US\";\n\t\t$header3[] = \"User-Agent: \" . $user_agent;\n\t\t$header3[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header3[] = \"x-requested-with: XMLHttpRequest\";\n\t\t$header3[] = \"Connection: Keep-Alive\";\n\t\t$header3[] = \"Pragma:\";\n\t\t$header3[] = \"Expect:\";\n\n\t\t$this->header_json = $header3;\n\n\t\t$header4[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header4[] = \"Accept-Language: en-US\";\n\t\t$header4[] = \"User-Agent: \" . $user_agent;\n\t\t$header4[] = \"Connection: Keep-Alive\";\n\t\t$header4[] = \"Content-Type: multipart/form-data\";\n\t\t$header4[] = \"Pragma:\";\n\t\t$header4[] = \"Expect:\";\n\n\t\t$this->header_multipart = $header4;\n\n\t\tcurl_setopt($this->ch, CURLOPT_USERAGENT, $user_agent);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\t//curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip, deflate');\n\t\tcurl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_VERBOSE, $this->opt[\"verbose\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_TIMEOUT, $this->opt[\"timeout\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tif ($this->opt[\"use_proxy\"] && isset($proxy))\n\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $proxy);\n\t\t//print \"Set Curl Proxy $proxy\\n\";\n\t\t//curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, \"ocbeta:echo11ra\");\n\n\t\t//if ($this->opt[\"use_ips\"])\n\t\t//curl_setopt($this->ch, CURLOPT_INTERFACE, $this->get_ip());\n\t}", "function __apiCall($url, $post_parameters = FALSE) {\n \n \t// Initialize the cURL session\n\t $curl_session = curl_init();\n\t \t\n\t // Set the URL of api call\n\t\tcurl_setopt($curl_session, CURLOPT_URL, $url);\n\t\t \n\t\t// If there are post fields add them to the call\n\t\tif($post_parameters !== FALSE) {\n\t\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $post_parameters);\n\t\t}\n\t\t \n\t\t// Return the curl results to a variable\n\t curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);\n\t\t \n\t // Execute the cURL session\n\t $contents = curl_exec ($curl_session);\n\t\t \n\t\t// Close cURL session\n\t\tcurl_close ($curl_session);\n\t\t \n\t\t// Return the response\n\t\treturn json_decode($contents);\n \n }", "public function testPrepareApiRequest()\n {\n /** @var array $billingData */\n $billingData = [\n 'firstname' => 'Someone',\n 'lastname' => 'Somebody',\n 'telephone' => '555-555-5555',\n 'street' => '630 Allendale Rd',\n 'city' => 'King of Prussia',\n 'region_code' => 'PA',\n 'country' => 'US',\n 'postcode' => '19604',\n ];\n /** @var Mage_Sales_Model_Order_Address $shippingAddress */\n $shippingAddress = Mage::getModel('sales/order_address', ['id' => 1]);\n /** @var Mage_Sales_Model_Order_Address $billingAddress */\n $billingAddress = Mage::getModel('sales/order_address', array_merge($billingData, ['id' => 2]));\n /** @var Mage_Sales_Model_Order $order */\n $order = Mage::getModel('sales/order', [\n 'is_virtual' => true\n ]);\n $order->setShippingAddress($shippingAddress)\n ->setBillingAddress($billingAddress);\n /** @var Mage_Sales_Model_Order_Payment $orderPayment */\n $orderPayment = Mage::getModel('sales/order_payment', ['cc_exp_year' => 2023, 'cc_exp_month' => 8])->setOrder($order);\n\n $mockMethods = [\n 'setIsEncrypted' => null,\n 'setRequestId' => null,\n 'setOrderId' => null,\n 'setPanIsToken' => null,\n 'setCardNumber' => null,\n 'setExpirationDate' => null,\n 'setCardSecurityCode' => null,\n 'setAmount' => null,\n 'setCurrencyCode' => null,\n 'setEmail' => null,\n 'setIp' => null,\n 'setBillingFirstName' => $billingData['firstname'],\n 'setBillingLastName' => $billingData['lastname'],\n 'setBillingPhone' => $billingData['telephone'],\n 'setBillingLines' => $billingData['street'],\n 'setBillingCity' => $billingData['city'],\n 'setBillingMainDivision' => $billingData['region_code'],\n 'setBillingCountryCode' => $billingData['country'],\n 'setBillingPostalCode' => $billingData['postcode'],\n // Expecting shipping setter methods for the request payload to be\n // fill-out with billing data.\n 'setShipToFirstName' => $billingData['firstname'],\n 'setShipToLastName' => $billingData['lastname'],\n 'setShipToPhone' => $billingData['telephone'],\n 'setShipToLines' => $billingData['street'],\n 'setShipToCity' => $billingData['city'],\n 'setShipToMainDivision' => $billingData['region_code'],\n 'setShipToCountryCode' => $billingData['country'],\n 'setShipToPostalCode' => $billingData['postcode'],\n ];\n /** @var ICreditCardAuthRequest $request **/\n $request = $this->getMockForAbstractClass('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Payment\\ICreditCardAuthRequest', [], '', true, true, true, array_keys($mockMethods));\n foreach ($mockMethods as $method => $with) {\n if (is_null($with)) {\n $request->expects($this->once())\n ->method($method)\n ->will($this->returnSelf());\n } else {\n // Using \"with\" only when there's an actual value\n $request->expects($this->once())\n ->method($method)\n ->with($this->identicalTo($with))\n ->will($this->returnSelf());\n }\n }\n /** @var IBidirectionalApi $api */\n $api = $this->getMockForAbstractClass('\\eBayEnterprise\\RetailOrderManagement\\Api\\IBidirectionalApi', [], '', true, true, true, ['getRequestBody']);\n $api->expects($this->once())\n ->method('getRequestBody')\n ->will($this->returnValue($request));\n\n /** @var Radial_CreditCard_Model_Method_Ccpayment $payment */\n $payment = Mage::getModel('radial_creditcard/method_ccpayment');\n\n $this->assertSame($payment, EcomDev_Utils_Reflection::invokeRestrictedMethod($payment, '_prepareAuthRequest', [$api, $orderPayment]));\n }", "public function testClient()\n {\n $app = new \\Duality\\App(dirname(__FILE__), null);\n $client = $app->call('client');\n\n $expected = 'dummy';\n $client->setUserAgent($expected);\n $result = $client->getUserAgent();\n $this->assertEquals($expected, $result);\n\n $url = new Url('http://google.pt/');\n $request = $client->createRequest($url);\n $response = $client->execute($request);\n $this->assertInstanceOf('\\Duality\\Structure\\Http\\Response', $response);\n\n $expected = 'Moved Permanently';\n $result = $response->getCodeString();\n $this->assertEquals($expected, $result);\n\n $url = new Url('http://google.pt/');\n $request = $client->createRequest($url);\n $request->addHeader('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');\n $response = $client->execute($request);\n $client->getCurlHandler();\n\n $client->terminate();\n }", "public function testCurlGoodUrl()\n {\n $curl = new CurlClass();\n \n $res = $curl->submit('http://feeds.nationalgeographic.com/ng/News/News_Main');\n $this->assertTrue($res, 'test url ktory zwraca kod 200');\n }", "function testSimplePost() {\n \n $curlAdapter = new CurlAdapter();\n \n $post = array (\n 'SECURITY.SENDER' => '31HA07BC8142C5A171745D00AD63D182',\n 'USER.LOGIN' => '31ha07bc8142c5a171744e5aef11ffd3',\n 'USER.PWD' => '93167DE7',\n 'TRANSACTION.MODE' => 'CONNECTOR_TEST',\n 'TRANSACTION.CHANNEL' => '31HA07BC8142C5A171744F3D6D155865',\n 'PAYMENT.CODE' => 'CC.RG',\n 'FRONTEND.MODE' => 'WHITELABEL',\n 'FRONTEND.ENABLED' => 'TRUE',\n 'FRONTEND.LANGUAGE' => 'EN',\n 'FRONTEND.RESPONSE_URL' => 'http://dev.heidelpay.de',\n 'CONTACT.IP' => '127.0.0.1',\n 'REQUEST.VERSION' => '1.0'\n \n );\n \n $result = $curlAdapter->sendPost('https://test-heidelpay.hpcgw.net/ngw/post', $post);\n \n \n $this->assertTrue(is_array($result[0]), 'First result key should be an array.');\n $this->assertTrue(is_object($result[1]), 'Secound result key should be an object.');\n \n \n $this->assertFalse($result[1]->isError(), 'isError should return true');\n $this->assertTrue($result[1]->isSuccess(), 'isSuccess should return false');\n \n }", "function connect($con_type, $post_data){\n $con_array = array(\n '1' => 'https://ipaytest.arca.am:8445/payment/rest/register.do',\n '2' => 'https://ipaytest.arca.am:8445/payment/rest/getOrderStatusExtended.do',\n '3' => 'https://ipaytest.arca.am:8445/payment/rest/reverse.do'\n );\n\n $curl = curl_init($con_array[$con_type]);\n\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER , true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\n $x = curl_exec($curl);\n\n curl_close($curl);\n $result = json_decode($x);\n return $result;\n}", "public function invalid_calls_are_not_proxied()\n {\n // Arrange\n $method = 'nonExistingHttpVerb';\n $url = 'users/me';\n $client = Mockery::mock('GuzzleHttp\\Client');\n $service = (new Service)->setClient($client);\n\n // Act\n $result = $service->$method($url);\n\n // Assert\n }", "public function testBillingServiceWorksWithMockDriver()\n {\n $biller = new Billing('mock');\n $response = $biller->chargeCustomer(['mobile_number' => '+193349847384', 'amount' => 500000]);\n $this->assertEquals($response['status'], 'success');\n $this->assertEquals($response['data']['amount'], 500000);\n }", "public function testInstantiation()\n {\n $curlAdapter = new CurlAdapter();\n }", "public function testCall() {\n\t\t$this->startHttpMocking();\n\t\tself::$options->set( 'domain', self::TEST_DOMAIN );\n\n\t\t// Mock for a successful API call.\n\t\t$delete_mfa = $this->getStub( true );\n\n\t\t// 1. Make sure that a transport returns the default failed response and logs an error.\n\t\t$this->http_request_type = 'wp_error';\n\t\t$this->assertFalse( $delete_mfa->call( uniqid(), uniqid() ) );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 1, $log );\n\t\t$this->assertEquals( 'Caught WP_Error.', $log[0]['message'] );\n\n\t\t// 2. Make sure that an Auth0 API error returns the default failed response and logs an error.\n\t\t$this->http_request_type = 'auth0_api_error';\n\t\t$this->assertFalse( $delete_mfa->call( uniqid(), uniqid() ) );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 2, $log );\n\t\t$this->assertEquals( 'caught_api_error', $log[0]['code'] );\n\n\t\t// 4. Make sure that a weak password error returns the correct message.\n\t\t$this->http_request_type = 'failed_weak_password';\n\t\t$this->assertEquals(\n\t\t\t'Password is too weak, please choose a different one.',\n\t\t\t$delete_mfa->call( uniqid(), uniqid() )\n\t\t);\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 3, $log );\n\t\t$this->assertEquals( '400', $log[0]['code'] );\n\n\t\t// 4. Make sure it succeeds.\n\t\t$this->http_request_type = 'success_empty_body';\n\t\t$this->assertTrue( $delete_mfa->call( uniqid(), uniqid() ) );\n\t\t$this->assertCount( 3, self::$error_log->get() );\n\t}", "function makeRequest($url) {\n\n //Tell cURL to make the request using the brower's user-agent if there is one, or a fallback user-agent otherwise.\n $user_agent = $_SERVER[\"HTTP_USER_AGENT\"];\n if (empty($user_agent)) {\n $user_agent = \"Mozilla/5.0 (compatible; melbin.in/proxy)\";\n }\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);\n\n //Proxy the browser's request headers.\n $browserRequestHeaders = getallheaders();\n \n //rewrite req headers and content length\n unset($browserRequestHeaders[\"Host\"]);\n unset($browserRequestHeaders[\"Content-Length\"]);\n \n //Remove the browser's Accept-Encoding header if any;\n //let cURL make the request using gzip if possible.\n unset($browserRequestHeaders[\"Accept-Encoding\"]);\n curl_setopt($ch, CURLOPT_ENCODING, \"\");\n //Transform the associative array from getallheaders() into an\n //indexed array of header strings to be passed to cURL.\n $curlRequestHeaders = array();\n foreach ($browserRequestHeaders as $name => $value) {\n $curlRequestHeaders[] = $name . \": \" . $value;\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, $curlRequestHeaders);\n\n //Proxy any received GET/POST/PUT data.\n switch ($_SERVER[\"REQUEST_METHOD\"]) {\n case \"GET\":\n $getData = array();\n foreach ($_GET as $key => $value) {\n $getData[] = urlencode($key) . \"=\" . urlencode($value);\n }\n if (count($getData) > 0) {\n //Remove any GET data from the URL, and re-add what was read.\n //It reads, strips, then re-adds all GET data; this may be a no-op.\n $url = substr($url, 0, strrpos($url, \"?\"));\n $url .= \"?\" . implode(\"&\", $getData);\n }\n break;\n case \"POST\":\n curl_setopt($ch, CURLOPT_POST, true);\n \n curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents(\"php://input\"));\n break;\n case \"PUT\":\n curl_setopt($ch, CURLOPT_PUT, true);\n curl_setopt($ch, CURLOPT_INFILE, fopen(\"php://input\"));\n break;\n }\n\n //Other cURL options.\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt ($ch, CURLOPT_FAILONERROR, true);\n\n //Set the request URL.\n curl_setopt($ch, CURLOPT_URL, $url);\n\n //Make the request.\n $response = curl_exec($ch);\n $responseInfo = curl_getinfo($ch);\n $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n curl_close($ch);\n\n //Setting CURLOPT_HEADER to true above forces the response headers and body\n //to be output together--separate them.\n $responseHeaders = substr($response, 0, $headerSize);\n $responseBody = substr($response, $headerSize);\n\n return array(\"headers\" => $responseHeaders, \"body\" => $responseBody, \"responseInfo\" => $responseInfo);\n}", "public function __construct() {\n $this->_handle = curl_init();\n $this->_opt(CURLOPT_HEADER, false);\n $this->_opt(CURLOPT_RETURNTRANSFER, true);\n }", "public function setUp(): void\n {\n $this->http = new GuzzleHttp\\Client(['base_uri' => 'http://web/api/']);\n }", "public function testConnection(): void\n {\n $response = $this->client->request('GET');\n $this->assertEquals(200, $response->getStatusCode());\n\n return;\n }", "private function initCurl() {\n\t\tif( $this->valid() ) {\n\t\t\t$this->ch = curl_init();\n\t\t\tcurl_setopt( $this->ch, CURLOPT_URL, \t\t\t\t$this->config['postUrl'] );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_RETURNTRANSFER, \tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_FOLLOWLOCATION, \tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_TIMEOUT, \t\t\t10);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_HEADER, \t\t\tFALSE ); \n\t\t\tcurl_setopt( $this->ch, CURLOPT_POST, \t\t\t\tcount( $this->getFieldsAsString() ) );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_POSTFIELDS, \t\t$this->getFieldsAsString() ); \n\t\t\tcurl_setopt( $this->ch, CURLOPT_REFERER, \t\t\t$this->config['referrerUrl'] );\n\t\t\tcurl_setopt( $this->ch, CURLOPT_USERAGENT, \t\t\t$this->config['userAgent']);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_AUTOREFERER, \t\tTRUE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_VERBOSE, \t\t\tFALSE);\n\t\t\tcurl_setopt( $this->ch, CURLOPT_COOKIEJAR, \t\t\t$this->config['cookieFile']);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function curlWrap($url, $json, $action)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10 );\n\tcurl_setopt($ch, CURLOPT_URL, ZDURL.$url);\n\tcurl_setopt($ch, CURLOPT_USERPWD, ZDUSER.\"/token:\".ZDAPIKEY);\n\tswitch($action){\n\t\tcase \"POST\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n\t\t\tbreak;\n\t\tcase \"GET\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t\tbreak;\n\t\tcase \"PUT\":\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n\tcurl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\t$output = curl_exec($ch);\n\tcurl_close($ch);\n\t$decoded = json_decode($output);\n\treturn $decoded;\n}", "public function testSendRequestStatusOk()\n {\n $json = '{\"eventType\":\"Cron\",\"appName\":\"app_name\",\"appId\":\"app_id\"}';\n $statusOk = '200';\n $uri = 'https://example.com/listener';\n $method = ZendClient::POST;\n $headers = ['X-Insert-Key' => 'insert_key_value', 'Content-Type' => 'application/json'];\n $accId = 'acc_id';\n $appId = 'app_id';\n $appName = 'app_name';\n $insightApiKey = 'insert_key_value';\n\n $this->model->addData(['eventType'=>'Cron']);\n\n $this->zendClientMock->expects($this->once())->method('setUri')->with($uri)->willReturnSelf();\n $this->zendClientMock->expects($this->once())->method('setMethod')->with($method)->willReturnSelf();\n $this->zendClientMock->expects($this->once())->method('setHeaders')->with($headers)->willReturnSelf();\n $this->zendClientMock->expects($this->once())->method('setRawData')->with($json)->willReturnSelf();\n\n $this->configMock->expects($this->once())\n ->method('getNewRelicAccountId')\n ->willReturn($accId);\n\n $this->configMock->expects($this->once())\n ->method('getInsightsApiUrl')\n ->willReturn($uri);\n\n $this->configMock->expects($this->once())\n ->method('getInsightsInsertKey')\n ->willReturn($insightApiKey);\n\n $this->configMock->expects($this->once())\n ->method('getNewRelicAppName')\n ->willReturn($appName);\n\n $this->configMock->expects($this->once())\n ->method('getNewRelicAppId')\n ->willReturn($appId);\n\n $this->jsonEncoderMock->expects($this->once())->method('encode')->willReturn($json);\n\n $zendHttpResponseMock = $this->getMockBuilder(\n \\Zend_Http_Response::class\n )->disableOriginalConstructor()->getMock();\n $zendHttpResponseMock->expects($this->any())->method('getStatus')->willReturn($statusOk);\n\n $this->zendClientMock->expects($this->once())->method('request')->willReturn($zendHttpResponseMock);\n\n $this->zendClientFactoryMock->expects($this->once())\n ->method('create')\n ->willReturn($this->zendClientMock);\n\n $this->assertInternalType(\n 'bool',\n $this->model->sendRequest()\n );\n }", "function callApi($url) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt ($ch, CURLOPT_URL, $url);\n\n // Get the response and close the channel.\n $response = curl_exec ( $ch );\n\n if ($response === false) {\n echo \"Failed to \".$action.\" : \" . curl_error ( $ch );\n }\n\n curl_close($ch);\n\n return $response;\n}", "public function setUp() {\n\t\t$this->manager = \\Mockery::mock(BluemixManager::class)->makePartial();\n\t\t$this->manager->shouldReceive('downloadCaCertificate')->andReturn(null);\n\t}", "protected function setUp()\n {\n $this->object = $this->createMock(AbstractRequest::class, [\n $this->getHttpClient(),\n $this->getHttpRequest(),\n self::TOKEN,\n \\Omnipay\\Rede\\Gateway::TEST_ENDPOINT\n ]);\n }", "protected function createCurlHandle()\n {\n $ch = curl_init();\n\n $bdurl = $this->request->getUrl();\n $config = $this->request->getConfig();\n\n \t$curl_opts = array(\n \t\t// request url\n \t\tCURLOPT_URL\t\t\t\t=> $this->requestUrl,\n \t\t// setup write callbacks\n \t\tCURLOPT_HEADERFUNCTION\t=> array($this, 'onWriteHeader'),\n \t\tCURLOPT_WRITEFUNCTION\t=> array($this, 'onWriteBody'),\n \t\t// buffer size\n \t\tCURLOPT_BUFFERSIZE\t\t=> $config['buffer_size'],\n \t\t// save full outgoing headers, in case someone is interested\n CURLINFO_HEADER_OUT\t\t=> true,\n CURLOPT_NOSIGNAL => 1,\n );\n\n // setup connection timeout\n\t\tif (defined('CURLOPT_CONNECTTIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT_MS] = $config['connect_timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT] = ceil($config['connect_timeout'] / 1000);\n\t\t}\n\n // setup request timeout\n\t\tif (defined('CURLOPT_TIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT_MS] = $config['timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT] = ceil($config['timeout'] / 1000);\n\t\t}\n\n // setup redirects\n if ($config['follow_redirects']) {\n \t$curl_opts[CURLOPT_FOLLOWLOCATION] = true;\n $curl_opts[CURLOPT_MAXREDIRS] = $config['max_redirects'];\n // limit redirects to http(s), works in 5.2.10+\n if (defined('CURLOPT_REDIR_PROTOCOLS')) {\n $curl_opts[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;\n }\n // works sometime after 5.3.0, http://bugs.php.net/bug.php?id=49571\n if ($config['strict_redirects'] && defined('CURLOPT_POSTREDIR ')) {\n $curl_opts[CURLOPT_POSTREDIR] = 3;\n }\n } else {\n $curl_opts[CURLOPT_FOLLOWLOCATION] = false;\n }\n\n // set HTTP version\n switch ($config['protocol_version']) {\n case '1.0':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;\n break;\n case '1.1':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;\n }\n\n // set request method\n switch ($this->request->getMethod()) {\n case bdHttpRequest::METHOD_GET:\n $curl_opts[CURLOPT_HTTPGET] = true;\n break;\n case bdHttpRequest::METHOD_POST:\n $curl_opts[CURLOPT_POST] = true;\n break;\n case bdHttpRequest::METHOD_HEAD:\n $curl_opts[CURLOPT_NOBODY] = true;\n break;\n default:\n $curl_opts[CURLOPT_CUSTOMREQUEST] = $this->request->getMethod();\n }\n\n // set proxy, if needed\n if ($config['proxy_host']) {\n if (!$config['proxy_port']) {\n throw new bdHttpException('Proxy port not provided');\n }\n $curl_opts[CURLOPT_PROXY] = $config['proxy_host'] . ':' . $config['proxy_port'];\n if ($config['proxy_user']) {\n $curl_opts[CURLOPT_PROXYUSERPWD] = $config['proxy_user'] . ':' . $config['proxy_password'];\n switch ($config['proxy_auth_scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_DIGEST;\n }\n }\n }\n\n // set authentication data\n $auth = $this->request->getAuth();\n if ($auth) {\n $curl_opts[CURLOPT_USERPWD] = $auth['user'] . ':' . $auth['password'];\n switch ($auth['scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;\n }\n }\n\n // set SSL options\n if (0 == strcasecmp($bdurl->getScheme(), 'https')) {\n \tif (isset($config['ssl_verify_host'])) {\n \t\t$curl_opts[CURLOPT_SSL_VERIFYHOST] = $config['ssl_verify_host'] ? 2 : 0;\n \t}\n \tforeach (self::$sslContextMap as $name => $option) {\n \t\tif (isset($config[$name])) {\n \t\t\t$curl_opts[$option] = $config[$name];\n \t\t}\n \t}\n }\n\n $headers = $this->request->getHeaders();\n // make cURL automagically send proper header\n if (!isset($headers['accept-encoding'])) {\n $headers['accept-encoding'] = '';\n }\n\n // set headers having special cURL keys\n foreach (self::$headerMap as $name => $option) {\n if (isset($headers[$name])) {\n $curl_opts[$option] = $headers[$name];\n unset($headers[$name]);\n }\n }\n\n $this->calculateRequestLength($headers);\n if (isset($headers['content-length'])) {\n $this->workaroundPhpBug47204($curl_opts, $headers);\n }\n\n // set headers not having special keys\n $headersFmt = array();\n foreach ($headers as $name => $value) {\n $canonicalName = implode('-', array_map('ucfirst', explode('-', $name)));\n $headersFmt[] = $canonicalName . ': ' . $value;\n }\n $curl_opts[CURLOPT_HTTPHEADER] = $headersFmt;\n\n curl_setopt_array($ch, $curl_opts);\n\n return $ch;\n }", "public function get_test_http_requests()\n {\n }", "protected function connect()\n {\n $url = $this->createUrl(\"\");\n // create curl resource\n $this->connection = curl_init();\n\n // set url\n curl_setopt($this->connection, CURLOPT_URL, $url);\n\n //return the transfer as a string\n curl_setopt($this->connection, CURLOPT_RETURNTRANSFER, 1);\n\n }", "public function testPromoteAutomatchUrlUsingGET()\n {\n }", "function web_client($url) {\n $post = array();\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\n $result = curl_exec($ch);\n \n $response = json_decode($result, true);\n}", "protected function setUp()\n {\n $cache = new VoidCache();\n $this->client = new MockClient($cache);\n }", "public function testGetAutomatchUrlsUsingPOST()\n {\n }", "public function testInit() {\n $curlHttpClient = new CurlHttpClient();\n $this->assertNotNull($curlHttpClient, 'Initialize failed!');\n $this->assertAttributeInternalType('resource', '_curl', $curlHttpClient, 'The curl client is not initialized correctly.');\n return $curlHttpClient;\n }", "public function testCanMakeHttpPost()\n {\n # Set desired response\n $resp = $this->createMock('Psr\\Http\\Message\\ResponseInterface');\n $this->mockClient->addResponse($resp);\n $httpClient = $this->givenSdk()->getHttpClient();\n $response = $httpClient->post(\"/dummy_uri\");\n\n $this->assertSame($resp, $response);\n }", "public function testUploadIntelligentSuccess()\n {\n $mock_response_202 = new MockHttpResponse(202, '{accepted: true}');\n $mock_response = new MockHttpResponse(200,\n json_encode([\n 'filename' => 'somefilename.jpg',\n 'size' => '1000',\n 'type' => 'image/jpg',\n 'url' => 'https://cdn.filestack.com/somefilehandle',\n 'uri' => 'https://uploaduri/handle&partNum=1',\n 'region' => 'us-east-1',\n 'upload_id' => 'test-upload-id',\n 'headers' => [],\n 'upload_type' => 'intelligent_ingestion' // intelligent flag\n ])\n );\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturnOnConsecutiveCalls(\n $mock_response,\n $mock_response,\n $mock_response,\n $mock_response_202,\n $mock_response,\n $mock_response);\n\n $client = new FilestackClient(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client\n );\n\n $filelink = $client->upload($this->test_filepath, ['intelligent' => true]);\n $this->assertNotNull($filelink);\n }", "private function getMockAuthentication()\n {\n return $this->getMock('Mremi\\UrlShortener\\Provider\\Bitly\\AuthenticationInterface');\n }", "public function testOpen()\n {\n $this->curlAdapter->open();\n \n $this->assertAttributeInternalType('resource', 'curl', $this->curlAdapter);\n }", "function sendCurl(string $method, $arParams = [''], $ignoreErr = true) {\n\n $curl = curl_init(\"http://localhost:8091/\"); // run cli-wallet at port 8091\n\n $data = [\n \"jsonrpc\" => \"2.0\", \n \"id\" => 1, \n \"method\" => $method,\n \"params\" => $arParams\n ];\n\n\n $data_json = json_encode($data); //paste data into json\n\n //PR($data_json);\n \n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type'=>'application/json'));\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_json);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curl);\n curl_close($curl);\n\n $arResult = json_decode($result, true);\n if (isset($arResult) and !empty($arResult)) {\n if (isset($arResult['error']['message']) and !empty($arResult['error']['message'])) {\n if ($ignoreErr != true) {\n die('Stopped with error: <b>' . $arResult['error']['message'] . '</b>');\n } else {\n //PR($arResult['error']['message']);\n }\n } else {\n return $arResult['result'];\n //PR($arResult);\n }\n } else {\n die('Lost connection to the CLI wallet');\n }\n //PR($arResult);\n}", "function sendData($api, $amount, $redirect, $factorNumber = null)\n{\n $data = \"api=$api&amount=$amount&redirect=$redirect&factorNumber=$factorNumber\";\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"https://pay.ir/payment/test/send\");\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n\n if ($response) {\n return json_decode($response, true);\n } else {\n return false;\n }\n\n}", "private function init()\n {\n $this->curl = curl_init();\n }", "function initCurl() {\n\t$ch = curl_init();\n\tcurl_setopt( $ch, CURLOPT_MAXCONNECTS, 100 );\n\tcurl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );\n\tcurl_setopt( $ch, CURLOPT_ENCODING, 'gzip' );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 100 );\n\tcurl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 );\n\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );\n\tcurl_setopt( $ch, CURLOPT_URL, \"https://en.wikipedia.org/w/api.php\" );\n\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\tcurl_setopt( $ch, CURLOPT_HTTPGET, 0 );\n\tcurl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );\t//For reasons that escape me, CURL fails without this.\n\treturn $ch;\n}", "private static function mock()\n {\n $files = ['configMocking'];\n $folder = static::$root.'Mocking'.'/';\n\n self::call($files, $folder);\n }", "private function initCurlHandle()\n {\n $this->closeCurlHandle();\n $this->curlHandle = \\curl_init();\n }", "public function testCreateCustomerDirectConnectionShouldCallHttpServicePostTransaction()\n {\n $customer = [\n 'Title' => 'Mr.',\n 'FirstName' => 'John',\n 'LastName' => 'Smith',\n 'Country' => 'au',\n 'CardDetails' => [\n 'Name' => 'John Smith',\n 'Number' => '4444333322221111',\n 'ExpiryMonth' => '12',\n 'ExpiryYear' => '25',\n 'CVN' => '123',\n ],\n ];\n\n $transaction = [\n 'Customer' => $customer,\n 'Method' => PaymentMethod::CREATE_TOKEN_CUSTOMER,\n 'TransactionType' => TransactionType::MOTO,\n ];\n\n $mockTransaction = $transaction;\n $mockTransaction['Capture'] = true;\n\n $mockResponse = $this->getResponse([\n 'AuthorisationCode' => null,\n 'ResponseCode' => '00',\n 'ResponseMessage' => 'A2000',\n 'TransactionID' => null,\n 'TransactionStatus' => false,\n 'TransactionType' => 'MOTO',\n 'BeagleScore' => null,\n 'Verification' => [\n 'CVN' => 0,\n 'Address' => 0,\n 'Email' => 0,\n 'Mobile' => 0,\n 'Phone' => 0,\n ],\n 'Customer' => [\n 'CardDetails' => [\n 'Number' => '444433XXXXXX1111',\n 'Name' => 'John Smith',\n 'ExpiryMonth' => '12',\n 'ExpiryYear' => '25',\n 'StartMonth' => null,\n 'StartYear' => null,\n 'IssueNumber' => null,\n ],\n 'TokenCustomerID' => 987654321098,\n 'Reference' => '',\n 'Title' => 'Mr.',\n 'FirstName' => 'John',\n 'LastName' => 'Smith',\n 'CompanyName' => '',\n 'JobDescription' => '',\n 'Street1' => '',\n 'Street2' => '',\n 'City' => '',\n 'State' => '',\n 'PostalCode' => '',\n 'Country' => 'au',\n 'Email' => '',\n 'Phone' => '',\n 'Mobile' => '',\n 'Comments' => '',\n 'Fax' => '',\n 'Url' => '',\n ],\n 'Payment' => [\n 'TotalAmount' => 0,\n 'InvoiceNumber' => '',\n 'InvoiceDescription' => '',\n 'InvoiceReference' => '',\n 'CurrencyCode' => 'AUD',\n ],\n 'Errors' => '',\n ]);\n\n $httpService = $this->prophet->prophesize('Eway\\Rapid\\Contract\\HttpService');\n\n /** @var MethodProphecy $postTransactionStub */\n $postTransactionStub = $httpService->postTransaction(Argument::type('array'));\n $postTransactionStub->withArguments([$mockTransaction])->willReturn($mockResponse)->shouldBeCalled();\n\n /** @var HttpService $stub */\n $stub = $httpService->reveal();\n $this->client->setHttpService($stub);\n\n\n $response = $this->client->createCustomer(ApiMethod::DIRECT, $customer);\n\n $this->assertInstanceOf(CreateCustomerResponse::getClass(), $response);\n $this->assertTrue(is_array($response->getErrors()));\n $this->assertEmpty($response->getErrors());\n $this->assertCustomer($customer, $response);\n $this->assertNotEmpty($response->Customer->TokenCustomerID);\n }", "function funInitCurl(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 20);\n\n return $ch;\n}", "function make_call($url)\n {\n echo \"API Call:<br /><textarea id='orig' rows='4' cols='150'>$url</textarea><br />\";\n $ch = curl_init();\n $timeout = 20;\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\n\n $data = curl_exec($ch);\n\n if (curl_errno($ch)) {\n print curl_error($ch);\n } else {\n curl_close($ch);\n }\n echo htmlentities($data) . \"<br />\";\n return $data;\n }", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n\t\t//print_r($postfields);exit;\r\n\t\t$this->http_info = array();\r\n\t\t$ci = curl_init();\r\n\t\t/* Curl settings */\r\n\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_USERAGENT, 'PHP-SDK OAuth2.0');\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, false);\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n\t\tcurl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n\t\tcurl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n\t\tcurl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t\tswitch ($method) {\r\n\t\t\tcase 'POST':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_POST, TRUE);\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\tcurl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n\t\t\t\t\t$this->postdata = $postfields;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'DELETE':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\t$url = \"{$url}?{$postfields}\";\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n\t\tcurl_setopt($ci, CURLOPT_URL, $url );\r\n\t\tcurl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n\t\tcurl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n\t\t$response = curl_exec($ci);\r\n\t\t\r\n\t\t$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n\t\t$this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n\t\t$this->url = $url;\r\n\r\n\t\tif ($this->debug) {\r\n\t\t\techo \"=====post data======\\r\\n\";\r\n\t\t\tvar_dump($postfields);\r\n\r\n\t\t\techo '=====info====='.\"\\r\\n\";\r\n\t\t\tprint_r( curl_getinfo($ci) );\r\n\r\n\t\t\techo '=====$response====='.\"\\r\\n\";\r\n\t\t\tprint_r( $response );\r\n\t\t}\r\n\t\tcurl_close ($ci);\r\n\t\treturn $response;\r\n\t}", "public function setUp(): void\n {\n parent::setUp();\n\n $this->buildRequestMock();\n }", "protected function init()\n {\n // To start with, disable FOLLOWLOCATION since we'll handle it\n curl_setopt($this->curlHandle, \\CURLOPT_FOLLOWLOCATION, false);\n\n // Always return the transfer\n curl_setopt($this->curlHandle, \\CURLOPT_RETURNTRANSFER, true);\n\n // Force IPv4, since this class isn't yet comptible with IPv6\n $curlVersion = curl_version();\n\n if ($curlVersion['features'] & \\CURLOPT_IPRESOLVE) {\n curl_setopt($this->curlHandle, \\CURLOPT_IPRESOLVE, \\CURL_IPRESOLVE_V4);\n }\n }", "protected function setUp()\n {\n $this->client = new HttpClient($this->api_key, $this->api_signature, $this->hostname);\n }", "public function testQueryCertificates()\n {\n }", "function chargeAPI($api_url, $server_key, $request_body){\n $ch = curl_init();\n $curl_options = array(\n CURLOPT_URL => $api_url,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n // Tambahkan heder ke permintaan, termasuk Otorisasi yang dihasilkan dari kunci server\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'Accept: application/json',\n 'Authorization: Basic ' . base64_encode($server_key . ':')\n ),\n CURLOPT_POSTFIELDS => $request_body\n );\n curl_setopt_array($ch, $curl_options);\n $result = array(\n 'body' => curl_exec($ch),\n 'http_code' => curl_getinfo($ch, CURLINFO_HTTP_CODE),\n );\n return $result;\n}", "private function _curl($url, $method, $post_data = []) {\r\n $post_data = !is_null($post_data) && !empty($post_data) ?\r\n array_merge($post_data, ['token' => $this->config->token]) :\r\n ['token' => $this->config->token];\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_HEADER, false);\r\n curl_setopt($curl, CURLINFO_HEADER_OUT, true);\r\n curl_setopt($curl, CURLOPT_USERAGENT, \"OpenCart CMS\");\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\r\n curl_setopt($curl, CURLOPT_FORBID_REUSE, false);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\r\n if ($method === 'POST') {\r\n curl_setopt($curl, CURLOPT_POST, true);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post_data));\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n } else if ($method === 'GET') {\r\n curl_setopt($curl, CURLOPT_POST, false);\r\n curl_setopt($curl, CURLOPT_URL, $url . '?' . http_build_query($post_data));\r\n }\r\n\r\n $response = curl_exec($curl);\r\n if (curl_errno($curl)) {\r\n $curl_error =\r\n \"StartSend cURL Error \" . curl_errno($curl) . \": \" . curl_error($curl);\r\n } else {\r\n $curl_error = \"\";\r\n }\r\n if ($curl_error) {\r\n AddMessage2Log($curl_error, \"startsend.sms\");\r\n return [\"error\" => $curl_error];\r\n }\r\n curl_close($curl);\r\n return $response;\r\n }", "public function initialize()\n {\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->ch, CURLOPT_MAXREDIRS, 5);\n curl_setopt($this->ch, CURLOPT_USERAGENT, self::$USER_AGENT); \n // curl_setopt($this->ch, CURLOPT_COOKIEFILE, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_COOKIEJAR, '/tmp/curl_client');\n // curl_setopt($this->ch, CURLOPT_HEADER, TRUE);\n return $this;\n }", "function __construct(){\n $this->curl = new cURL;\n $this->generateAceessToken();\n }", "public function testAuthorizeApiNetworkError()\n {\n $this->_replaceCheckoutSession();\n $this->setExpectedException('Radial_CreditCard_Exception');\n\n $payment = Mage::getModel('sales/order_payment');\n $amount = 25.50;\n\n $request = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Payment\\ICreditCardAuthRequest');\n $response = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Payload\\Payment\\ICreditCardAuthReply');\n $api = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Api\\IBidirectionalApi');\n $api->expects($this->any())\n ->method('send')\n ->will($this->throwException(new NetworkError));\n $api->expects($this->any())\n ->method('getRequestBody')\n ->will($this->returnValue($request));\n $api->expects($this->any())\n ->method('getResponseBody')\n ->will($this->returnValue($response));\n\n $coreHelper = $this->getHelperMock('radial_core', array('getSdkApi'));\n $coreHelper->expects($this->any())\n ->method('getSdkApi')\n ->will($this->returnValue($api));\n $ccHelper = $this->getHelperMock('radial_creditcard', array('getTenderTypeForCcType'));\n $ccHelper->expects($this->any())\n ->method('getTenderTypeForCcType')\n ->will($this->returnValue('TT'));\n\n $payment = $this->getModelMockBuilder('radial_creditcard/method_ccpayment')\n ->setMethods(array('_prepareAuthRequest'))\n ->setConstructorArgs(array(array('core_helper' => $coreHelper, 'helper' => $ccHelper, 'checkout_session' => $this->_checkoutSession)))\n ->getMock();\n $payment->expects($this->any())\n ->method('_prepareAuthRequest')\n ->will($this->returnSelf());\n\n $payment->authorize($payment, $amount);\n }", "public function init()\n {\n $this->curl = curl_init();\n }", "public function init(): void{\n $this->handler = curl_init();\n }", "public function setUp()\n {\n $this->_req = new Mad_Controller_Request_Mock();\n }", "private function createCurlConnection($api_call)\n {\n $ch = curl_init($this->_url.$api_call);\n\n //for debugging\n //$fp = fopen(\"example_homepage.txt\", \"w\");\n //curl_setopt($ch, CURLOPT_FILE, $fp);\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n return $ch;\n }", "protected function _callServer($method, $call, $payload = array())\n {\n try {\n $this->errorMessage = null;\n $this->errorCode = null;\n $url = $this->apiUrl . $method . '/';\n\n $curlSession = curl_init();\n\n $auth_token = base64_encode($this->site_name . ':' . $this->api_key);\n $headers = array('Authorization: Basic ' . $auth_token, 'Content-Type: application/json');\n\n if ($call == 'post') {\n curl_setopt($curlSession, CURLOPT_POST, true);\n curl_setopt($curlSession, CURLOPT_POSTFIELDS, $payload);\n curl_setopt($curlSession, CURLOPT_FRESH_CONNECT, true);\n }\n\n curl_setopt($curlSession, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curlSession, CURLOPT_FOLLOWLOCATION, true); // follow redirects\n curl_setopt($curlSession, CURLOPT_CONNECTTIMEOUT, 5); // number of seconds to wait while trying to connect\n curl_setopt($curlSession, CURLOPT_TIMEOUT, 5); // max number of seconds to allow cURL functions to execute before timing out and giving up\n curl_setopt($curlSession, CURLOPT_MAXREDIRS, 5); // follow up to 5 redirects\n curl_setopt($curlSession, CURLOPT_USERAGENT, Mage::helper('simple_relevance')->getUserAgent());\n curl_setopt($curlSession, CURLOPT_URL, $url);\n curl_setopt($curlSession, CURLOPT_HEADER, false); // don't include the header in the output\n curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curlSession);\n $this->_log($result);\n\n if (!$result) {\n $errstr = curl_error($curlSession);\n $errno = curl_errno($curlSession);\n $this->errorMessage = \"Could not connect (ERR $errno: $errstr)\";\n $this->errorCode = \"-99\";\n return false;\n }\n\n // Check that a connection was made\n if (curl_error($curlSession)) {\n $this->errorMessage = curl_error($curlSession);\n $this->errorCode = \"-99\";\n return false;\n }\n\n $httpCode = curl_getinfo($curlSession, CURLINFO_HTTP_CODE);\n\n curl_close($curlSession);\n\n if ($httpCode != 200 && $httpCode != 201) {\n Mage::log($result, null, 'SimpleRelevance_Errors.log');\n Mage::log($httpCode, null, 'SimpleRelevance_Errors.log');\n\n $this->errorMessage = $result;\n $this->errorCode = \"-99\";\n return false;\n }\n\n return $result;\n }\n\n catch (Exception $e) {\n return false; // catch-all\n }\n }", "public function testRequest() {\n\t\t$this->startHttpHalting();\n\n\t\t$client_id = uniqid();\n\t\t$client_secret = uniqid();\n\n\t\tself::$options->set( 'domain', self::TEST_DOMAIN );\n\t\tself::$options->set( 'client_id', $client_id );\n\t\tself::$options->set( 'client_secret', $client_secret );\n\t\t$api_client_creds = new WP_Auth0_Api_Client_Credentials( self::$options );\n\n\t\t$decoded_res = [];\n\t\ttry {\n\t\t\t$api_client_creds->call();\n\t\t} catch ( Exception $e ) {\n\t\t\t$decoded_res = unserialize( $e->getMessage() );\n\t\t}\n\n\t\t$this->assertNotEmpty( $decoded_res );\n\t\t$this->assertEquals( 'https://' . self::TEST_DOMAIN . '/oauth/token', $decoded_res['url'] );\n\t\t$this->assertEquals( 'POST', $decoded_res['method'] );\n\t\t$this->assertArrayHasKey( 'Content-Type', $decoded_res['headers'] );\n\t\t$this->assertEquals( 'application/json', $decoded_res['headers']['Content-Type'] );\n\t\t$this->assertArrayHasKey( 'client_id', $decoded_res['body'] );\n\t\t$this->assertEquals( $client_id, $decoded_res['body']['client_id'] );\n\t\t$this->assertArrayHasKey( 'client_secret', $decoded_res['body'] );\n\t\t$this->assertEquals( $client_secret, $decoded_res['body']['client_secret'] );\n\t\t$this->assertArrayHasKey( 'audience', $decoded_res['body'] );\n\t\t$this->assertEquals( 'https://' . self::TEST_DOMAIN . '/api/v2/', $decoded_res['body']['audience'] );\n\t\t$this->assertArrayHasKey( 'grant_type', $decoded_res['body'] );\n\t\t$this->assertEquals( 'client_credentials', $decoded_res['body']['grant_type'] );\n\t}", "public function setUp(): void\n {\n parent::setUp();\n $this->api = new PaymentSecupayCreditcardsApi();\n }", "function _curlRequest( $url, $method, $data = null, $sendAsJSON = true, $auth = true ) {\n\t$curl = curl_init();\n\tif ( $method == 'GET' && $data !== null ) {\n\t\t$url .= '?' . http_build_query( $data );\n\t}\n\tcurl_setopt( $curl, CURLOPT_URL, $url );\n\tif ( $auth ) {\n\t\tcurl_setopt( $curl, CURLOPT_USERPWD, P_SECRET );\n\t}\n\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $method );\n\tif ( $method == 'POST' && $data !== null ) {\n\t\tif ( $sendAsJSON ) {\n\t\t\t$data = json_encode( $data );\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen( $data ) ) );\n\t\t}\n\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $data );\n\t}\n\tcurl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $curl, CURLOPT_HEADER, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, false );\n\t$response = curl_exec( $curl );\n\tif ( $response === false ) {\n\t\techo curl_error( $curl );\n\t\tcurl_close( $curl );\n\n\t\treturn false;\n\t}\n\t$httpCode = curl_getinfo( $curl, CURLINFO_HTTP_CODE );\n\tif ( $httpCode >= 400 ) {\n\t\techo curl_error( $curl );\n\t\tcurl_close( $curl );\n\n\t\treturn false;\n\t}\n\tcurl_close( $curl );\n\n\treturn json_decode( $response, true );\n}", "public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }", "function file_get_curl($url, $post_params = '') \r\n\t{\r\n\t\t$interfaces = array('10.1.77.47');\r\n\t\t$interface = $interfaces[mt_rand(0, count($interfaces) - 1)];\r\n\t\t\r\n\t\t$ch = curl_init();\r\n\t\t\r\n\t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, true);\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); \r\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36\");\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 15);\r\n\t\t\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, (__DIR__).'/cookies.txt');\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, (__DIR__).'/cookies.txt');\r\n\t\t\r\n\t\tif(!empty($post_params))\r\n\t\t{\r\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);\r\n\t\t}\r\n\t\t\r\n\t\tif(!empty($interface))\r\n\t\t{\r\n\t\t\tcurl_setopt($ch, CURLOPT_INTERFACE, $interface);\r\n\t\t}\r\n\t\t\r\n\t\t$data = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "public function test1()\n{\n $this->markTestSkipped(\"ignoring for travis build\");\n\n $legalEntityType = \"INDIVIDUAL_SOLE_PROPRIETORSHIP\";\n $taxId = mt_rand(100000000, 999999999);\n $streetAddress1 = \"900 Chelmsford St\";\n $legalEntityPostRequest = $this->legalEntityPostRequest1 . $legalEntityType . $this->legalEntityPostRequest2 . $taxId . $this->legalEntityPostRequest3 . $streetAddress1 . $this->legalEntityPostRequest4;\n $expected_url_suffix = \"/legalentity\";\n $response = $this->Communication->httpPostRequest($expected_url_suffix, $legalEntityPostRequest);\n $this->assertEquals(\"10\", $response[\"responseCode\"]);\n $this->assertEquals(\"Approved\", $response[\"responseDescription\"]);\n}", "public function testCall() {\n\t\t$this->startHttpMocking();\n\t\tset_transient( WPA0_JWKS_CACHE_TRANSIENT_NAME, uniqid() );\n\n\t\t$api_client_creds = new WP_Auth0_Api_Client_Credentials( self::$options );\n\n\t\t// 1. Set the response to be a WP_Error, make sure we get null back, and check for a log entry.\n\t\t$this->http_request_type = 'wp_error';\n\t\t$this->assertNull( $api_client_creds->call() );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 1, $log );\n\t\t$this->assertEquals( 'Caught WP_Error.', $log[0]['message'] );\n\n\t\t// 2. Set the response to be an Auth0 server error, check for null, and check for another log entry.\n\t\t$this->http_request_type = 'auth0_api_error';\n\t\t$this->assertNull( $api_client_creds->call() );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 2, $log );\n\t\t$this->assertEquals( 'caught_api_error', $log[0]['code'] );\n\n\t\t// 3. Set the response to be successful but empty, check for null, and check for another log entry.\n\t\t$this->http_request_type = 'success_empty_body';\n\t\t$this->assertNull( $api_client_creds->call() );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 3, $log );\n\t\t$this->assertEquals( 'No access_token returned.', $log[0]['message'] );\n\n\t\t// 4. Set the response to be successful but an invalid JWT, check for null, and check for another error entry.\n\t\t$this->http_request_type = 'access_token';\n\t\t$this->assertNull( $api_client_creds->call() );\n\t\t$log = self::$error_log->get();\n\t\t$this->assertCount( 4, $log );\n\t\t$this->assertEquals( 'Wrong number of segments', $log[0]['message'] );\n\n\t\t// Create a dummy decoded token.\n\t\t$dummy_decoded_token = (object) array( 'scope' => 'dummy:scope' );\n\n\t\t// Mock the parent decode_jwt method to return the dummy decoded token.\n\t\t$api_client_creds_mock = $this->getMockBuilder( WP_Auth0_Api_Client_Credentials::class )\n\t\t\t->setMethods( [ 'decode_jwt' ] )\n\t\t\t->setConstructorArgs( [ self::$options ] )\n\t\t\t->getMock();\n\t\t$api_client_creds_mock->method( 'decode_jwt' )\n\t\t\t->willReturn( $dummy_decoded_token );\n\n\t\t// Reflect the mocked class to make the get_token_decoded method public.\n\t\t$reflect_mock = new ReflectionClass( WP_Auth0_Api_Client_Credentials::class );\n\t\t$method = $reflect_mock->getMethod( 'get_token_decoded' );\n\t\t$method->setAccessible( true );\n\n\t\t// 5. Make sure we get an access token back from the API call.\n\t\t$this->http_request_type = 'access_token';\n\t\t$this->assertEquals( '__test_access_token__', $api_client_creds_mock->call() );\n\n\t\t// 6. Make sure the dummy decoded token stored during handle_response is correct.\n\t\t$this->assertEquals( $dummy_decoded_token, $method->invoke( $api_client_creds_mock ) );\n\t}", "protected function getPageCurl()\n\t{\n\t\t// initiate curl with our url\n\t\t$this->curl = curl_init($this->url);\n\n\t\t// set curl options\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);\n\n\t\t// execute the call to google+\n\t\t$this->html = curl_exec($this->curl);\n\n\t\tcurl_close($this->curl);\n\t}" ]
[ "0.64444286", "0.61840504", "0.61490595", "0.6109234", "0.6083616", "0.60660547", "0.6001272", "0.5949743", "0.5936732", "0.59072816", "0.590172", "0.5873138", "0.5871482", "0.587044", "0.58385944", "0.5798404", "0.5730074", "0.57195556", "0.5713729", "0.57136023", "0.57135814", "0.5665532", "0.56489104", "0.56191343", "0.56129754", "0.56010133", "0.56006324", "0.5591603", "0.55910254", "0.55834126", "0.5571252", "0.5561798", "0.55617756", "0.55582815", "0.5558205", "0.55538625", "0.5549995", "0.5546756", "0.5532552", "0.5531702", "0.55219823", "0.55205745", "0.55205417", "0.55161744", "0.5513891", "0.55030715", "0.550306", "0.55025524", "0.5499262", "0.54954165", "0.54942566", "0.5490267", "0.54862076", "0.5485732", "0.5482097", "0.54635537", "0.5451244", "0.5438084", "0.54348904", "0.5431912", "0.54300565", "0.54280955", "0.54209995", "0.5414856", "0.541224", "0.5410375", "0.54073125", "0.54033065", "0.54000294", "0.5399822", "0.53910726", "0.5386136", "0.538298", "0.5368064", "0.5365767", "0.5365508", "0.5363229", "0.5361202", "0.53600544", "0.5350876", "0.53506553", "0.53496367", "0.534542", "0.53329206", "0.53328174", "0.5330514", "0.5321454", "0.53210056", "0.5312173", "0.5311729", "0.5310642", "0.5307207", "0.5306334", "0.5304632", "0.53032315", "0.5302835", "0.5299187", "0.5298727", "0.5298215", "0.5295077", "0.52919346" ]
0.0
-1
Deserialize JSON content from request.
protected function getData(Request $request, $key = NULL) { return $key ? $request->request->get($key) : $request->request->all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJsonRequestContent(Request $request)\n {\n return json_decode($request->getContent(), true);\n }", "public function fromJson() {\n return json_decode($this->getRequest()->getContent(),true);\n }", "public function parse($request)\r\n {\r\n $data = json_decode($request);\r\n $isError = true;\r\n switch (json_last_error()) {\r\n case JSON_ERROR_NONE:\r\n // No errors\r\n $isError = false;\r\n break;\r\n case JSON_ERROR_DEPTH:\r\n $this->errors[] = 'Maximum stack depth exceeded';\r\n break;\r\n case JSON_ERROR_STATE_MISMATCH:\r\n $this->errors[] = 'Underflow or the modes mismatch';\r\n break;\r\n case JSON_ERROR_CTRL_CHAR:\r\n $this->errors[] = 'Unexpected control character found';\r\n break;\r\n case JSON_ERROR_SYNTAX:\r\n $this->errors[] = 'Syntax error, malformed JSON';\r\n break;\r\n case JSON_ERROR_UTF8:\r\n $this->errors[] = 'Malformed UTF-8 characters, possibly incorrectly encoded';\r\n break;\r\n default:\r\n $this->errors[] = 'Unknown error';\r\n break;\r\n }\r\n return $isError ? NULL : $data;\r\n }", "private function getRequest() {\n return json_decode(request()->getContent(), true);\n }", "public static function decodeJSON()\n {\n $body = file_get_contents('php://input');\n $object = json_decode($body);\n \n return $object;\n }", "public function parseRequest(Request $request): object\n {\n $this->payload = json_decode($request->getContent());\n\n if (!$this->payload) {\n throw new Exception(\"Invalid request.\", 419);\n }\n\n return $this->payload;\n }", "public static function json()\n {\n return json_decode(file_get_contents('php://input'), true);\n }", "public static function json()\n {\n return json_decode(file_get_contents('php://input'), true);\n }", "private function createResponse($request)\n {\n return json_decode($request->getBody()->getContents());\n }", "protected function getContentObject()\n {\n return json_decode($this->response->getContent());\n }", "public function request(){\n\t\t$request = file_get_contents('php://input');\n\t\treturn json_decode($request,true);\n\t}", "protected function getRequestBody(Request $request)\n {\n return json_decode((string) $request->getBody());\n }", "public function decode()\n {\n return json_decode(trim($this->body), true);\n }", "protected function loadRequestData(Request $request)\n {\n try {\n $content = (string)$request->getContent();\n if (!empty($content)) {\n return \\Safe\\json_decode($content, true);\n } else {\n $content = $request->query->all();\n return $content;\n }\n } catch (\\Exception $exception) {\n return [];\n }\n }", "public function BodyDecoderJSON($Content) {\n\n return json_decode($Content, true);\n }", "public function getRequestData()\n {\n return json_decode($this->requestData);\n }", "public static function getJson() {\n\t if(self::isJson()) {\n\t $content = json_decode(file_get_contents('php://input'),1);\t \n\t if($content && is_array($content)) {\n\t return $content;\n\t }\n\t }\n\t return array();\n;\n\t}", "protected function getJsonDecodedFromPost(){\n // $this->app->response()->header(\"Content-Type\", \"application/json\");\n // obtain the JSON of the body of the request\n $post = json_decode($this->app->request()->getBody(), true); // make it a PHP associative array\n return $post;\n }", "public function deserialize($json);", "private function retrieveJsonPostData()\n {\n $rawData = file_get_contents(\"php://input\");\n // this returns null if not valid json\n return json_decode($rawData);\n }", "protected static function runConvertJsonContent(GetResponseEvent $event, Request $request): void\n {\n if (empty($request->getContent())) {\n return;\n }\n\n if ('json' !== $request->getContentType()) {\n if (1 === preg_match('#^/api/#', $request->getPathInfo())) {\n $event->setResponse(\n new JsonResponse(\n [\n 'error' => 'not_acceptable',\n 'reason' => 'Expected json as request content type',\n ],\n Response::HTTP_NOT_ACCEPTABLE\n )\n );\n }\n\n return;\n }\n\n $data = json_decode($request->getContent(), true);\n if (JSON_ERROR_NONE !== json_last_error()) {\n $event->setResponse(\n new JsonResponse(\n [\n 'error' => 'bad_request',\n 'reason' => \"Invalid json provided: \" . json_last_error_msg(),\n ],\n Response::HTTP_BAD_REQUEST\n )\n );\n }\n\n $request->request = new ParameterBag((array)$data);\n }", "public static function requestPayload() {\n return json_decode(file_get_contents('php://input'), true);\n }", "function decodificarJSON($content)\n {\n $arrayObjetos = json_decode($content, true);\n \n //If json_decode failed, the JSON is invalid.\n if(!is_array($arrayObjetos))\n {\n throw new Exception('Received content contained invalid JSON!');\n }\n return $arrayObjetos;\n }", "function decodificarJSON($content)\n {\n $arrayObjetos = json_decode($content, true);\n \n //If json_decode failed, the JSON is invalid.\n if(!is_array($arrayObjetos))\n {\n throw new Exception('Received content contained invalid JSON!');\n }\n return $arrayObjetos;\n }", "public static function fromRequest(Request $request) {\n\t\t\t$required = $request->attributes->get('_payload_required', []);\n\n\t\t\treturn new static(json_decode($request->getContent(), true) ?: [], $required);\n\t\t}", "static public function application_json($request_body)\n {\n $decoded = json_decode($request_body);\n\n if (json_last_error() !== JSON_ERROR_NONE)\n throw HTTP_Exception::factory(500, 'PARSE_ERROR_JSON_DECODE');\n\n return $decoded;\n }", "private function getContent()\n {\n return $this->serializer->deserialize($this->client->getResponse()->getContent(), 'array', 'json');\n }", "public function decode($request): array;", "protected function decodeArrrayJsonContent()\n {\n return json_decode($this->getJsonContent(), true);\n }", "protected function getRequestData()\n {\n if ($this->requestData) {\n return $this->requestData;\n }\n\n $body = $this->getRequest()->getRawBody();\n try {\n $data = Zend_Json::decode($body);\n } catch (Zend_Exception $e) {\n $this->setErrorResponse('Broken JSON provided with request');\n }\n\n $this->requestData = $data;\n\n return $this->requestData;\n }", "private function extractParamsFromJSONBody(Request $request)\n {\n $params = array();\n\n $content = $request->getContent();\n if(!empty($content)) {\n $result = json_decode($content);\n\n if (json_last_error() === JSON_ERROR_NONE) {\n $params = $result;\n }\n }\n\n return $params;\n }", "public function body()\n {\n $entityBody = file_get_contents('php://input');\n\n foreach ((array)json_decode($entityBody) as $field => $value) {\n $this->requestStack[$field] = $value;\n }\n return json_decode($entityBody);\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function transformJsonBody(\\Symfony\\Component\\HttpFoundation\\Request $request)\n {\n $data = json_decode($request->getContent(), true);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n return null;\n }\n\n if ($data === null) {\n return $request;\n }\n\n $request->request->replace($data);\n\n return $request;\n }", "public function deserializeRequest(Request $request)\n {\n $content = $request->getContent();\n $format = $request->getContentType();\n $type = 'Doctrine\\Common\\Collections\\ArrayCollection';\n\n return new ArrayCollection(\n (array) $this->serializerService->deserialize($content, $type, $format)\n );\n }", "protected function _getJson()\n {\n if ($this->_json) {\n return $this->_json;\n }\n\n return $this->_json = json_decode($this->_getBody(), true);\n }", "public function getJSON()\n {\n if ($this->json) {\n return $this->json;\n }\n\n $this->json = @json_decode($this->rawBody);\n\n return $this->json;\n }", "private function _JsonData() \n {\n $raw = file_get_contents('php://input', true);\n $body = json_decode($raw);\n \n $this->__new((array) $body);\n }", "public function json()\n {\n if (! $this->decoded) {\n $this->decoded = json_decode($this->response, true);\n }\n\n return $this->decoded;\n }", "private function decodeJson( $content ) {\n\n\t\t$content = preg_replace( '/[\\x00-\\x1F\\x80-\\xFF]/', '', $content );\n\n\t\treturn json_decode( $content, true );\n\t}", "public static function getJsonBody()\n {\n // Get content of body of HTTP message\n $body = file_get_contents('php://input');\n\n // Replace EOL's and tabs by a space character (these chars are forbidden to be used within json strings)\n $body = preg_replace(\"/[\\n\\r\\t]/\", \" \", $body);\n\n if ($json = @json_decode($body, true)) {\n return $json;\n }\n\n return null;\n }", "protected function asObject()\n\t{\n\t\treturn \\json_decode($this->response);\n\t}", "public function getParsedResponse()\n {\n return json_decode($this->response);\n }", "private function transformJsonBody(Request $request): void\n {\n $data = JSON::decode($request->getContent(), true);\n\n if (is_array($data)) {\n $request->request->replace($data);\n }\n }", "protected function fetchData() {\n try {\n $uri = $this->config('uri');\n $response = $this->getContentFromUri($uri);\n }\n catch (\\Exception $e) {\n $this->messenger()->addError('Unable to read JSON');\n $this->logger->error($this->t('Error reading JSON file :error',\n [':error' => $e->getMessage()]));\n $response = NULL;\n }\n\n $data = '{}';\n\n if ($response) {\n if (!$this->dvfHelpers->validateJson($response)) {\n $this->messenger()->addError('Invalid JSON file provided');\n $this->logger->error($this->t('Unable to parse this json file :url',\n [':url' => $uri]));\n }\n $data = $response;\n }\n\n return $data;\n }", "public function toObject(): object\n {\n $body = (string) $this->response->getBody();\n\n return json_decode($body) ?? (object) [];\n }", "public function getContent()\n {\n return json_decode($this->getBody(), true);\n }", "public function get_body()\n {\n return json_decode(file_get_contents('php://input'), TRUE);\n }", "function get_JSON_input()\n {\n global $_json_input;\n if ( $_json_input != null ) return $_json_input;\n\n // Receive the RAW post data.\n $content = trim(file_get_contents(\"php://input\"));\n\n // Attempt to decode the incoming RAW post data from JSON.\n $_json_input = json_decode($content, true);\n\n // If json_decode failed, the JSON is invalid.\n if (!is_array($_json_input)) {\n return null;\n }\n\n return $_json_input;\n }", "public function parse (){\n $this->json = json_decode($this->content, true);\n $this->numItems = count ($this->json);\n }", "public function getRequestJson(){\n $requestArray = $this->prepareRequestContent($this->prepareRequestMeta());\n \n return json_encode($requestArray);\n }", "public static function importJson() {\n\t if(self::isJson()) {\n\t foreach (self::getJson() as $name => $value) {\n\t $_REQUEST[$name] = $value;\n\t }\n\t }\n\t}", "private function getParsedBody(RequestInterface $request)\n {\n $body = (string) $request->getBody();\n if (empty($body)) {\n return [];\n }\n\n $contentType = $request->getHeaderLine('Content-Type');\n if ($contentType !== '' && strpos($contentType, 'application/json') !== false) {\n return $body;\n }\n\n $encode = json_decode($body, true);\n $parsed = [];\n foreach ($encode as $key => $value) {\n if (!is_array($value)) {\n if (substr($value, 0, 1) === '@') {\n $parsed[$key] = new \\CURLFile(str_replace('@', '', $value));\n } else {\n $parsed[$key] = $value;\n }\n } else {\n foreach ($value as $k => $v) {\n $parsed[$key.'['.$k.']'] = $v;\n }\n }\n }\n return $parsed;\n }", "protected function getRequestPayload(Request $request)\n {\n $requestData = null;\n\n if (str_starts_with($request->headers->get('Content-Type'), 'application/json')) {\n $content = $request->getContent();\n if (! empty($content)) {\n $requestData = json_decode($content, true);\n }\n } else {\n $requestData = $request->request->all();\n }\n\n return $requestData;\n }", "public function response() {\n return json_decode($this->response);\n }", "public static function json($content)\n {\n $response = new static;\n $response\n ->header('Content-type', 'application/json')\n ->body(json_encode($content));\n return $response;\n }", "public function getJsonRequestParams()\n {\n return json_decode(file_get_contents(\"php://input\"));\n }", "public function parseRequest(Request $request)\n {\n if (!$this->isMultipartRequest($request)) {\n return [];\n }\n\n return $this->parseBody($request->getBody(), $this->getBoundary($request));\n }", "public function deserialize($data);", "public function getAppData(Request $request) {\n $content = $request->getContent();\n $dataer = (object) $this->decodeObjectAction($content);\n $app_data = $dataer->reqObj;\n $req_obj = $app_data;\n return $req_obj;\n }", "public function getAppData(Request $request) {\n $content = $request->getContent();\n $dataer = (object) $this->decodeObjectAction($content);\n $app_data = $dataer->reqObj;\n $req_obj = $app_data;\n return $req_obj;\n }", "protected function getPostData(Request $request) {\n\t\tif (!isset($this->postData)) {\n\t\t\t$body = $request->Body;\n\t\t\t/** @var array $postVars */\n\t\t\t$postVars = $request->Post();\n\n\t\t\tif (isset($postVars['model'])) {\n\t\t\t\t$this->postData = json_decode($postVars['model'], true);\n\t\t\t} elseif (!empty($postVars)) {\n\t\t\t\t$this->postData = $postVars;\n\t\t\t} elseif (strlen($body) > 0) {\n\t\t\t\t$this->postData = json_decode($body, true);\n\t\t\t} else {\n\t\t\t\t$this->postData = [];\n\t\t\t}\n\t\t}\n\t\treturn $this->postData;\n\t}", "private function fetch( $request ) {\n\n\t\t\t$response = wp_remote_get( $request );\n\t\t\t$code = wp_remote_retrieve_response_code( $response );\n\n\t\t\tif ( 200 !== $code ) {\n\t\t\t\treturn new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'text-domain' ), $code ) );\n\t\t\t}\n\n\t\t\t$body = wp_remote_retrieve_body( $response );\n\n\t\t\treturn json_decode( $body );\n\n\t\t}", "public function receive() {\n $this->_failIfNotAJsonRpcRequest();\n try {\n if (!$this->_request = $this->getInputData()) {\n throw new JsonRpcException('JSON cannot be decoded', JsonRpcException::PARSE_ERROR);\n }\n $this->_failIfRequestIsInvalid($this->_request);\n \n return $this->_request;\n } catch (JsonRpcException $e) {\n /*die(json_encode(array(\n 'jsonrpc' => $this->version,\n 'id' => isset($this->_request['id']) ? $this->_request['id'] : null,\n 'error' => $e->getErrorAsArray(),\n )));*/\n $this->_error = $e->getErrorAsArray();\n return false;\n }\n }", "protected function get_decoded_data() {\n return json_decode($this->get_data());\n }", "private function body()\n {\n return json_decode($this->request->all()[\"job\"], true);\n }", "private function makeRequest($url)\n {\n return json_decode(file_get_contents($url));\n }", "public function json($content): ResponseInterface;", "private function _parseJson()\n {\n $data = @json_decode( $this->input, true );\n\n if( is_array( $data ) )\n {\n $_REQUEST = array_merge($_GET, $data);\n return true;\n }\n return false;\n }", "protected function mapJson() {\n $post = json_decode(file_get_contents('php://input'), true);\n if(is_null($post)) return;\n foreach($post as $key => $value) {\n $this->data[$key] = $value;\n }\n }", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "public function data() {\n $request = $this->requestReader->getContents();\n\t\tif ($request) {\n if ($json_post = CJSON::decode($request)){\n\t\t\t\treturn $json_post;\n\t\t\t}else{\n\t\t\t\tparse_str($request,$variables);\n\t\t\t\treturn $variables;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function shouldParseJsonPayload($request)\n {\n return in_array($request->method(), ['POST', 'PUT', 'PATCH']) && $request->isJson();\n }", "protected function getBody()\n {\n $body = file_get_contents('php://input');\n json_decode($body);\n if(json_last_error() == JSON_ERROR_NONE){\n return json_decode($body);\n }else{\n return false;\n }\n }", "function getInput(){\n return json_decode(file_get_contents('php://input'), true);\n }", "private function getRequestContent($requestContents) {\n $genericError = \"For more information on correctly formatting your request, see $this->docsURL\";\n\n #Convert the request to JSON - note depth of 2, as current, and expected,\n #use cases don't contain any nested properties\n $requestArray = json_decode($requestContents,true,2);\n\n #json_decode returns null for invalid JSON and $requestContents will be empty if there was no request body\n if(is_null($requestArray) && !empty($requestContents)) {\n $this->exceptionWithResponseCode(400,\n \"The JSON message is not correctly formatted. \" . $genericError\n );\n }\n\n #If the request contents is empty then there is nothing for us to get\n if(empty($requestContents)) {\n return;\n }\n\n /* The default case is that a single value (or nothing at all) is specified.\n * But, we first deal with cases where we expect multiple key/value pairs.\n * Single values are stored in $this->entityPropertyValue whilst miultiple\n * values are stored in $this->entityPropertyKVArray.\n */\n switch ($this->entityProperty) {\n case 'extensionproperties':\n\n //If a property key has been specified, then we don't expect a K/V list\n //and want to make use of the default case\n if(is_null($this->entityPropertyKey)) {\n $this->entityPropertyKVArray=$requestArray;\n break;\n }\n\n default:\n\n //If there is not a value in the array at this point throw an exception\n if (!isset($requestArray['value'])) {\n $this->exceptionWithResponseCode(400,\n \"A value for \\\"$this->entityProperty\\\" should be provided. \" .\n \"This should be provided in a JSON string {\\\"value\\\":\\\"<value for \" .\n \"\\\"$this->entityProperty\\\">\\\"}, with no other pairs present.\" . $genericError\n );\n }\n\n //If there are additional entiries in our array to the value, throw exception\n if(count($requestArray)>1) {\n $this->exceptionWithResponseCode(400,\n \"Only one value for \\\"$this->entityProperty\\\" should be provided. \" .\n \"This should be provided in a JSON string {\\\"value\\\":\\\"<value for \" .\n \"\\\"$this->entityProperty\\\">\\\"}, with no other pairs present.\" .\n \" If you believe \\\"$this->entityProperty\\\" should take multiple key/value \".\n \"pairs, check your spelling of \\\"$this->entityProperty\\\"\" . $genericError\n );\n }\n\n $this->entityPropertyValue=$requestArray['value'];\n\n break;\n }\n }", "protected function getData()\n {\n $content = $this->getRawContent();\n $data = is_string($content) ? @json_decode($content) : null;\n if ($data === null) {\n throw new Exception(Response::PARSE_ERROR);\n }\n return $data;\n }", "protected function CrOrgn() {\n header(\"Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}\");\n $postdata = file_get_contents(\"php://input\");\n return json_decode($postdata);\n }", "public function getReaderFromRequest(Request $request)\r\n {\r\n\r\n return Reader::createFromStream(\r\n $request->getContent(true)\r\n );\r\n }", "protected function setRequestArgumentsFromJSON($request) {\n\t\t$requestArray = json_decode($request, TRUE);\n\t\tif (is_array($requestArray)) {\n\t\t\t\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility::mergeRecursiveWithOverrule($this->requestArguments, $requestArray);\n\t\t}\n\t}", "protected function getContent($url)\n {\n return json_decode(file_get_contents($url));\n }", "public static function getResponse( $request )\n {\n try\n {\n $r = self::getResponder( $request );\n return $r ? $r->getResponse() : null;\n }\n catch(Error $ex)\n {\n return new JSONResponse_Error( $request, $ex );\n }\n }", "public function onKernelRequest(RequestEvent $event): void\n {\n // Get current request\n $request = $event->getRequest();\n\n // If request has some content and is JSON type convert it to request parameters\n if ($request->getContent() !== '' && $this->isJsonRequest($request)) {\n $this->transformJsonBody($request);\n }\n }", "public function get_request_content();", "public static function fromJson($data)\n {\n return json_decode($data, true);\n }", "function json_api_request() {\n /** @var \\CloudCreativity\\LaravelJsonApi\\Services\\JsonApiService $service */\n $service = app('json-api');\n\n return $service->request();\n }", "protected function decodedBody()\n\t{\n\t\ttry {\n\t\t\treturn $this->response->json();\n\t\t} catch (Exception $e) {\n\t\t\tthrow new ParserException($e->getMessage(), $e->getCode());\n\t\t}\n\t}", "private static function getData()\n {\n static $data = null;\n\n // Only parse once\n if ($data === null) {\n $content_type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;\n if ($pos = strpos($content_type, ';')) {\n $content_type = substr($content_type, 0, $pos);\n }\n\n switch ($content_type) {\n case 'multipart/form-data':\n default:\n $data = $_REQUEST;\n break;\n case 'application/x-www-form-urlencoded':\n parse_str(file_get_contents('php://input'), $data);\n break;\n case 'application/json':\n $data = json_decode(file_get_contents('php://input'), true);\n break;\n case 'application/xml':\n case 'text/xml':\n $data = (array)simplexml_load_string(file_get_contents('php://input'));\n $data = array_map('trim', $data);\n break;\n }\n }\n\n return $data;\n }", "protected function parseRequestInput()\n {\n $requestInput = null;\n\n if (in_array($this->getMethod(), [self::METHOD_DELETE, self::METHOD_PUT, self::METHOD_POST], true))\n {\n if (empty($_REQUEST) && isset($_SERVER['CONTENT_TYPE'], $_SERVER['CONTENT_LENGTH']) && (int)$_SERVER['CONTENT_LENGTH'])\n {\n $input = file_get_contents('php://input');\n\n switch ($_SERVER['CONTENT_TYPE'])\n {\n case 'application/json':\n {\n $requestInput = json_decode($input, true, 512, JSON_THROW_ON_ERROR);\n break;\n }\n case 'multipart/form-data':\n case 'application/x-www-form-urlencoded':\n {\n parse_str($input, $requestInput);\n break;\n }\n default: $requestInput = $input;\n }\n }\n }\n return $requestInput;\n }", "public function checkJsonRequested() {\n\t\t$contentTypes = \\Yii::$app->request->getAcceptableContentTypes();\n if (isset($contentTypes['application/json'])) {\n $this->jsonRequested = true;\n }\n\t}", "private function request($request)\n {\n try {\n return json_decode($request()->getBody()->getContents());\n $this->retries = 0;\n } catch (ClientException $e) {\n if ($e->hasResponse()) {\n if ($e->getResponse()->getStatusCode() === 401) {\n if ($this->retries <= $this->maxRetries) {\n $this->retries = $this->retries + 1;\n $this->refreshToken();\n // Retry the original request\n $this->request($request);\n }\n }\n }\n\n } catch (\\Exception $e) {\n \\Log::info($e);\n }\n }", "static public function parse_json_response($s)\n {\n return json_decode(rtrim($s), true);\n }", "protected function _parseJson($data, $container)\n {\n $this->_parseFolders($data);\n return $this->_parseBookmarks($data);\n }", "public function jsonSerialize()\n {\n $this->isValid(true);\n // TODO Remove useless context from sub-objects. And other copied data (homepage, etc.).\n return (object) $this->content;\n }", "protected function parseRequest()\n {\n $this->input = $this->request->getPostList()->toArray();\n }", "public function decode($data) {\n return $this->encoder->decode($data->get('json_data'), \"json\");\n }", "public function formData (Request $request)\n {\n $method = $request['function'];\n $data = self::$method($request);\n return response()->json($data);\n }", "public function fetchData()\n {\n // TODO Build URI and add PARAMS, METHODS, API TOKEN etc...\n // TODO Handle POST, GET requests using curl\n // TODO Authentication\n $path = $this->endpoint;\n return json_decode(file_get_contents($path, true));\n }", "public function getjson( Request $request ) {\n // This condition checks the `Content-type` and makes sure to \n // decode JSON string from the request body into array.\n if ( 0 === strpos( $request->headers->get( 'Content-Type' ), 'application/json' ) ) {\n $params = json_decode( $request->getContent(), TRUE );\n $request->request->replace( is_array( $params ) ? $params : [] );\n }\n //Using our service to get all the data from the table vizh5p\n $db_logic = \\Drupal::service('vizh5p.db_logic');\n $data = $db_logic->get();\n $datauserarray = array();\n $datacidarray = array();\n $dataattemptarray = array();\n //selecting distinct content id\n foreach ($data as $d) {\n if(!in_array($d->content_id , $datacidarray))\n array_push($datacidarray , $d->content_id);\n }\n sort($datacidarray);\n $cid = $datacidarray[$params['content_id']]; //Finding the content id\n foreach ($data as $d) { //Selecting username based on content id\n if($d->content_id == $cid)\n if(!in_array($d->actor , $datauserarray))\n array_push($datauserarray , $d->actor);\n }\n sort($datauserarray);\n $actor = $datauserarray[$params['username']]; //Finding the username\n\t $i = 0;\n foreach ($data as $d) {\n if($cid == $d->content_id && $actor == $d->actor && $d->verb == 'attempted') {\n $i++;\n array_push($dataattemptarray , $i);\n }\n }\n $attempt = $dataattemptarray[$params['attempt']];\n \n $response = array();\n $c = array();\n $cu = array();\n $cua = array();\n $temp = array();\n $length = count($data);\n for($i = 0 ; $i < $length ; $i++){\n if($data[$i]->content_id == $cid && $data[$i]->verb == \"attempted\"){\n $temp = array();\n $user = $data[$i]->actor;\n array_push($temp , $data[$i]);\n for($j = $i + 1 ; $j < $length ; $j++){\n if($data[$j]->content_id == $cid && $user == $data[$j]->actor && $data[$j]->verb == \"attempted\")\n break;\n if($data[$j]->content_id == $cid && $user == $data[$j]->actor)\n array_push($temp , $data[$j]);\n }\n $case = findtype($temp);\n if($case == \"4\") {\n $len = count($temp);\n $atime = $temp[0]->time;\n $i1time = $temp[1]->time;\n $i2time = $temp[$len - 2]->time;\n $antime = $temp[$len - 1]->time;\n $atime = explode(\".\" , $atime);\n $i1time = explode(\".\" , $i1time);\n $i2time = explode(\".\" , $i2time);\n $antime = explode(\".\" , $antime);\n $t1 = strtotime($atime[0]) . \".\" . $atime[1];\n $t2 = strtotime($i1time[0]) . \".\" . $i1time[1];\n $t3 = strtotime($i2time[0]) . \".\" . $i2time[1];\n $t4 = strtotime($antime[0]) . \".\" . $antime[1];\n array_push($c , array($t2 - $t1 , $t3 - $t2 , $len - 2, $t4 - $t3));\n }\n }\n }\n $length = count($c);\n $response[0][0] = 0;\n $response[0][1] = 0;\n $response[0][2] = 0;\n $response[0][3] = 0;\n for($i = 0 ; $i < $length ; $i++){\n $response[0][0] += $c[$i][0];\n $response[0][1] += $c[$i][1];\n $response[0][2] += $c[$i][2];\n $response[0][3] += $c[$i][3];\n }\n $response[0][0] /= $length;\n $response[0][1] /= $length;\n $response[0][2] /= $length;\n $response[0][3] /= $length;\n \n $length = count($data);\n for($i = 0 ; $i < $length ; $i++){\n if($data[$i]->content_id == $cid && $data[$i]->actor == $actor && $data[$i]->verb == \"attempted\"){\n $temp = array();\n array_push($temp , $data[$i]);\n for($j = $i + 1 ; $j < $length ; $j++){\n if($data[$j]->content_id == $cid && $actor == $data[$j]->actor && $data[$j]->verb == \"attempted\")\n break;\n if($data[$j]->content_id == $cid && $actor == $data[$j]->actor)\n array_push($temp , $data[$j]);\n }\n $case = findtype($temp);\n if($case == \"4\") {\n $len = count($temp);\n $atime = $temp[0]->time;\n $i1time = $temp[1]->time;\n $i2time = $temp[$len - 2]->time;\n $antime = $temp[$len - 1]->time;\n $atime = explode(\".\" , $atime);\n $i1time = explode(\".\" , $i1time);\n $i2time = explode(\".\" , $i2time);\n $antime = explode(\".\" , $antime);\n $t1 = strtotime($atime[0]) . \".\" . $atime[1];\n $t2 = strtotime($i1time[0]) . \".\" . $i1time[1];\n $t3 = strtotime($i2time[0]) . \".\" . $i2time[1];\n $t4 = strtotime($antime[0]) . \".\" . $antime[1];\n array_push($cu , array($t2 - $t1 , $t3 - $t2 , $len - 2 , $t4 - $t3));\n }\n }\n }\n $length = count($cu);\n $response[1][0] = 0;\n $response[1][1] = 0;\n $response[1][2] = 0;\n $response[1][3] = 0;\n for($i = 0 ; $i < $length ; $i++){\n $response[1][0] += $cu[$i][0];\n $response[1][1] += $cu[$i][1];\n $response[1][2] += $cu[$i][2];\n $response[1][3] += $cu[$i][3];\n }\n $response[1][0] /= $length;\n $response[1][1] /= $length;\n $response[1][2] /= $length;\n $response[1][3] /= $length;\n $i = 0;\n foreach ($data as $d) { //Checking attempt number\n if($d->content_id == $cid && $d->actor == $actor && $d->verb == 'attempted') \n $i++;\n if($d->content_id == $cid && $d->actor == $actor && $i == $attempt)\n array_push($cua , $d);\n }\n $case = findtype($cua);\n $response[2][0] = 0;\n $response[2][1] = 0;\n $response[2][2] = 0;\n $response[2][3] = 0;\n if($case == \"2\") {\n $atime = $temp[0]->time;\n $i1time = $temp[1]->time;\n $atime = explode(\".\" , $atime);\n $i1time = explode(\".\" , $i1time);\n $t1 = strtotime($atime[0]) . \".\" . $atime[1];\n $t2 = strtotime($i1time[0]) . \".\" . $i1time[1];\n $cua = array($t2 - $t1);\n $response[2][0] = $cua[0];\n $response[2][2] = 1;\n } elseif($case == \"4\") {\n $len = count($cua);\n $atime = $cua[0]->time;\n $i1time = $cua[1]->time;\n $i2time = $cua[$len - 2]->time;\n $antime = $cua[$len - 1]->time;\n $atime = explode(\".\" , $atime);\n $i1time = explode(\".\" , $i1time);\n $i2time = explode(\".\" , $i2time);\n $antime = explode(\".\" , $antime);\n $t1 = strtotime($atime[0]) . \".\" . $atime[1];\n $t2 = strtotime($i1time[0]) . \".\" . $i1time[1];\n $t3 = strtotime($i2time[0]) . \".\" . $i2time[1];\n $t4 = strtotime($antime[0]) . \".\" . $antime[1];\n $cua = array($t2 - $t1 , $t3 - $t2 , $len - 2 , $t4 - $t3);\n $response[2][0] = $cua[0];\n $response[2][1] = $cua[1];\n $response[2][2] = $cua[2];\n $response[2][3] = $cua[3];\n }\n return new JsonResponse( $response );\n }" ]
[ "0.72556823", "0.71413106", "0.6624271", "0.6612224", "0.6578103", "0.6538436", "0.6307548", "0.6307548", "0.6298856", "0.62367254", "0.6156682", "0.6145528", "0.608869", "0.59884214", "0.59680426", "0.5966766", "0.5832127", "0.5805215", "0.57987344", "0.5795668", "0.5769368", "0.5764663", "0.57599795", "0.57599795", "0.57569176", "0.5749839", "0.57450724", "0.57431614", "0.5741061", "0.5649561", "0.56455916", "0.56409675", "0.5621046", "0.5621046", "0.5621046", "0.558597", "0.5565268", "0.5563825", "0.5561279", "0.5560552", "0.554722", "0.55418855", "0.5539752", "0.5534612", "0.549752", "0.54948753", "0.5491575", "0.54388696", "0.542203", "0.54196", "0.5416532", "0.54142755", "0.5411836", "0.5404688", "0.53982645", "0.5389014", "0.53420216", "0.5337808", "0.53356874", "0.5328622", "0.52412856", "0.5225827", "0.5225827", "0.5215323", "0.5195381", "0.5186638", "0.51751477", "0.51659054", "0.51654726", "0.5151323", "0.51431453", "0.5131388", "0.5115191", "0.5110253", "0.5107147", "0.5085933", "0.50837505", "0.50780624", "0.507721", "0.5049962", "0.5048662", "0.50410515", "0.50356615", "0.5025604", "0.5002284", "0.49897683", "0.49672863", "0.49615002", "0.49423534", "0.49408883", "0.4931108", "0.49227336", "0.49213094", "0.49148232", "0.49118266", "0.49111453", "0.49097013", "0.49021524", "0.48938876", "0.48861176", "0.48823717" ]
0.0
-1
Create a JSON response with serialized data.
protected function json($data, $status = 200, array $headers = [], array $serializationGroups = ['api']) { $response = new JsonResponse(NULL, $status, $headers); $serializer = $this->get('serializer'); $context = SerializationContext::create()->enableMaxDepthChecks(); if ($serializationGroups) { $context->setGroups($serializationGroups); } $content = $serializer->serialize($data, 'json', $context); $response->setContent($content); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function responseJSON($data) {\n \t// Convert to JSON\n \t$dataJSON = $this->serializeJson($data);\n \t$response = new Response($dataJSON);\n \t$response->headers->set('Content-Type', 'application/json');\n \treturn $response;\n }", "private function ajson($data){\n $json = $this->get('serializer')->serialize($data, 'json');\n\n // Response with httpfoundation\n $response = new Response();\n\n // Assign content to the response\n $response->setContent($json);\n\n // Specify response format\n $response->headers->set('Content-Type', 'application/json');\n\n // Return response\n return $response;\n }", "private function _createJson()\n {\n return new SlimBootstrap\\ResponseOutputWriter\\Json(\n $this->_request,\n $this->_response,\n $this->_headers,\n $this->_shortName\n );\n }", "public function toJSON () {\r\n \treturn json_encode($this->_response);\r\n }", "public function json($data): PsrResponseInterface;", "public function json($data)\n {\n $this->template = NULL;\n $this->response->headers('Content-Type', 'application/json; charset=utf-8');\n $this->response->body(json_encode($data));\n }", "public function jsonAction()\n {\n $response = new Response(json_encode(['name' => 'John Doe']));\n $response->headers->set('Content-Type', 'application/json');\n\n return $response;\n }", "public static function json($data)\n {\n return new JSONResponse($data);\n }", "public function asJSON($data = []) {\n\t\t$securityToken = $this->getSecurityToken();\n\t\t$securityToken->reset();\n\t\t$data['NewSecurityID'] = $securityToken->getValue();\n\n\t\t$response = $this->getResponse();\n\n\t\t// If we received an AJAX request, we can't redirect in an ordinary way: the browser will\n\t\t// interpret the 302 responses internally and the response will never reach JS.\n\t\t//\n\t\t// To get around that, upon spotting an active redirect, we change the response code to 200,\n\t\t// and move the redirect into the \"RedirectTo\" field in the JSON response. Frontend can\n\t\t// then interpret this and trigger a redirect.\n\t\tif ($this->redirectedTo()) {\n\t\t\t$data['RedirectTo'] = $this->response->getHeader('Location');\n\t\t\t// Pop off the header - we are no longer redirecting via the usual mechanism.\n\t\t\t$this->response->removeHeader('Location');\n\t\t}\n\n\t\t$response->addHeader('Content-Type', 'application/json');\n\t\t$response->setBody(json_encode($data));\n\t\t$response->setStatusCode(200);\n\t\treturn $response;\n\t}", "private function jsonResponse($data)\r\n {\r\n return new JsonModel($data);\r\n }", "public function return_json(){\n\t\t$this->output\n\t ->set_content_type('application/json')\n\t ->set_output(json_encode($this->response));\n\t}", "public function json() {\n return json_encode($this->response);\n }", "public function jsonSerialize()\n {\n return array('headers' => $this->headers, 'body' => $this->body);\n }", "private function jsonResponse() {\n return json_format($this->response, $this->pretty);\n }", "private function json() {\n if( $this->format === 'application/hal+json' ) {\n header('Content-Type: application/hal+json; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\JsonWriter(true);\n return $writer->execute($hal_response);\n } else {\n header('Content-Type: application/json; charset=utf-8', TRUE, $this->status);\n return json_encode($this->content, JSON_NUMERIC_CHECK);\n }\n }", "public static function _json($data) {\n self::response(false)\n ->status(200)\n ->header('Content-Type', 'application/json')\n ->write(json_encode($data))\n ->send();\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['request'] = $this->request;\n $json['response'] = $this->response;\n $json['session_token'] = $this->sessionToken;\n $json['tags'] = $this->tags;\n $json['user_id'] = $this->userId;\n $json['company_id'] = $this->companyId;\n $json['metadata'] = $this->metadata;\n\n return $json;\n }", "private function response ($data) {\n $response = new Response($this->serializer->serialize($data, 'json'));\n $response->headers->set('Content-Type','application/json');\n $response->headers->set('Access-Control-Allow-Headers', 'origin, content-type, accept');\n $response->headers->set('Access-Control-Allow-Origin', '*');\n return $response;\n }", "public function responseJsonPersonalizado($data) {\n $json = $this->get('serializer')->serialize($data, 'json');\n\n //Response con http fundation\n $response = new Response();\n\n //Asignar contenido a la respuesta\n $response->setContent($json);\n\n //Indicar formato de respuesta\n $response->headers->set('Content-Type', 'application/json');\n //Devolver respuesta\n\n return $response;\n }", "public function responseJsonPersonalizado($data) {\n $json = $this->get('serializer')->serialize($data, 'json');\n\n //Response con http fundation\n $response = new Response();\n\n //Asignar contenido a la respuesta\n $response->setContent($json);\n\n //Indicar formato de respuesta\n $response->headers->set('Content-Type', 'application/json');\n //Devolver respuesta\n\n return $response;\n }", "public function responseJson() {\n return Response::json($this->_responseData, $this->_responseCode);\n }", "public function getJsonResponse() {\n return \\Lib\\Format::forge($this->_response)->to_json();\n }", "function jsonSerialize() {\n $data = [ 'Customer' => [\n 'Customer_id' => $this->Customer_id,\n 'Username' => $this->Username,\n 'Name' => $this->Name,\n 'Surname' => $this->Surname,\n 'Email' => $this->Email,\n 'Phone' => $this->Phone\n ] ];\n return $data;\n }", "private function json($data){\n header('Content-type: application/json');\n return json_encode($data);\n }", "public function jsonSerialize()\n {\n return [\n \"url\" => $this->url,\n \"method\" => $this->method,\n \"payload\" => $this->render(),\n \"headers\" => $this->headers\n ];\n }", "public function json()\n {\n $code = 200;\n\n if (!Request::has(\"no_response_code\") || Request::input('no_response_code') != \"yes\") {\n $code = $this->getCode();\n }\n\n return response()->json($this->getResponse(), $code);\n }", "final public function jsonSerialize() {}", "public function jsonSerialize()\n {\n $json = array();\n $json['url'] = $this->url;\n $json['method'] = $this->method;\n $json['encoding'] = $this->encoding;\n $json['events'] = $this->events;\n $json['template'] = $this->template;\n\n return $json;\n }", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize();", "public function jsonSerialize()\n {\n $jsonObject = parent::jsonSerialize();\n $jsonObject->result = $this->information[ self::INFORMATION_RESULT ];\n\n return $jsonObject;\n }", "private function json()\n {\n return json_encode($this->data);\n }", "public function _jsonSerialize();", "private function getJSON(){\n return json_encode($this->getResponseStructure());\n }", "private function getJsonResponse($data) {\r\n $response = json_encode($data);\r\n return $response;\r\n }", "function jsonSerialize()\n {\n return [\n 'meta' => [\n 'offset' => $this->page->getOffset(),\n 'limit' => $this->page->getLimit(),\n 'total' => $this->total,\n ],\n 'data' => $this->results,\n ];\n }", "public function toJSON( ) {\n\n\t\t$data = $this->_toJsonOrXMLDataPrepare();\n\n\t\treturn json_encode( $data );\n\t}", "public function json($data){\n $data = json_encode($data);\n\n $statusCode = $this->statusCode ? $this->statusCode : $this->statusCodes[$this->requestMethod];\n\n $this->sendReponse($statusCode, $data);\n }", "function json_response() {\n return app(JsonResponse::class);\n }", "public function jsonSerialize()\n {\n $this->present();\n\n return $this->data;\n }", "public function create(): JsonResponse\n {\n return response()->json([\n 'product' => null,\n 'warehouses' => $this->wareHouseRepository->getData(new WarehouseRequest()),\n 'suppliers' => $this->supplierRepository->getData(new SupplierRequest()),\n ]);\n }", "public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }", "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['store_id'] = $this->storeId;\n $json['store_name'] = $this->storeName;\n $json['total'] = $this->total;\n $json['total_without_tax'] = $this->totalWithoutTax;\n $json['tax'] = $this->tax;\n $json['purchase_date'] = $this->purchaseDate;\n $json['recorded_at'] = $this->recordedAt;\n $json['order_number'] = $this->orderNumber;\n $json['receipt_id'] = $this->receiptId;\n $json['receipt_image_url'] = $this->receiptImageUrl;\n $json['receipt_image_urls'] = $this->receiptImageUrls;\n\n return $json;\n }", "public static function json($data = array()) {\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header(\"content-type: application/json\");\n echo json_encode((array) $data);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['uuid'] = $this->uuid;\n $json['updatedAt'] = DateTimeHelper::toRfc3339DateTime($this->updatedAt);\n $json['title'] = $this->title;\n $json['titleTranslated'] = $this->titleTranslated;\n $json['basePrice'] = $this->basePrice;\n $json['typeName'] = $this->typeName;\n $json['typeUuid'] = $this->typeUuid;\n $json['links'] = $this->links;\n $json['validFrom'] = $this->validFrom;\n $json['validThrough'] = isset($this->validThrough) ?\n DateTimeHelper::toSimpleDate($this->validThrough) : null;\n\n return $json;\n }", "public function createJSONResponse()\n {\n $json_array = array();\n if ($this->status->getCode() != Status::SUCCESS)\n {\n // The operation failed. Send only the error\n $json_array['Status'] = $this->status->membersToJsonFormat();\n }\n else\n {\n // Send the profile and the error\n $json_array['Profile'] = $this->user->membersToJsonFormat();\n $json_array['Status'] = $this->status->membersToJsonFormat();\n }\n return json_encode($json_array);\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['productTypeUuid'] = $this->productTypeUuid;\n $json['customer'] = $this->customer;\n $json['adults'] = $this->adults;\n $json['children'] = $this->children;\n $json['seniors'] = $this->seniors;\n $json['arrivalDate'] = DateTimeHelper::toSimpleDate($this->arrivalDate);\n $json['partnerReference'] = $this->partnerReference;\n $json['options'] = $this->options;\n $json['message'] = $this->message;\n $json['timeSlotUuid'] = $this->timeSlotUuid;\n\n return $json;\n }", "function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'quantity' => $this->quantity,\n 'clientName' => $this->clientName,\n 'address' => $this->address,\n 'email' => $this->email,\n 'state' => $this->state,\n 'dispatchingTime'=> $this->dispatchingTime\n ];\n }", "public function json()\n {\n return json_encode(\n [\n 'errors' => $this->error,\n 'success' => $this->ok,\n 'debug' => $this->debug,\n\n ]\n );\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\n {\n }", "public function jsonSerialize()\n {\n return array('title' => $this->title,\n 'size' => $this->size,\n 'unit_price' => $this->unitPrice,\n 'description' => $this->description);\n }", "public function toJson() {\n\t\t$data = $this->getSerializeData();\n\n\t\treturn json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\t}", "public function response($data)\n {\n if ($data instanceof Collection) {\n $data = $data->toArray();\n }\n return response()->json(array('data' => $data,));\n }", "protected function _response($data) : string\n {\n return json_encode($data);\n }", "public function buildJson();", "public function json(array $data = [])\n {\n $ok = ($this->status == 200) ? true : false;\n\n $data = $data ?: [\n \"ok\" => $ok,\n \"status\" => $this->status,\n 'output' => $this->output\n ];\n\n return response()->json($data, $this->status);\n }", "public function jsonString(){\n return json_encode($this->createRequestsArray());\n }", "public function __invoke(): JsonResponse\n {\n $ads = $this->show_properties_to_business_use_case->execute();\n\n $response = new JsonResponse($ads);\n $response->setEncodingOptions( $response->getEncodingOptions() | JSON_PRETTY_PRINT );\n\n return $response;\n }", "public function data(): Response\n {\n $data = json_decode(file_get_contents($this->resources . '/potato_sales.json'));\n\n return new JsonResponse([\"data\" => $data]);\n }", "public function jsonResponse(): string {\n\n header_remove();\n http_response_code(200);\n header('Content-Type: application/json');\n header('Status: 200');\n $response = [\n 'visited' => $this->visited,\n 'cleaned' => $this->cleaned,\n 'final' => $this->final,\n 'battery' => $this->battery\n ];\n\n return json_encode($response,JSON_PRETTY_PRINT);\n }", "public function _serialize($data)\n\t{\n\t\treturn json_encode($data);\n\t}", "private function giveJSONResponse($data) {\n \n header(\"Content-Type: application/json\");\n echo json_encode($data);\n }", "protected function createPayload()\n {\n if ($this->data instanceof Closure) {\n $closure = serialize(new Helpers\\SerializableClosure($this->data));\n $data = compact('closure');\n } else {\n $data = $this->data;\n }\n\n return json_encode(array('id' => $this->id, 'class' => $this->class, 'data' => $data));\n }", "public function response()\n {\n $metadata = $this->metadata;\n $tmp = array();\n \n if ($this->showConfigRoot != false) {\n $tmp['root'] = $metadata['root'];\n $tmp['totalProperty'] = $metadata['totalProperty'];\n $tmp['successProperty'] = $metadata['successProperty'];\n $tmp['messageProperty'] = $metadata['messageProperty'];\n }\n \n $tmp[$metadata['root']] = (empty($this->data)) ? array() : $this->data;\n $tmp[$metadata['successProperty']] = $this->success;\n \n // if metadata Is String return as Raw else create new array\n if ($this->showMetaData != false)\n if ($metadata['onlyRaw'] === true) {\n $tmp['metaData'] = \"|1|2|3|4|5|...5|||\";\n } else {\n $tmp['metaData'] = $this->metadata;\n }\n $rawJson = json_encode($tmp);\n if ($metadata['onlyRaw'] === true) {\n return str_replace('\"|1|2|3|4|5|...5|||\"', $metadata['raw'], $rawJson);\n }\n \n return $rawJson;\n }", "public function toPrettyJSON() {\r\n \treturn json_encode($this->_response, JSON_PRETTY_PRINT);\r\n }", "function json_response($data = [], $message = null, $status = 200, array $headers = [], $options = 0)\n {\n return new JsonResponse(compact('data', 'status', 'message'), $status, $headers, $options);\n }", "public function jsonify()\n {\n $attributes = array();\n $attributes[\"name\"] = $this->name;\n $attributes[\"description\"] = $this->description;\n $attributes[\"brand\"] = $this->brand->name;\n $attributes[\"id\"] = $this->id;\n $attributes[\"barcode\"] = $this->barcode;\n\n return json_encode($attributes);\n }", "public function toJSON()\n {\n return json_encode([\n 'statusCode' => $this->getStatusCode(),\n 'timestamp' => $this->getTimestamp(),\n 'date' => $this->getDate(),\n 'baseCurrency' => $this->getBaseCurrency(),\n 'rates' => $this->getRates()\n ]);\n }", "protected function jsonBody($data)\n {\n if (isset($data)) {\n $this->response = $this->response->withHeader('Content-Type', 'application/json');\n $this->response->getBody()->write(json_encode($data));\n }\n }", "public function toJson()\n {\n $array = [];\n if(count($this->_headers))\n {\n $array['Header'] = [\n 'context' => [\n '_jsns' => 'urn:zimbra',\n ],\n ];\n foreach ($this->_headers as $name => $value)\n {\n $array['Header']['context'][$name] = array('_content' => $value);\n }\n }\n if($this->_request instanceof Request)\n {\n $reqArray = $this->_request->toArray();\n $reqName = $this->_request->requestName();\n $array['Body'][$reqName] = $reqArray[$reqName];\n }\n return json_encode((object) $array);\n }", "public function json($data)\n {\n header(\"Access-Control-Allow-Origin: *\");\n header('Content-Type: application/json');\n\n echo json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK | JSON_BIGINT_AS_STRING);\n }", "public static function generateJSON();", "public function render()\n {\n // Fire event\n C::Event()->fire('Json', 'renderStart');\n\n // Set content type\n header('Content-type: application/json');\n\n // Set status code\n http_response_code($this->statuscode);\n\n // Status on body?\n if (isset($this->settings['status_on_body']) && $this->settings['status_on_body']) {\n $this->data = [\"status\" => $this->statuscode] + $this->data;\n }\n\n // Pretty output?\n if (C::Config()->get('main:output.json.pretty', true)) {\n return json_encode($this->data, JSON_PRETTY_PRINT);\n }\n\n return json_encode($this->data);\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['id'] = $this->id;\r\n $json['source'] = $this->source;\r\n $json['location_id'] = $this->locationId;\r\n $json['name'] = $this->name;\r\n $json['total_ratings'] = $this->totalRatings;\r\n $json['average_rating'] = $this->averageRating;\r\n $json['stars'] = $this->stars;\r\n $json['type_id'] = $this->typeId;\r\n $json['meta_no_index'] = $this->metaNoIndex;\r\n $json['owner_id'] = $this->ownerId;\r\n $json['trip_id'] = $this->tripId;\r\n $json['address1'] = $this->address1;\r\n $json['address2'] = $this->address2;\r\n $json['postcode'] = $this->postcode;\r\n $json['telephone'] = $this->telephone;\r\n $json['url'] = $this->url;\r\n $json['description'] = $this->description;\r\n $json['longitude'] = $this->longitude;\r\n $json['latitude'] = $this->latitude;\r\n $json['num_rooms'] = $this->numRooms;\r\n $json['redirect_accommodation_id'] = $this->redirectAccommodationId;\r\n $json['redirect_id'] = $this->redirectId;\r\n $json['page_url'] = $this->pageUrl;\r\n $json['binary_options'] = $this->binaryOptions;\r\n $json['desc_overview'] = $this->descOverview;\r\n $json['desc_room_information'] = $this->descRoomInformation;\r\n $json['desc_facilities'] = $this->descFacilities;\r\n $json['desc_food_drink'] = $this->descFoodDrink;\r\n $json['date_created'] = $this->dateCreated;\r\n $json['date_updated'] = $this->dateUpdated;\r\n $json['date_removed'] = $this->dateRemoved;\r\n\r\n return $json;\r\n }", "public function jsonSerialize()\n {\n return $this->getBody(true);\n }", "function jsonSerialize()\n {\n return $this->jsonObjectSerialize()->jsonSerialize();\n }", "public function create()\n\t{\n\t\treturn \\Response::json(Input::json());\n\t}", "public function jsonSerialize()\n {\n return [['id' => $this->id,\n 'users_id' => $this->users,\n 'result' => $this->result,\n 'time' => $this->time]\n\n ];\n }", "public function json(){ return json_encode( $this->objectify() ); }", "protected function outputJSONResponse($data){\n\t\t$this->setResponse('json');\n\t\techo json_encode($data);\n\t}", "public function toJson(): mixed\n {\n $this->buildResponse();\n\n return json_decode($this->response->getBody()->getContents());\n }", "private function writeJSON($data){\n\t\tif(!class_exists('Services_JSON')){\n require_once('JSON.php');\n }\n\t\t$json = new Services_JSON();\n\n\t\treturn $json->encode($data);\n }", "public function toJson() : string\n {\n return json_encode($this->toArray(), http_response_code(200));\n }", "public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}", "public function jsonSerialize()\n {\n // TODO: Implement jsonSerialize() method.\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['currency'] = $this->currency;\n $json['name'] = $this->name;\n $json['notes'] = $this->notes;\n $json['price'] = $this->price;\n\n return $json;\n }", "public function jsonSerialize()\r\n {\r\n $json = array();\r\n $json['compositeFault'] = $this->compositeFault;\r\n $json['customerSupport'] = $this->customerSupport;\r\n $json['servicePoints'] = $this->servicePoints;\r\n\r\n return $json;\r\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['list_id'] = $this->listId;\n $json['sender'] = $this->sender;\n $json['subject'] = $this->subject;\n $json['body'] = $this->body;\n $json['resource_urls'] = $this->resourceUrls;\n $json['send_date'] = $this->sendDate;\n\n return $json;\n }", "public function JsonResponse ($data = NULL, $terminate = TRUE) {\n\t\t$res = $this->response;\n\t\t$toolClass = $this->application->GetToolClass();\n\t\t$output = $toolClass::EncodeJson($data);\n\t\tob_clean(); // remove any possible warnings to break client's `JSON.parse();`\n\t\tif (!$res->HasHeader('Content-Type'))\n\t\t\t$res->SetHeader('Content-Type', 'text/javascript');\n\t\t$res\n\t\t\t->SetHeader('Content-Length', strlen($output))\n\t\t\t->SetBody($output);\n\t\tif ($res->GetCode() === NULL)\n\t\t\t$res->SetCode(\\MvcCore\\IResponse::OK);\n\t\tif ($terminate) $this->Terminate();\n\t}", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}", "function jsonSerialize()\n {\n return [\n 'title' => $this->title,\n 'description' => $this->description,\n 'slug' => $this->slug,\n 'created_at' => $this->createdAt\n ];\n }" ]
[ "0.7516463", "0.75109375", "0.7286312", "0.7269864", "0.7082692", "0.70223707", "0.7008661", "0.69642955", "0.69584554", "0.68988836", "0.6890527", "0.68520194", "0.68513304", "0.6833189", "0.6785855", "0.67738163", "0.67640924", "0.6739679", "0.6733518", "0.6733518", "0.66843724", "0.6670696", "0.66580003", "0.6650641", "0.6638316", "0.6634404", "0.66284615", "0.6610691", "0.65963566", "0.65963566", "0.65963566", "0.65963566", "0.65963566", "0.65963566", "0.65963566", "0.65963566", "0.6553065", "0.65451336", "0.6538208", "0.6530411", "0.65074927", "0.6485219", "0.64759904", "0.6472511", "0.64718944", "0.64634526", "0.6456226", "0.64556617", "0.6455489", "0.6446697", "0.6445638", "0.64426315", "0.6441199", "0.64326733", "0.6430455", "0.6423462", "0.6423462", "0.6423462", "0.6422504", "0.6422504", "0.64190435", "0.6412303", "0.6398736", "0.6397275", "0.6396586", "0.63777804", "0.6375603", "0.6359983", "0.63537097", "0.6350425", "0.6334539", "0.6333851", "0.6322328", "0.6321459", "0.63146836", "0.63141656", "0.63013875", "0.6298664", "0.62964934", "0.62932247", "0.628196", "0.627998", "0.6269157", "0.62647", "0.6263623", "0.62627375", "0.6260456", "0.6258136", "0.6256661", "0.62517697", "0.62513095", "0.62504804", "0.62438434", "0.62360907", "0.6235446", "0.6224258", "0.62222433", "0.6218033", "0.62173265", "0.62169826", "0.6216558" ]
0.0
-1
Apply values to an object.
protected function setValues($entity, array $data, array $properties = NULL) { $entityService = $this->get('os2display.entity_service'); $entityService->setValues($entity, $data, $properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function apply(array $propertyValues);", "public function applyValue($value);", "public function apply($value);", "public function values($data){\n\t\tforeach($data as $key => $value){\n\t\t\tif(property_exists($this, $key)){\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setAll($values)\r\n {\r\n foreach ($values as $key => $value)\r\n $this->$key = $value;\r\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 apply($values) {\n $fnToApply = $this->fnToApply;\n return $fnToApply($values);\n }", "function RunnerApply (&$obj, &$argsArr)\n{\t\n\tforeach ($argsArr as $key=>$var)\n\t\tsetObjectProperty($obj,$key,$argsArr[$key]);\n}", "public function copyAttributesToValues()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\t$this->values[$field] = $this->$field ;\n\t\t}\n\t}", "public function setValues($values)\n {\n foreach ($this->entities as $entity) \n {\n $entity->setValues($values);\n }\n }", "public function setValues($values)\n {\n foreach ($values as $field => $value)\n {\n if (isset($this->properties[$field])) {\n /** @var Property $this->$field */\n $this->$field->set($value);\n }\n }\n }", "public function setValues($values);", "public function map(array $values) {\r\n \r\n if ( array_key_exists('pet_id', $values) ) {\r\n $this->setPetid($values['pet_id']);\r\n }\r\n \r\n if ( array_key_exists('pet_name', $values) ) {\r\n $this->setPetname($values['pet_name']);\r\n }\r\n \r\n if ( array_key_exists('species', $values) ) {\r\n $this->setSpecies($values['species']);\r\n }\r\n \r\n if ( array_key_exists('happy', $values) ) {\r\n $this->setHappy($values['happy']);\r\n }\r\n \r\n if ( array_key_exists('hungry', $values) ) {\r\n $this->setHunger($values['hungry']);\r\n }\r\n \r\n if ( array_key_exists('username', $values) ) {\r\n $this->setOwner($values['username']);\r\n }\r\n\r\n return $this;\r\n }", "function setValues($array){\r\n\t\tforeach($array as $key => $val)\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t}", "private function applyArray($arr)\n {\n foreach ($this as $key => $value)\n if (isset($arr[$key]))\n $this->$key = $arr[$key];\n }", "protected function initializeValues(): void\n {\n foreach ($this->params as $name => $infos) {\n if (!$this->is_sub_object && isset($infos['subobject']) && $infos['subobject']) {\n if (isset($infos['multivalues']) && $infos['multivalues']) {\n $this->values[$name] = [];\n } else {\n $tmp = get_class($this);\n $parts = explode('\\\\', $tmp);\n array_pop($parts);\n $class_name = implode('\\\\', $parts) . '\\\\' . $infos['type'];\n $class_name = str_replace('Entity', 'Datatype', $class_name);\n if (!class_exists($class_name)) {\n $class_name = str_replace(['\\\\EU\\\\', '\\\\AP\\\\', '\\\\EA\\\\'], '\\\\AM\\\\', $class_name);\n }\n $this->values[$name] = new $class_name();\n }\n } else {\n $this->values[$name] = null;\n }\n }\n }", "public function values() {\n\t\t// Get arguments :\n\t\t$args = func_get_args();\n\t\t\n\t\t// Add values :\n\t\tif (is_array($args[0])) {\n\t\t\tif ( ! is_array(reset($args[0]))) {\n\t\t\t\t// Deal with normal case : ->values(array(val1, val2, ...), array(val1, val2, ...), ...)\n\t\t\t\tforeach($args as $values_array)\n\t\t\t\t\t$this->push(new \\Glue\\DB\\Fragment_Item_Values($values_array));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Array of arrays given, call this function recursively for each of them :\n\t\t\t\tforeach($args[0] as $arg)\n\t\t\t\t\t$this->values($arg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\t// List of values given, call this function recursively with the same values as an array :\n\t\t\t$this->values($args);\n\t\n\t\treturn $this;\n\t}", "abstract public function mapValues(\\Closure $f): self;", "public function setValues($values = []);", "public function metaValues($object = false);", "public function values($value);", "public function decorate(/* mixed */ $values);", "public function fill($values = []) {\n foreach ($values as $key => $value) {\n $key = explode('_', $key);\n if (count($key) > 1 && end($key) === 'id') {\n array_pop($key);\n }\n $key = array_values($key);\n for ($i = 0; $i < count($key); $i++) {\n $key[$i] = ucfirst($key[$i]);\n }\n $key = implode('', $key);\n $func = 'set' . $key;\n if (method_exists($this, $func)) {\n $this->$func($value);\n }\n }\n $this->afterFill();\n }", "public function apply();", "public function apply();", "public function assignValues($values=[]) {\n }", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "public function update (ValueObjectAbstract $valueObject);", "public function modifyValue($value, array $arguments);", "protected function map($array, $map, &$object) {\r\n \r\n try {\r\n // Convert result object to an array\r\n $objVars = get_object_vars($array);\r\n \r\n foreach ($map as $field => $method) {\r\n if (isset($objVars[$field]))\r\n $object->$method($objVars[$field]);\r\n }\r\n $object->setObjectState(true);\r\n } catch (\\Exception $e) {\r\n throw $e;\r\n }\r\n }", "public function values($data);", "public function setValues(array $values): void\n {\n foreach ($this->getInputNames() as $name) {\n if (array_key_exists($name, $values)) {\n $this->$name = $values[$name];\n }\n }\n }", "public function setAttributes($values)\n {\n if (is_array($values)) {\n foreach ($values as $name => $value) {\n $setter = 'set' . ucfirst($name);\n if (method_exists($this, $setter)) {\n // set property\n $this->$setter($value);\n }\n }\n }\n }", "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 }", "public static function populate($values, $class, $db = false)\n {\n if (is_subclass_of($class, BeanMapping::class))\n return call_user_func(array($class, 'mapping'), $values);\n $obj = self::newInstance($class);\n if (is_null($obj)) return null;\n $ref = new ReflectionObject($obj);\n $values = new Arrays($values);\n foreach ($ref->getProperties() as $property) {\n $name = $property->getName();\n $value = $values->get(self::getColumnName($property, $db));\n $other_ways = true;\n if ($ref->hasMethod($mn = 'set' . ucwords(str_replace('_', '', $name)))) {\n try {\n $method = $ref->getMethod($mn);\n $method->setAccessible(true);\n $method->invoke($obj, $value);\n $other_ways = false;\n } catch (Exception $e) {\n }\n }\n if ($other_ways) {\n if ($ref->hasMethod('__set'))\n $obj->$name = $value;\n else {\n $property->setAccessible(true);\n $property->setValue($obj, $value);\n }\n }\n }\n return $obj;\n }", "public function loadPropierties($values)\n {\n foreach ($values as $key => $value) {\n if (property_exists($this, $key)) {\n $this->$key = $value;\n }\n }\n }", "public static function setAttributes($obj, array $data)\n {\n if (! is_object($obj)) {\n throw new \\RuntimeException(\"First param should be an object. \");\n }\n\n foreach ($data as $key => $value) {\n $function = 'set' . ucfirst($key);\n if (! is_null($value) && method_exists($obj, $function)) {\n $obj->$function($value);\n }\n }\n }", "public function values(array $values)\n {\n foreach ($values as $key => $val) {\n $this->SetValue($key, $val);\n }\n return $this; \n }", "public function add_values($values){\n foreach($values as $value){\n $this->add_value($value);\n }\n }", "public function apply(callable $callable)\n {\n $this->values = array_map($callable, $this->values);\n\n return $this;\n }", "function brag_rest_update_flamingo( $value, $object, $field_name ) {\n \n\tforeach ($value as $field => $data) {\n\t\tupdate_post_meta( $object->ID, $field, $data );\n\t}\n}", "public function setMappedValues($values): self\n {\n foreach ($values as $apiKey => $value) {\n $property = \\substr($apiKey, 6); // 'image_'\n if (! \\property_exists($this, $property)) {\n continue;\n }\n\n if ($property == 'order') {\n $value = (int) $value;\n }\n\n $this->$property = $value;\n }\n\n return $this;\n }", "public function extract($object)\n {\n if (!$object instanceof ConfigValues) {\n throw new Exception\\InvalidArgumentException(\n '$object must be an instance of CgmConfigAdmin\\Entity\\ConfigValues'\n );\n }\n /* @var $object ConfigValues*/\n $data = parent::extract($object);\n $data = $this->mapField('id', 'configvalues_id', $data);\n $data = $this->mapField('values', 'configvalues', $data);\n return $data;\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}", "public function onBuildComplex(Model_Object_Interface $object, array $values)\n {\n foreach ($this->_fields as $field) {\n $this->buildOneFieldFromValues($field, $object, $values);\n }\n return $object;\n }", "public function setValues($values)\n {\n foreach ($this->findScenario() as $name) {\n if (array_key_exists($name, $values)) {\n $this->$name = $values[$name];\n }\n }\n return $this;\n }", "public function apply(&$values): bool;", "public function preprocess(array $values, array $context = []);", "protected function _processValues($entity, array $options = [])\n {\n $obData = Connect::newArangoDocument();\n foreach ($entity as $key => $value) {\n $obData->set($key, $value);\n }\n return $obData;\n }", "function update(array $values)\n{\n\tforeach ($this as $model) {\n\t\t$model->setValues($values);\n\t\t$model->save();\n\t}\n}", "public function update( &$object );", "public function apply() {}", "public function setValues(array $values);", "public function setValue($entries) {}", "public function fromArray(array $values){\n foreach ($values as $property => $value) {\n \n $this->__set($property, $value);\n }\n \n }", "public function setValues($values)\n {\n // check if the model has a mass assignment whitelist\n $permitted = (property_exists($this, 'permitted')) ? static::$permitted : false;\n\n // if no whitelist, then check for a blacklist\n $protected = (!is_array($permitted) && property_exists($this, 'protected')) ? static::$protected : false;\n\n foreach ($values as $k => $value) {\n // check for mass assignment violations\n if (($permitted && !in_array($k, $permitted)) ||\n ($protected && in_array($k, $protected))) {\n throw new MassAssignmentException(\"Mass assignment of $k on \".static::modelName().' is not allowed');\n }\n\n $this->$k = $value;\n }\n\n return $this;\n }", "public function updateObject($values = null)\n\t{\n\t\tif(sfContext::getInstance()->getUser()->isSuperAdmin())\n\t\t{\n\t\t\t$this->values['cem_cemetery_id'] = sfContext::getInstance()->getRequest()->getParameter('facilitybooking_cem_cemetery_id');\n\t\t\t\n\t\t\t$amPostChapelTypes \t= sfContext::getInstance()->getRequest()->getParameter('chapel_grouplist');\n\t\t\t$amPostRoomTypes \t= sfContext::getInstance()->getRequest()->getParameter('room_grouplist');\n\n\t\t\t// SET CHAPEL TYPE IDS.\t\t\n\t\t\tif($this->asPostData['chapel'] == 'YES' && count($amPostChapelTypes) > 0)\n\t\t\t\t$this->values['cem_chapel_ids'] = implode(',',$amPostChapelTypes);\n\n\t\t\t// SET ROOM TYPE IDS.\n\t\t\tif($this->asPostData['room'] == 'YES' && count($amPostRoomTypes) > 0 )\n\t\t\t\t$this->values['cem_room_ids'] = implode(',',$amPostRoomTypes);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->asPostData['chapel'] == 'YES' && isset($this->asPostData['chapel_grouplist']) )\n\t\t\t\t$this->values['cem_chapel_ids'] = implode(',',$this->asPostData['chapel_grouplist']);\n\n\t\t\tif($this->asPostData['room'] == 'YES' && isset($this->asPostData['room_grouplist']) )\n\t\t\t\t$this->values['cem_room_ids'] = implode(',',$this->asPostData['room_grouplist']);\n\t\t}\n\n//\t\techo \"<pre>\";print_r($this->values);exit;\n\t\tparent::updateObject($this->values);\n\t}", "public function to_a() {\n $self = $this;\n return static function ($values) use ($self) {\n return $self->apply($values)->to_a();\n };\n }", "public function hydrate($data)\n\t{\n\t\tforeach ($data as $attribut => $value)\n\t\t{\n\t\t\t$methode = 'set'.ucfirst($attribut);\n\t\t\tif (is_callable([$this, $methode]))\n\t\t\t{\n\t\t\t\t$this->$methode($value);\n\t\t\t}\n\t\t}\n\t}", "public function setValue($val, $obj = null)\n {\n // we can look for it in a relation method on the object passed as a second arg\n if (!$val && $obj && $obj instanceof DataObject && $obj->hasMethod($this->name)) {\n $funcName = $this->name;\n $val = array_values($obj->$funcName()->getIDList());\n }\n\n if ($val) {\n if (!$this->multiple && is_array($val)) {\n throw new InvalidArgumentException('Array values are not allowed (when multiple=false).');\n }\n\n if ($this->multiple) {\n $parts = (is_array($val)) ? $val : preg_split(\"/ *, */\", trim($val));\n if (ArrayLib::is_associative($parts)) {\n // This is due to the possibility of accidentally passing an array of values (as keys) and titles (as values) when only the keys were intended to be saved.\n throw new InvalidArgumentException('Associative arrays are not allowed as values (when multiple=true), only indexed arrays.');\n }\n\n // Doesn't check against unknown values in order to allow for less rigid data handling.\n // They're silently ignored and overwritten the next time the field is saved.\n parent::setValue($parts);\n } else {\n if (!in_array($val, array_keys($this->getSource()))) {\n if (self::config()->throw_exceptions) {\n throw new InvalidArgumentException(sprintf('Invalid value \"%s\" for multiple=false', Convert::raw2xml($val)));\n } else {\n $src = $this->getSourceAsArray();\n $src[$val] = $val;\n $this->setSource($src);\n }\n }\n\n $this->value = $val;\n }\n } else {\n $this->value = $val;\n }\n\n return $this;\n parent::setValue($value);\n }", "public function setArgs($values) {\n $this->impl->setArgs($this->context, $values);\n return $this;\n }", "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 setInputValues(&$values, $load = false);", "public function setValues($values) {\n $this->values = $values;\n }", "public function setMappedValues($values): self\n {\n foreach ($values as $apiKey => $value) {\n if (! \\array_key_exists($apiKey, self::DATAMAP)) {\n throw new \\InvalidArgumentException('Invalid map key');\n }\n $property = self::DATAMAP[$apiKey];\n\n switch ($property) {\n case 'salePriceDelta':\n case 'purchasePriceDelta':\n $sizeValue = new Price($value);\n break;\n case 'position':\n case 'stock':\n $sizeValue = (int) $value;\n break;\n default:\n $sizeValue = $value;\n }\n\n $this->$property = $sizeValue;\n }\n\n return $this;\n }", "public static function attack_values($args) {\n if (!is_array($args) ||\n !array_key_exists('attackType', $args) ||\n !array_key_exists('attackValues', $args) ||\n !array_key_exists('minValue', $args)) {\n return;\n }\n\n if ('Skill' != $args['attackType']) {\n return;\n }\n\n $args['attackValues'] = range($args['minValue'], max($args['attackValues']));\n }", "public function setValues($item,$values) {\n\t\tif (array_key_exists($item,$this->_properties)) {\n\t\t\t$this->_properties[$item]['values']=$val;\n\t\t}\n\t}", "public function hydrate($object, array $parameters)\n {\n foreach ($parameters as $parameter => $value) {\n $method = camel_case('set_' . $parameter);\n\n if (method_exists($object, $method)) {\n $object->{$method}($value);\n }\n }\n\n return $object;\n }", "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 setValues($values) {\n\t\t$this->attributes['values'] = $values;\n\t\t$this->values = $values;\n\t\treturn $this;\n\t}", "function setValueByArray($a_values)\n\t{\n\t\t$this->setLatitude($a_values[$this->getPostVar()][\"latitude\"]);\n\t\t$this->setLongitude($a_values[$this->getPostVar()][\"longitude\"]);\n\t\t$this->setZoom($a_values[$this->getPostVar()][\"zoom\"]);\n\t}", "public function __invoke()\n {\n return $this->apply(func_get_args());\n }", "public function values(array $fields)\n\t{\n\t\tforeach ($fields as $key => $val)\n\t\t{\n\t\t\t$key = strtolower($key);\n\t\t\tif (in_array($key, $this->_optional) || in_array($key, $this->_fields))\n\t\t\t{\n\t\t\t\t$this->$key = $val;\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getValues(): stdClass\n {\n $res = [];\n foreach (get_object_vars($this) as $attrib => $value)\n {\n if (!is_null($value))\n {\n if ($value instanceof self)\n {\n $value = $value->getValues();\n }\n $res[$attrib] = $value;\n }\n }\n return (object) $res;\n }", "public function setValues($values)\n {\n $this->values = $values;\n }", "public function setToEntity($values, $entity, array $columns = array(), array $columnsMapping = array())\n\t{\n\t\tif (!is_object($entity)) {\n\t\t\tthrow new MapperException(sprintf(\"Entity have to be object, %s given\", gettype($entity)));\n\t\t}\n\n\t\tif ($values instanceof ArrayAccess || $values instanceof Traversable || is_array($values)) {\n\t\t\t$values = $this->convertToArray($values);\n\t\t}\n\n\t\tif(!is_array($values)) {\n\t\t\tthrow new MapperException(sprintf(\"Values can not be mapped expected format is array|ArrayAccess, %s given\", gettype($values)));\n\t\t}\n\n\t\tif (empty ($columns)) {\n\t\t\t$columns = array_keys($values);\n\t\t}\n\n\t\t/** @var ClassMetadata $metaData */\n\t\t$metaData = $this->entityManager->getClassMetadata(get_class($entity));\n\n\t\tforeach($columns as $column) {\n\t\t\t$targetProperty = $column;\n\t\t\tif (isset ($columnsMapping[$column])) {\n\t\t\t\t$targetProperty = $columnsMapping[$column];\n\t\t\t}\n\n\t\t\t$setterName = 'set' . ucfirst($targetProperty);\n\t\t\tif(method_exists($entity, $setterName) && array_key_exists($column, $values)) {\n\t\t\t\t// load value\n\t\t\t\t$value = $values[$column];\n\n\t\t\t\t// Base PHP types\n\t\t\t\tif ($metaData->hasField($targetProperty)) {\n\t\t\t\t\t$type = $metaData->getTypeOfField($targetProperty);\n\t\t\t\t\tif ($value !== NULL && $value !== '') {\n\t\t\t\t\t\tif (strrpos($type, 'date') !== FALSE) {\n\t\t\t\t\t\t\t$value = $value instanceof \\DateTime ? $value : $this->dateParser->parseDateTime($value);\n\t\t\t\t\t\t} else if ($type === 'integer') {\n\t\t\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\t\t} else if ($type === 'boolean') {\n\t\t\t\t\t\t\t$value = (bool) $value;\n\t\t\t\t\t\t} else if (strrpos($type, 'array') !== FALSE) {\n\t\t\t\t\t\t\t$value = (array) $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Entities\n\t\t\t\telse if (!empty ($value)) {\n\t\t\t\t\t$association = $metaData->getAssociationMapping($targetProperty);\n\n\t\t\t\t\t// not reference\n\t\t\t\t\tif ($association === NULL) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// try to find repository\n\t\t\t\t\t$targetEntity = $association['targetEntity'];\n\t\t\t\t\t// find repository for entity\n\t\t\t\t\t$repository = $this->findRepository($targetEntity, $entity);\n\n\t\t\t\t\t// get primary key for entity\n\t\t\t\t\t$pk = $this->getEntityPrimaryKeyName($this->findEntityWholeName($targetEntity, $entity));\n\t\t\t\t\t// maybe many to many - one to many - collection association\n\t\t\t\t\tif ($metaData->isCollectionValuedAssociation($targetProperty)) {\n\t\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t\t$newValues = new ArrayCollection();\n\t\t\t\t\t\t\t/** @var ArrayCollection $oldValues */\n\t\t\t\t\t\t\t$oldValues = $this->invokeGetter($targetProperty, $entity);\n\t\t\t\t\t\t\tforeach ($value as $item) {\n\t\t\t\t\t\t\t\tif (is_array($item)) {\n\t\t\t\t\t\t\t\t\t$newValues->add($this->getMappedEntity($item, $targetEntity, $pk, $repository));\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$newValues->add($repository->find($item));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($oldValues !== NULL) {\n\t\t\t\t\t\t\t\tforeach ($oldValues as $val) {\n\t\t\t\t\t\t\t\t\tif ($newValues->contains($val)) {\n\t\t\t\t\t\t\t\t\t\t// remove relation\n\t\t\t\t\t\t\t\t\t\t$oldValues->removeElement($val);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$value = $newValues;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new MapperException(sprintf(\"Values for property %s expected array or array of array , %s given\", $targetProperty, gettype($value)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ($metaData->isSingleValuedAssociation($targetProperty)) {\n\t\t\t\t\t\t// many to one\n\t\t\t\t\t\t$keyValue = $value;\n\t\t\t\t\t\t// create or update entity\n\t\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t\t$value = $this->getMappedEntity($value, $targetEntity, $pk, $repository);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// only key - try to find during repository\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$value = $repository->find($value);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// NULL returned - bad situation\n\t\t\t\t\t\tif ($value === NULL) {\n\t\t\t\t\t\t\tthrow new MapperException(sprintf(\"Can not find or create Entity (%s) for column with primary key %s.\", $targetEntity, $targetProperty, $keyValue));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if empty ? set NULL\n\t\t\t\tif (empty ($value) && $value !== FALSE && !is_numeric($value)) {\n\t\t\t\t\t$value = NULL;\n\t\t\t\t}\n\n\t\t\t\t// set value\n\t\t\t\tif (!method_exists($entity, $setterName)) {\n\t\t\t\t\tthrow new MethodNotExistsException(sprintf('Method %s not found in object %s', $setterName, get_class($entity)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCallback::invokeArgs(array($entity, $setterName), [$value]);\n\t\t\t}\n\t\t}\n\n\t\treturn $entity;\n\t}", "function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t}", "public function apply($model)\n {\n foreach ($this->filters() as $name => $value) {\n $method = $this->map()[$name];\n\n $model->{$method}($this->sanitize($name, $value));\n }\n }", "public function add_values($values) : void\n {\n foreach($values as $value){\n $this -> add_value($value);\n }\n }", "public function getValueModelTransformer();", "public function populate($config): void\n {\n foreach (get_object_vars($this) as $key => $value) {\n $this->$key = $config[$key] ?? $value;\n }\n }", "protected static function fillObject($instance, $values)\n {\n if( $instance instanceof Cassandra\\Map ) {\n foreach($values as $key=>$value) {\n $instance->set(static::data2object($instance->keyType(), $key), static::data2object($instance->valueType(),$value));\n }\n }\n else if( $instance instanceof Cassandra\\Set || $instance instanceof Cassandra\\Collection )\n {\n foreach($values as $value) {\n $instance->add(static::data2object($instance->type(),$value));\n }\n }\n }", "public function value($value){\n return call_user_func_array($this->fetchStaticClassName() . '::' . __FUNCTION__, func_get_args());\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}", "public function hydrate(array $data){ \n \tforeach ($data as $key => $value){\n \t\t$method = 'set'.ucfirst($key); \n \tif (method_exists($this, $method)){\n \t$this->$method($value);\n }\n }\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "public function setData(array $values): self\n\t{\n\t\t$this->valueMap = $values;\n\t\treturn $this;\n\t}", "public function setValue($values) {\n $this->setHydrated(collect([]));\n // Add the passed values\n $this->value = is_array($values) ? $values : [];\n // Loop through each of the provided value groups\n foreach ($values as $position => $valueGroup) {\n // Create a new sub field group\n $fieldGroup = collect([]);\n // Loop through each of the fields\n foreach ($this->getBlueprints() as $_k => $blueprint) {\n // Retrieve the blueprint machine code\n $fieldMachine = $blueprint->getMachine();\n // Retrieve the field value from the passed values\n $fieldValue = isset($valueGroup[$fieldMachine]) ? $valueGroup[$fieldMachine] : null;\n // Hydrate and return a new field instance\n $clonedField = $blueprint->hydrate($fieldValue);\n // Set the hydrated field's parent field\n $clonedField->setParent($this);\n // Set the field group's position\n // This will be used to group fields within the toPath index\n $clonedField->setPosition($position);\n // Add the field into the hydrated field group\n $fieldGroup->push($clonedField);\n }\n // Push the field into this fields hydrated groups\n $this->getHydrated()->push($fieldGroup);\n }\n // Return for chaining\n return $this;\n }", "public function getFieldsValues($obj)\n\t{\n\t\tif ($this->getFieldValue($obj, 'is_module'))\n\t\t\t$this->fields_value['is_module'] = 1;\n\n\t\tif ($this->getFieldValue($obj, 'shipping_external'))\n\t\t\t$this->fields_value['shipping_external'] = 1;\n\n\t\tif ($this->getFieldValue($obj, 'need_range'))\n\t\t\t$this->fields_value['need_range'] = 1;\n\n\t\t// Added values of object Zone\n\t\t$carrier_zones = $obj->getZones();\n\t\t$carrier_zones_ids = array();\n\t\tif (is_array($carrier_zones))\n\t\t\tforeach ($carrier_zones as $carrier_zone)\n\t\t\t\t$carrier_zones_ids[] = $carrier_zone['id_zone'];\n\n\t\t$zones = Zone::getZones(false);\n\t\tforeach ($zones as $zone)\n\t\t\t$this->fields_value['zone_'.$zone['id_zone']] = Tools::getValue('zone_'.$zone['id_zone'], (in_array($zone['id_zone'], $carrier_zones_ids)));\n\n\t\t// Added values of object Group\n\t\t$carrier_groups = $obj->getGroups();\n\t\t$carrier_groups_ids = array();\n\t\tif (is_array($carrier_groups))\n\t\t\tforeach ($carrier_groups as $carrier_group)\n\t\t\t\t$carrier_groups_ids[] = $carrier_group['id_group'];\n\n\t\t$groups = Group::getGroups($this->context->language->id);\n\t\t// if empty $carrier_groups_ids : object creation : we set the default groups\n\t\tif (empty($carrier_groups_ids) && !$obj->id)\n\t\t{\n\t\t\t$preselected = array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP'));\n\t\t\t$carrier_groups_ids = array_merge($carrier_groups_ids, $preselected);\n\t\t}\n\t\tforeach ($groups as $group)\n\t\t\t$this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids)));\n\t}", "public function transformValues(array $values, VagrantBundle $vagrantBundle): array;", "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 hydrate(array $data, $object)\n {\n foreach ($data as $key => $value) {\n\n $hydrateName = $this->hydrateName($key);\n\n if ($object->has($hydrateName)) {\n $method = 'set' . ucfirst($hydrateName);\n $value = $this->hydrateValue($hydrateName, $value, $data);\n $object->$method($value);\n }\n }\n\n return $object;\n }", "public function apply_filters($value, $args)\n {\n }", "public function apply(Builder $query, $value);", "function acf_update_values($values = array(), $post_id = 0)\n{\n}", "function update_attributes($array = array())\n {\n foreach ($array as $key => $value) {\n $this->_stdObject->{$key} = $value;\n }\n }", "protected function realSaveWithValues($attendee, $values){\n try{\n $rec = entity_load($this->entityName, array($attendee->attendeeId,));\n $a = reset($rec);\n $over_flows = self::over_flows();\n // Global namespace designator = \\ClassName\n if (empty($a)){\n throw new \\Exception(EBConsts::EBS_ERROR_NO_MATCHING_RECORD);\n }\n $r = new \\ReflectionObject($a);\n foreach($values as $field => $value){\n if ($r->hasProperty($field)) {\n $a->{$field} = $value;\n if (in_array($field, array_keys($over_flows))){\n $a->{$field} = self::no_overflow($a->{$field}, $over_flows[$field]);\n }\n }\n }\n $a->save();\n $this->updateTimestamps($attendee);\n }catch(Exception $e){\n watchdog_exception(EBConsts::EBS_APP_NAME_MAIN, $e);\n }\n\n return $a;\n }", "public function hydrate($data) {\n foreach ($data as $key => $value) {\n $method = 'set' . ucfirst($key);\n if(!isset($value)){\n $v = null;\n }else{\n $v = $value;\n }\n if (method_exists($this, $method)) {\n $this -> $method($v);\n }\n }\n\t}", "function add(/** @noinspection PhpUnusedParameterInspection */\n Object $object = NULL) {\n $value = $this->value();\n foreach (func_get_args() as $arg) {\n if ($arg instanceof object)\n $value[] = $arg;\n }\n return $this->returnObjectWith($value);\n }", "public function getValues($data){\n\t\t\t$this->allValues = array();\n\t\t\tforeach($this->keys as $aKey){\n\t\t\t\t$function = 'value_'.$aKey;\n\t\t\t\t$this->allValues[$aKey] = $this->$function($data);\n\t\t\t}\n //$this->pruneValues();\n \n\t\t\treturn $this->allValues;\n\t\t}" ]
[ "0.65710735", "0.6396828", "0.6251648", "0.61289644", "0.591095", "0.5837547", "0.5783791", "0.57204914", "0.5659402", "0.55062664", "0.5418958", "0.54184306", "0.5366455", "0.5353116", "0.5325303", "0.53145635", "0.5273034", "0.5257819", "0.52543074", "0.5236966", "0.51896256", "0.5188298", "0.51444507", "0.51348144", "0.51348144", "0.5134335", "0.51095945", "0.51095945", "0.51076466", "0.5105783", "0.506449", "0.50633377", "0.5042967", "0.5031061", "0.5030004", "0.50244886", "0.5022326", "0.5009294", "0.49678358", "0.49472755", "0.4935834", "0.4933743", "0.49309245", "0.49219525", "0.49186882", "0.49147385", "0.49091315", "0.4908054", "0.49040806", "0.49036464", "0.49033865", "0.48717734", "0.48697162", "0.48649088", "0.48600063", "0.48399612", "0.48331282", "0.48266387", "0.48255792", "0.481861", "0.47979414", "0.47962472", "0.47962263", "0.4791597", "0.47799578", "0.477411", "0.4773796", "0.47719693", "0.47604653", "0.47565824", "0.4755998", "0.47556263", "0.47530797", "0.47382367", "0.47373855", "0.4734139", "0.4734003", "0.47224176", "0.4715507", "0.4715309", "0.47139972", "0.47091675", "0.4705888", "0.46977368", "0.46924266", "0.4692078", "0.4685209", "0.4682932", "0.46815407", "0.46734172", "0.46702364", "0.46654055", "0.46635973", "0.46617055", "0.46609297", "0.46572688", "0.4657156", "0.46566078", "0.46475485", "0.46448678", "0.46404284" ]
0.0
-1
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 }", "public function set_data($data)\n {\n }", "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "public function setObject(object $object): void;", "function setData($data)\n {\n $this->data = $data;\n }", "private function setData($data)\n {\n \t$this->data = $data;\n }", "public function setData(array $data = []);", "public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}", "private function setValues($data) {\n \n // Should always be supplied\n $this->id = $data->id;\n $this->url = $data->url;\n $this->status = $data->status;\n\n // Optionally supplied\n if(property_exists($data, \"failure\")) {\n $this->failure = new \\Zamzar\\Failure($data->failure);\n }\n }", "public function setData($data) \n\t{\n $this->data = $data;\n }", "public function setShopifyData(stdClass $data) {\n if (isset($data->{static::getResourceSingularName()})) {\n /*\n * If we received data in the form:\n * {\n * \"product\": {\n * ...\n * }\n * }\n * we'll extract the resource object (in this example, product)\n */\n $this->shopifyData = $data->{static::getResourceSingularName()};\n } else {\n // otherwise let's assume we got the resource object directly\n $this->shopifyData = $data;\n }\n $this->populateChildren();\n }", "public function set_fields($data)\n\t{\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (isset($this->aliases[$key]))\n\t\t\t\t$key = $this->aliases[$key];\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}", "public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }", "public function setData($data)\n {\n return $this->set('data', $data);\n }", "public function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function setData($data) {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData(Array $data);", "public function set_data($data)\n {\n $this->data = $data;\n }", "public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}", "public function setData($data, $encodeoptions = JSON_FORCE_OBJECT){\n\t\t$this->data = $data;\n\t\t$this->options = $encodeoptions;\n\t}", "public abstract function update($object);", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "function set($type,$data){\n\t// PARAM $type : type of data, as above\n\t// $data : data to set\n\n\t\tif (!is_array($this->$type)) { die(\"Not a valid data type\"); }\n\t\t$this->$type = $data;\n\t}", "public function setData( $data )\n {\n $this->data = $data;\n }", "protected function setData($data) {\n $this->data = collect($data);\n }", "public function setObject($object) {\n $this->object = $object;\n }", "public function fromAPI($data);", "public static function setAttributes($obj, array $data)\n {\n if (! is_object($obj)) {\n throw new \\RuntimeException(\"First param should be an object. \");\n }\n\n foreach ($data as $key => $value) {\n $function = 'set' . ucfirst($key);\n if (! is_null($value) && method_exists($obj, $function)) {\n $obj->$function($value);\n }\n }\n }", "public function update($object): void;", "public function setData(array $data) {\n\t\t$this->_data = $data;\n\t}", "final public function setData($data) {\n $this->data = $data;\n }", "public function setData($data): ApiResponse\n {\n $this->data = $data;\n return $this;\n }", "public function hydrate($data) {\n foreach ($data as $key => $value) {\n $method = 'set' . ucfirst($key);\n if(!isset($value)){\n $v = null;\n }else{\n $v = $value;\n }\n if (method_exists($this, $method)) {\n $this -> $method($v);\n }\n }\n\t}", "protected function setData(array $data)\n\t{\n\t\t$this->json_data = $data;\n\t}", "public function setData(tx_imagemapwizard_model_dataObject $data) {\n\t\t$this->data = $data;\n\t}", "public function hydrate($data)\n\t{\n\t\tforeach ($data as $attribut => $value)\n\t\t{\n\t\t\t$methode = 'set'.ucfirst($attribut);\n\t\t\tif (is_callable([$this, $methode]))\n\t\t\t{\n\t\t\t\t$this->$methode($value);\n\t\t\t}\n\t\t}\n\t}", "public function setData() \n {\n $serverNames = [];\n foreach($this->_jsonRequestedArr as $k=>$obj) {\n $serverNames[] = $obj->s_system;\n }\n $this->_jsonResponseArr[\"server_list\"] = $serverNames;\n }", "public static function setMany($data)\n {\n foreach ($data as $key => $value) {\n if ($key === 'translatable') {\n self::setTranslatable($value);\n } else {\n if (is_array($value))\n $value = json_encode($value);\n self::updateOrCreate(['key' => $key], ['plain_value' => $value]);\n }\n }\n }", "public function setObject($obj)\n {\n $this->service = $obj;\n }", "public function set($data, $type)\n {\n switch ($type) {\n case self::HTTP_TYPE_GET:\n $this->get = (array)$data;\n break;\n case self::HTTP_TYPE_POST:\n $this->post = (array)$data;\n break;\n case self::HTTP_TYPE_COOKIE:\n $this->cookie = (array)$data;\n break;\n case self::HTTP_TYPE_REQUEST:\n $this->request = (array)$data;\n break;\n case self::HTTP_TYPE_JSON:\n $this->json = (array)$data;\n break;\n case self::HTTP_TYPE_PARAMS:\n $this->params = (array)$data;\n break;\n default:\n throw new \\Exception('Request type is unknown');\n }\n }", "public function setData($data): void\n {\n $this->data = $data;\n }", "public function exchangeObject($data)\n {\n foreach ($data AS $key => $datum) {\n if (property_exists($this, $key)) {\n $this->{$key} = $datum;\n }\n }\n }", "public function setJSON($data) {\n\t\t$this->json = $data;\n\t}", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "public function setup($data) {\n\n if (is_object($data[0])) {\n $data = Converter::toArray($data[0]);\n }\n\n foreach ($data as $k => $d) {\n if (!in_array($k,array(\"token\",\"expires\"))) {\n throw new CatapultApiException(\"$k is not a valid key for endpoint token\");\n }\n }\n $arr = array('token', 'expires');\n foreach ($arr as $a) {\n if (isset($data[$a])) {\n $this->$a = $data[$a];\n }\n }\n // important don't serialize\n // when sending in a Endpoints object\n $this->serialize = FALSE;\n }", "public function setData (array $data) : void {\n\t\t$this->data = $data;\n\t}", "public function updateData($data_obj, $item_id)\n {\n\t\t$em = $this->controller_obj->getDoctrine()->getManager();\n\t\t$item = $em->getRepository(\"WebManagementBundle:location\")->find($item_id);\n\t\t$item->setLatitude($data_obj->getLatitude());\n\t\t$item->setLongitude($data_obj->getLongitude());\n\t\t$address_repo = $em->getRepository(\"WebManagementBundle:address\");\n\t\t$address = $address_repo->find($data_obj->getSelectAddress());\n\t\t$item->setAddress($address);\n\t\t$item->setDescription($data_obj->getDescription());\t\t\n\t\t$em->flush();\n\t}", "public function setAllData($data)\n {\n \n foreach ($data as $key => $value) {\n $this->setData($key, $value);\n }\n \n }", "public function hydrate(array $data){ \n \tforeach ($data as $key => $value){\n \t\t$method = 'set'.ucfirst($key); \n \tif (method_exists($this, $method)){\n \t$this->$method($value);\n }\n }\n\t}", "public function update($data) {}", "public function update($data) {}", "abstract public function object_data(&$data);", "private function setObject($object) {\n $this->object = $object;\n }", "public function setObject(object $object): self;", "abstract public function updateData();", "public function setData($key, $value = null)\n {\n\n if (is_string($key))\n $this->data = json_decode($key);\n else\n $this->data = $key;\n\n }", "function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setFromArray(array &$_data);", "public function set(array $data)\n {\n $this->query['data'] = $data;\n return $this;\n }", "public function set( $id = 0, $data = array() ) {\r\r\n if ($this->refresh) {\r\r\n $this->init();\r\r\n $this->refresh = false;\r\r\n }\r\r\n if ( isset($this->instances[$id]) ) {\r\r\n $this->instances[$id]['data'] = array_merge($this->instances[$id]['data'], $data);\r\r\n return true;\r\r\n }\r\r\n return false;\r\r\n }", "public function __construct($data)\n {\n if ($data instanceof Collection) {\n $this->data = $data->all();\n } elseif ($data instanceof JsonSerializable) {\n $this->data = $data->jsonSerialize();\n } else {\n $this->data = $data;\n }\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public static function set($data) {\n $qb = new QB();\n\n $caller = get_called_class();\n $object = new $caller;\n\n $qb->object = $object;\n $qb->type = 'Update';\n\n $qb->set($data);\n\n return $qb;\n }", "public function updateData(array $data);", "abstract public function updateItem(&$object);" ]
[ "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.6003957", "0.59984267", "0.5994081", "0.5992335", "0.5989716", "0.5954634", "0.59543717", "0.5948085", "0.59474576", "0.593946", "0.5934068", "0.5931729", "0.59205693", "0.591997", "0.5917442", "0.5904997", "0.5904997", "0.59002274", "0.5898794", "0.58809704", "0.5854964", "0.58471", "0.5837338", "0.5835572", "0.5832802", "0.58057094", "0.5803412", "0.5803149", "0.5797938", "0.5770946", "0.576873", "0.5762944", "0.5739171", "0.5727462", "0.57200915", "0.5715642", "0.5712238", "0.57094455", "0.57067215", "0.5696818", "0.5692518", "0.56876266", "0.5679377", "0.5676545", "0.56635195", "0.5658998", "0.5642441", "0.5638544", "0.56359345", "0.5632614", "0.56303155", "0.56303155", "0.5626186", "0.5621032", "0.56209093", "0.56118864", "0.55988675", "0.5587009", "0.5585488", "0.5585488", "0.5585488", "0.5585488", "0.5561206", "0.5555675", "0.5555048", "0.5550378", "0.5547575", "0.55422556", "0.55422354", "0.5540386" ]
0.7065436
1
Send message to email if approve user
public function approve(&$route, &$args, &$output) { $this->load->model('customer/customer'); $customer_info = $this->model_customer_customer->getCustomer($args[0]); if ($customer_info) { $this->load->model('setting/store'); $store_info = $this->model_setting_store->getStore($customer_info['store_id']); if ($store_info) { $store_name = html_entity_decode($store_info['name'], ENT_QUOTES, 'UTF-8'); $store_url = $store_info['url']; } else { $store_name = html_entity_decode($this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8'); $store_url = HTTP_CATALOG; } $this->load->model('localisation/language'); $language_info = $this->model_localisation_language->getLanguage($customer_info['language_id']); if ($language_info) { $language_code = $language_info['code']; } else { $language_code = $this->config->get('config_language'); } $language = new Language($language_code); $language->load($language_code); $language->load('mail/customer_approve'); $subject = sprintf($language->get('text_subject'), $store_name); $data['text_welcome'] = sprintf($language->get('text_welcome'), $store_name); $data['text_login'] = $language->get('text_login'); $data['text_service'] = $language->get('text_service'); $data['text_thanks'] = $language->get('text_thanks'); $data['button_login'] = $language->get('button_login'); $data['login'] = $store_url . 'index.php?route=account/login'; $data['store'] = $store_name; $data['store_url'] = $store_url; $this->load->model('tool/image'); if (is_file(DIR_IMAGE . $this->config->get('config_logo'))) { $data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), $this->config->get('theme_default_image_location_width'), $this->config->get('theme_default_image_cart_height')); } else { $data['logo'] = ''; } $mail = new Mail($this->config->get('config_mail_engine')); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8'); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($customer_info['email']); $mail->setFrom($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setSender($store_name); $mail->setSubject($subject); $mail->setHtml($this->load->view('mail/customer_approve', $data)); $mail->send(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function approve()\n {\n $message = new MailMessage;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post {$this->post->titile} has been approved successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }", "function booking_approve_cancellation_email($useremail) {\n\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking has been cancelled.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Your Booking Cancellation has been Processed.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function emailApprovalByUser($user) {\n\t\t$user->getPrimaryElectronicAddress()->setApproved(TRUE);\n\t\t$this->personRepository->update($user);\n\t\t$this->persistenceManager->persistAll();\n\t}", "private function sendUserNotification($userId) {\n $user = \\craft\\elements\\User::find()->id($userId)->one();\n if ($user && $user->getFieldValue('notifyOnAcceptance')) {\n CraftTradeAccountNotifications::sendMail('_emails/trade-account-approved.html', 'Trade Account Approved', $user->email);\n $user->setFieldValue('notifyOnAcceptance', false);\n Craft::$app->elements->saveElement($user);\n }\n }", "function ihc_do_user_approve($uid=0){\n\tif ($uid){\n\t\t$data = get_userdata($uid);\n\t\tif ($data && isset($data->roles) && isset($data->roles[0]) && $data->roles[0]=='pending_user'){\n\t\t\t$default_role = get_option('default_role');\n\t\t\t$user_id = wp_update_user(array( 'ID' => $uid, 'role' => $default_role));\n\t\t\tif ($user_id==$uid){\n\t\t\t\tihc_send_user_notifications($user_id, 'approve_account');\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}", "public function send_approvals() {\n if (isset($_POST['approval'])) {\n $PDO = Record::getConnection();\n\t\t\t $common = new APCommon();\n \t\t\t foreach($_POST['approval'] as $id){\n\t\t\t\t\n\t\t\t\t//Find the record in the temp table and send the confirmation email\n\t\t\t\t$sql = \"SELECT * FROM \". TABLE_PREFIX . \"approved_users_temp WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t\t$row = $stmt->fetch();\n\t\t\t\t$email = $row[2];\n\t\t\t\t$name = $row[1];\n\t\t\t\t$common->confirmation_email($email, $name);\n\t\t\t\t\n\t\t\t\t//Update the temp table to mark row as processed\n $sql = \"UPDATE \" . TABLE_PREFIX . \"approved_users_temp SET processed=1 WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t }\n \n \t\t\tFlash::set('success', __('Approvals processed'));\n \t\t} else {\n Flash::set('error', __('Unable to process approvals'));\n }\n\n redirect(get_url('plugin/approved_users/approvals'));\n }", "public function accept()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee about the accept\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/accept', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has accepted');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified about the acceptance.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "function actionapproveUser($id=NULL) \n\t{\n\t\terror_reporting(E_ALL);\n $this->isLogin();\n if(!isset($id)){\n\t\t\theader(\"Location: \" . Yii::app()->params->base_path . \"admin/clientRequest\");\n\t\t}\n\t\t//\tDELETE OTHER VERIFIED PHONE NUMBERS\n\t\t$userObj\t=\tnew Users();\n\t\t$incoming_sms_sender\t=\t$userObj->getPhoneById($id);\n\t\t\n\t\tif($incoming_sms_sender!=''){\n\t\t\t$userObj = new Users();\n\t\t\t//$userObj->deletePhoneNumber($incoming_sms_sender,$id);\n\t\t\t//$userObj->deleteOtherVerifiedPhone($id);\n\t\t}\n\t\t\n\t\t$userObj=Users::model()->findByPk($id);\n\t\t$user_value['id'] = $id;\n $user_value['modifiedAt']=date('Y-m-d h:m:s');\n $user_value['isVerified'] = '1';\n\t\t$userObj = new Users();\n\t\t$userObj->veriryUser($user_value,$id);\n\t\t$vefiry = \"Verified Successfully\";\n\t\tYii::app()->user->setFlash('success',$vefiry);\n $this->actionclientRequest();\n }", "protected function notifyApprovedUser(Account $acc) {\n if (DB::g(STN::MAIL_APPROVED_USER) === null)\n return false;\n\n return DB::mailAccount(\n $acc,\n sprintf(\"[%s] Account approved\", DB::g(STN::APP_NAME)),\n DB::keywordReplace(DB::g(STN::MAIL_APPROVED_USER), $acc, $acc->getFirstSchool())\n );\n }", "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "static function send_request_for_approval_to($email,$name,$date_from,$date_to,$reason,$approve_link,$reject_link){\n $message = \"<p> Dear supervisor, <br> Employee {$name} requested for some time off, starting on {$date_from} and ending on {$date_to}, stating the reason: {$reason}.<br> Click on one of the below links to approve or reject the application: <a href={$approve_link}> approve </a> - <a href={$reject_link}> reject </a> </p>\";\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n \t$success = mail($email, 'A request in pending you approval', $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }", "public function approveInvitation() {\n $this->autoRender = false;\n $communityId = $this->request->data['communityId'];\n $community = $this->Community->findById($communityId);\n if (!empty($community)) {\n $userId = $this->Auth->user('id');\n $this->CommunityMember->approve($communityId, $userId);\n\t\t\t//Community follow data\n\t\t\t$followCommunityData = array(\n\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t'page_id' => $communityId,\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t);\n\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\t\t\t\n $this->Session->setFlash(__('You are now a member of this community.'), 'success');\n } else {\n $this->Session->setFlash(__($this->invalidMessage), 'error');\n }\n }", "private function approve() {\n\n }", "public function sendConfirmationEmailMessage(UserInterface $user): void;", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function sendEmailVerificationNotification();", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "public function email_approver()\n {\n \n $this->db->select('EMAIL');\n $this->db->from('APPROVERS');\n $this->db->where('UNIT',$_SESSION['div']);\n $query = $this->db->get();\n $out = $query->result_array();\n\n if ($out) {\n\n \n foreach ($out as $recipient){\n \n //mail to approver\n $this->load->library('email');\n $htmlContent = '<h1>Title change requested in FREE System.</h1>';\n $htmlContent .= '<p>Please review the <a href=\"' . base_url() . '/admin\">Approval Control Panel</a> to review the request.</p>';\n \n $this->email->clear();\n\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n $this->email->to($recipient);\n $this->email->from('[email protected]', 'FREE System');\n $this->email->subject('Title Change Requested');\n $this->email->message($htmlContent);\n $this->email->send();\n }\n }\n }", "public function markApproved()\n {\n $this->IsSpam = false;\n $this->Moderated = true;\n $this->write();\n $this->extend('afterMarkApproved');\n }", "protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }", "public function decline()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/decline', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has declined');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "public function resendConfirmationMailAction()\n {\n // @todo find a better way to fetch the data\n $result = GeneralUtility::_GP('tx_femanager_pi1');\n if (is_array($result)) {\n if (GeneralUtility::validEmail($result['user']['email'])) {\n $user = $this->userRepository->findFirstByEmail($result['user']['email']);\n if (is_a($user, User::class)) {\n $this->sendCreateUserConfirmationMail($user);\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailSend'),\n '',\n AbstractMessage::INFO\n );\n $this->redirect('resendConfirmationDialogue');\n }\n }\n }\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailFail'),\n LocalizationUtility::translate('validationError'),\n AbstractMessage::ERROR\n );\n $this->redirect('resendConfirmationDialogue');\n }", "public function approve()\n {\n // Make sure that all necessary payment plugins are loaded at this point.\n $this->getDi()->plugins_payment->loadEnabled();\n if ($this->isConfirmed())\n return true;\n $old_status = $this->is_confirmed;\n $this->is_confirmed = self::IS_CONFIRMED_CONFIRMED;\n\n $this->updateSelectedFields('is_confirmed');\n $saved = array();\n foreach ($this->data()->getAll() as $k => $v) {\n if (strpos($k, self::SAVED_TRANSACTION_KEY) !== false) {\n list(, $time, $payment_id) = explode('-', $k);\n $saved[$time] = array($payment_id, $v);\n }\n }\n ksort($saved);\n foreach ($saved as $time => $v) {\n $this->addAccessPeriod($v[1], $v[0] ? $v[0] : null);\n $this->data()->set(self::SAVED_TRANSACTION_KEY . '-' . $time . '-' . $v[0], null)->update();\n }\n if ($old_status == self::IS_CONFIRMED_NOT_CONFIRMED)\n {\n $this->sendApprovedEmail();\n $this->getDi()->hook->call(Am_Event::INVOICE_AFTER_APPROVE, array('invoice' => $this));\n }\n return true;\n }", "public function approve($taskid)\n {\n\t\t$task = task::find($taskid);\n\t\t\t\t\t\n\t\t$task->completed = 1; // to change task status as approved\n\t\t$task->isCommited = 0;// to reset committed flag\n $task->save();\n\t\t\n\t\t$users = task::find($taskid)->students->first()->user;\t// to get user details who belongs task\n\t\t//echo \"<pre>\";\n\t\t//print_r($users);exit;\n\t\t$info = [\n\t\t\t'email' => $users->email,\n\t\t\t'name' => $users->name,\n\t\t\t'subject' => 'Task Approval',\n\t\t\t];\n\t\t$data = ['taskName' => $task->name]; // to send name of task in mail view\n\t\t// to sent mail to user whose task is approved\n\t\tMail::send('mail_template.notifyTaskApprove', $data, function ($message) use ($info) {\n\t\t\t$message->to($info['email'], $info['name'])\n\t\t\t->subject($info['subject']);\n\t\t});\n\t\techo \"Task Approved and Approval Email has been sent\";\n }", "function ajax_approve_candidate() {\n $_POST['nonce'] = empty($_POST['nonce']) ? '' : trim($_POST['nonce']);\n\n if(\n empty($_POST['link-id'])\n || empty($_POST['doer-id'])\n || empty($_POST['task-id'])\n || empty($_POST['nonce'])\n || !wp_verify_nonce($_POST['nonce'], $_POST['link-id'].'-candidate-ok-'.$_POST['doer-id'])\n ) {\n die(json_encode(array(\n 'status' => 'fail',\n 'message' => __('<strong>Error:</strong> wrong data given.', 'tst'),\n )));\n }\n\n// wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'closed'));\n p2p_update_meta($_POST['link-id'], 'is_approved', true);\n\n // Send email to the task doer:\n $task = get_post($_POST['task-id']);\n $doer = get_user_by('id', $_POST['doer-id']);\n $task_author = get_user_by('id', $task->post_author);\n \n tst_actualize_member_role($doer); \n tst_actualize_member_role($task_author); \n\n // Notice to doer:\n global $email_templates;\n wp_mail(\n $doer->user_email,\n $email_templates['approve_candidate_doer_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_doer_notice']['text'],\n $doer->first_name,\n $task->post_title,\n $task_author->user_email,\n $task_author->user_email,\n home_url('members/'.$task_author->user_login.'/')\n ))\n );\n\n // Notice to author:\n wp_mail(\n $task_author->user_email,\n $email_templates['approve_candidate_author_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_author_notice']['text'],\n $task_author->first_name,\n $task->post_title,\n $doer->user_email,\n $doer->user_email,\n home_url('members/'.$doer->user_login.'/')\n ))\n );\n\n // Task is automatically switched \"to work\":\n wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'in_work'));\n\n die(json_encode(array(\n 'status' => 'ok',\n )));\n}", "public function actionApprove(){\n \t// Set no waiting limit\n \tset_time_limit(0);\n \t// REST client is flash app\n \t$this->restFlashClient = true;\n \t\n \tif (!isset($_POST['userJobId']) || !isset($_POST['approved'])){\n \t\t$this->_sendResponse(\"Approval workflow has failed. Missing userJobId or approval status\", 400);\n \t\treturn;\n \t}\n \t\t\n \t$userJobId = $_POST['userJobId'];\n \t$approved = $_POST['approved'] == 'false' ? false : true;\n \t\n \t// Get UserJob object\n \t$userJob = PUserJob::model()->findByPk($userJobId);\n \t\n \t/* \n \t * Send bad request in case the provided $userJobId does not exist.\n \t */\n \tif(!$userJob instanceof PUserJob){\n \t\t$this->_sendResponse(\"The job with id '{$userJobId}' does not exist in database.\", 400);\n \t}\n \t\n \tif($this->taskWorkflowAPI()->setProjectJobId($userJob->projectJob->id)->validate()) {\n \t\t// Start delivery\n \t\t$this->taskWorkflowAPI()->deliver();\n \t\t\n \t\t// Add breakdown report about task delivery\n \t\t$mainAPI = $this->mainAPI();\n \t\t$mainAPI->projectBreakdownByUserJob($mainAPI::PBR_TASK_DELIVERED, $userJob->id);\n \t\t$mainAPI->sferaAPIByProject($userJob->projectJob->project_id);\n \t\t\n \t\t// mark parent job as disapproved\n \t\tif ($approved == false){\n \t\t\t$mainProjectJob = PProjectJob::model()->findByPk($userJob->projectJob->id)->getMainJob();\n \t\t\tYii::app()->projectAPI->markAsDisapproved($mainProjectJob->id);\n \t\t\t\n \t\t\t//TODO send mail\n \t\t}\t\n \t\t\n \t\t// Send successful response\n \t\t$this->_sendResponse('Approval has been done successfully.');\n \t}\n \telse{\n \t\t// Send failure response\n \t\t$this->_sendResponse(\"Approval workflow has failed.\", 400);\n \t}\n }", "public function isApproved()\n {\n\n return false;\n }", "protected function sendActivationEmail($user) {\n return true;\n }", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}", "public function appreciation_approved ($mail_info) {\n $mail = new PHPMailer;\n\n $mail->isSMTP();\n $mail->Host = $this->host;\n $mail->SMTPAuth = $this->SMTPAuth;\n $mail->Username = $this->username;\n $mail->Password = $this->password;\n $mail->SMTPSecure = $this->SMTPSecure;\n $mail->Port = $this->port; \n $mail->isHTML(true);\n \n $mail->setFrom('[email protected]', 'The Dunmore Difference');\n $mail->addAddress($mail_info[5]);\n\n $mail->Subject = 'Your Appreciation has been Approved!';\n $mail->Body = 'The appreciation you gave to '.$mail_info[0].' '.$mail_info[1].' for '.$mail_info[6].' has been approved!<br><br>Point Value: '.$mail_info[8].'<br><br>Description: '.$mail_info[7];\n //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n \n if(!$mail->send()) {\n return false;\n } else {\n return true;\n }\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function doApproveUser ($uid) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($userInfo->usr_role != \"AD\") {\n\t\t\treturn redirect('error');\n\t\t}\n\n\t\t$user = User::getUserById($uid);\n\n\t\tDB::table('users')->where('usr_id', $uid)->update(array('usr_approval'=>'Yes'));\n\t\tLog::doAddLog (\"Approve user\", $uid, $user->usr_firstname.' '.$user->usr_lastname);\n\t\treturn redirect('personnelboard')->with('success', \"User has been approved\");\n\n\t}", "public function videoApprovalAction()\n\t{\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\t\n\t\tif(isset($userSession->userSession['_id']) && trim($userSession->userSession['_id']) != '') {\n\t\t\tif($request->isPost()) {\n\t\t\t\t$formData\t= $request->getPost();\n\t\t\t\tif(isset($formData['option']) && isset($formData['mediaId']) && ($formData['option'] == '1' && $formData['mediaId'] != '')) {\n\t\t\t\t\t$userData\t= $this->getMediaUser($formData['mediaId']);\n\t\t\t\t\t$this->approveVideo((string)$userSession->userSession['_id'], $formData['mediaId'], 1);\n\t\t\t\t\t\n\t\t\t\t\t//\tRegistration Mail has to be sent\n\t\t\t\t\t$emailaddress\t= '[email protected]';\n\t\t\t\t\t$link\t\t= DOMAINPATH.'/video/'.base64_encode($formData['mediaId']);\n\t\t\t\t\t$subject\t= 'Snapstate - Video Approval';\n\t\t\t\t\t$message\t= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t\t\t\t\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t\t\t\t\t\t<title>Congratulations</title>\n\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t\t\t<table width=\"650\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:40px auto; background:#fff;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:1px solid #DEDEDE;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"padding:10px;\"><img src=\"'.DOMAINPATH.'/Front/img/mail/logo.png\" width=\"136\" height=\"36\" /></td>\n\t\t\t\t\t\t\t\t\t <td align=\"right\" style=\"padding-right:10px;\" class=\"txt1\"><a href=\"#\">'.ADMIN_EMAIL.'</a></td>\n\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 <td colspan=\"2\" style=\"background:#DEDEDE;font-size:12px; height:25px;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"padding-left:10px; color:#535353\">'.date('F, Y').'</td> \n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t </table></td>\n\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 <td style=\"padding:10px;\"><img src=\"'.DOMAINPATH.'/Front/img/mail/banner.png\" width=\"634\" height=\"215\" /></td>\n\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 <td></td>\n\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 <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0px 20px;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"text-align: justify; line-height:18px;color:#1868AE;\">Hello '.ucwords($userData['user_firstname']).' '.ucwords($userData['user_lastname']).', </td>\n\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 <td style=\"text-align: center; line-height:28px; padding-bottom:10px; padding-top: 10px; font-size:20px; color:#1868AE\"><span class=\"quotes\">“</span> Congratulations! Your video has been approved. <span class=\"quotes\">”</span></td>\n\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 <td style=\"color: #147EC2;font-size: 14px;font-weight: normal;padding: 10px 0;\">Please click the link below to view your video:</td>\n\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 <td style=\"text-align: justify; line-height:18px; padding-bottom:10px\"><a href=\"'.$link.'\" title=\"Please click the link below to view your video\">'.$link.'</a></td>\n\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 <td style=\"text-align: justify; line-height:18px; padding-bottom:10px;padding-top:10px;\">Thanks,</td>\n\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 <td style=\"text-align: justify; line-height:18px; padding-bottom:10px;\">The Snapstate Team.</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t </table></td>\n\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 <td class=\"txt2\" style=\"padding:10px 0;border:1px solid #DEDEDE; text-align:center;font-size: 11px; background:url('.DOMAINPATH.'/Front/img/mail/footer-bg.png) no-repeat; color:#fff;\">© Copyright '.date('Y').' SnapState.com. All rights reserved. </td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t\t\t</html>';\n\t\t\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t\t\t\t$headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\t\t\t\t\t$headers .= 'From: Snapstate.com <[email protected]>' . \"\\r\\n\";\n\t\t\t\t\t$to\t\t= 'To: ' . $userData['user_email'] . \"\\r\\n\";\n\t\t\t\t\t$headersMessage\t= $headers . $to;\n\t\t\t\t\t\n\t\t\t\t\tif(MAILER) {\n\t\t\t\t\t\t//mail('', $subject, $message, $headersMessage);\t\n\t\t\t\t\t\t//\tSMTP Settings\n\t\t\t\t\t\t$mail = new PHPMailer();\n\t\t\t\t\t\t$mail->IsSMTP();\n\t\t\t\t\t\t$mail->SMTPDebug\t= 1;\n\t\t\t\t\t\t$mail->SMTPAuth\t\t= true;\n\t\t\t\t\t\t$mail->SMTPSecure\t= 'ssl';\n\t\t\t\t\t\t$mail->Host\t\t\t= \"smtp.gmail.com\";\n\t\t\t\t\t\t$mail->Port\t\t\t= 465;\n\t\t\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t\t\t$mail->Username\t\t= SMTP_USERNAME_DEMO;\n\t\t\t\t\t\t$mail->Password\t\t= SMTP_PASSWORD_DEMO;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail->SetFrom(\"[email protected]\");\n\t\t\t\t\t\t$mail->Subject\t= $subject;\n\t\t\t\t\t\t$mail->Body\t\t= $message;\n\t\t\t\t\t\t$mail->AddAddress($userData['user_email']);\n\t\t\t\t\t\t$mail->Send();\n\t\t\t\t\t}\n\t\t\t\t\techo '1';\n\t\t\t\t} else if(isset($formData['option']) && isset($formData['mediaId']) && ($formData['option'] == '2' && $formData['mediaId'] != '')) {\n\t\t\t\t\t$this->approveVideo((string)$userSession->userSession['_id'], $formData['mediaId'], 3);\n\t\t\t\t\t$userData\t= $this->getMediaUser($formData['mediaId']);\n\t\t\t\t\tif(isset($formData['flag']) && trim($formData['flag']) != '') {\n\t\t\t\t\t\t$this->updateFlag($formData['mediaId'], (string)$userSession->userSession['_id'], $formData['flag']);\n\t\t\t\t\t}\n\t\t\t\t\t//\tRegistration Mail has to be sent\n\t\t\t\t\t$emailaddress\t= '[email protected]';\n\t\t\t\t\t$link\t\t= DOMAINPATH.'/video/'.base64_encode($formData['mediaId']);\n\t\t\t\t\t$subject\t= 'Snapstate - Video Disapproval';\n\t\t\t\t\t$message\t= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t\t\t\t\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t\t\t\t\t\t<title>Congratulations</title>\n\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t\t\t<table width=\"650\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:40px auto; background:#fff;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:1px solid #DEDEDE;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"padding:10px;\"><img src=\"'.DOMAINPATH.'/Front/img/mail/logo.png\" width=\"136\" height=\"36\" /></td>\n\t\t\t\t\t\t\t\t\t <td align=\"right\" style=\"padding-right:10px;\" class=\"txt1\"><a href=\"#\">'.ADMIN_EMAIL.'</a></td>\n\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 <td colspan=\"2\" style=\"background:#DEDEDE;font-size:12px; height:25px;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"padding-left:10px; color:#535353\">'.date('F, Y').'</td> \n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t </table></td>\n\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 <td style=\"padding:10px;\"><img src=\"'.DOMAINPATH.'/Front/img/mail/banner.png\" width=\"634\" height=\"215\" /></td>\n\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 <td></td>\n\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 <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0px 20px;\">\n\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t <td style=\"text-align: justify; line-height:18px;color:#1868AE;\">Hello '.ucwords($userData['user_firstname']).' '.ucwords($userData['user_lastname']).', </td>\n\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 <td style=\"text-align: center; line-height:28px; padding-bottom:10px; padding-top: 10px; font-size:20px; color:#1868AE\"><span class=\"quotes\">“</span> Congratulations! Your video has been disapproved. <span class=\"quotes\">”</span></td>\n\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 <td style=\"text-align: justify; line-height:18px; padding-bottom:10px;padding-top:10px;\">Thanks,</td>\n\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 <td style=\"text-align: justify; line-height:18px; padding-bottom:10px;\">The Snapstate Team.</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t </table></td>\n\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 <td class=\"txt2\" style=\"padding:10px 0;border:1px solid #DEDEDE; text-align:center;font-size: 11px; background:url('.DOMAINPATH.'/Front/img/mail/footer-bg.png) no-repeat; color:#fff;\">© Copyright '.date('Y').' SnapState.com. All rights reserved. </td>\n\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t\t\t</html>';\n\t\t\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t\t\t\t$headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\t\t\t\t\t$headers .= 'From: Snapstate.com <[email protected]>' . \"\\r\\n\";\n\t\t\t\t\t$to\t\t= 'To: ' . $userData['user_email'] . \"\\r\\n\";\n\t\t\t\t\t$headersMessage\t= $headers . $to;\n\t\t\t\t\t\n\t\t\t\t\tif(MAILER) {\n\t\t\t\t\t\t//mail('', $subject, $message, $headersMessage);\t\n\t\t\t\t\t\t//\tSMTP Settings\n\t\t\t\t\t\t$mail = new PHPMailer();\n\t\t\t\t\t\t$mail->IsSMTP();\n\t\t\t\t\t\t$mail->SMTPDebug\t= 1;\n\t\t\t\t\t\t$mail->SMTPAuth\t\t= true;\n\t\t\t\t\t\t$mail->SMTPSecure\t= 'ssl';\n\t\t\t\t\t\t$mail->Host\t\t\t= \"smtp.gmail.com\";\n\t\t\t\t\t\t$mail->Port\t\t\t= 465;\n\t\t\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t\t\t$mail->Username\t\t= SMTP_USERNAME_DEMO;\n\t\t\t\t\t\t$mail->Password\t\t= SMTP_PASSWORD_DEMO;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail->SetFrom(\"[email protected]\");\n\t\t\t\t\t\t$mail->Subject\t= $subject;\n\t\t\t\t\t\t$mail->Body\t\t= $message;\n\t\t\t\t\t\t$mail->AddAddress($userData['user_email']);\n\t\t\t\t\t\t$mail->Send();\n\t\t\t\t\t}\n\t\t\t\t\techo '2';\n\t\t\t\t} else {\n\t\t\t\t\techo \"-1\";\t//\timproper data\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"-1\";\t//\timproper data\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\tuser session is in-active\n\t\t}\n\t\treturn $this->getResponse();\n\t}", "function approve()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit('Invalid Token');\r\n\t\t\r\n\t\t// Get the selected items\r\n\t\t$cid = JRequest::getVar('cid', array(0), 'post', 'array');\r\n\t\t\r\n\t\t$total = count($cid);\r\n\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\r\n\t\t// Force array elements to be integers\r\n\t\tJArrayHelper::toInteger($cid, array(0));\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t// No items are selected\r\n\t\tif (!is_array($cid) || count($cid) < 1)\r\n\t\t\tJError::raiseWarning(500, JText::_('SELECT ITEM'));\r\n\t\telse\r\n\t\t{\r\n\t\t\t$user =& JFactory::getUser();\r\n\t\t\t$user_id = $user->get('username');\r\n\t\t\tforeach ($cid as $id)\r\n\t\t\t{\r\n\t\t\t\tRSMembership::saveTransactionLog('Manually approved by '.$user_id, $id);\r\n\t\t\t\tRSMembership::approve($id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$total = count($cid);\r\n\t\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\t\r\n\t\t\t// Clean the cache, if any\r\n\t\t\t$cache =& JFactory::getCache('com_rsmembership');\r\n\t\t\t$cache->clean();\r\n\t\t}\r\n\t\t\r\n\t\t$this->setRedirect('index.php?option=com_rsmembership&view=transactions', $msg);\r\n\t}", "function approveMember($userId) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET type=2 WHERE UserID=:user_id\");\r\n $sql->execute(array('user_id' => $userId));\r\n return true;\r\n }", "private function confirm()\n {\n // if 1, direct approve\n\n $load = $this->load;\n\n $fleetCount = $load->fleet_count;\n\n if($fleetCount > 1) {\n $loadTrips = $load->confirmed_trips()\n ->count()\n ;\n } else {\n $loadTrips = 1;\n }\n\n if($loadTrips == $fleetCount) {\n\n //@todo: send confirm notifications\n\n $load->status = Load::STATUS_CONFIRMED;\n $load->save();\n }\n\n }", "function accept_mail_send($member_id,$sender_id)\n {\n // sender details \n $sender_name = $this->Crud_model->get_type_name_by_id('member', $sender_id, 'first_name');\n $from_mail = $this->Crud_model->get_type_name_by_id('member', $sender_id, 'email');\n // recepient details\n $receiver_name = $this->Crud_model->get_type_name_by_id('member', $member_id, 'first_name');\n $to_mail = $this->Crud_model->get_type_name_by_id('member', $member_id, 'email');\n\n $sub = $sender_name .' ('. $sender_id .') has accepted your profile.';\n $this->Email_model->accept_mail_send($member_id,$sender_id,$from_mail,$sender_name,$to_mail,$sub);\n // redirect(base_url().'home/member_profile/'. $sender_id .'', 'refresh');\n \n }", "public function do_approve(Request $request, $id){\n\n\n $leave = Leave::find($id);\n\n /* for supervisours */\n if(auth::id() == $leave->supervisor_id){\n\n $leave->supervisor_action = 1;\n $leave->current_position = 1;\n $leave->leave_status = 1;\n $leave->leave_message = \"Approved by Supervisor, Pending HR approval\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Pending HR approval',\n 'position' => 'Supervisor',\n 'sent_to' => 162\n\n ]);\n\n /////////////////////////////////////////////send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_suppervisor = \" You have successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application, pushed to HR for approval.\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_hr = \" \".User::find($leave->user_id)->display_name.\" needs your approval for\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave application as supervisor (\".User::find($leave->supervisor_id)->display_name.\") has successfully approved this leave application.\";\n\n //send notification to users\n auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n //$toHr1->notify(new LeaveNotification($leave,$message_hr));\n //$toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n\n\n /*auth()->user()->notify(new LeaveNotification($post,$message_requester) );\n User::find($request->supervisor)->notify(new LeaveNotification($post,$message_suppervisor) );\n User::find($request->reliever)->notify(new LeaveNotification($post, $message_reliever) );*/\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application. \"]);\n\n } elseif((auth::id() == '162') || (auth::id() == '168') || (auth::id() == '182')) {\n\n /*FOR HR APPROVAL*/\n\n\n $leave->hr_action = 1;\n $leave->current_position = 3;\n $leave->leave_status = 3;\n $leave->leave_message = \"Approved by Supervisor and HR\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Approved by HR',\n 'position' => 'HR',\n 'sent_to' => 162\n\n ]);\n\n\n //send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n $tosupervisor = User::find($leave->supervisor_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\". (HR)\";\n\n $message_suppervisor = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_hr = \" \".User::find(auth::id())->display_name.\" successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application.\";\n\n //send notification to users\n // auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n $toHr1->notify(new LeaveNotification($leave,$message_hr));\n $toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n $tosupervisor->notify(new LeaveNotification($leave,$message_suppervisor));\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application.\"]);\n\n\n\n\n }else{\n\n return response()->json(['result'=>'0','message'=> \"You are not authorized\"]);\n\n }\n\n\n\n\n\n }", "public function confirmEmail()\n {\n $this->mail_confirmed = Carbon::now();\n $this->mail_token = null;\n $this->save();\n }", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function trigger_email_verification($userid) {\n\t\t$adminModel = $this->loadModel('admin');\n\t\t$adminModel->verifyUserEmail($userid);\n\t\theader('location: '.URL.'admin/users');\n\t}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish' && isset($user->caps['submitter'])) {\n\t\t\t\t\n\t\t\t\t//// SENDS AN EMAIL SAYING HIS POST HAS BEEN SUBMITTED\n\t\t\t\t$message = sprintf2(__(\"Dear %user,\n\t\t\t\t\nThis is to inform you that your submission %title at %site_name has been approved and it is now published.\n\nYou can view it here at %link\n\nKind regards,\nthe %site_name team.\", 'btoa'), array(\n\t\t\t\n\t\t\t\t\t'user' => $user->display_name,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t'link' => get_permalink($post->ID),\n\t\t\t\t\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$subject = sprintf2(__('Submission approved at %site_name', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\n\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\n\t\t\t\twp_mail($user->user_email, $subject, $message, $headers);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t///// IF ITS A SPOT\n\t\t\tif($post->post_type == 'spot') {\n\t\t\t\t\n\t\t\t\tif(ddp('future_notification') == 'on' && $old_status != 'publish' && $new_status == 'publish') {\n\t\t\t\t\t\n\t\t\t\t\t//// ALSO CHECKS FOR USER NOTIFICATIONS FOR MATCHING CRITERIA\n\t\t\t\t\tif(function_exists('_sf_check_for_user_notifications_matching_spot')) { _sf_check_for_user_notifications_matching_spot($post->ID); }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('submission_days') != '' && ddp('submission_days') != '0') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO PENDING IN X AMOUNT OF DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET FOR OUR FEATURED SUBMISSION - AND ITS INDEED FEATURED\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('price_featured_days') != '' && ddp('price_featured_days') != '0' && get_post_meta($post->ID, 'featured', true) == 'on') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO NORMAL SUBMISSION AFTER X DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date_featured($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function confirmEmail($token){\n $user = User::find(Auth::user() -> id);\n if($user->payment_status == 0){\n return redirect()->route('register.payment');\n }else if($user->payment_status == 1){\n return redirect()->route('payment.verify');\n }else{\n $data = User::where('remember_token', $token) -> get() -> first();\n if($data->mail_activation_status === 'pending'){\n $data->mail_activation_status = 'active';\n $data->email_verified_at = Carbon::now();\n $data->update();\n return view('active', [\n 'status' => 'success'\n ]);\n }else{\n return view('active', [\n 'status' => 'error'\n ]);\n }\n }\n\n }", "function inform_approve_report($mode, $id)\n{\n\tglobal $phpbb_root_path, $phpEx, $config, $user;\n\n\tswitch ($mode)\n\t{\n\t\tcase 'blog_report' :\n\t\t\t$message = sprintf($user->lang['BLOG_REPORT_PM'], $user->data['username'], blog_url($user->data['user_id'], $id));\n\t\t\t$subject = $user->lang['BLOG_REPORT_PM_SUBJECT'];\n\t\t\tbreak;\n\t\tcase 'reply_report' :\n\t\t\t$message = sprintf($user->lang['REPLY_REPORT_PM'], $user->data['username'], blog_url($user->data['user_id'], false, $id));\n\t\t\t$subject = $user->lang['REPLY_REPORT_PM_SUBJECT'];\n\t\t\tbreak;\n\t\tcase 'blog_approve' :\n\t\t\t$message = sprintf($user->lang['BLOG_APPROVE_PM'], $user->data['username'], blog_url($user->data['user_id'], $id));\n\t\t\t$subject = $user->lang['BLOG_APPROVE_PM_SUBJECT'];\n\t\t\tbreak;\n\t\tcase 'reply_approve' :\n\t\t\t$message = sprintf($user->lang['REPLY_APPROVE_PM'], $user->data['username'], blog_url($user->data['user_id'], false, $id));\n\t\t\t$subject = $user->lang['REPLY_APPROVE_PM_SUBJECT'];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tblog_plugins::plugin_do_arg('function_inform_approve_report', compact('mode', 'id'));\n\t}\n\n\t$to = explode(\",\", $config['user_blog_inform']);\n\n\t// setup out to address list\n\t$address_list = array();\n\tforeach ($to as $id)\n\t{\n\t\t$id = (int) $id;\n\n\t\tif ($id)\n\t\t{\n\t\t\t$address_list[$id] = 'to';\n\t\t}\n\t}\n\n\tif (sizeof($address_list))\n\t{\n\t\tif (!function_exists('submit_pm'))\n\t\t{\n\t\t\t// include the private messages functions page\n\t\t\tinclude(\"{$phpbb_root_path}includes/functions_privmsgs.$phpEx\");\n\t\t}\n\n\t\tif (!class_exists('parse_message'))\n\t\t{\n\t\t\tinclude(\"{$phpbb_root_path}includes/message_parser.$phpEx\");\n\t\t}\n\n\t\t$message_parser = new parse_message();\n\t\t$message_parser->message = $message;\n\t\t$message_parser->parse(true, true, true, true, true, true, true);\n\n\t\t$pm_data = array(\n\t\t\t'from_user_id'\t\t=> $config['user_blog_message_from'],\n\t\t\t'from_username'\t\t=> $user->lang['ADMINISTRATOR'],\n\t\t\t'address_list'\t\t=> array('u' => $address_list),\n\t\t\t'icon_id'\t\t\t=> 10,\n\t\t\t'from_user_ip'\t\t=> '0.0.0.0',\n\t\t\t'enable_bbcode'\t\t=> true,\n\t\t\t'enable_smilies'\t=> true,\n\t\t\t'enable_urls'\t\t=> true,\n\t\t\t'enable_sig'\t\t=> false,\n\t\t\t'message'\t\t\t=> $message_parser->message,\n\t\t\t'bbcode_bitfield'\t=> $message_parser->bbcode_bitfield,\n\t\t\t'bbcode_uid'\t\t=> $message_parser->bbcode_uid,\n\t\t);\n\n\t\tsubmit_pm('post', $subject, $pm_data, false);\n\t}\n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "public function requestAcceptAction() {\r\n $notification = $this->_getParam('notification', 0);\r\n\t\t$is_suggestionExist = Engine_Api::_()->getItem('user', $notification->object_id);\r\n\t\tif( empty($is_suggestionExist) ) {\r\n\t\t\t// If user are not exist then we are deleting the \"User Request\" which loggden user are gettig.\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}else {\r\n\t\t\t$this->view->notification = $notification;\r\n\t\t}\r\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "public function invite(){\n $this->validate(request(),[\n 'task_id' => 'required',\n 'user_id'=> 'required'\n ]);\n $task=Task::find(request('task_id'));\n\n $user=User::find(request('user_id'));\n if (\\Gate::denies('taskOwner', $task)) {\n return response()->json(\"Task doesn't Belong To you\");\n }\n \\Mail::to($user)->send(new TaskInvitation($user,$task));\n return response()->json(\"Invitation Mail Sent Successfully\");\n }", "public function send_mail_to_accepted_user($username) {\n }", "public function EmailConfirm($code, $id){\n\t\t$restaurantGroup= Sentry::findGroupById(6);\n\t\t$activeUser\t\t= Sentry::findUserById($id);\n\n\t\t// $now\t\t\t= time();\n\t\t// need to create time limition\n\t\tif($activeUser->attemptActivation($code)){\n\t\t\t//activation is success\n\t\t\tLog::info('active the user : '.$id);\n\t\t\tif($activeUser->addGroup($restaurantGroup)){\n\t\t\t\tLog::info('add the user into the restaurant id : '.$id);\n\t\t\t\t$user = Sentry::login($activeUser, false);\n\t\t\t\tLog::info('success to login to the Food Order');\n\t\t\t\treturn Redirect::route('r.description.create');\n\t\t\t}else{\n\t\t\t\tLog::info('fail to add the user into the restaurant');\n\t\t\t}\n\t\t}else{\n\t\t\t//activation is fail\n\t\t\tLog::info('fail to active the user : '.$id);\n\t\t\treturn Response::view('fail to active the user', array(), 404);\n\t\t}\n\t}", "function notify() {\n if ($this->active_invoice->isLoaded()) {\n if ($this->active_invoice->canResendEmail($this->logged_user)) {\n $company = $this->active_invoice->getCompany();\n if(!($company instanceof Company)) {\n $this->response->operationFailed();\n } // if\n \n $issue_data = $this->request->post('issue', array(\n 'issued_on' => $this->active_invoice->getIssuedOn(),\n 'due_on' => $this->active_invoice->getDueOn(),\n 'issued_to_id' => $this->active_invoice->getIssuedToId()\n ));\n \n $this->response->assign('issue_data', $issue_data);\n \n if ($this->request->isSubmitted()) {\n try {\n if($this->active_invoice->isIssued()) {\n $this->active_invoice->setDueOn($issue_data['due_on']);\n } // if\n \n $resend_to = isset($issue_data['user_id']) && $issue_data['user_id'] ? Users::findById($issue_data['user_id']) : null;\n \n if($issue_data['send_emails'] && $resend_to instanceof IUser) {\n $this->active_invoice->setIssuedTo($resend_to);\n \n $recipients = array($resend_to);\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_reminder', $this->active_invoice)\n ->sendToUsers($recipients, true);\n } // if\n \n $this->active_invoice->save();\n \n $this->response->respondWithData($this->active_invoice, array(\n 'detailed' => true, \n \t'as' => 'invoice'\n ));\n \t} catch (Exception $e) {\n \t DB::rollback('Failed to resend email @ ' . __CLASS__);\n \t $this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function approve($id)\n\t{\n\t\t$user = User::findOrFail($id);\n\t\tAuth::user()->requestOf()->sync([$user->id => ['status' => 'Accepted']], false);\n\t\treturn response()->json(['Request Accepted!']);\n\t}", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function markEmailAsVerified();", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "public function executeConfirmEmail($request)\r\n {\r\n \t$this->forward404Unless($request->isMethod('get'));\r\n \t\r\n \t$email = EmailPeer::getFromField(EmailPeer::CONFIRM_CODE,$this->getRequestParameter('confirm_code'));\r\n \tif($email)\r\n \t{\r\n \t\tif($email->getIsPrimary() && !$email->getActualEmail())\r\n \t\t{\r\n \t\t\t// if invited, send acceptance email and add to quick contact\r\n \t\t\t$user = $email->getUser();\r\n \t\t\tif($user->getInvitedBy())\r\n \t\t\t{\r\n \t\t\t\t// add to bookmark\r\n \t\t\t\t$b = new Bookmark();\r\n \t\t\t\t$b->setUser($user->getUserRelatedByInvitedBy());\r\n \t\t\t\t$b->setTag($user->retrievePrimaryJotag());\r\n \t\t\t\t$b->save();\r\n \t\t\t\t\r\n \t\t\t\t// give credit to the inviter\r\n \t\t\t\t$credits = $user->getUserRelatedByInvitedBy()->giveCredit(OptionPeer::retrieveOption('BONUS_ACCEPT_CREDIT'));\r\n\t\t \tMailer::sendEmail($user->getUserRelatedByInvitedBy()->getPrimaryEmail(),'inviteAccepted',array('owner'=>$user->getUserRelatedByInvitedBy(),'user'=>$user,'email'=>$email,'credits'=>$credits),$user->getUserRelatedByInvitedBy()->getPreferedLanguage());\r\n \t\t\t}\r\n \t\t\t// activate primary jotag\r\n \t\t\t$jotag = $email->getUser()->retrievePrimaryJotag();\r\n \t\t\t$jotag->setStatus(TagPeer::ST_ACTIVE);\r\n \t\t\t$jotag->save();\r\n \t\t\t\r\n \t\t\t$this->setMessage('ACCOUNT_CONFIRM','SUCCESS');\r\n \t\t}\r\n \t\telse $this->setMessage('EMAIL_CONFIRM','SUCCESS');\r\n \t\t \r\n \t\t$email->setIsConfirmed(true);\r\n \t\t$email->setConfirmCode(null);\r\n \t\t$email->setActualEmail(null);\r\n \t\t$email->save();\r\n \t}\r\n \telse $this->setMessage('EMAIL_CONFIRM_ERROR','ERROR');\r\n\r\n \t$this->redirect('@homepage');\r\n }", "public function approve()\n {\n // Initialize variables\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n $task = JRequest::getCmd('task');\n $publish = ($task == 'approve');\n\n if(empty($cid))\n {\n $this->setRedirect($this->_ambit->getRedirectUrl(), JText::_('COM_JOOMGALLERY_COMMAN_MSG_NO_COMMENTS_SELECTED'));\n $this->redirect();\n }\n\n $model = $this->getModel('comments');\n if($count = $model->publish($cid, $publish, 'approve'))\n {\n if($count != 1){\n $msg = JText::sprintf($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_REJECTED', $count);\n } else {\n $msg = JText::_($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_REJECTED');\n }\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg);\n }\n else\n {\n $msg = JText::_('COM_JOOMGALLERY_COMMON_MSG_ERROR_APPROVING_REJECTING');\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg, 'error');\n }\n }", "public function requestVerificationEmail()\n {\n if (!$this->request->is('post')) {\n $this->_respondWithMethodNotAllowed();\n return;\n }\n\n $user = $this->Guardian->user();\n if (!$user->verified) {\n $this->Users->Tokens->expireTokens($user->id, TokensTable::TYPE_VERIFY_EMAIL);\n $token = $this->Users->Tokens->create($user, TokensTable::TYPE_VERIFY_EMAIL, 'P2D');\n try {\n $this->getMailer('User')->send('verify', [$user, $token->token]);\n $this->set('message', __('Please check your inbox.'));\n } catch (\\Exception $e) {\n $this->_respondWithBadRequest();\n $this->set('message', 'Mailer not configured.');\n }\n } else {\n $this->set('message', __('Your email address is already verified.'));\n }\n\n $this->set('_serialize', ['message']);\n }", "public function isUserApproved(\\Lelesys\\Plugin\\Newsletter\\Domain\\Model\\Recipient\\Person $person) {\n\t\tif ($person->getPrimaryElectronicAddress()->isApproved() === TRUE) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function notifyUser(&$comment) {\n if (!$comment instanceof modxTalksPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n\n $link = $this->generateLink($cid, $idx, 'full');\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n $subject = $this->modx->lexicon('modxtalks.email_comment_approved');\n $text = $this->modx->lexicon('modxtalks.email_user_approve_comment', array(\n 'link' => $link,\n ));\n\n $params = array(\n 'title' => 'Заголовок',\n 'content' => $this->modx->stripTags($this->bbcode($comment->content)),\n 'images_url' => $images_url,\n 'avatar' => $this->getAvatar($user['email'], 50),\n 'text' => $text,\n 'date' => date($this->config['dateFormat'] . ' O', $comment->time),\n );\n\n /**\n * Get email body\n */\n $body = $this->getChunk('mt_send_mail', $params);\n\n /**\n * Send notifications to user\n */\n $success = false;\n if (!empty($user['email'])) {\n if ($this->sendEmail($subject, $body, $user['email'])) {\n $success = true;\n }\n }\n\n return $success;\n }", "public function sendEmailWithApplyLink(){\n\t}", "public function actionAccept($confirmation) {\n\n\t\tUser::confirmEmail($confirmation);\n\t}", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "private function _sendNewStatusUpdateEmailToUser()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n\t\t\t$user = \\JFactory::getUser();\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Status Update...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$projectId = $this->recordData['hshrndreview_fk_project_id'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select($db->quoteName(array('name', 'owner')));\n\t\t\t$query->from($db->quoteName('#__hshrndreview_projects'));\n\t\t\t$query->where($db->quoteName('hshrndreview_project_id').\" = \". $projectId);\n\t\t\t$db->setQuery($query);\n\t\t\t$project = $db->loadRow();\n\t\t\t\n\t\t\t$body = \"Thank you for submitting a new status update for project named: \\\"\" . $project['0'] . \"\\\". It has been added to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }", "public static function approveMessage($id) {\n $que = \"UPDATE message SET is_approved = 'Y' where id = '{$id}'\";\n $gets = mysql_query($que);\n return $gets;\n }", "public function isApproved(): bool;", "function approveEnrollment($user, $cid)\r\n {\r\n $courseName = $this->getCourseName($cid); //Get course name for email\r\n $this->MB->set_subject(\"Enrollment application for $courseName: Approved\");\r\n $this->MB->set_body(\"We are pleased to inform you that your application to enroll in $courseName\r\n has been processed successfully. You may immediately begin reading the course content\r\n and completing the quizzes.\");\r\n $this->MB->set_sendto($user);\r\n $this->MB->set_sendfrom('admin');\r\n $this->MB->send_mail(); //Send user email\r\n $this->DB->database_delete('enrollment_requests', array('user' => $user, 'cid' => $cid)); //Delete enrollment request\r\n \r\n $currently_enrolled = $this->DB->database_select('users', 'enrolled', array('username' => $user), 1); //Add course ID to user registered table\r\n \r\n $currently_enrolled = explode(',', $currently_enrolled['enrolled']);\r\n \r\n $index = count($currently_enrolled)+1;\r\n $currently_enrolled[$index] = $cid;\r\n \r\n $currently_enrolled = implode(',', $currently_enrolled);\r\n \r\n $this->DB->database_update('users', array('enrolled' => $currently_enrolled), array('username' => $user)); \r\n }", "public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }", "public function sendEmailNotificationExpirePlan($user_id)\n {\n /* @var $user User */\n // $user_id = Yii::$app->user->getId();\n $user = User::findOne([\n 'id' => $user_id\n ]);\n \n \n \n if (!$user) {\n return false;\n }\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'sendEmailNotificationExpiryPlan-html'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => 'Nocopycopy'])\n ->setTo($this->email)\n ->setSubject('Plan Expire for Nocopycopy')\n ->send();\n }", "function _erpal_crm_activity_queue_view_approve_submit (&$form, &$form_state) {\n\n if (erpal_crm_activity_queue\\ActivityQueueModel::approve($form_state['values']['result'])) {\n drupal_set_message (t('Activity elements has been successfuly approved.'));\n }else{\n drupal_set_message (t('An error occured while trying to approve some activity elements.'));\n }\n \n return;\n}", "public function saleProofEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'sale-proof', $user->email, $args);\r\n }", "public function sendConfirmEmail()\n {\n\t\t$emailSettings = craft()->email->getSettings();\n\n //create the template params\n $templateParams = $this->data;\n $templateParams['toEmail'] = $this->toEmail;\n\n //instantiate email model\n $email = new EmailModel();\n\n //populate with all the things\n //for testing\n $email->fromEmail = $emailSettings['emailAddress'];\n\t\t$email->toEmail = $this->template->notifyEmailToAddress;\n\t\t$email->subject = $this->template->confirmEmailSubject;\n\t\t$email->body = $this->template->confirmEmailBody;\n\n //send that goodness\n\t\treturn craft()->email->sendEmail($email, $templateParams);\n\n }", "public function sendRSVP(ContactFormRequest $request)\n\t{\n\t\t$user = \\Auth::user();\n \t\t$user->notify(new InboxMessage($request));\n\t\t// redirect the user back\n\t\treturn redirect()->back()->with('message', 'Thanks for joining us on our big day! Stay Blessed');\n\t}", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "private function sendUserConfirmEmail(User $user)\n {\n $this->mailer->confirm_account($user);\n }", "protected function notify(User $user){\n// '<a href=\"'.action('ProfileController@getActivate', $user->activation_code).'\">Activate My Email</a>';\n// //$msgBody = 'Your activation code is '.$user->phoneActivationCode;\n// $msgBody = 'Thank you for registering with our consultation services,\\nAn activation email has been sent to your mail, please activate it in order to access your account.';\n $emailData= [\n 'name'=>$user->name,\n 'link'=>action('UserController@getActivate', $user->activation_code)\n ];\n SharedFunctions::sendEmailTo('emails.welcome', $user->email,\n 'Register mail', $emailData);\n //SharedFunctions::sendSMS($user->phone, $msgBody);\n }", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "public function sendEmailVerificationNotification()\n {\n if (request()->is('api/*')) {\n $this->notify(new VerifyEmailNotification);\n } else {\n parent::sendEmailVerificationNotification();\n }\n }", "public function approveCommentMethod()\n { \n $choice = $this->getGet()[\"approve\"];\n $data = [\"approved\" => (int) $choice]; \n $comment_id = (string) $this->getId();\n\n if ($choice === \"1\") {\n $message = \"Le commentaire a bien été approuvé et publié.\";\n } elseif ($choice === \"0\") {\n $message = \"Le commentaire a été refusé et ne sera pas publié.\";\n };\n\n ModelFactory::getModel(\"Comment\")->updateData($comment_id, $data);\n $this->setMessage($message);\n $this->redirect(\"user!admin\");\n }", "public function sendemail( $id_projet , $status);", "function submitVerifikasi($id_user){\n\t\t$this->Kesehatan_M->update('user',array('id_user'=>$id_user),array('verified'=>'sudah'));\n\t\tredirect(\"Admin/verifikasi\");\n\t}", "public function sendConfirmationEmail(User $user)\n {\n if (config('access.users.requires_approval')) {\n return redirect()->back()->withFlashDanger(__('alerts.backend.users.cant_resend_confirmation'));\n }\n\n if ($user->isConfirmed()) {\n return redirect()->back()->withFlashSuccess(__('exceptions.backend.access.users.already_confirmed'));\n }\n\n $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n\n return redirect()->back()->withFlashSuccess(__('alerts.backend.users.confirmation_email'));\n }", "public function approve(Req $request, $id)\n\t{\n\n\t\t$bookReq = BookRequest::findOrFail($id);\n\t\t$property = Property::findOrFail($bookReq->property_id);\n\t\tif($property->property_type == 'apartment'){\n\t\t\t\n\t\t}\n\t\t$bookReq->status = 1;\n\t\t$bookReq->save();\n\t\tMail::send('emails.requestAccepted',['email'=>$data['email'],\n\t\t\t\t\t\t\t\t\t 'name'=>$data['name'],\n\t\t\t\t\t\t\t\t\t 'body'=>$data['body']], \n\t\tfunction($message) use($data)\n\t\t{\n\t\t $message->to('[email protected]', $data['name'])->subject($data['name'].' question');\n\t\t});\t\n\n\n\t}", "public function isApproved()\n {\n $responseText = $this->transaction->getTransactionResponse()->getMessages()[0]->getDescription();\n return $responseText === 'This transaction has been approved.';\n }", "public function approve()\n\t{\n\t\tPhpfox::getUserParam('quiz.can_approve_quizzes', true);\n\n\t\t$iQuiz = (int)$this->get('iQuiz');\n\t\t$bApproved = Phpfox::getService('quiz.process')->approveQuiz($iQuiz);\n\n\t\tif ($bApproved == true)\n\t\t{\n\t\t\tif ($this->get('inline'))\n\t\t\t{\n\t\t\t\t$this->alert(Phpfox::getPhrase('quiz.quiz_has_been_approved'), Phpfox::getPhrase('quiz.quiz_approved'), 300, 100, true);\n\t\t\t\t$this->hide('#js_item_bar_approve_image');\n\t\t\t\t$this->hide('.js_moderation_off'); \n\t\t\t\t$this->show('.js_moderation_on');\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->removeClass('#js_quiz_' . $iQuiz, 'row_moderate');\n\t\t\t\t$this->removeClass('#js_quiz_created_' . $iQuiz, 'row_moderate');\n\t\t\t\t$this->remove('#js_awaiting_moderation_' . $iQuiz);\n\t\t\t\t$this->call('$(\"#js_message_' . $iQuiz . '\").message(\"' . Phpfox::getPhrase('quiz.quiz_approved') . '\", \"valid\").show(\"slow\").fadeOut(5000);');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->alert(Phpfox::getPhrase('quiz.an_error_kept_the_system_from_approving_the_quiz_please_try_again'));\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function sendConfirm()\n {\n $newPackage = \"\";\n $client = $this->clientEntity;\n $client->writeByte($newPackage, ClientEntity::HEAD_MAIL_SENT);\n $client->writeByte($newPackage, 1);\n $client->writeLong($newPackage, $this->messageEntity->time);\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n }", "public function sendUserUpdateNotification(): void\n {\n $this->notify(new VerifyAccountNotification());\n }", "public function sendEmailVerificationNotification()\n {\n if (!allowSendEmail()) {\n $this->markEmailAsVerified();\n return;\n }\n\n $this->notify(new VerifyEmailNotification);\n }", "public function resendEmail()\n {\n $query = users::where('email', session('notice'))->first();\n // Sending Welcome Email\n Mail::to(session('notice')['email'])->send(new welcome($query->token));\n return view('auth.emailVerification');\n }", "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 giftProofEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'gift-proof', $user->email, $args);\r\n }", "public function users_email_conf_post_role($h)\n {\n // Check to see if this user has any stop_spam_flags:\n $sql = \"SELECT usermeta_value FROM \" . TABLE_USERMETA . \" WHERE usermeta_userid = %d AND usermeta_key = %s\";\n $flags = $h->db->get_var($h->db->prepare($sql, $h->currentUser->id, 'stop_spam_flags'));\n \n if ($flags) { $h->currentUser->role = 'pending'; }\n }", "public function accept_action($user_id)\n {\n if (!OrganizerSettings::get()->locked && !OrganizerGroup::findGroup($user_id)->hasMaxTeamSize()) {\n OrganizerInvite::accept($user_id);\n }\n\n // Remove existing invites\n OrganizerInvite::cancel($user_id, User::findCurrent()->id);\n $this->redirect('show/index');\n }", "public function callback($approved);", "function notify($fave, $notice, $user)\n {\n $other = User::staticGet('id', $notice->user_id);\n if ($other && $other->id != $user->id) {\n \t$otherProfile = $other->getProfile();\n if ($otherProfile->email && $otherProfile->emailnotifyfav) {\n mail_notify_fave($otherProfile, $user->getProfile(), $notice);\n }\n // XXX: notify by IM\n // XXX: notify by SMS\n }\n }", "public function confirmEmail()\n {\n $this->email_confirmation_token = null;\n $this->is_email_verified = 1;\n return $this->save();\n }", "public function approve(User $user)\n {\n return $user->role->can_approve_posts == 1;\n }" ]
[ "0.7238097", "0.7053536", "0.70228046", "0.7014744", "0.6954638", "0.6803464", "0.67411125", "0.6718009", "0.67045325", "0.6683301", "0.667713", "0.66715467", "0.66224676", "0.66192865", "0.65913916", "0.6528739", "0.65251744", "0.65011215", "0.6498036", "0.64841914", "0.64802116", "0.6422235", "0.6402797", "0.64000416", "0.6389395", "0.63891584", "0.6386009", "0.6375249", "0.637146", "0.63713926", "0.6360915", "0.6358404", "0.6346848", "0.6322158", "0.63068986", "0.62889224", "0.62804085", "0.6276863", "0.62666184", "0.62572217", "0.6255866", "0.62359387", "0.6235301", "0.62350136", "0.62314373", "0.622492", "0.6222914", "0.62165433", "0.6212175", "0.6210297", "0.62017107", "0.61947054", "0.619417", "0.6187925", "0.61698765", "0.61607313", "0.6160152", "0.6158318", "0.6154771", "0.6152654", "0.6143495", "0.6131608", "0.61293864", "0.61167216", "0.6115719", "0.60999185", "0.60995597", "0.60992473", "0.6098392", "0.608954", "0.608465", "0.6083126", "0.60736346", "0.6072052", "0.6068941", "0.6064198", "0.60628986", "0.60490656", "0.60433817", "0.6043319", "0.60426795", "0.603174", "0.6018266", "0.60145587", "0.6014464", "0.6011357", "0.6010714", "0.60104436", "0.6009739", "0.6005952", "0.59960735", "0.59935755", "0.59780043", "0.5976238", "0.5975059", "0.5970443", "0.5969815", "0.596503", "0.59626615", "0.5962502", "0.5958809" ]
0.0
-1
Send message to email if deny user
public function deny(&$route, &$args, &$output) { $this->load->model('customer/customer'); $customer_info = $this->model_customer_customer->getCustomer($args[0]); if ($customer_info) { $this->load->model('setting/store'); $store_info = $this->model_setting_store->getStore($customer_info['store_id']); if ($store_info) { $store_name = html_entity_decode($store_info['name'], ENT_QUOTES, 'UTF-8'); $store_url = $store_info['url']; } else { $store_name = html_entity_decode($this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8'); $store_url = HTTP_CATALOG; } $this->load->model('localisation/language'); $language_info = $this->model_localisation_language->getLanguage($customer_info['language_id']); if ($language_info) { $language_code = $language_info['code']; } else { $language_code = $this->config->get('config_language'); } $language = new Language($language_code); $language->load($language_code); $language->load('mail/customer_deny'); $subject = sprintf($language->get('text_subject'), $store_name); $data['text_welcome'] = sprintf($language->get('text_welcome'), $store_name); $data['text_denied'] = $language->get('text_denied'); $data['text_thanks'] = $language->get('text_thanks'); $data['button_contact'] = $language->get('button_contact'); $data['contact'] = $store_url . 'index.php?route=information/contact'; $data['store'] = $store_name; $data['store_url'] = $store_url; $this->load->model('tool/image'); if (is_file(DIR_IMAGE . $this->config->get('config_logo'))) { $data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), $this->config->get('theme_default_image_location_width'), $this->config->get('theme_default_image_cart_height')); } else { $data['logo'] = ''; } $mail = new Mail($this->config->get('config_mail_engine')); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8'); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($customer_info['email']); $mail->setFrom($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setSender($store_name); $mail->setSubject($subject); $mail->setHtml($this->load->view('mail/customer_deny', $data)); $mail->send(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deny($message = null) {\n // Ignore soft 403 for ajax requests as redirections is transparent.\n if (config\\SOFT_403 != false && !\\melt\\request\\is_ajax()) {\n $user = get_user();\n if ($user === null) {\n if (config\\LAST_DENY_AUTOREDIRECT)\n $_SESSION['userx\\LAST_DENY_PATH'] = APP_ROOT_URL . \\substr(REQ_URL, 1);\n if ($message === null)\n $message = _(\"Access denied. You are not logged in.\");\n \\melt\\messenger\\redirect_message(config\\SOFT_403, $message, \"bad\");\n } else {\n if ($message === null)\n $message = _(\"Access denied. Insufficient permissions.\");\n \\melt\\messenger\\redirect_message(config\\SOFT_403, $message, \"bad\");\n }\n } else\n \\melt\\request\\show_xyz(403);\n exit;\n}", "public function allowMessage()\n {\n $this->_data['Mensaje'] = 1;\n }", "public function sendGoodbyeMail()\n {\n $user = Auth::user();\n\n $this->mailer->send('user.goodbye', compact('user'), function (Message $message) use($user) {\n $message\n ->to($user->email)\n ->subject('Sorry to see you leave...');\n });\n }", "function ppmess_send_message_not_logged(){\t\n\twp_die('send message: user not logged');\n}", "function deny()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit('Invalid Token');\r\n\t\t\r\n\t\t// Get the selected items\r\n\t\t$cid = JRequest::getVar('cid', array(0), 'post', 'array');\r\n\t\t\r\n\t\t$total = count($cid);\r\n\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_DENIED', $total);\r\n\t\t\r\n\t\t// Force array elements to be integers\r\n\t\tJArrayHelper::toInteger($cid, array(0));\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t// No items are selected\r\n\t\tif (!is_array($cid) || count($cid) < 1)\r\n\t\t\tJError::raiseWarning(500, JText::_('SELECT ITEM'));\r\n\t\telse\r\n\t\t{\r\n\t\t\t$user =& JFactory::getUser();\r\n\t\t\t$user_id = $user->get('username');\r\n\t\t\tforeach ($cid as $id)\r\n\t\t\t{\r\n\t\t\t\tRSMembership::saveTransactionLog('Manually denied by '.$user_id, $id);\r\n\t\t\t\tRSMembership::deny($id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$total = count($cid);\r\n\t\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_DENIED', $total);\r\n\t\t\t\r\n\t\t\t// Clean the cache, if any\r\n\t\t\t$cache =& JFactory::getCache('com_rsmembership');\r\n\t\t\t$cache->clean();\r\n\t\t}\r\n\t\t\r\n\t\t$this->setRedirect('index.php?option=com_rsmembership&view=transactions', $msg);\r\n\t}", "public function ajax_deny_approval()\n {\n if (empty($_POST)) return;\n\n ee()->load->model('publisher_approval');\n $msg = ee()->publisher_approval->deny();\n ee()->publisher_helper->send_ajax_response($msg);\n }", "function denyEnrollment($user, $cid)\r\n {\r\n $courseName = $this->getCourseName($cid); //Need course name for email\r\n $this->MB->set_subject(\"Enrollment application for $courseName: Denied\");\r\n $this->MB->set_body(\"We are sorry to inform you that your application to enroll in $courseName\r\n has been rejected. We encourage you to apply at a later time when\r\n you are a more qualified applicant. Thank you.\");\r\n $this->MB->set_sendto($user);\r\n $this->MB->set_sendfrom('admin');\r\n $this->MB->send_mail(); //Sed user an email informing them of their rejection\r\n $this->DB->database_delete('enrollment_requests', array('user' => $user, 'cid' => $cid)); //Delete request from database\r\n }", "public function giftRejectEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'gift-reject', $user->email, $args);\r\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function do_not_email( $user_id )\n\t{\n\t\treturn apply_filters( 'go_user_profile_do_not_email_check', FALSE, $user_id );\n\t}", "function booking_reject_cancellation_email($useremail, $bookingid) {\n\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking cancellation request for booking id: $bookingid has been rejected.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Your Booking Cancellation Request is rejected.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "public function saleRejectEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('common', 'sale-reject', $user->email, $args);\r\n }", "public static function email_unlock_account() {\n\n if ($u = static::check_record_existence()) {\n\n # definindo conta como não confirmada.\n $u->hash_unlock_account = \\Security::random(32);\n if (!$u->edit())\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n\n $m = auth_model();\n if ($m::first(array('where' => 'id = \\'' . $u->id . '\\''))->emailUnlockAccount())\n flash('Email com as instruções para Desbloqueamento de conta enviado para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function deniedAction() {\n \t// assegno i valori alla view\n $this->viewInit();\n \t$this->view->title = parent::$_config->application->name.\" - Accesso Negato\";\n \t$this->view->pagetitle = \"Accesso Negato\";\n \t$this->view->message = \"Stai tentando di accedere a una risorsa non consentita per il tuo profilo.\";\n }", "public function user_doesnt_receive_email_when_not_registered()\n {\n Notification::fake();\n\n $this\n ->from($this->passwordRequestRoute())\n ->post($this->passwordEmailRoute(), [\n 'email' => '[email protected]',\n ])\n ->assertRedirect($this->passwordRequestRoute())\n ->assertSessionHasErrors('email');\n\n Notification::assertNotSentTo(\n User::factory()->make([\n 'email' => '[email protected]',\n ]),\n UserForgotPasswordNotification::class\n );\n }", "public function an_otp_mail_is_not_send_if_credentials_are_incorrect()\n {\n Mail::fake();\n //$this->withExceptionHandling();\n $user = factory(User::class)->create();\n $res= $this->post('/login',['email' => $user->email,'password'=>'wshhhdhhdhdhd']);\n Mail::assertNotSent(OTPMail::class);\n\n //$res->assertRedirect('/');\n\n }", "protected function sendEmail()\n {\n // Don't send to themself\n if ($this->userFrom->id == $this->userTo->id)\n {\n return false;\n }\n \n // Ensure they hae enabled emails\n if (! $this->userTo->options->enableEmails)\n {\n return false;\n }\n \n // Ensure they are not online\n if ($this->userTo->isOnline())\n {\n return false;\n }\n \n // Send email\n switch ($this->type)\n {\n case LOG_LIKED:\n if ($this->userTo->options->sendLikes)\n {\n $emailer = new Email('Liked');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id, $this->userFrom);\n }\n break;\n \n case LOG_ACCEPTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Accepted');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n \n case LOG_REJECTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Rejected');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n }\n }", "function btpay_config_mails_fn()\n{\n if (!current_user_can('manage_options'))\n {\n wp_die('You do not have sufficient permissions!');\n }\n\n btpay_mail_config_action();\n}", "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "function new_user_email_admin_notice()\n {\n }", "function booking_approve_cancellation_email($useremail) {\n\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking has been cancelled.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Your Booking Cancellation has been Processed.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function send_mail_to_accepted_user($username) {\n }", "private function sendUserNotification($userId) {\n $user = \\craft\\elements\\User::find()->id($userId)->one();\n if ($user && $user->getFieldValue('notifyOnAcceptance')) {\n CraftTradeAccountNotifications::sendMail('_emails/trade-account-approved.html', 'Trade Account Approved', $user->email);\n $user->setFieldValue('notifyOnAcceptance', false);\n Craft::$app->elements->saveElement($user);\n }\n }", "public function redirectUnconfirmed()\n {\n $securityContext = $this->container->get('security.context');\n $user = $this->checkUser();\n if ($user && !$securityContext->isGranted('ROLE_USER')) {\n return $this->router->generate('confirm_email_warning');\n }\n\n return FALSE;\n }", "function ip_detect_mail(){\r\n\t\t$ip_detect = $this->_deny_ip;\r\n\r\n\t\t$punish = 0;\r\n\t\twhile (list ($key, $val) = each ($ip_detect)) {\r\n\t\t\tif ($this->checkIPorRange($val)) {\r\n\t\t\t\t$punish = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($punish) {\r\n\t\t\t// Email the webmaster\r\n\t\t\t$msg .= \"The following banned ip tried to access one of the sites:\\n\";\r\n\t\t\t$msg .= \"Host: \".$_SERVER[\"REMOTE_ADDR\"].\"\\n\";\r\n\t\t\t$msg .= \"Agent: \".$_SERVER[\"HTTP_USER_AGENT\"].\"\\n\";\r\n\t\t\t$msg .= \"Referrer: \".$_SERVER[\"HTTP_REFERER\"].\"\\n\";\r\n\t\t\t$msg .= \"Document: \".$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"].\"\\n\";\r\n\t\t\t$headers .= \"X-Priority: 1\\n\";\r\n\t\t\t$headers .= \"From: \".ADMIN_NAME.\" <\".ADMIN_EMAIL.\">\\n\";\r\n\t\t\t$headers .= \"X-Sender: <\".ADMIN_EMAIL.\">\\n\";\r\n\r\n\t\t\tmail (ADMIN_EMAIL, SESS_NAME.\" Banned User Access\", $msg, $headers);\r\n\t\t}\r\n\t}", "public function a_user_can_send_message_without_ticket_email()\n {\n $this->withoutExceptionHandling();\n $this->actingAs(factory(User::class)->create());\n\n\n $param = [\n \"content\" => \"a_user_can_send_message_without_ticket_email\",\n \"ticket_id\" => \"1\",\n \"email\" => \"[email protected]\"\n ];\n \n $response = $this->post('/ticketMessage', $param);\n\n $this->assertDatabaseHas('ticket_messages', [\n 'content' => 'a_user_can_send_message_without_ticket_email',\n ]);\n }", "public function appreciation_denied ($mail_info, $decline_desc) {\n $mail = new PHPMailer;\n\n $mail->isSMTP();\n $mail->Host = $this->host;\n $mail->SMTPAuth = $this->SMTPAuth;\n $mail->Username = $this->username;\n $mail->Password = $this->password;\n $mail->SMTPSecure = $this->SMTPSecure;\n $mail->Port = $this->port; \n $mail->isHTML(true);\n \n $mail->setFrom('[email protected]', 'The Dunmore Difference');\n $mail->addAddress($mail_info[5]);\n\n $mail->Subject = 'Your appreciation has been denied';\n $mail->Body = 'The appreciation you gave to '.$mail_info[0].' '.$mail_info[1].' for '.$mail_info[6].' has been denied!<br><br>Reason for Decline: '.$decline_desc.'<br><br>Point Value: '.$mail_info[8].'<br><br>Description: '.$mail_info[7];\n //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n \n if(!$mail->send()) {\n return false;\n } else {\n return true;\n }\n }", "public function checkUserAccess() {\n $conversation = Conversation::find($this->conversation_id);\n if (!$conversation->isConversationMember($this->user_id)) {\n $this->addError('user_id', 'User can\\'t send messages to this conversation.');\n }\n }", "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "public function getDenyMessage()\n {\n return $this->denyMessage;\n }", "public function deny(Req $request, $id)\n\t{\n\t\t\n\t\t$bookReq = BookRequest::findOrFail($id);\n\t\t$bookReq->destroy();\n\t\tMail::send('emails.contact',['email'=>$data['email'],\n\t\t\t\t\t\t\t\t\t 'name'=>$data['name'],\n\t\t\t\t\t\t\t\t\t 'body'=>$data['body']], \n\t\tfunction($message) use($data)\n\t\t{\n\t\t $message->to('[email protected]', $data['name'])->subject($data['name'].' question');\n\t\t});\t\n\t}", "public function actionNoActivity(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->from = Yii::app()->params['noreplyEmail']; \n \n $users = User::model()->findAll(\"(lastvisit_at + INTERVAL 2 MONTH) < CURDATE() AND newsletter=1\");\n $c = 0;\n foreach ($users as $user){\n $lastvisit_at = strtotime($user->lastvisit_at);\n\n if ($lastvisit_at < strtotime('-1 year')) continue; // we give up after a year\n //if ($lastvisit_at > strtotime('-2 month')) continue; // don't notify before inactive for 2 months\n \n if (!\n (($lastvisit_at >= strtotime('-3 month')) || \n (($lastvisit_at >= strtotime('-7 month')) && ($lastvisit_at < strtotime('-6 month'))) || \n (($lastvisit_at >= strtotime('-12 month')) && ($lastvisit_at < strtotime('-11 month'))) )\n ) continue;\n \n//set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'no-activity-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n $message->subject = $user->name.\" did you forget about us?\";\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n //\n //$activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"Since your last visit we got some awesome new \".mailButton('projects', absoluteURL().'/project/discover','link', $mailTracking,'projects-button').\" and interesting \".\n mailButton('people', absoluteURL().'/person/discover','link', $mailTracking,'people-button').\" signup at Cofinder.\n <br /><br />\n Why don't you check them out on \".mailButton('Cofinder', 'http://www.cofinder.eu','success', $mailTracking,'cofinder-button');\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n \n Slack::message(\"CRON >> No activity reminders: \".$c);\n }", "public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "public function notAllowedDeliverHook()\n {\n if (CHAMELEON_CHECK_VALID_USER_SESSION_ON_PROTECTED_DOWNLOADS) {\n throw new AccessDeniedHttpException('Access denied.');\n }\n }", "public function sendEmailNotificationExpirePlan($user_id)\n {\n /* @var $user User */\n // $user_id = Yii::$app->user->getId();\n $user = User::findOne([\n 'id' => $user_id\n ]);\n \n \n \n if (!$user) {\n return false;\n }\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'sendEmailNotificationExpiryPlan-html'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => 'Nocopycopy'])\n ->setTo($this->email)\n ->setSubject('Plan Expire for Nocopycopy')\n ->send();\n }", "function Generic_deny($message = \"An error has occured\")\n{\n exit(\n json_encode(\n array(\n \"message\"=>$message,\n \"tracking_id\"=>LoggingEngine::$TRACKING_ID\n )\n )\n );\n}", "function alertAdmin($subj,$msg) {\n global $cfg;\n $to=$cfg?$cfg->getAdminEmail():ADMIN_EMAIL;\n $from=$cfg?$cfg->getAlertEmail():ADMIN_EMAIL;\n //Send alert to admin.\n Misc::sendmail($to,$subj,$msg,$from); \n }", "public function decline()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/decline', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has declined');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "function pp_sg_disable_renewal_notice( $send, $license_id, $notice_id ) {\n\t$license = edd_software_licensing()->get_license( $license_id );\n\n\tif( 6377 === (int) $license->download_id ) {\n\t\t$send = false;\n\t}\n\n\treturn $send;\n}", "function deny($reason) {\n $this->denied_reasons[] = $reason;\n }", "public function emailUser () {\n\t\t\t// Load the data helper class and get user instance\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$user = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t// Load the authentication model that belongs with logged in user\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $user->getUserId () );\n\t\t\t$auth->setId ( $user->getUserId () );\n\t\t\t// Construct the user contact's full name\n\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t// Format timestamp date and time\n\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t$timestampDate = \"-\";\n\t\t\t$timestampTime = \"-\";\n\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Construct and send out ban notice email to user\n\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_user\");\n\t\t\t$template->setSenderEmail ( Mage::getStoreConfig (\"trans_email/ident_general/email\") );\n\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t$template->setType (\"html\");\n\t\t\t$template->setTemplateSubject (\n\t\t\t\tMage::helper (\"twofactor\")->__(\"Your Magento admin account is locked\")\n\t\t\t);\n\t\t\t$template->send ( $user->getEmail (), $fullName,\n\t\t\t\tarray (\n\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\"username\" => $user->getUsername (),\n\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function confirm($username) {\r\n $user = $this->userRepository->findByUser($username);\r\n //send user reset mail\r\n $to = $user->getEmail();\r\n $subject = \"Health Forum: Password reset\";\r\n $temp_pass = $this->createRandomPass();\r\n $msg = wordwrap(\"Hi there,\\nThis email was sent using PHP's mail function.\\nYour new password is: \".$temp_pass);\r\n $from = \"From: [email protected]\";\r\n $mail = mail($to, $subject, $msg, $from);\r\n\r\n if ($mail) {\r\n $this->app->flash('success', 'Thank you! The password was sent to your email');\r\n } else {\r\n $this->app->flash('failed', 'Error: your email was not sent!');\r\n }\r\n\r\n $this->app->redirect('/login');\r\n }", "function __sendForgotPasswordEmail($id = null) {\n $id = $this->request->getData('user_id');\n if (!empty($id)) {\n $user = $this->Users->get($id);\n $email = new Email();\n $email\n ->template('reset_password_request', 'default')\n ->subject('OTP Code Request - DO NOT REPLY')\n ->emailFormat('html')\n ->setViewVars(['user' => $user,\n 'password' => $password])\n ->from('[email protected]')\n ->to($user->email)\n ->send();\n\n return true;\n }\n return false;\n }", "public function isEmailDisabled()\n {\n return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');\n }", "public function resendConfirmationMailAction()\n {\n // @todo find a better way to fetch the data\n $result = GeneralUtility::_GP('tx_femanager_pi1');\n if (is_array($result)) {\n if (GeneralUtility::validEmail($result['user']['email'])) {\n $user = $this->userRepository->findFirstByEmail($result['user']['email']);\n if (is_a($user, User::class)) {\n $this->sendCreateUserConfirmationMail($user);\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailSend'),\n '',\n AbstractMessage::INFO\n );\n $this->redirect('resendConfirmationDialogue');\n }\n }\n }\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailFail'),\n LocalizationUtility::translate('validationError'),\n AbstractMessage::ERROR\n );\n $this->redirect('resendConfirmationDialogue');\n }", "function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}", "public function canMail() {\n\t\tif ($this->ignoredUser || ($this->onlyBuddyCanMail && !UserProfile::isBuddy($this->userID)) || (!$this->userCanMail && !$this->onlyBuddyCanMail)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static function denyAccess()\n {\n static::redirect(static::adminPath(), cbTrans('denied_access'));\n }", "public function sendReject($id='')\n {\n $data['info'] = $this->m_scholar->singleGet($id);\n $email = $this->m_scholar->emailGet($data['info']->Student_id);\n $msg = 'Dear '. $data['info']->name.',\n Your Karnataka Labour Welfare Board Scholarship has been rejected from Labour Welfare Board due to '.$data['info']->reject_reason.', More information login to your account and check the Scholarship status';\n $this->studentSms($msg,$id);\n $this->load->config('email');\n $this->load->library('email');\n $from = $this->config->item('smtp_user');\n $msg = $this->load->view('mail/reject', $data, true);\n $this->email->set_newline(\"\\r\\n\");\n $this->email->from($from , 'Karnataka Labour Welfare Board');\n $this->email->to($email);\n $this->email->subject('Scholarship application Rejected from Labour Welfare Board'); \n $this->email->message($msg);\n if($this->email->send()) \n {\n return true;\n } \n else\n {\n \n return false;\n }\n }", "protected function accessDenied()\n\t{\n\t\t$this->title = \"Доступ закрыт!\";\n\t\t$this->meta_desc = \"Доступ к данной странице закрыт.\";\n\t\t$this->meta_key = \"доступ закрыт, доступ закрыт страница, доступ закрыт страница 403\";\n\n\t\t$pm = new PageMessage();\n\t\t$pm->header = \"Доступ закрыт!\";\n\t\t$pm->text = \"У Вас нет прав доступа к данной странице.\";\n\t\t$this->render($pm);\n\t}", "public static function prevent_password_reset( $allow, $user_id ) {\n\t\t$user = get_user_by( 'id', $user_id );\n\n\t\tif ( in_array( 'pending', (array) $user->roles ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $allow;\n\t}", "public function resendEmail()\n {\n $query = users::where('email', session('notice'))->first();\n // Sending Welcome Email\n Mail::to(session('notice')['email'])->send(new welcome($query->token));\n return view('auth.emailVerification');\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "function send_recovery_mail($mail,$message) {\n\t\tif (mail($mail, \"Recovery password from site sitename\", $message, \"From: [email protected]\\r\\n\".\"Reply-To: [email protected]\\r\\n\".\"X-Mailer: PHP/\" . phpversion())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function users_email_conf_post_role($h)\n {\n // Check to see if this user has any stop_spam_flags:\n $sql = \"SELECT usermeta_value FROM \" . TABLE_USERMETA . \" WHERE usermeta_userid = %d AND usermeta_key = %s\";\n $flags = $h->db->get_var($h->db->prepare($sql, $h->currentUser->id, 'stop_spam_flags'));\n \n if ($flags) { $h->currentUser->role = 'pending'; }\n }", "function ll_alert_user( $user_login, $user_email, $key ) { \n\n\t\tif ( is_multisite() )\n\t\t\t$blogname = $GLOBALS['current_site']->site_name;\n\t\telse\n\t\t\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n\t\t$message = sprintf( __('ALERT: The admin of %s requires that you reset the password for the following account:','loginlock'), $blogname ). \"\\r\\n\\r\\n\";\n\t\t$message .= network_site_url() . \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Username: %s','loginlock'), $user_login) . \"\\r\\n\\r\\n\";\n\t\t$message .= __('You must reset your password before you can log back in. To reset your password, visit the following address:','loginlock') . \"\\r\\n\\r\\n\";\n\t\t$message .= '<' . network_site_url(\"wp-login.php?action=rp&key=$key&login=\" . rawurlencode($user_login), 'login') . \">\\r\\n\";\n\n\t\t$title = sprintf( __('[%s] Emergency Password Reset','loginlock'), $blogname );\n\n\t\t$title = apply_filters('retrieve_password_title', $title);\n\t\t$message = apply_filters('retrieve_password_message', $message, $key);\n\n\t\tif ( $message && !wp_mail($user_email, $title, $message) )\n\t\t\treturn __('The e-mail could not be sent to','loginlock'). $user_login . \"<br />\\n\" . __('Possible reason: your host may have disabled the mail() function.','loginlock');\n\n\t}", "public function forbiddenResponse()\n {\n // (default is to just redirect to initial page with errors)\n // \n // Can return a response, a view, a redirect, or whatever else\n flash()->error('Please verify your email first');\n return $this->redirector->back();\n }", "public function DenyAuction($id){\n\n\t\t\tif ($this->session->has_userdata(\"user\")){\n\t\t\t\t$user = $this->session->userdata(\"user\");\n\t\t\t\t\n\t\t\t\tif ($user->user_rank < 1){\n\t\t\t\t\tredirect(\"InfoMessage/PageNotFound\");\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$auction = $this->Auction->getAuctionById($id);\n\n\t\t\t\t\tif (count($auction) == 1){\n\n\t\t\t\t\t\tif ($auction[0]->auction_state == \"Pending confirmation\"){\n\n\t\t\t\t\t\t\t$this->db->set(\"auction_state\", \"Denied\");\n\t\t\t\t\t\t\t$this->db->where(\"auction_id\", $id);\n\t\t\t\t\t\t\t$this->db->update(\"auctions\");\n\n\t\t\t\t\t\t\tredirect(\"InfoMessage/AuctionDenySuccess\");\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tredirect(\"InfoMessage/AuctionDenyFailed\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tredirect(\"InfoMessage/AuctionNotFound\");\n\t\t\t\t\t}\n\n\t\t\t\t} \n\t\t\t}\n\t\t\telse{\n\t\t\t\tredirect(\"InfoMessage/PageNotFound\");\n\t\t\t}\n\n\t\t}", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function noaccess() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tSession::setMessage(array('alert'=>'info','icon'=>'exclamation','text'=>\"User does not have access\"));\n\t\techo \"<h1>Unauthorised access to this page</h1>\";\n\t\techo \"<p>You are trying to access a page that requires different authorisation. You are currently logged in as <strong>\".Session::get('user')->name.\"</strong>. This user does not have the permissions to view this page.</p>\";\n\t\techo \"<p>Please log out and provide the proper credentials, or navigate to another page.</p>\";\n\t\techo \"<ul><li><a href=\\\"/user?logout\\\">Log out</a></li></ul>\";\n\t}", "private function notAdmin() : void\n {\n if( intval($this->law) === self::CREATOR_LAW_LEVEL)\n {\n (new Session())->set('user','error','Impossible d\\'effectuer cette action');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }", "protected function showForgot() {}", "function validateAndSend($user_email){\n\t\t\t$userPassword = $this->manage_content->getValue_email('owner_info','password','owner_email',$user_email);\n\t\t\tif(isset($userPassword[0]['password']))\n\t\t\t{\t\n\t\t\t\t$message = \"Your password for the account is\".$userPassword[0]['password'];\n\t\t\t\t$mailsent = $this->mail_function->sendMail($user_email,$message,$user_email);\n\t\t\t\treturn $mailsent;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"Invalid user.\";\n\t\t\t}\n\n\t\t}", "function send_recover_email($to_name, $to_email, $link) {\r\n\t\tglobal $translate;\r\n\t\t\r\n\t\t$message = $translate->__(\"Hello\").\" <b>$to_name</b>:<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"You have requested a password change on\").\" <b>\".get_setting(1).\"</b>.<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"If you didn't perform this action, just skip this email and the link will expire in 24 hours.\").\"<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"To reset your password, click the following link\").\": <br /><br /><a href='$link' target='_blank'>$link</a>\";\t\r\n\t\t\r\n\t\t$subject = $translate->__(\"Password recover request by\").\" $to_name\";\r\n\t\t$from_email = 'no-reply@'.get_host();\r\n\t\t\r\n\t\t// For development purposes\r\n\t\tif ( !SCRIPT_LIVE ) {\r\n\t\t\t$from_email = $from_email.'.com';\r\n\t\t}\r\n\t\t\r\n\t\tif ( send_email(get_setting(1), $from_email, $to_email, $to_name, $subject, $message) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function message() {\n return 'Email not allowed';\n }", "function SendEmail($fromuserid,$touserid, $subject, $message ) {\n\t//$email = '[email protected]'; //comment this line to turn off redirect.\n\t\n\t//$subject = \"Your ClubHouse Web Membership\";\n\t$headers = \"From: TONYS CLUBHOUSE<[email protected]>\\nX-Mailer: PHP/\" . phpversion(). \"\\r\\n\";\n\t$headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n //$message = \"\"; \n \n mail($email, $subject, $message, $headers); \n}", "function isDenied() {\n return !empty($this->denied_reasons);\n }", "function notification_ignore() {\n\n $ignore_key = CUSTOM_LOGIN_OPTION . '_ignore_announcement';\n\n // Bail if not set\n if ( ! isset( $_GET[ $ignore_key ] ) ) {\n return;\n }\n\n // Check nonce\n check_admin_referer( $ignore_key, $ignore_key );\n\n // If user clicks to ignore the notice, add that to their user meta\n add_user_meta( get_current_user_id(), $ignore_key, 1, true );\n }", "public function mustbeuser()\n {\n if (!$this->hasuser())\n {\n $this->web()->noaccess();\n }\n }", "public function isDenied() {\n return $this->denied;\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'u_email' => $this->username,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n \t$userName = $user->u_name;\n $userEmail = $user->u_email;\n \t \n \tif(!empty($userName) && !empty($userEmail)) {\n $subject = \"[Price Genius]: Your Reset Password Request\";\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['api/reset-password', 'token' => $user->password_reset_token]);\n $content = ['userName' => $userName, 'resetLink' => $resetLink];\n $promotionName = \"Forgot Password\";\n return SendMail::sendSupportMail($user->u_email, $user->u_name, $subject, $content, $promotionName);\n \t\t}\n }\n \n }\n return false;\n }", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "public function requestVerificationEmail()\n {\n if (!$this->request->is('post')) {\n $this->_respondWithMethodNotAllowed();\n return;\n }\n\n $user = $this->Guardian->user();\n if (!$user->verified) {\n $this->Users->Tokens->expireTokens($user->id, TokensTable::TYPE_VERIFY_EMAIL);\n $token = $this->Users->Tokens->create($user, TokensTable::TYPE_VERIFY_EMAIL, 'P2D');\n try {\n $this->getMailer('User')->send('verify', [$user, $token->token]);\n $this->set('message', __('Please check your inbox.'));\n } catch (\\Exception $e) {\n $this->_respondWithBadRequest();\n $this->set('message', 'Mailer not configured.');\n }\n } else {\n $this->set('message', __('Your email address is already verified.'));\n }\n\n $this->set('_serialize', ['message']);\n }", "public function rejectInvitation()\n\t{\n\t\t$id = $this->request->data['id'];\n\t\t$invite['MeetingUser']['id'] = $id;\n\t\t//set status 1 as accepted\n\t\t$invite['MeetingUser']['is_accept'] = 2;\n\t\t$invite['MeetingUser']['is_read'] = 1;\n\t\t$invite['MeetingUser']['is_attend'] = 0;\n\t\t//set notification\n\t\t$oldCount1 = $this->Session->read('oldMeetingCount');\n\t\tif ($oldCount1>0) {\n\t\t\t$newCount1 = $oldCount1-1;\n\t\t\t$this->Session->write('oldMeetingCount',$newCount1);\n\t\t}\n\t\tif($this->MeetingUser->save($invite))\n\t\t\techo \"1\";\n\t\telse\n\t\t\techo \"0\";\n\t\texit;\n\t}", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "function forbidden($message = null){\n\t\t$this->setStatusCode(403);\n\t\t$this->clearOutputBuffer();\n\t\tif(!isset($message)){\n\t\t\t$message = \"\n\t\t\t\tYou don't have permission to access \".htmlspecialchars($GLOBALS[\"HTTP_REQUEST\"]->getRequestURI()).\"\n\t\t\t\ton this server.\n\t\t\t\";\n\t\t}\n\t\t$this->_writeStatusMessage($message);\n\t}", "public function sendEmailVerificationNotification();", "function send_message($eventdata){\n global $DB, $CFG, $SITE;\n\n if (!empty($CFG->noemailever)) {\n // hidden setting for development sites, set in config.php if needed\n debugging('$CFG->noemailever active, no message sent.', DEBUG_MINIMAL);\n return true;\n }\n\n // skip any messaging suspended and deleted users\n if ($eventdata->userto->auth === 'nologin' or $eventdata->userto->suspended or $eventdata->userto->deleted) {\n return true;\n }\n \n // Build message\n $note = $SITE->shortname.': '.$eventdata->subject;\n\n $message = $eventdata->smallmessage;\n \n \n if (!empty($CFG->ombielalertsaekmenuid)) {\n if (!empty($eventdata->contexturl)) {\n $parsedurl = parse_url($eventdata->contexturl);\n\n if (strpos($parsedurl['path'], '/mod/forum/discuss.php') !== false) {\n parse_str($parsedurl['query'], $parsedquery); \n $forumid = $DB->get_field('forum_discussions', 'forum', array('id'=>$parsedquery['d']));\n $cm = get_coursemodule_from_instance('forum', $forumid); \n $aekparams = \"&_action=show_discussion&module={$cm->id}&discussion={$parsedquery['d']}&course_id={$cm->course}\";\n $fragment = '#'.$parsedurl['fragment'];\n } elseif (strpos($parsedurl['path'], '/mod/assign/view.php') !== false) {\n parse_str($parsedurl['query'], $parsedquery);\n $cm = $DB->get_record('course_modules', array('id'=>$parsedquery['id']));\n $aekparams = \"&_action=show_assign&module={$parsedquery['id']}&course_id={$cm->course}\";\n $fragment = ''; \n // Assignment subjects are a bit long \n $note = substr($note, 0, 45).'...';\n } else {\n $aekparams = false;\n $fragment = '';\n }\n\n if ($aekparams) { \n $message .= \"<br><br><a href='campusm://loadaek?sid={$CFG->ombielalertsaekserviceid}&\"\n . \"toolbar={$CFG->ombielalertsaekmenuid}{$aekparams}{$fragment}'>\"\n . \"{$eventdata->contexturlname}</a>\\n\";\n }\n }\n }\n\n // set up stream context and SOAP options for proxies, SSL etc.\n $credentials = sprintf('Authorization: Basic %s', \n base64_encode(\"{$CFG->ombielalertsserversserverusername}:{$CFG->ombielalertsserverpassword}\") ); \n \n $parsedEndpoint = parse_url($CFG->ombielalertsserverendpoint);\n \n $streamContextOptions = array(\n 'http'=>array(\n 'user_agent' => 'PHPSoapClient',\n 'request_fulluri' => true,\n 'header'=>$credentials,\n ),\n 'ssl'=>array(\n 'SNI_enabled'=>true,\n 'SNI_server_name'=>$parsedEndpoint['host'],\n ),\n );\n \n if (!empty($CFG->proxyhost)) {\n $streamContextOptions['http']['proxy'] = \"{$CFG->proxyhost}:{$CFG->proxyport}\";\n } \n \n $context = stream_context_create($streamContextOptions);\n \n $soapOptions = array(\n 'login' => $CFG->ombielalertsserversserverusername,\n 'password' => $CFG->ombielalertsserverpassword,\n 'location' => $CFG->ombielalertsserverendpoint,\n 'stream_context' => $context,\n );\n \n if (!empty($CFG->proxyhost)) {\n $soapOptions['proxy_host'] = $CFG->proxyhost;\n $soapOptions['proxy_port'] = $CFG->proxyport;\n }\n \n \n try { \n // Get WSDL\n $soapclient = new SoapClient($CFG->ombielalertsserverendpoint.'?wsdl', $soapOptions);\n\n // Create request\n $request = array(\n 'orgCode' => $CFG->ombielalertsorgcode,\n 'password' => $CFG->ombielalertsorgpassword,\n 'notifications'=> array(\n 'notification'=> array(\n 'notificationTargets' => array(\n 'notificationTarget'=> array(\n 'emailAddress'=>$eventdata->userto->email, \n )\n ),\n 'note' => $note,\n 'message' => $message,\n 'forceSms' => 'N',\n 'forceEmail' => 'N',\n 'forceCampusmNotification' => 'Y',\n ) \n ),\n );\n\n // Make request \n $result = $soapclient->sendAlerts($request);\n \n } catch(SoapFault $e) { \n debugging($e->getMessage());\n if ($CFG->version < 2014051200) { # Moodle 2.7\n add_to_log(SITEID, 'ombiel_alerts', 'send alert', '', 'Error sending alert from '.$eventdata->userfrom->email.' to '.$eventdata->userto->email.'ERROR: '. $e->getMessage());\n } else {\n // Trigger event for failing to send email but change error to show we mean the oMbiel Alerts system.\n $event = \\core\\event\\email_failed::create(array(\n 'context' => context_system::instance(),\n 'userid' => $eventdata->userfrom->id,\n 'relateduserid' => $eventdata->userto->id,\n 'other' => array(\n 'subject' => 'oMbiel Alerts ',\n 'message' => $note,\n 'errorinfo' => 'Link to oMbiel Alerts system failed with error: '.$e->getMessage()\n )\n ));\n $event->trigger();\n }\n return true;\n }\n return ($result->desc == 'Successful');\n \n }", "private function sendConfirmationMail() {\n\t\t\t\t$subject = 'Confirmation Mail';\n\t\t\t\t$from = '[email protected]';\n\t\t\t\t$replyTo = '[email protected]';\n\t\t\t\t\n\t\t\t\t//include some fancy stuff here, token is md5 of email\n\t\t\t\t$message = \"<a href='http://www.momeen.com/eCommerce/register/confirmUser.php?token=$this->token'> Confirm</a>\";\n\n\t\t\t\t$headers = \"From: \".\"$from\".\"\\r\\n\";\n\t\t\t\t$headers .= \"Reply-To: \".\"$replyTo\".\"\\r\\n\";\n\t\t\t\t$headers .= \"MIME-Version:1.0\\r\\n\";\n\t\t\t\t$headers .= \"Content-Type:text/html; charset=ISO-8859-1\\r\\n\";\n\t\t\t\tif(!mail($this->email, $subject, $message, $headers)) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Confirmation mail did not sent. Contact admin';\n\t\t\t\t}\n\t\t\t}", "public function isSpam();", "function send_anon() {\n\n $input = $_POST['feedback'];\n $about = $_POST['about'];\n $relation = $_POST['relation'];\n\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_anonymous_email_addresses_field'];\n\n\t\t$subject = 'Anonymous input form website';\n\n $body = \"<i>Sent using the contact form at \" . get_site_url() . \"</i>\" .\n \"<br><br>\" . esc_html($input) .\n \"<br><br>About: \" . esc_html($about) .\n \"<br><br>Relation: \" . esc_html($relation);\n\n\t\t$sender = \"Anonymous <[email protected]>\";\n\n\n\n return send_mail($receiver, $subject, $body, $sender);\n\n }", "public function deny($gdpr_info) {\n $this->load->model('localisation/language');\n\n $language_info = $this->model_localisation_language->getLanguage($gdpr_info['language_id']);\n\n if ($language_info) {\n $language_code = $language_info['code'];\n } else {\n $language_code = $this->config->get('config_language');\n }\n\n $language = new Language($language_code);\n $language->load($language_code);\n $language->load('mail/gdpr_deny');\n\n if ($this->config->get('config_logo')) {\n $data['logo'] = html_entity_decode($this->config->get('config_logo'), ENT_QUOTES, 'UTF-8');\n } else {\n $data['logo'] = '';\n }\n\n $data['text_request'] = $language->get('text_' . $gdpr_info['action']);\n\n $this->load->model('customer/customer');\n\n $customer_info = $this->model_customer_customer->getCustomerByEmail($gdpr_info['email']);\n\n if ($customer_info) {\n $data['text_hello'] = sprintf($language->get('text_hello'), html_entity_decode($customer_info['firstname'], ENT_QUOTES, 'UTF-8'));\n } else {\n $data['text_hello'] = sprintf($language->get('text_hello'), $language->get('text_user'));\n }\n\n $data['text_contact'] = $language->get('text_contact');\n $data['text_thanks'] = $language->get('text_thanks');\n\n $data['button_contact'] = $language->get('button_contact');\n\n $this->load->model('setting/store');\n\n $store_info = $this->model_setting_store->getStore($gdpr_info['store_id']);\n\n if ($store_info) {\n $data['store_name'] = html_entity_decode($store_info['name'], ENT_QUOTES, 'UTF-8');\n $data['store_url'] = $store_info['url'];\n $data['contact'] = $store_info['url'] . 'index.php?route=information/contact';\n } else {\n $data['store_name'] = html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8');\n $data['store_url'] = HTTPS_CATALOG;\n $data['contact'] = HTTPS_CATALOG . 'index.php?route=information/contact';\n }\n\n $mail = new Mail($this->config->get('config_mail_engine'));\n $mail->parameter = $this->config->get('config_mail_parameter');\n $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');\n $mail->smtp_username = $this->config->get('config_mail_smtp_username');\n $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');\n $mail->smtp_port = $this->config->get('config_mail_smtp_port');\n $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');\n\n $mail->setTo($gdpr_info['email']);\n $mail->setFrom($this->config->get('config_email'));\n $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));\n $mail->setSubject(html_entity_decode(sprintf($language->get('text_subject'), $this->config->get('config_name')), ENT_QUOTES, 'UTF-8'));\n $mail->setHtml($this->load->view('mail/gdpr_deny', $data));\n $mail->send();\n }", "function show_deny() {\n\t\t\tshow_error(\n\t\t\t\t'403 Forbidden',\n\t\t\t\t'You do not have sufficient clearance to view this page.'\n\t\t\t);\n\t\t}", "function disableReceiver($uid, $bounce_type) {\n\t\treturn false;\n\t}", "public function process()\n\t{\n\t\t$bFriendIsSelected = false;\n\t\tif (($iUserId = $this->request()->getInt('to')))\n\t\t{\n\t\t\t$aUser = Phpfox::getService('user')->getUser($iUserId, Phpfox::getUserField());\t\t\t\n\t\t\tif (isset($aUser['user_id']))\n\t\t\t{\n\t\t\t\t//if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'mail.send_message'))\n\t\t\t\tif (!Phpfox::getService('mail')->canMessageUser($aUser['user_id']))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.unable_to_send_a_private_message_to_this_user_at_the_moment'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$bFriendIsSelected = true;\n\t\t\t\t\n\t\t\t\t$this->template()->assign('aUser', $aUser);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (Phpfox::getParam('mail.spam_check_messages') && Phpfox::isSpammer())\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('mail.currently_your_account_is_marked_as_a_spammer'));\n\t\t}\n\t\t\n\t\t$aValidation = array(\n\t\t\t'subject' => Phpfox::getPhrase('mail.provide_subject_for_your_message'),\n\t\t\t'message' => Phpfox::getPhrase('mail.provide_message')\n\t\t);\t\t\n\n\t\t$oValid = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_form', \n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($aVals = $this->request()->getArray('val'))\n\t\t{\t\t\t\n\t\t\t// Lets make sure they are actually trying to send someone a message.\t\t\t\n\t\t\tif (((!isset($aVals['to'])) || (isset($aVals['to']) && !count($aVals['to']))) && (!isset($aVals['copy_to_self']) || $aVals['copy_to_self'] != 1))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('mail.select_a_member_to_send_a_message_to'));\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($oValid->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.mail_hash_check'))\n\t\t\t\t{\n\t\t\t\t\tPhpfox::getLib('spam.hash', array(\n\t\t\t\t\t\t\t\t'table' => 'mail_hash',\n\t\t\t\t\t\t\t\t'total' => Phpfox::getParam('mail.total_mail_messages_to_check'),\n\t\t\t\t\t\t\t\t'time' => Phpfox::getParam('mail.total_minutes_to_wait_for_pm'),\n\t\t\t\t\t\t\t\t'content' => $aVals['message']\n\t\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t\t)->isSpam();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (Phpfox::getParam('mail.spam_check_messages'))\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getLib('spam')->check(array(\n\t\t\t\t\t\t\t\t'action' => 'isSpam',\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t\t'module' => 'comment',\n\t\t\t\t\t\t\t\t\t'content' => Phpfox::getLib('parse.input')->prepare($aVals['message'])\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\tPhpfox_Error::set(Phpfox::getPhrase('mail.this_message_feels_like_spam_try_again'));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t{\n\t\t\t\t\t$aIds = Phpfox::getService('mail.process')->add($aVals);\n\t\t\t\t\t\n\t\t\t\t\t$this->url()->send('mail.view' , array('id' => $aIds[0]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'bMobileInboxIsActive' => true,\t\t\t\n\t\t\t\t'bFriendIsSelected' => $bFriendIsSelected,\t\n\t\t\t\t'aMobileSubMenus' => array(\n\t\t\t\t\t$this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'),\n\t\t\t\t\t$this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')\n\t\t\t\t),\n\t\t\t\t'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', 'compose')\n\t\t\t)\n\t\t);\t\t\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function sendConfirmationEmailMessage(UserInterface $user): void;", "public function emailBasedAction()\n {\n $signoffEmail = $this->em->getRepository('Fisdap\\Entity\\SignoffEmail')->findOneBy(array('email_key' => $this->_getParam('key')));\n \n // Determine what the message should be...\n // We have 4 or so states.\n // State 1 - No signoffEmail was found.\n if ($signoffEmail == null) {\n $message = \"I'm sorry, we could not find a matching shift for the provided code. Please contact customer support.\";\n // State 2 - Email has expired\n } elseif ($signoffEmail->expire_time != null && $signoffEmail->expire_time->format('U') <= time()) {\n $message = \"I'm sorry, the deadline to fill out the form for this shift has passed.\";\n // State 3 - Shift has already been signed off on\n } elseif ($signoffEmail->has_signed_off) {\n $message = \"We're sorry. It looks like someone already signed off on this shift on \" . $signoffEmail->signoff_time->format('F jS, Y \\a\\t Hi') . \".\";\n } else {\n $signoffEmail->has_signed_off = true;\n $signoffEmail->signoff_time = new \\DateTime();\n $signoffEmail->save();\n \n $message = \"Thank you, you have successfully signed off on this shift.\";\n }\n \n $this->view->message = $message;\n }", "public function askEmail()\n {\n $this->ask('What is your email?', function (Answer $answer) {\n $this->user->email = $answer->getText();\n\n $user = User::where('email', $this->user->email)->first();\n\n if (isset($user)) {\n $this->repeat('Sorry this email is already in use. Please enter a valid email.');\n } else {\n $this->askPassword();\n }\n });\n }", "private function composeAndSendParticipationCancelMail($a_userid) {\r\n\t\t$this->composeParticipationCancelMail($a_userid);\r\n\t\tparent::sendMail(array( $a_userid ), array( 'system' ), is_numeric($a_userid));\r\n\t}", "function account_removal_send_thank_notification($type, $user_guid) {\n\t\n\t$user = get_user($user_guid);\n\tif (empty($user)) {\n\t\treturn false;\n\t}\n\t\n\tif (!in_array($type, ['remove', 'disable'])) {\n\t\treturn false;\n\t}\n\t\n\t$site = elgg_get_site_entity();\n\t\n\t$subject = elgg_echo(\"account_removal:message:thank_you:{$type}:subject\", [\n\t\t$site->name,\n\t]);\n\t$message = elgg_echo(\"account_removal:message:thank_you:{$type}:body\", [\n\t\t$user->name,\n\t\t$site->name,\n\t]);\n\t\n\tnotify_user($user_guid, $site->getGUID(), $subject, $message, [], 'email');\n\t\n\treturn true;\n}", "public static function remindAssignedUser() {\n $unrespondedToTickets = Self::getUnrespondedToTickets(15);\n\n if($unrespondedToTickets->count() > 0) {\n foreach($unrespondedToTickets as $ticket) {\n $vendor = $ticket->assignedTo;\n\n $message = \"<p>Hello {$vendor->name}.<br/> You are yet to respond to the ticket ID <a href='{{ route('tickets.vendor.show', ['ticket_id'=> $ticket->ticket_id]) }}''>#{{$ticket->ticket_id}}</p>. <p>If further delayed, your unit head would be notified of your delayed response to this ticket. <br/><br/>Thank you</p>\";\n $title = \"Ticket #{$ticket->ticket_id} is yet to receive a response\";\n send_email($vendor->name, $vendor->email, $message, route('tickets.vendor.show', ['ticket_id'=> $ticket->ticket_id]), $title);\n\n }\n }\n }", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function trigger_email_verification($userid) {\n\t\t$adminModel = $this->loadModel('admin');\n\t\t$adminModel->verifyUserEmail($userid);\n\t\theader('location: '.URL.'admin/users');\n\t}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function userCanChangeEmails( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "function booking_request_cancellation_email($useremail, $bookingid) {\n\t\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking cancellation request for Booking ID: $bookingid has been registered, you will soon be notified about the response by email.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Request to cancel Booking.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t// $this->email->print_debugger();\n\t\t\t\t// to admin\n\t\t\t\t$adminmessage = \"Dear Admin,<br>\";\n\t\t\t\t$adminmessage .= \" A request has been registered to cancel Booking id: $bookingid\";\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($this->adminemail);\n\t\t\t\t$this->email->subject('Request Received to cancel Booking.');\n\t\t\t\t$this->email->message($adminmessage);\n\t\t\t\t$this->email->send();\n\t\t}", "protected function denyRequest()\n {\n $this->loginAction();\n }" ]
[ "0.6965566", "0.6497139", "0.6292134", "0.6282241", "0.6166016", "0.6161643", "0.61175984", "0.61131996", "0.60753155", "0.60715616", "0.6064979", "0.6023679", "0.601881", "0.60090697", "0.59926945", "0.59081644", "0.59061116", "0.5899145", "0.5891469", "0.5885069", "0.58729285", "0.5866543", "0.5840633", "0.58270514", "0.58042", "0.58022255", "0.5792651", "0.5777695", "0.5775071", "0.576426", "0.5763171", "0.5755494", "0.57493925", "0.5745266", "0.5738145", "0.5726912", "0.5726289", "0.57230806", "0.5719116", "0.5718468", "0.5711237", "0.57109106", "0.57089967", "0.5704659", "0.57007045", "0.568982", "0.5681903", "0.5670856", "0.567", "0.5669765", "0.5660753", "0.5659938", "0.56443363", "0.56437427", "0.56418407", "0.5634079", "0.5633682", "0.5623948", "0.5615599", "0.5612332", "0.5602663", "0.56007266", "0.5565171", "0.5559878", "0.5557713", "0.5553485", "0.5553236", "0.5552382", "0.5551339", "0.55502343", "0.5549522", "0.5540581", "0.5540323", "0.55238014", "0.552109", "0.5517955", "0.5516706", "0.5513503", "0.5508393", "0.5502393", "0.55018526", "0.54887545", "0.5486839", "0.54700965", "0.5469513", "0.54688466", "0.5468108", "0.54679483", "0.54644877", "0.5462596", "0.54553103", "0.545094", "0.5445751", "0.5445087", "0.54445666", "0.5442477", "0.5431607", "0.5429542", "0.54266626", "0.54249007", "0.5423324" ]
0.0
-1
Send message to email if confirmation user from 1C
public function confirmation1C(array $array) { $this->load->model('customer/customer'); $customerInfo = $this->model_customer_customer->getCustomer($array['customer_id']); if ($customerInfo) { $this->load->model('setting/store'); $storeInfo = $this->model_setting_store->getStore($customerInfo['store_id']); if ($storeInfo) { $storeName = html_entity_decode($storeInfo['name'], ENT_QUOTES, 'UTF-8'); $storeUrl = $storeInfo['url']; } else { $storeName = html_entity_decode( $this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8' ); $storeUrl = HTTP_CATALOG; } $this->load->model('localisation/language'); $languageInfo = $this->model_localisation_language->getLanguage($customerInfo['language_id']); if ($languageInfo) { $languageCode = $languageInfo['code']; } else { $languageCode = $this->config->get('config_language'); } $language = new Language($languageCode); $language->load($languageCode); $language->load('mail/customer_confirm'); $subject = sprintf($language->get('text_subject'), $storeName); $data['html'] = $this->getHtmlForEmail($language, $customerInfo['language_id'], $storeUrl); $data['text_welcome'] = sprintf($language->get('text_welcome'), $storeName); $data['text_thanks'] = $language->get('text_thanks'); $data['store'] = $storeName; $data['store_url'] = $storeUrl; $mail = new Mail($this->config->get('config_mail_engine')); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8'); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($customerInfo['email']); $mail->setFrom($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setSender($storeName); $mail->setSubject($subject); $mail->setHtml($this->load->view('mail/customer_confirm', $data)); $mail->send(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function sendConfirm()\n {\n $newPackage = \"\";\n $client = $this->clientEntity;\n $client->writeByte($newPackage, ClientEntity::HEAD_MAIL_SENT);\n $client->writeByte($newPackage, 1);\n $client->writeLong($newPackage, $this->messageEntity->time);\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n }", "private function sendConfirmationMail() {\n\t\t\t\t$subject = 'Confirmation Mail';\n\t\t\t\t$from = '[email protected]';\n\t\t\t\t$replyTo = '[email protected]';\n\t\t\t\t\n\t\t\t\t//include some fancy stuff here, token is md5 of email\n\t\t\t\t$message = \"<a href='http://www.momeen.com/eCommerce/register/confirmUser.php?token=$this->token'> Confirm</a>\";\n\n\t\t\t\t$headers = \"From: \".\"$from\".\"\\r\\n\";\n\t\t\t\t$headers .= \"Reply-To: \".\"$replyTo\".\"\\r\\n\";\n\t\t\t\t$headers .= \"MIME-Version:1.0\\r\\n\";\n\t\t\t\t$headers .= \"Content-Type:text/html; charset=ISO-8859-1\\r\\n\";\n\t\t\t\tif(!mail($this->email, $subject, $message, $headers)) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Confirmation mail did not sent. Contact admin';\n\t\t\t\t}\n\t\t\t}", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "public function sendConfirmEmail()\n {\n\t\t$emailSettings = craft()->email->getSettings();\n\n //create the template params\n $templateParams = $this->data;\n $templateParams['toEmail'] = $this->toEmail;\n\n //instantiate email model\n $email = new EmailModel();\n\n //populate with all the things\n //for testing\n $email->fromEmail = $emailSettings['emailAddress'];\n\t\t$email->toEmail = $this->template->notifyEmailToAddress;\n\t\t$email->subject = $this->template->confirmEmailSubject;\n\t\t$email->body = $this->template->confirmEmailBody;\n\n //send that goodness\n\t\treturn craft()->email->sendEmail($email, $templateParams);\n\n }", "public function action_confirm()\n {\n $hash = $this->request->param('hash');\n\n $model_auth = new Model_Auth();\n\n $id = $model_auth->getUserIdByHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n if (!$id) {\n $error_text = 'Ваш аккаунт уже подтвержден';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $model_auth->deleteHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n $user = new Model_User($id);\n\n if (!$user->id) {\n $error_text = 'Переданы некорректные данные';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $user->updateUser($user->id, ['isConfirmed' => 1]);\n\n $this->redirect('/user/' . $id . '?confirmed=1');\n }", "private function sendConfirmationEmail($email){\n $pdo = $this->pdo;\n $stmt = $pdo->prepare('SELECT confirm_code FROM users WHERE email = ? limit 1');\n $stmt->execute([$email]);\n $code = $stmt->fetch();\n\n $subject = 'Confirm your registration';\n $message = 'Please confirm you registration by pasting this code in the confirmation box: '.$code['confirm_code'];\n $headers = 'X-Mailer: PHP/' . phpversion();\n\n if(mail($email, $subject, $message, $headers)){\n return true;\n }else{\n return false;\n }\n }", "function emailconfirmation(){\n\t\t\trequire( dirname(__FILE__) . '/email-confirmation.php' );\n\t\t}", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\n }", "public function actionAccept($confirmation) {\n\n\t\tUser::confirmEmail($confirmation);\n\t}", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function executeConfirmEmail($request)\r\n {\r\n \t$this->forward404Unless($request->isMethod('get'));\r\n \t\r\n \t$email = EmailPeer::getFromField(EmailPeer::CONFIRM_CODE,$this->getRequestParameter('confirm_code'));\r\n \tif($email)\r\n \t{\r\n \t\tif($email->getIsPrimary() && !$email->getActualEmail())\r\n \t\t{\r\n \t\t\t// if invited, send acceptance email and add to quick contact\r\n \t\t\t$user = $email->getUser();\r\n \t\t\tif($user->getInvitedBy())\r\n \t\t\t{\r\n \t\t\t\t// add to bookmark\r\n \t\t\t\t$b = new Bookmark();\r\n \t\t\t\t$b->setUser($user->getUserRelatedByInvitedBy());\r\n \t\t\t\t$b->setTag($user->retrievePrimaryJotag());\r\n \t\t\t\t$b->save();\r\n \t\t\t\t\r\n \t\t\t\t// give credit to the inviter\r\n \t\t\t\t$credits = $user->getUserRelatedByInvitedBy()->giveCredit(OptionPeer::retrieveOption('BONUS_ACCEPT_CREDIT'));\r\n\t\t \tMailer::sendEmail($user->getUserRelatedByInvitedBy()->getPrimaryEmail(),'inviteAccepted',array('owner'=>$user->getUserRelatedByInvitedBy(),'user'=>$user,'email'=>$email,'credits'=>$credits),$user->getUserRelatedByInvitedBy()->getPreferedLanguage());\r\n \t\t\t}\r\n \t\t\t// activate primary jotag\r\n \t\t\t$jotag = $email->getUser()->retrievePrimaryJotag();\r\n \t\t\t$jotag->setStatus(TagPeer::ST_ACTIVE);\r\n \t\t\t$jotag->save();\r\n \t\t\t\r\n \t\t\t$this->setMessage('ACCOUNT_CONFIRM','SUCCESS');\r\n \t\t}\r\n \t\telse $this->setMessage('EMAIL_CONFIRM','SUCCESS');\r\n \t\t \r\n \t\t$email->setIsConfirmed(true);\r\n \t\t$email->setConfirmCode(null);\r\n \t\t$email->setActualEmail(null);\r\n \t\t$email->save();\r\n \t}\r\n \telse $this->setMessage('EMAIL_CONFIRM_ERROR','ERROR');\r\n\r\n \t$this->redirect('@homepage');\r\n }", "public function resendConfirmationMailAction()\n {\n // @todo find a better way to fetch the data\n $result = GeneralUtility::_GP('tx_femanager_pi1');\n if (is_array($result)) {\n if (GeneralUtility::validEmail($result['user']['email'])) {\n $user = $this->userRepository->findFirstByEmail($result['user']['email']);\n if (is_a($user, User::class)) {\n $this->sendCreateUserConfirmationMail($user);\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailSend'),\n '',\n AbstractMessage::INFO\n );\n $this->redirect('resendConfirmationDialogue');\n }\n }\n }\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailFail'),\n LocalizationUtility::translate('validationError'),\n AbstractMessage::ERROR\n );\n $this->redirect('resendConfirmationDialogue');\n }", "public function sendConfirmation()\n {\n $subject = _t(\n 'SilverShop\\ShopEmail.ConfirmationSubject',\n 'Order #{OrderNo} confirmation',\n '',\n ['OrderNo' => $this->order->Reference]\n );\n return $this->sendEmail(\n 'SilverShop/Model/Order_ConfirmationEmail',\n $subject,\n self::config()->bcc_confirmation_to_admin\n );\n }", "public function confirmEmail()\n {\n $this->mail_confirmed = Carbon::now();\n $this->mail_token = null;\n $this->save();\n }", "function qconfirm(&$irc, &$data)\n {\n\t\t\tglobal $pickupchannel;\n if($data->message == \"Remember: NO-ONE from QuakeNet will ever ask for your password. NEVER send your password to ANYONE except [email protected].\")\n {\n echo \"\\n\\n\\n\\nSHIIIT\\n\\n\\n\\n\";\n $irc->join($pickupchannel);\n }\n }", "function sendEmailConfirmation($db, $email, $first_name) {\n\n\t# generate a unique confirmation code\n $confirmation_code = md5(uniqid(rand()));\n\n\t$db->bindMore(array(\"email\" => $email, \"confirmation_code\" => $confirmation_code));\n\t$insert = $db->query(\"INSERT INTO mtc_email_confirm (email, confirmation_code) VALUES (:email, :confirmation_code)\");\n\n\tif ($insert > 0) {\n\n\t\trequire \"../private/Email.class.php\";\n\n\t\t# send welcome email\n\t\t$welcomeEmail = new email();\n\t\treturn $welcomeEmail->sendWelcomeEmail($first_name, $email, $confirmation_code);\n\n\t}\n\n\treturn false;\n\n}", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "function booking_approve_cancellation_email($useremail) {\n\t\t\t//to customer\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear Customer,<br>\";\n\t\t\t\t$message .= \"Your booking has been cancelled.<br>\";\n\t\t\t\t$message .= \"Thanks For using our service.\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($useremail);\n\t\t\t\t$this->email->subject('Your Booking Cancellation has been Processed.');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function sendConfirmation( ){\n\t\t$data = Request::only(['email']);\n\t\t$email = $data['email'];\n\t\t$token = str_random(30);\n\t\t$domain = substr(strrchr($email, \"@\"), 1);\n\n\t\tif( in_array( $domain, explode( ',', env('ACCEPTABLE_EMAIL_DOMAINS') ) ) ){\n\t\t\ttry {\n\t\t\t\t// Check if student exists already\n\t\t\t\tUser::where('email', $email)->firstOrFail();\n\n\t\t\t} catch (ModelNotFoundException $e) {\n\t\t\t\t// Send email verification if they are\n\t\t\t\tMail::send('emails.verification_code', ['email' => $email, 'confirmation_code' => $token], function ($m) use($email) {\n\t\t $m->from('admin@'.env('USER_DOMAIN'), env('SITE_TITLE') );\n\n\t\t $m->to($email)->subject('Verify Your Email For '.env('SITE_TITLE'));\n\t\t });\n\n\t\t VerificationCode::create([\n\t\t \t'email' => $email,\n\t\t \t'confirmation_code' => $token\n\t\t ]);\n\n\t\t return View::make('emails.thank_you');\n\t\t\t}\n\t\t} else{\n\t\t\treturn Redirect::back()->withErrors(['That email is not on our approved list of student emails']);\n\t\t}\n\t}", "public function confirmEmail()\n {\n $this->email_confirmation_token = null;\n $this->is_email_verified = 1;\n return $this->save();\n }", "function userConfirmation($data){\n\t\t$requiredData['action'] = $this->getPassword(@trim($data->action));\n\t\t$user_name_id = explode(\"#/#\",$requiredData['action']);\n\t\t$rec = $this->query(\"UPDATE `users` SET `status`=1 where `user_name` = '\".@$user_name_id[0].\"' AND `id`= \".@$user_name_id[1]);\n\t\tif($rec){\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=1\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\n\t\t}else{\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=0\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\t\t\n\t\t}\n\t}", "public function sendConfirmationEmailMessage(UserInterface $user): void;", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "function confirm($username) {\r\n $user = $this->userRepository->findByUser($username);\r\n //send user reset mail\r\n $to = $user->getEmail();\r\n $subject = \"Health Forum: Password reset\";\r\n $temp_pass = $this->createRandomPass();\r\n $msg = wordwrap(\"Hi there,\\nThis email was sent using PHP's mail function.\\nYour new password is: \".$temp_pass);\r\n $from = \"From: [email protected]\";\r\n $mail = mail($to, $subject, $msg, $from);\r\n\r\n if ($mail) {\r\n $this->app->flash('success', 'Thank you! The password was sent to your email');\r\n } else {\r\n $this->app->flash('failed', 'Error: your email was not sent!');\r\n }\r\n\r\n $this->app->redirect('/login');\r\n }", "private function sendUserConfirmEmail(User $user)\n {\n $this->mailer->confirm_account($user);\n }", "private function sendActivationEmail($data) {\n\t$template_name = 'signup-confirmation';\n\t$template_content = array();\n\t$message = array(\n\t\t'subject' => 'Welcome! Please confirm your email address.',\n\t\t'from_email' => '[email protected]',\n\t\t'from_name' => 'Chefmes',\n\t\t'to' => array(\n\t\t\tarray(\n\t\t\t\t'email' => $data['email'],\n\t\t\t\t'name' => $data['fullname']\n\t\t\t)\n\t\t),\n\t\t'merge_language' => 'mailchimp',\n\t\t'merge_vars' => array(\n\t\t\tarray(\n\t\t\t\t'rcpt' => $data['email'],\n\t\t\t\t'vars' => array(\n\t\t\t\t\t[ 'name' => 'email', 'content' => $data['email']],\n\t\t\t\t\t[ 'name' => 'firstname', 'content' => $data['firstname']],\n\t\t\t\t\t[ 'name' => 'confirmlink', 'content' => $data['confirmlink']]\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\t\\Email::messages()->sendTemplate($template_name, $template_content, $message);\n\t//print_r($result);\n }", "public function confirmMail($emailadd, $confirmationCode)\n {\n $message = \\Swift_Message::newInstance()\n ->setSubject('Welcome to CloudPod - A Virtual Learning Environment')\n ->setFrom('[email protected]')\n ->setTo($emailadd)\n ->setBody('Click on this link to activate your account <strong>http://localhost/CloudPod/web/app_dev.php/confirmation/'.$confirmationCode.'</strong>', 'text/html');;\n //->addPart('Click on this link to activate your account http://localhost/CloudPod/web/app_dev.php/confirmation/'.$confirmationCode,'text/plain');;\n $this->get('mailer')->send($message);\n\n return new Response('Congratulations! Pls. confirm your email. And start using CLOUDPOD!');\n }", "public function EmailConfirm($code, $id){\n\t\t$restaurantGroup= Sentry::findGroupById(6);\n\t\t$activeUser\t\t= Sentry::findUserById($id);\n\n\t\t// $now\t\t\t= time();\n\t\t// need to create time limition\n\t\tif($activeUser->attemptActivation($code)){\n\t\t\t//activation is success\n\t\t\tLog::info('active the user : '.$id);\n\t\t\tif($activeUser->addGroup($restaurantGroup)){\n\t\t\t\tLog::info('add the user into the restaurant id : '.$id);\n\t\t\t\t$user = Sentry::login($activeUser, false);\n\t\t\t\tLog::info('success to login to the Food Order');\n\t\t\t\treturn Redirect::route('r.description.create');\n\t\t\t}else{\n\t\t\t\tLog::info('fail to add the user into the restaurant');\n\t\t\t}\n\t\t}else{\n\t\t\t//activation is fail\n\t\t\tLog::info('fail to active the user : '.$id);\n\t\t\treturn Response::view('fail to active the user', array(), 404);\n\t\t}\n\t}", "public function emailShouldBeSentToWithConfirmationCode($email)\n {\n $inbox = $this->fetchInbox();\n PHPUnit::assertCount(1, $inbox);\n\n $message = $inbox[0];\n PHPUnit::assertEquals($email, $message['to_email']);\n\n $user = User::whereEmail($email)->firstOrFail();\n PHPUnit::assertContains($user->getConfirmationCode(), $message['html_body']);\n\n // clear the inbox after we're done.\n $this->emptyInbox();\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "private function _sendConfirmationEmail($email_to, $name_to, $confirmation_code){\n\t\t$mailer = new Bel_Mailer();\n\t\t$mailer->addTo ( $email_to );\n\t\t$mailer->setSubject('Reactivate your account');\n\t\t$this->view->assign('code',$confirmation_code);\n\t\t$this->view->assign('name',$name_to);\n\t\t$mailer->setBodyHtml ( $this->view->fetch('usermanagement/profile/confirmation_email.tpl') );\n\t\t$mailer->send ();\n\t}", "public static function resendConfirmation($id)\n {\n $user = self::find($id);\n\n Mail::send('emails.accounts-verify', ['confirmation_code' => $user->confirmation_code], function ($m) use ($user) {\n $m->from(config('mail.from.address'), config('app.name'));\n $m->to($user->email, $user->name)->subject(__('Verify your email address'));\n });\n }", "function customer_email_confirmation_notification($send_data)\n {\n $to_email_address = $send_data['sender_email'];\n $subject = $send_data['subject'];\n $message = $send_data['message'];\n $data['msg'] = $message;\n $mess = $this->load->view('mailer/email_template', $data, true);\n $result_dfee = $this->common_model->sendEmails($to_email_address, $subject, $mess);\n\n if ($result_dfee) {\n return true;\n } else {\n return false;\n }\n }", "function pre_confirmation_check() {\r\n return true;\r\n }", "protected function confirmEmailToken( $code ) {\n\t\tglobal $wgConfirmAccountContact, $wgPasswordSender;\n\n\t\t$reqUser = $this->getUser();\n\t\t$out = $this->getOutput();\n\t\t# Confirm if this token is in the pending requests\n\t\t$name = ConfirmAccount::requestNameFromEmailToken( $code );\n\t\tif ( $name !== false ) {\n\t\t\t# Send confirmation email to prospective user\n\t\t\tConfirmAccount::confirmEmail( $name );\n\n\t\t\t$adminsNotify = ConfirmAccount::getAdminsToNotify();\n\t\t\t# Send an email to admin after email has been confirmed\n\t\t\tif ( $adminsNotify->count() || $wgConfirmAccountContact != '' ) {\n\t\t\t\t$title = SpecialPage::getTitleFor( 'ConfirmAccounts' );\n\t\t\t\t$subject = $this->msg(\n\t\t\t\t\t'requestaccount-email-subj-admin' )->inContentLanguage()->escaped();\n\t\t\t\t$body = $this->msg(\n\t\t\t\t\t'requestaccount-email-body-admin', $name )->params(\n\t\t\t\t\t\t$title->getCanonicalURL() )->inContentLanguage()->text();\n\t\t\t\t# Actually send the email...\n\t\t\t\tif ( $wgConfirmAccountContact != '' ) {\n\t\t\t\t\t$source = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->text() );\n\t\t\t\t\t$target = new MailAddress( $wgConfirmAccountContact );\n\t\t\t\t\t$result = UserMailer::send( $target, $source, $subject, $body );\n\t\t\t\t\tif ( !$result->isOK() ) {\n\t\t\t\t\t\twfDebug( \"Could not sent email to admin at $target\\n\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t# Send an email to all users with \"confirmaccount-notify\" rights\n\t\t\t\tforeach ( $adminsNotify as $adminNotify ) {\n\t\t\t\t\tif ( $adminNotify->canReceiveEmail() ) {\n\t\t\t\t\t\t$adminNotify->sendMail( $subject, $body );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out->addWikiMsg( 'requestaccount-econf' );\n\t\t\t$out->returnToMain();\n\t\t} else {\n\t\t\t# Maybe the user confirmed after account was created...\n\t\t\t$user = User::newFromConfirmationCode( $code, User::READ_LATEST );\n\t\t\tif ( is_object( $user ) ) {\n\t\t\t\t$user->confirmEmail();\n\t\t\t\t$user->saveSettings();\n\t\t\t\t$message = $reqUser->isLoggedIn()\n\t\t\t\t\t? 'confirmemail_loggedin'\n\t\t\t\t\t: 'confirmemail_success';\n\t\t\t\t$out->addWikiMsg( $message );\n\t\t\t\tif ( !$reqUser->isLoggedIn() ) {\n\t\t\t\t\t$title = SpecialPage::getTitleFor( 'Userlogin' );\n\t\t\t\t\t$out->returnToMain( true, $title );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$out->addWikiMsg( 'confirmemail_invalid' );\n\t\t\t}\n\t\t}\n\t}", "public function sendEmailVerificationNotification();", "private function sendConfirmationEmail($entry)\n {\n Mail::send(\n 'emails.confirmation',\n array('entry' => $entry),\n function($message) use($entry) {\n $message\n ->to($entry->email, $entry->fullName())\n ->subject('RWC 2015 Competition Entry Confirmation');\n });\n }", "public function sendConfirmationAction($id) {\n $this->buildAssets();\n \n $user = Users::findFirstById($id);\n if (!$user) {\n $this->flash->error(\"User was not found\");\n return $this->dispatcher->forward(array(\n 'action' => 'index'\n ));\n }\n $user->mustChangePassword = 'Y';\n $user->save();\n\n if ($this->id->sendConfirmationEmail($user))\n {\n $this->flash->success(\"Confirm email sent\");\n }\n }", "private function sendConfirmationEmail(\\User $user, $confirmationCode, $newDn){\n $portal_url = \\Factory::getConfigService()->GetPortalURL();\n //echo $portal_url;\n //die();\n\n $link = $portal_url.\"/index.php?Page_Type=User_Validate_DN_Change&c=\".$confirmationCode;\n $subject = \"Validation of changes on your GOCDB account\";\n $body = \"Dear GOCDB User,\\n\\n\"\n .\"A request to retrieve and associate your GOCDB account and privileges with a \"\n . \"new account ID has just been made on GOCDB (e.g. you have a new certificate with a different DN).\"\n .\"\\n\\nThe new account ID is: $newDn\"\n .\"\\n\\nIf you wish to associate your GOCDB account with this account ID, please validate your request by clicking on the link below:\\n\"\n .\"$link\".\n \"\\n\\nIf you did not create this request in GOCDB, please immediately contact [email protected]\" ;\n ;\n //If \"sendmail_from\" is set in php.ini, use second line ($headers = '';):\n //$headers = \"From: [email protected]\";\n $headers = \"From: [email protected]\";\n //$headers = \"\";\n\n //mail command returns boolean. False if message not accepted for delivery.\n if (!mail($user->getEmail(), $subject, $body, $headers)){\n throw new \\Exception(\"Unable to send email message\");\n }\n\n //echo $body;\n }", "public function confirmOrder()\n {\n $order = Order::query()->findOrFail(request()->input('order'));\n\n if ($order->orderStatus->slug !== OrderStatus::PROCESSED) {\n return redirect()->back();\n }\n\n $order->delivery_tracking = request()->input('delivery_tracking');\n\n $order->setStatusSent();\n\n $order->save();\n\n $order->user->notify(new OrderSent($order));\n\n return redirect(backpack_url('order?status=2')) //http://lucilevilaine.local/admin/order?status=2\n ->with('success', 'La commande a bien été confirmé');\n }", "private function acceptConfirmation()\n {\n ChannelRepository::removeChannelsOfAuserByName(Chat::lastAskedQuestion()->answer,Chat::getCallBackQuery()->getFrom()->getId());\n Chat::$bot->editMessageText([\n 'text' => 'Your Channel Is Removed',\n 'inline_message_id' => Chat::getCallBackQuery()->getInlineMessageId()\n ]);\n Chat::deleteTemporaryData();\n Pages::channelOwnerPage();\n }", "public function actionConfirm(){\n if($this->confirm('Yakin loe..??'))\n echo \"Ok deh kaka..\";\n else\n echo \"Ga yakin diee..:p\";\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }", "public function sendConfirmationEmail($user, $user_email = false)\n {\n // $email = $this->Cu->sendResetEmail($url, $user_email->toArray());\n return true;\n }", "function confirmEmail($hashcode){\n if($this->setting_model->verifyEmail($hashcode)){\n $this->session->set_flashdata('msg', '<div class=\"alert alert-success text-center\">Email address is confirmed. Please login to the system</div>');\n redirect('login');\n }else{\n $this->session->set_flashdata('msg', '<div class=\"alert alert-danger text-center\">Email address is not confirmed. Please contact Londontec City Campus Admin.</div>');\n redirect('login');\n }\n\t}", "function webform_confirm_email_confirmation_email_add($form, &$form_state) {\n\n if (_webform_confirm_email_verify_email_setup($form['#node']->nid) == FALSE) {\n drupal_set_message(t('Adding a confirmation email without having at least one confirmation request email leads to unwanted behavior. Please create a confirmation request email first.'), 'error');\n\n return FALSE;\n }\n\n $form_state['redirect'] = array(\n 'node/' . $form['#node']->nid . '/webform/confirmation/new',\n );\n}", "public function confirm() {\n\t\t\t\n\t\t\t$this->status = 'confirmed';\n\t\t\t$this->save();\n\t\t}", "public function resendmailAction() {\n \n $modelPlugin = $this->modelplugin();\n $mailplugin = $this->mailplugin();\n $phpprenevt = $this->phpinjectionpreventplugin(); \n $jsonArray = $modelPlugin->jsondynamic();\n $userid = $this->sessionid;\n $dynamicPath = $protocol . $jsonArray['domain']['domain_name'];\n $from = $jsonArray['sendgridaccount']['addfrom'];\n\n $encryptedPassword = base64_encode(\"#$#\" . base64_encode(base64_encode($userid . rand(10, 100)) . \"###\" . base64_encode($userid) . \"###\" . base64_encode($userid . rand(10, 100)) . \"###\" . base64_encode(base64_encode($userid . rand(10, 100)))) . \"#$#\");\n $buttonclick = $dynamicPath . \"/Gallery/galleryview/\" . $encryptedPassword;\n $mail_link = \"<a href='\" . $buttonclick . \"' style='background-color: #04ad6a; border: medium none; border-radius: 19px; padding: 12px; color: #fff; text-align: center; text-decoration: none; text-transform: uppercase;'>Click here</a>\";\n\n if (empty($userid)) {\n $userid = $phpprenevt->stringReplace($_POST['loginId']);\n }\n $publisheridarray = array('publisherId' => $userid);\n $selectid = $modelPlugin->getpublisherTable()->selectEmail($publisheridarray);\n $mail = $selectid[0]['email'];\n $keyArray = array('mailCatagory' => 'R_MAIL');\n $getMailStructure = $modelPlugin->getconfirmMailTable()->fetchall($keyArray);\n $getmailbodyFromTable = $getMailStructure[0]['mailTemplate'];\n\n $activationLinkreplace = str_replace(\"|ACTIVATIONLINK|\", $mail_link, $getmailbodyFromTable);\n $mailBody = str_replace(\"|DYNAMICPATH|\", $dynamicPath, $activationLinkreplace);\n $subject = \"Confirm your email address\";\n $mailfunction = $mailplugin->confirmationmail($mail, $from, $subject, $mailBody);\n $res['response'] = 1;\n echo json_encode($res);\n exit;\n }", "function SendUserConfirmationEmail()\r\n{\r\n $mailer = new PHPMailer();\r\n $mailer->CharSet = 'utf-8';\r\n $mailer->AddAddress($_POST['email'],$_POST['name']);\r\n $mailer->Subject = \"Your registration with YOURSITE.COM\"; //example subject\r\n $mailer->From = \"[email protected]\";\r\n $mailer->Body =\"Hello $_POST[name], \\r\\n\\r\\n\".\r\n \"Thanks for your registration with YOURSITE.COM \\r\\n\".\r\n \"\\r\\n\".\r\n \"Regards,\\r\\n\".\r\n \"Webmaster\\r\\n\";\r\n\t\r\n if(!$mailer->Send())\r\n {\r\n $this->HandleError(\"Failed sending registration confirmation email.\");\r\n return false;\r\n }\r\n return true;\r\n}", "public function confirmEmail($token){\n $user = User::find(Auth::user() -> id);\n if($user->payment_status == 0){\n return redirect()->route('register.payment');\n }else if($user->payment_status == 1){\n return redirect()->route('payment.verify');\n }else{\n $data = User::where('remember_token', $token) -> get() -> first();\n if($data->mail_activation_status === 'pending'){\n $data->mail_activation_status = 'active';\n $data->email_verified_at = Carbon::now();\n $data->update();\n return view('active', [\n 'status' => 'success'\n ]);\n }else{\n return view('active', [\n 'status' => 'error'\n ]);\n }\n }\n\n }", "function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')\n{\n\tglobal $user, $template, $db;\n\tglobal $phpEx, $phpbb_root_path;\n\n\tif (isset($_POST['cancel']))\n\t{\n\t\treturn false;\n\t}\n\n\t$confirm = false;\n\tif (isset($_POST['confirm']))\n\t{\n\t\t// language frontier\n\t\tif ($_POST['confirm'] === $user->lang['YES'])\n\t\t{\n\t\t\t$confirm = true;\n\t\t}\n\t}\n\n\tif ($check && $confirm)\n\t{\n\t\t$user_id = request_var('confirm_uid', 0);\n\t\t$session_id = request_var('sess', '');\n\t\t$confirm_key = request_var('confirm_key', '');\n\n\t\tif ($user_id != $user->data['user_id'] || $session_id != $user->session_id || !$confirm_key || !$user->data['user_last_confirm_key'] || $confirm_key != $user->data['user_last_confirm_key'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Reset user_last_confirm_key\n\t\t$sql = 'UPDATE ' . USERS_TABLE . \" SET user_last_confirm_key = ''\n\t\t\tWHERE user_id = \" . $user->data['user_id'];\n\t\t$db->sql_query($sql);\n\n\t\treturn true;\n\t}\n\telse if ($check)\n\t{\n\t\treturn false;\n\t}\n\n\t$s_hidden_fields = build_hidden_fields(array(\n\t\t'confirm_uid'\t=> $user->data['user_id'],\n\t\t'sess'\t\t\t=> $user->session_id,\n\t\t'sid'\t\t\t=> $user->session_id,\n\t));\n\n\t// generate activation key\n\t$confirm_key = gen_rand_string(10);\n\n\tif (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])\n\t{\n\t\tadm_page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);\n\t}\n\telse\n\t{\n\t\tpage_header(((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]), false);\n\t}\n\n\t$template->set_filenames(array(\n\t\t'body' => $html_body)\n\t);\n\n\t// If activation key already exist, we better do not re-use the key (something very strange is going on...)\n\tif (request_var('confirm_key', ''))\n\t{\n\t\t// This should not occur, therefore we cancel the operation to safe the user\n\t\treturn false;\n\t}\n\n\t// re-add sid / transform & to &amp; for user->page (user->page is always using &)\n\t$use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&amp;', $user->page['page']);\n\t$u_action = reapply_sid($use_page);\n\t$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&amp;') . 'confirm_key=' . $confirm_key;\n\n\t$template->assign_vars(array(\n\t\t'MESSAGE_TITLE'\t\t=> (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],\n\t\t'MESSAGE_TEXT'\t\t=> (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],\n\n\t\t'YES_VALUE'\t\t\t=> $user->lang['YES'],\n\t\t'S_CONFIRM_ACTION'\t=> $u_action,\n\t\t'S_HIDDEN_FIELDS'\t=> $hidden . $s_hidden_fields)\n\t);\n\n\t$sql = 'UPDATE ' . USERS_TABLE . \" SET user_last_confirm_key = '\" . $db->sql_escape($confirm_key) . \"'\n\t\tWHERE user_id = \" . $user->data['user_id'];\n\t$db->sql_query($sql);\n\n\tif (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])\n\t{\n\t\tadm_page_footer();\n\t}\n\telse\n\t{\n\t\tpage_footer();\n\t}\n}", "private function userMustConfirm($user)\n {\n\n $confirmation_code = $this->getConfirmCode();\n if ($user) {\n $user->confirmation_code = $confirmation_code;\n $user->save();\n return $this->sendUserConfirmEmail($user);\n }\n }", "public function confirm()\n {\n $this->confirmed = true;\n $this->confirmation_token = null;\n\n $this->save();\n }", "function send_confirmation_mail(UsersEntity $user) {\n $content = $this->view->send_confirmation_mail($user);\n return $this->MailAPI->send_mail($user->email, $content['subject'], $content['body']);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "function user_confirm() {\n // I'm not passing in any values or declaring globals\n global $supersecret_hash_padding;\n\n // Verify that they didn't tamper with the email address\n $new_hash = md5($_GET['email'].$supersecret_hash_padding);\n if ($new_hash && ($new_hash == $_GET['hash'])) {\n $query = \"SELECT user_name\n FROM user\n WHERE confirm_hash = '$new_hash'\";\n $result = mysql_query($query);\n if (!$result || mysql_num_rows($result) < 1) {\n $feedback = 'ERROR - Hash not found';\n return $feedback;\n } else {\n // Confirm the email and set account to active\n $email = $_GET['email'];\n $hash = $_GET['hash'];\n $query = \"UPDATE user SET email='$email', is_confirmed=1 WHERE confirm_hash='$hash'\";\n $result = mysql_query($query);\n return 1;\n }\n } else {\n $feedback = 'ERROR - Values do not match';\n return $feedback;\n }\n}", "function upd_userconfirm($DBcon, $mail, $guid)\n {\n //create guid for user confirm\n require_once(C_P_CLASES.'utils/string.functions.php');\n $STR = new STRFN();\n\n $query = \"UPDATE \".$this->tableName.\" SET \".$this->arrDataNames['data4'].\" = '1' \n WHERE \".$this->arrDataNames['data1'].\" = '\".$mail.\"' \n AND \".$this->arrDataNames['data7'].\" = '\".$guid.\"'\n\t\t\t\t\t\";\n\n $stmt = $DBcon->prepare($query);\n $stmt->execute();\n\n // check for successfull registration\n if ( $stmt->execute() ) {\n $response['status'] = 'success';\n $response['message'] = $STR->setMsgStyle('&nbsp; Registro exitoso, Gracias! favor de iniciar sesion:');\n } else {\n $response['status'] = 'error'; // could not register\n $response['message'] = $STR->setMsgStyle('&nbsp; No se pudo registrar, favor de registrarse: <br/>http://www.jadecapitalflow.com/', 3);\n }\n\n return $response;\n }", "function webform_confirm_email_email_delete($form, &$form_state) {\n\n $eid = $form_state['triggering_element']['#eid'];\n\n if ($form_state['triggering_element']['#email_type_form'] == 'confirmation_request') {\n if (_webform_confirm_email_verify_email_setup( $form['#node']->nid, 'delete_confirmation_request_email', $eid) == FALSE) {\n drupal_set_message(t('Deleting the only confirmation request email but still having some confirmation email(s) leads to unwanted behavior. Please delete all confirmation email(s) first.'), 'error');\n form_error($form['confirmation_request'][$eid]);\n\n return FALSE;\n }\n }\n\n $form_state['redirect'] = array(\n 'node/' . $form['#node']->nid . '/webform/' . $form_state['triggering_element']['#email_type_form'] . '/' . $eid . '/delete',\n );\n}", "function confirmation() {\n\t\n\n\n}", "function svbk_rcp_email_on_activation( $status, $user_id ) {\n\n\tif( 'active' == $status && get_user_meta( $user_id, '_rcp_new_subscription', true ) ) {\n\n\t\t// Send welcome email.\n\t\tif ( ! svbk_rcp_email_subscription_status( $user_id, 'active' ) ) {\n\t\t\tremove_action( 'rcp_set_status', 'rcp_email_on_activation', 11, 2 );\n\t\t}\n\n\t}\n\n}", "private function sendSubmissionConfirmationEmail() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted successfully', $this->trackingFormId);\r\n $emailBody = sprintf('Your tracking form was submitted successfully. It has been assigned a Tracking ID of %s.\r\n\r\nApprovals may still be required from your Dean, Ethics, and the Office of Research Services depending on the details provided. To see details of these approvals, you can login to the MRU research website and go to My Tracking Forms.\r\n\r\nIf you have any question, then please contact MRU\\'s Grants Facilitator, Jerri-Lynne Cameron at 403-440-5081 or [email protected].\r\n\r\nRegards,\r\nOffice of Research Services\r\n\r\n', $this->trackingFormId);\r\n\r\n $confirmationEmail = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $confirmationEmail->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send confirmation notification to researcher : '. $e);\r\n }\r\n }", "public function subscription_confirm()\n {\n $model = & $this->getModel('jms');\n $model->subscriptionConfirm();\n\n\n // $this->setRedirect('index.php?option=com_jms&task=jms.subscription_confirm&payment_method=iwl_paypal');\n }", "public function sendConfirmationEmail(User $user)\n {\n if (config('access.users.requires_approval')) {\n return redirect()->back()->withFlashDanger(__('alerts.backend.users.cant_resend_confirmation'));\n }\n\n if ($user->isConfirmed()) {\n return redirect()->back()->withFlashSuccess(__('exceptions.backend.access.users.already_confirmed'));\n }\n\n $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n\n return redirect()->back()->withFlashSuccess(__('alerts.backend.users.confirmation_email'));\n }", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "public function postConfirm(ConfirmRequest $request, User $user_m)\n\t{\n\t\t$user = $user_m->whereEmail($request->email)->firstOrFail();\n\t\t$user->confirmation_code = str_random(30);\n\t\t$user->save();\n\t\t$this->dispatch(new SendMail($user));\n\t\t\n\t\treturn redirect('/auth/login')->with('status', trans('front/verify.resend'));\n\t\t\n\t}", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "function pre_confirmation_check() {\r\n return false;\r\n }", "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "public function sendGoodbyeMail()\n {\n $user = Auth::user();\n\n $this->mailer->send('user.goodbye', compact('user'), function (Message $message) use($user) {\n $message\n ->to($user->email)\n ->subject('Sorry to see you leave...');\n });\n }", "public function actionEmailverification() {\n if (Yii::$app->request->get('id') && Yii::$app->request->get('key')) {\n\n $access_token = Yii::$app->request->get('id');\n $key = Yii::$app->request->get('key');\n\n $customers = \\app\\models\\Customers::find()\n ->leftjoin('user_token', 'user_token.user_id=users.id')\n ->where(['access_token' => $access_token])\n ->andWhere(['token' => $key])\n ->one();\n\n\n if (count($customers)) {\n\n $customers->profile_status = 'ACTIVE';\n $customers->save();\n $user_token = \\app\\models\\UserToken::find()\n ->where(['token' => $key])\n ->andWhere(['user_id' => $customers->id])\n ->one();\n $user_token->delete();\n Yii::$app->session->setFlash('success', 'Your account verified successfully.');\n \\app\\components\\EmailHelper::welcomeEmail($customers->id);\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt1.');\n }\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt2.');\n }\n return $this->render('emailverification');\n }", "function verifyEmail($action = ''){\n\t\t//$url = ROOT_URI_UI.'validUser.php?k='.$this->secretKey($this->username).'&e='.$this->username;\n\n\t\t$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?k='.$this->secretKey($this->username).'&e='.$this->username;\n\t\t\n\t\tif('recover' == $action){\n\t\t\t$msg = DICO_WORD_PASSWORD_RESTORE;\n\t\t}else{\n\t\t\t$msg = DICO_WORD_CONFIRM_EMAIL;\n\t\t}\n\t\t\n\t\t$body_message = DICO_MAIL_VALID_HEAD.'<br>'\n\t\t\t\t\t\t.'<a href=\"'.$url.'\">'.$msg.'</a><br><br>'\n\t\t\t\t\t\t.$url.'<br>'\n\t\t\t\t\t\t.DICO_MAIL_VALID_FOOT;\n\n\t\t\n\t\treturn send_mail(ROOT_EMAIL, $this->username, '', ROOT_EMAIL_NAME.' '.DICO_WORD_AUTH,$body_message);\n\t}", "public function enviarEmailBienvenida(){\n\t\t$params ['url'] = Yii::$app->urlManager->createAbsoluteUrl ( [ \n\t\t\t'ingresar/' . $this->txt_token \n\t\t] );\n\t\t$params ['user'] = $this->nombreCompleto;\n\t\t$params ['usuario'] = $this->txt_email;\n\t\t$params ['password'] = $this->password;\n\t\t\n\t\t\n\t\t\t$email = new Email();\n\t\t\t$email->emailHtml = \"@app/modules/ModUsuarios/email/bienvenida\";\n\t\t\t$email->emailText = \"@app/modules/ModUsuarios/email/layouts/text\";\n\t\t\t$email->to = $this->txt_email;\n\t\t\t$email->subject = \"Bienvenido\";\n\t\t\t$email->params =$params ;\n\t\t\t\n\t\t\t// Envio de correo electronico\n\t\t\t$email->sendEmail();\n\t\t\treturn true;\n\t\t\n\n\t}", "protected function sendActivationEmail($user) {\n return true;\n }", "public function accept()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee about the accept\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/accept', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has accepted');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified about the acceptance.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "public function resend()\n {\n if (!$this->validate()) {\n return false;\n }\n\n $user = $this->finder->findUserByEmail($this->email);\n\n if ($user instanceof User && !$user->isConfirmed) {\n /** @var Token $token */\n $token = \\Yii::createObject([\n 'class' => Token::className(),\n 'user_id' => $user->id,\n 'type' => Token::TYPE_CONFIRMATION,\n ]);\n $token->save(false);\n $this->mailer->sendConfirmationMessage($user, $token);\n }\n\n \\Yii::$app->session->setFlash(\n 'info',\n \\Yii::t(\n 'user',\n 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.'\n )\n );\n\n return true;\n }", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "public function confirmTask()\n\t{\n\t\t// Incoming, some versions of the code used 'code' some use 'confirm'\n\t\t$code = Request::getString('confirm', false);\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = Request::getString('code', false);\n\t\t}\n\n\t\t// Get the return value if it was requested\n\t\t$return = Request::getString('return', false);\n\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t// See if they've provided an email address as well\n\t\t\t// perhaps we can log them in with that and their token\n\t\t\t$email = Request::getString('email', false);\n\n\t\t\tif ($email != false && Plugin::isEnabled('authentication', 'emailtoken'))\n\t\t\t{\n\t\t\t\t// An email was provided\n\t\t\t\t// Get the Users controller\n\t\t\t\trequire_once Component::path('com_login') . '/site/controllers/auth.php';\n\t\t\t\t$authController = new \\Components\\Login\\Site\\Controllers\\Auth();\n\n\t\t\t\t// Return back here while resetting the return to here\n\t\t\t\t$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code . '&return=' . $return, false, true));\n\n\t\t\t\t// Set up a request to send to the login method\n\t\t\t\tRequest::setVar('return', $return);\n\t\t\t\tRequest::setVar('authenticator', 'emailtoken');\n\t\t\t\tRequest::setVar('email', $email);\n\t\t\t\tRequest::setVar('task', 'login');\n\t\t\t\tRequest::setVar('option', 'com_login');\n\n\t\t\t\t$authController->login();\n\t\t\t\t// $authController->login() always redirects, should never make it here\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Didn't provide enough information, warn about it\n\t\t\t\t// and let them log in to confirm their email address\n\t\t\t\t$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code . '&return=' . $return, false, true));\n\t\t\t\tApp::redirect(\n\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . $return, false),\n\t\t\t\t\tLang::txt('Please login in to confirm your email address.'),\n\t\t\t\t\t'warning'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Grab the authenticator cookie, the user is logged in\n\t\t// Continue confirming the email address\n\t\t$cookie = \\Hubzero\\Utility\\Cookie::eat('authenticator');\n\n\t\t// @FIXME The session is overriding the activation code\n\t\t$xprofile = User::oneByActivationToken(-$code);\n\t\t$user = User::getInstance();\n\n\t\tif ($xprofile->get('id') != $user->get('id'))\n\t\t{\n\t\t\t// Redirect to member dashboard if email is already confirmed\n\t\t\tif ($xprofile->get('id') === 0) {\n\t\t\t\tApp::redirect(\"/members/myaccount\", \"Email is already confirmed. No need to do it again!\", \"warning\");\n\t\t\t}\n\n\t\t\t// Profile and logged in user does not match\n\t\t\t$this->setError('login mismatch');\n\n\t\t\t// Build logout/login/confirm redirect flow\n\t\t\t$login_return = base64_encode(Route::url('index.php?option=' . $this->option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code));\n\t\t\t$logout_return = base64_encode(Route::url('index.php?option=com_users&view=login&return=' . $login_return));\n\n\t\t\t$redirect = Route::url('index.php?option=com_users&view=login&task=logout&return=' . $logout_return);\n\t\t}\n\n\n\t\t$email_confirmed = $xprofile->get('activation');\n\n\t\tif ($email_confirmed == 1 || $email_confirmed == 3)\n\t\t{\n\t\t\t// The current user is confirmed - check to see if the incoming code is valid at all\n\t\t\tif (\\Components\\Members\\Helpers\\Utility::isActiveCode($code))\n\t\t\t{\n\t\t\t\t$this->setError('login mismatch');\n\n\t\t\t\t// Build logout/login/confirm redirect flow\n\t\t\t\t$login_return = base64_encode(Route::url('index.php?option=' . $this->option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code));\n\t\t\t\t$logout_return = base64_encode(Route::url('index.php?option=com_users&view=login&return=' . $login_return));\n\n\t\t\t\t$redirect = Route::url('index.php?option=com_users&view=login&task=logout&return=' . $logout_return);\n\t\t\t}\n\t\t}\n\t\telseif ($email_confirmed < 0 && $email_confirmed == -$code)\n\t\t{\n\t\t\t//var to hold return path\n\t\t\t$return = '';\n\n\t\t\t// get return path\n\t\t\t$cReturn = $this->config->get('ConfirmationReturn');\n\t\t\tif ($cReturn)\n\t\t\t{\n\t\t\t\t$return = $cReturn;\n\t\t\t}\n\n\t\t\t//check to see if we have a return param\n\t\t\t$pReturn = base64_decode(urldecode($xprofile->getParam('return')));\n\t\t\tif ($pReturn)\n\t\t\t{\n\t\t\t\t$return = $pReturn;\n\t\t\t\t$xprofile->setParam('return', '');\n\t\t\t}\n\n\t\t\t// make as confirmed\n\t\t\t$xprofile->set('activation', 1);\n\n\t\t\t// set public setting\n\t\t\t$xprofile->set('access', $this->config->get('privacy', 1));\n\n\t\t\t// update profile\n\t\t\tif (!$xprofile->save())\n\t\t\t{\n\t\t\t\t$this->setError(Lang::txt('COM_MEMBERS_REGISTER_ERROR_CONFIRMING'));\n\t\t\t}\n\n\t\t\t// if the user just changed their email & confirmed\n\t\t\t// reset 'userchangedemail' key\n\t\t\tif (Session::get('userchangedemail', 0) == 1)\n\t\t\t{\n\t\t\t\tSession::set('userchangedemail', 0);\n\t\t\t}\n\n\t\t\tEvent::trigger('onUserAfterConfirmEmail', array($xprofile->toArray()));\n\n\t\t\t// Redirect\n\t\t\tif (empty($return))\n\t\t\t{\n\t\t\t\t$r = $this->config->get('ConfirmationReturn');\n\t\t\t\t$return = ($r) ? $r : Route::url('index.php?option=com_members&task=myaccount');\n\n\t\t\t\t// consume cookie (yum) if available to return to whatever action prompted registration\n\t\t\t\tif (isset($_COOKIE['return']))\n\t\t\t\t{\n\t\t\t\t\t$return = $_COOKIE['return'];\n\t\t\t\t\tsetcookie('return', '', time() - 3600);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tApp::redirect($return, '', 'message', true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setError(Lang::txt('COM_MEMBERS_REGISTER_ERROR_INVALID_CONFIRMATION'));\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Instantiate a new view\n\t\t$this->view\n\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_CONFIRM'))\n\t\t\t->set('login', $xprofile->get('username'))\n\t\t\t->set('email', $xprofile->get('email'))\n\t\t\t->set('code', $code)\n\t\t\t->set('redirect', (isset($return) ? $return : ''))\n\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->display();\n\t}", "public function actionConfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t $this->layout =\"homeinner\";\n\t\t\t $modelUser=new Users;\n\t\t\t \n\t\t\t //for getting lastly saved value of Gift model\n\t\t\t $userGiftId = $_SESSION['giftId'];\n\t\t\t \n\t\t\t if(isset($userGiftId) && $userGiftId != '')\n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('successmessage','You have been registered properly.. Please check your mailbox');\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('failuremessage','Please fill the form properly again');\n\t\t\t }\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t $giftLastValue=Gift::model()->findByAttributes(array('id'=>$userGiftId));\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t\t\n\t\t\t //destroying session here..\n\t session_destroy(); \n\t \n\t //create new session to keep current gift id for fbshare\n\t session_start();\n\t $_SESSION['giftId'] = $userGiftId;\n\t\n\t //render page to view page....\n\t\t\t $this->render('finalconfirmed',array(\n\t\t\t\t 'modelUser'=>$modelUser,\n\t\t\t\t 'maxIdGift'=>$userGiftId,\n\t\t\t\t 'giftLastValue'=>$giftLastValue,\n\t\t\t ));\n\t\t}\n\t\telse\n\t\t{\n\t\t \t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "public function confirm_account(User $user)\n {\n $view = 'emails.confirmation';\n $data = [\n 'username' => $user->username,\n 'confirm_url' => getenv('CONFIRM_URL') . $user->confirmation_code . '/' . Crypt::encrypt($user->id),\n ];\n $subject = 'Please confirm your email on '. getenv('SITE_NAME');\n\n return $this->sendTo($user, $subject, $view, $data);\n }", "public function confirmation($user_vericode)\n\t{\n\t\t$this->load->database();\n\t\t$this->db->where('verification_code', $user_vericode);\n\t\t$data['Active_status'] = 1;\n\t\t$this->db->update('users', $data);\n\t\t\n\t\t// view verification success page\n\t\t$this->load->view('verification_success');\n\t}", "public function confirmed()\n {\n \n $this->alert('success', 'Hello World!', [\n 'position' => 'top-end', \n 'timer' => 3000, \n 'toast' => true, \n 'text' => '', \n 'confirmButtonText' => 'Ok', \n 'cancelButtonText' => 'Cancel', \n 'showCancelButton' => true, \n 'showConfirmButton' => true, \n ]);\n }", "public function confirmed()\n {\n \n $this->alert('success', 'Hello World!', [\n 'position' => 'top-end', \n 'timer' => 3000, \n 'toast' => true, \n 'text' => '', \n 'confirmButtonText' => 'Ok', \n 'cancelButtonText' => 'Cancel', \n 'showCancelButton' => true, \n 'showConfirmButton' => true, \n ]);\n }", "public function sendConfirmMail($f3, $to, $subject, $message) {\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\n // Additional headers\n $headers .= 'From: NoDep <[email protected]>' . \"\\r\\n\";\n // Mail it\n mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $message, $headers, '[email protected]');\n }", "function jetpackcom_contact_confirmation() {\n if ( is_page( '16' ) ) {\n $conf = __( 'A special confirmation message for the form you added to page 16', 'plugin-textdomain' );\n } else {\n $conf = __( 'A generic confirmation message to display for all the other forms', 'plugin-textdomain' );\n }\n return $conf;\n}", "public function confirmation() {\n return false;\n }", "public function executeConfirm(sfWebRequest $request) {\n $verify_code = $_GET['verify_code'];\n $email_address = $_GET['email_address'];\n $confirmSuccess = Doctrine::getTable('User')->func_confirmSaltToVerifyEmail($email_address, $verify_code);\n if (count($confirmSuccess)) {\n \tDoctrine::getTable('User')->func_activate($email_address);\n \t$user_id = Doctrine::getTable('User')->func_getValuesFromEmailAddress($email_address);\n $this->getUser()->addCredential('user', $user_id['0']['user_id']);\n $this->getUser()->setFlash('message', 'You have logged \nin successfully.');\n $this->redirect('user/home');\n } else {\n $this->getUser()->setFlash('message', 'Incorrect Attempt to confirm account');\n $this->redirect('user/login');\n }\n }", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public static function sendActivationEmail(MapTableContextObject $mapTableContextObject){\n switch($mapTableContextObject->getTable()){\n case 'werock_user_emails':\n\n try {\n\n /** @var MapTableColumnObject $MapTableColumnObjectEmail */\n $MapTableColumnObjectEmail = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_email_value'];\n /** @var MapTableColumnObject $MapTableColumnObjectUserId */\n $MapTableColumnObjectUserId = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_id'];\n\n $UpdatedUser = self::$UserService->getUser((int)$MapTableColumnObjectUserId->getSubmittedValue());\n if (!empty($UpdatedUser)) {\n self::$UserRepository->assignEmail($UpdatedUser, $MapTableColumnObjectEmail->getSubmittedValue());\n CoreNotification::set('Sent confirmation email', CoreNotification::SUCCESS);\n }\n\n } catch(Exception $e){\n CoreNotification::set('Unable to send confirmation email', CoreNotification::ERROR);\n }\n\n break;\n }\n }", "function studnetconfirmEmail($hashcode){\n if($this->setting_model->studentverifyEmail($hashcode)){\n $this->session->set_flashdata('msg', '<div class=\"alert alert-success text-center\">Email address is confirmed. Please login to the system</div>');\n redirect('student_login');\n }else{\n $this->session->set_flashdata('msg', '<div class=\"alert alert-danger text-center\">Email address is not confirmed. Please contact Londontec City Campus Admin.</div>');\n redirect('student_login');\n }\n\t}", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function _webform_confirm_email_edit_confirmation_email_submit($form, &$form_state) {\n\n if ( isset($form_state['values']['eid']) == TRUE\n && isset($form['#node']->nid) == TRUE) {\n\n $obj['eid'] = $form_state['values']['eid'];\n $obj['nid'] = $form['#node']->nid;\n $obj['email_type'] = WEBFORM_CONFIRM_EMAIL_CONFIRMATION;\n\n if (empty($form['eid']['#value']) == TRUE) {\n //-> new email\n $obj['eid'] = $form_state['values']['eid'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj\n );\n }\n else {\n $obj['eid'] = $form['eid']['#value'];\n drupal_write_record(\n 'webform_confirm_email',\n $obj,\n array('nid', 'eid')\n );\n }\n }\n}", "function confirmation(){\n\t\tglobal $wpdb;\n\n\t\t$form_id = ( isset( $_REQUEST['form_id'] ) ) ? (int) esc_html( $_REQUEST['form_id'] ) : '';\n\n\t\tif ( !isset( $_REQUEST['vfb-submit'] ) )\n\t\t\treturn;\n\n\t\tdo_action( 'vfb_confirmation', $form_id, $this->new_entry_id );\n\n\t\t// Allow custom query arguments to be appended to redirects\n\t\t$query_args = apply_filters( 'vfb_redirect_query_args', '', $form_id, $this->new_entry_id );\n\n\t\t// Get forms\n\t\t$order = sanitize_sql_orderby( 'form_id DESC' );\n\t\t$forms \t= $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id ) );\n\n\t\tforeach ( $forms as $form ) :\n\n\t\t\t// If user wants this to redirect to PayPal\n\t\t\tif ( $form->form_paypal_setting ) {\n\n\t\t\t\t$paypal_data = array(\n\t\t\t\t\t'paypal_field'\t=> $form->form_paypal_field_price,\n\t\t\t\t\t'item_name'\t\t=> $form->form_paypal_item_name,\n\t\t\t\t\t'currency_code'\t=> $form->form_paypal_currency,\n\t\t\t\t\t'tax_rate'\t\t=> $form->form_paypal_tax,\n\t\t\t\t\t'shipping'\t\t=> $form->form_paypal_shipping,\n\t\t\t\t\t'business'\t\t=> $form->form_paypal_email,\n\t\t\t\t);\n\n\t\t\t\t$this->paypal_redirect( $paypal_data, $form_id );\n\t\t\t}\n\n\t\t\t// Allow templating within confirmation message\n\t\t\t$form->form_success_message = $this->templating( $form->form_success_message );\n\n\t\t\t// Apply a filter for the success message\n\t\t\t$form->form_success_message = apply_filters( 'vfb_form_success_message', $form->form_success_message, $form_id, $form->form_success_type );\n\n\t\t\t// If text, return output and format the HTML for display\n\t\t\tif ( 'text' == $form->form_success_type ) :\n\t\t\t\treturn stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\t\t\t// If page, redirect to the permalink\n\t\t\telseif ( 'page' == $form->form_success_type ) :\n\t\t\t\t$page = get_permalink( $form->form_success_message );\n\t\t\t\twp_redirect( esc_url_raw( $page . $query_args ) );\n\t\t\t\texit();\n\t\t\t// If redirect, redirect to the URL\n\t\t\telseif ( 'redirect' == $form->form_success_type ) :\n\t\t\t\twp_redirect( esc_url_raw( $form->form_success_message . $query_args ) );\n\t\t\t\texit();\n\t\t\t// Display Entry with Text message prepended\n\t\t\telseif ( 'display-entry' == $form->form_success_type ) :\n\t\t\t\t// At least output the Text message\n\t\t\t\t$output = stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\n\t\t\t\t// Only add entry to output if Display Entries is active\n\t\t\t\tif ( class_exists( 'VFB_Pro_Display_Entries' ) ) {\n\t\t\t\t\t$output .= vfb_display_entries( array(\n\t\t\t\t\t\t'entry_id' \t=> $this->new_entry_id,\n\t\t\t\t\t\t'echo'\t\t=> 0\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\treturn $output;\n\t\t\tendif;\n\n\t\tendforeach;\n\t}", "public function verificarClienteEmail(ICliente $cliente);", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }" ]
[ "0.77735835", "0.7400447", "0.73311573", "0.7285174", "0.72354627", "0.7227032", "0.71744674", "0.7127186", "0.70456165", "0.701664", "0.6975683", "0.694117", "0.69361216", "0.693306", "0.68931043", "0.68619716", "0.68411064", "0.68094176", "0.6794977", "0.6709405", "0.6700137", "0.6674178", "0.662509", "0.65574193", "0.6528477", "0.6518434", "0.65098494", "0.6448474", "0.6443523", "0.6431751", "0.64104474", "0.6393886", "0.6376164", "0.6343708", "0.63394636", "0.63283724", "0.63272417", "0.63186616", "0.63063765", "0.6300997", "0.6300037", "0.62971884", "0.62836933", "0.6281", "0.62807834", "0.62666184", "0.62586766", "0.62518567", "0.62488437", "0.6243619", "0.6242198", "0.62307", "0.62254536", "0.62100726", "0.62068063", "0.6203413", "0.62025076", "0.62009305", "0.62005156", "0.6196679", "0.6194601", "0.61645603", "0.61267215", "0.6125933", "0.6124768", "0.6121738", "0.6121547", "0.61134356", "0.61116254", "0.6101219", "0.61008406", "0.6098347", "0.60942084", "0.6092866", "0.60919327", "0.60902035", "0.6082808", "0.60808116", "0.6078478", "0.6071132", "0.6064759", "0.6063974", "0.6062653", "0.60411763", "0.60400933", "0.6037361", "0.6037361", "0.60328615", "0.60327023", "0.60137284", "0.60093206", "0.6008139", "0.60024536", "0.600152", "0.60003537", "0.59959865", "0.5993878", "0.59912133", "0.59902585", "0.5989793" ]
0.6232916
51
Send message on email user registered from 1C
public function registeredUser(array $array) { $this->load->model('customer/customer'); $customerInfo = $this->model_customer_customer->getCustomer($array['customer_id']); if ($customerInfo) { $this->load->model('setting/store'); $storeInfo = $this->model_setting_store->getStore($customerInfo['store_id']); if ($storeInfo) { $storeName = html_entity_decode($storeInfo['name'], ENT_QUOTES, 'UTF-8'); $storeUrl = $storeInfo['url']; } else { $storeName = html_entity_decode( $this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8' ); $storeUrl = HTTP_CATALOG; } $this->load->model('localisation/language'); $languageInfo = $this->model_localisation_language->getLanguage($customerInfo['language_id']); if ($languageInfo) { $languageCode = $languageInfo['code']; } else { $languageCode = $this->config->get('config_language'); } $language = new Language($languageCode); $language->load($languageCode); $language->load('mail/customer'); $subject = sprintf($language->get('text_subject'), $storeName, HTTP_DOMAIN); $data['text_welcome'] = sprintf( $language->get('text_welcome'), $storeName, $array['email'], $array['password'] ); $data['html'] = $this->getHtmlForEmail($language, $customerInfo['language_id'], $storeUrl); $data['text_thanks'] = $language->get('text_thanks'); $data['store'] = $storeName; $data['store_url'] = $storeUrl; $mail = new Mail($this->config->get('config_mail_engine')); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode( $this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8' ); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($customerInfo['email']); $mail->setFrom($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setSender($storeName); $mail->setSubject($subject); $mail->setHtml($this->load->view('mail/customer_registered', $data)); $mail->send(); $this->alert($array, $customerInfo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function emailAtLogin() {}", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "function svbk_rcp_email_on_registration( $user_id ) {\n\t\n\tglobal $rcp_options;\n\n\t$rcp_member = new RCP_Member( $user_id );\n\n\t$emails = new RCP_Mandrill_Emails();\n\t$emails->member_id = $rcp_member->ID;\n\t\n\t$to = array(\n\t\t'email' => $rcp_member->user_email,\n\t\t'name' => $rcp_member->first_name . ' ' . $rcp_member->last_name,\n\t\t'type' => 'to',\n\t);\n\n\t$template = isset($rcp_options['mandrill_template_user_reg']) ? $rcp_options['mandrill_template_user_reg'] : '';\n\n\tif( $template && $emails->sendTemplate( $template, $to ) ) {\n\t\trcp_log( sprintf( '[Mandrill Emails] Registration email sent to user %s. Template : %s', $rcp_member->first_name . ' ' . $rcp_member->last_name, $template ) );\n\t} else {\n\t\trcp_log( sprintf( '[Mandrill Emails] Registration email not sent to user %s - template %s is empty or invalid.', $rcp_member->first_name . ' ' . $rcp_member->last_name, $template ) );\n\t}\n\t\n}", "protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "public function sendGlobalUserActivated()\n {\n if ($this->_sendMails) {\n $row = $this->getModel()->getKwfUserRowById($this->id);\n $mail = new Kwf_User_Mail_GlobalUserActivated($row);\n $mail->send();\n $this->writeLog('user_mail_GlobalUserActivation');\n }\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "public function sendEmailVerificationNotification();", "function cicleinscription_send_email_message($to, $subject, $messagetext, $userid){\n\t$user = cicleinscription_get_user_by_id($userid);\n\t$user->email = $to;\n\t#var_dump($subject);\n\t\n\t$from = DEFAULT_EMAIL_FROM_EAD;\n\t#resultado\n\treturn email_to_user($user, $from, $subject, $messagetext);\n}", "public function sendAction()\n {\n $_POST['email'] = Auth::getEmail();\n $chat = new Chat($_POST);\n $chat->send();;\n\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "public function sendEmailUser($data)\n {\n $subject = 'Welcome to Our Atari Portal';\n $to_email = $data['email'];\n $url = $data['url'];\n Mail::send('emails.verify-email', ['username'=>$data['name'],'url'=>$url], function ($message) use ($subject, $to_email){ \n $message->subject($subject);\n $message->to($to_email);\n });\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "protected function notify(User $user){\n// '<a href=\"'.action('ProfileController@getActivate', $user->activation_code).'\">Activate My Email</a>';\n// //$msgBody = 'Your activation code is '.$user->phoneActivationCode;\n// $msgBody = 'Thank you for registering with our consultation services,\\nAn activation email has been sent to your mail, please activate it in order to access your account.';\n $emailData= [\n 'name'=>$user->name,\n 'link'=>action('UserController@getActivate', $user->activation_code)\n ];\n SharedFunctions::sendEmailTo('emails.welcome', $user->email,\n 'Register mail', $emailData);\n //SharedFunctions::sendSMS($user->phone, $msgBody);\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function sendRegistrationEmail()\n {\n $loginToken=$this->extractTokenFromCache('login');\n\n $url = url('register/token',$loginToken);\n Mail::to($this)->queue(new RegistrationConfirmationEmail($url));\n }", "public function send()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('Mail');\n\t\tif ($model->send())\n\t\t{\n\t\t\t$type = 'message';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$msg = $model->getError();\n\t\t$this->setredirect('index.php?option=com_users&view=mail', $msg, $type);\n\t}", "function itstar_send_registration_admin_email($user_id){\n // add_user_meta( $user_id, 'hash', $hash );\n \n \n\n $message = '';\n $user_info = get_userdata($user_id);\n $to = get_option('admin_email'); \n $un = $user_info->display_name; \n $pw = $user_info->user_pass;\n $viraclub_id = get_user_meta( $user_id, 'viraclub', 1);\n\n $subject = __('New User Have Registered ','itstar').get_option('blogname'); \n \n $message .= __('Username: ','itstar').$un;\n $message .= \"\\n\";\n $message .= __('Password: ','itstar').$pw;\n $message .= \"\\n\\n\";\n $message .= __('ViraClub ID: ','itstar').'V'.$viraclub_id;\n\n \n //$message .= 'Please click this link to activate your account:';\n // $message .= home_url('/').'activate?id='.$un.'&key='.$hash;\n $headers = 'From: <[email protected]>' . \"\\r\\n\"; \n wp_mail($to, $subject, $message); \n}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function doSendFirstEmail()\n {\n $subject = 'Working with Example Co, Inc';\n $body = 'Hi Steve,<br><br>';\n $body .= 'Name is Alex and we met last night at the event and spoke briefly about getting more users to your site. ';\n $body .= 'I thought we had a great conversation and wanted to follow up on that. Could we set up a time to speak sometime this week?';\n $body .= '<br><br>Thank you for your time and let me know when you\\'d like to connect and I\\'d be happy to block it out.';\n $body .= '<br><br>Best,<br>Alex';\n // get up a gmail client connection\n $client = User::googleClient();\n // get the gmail service\n $gmail = new \\Google_Service_Gmail($client);\n\n // use swift mailer to build the mime\n $mail = new \\Swift_Message;\n $mail->setTo([$this->user->email]);\n $mail->setBody($body, 'text/html');\n $mail->setSubject($subject);\n $data = base64_encode($mail->toString());\n $data = str_replace(array('+','/','='),array('-','_',''),$data); // url safe\n $m = new \\Google_Service_Gmail_Message();\n $m->setRaw($data);\n $gmailMessage = $gmail->users_messages->send('me', $m);\n\n // update the DB so we can check if this feature is used\n $this->user->tutorial_email = 'yes';\n $this->user->save();\n return 'success';\n }", "private function mailToevoegenAction()\n {\n $this->model->maakMail();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> E-mail adres is toegevoed. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Mail toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "public function send()\n\t{\n $user = new User();\n\n // Send mail to user with password if username exists\n return $user->sendEmail(Database::connection(), $_POST['username']);\n }", "public function emailUser () {\n\t\t\t// Load the data helper class and get user instance\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$user = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t// Load the authentication model that belongs with logged in user\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $user->getUserId () );\n\t\t\t$auth->setId ( $user->getUserId () );\n\t\t\t// Construct the user contact's full name\n\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t// Format timestamp date and time\n\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t$timestampDate = \"-\";\n\t\t\t$timestampTime = \"-\";\n\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Construct and send out ban notice email to user\n\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_user\");\n\t\t\t$template->setSenderEmail ( Mage::getStoreConfig (\"trans_email/ident_general/email\") );\n\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t$template->setType (\"html\");\n\t\t\t$template->setTemplateSubject (\n\t\t\t\tMage::helper (\"twofactor\")->__(\"Your Magento admin account is locked\")\n\t\t\t);\n\t\t\t$template->send ( $user->getEmail (), $fullName,\n\t\t\t\tarray (\n\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\"username\" => $user->getUsername (),\n\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function sendEmail($user, $email, $loginInfo){\n\t$to = $email; // Send email to our user\n\t$subject = 'Signup | Verification'; // Give the email a subject \n\t$message = '\n\t \n\tThanks for signing up!\n\tYour account has been created, please verify your account in order to set up your password for your login.\n\t \n\t------------------------\n\tUsername: '.$user.'\n\tPassword: To be added\n\t------------------------\n\t \n\tPlease click this link to activate your account:\n\thttps://www.kobackproducts.ca/editoroverlay/verify.php?email='.$email.'&hash='.$loginInfo.''; // Our message above including the link\n\t\n\t$headers = 'From:[email protected]' . \"\\r\\n\"; // Set from headers\n\tmail($to, $subject, $message, $headers); // Send our email\n\t\n}", "function notifyReg($uName,$eMail) { //notify a new user registration\r\n\tglobal $ax, $set, $today;\r\n\t\t\r\n\t//compose email message\r\n\t$subject = \"{$ax['log_new_reg']}: {$uName}\";\r\n\t$msgBody = \"\r\n<p>{$ax['log_new_reg']}:</p><br>\r\n<table>\r\n\t<tr><td>{$ax['log_un']}:</td><td>{$uName}</td></tr>\r\n\t<tr><td>{$ax['log_em']}:</td><td>{$eMail}</td></tr>\r\n\t<tr><td>{$ax['log_date_time']}:</td><td>\".IDtoDD($today).\" {$ax['at_time']} \".ITtoDT(date(\"H:i\")).\"</td></tr>\r\n</table>\r\n\";\r\n\t//send email\r\n\t$result = sendEml($subject,$msgBody,$set['calendarEmail'],1,0,0);\r\n\treturn $result;\r\n}", "function send_auth_code_at_login($user)\n{\n\t$user_info = get_userdata($user);\n\t\n\t$user_login = $user_info->data->user_login;\n\n\t$user_email = $user_info->data->user_email;\t\n\n\t$user_name = $user_info->data->first_name;\t\n\n\t$user_phone = get_user_meta( $user, 'user_phone', true );\n\t//$user_phone = urldecode($u_phone);\n\n\t$user_fname = get_user_meta( $user, 'first_name', true );\n\n\t$code = get_user_meta( $user, 'has_to_be_activated', true );\n\n\t$subject = 'Your New Authentication Code';\n\n\n\t$message1 = \"<html><body style='background:#f3f3f3;padding:20px 0;'><table border='0' cellpadding='0' cellspacing='0' style='margin:auto; max-width: 520px;width:100%;font-family: Arial;padding:20px;background:#fff;'><tbody>\";\n\t$message1 .=\"<tr><td style='font-size: 16px;'>Hello \".ucfirst($user_fname).\",</td></tr><tr height=20></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>Welcome to Raise it Fast!</td></tr><tr height=30></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>Please use this code to authenticate your account with Raise it Fast. <span style='background: #aaaaaa none repeat scroll 0 0;height: 45px;text-align: center;width: 101px;'>\".$code.\"</span></td></tr><tr height=20></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>'If you have any questions or concerns don't hesitate to use our website chat function, call us, or email us by going to our help page at \".site_url('/contact-us/').\" Or, you can simply reply to this email. '</td></tr><tr height=30></tr>\"; \n\t$message1 .=\"<tr><td style='font-size: 16px; margin-top: 20px;'>Thanks for becoming a part of the Raise It Fast community! </td></tr></tbody></table><table border='0' cellpadding='0' cellspacing='0' style='margin:20px auto 0; max-width: 520px;width:100%;'>\"; \n\n\t$message1 .=\"<tr><td style='color: #999999; font-size: 12px; text-align: center;'>1401 Lavaca St #503, Austin, TX 78701</td></tr><tr height=20></tr>\"; \n\t$message1 .=\"<tr><td style='color: #999999; font-size: 12px; text-align: center;'><a href=\".site_url().\" style='text-decoration:none; color: #999999;'>The Raise it Fast Team</a></td></tr>\"; \n\t$message1 .=\"</table></body></html>\";\n\n\twp_mail($user_email, $subject, $message1);\n\n//=========Send Auth Code Via Text message ==================//\n\n\t$account_sid = get_option('twilio_account_sid'); \n\t$auth_token = get_option('twilio_auth_token'); \n //require('lib/twilio-php-latest/Services/Twilio.php');\n\t$client = new Services_Twilio($account_sid, $auth_token); \n //$from = '+12182265630'; \n\t$from = get_option('twilio_phone_no');\n\n\ttry\n\t{\n\t\t$client->account->messages->sendMessage( $from, $user_phone, \"Hello $user_fname, Your Authentication code is $code\");\n\t}\n\tcatch (Exception $e)\n\t{ \n\n\t\techo \"11-\";\n\t}\n}", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "public function customer_signup($edata) {\n\t\t\t\t$details = email_template_detail(\"customerregister\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregister\");\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= $details[0]->temp_body;\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//sendsms($smsdetails[0]->temp_body, $edata['phone'], \"supplierregister\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($edata['email']);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "function mailUser($transcript, $phoneNumber, $CallSid)\n{\n\t $inCallEmployeeId = getOne(\"select user_id from schedule where ph_id = (select ph_id from phone_numbers where phone_number like '%\".trim($phoneNumber).\"') and is_active=1\");\n\t$inCallEmployeeMail = getOne(\"select user_email from users where user_id = '\".$inCallEmployeeId.\"'\");\n\t$voiceURL = getOne(\"select recording_url from incomming_calls where call_sid = '\".$CallSid.\"'\");\n\t\n\t\n\tif(trim($inCallEmployeeMail) != \"\")\n\t{\n\t\t$message = \"\n\t\t\t<h3> New Call for you..!!</h3>\n\t\t\t<br />\n\t\t\tYou have a new message.<br />\n\t\t\tTranscription: \".$transcript.\"<br />\n\t\t\tVoice Url: \".$voiceURL.\"<br /><br />\n\t\t\tLog in to VBX scheduler for more details.<br />\n\t\t\tThanks.\t\t\n\t\t\";\n\t\tmailEmployee($inCallEmployeeMail, $message);\n\t}\n}", "public function notify() \n {\n $user = User::find()->where(['username' => $this->username])->one();\n if (!$user) {\n return false;\n }\n \n if ($this->isPhone()) {\n // Notify by SMS\n if (!$this->password) {\n return false;\n }\n Yii::$app->sms->send($user->username, 'Your password is: ' . $this->password);\n } else {\n // Notify by email\n $user->generateVerificationToken();\n if ($user->save()) {\n $mail = Yii::$app->mailer->compose('notify', ['model' => $user])\n ->setFrom('[email protected]')\n ->setTo($user->username)\n ->setSubject('Complete Your Registration')\n ->send();\n }\n }\n \n return true;\n }", "public function sendEmail(): void\n {\n echo 'email sent';\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "private function sendActivationEmail($data) {\n\t$template_name = 'signup-confirmation';\n\t$template_content = array();\n\t$message = array(\n\t\t'subject' => 'Welcome! Please confirm your email address.',\n\t\t'from_email' => '[email protected]',\n\t\t'from_name' => 'Chefmes',\n\t\t'to' => array(\n\t\t\tarray(\n\t\t\t\t'email' => $data['email'],\n\t\t\t\t'name' => $data['fullname']\n\t\t\t)\n\t\t),\n\t\t'merge_language' => 'mailchimp',\n\t\t'merge_vars' => array(\n\t\t\tarray(\n\t\t\t\t'rcpt' => $data['email'],\n\t\t\t\t'vars' => array(\n\t\t\t\t\t[ 'name' => 'email', 'content' => $data['email']],\n\t\t\t\t\t[ 'name' => 'firstname', 'content' => $data['firstname']],\n\t\t\t\t\t[ 'name' => 'confirmlink', 'content' => $data['confirmlink']]\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\t\\Email::messages()->sendTemplate($template_name, $template_content, $message);\n\t//print_r($result);\n }", "function new_user_email_admin_notice()\n {\n }", "function notify_register($email, $name) {\n\t$text = \"Hello $name,\\n\";\n\t$text .= \"\\nThanks for registering for an account with Ma-Maria. You will use this email address to login to your account.\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Registration', $text);\n\t}\n}", "public static function rb_casting_send_notification($user_id, $plaintext_pass = ''){\r\n\r\n\t\t\t\t$user = new WP_User($user_id);\r\n\r\n\t\t\t\t$user_login = stripslashes($user->user_login);\r\n\t\t\t\t$user_email = stripslashes($user->user_email);\r\n\r\n\t\t\t\t$message = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('Username: %s'), $user_login) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('E-mail: %s'), $user_email) . \"<br>\";\r\n\r\n\t\t\t\t$rb_agency_options_arr = get_option('rb_agency_options');\r\n\t\t\t\t$rb_agency_email = $rb_agency_options_arr[\"rb_agency_option_agencyemail\"];\r\n\t\t\t\t$rb_agency_email_can_received = $rb_agency_options_arr[\"rb_agency_option_agency_email_receive_notification\"] > 0 ? 1 : 0;\r\n\t\t\t\tadd_filter('wp_mail_content_type','rb_agency_set_content_type');\r\n\t\t\t\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);\r\n\r\n\t\t\t\tif($rb_agency_email_can_received > 0){\r\n\t\t\t\t\twp_mail($rb_agency_email, sprintf(__('[%s] New User Registration')), $message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( empty($plaintext_pass) )\r\n\t\t\t\t\treturn;\r\n\t\t\t\t$message = __('Hi there,',RBAGENCY_casting_TEXTDOMAIN) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__(\"Thanks for joining %s! Here's how to log in:\",RBAGENCY_casting_TEXTDOMAIN), get_option('blogname')) . \"<br><br>\";\r\n\t\t\t\t$message .= __('Login: ',RBAGENCY_interact_TEXTDOMAIN).\"<a href='\".get_option('home') .\"/casting-login'>\".get_option('home') .\"/casting-login </a><br>\";\r\n\t\t\t\t$message .= sprintf(__('Username: %s',RBAGENCY_casting_TEXTDOMAIN), $user_login) . \"<br>\";\r\n\t\t\t\t$message .= sprintf(__('Password: %s',RBAGENCY_casting_TEXTDOMAIN), $plaintext_pass) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('If you have any problems, please contact us at %s.',RBAGENCY_casting_TEXTDOMAIN), get_option('admin_email')) . \"<br><br>\";\r\n\t\t\t\t$message .= __('Regards,',RBAGENCY_casting_TEXTDOMAIN).\"<br>\";\r\n\t\t\t\t$message .= get_option('blogname') . __(' Team',RBAGENCY_casting_TEXTDOMAIN) .\"<br>\";\r\n\t\t\t\t$message .= get_option('home') .\"<br>\";\r\n\t\t\t\t$message .= \"<br>\";\r\n\t\t\t\t$message .= '<img src=\"'.get_option('home').$rb_agency_options_arr['rb_agency_option_agencylogo'].'\" width=\"200\">';\r\n\t\t\t\t$headers = 'From: '. get_option('blogname') .' <'. get_option('admin_email') .'>' . \"<br>\";\r\n\r\n\t\t\t\t//add_filter( 'wp_mail_content_type', function set_content_type( $content_type ) {\r\n\t\t\t\t\t//return 'text/html';\r\n\t\t\t\t//});\r\n\t\t\t\tadd_filter('wp_mail_content_type','rb_agency_set_content_type');\r\n\t\t\t\twp_mail($user_email, sprintf(__('%s Registration Successful! Login Details',RBAGENCY_casting_TEXTDOMAIN), get_option('blogname')), $message, $headers);\r\n\t\t}", "function itstar_user_registration_welcome_email($user_id){\n // $hash = md5( $random_number );\n // add_user_meta( $user_id, 'hash', $hash );\n \n $admin_email = get_option('admin_email');\n\n $user_info = get_userdata($user_id);\n $to = $user_info->user_email; \n $un = $user_info->display_name; \n $pw = $user_info->user_pass;\n $viraclub_id = get_user_meta( $user_id, 'viraclub', 1);\n\n $subject = __('Welcome to ','itstar').get_option('blogname'); \n $message = __('Hello,','itstar').$un;\n $message .= \"\\n\\n\";\n $message .= __('Welcome to Our Site','itstar');\n $message .= \"\\n\\n\";\n $message .= __('Username: ','itstar').$un;\n $message .= \"\\n\";\n $message .= __('Password: ','itstar').$pw;\n $message .= \"\\n\\n\";\n $message .= __('ViraClub ID: ','itstar').'V'.$viraclub_id;\n //$message .= 'Please click this link to activate your account:';\n // $message .= home_url('/').'activate?id='.$un.'&key='.$hash;\n $headers = 'From: <[email protected]>'.\"\\r\\n\"; \n wp_mail($to, $subject, $message); \n}", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n $c = 0;\n foreach ($invites as $user){\n \n $create_at = strtotime($user->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue; \n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'invitation-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n $activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can \".$activation_url.\"!\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n Slack::message(\"CRON >> Invite to join reminders: \".$c);\n return 0;\n }", "public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }", "function send_registration_notice( $user_id ) {\n\n\t\t\t$the_user = get_userdata( $user_id );\n\t\t\t$user_email = $the_user->user_email;\n\t\t\t$user_name = $the_user->first_name . ' ' . $the_user->last_name;\n\n\t\t\t$from = Project045_Definitions::$email_from;\n\t\t\t$to = Project045_Definitions::$email_from;\n\t\t\t$subject = 'Nuevo registro de usuario';\n\t\t\t$message = \"Nombre: \" . $user_name . \"\\nEmail: \" . $user_email;\n\t\t\t$headers = 'From: Project045 <' . Project045_Definitions::$email_from . '>';\n\t\t\twp_mail( $to, $subject, $message, $headers );\t\n\n\t\t}", "public function notifyUser()\n { \n $message = trim(Input::get('message'));\n $apiType = trim(Input::get('apiType'));\n $mobileNotificationService = App::make('MobileNotificationService');\n $mobileNotificationService->notifyMobileAppUser($message, $apiType, App::environment('production')); \n }", "public function SendActiveMail($data,$id=null){\n if($id!=null){\n $add=public_users::find($id);\n $add->num_of_sends+=1;\n $add->save();\n }\n $mailables=new PublicMailVerification($data['token'],$data['name'],$data['email'],$data['phone'],$data['otp']);\n Mail::to($data['email'])->send($mailables);\n }", "public function send_mail_to_accepted_user($username) {\n }", "function mail()\n {\n\n\n }", "public function new_customer_email($edata) {\n\t\t\t\t$template = $this->shortcode_variables(\"customerregisteradmin\");\n\t\t\t\t$details = email_template_detail(\"customerregisteradmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregisteradmin\");\n\t\t\t\t$values = array($edata['name'], $edata['email'], $edata['address'], $edata['phone']);\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"supplierregisteradmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($this->adminemail);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "function register()\n {\n $saveData = null;\n // result is an array data if save data to db success, else it is false\n $saveData = $this->model->khachhang->registerCustomerAccount();\n // if save data success, send mail to user\n if ($saveData != false) {\n $linkVerify = baseUrl('user/verify/') . $saveData['activation'];\n $title = \"Verification Link | MobileShop| Subscription\";\n $content = \"\";\n $content .= \"Xin chào \" . $saveData['username'] . \",<br /><br />\";\n $content .= \"Vui lòng kích vào nút bên dưới để xác nhận tài khoản của bạn trên website \" . BASE_URL . \".<br />\";\n $content .= \"<span style='background-color:#07c;margin-top:15px;width: 115px;height: 40px;display:block;border-radius: 40px;cursor: pointer;'>\n <span style='display:block;padding:10px;cursor: pointer;'>\n <a href='{$linkVerify}' target='_blank' style='color:white;'>\n VERIFY EMAIL\n </a>\n </span>\n </span>\";\n $nTo = $saveData['username'];\n $mTo = $saveData['email'];\n $diachicc = \"\";\n $mailSuccess = sendMail($title, $content, $nTo, $mTo, $diachicc);\n if ($mailSuccess) {\n redirect('user/success');\n } else {\n redirect('user/fail');\n }\n } else {\n redirect('user/fail');\n }\n\n }", "public function actionWeekly(){\n return 0;\n \n $message = new YiiMailMessage;\n //$message->view = 'newsletter';\n $message->setBody('En testni mail', 'text/html');\n $message->subject = \"subject\";\n\n // get all users\n $criteria = new CDbCriteria();\n $criteria->condition = 'newsletter=1'; // new\n $users = User::model()->findAll($criteria);\n foreach ($users as $user){\n $message->addBcc($user->email);\n }\n\n $message->from = Yii::app()->params['adminEmail'];\n Yii::app()->mail->send($message);\n \n //return 0; // all OK // not needed\n\t}", "public function sendActivation()\n\t{\n\t}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "function sendAcc($vendorAcc,$vendorEmail,$vendorName){\n\n $mail = new phpMailer();\n $mail->isSMTP();\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = \"ssl\";\n $mail->Host = \"smtp.gmail.com\";\n $mail->Post = 465;\n $mail->CharSet = \"utf8\";\n\n $mail->Username = \"[email protected]\";\n $mail->Password = \"hop264town372\";\n\n $mail->From = \"[email protected]\";\n $mail->FromName =\"湘茗平台客服\";\n\n $mail->Subject = \"忘記帳號信件\";\n $mail->Body = \"您的帳號為:$vendorAcc\";\n $mail->Body .=\"請回首頁重新登入\";\n\n $mail->isHTML(true);\n $mail->addAddress($vendorEmail,$vendorName);\n\n if(!$mail->Send()){\n header(\"Refresh:3;url=./index.php\");\n echo \"寄送失敗\";\n }else{\n header(\"Refresh:3;url=./index.php\");\n echo \"帳號寄送成功,請至信箱收信\";\n }\n}", "function activationEnvoiMail($login, $jeton,$info) {\n\t\t$headers ='From: \"'.$info['nom'].' '.$info['prenom'].'\"'.$info['email'].''.\"\\n\";\n\t\t$headers .='Reply-To: [email protected]'.\"\\n\";\n\t\t$headers .='Content-Type: text/plain; charset=utf-8\\r\\n';\n\t\t$headers .='Content-Transfer-Encoding: 8bit'; \n\t\t$sujet = \"Activation de l'espace membre pour le site modele2\";\n\t\t$message = 'Bonjour '.$info['nom'].' '.$info['prenom'].','.\"\\n\\n\";\n\t\t$message .= \"Voici votre lien d'activation pour l'espace membre du site modele2 : http://localhost/projet3/activation.php?securite=\".$jeton.\". \";\n\t\t$message .= 'Cliquez sur ce lien ou copier-le et coller-le dans votre navigateur.'.\"\\n\\n\\n\";\n\t\t$message .= 'Cordialement,'.\"\\n\";\n\t\t$message .= 'le site modele2.'.\"\\n\";\n\t\tmail(\"[email protected]\", $sujet, $message, $headers);\n\t}", "function sendNewUser($userData, $code)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR001';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]', '[UserActivationCode]'];\n $with = [$username, $code];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "function sendSignupEmail($user_id, $password){\n define('EMAIL_SUBJECT', 'MW Resource Checkout');\n $from = \"[email protected]\";\n $headers = \"From: $from\\r\\n\";\n $headers .= \"Content-type: text/html\\r\\n\";\n mail(getUserEmail($user_id), EMAIL_SUBJECT, genSignupEmail(getUsername($user_id), $password), $headers);\n}", "public function sendMessage()\n {\n $this->getTemplate(\"审核结果通知\");\n\n if (empty($this->temp_open)) {\n $back['message'] = \"消息通知未开启\";\n \\Log::debug($back['message']);\n return ;\n }\n\n $this->organizeData();\n\n \\Log::debug(\"新版小程序消息-直播审核1\",$this->temp_id);\n \\Log::debug(\"新版小程序消息-直播审核2\",$this->member->hasOneMiniApp->openid);\n \\Log::debug(\"新版小程序消息-直播审核3\",$this->data);\n\n $result = (new AppletMessageNotice($this->temp_id,$this->member->hasOneMiniApp->openid,$this->data,[],2))->sendMessage();\n\n if ($result['status'] == 0) {\n \\Log::debug($result['message']);\n }\n }", "function send_regMail($from, $to, $guid)\n {\n $subject = 'Bienvenido a Jade Capital Flow';\n\n $link = $this->domain.'tblusers/confirm.php?';\n $link .= 'user='.$to.'&id='.$guid;\n\n\n $message = 'Por favor de click en la siguiente liga para complementar su registro: ';\n $message .= $link;\n\n\n $mail = mail($from, $subject, $message,\n \"From: Jade-Capital-Flow <\".$from.\">\\r\\n\"\n .\"To: User<\".$to.\">\\r\\n\"\n .\"cc: Creator<[email protected]>\\r\\n\"\n .\"Reply-To: \".$from.\"\\r\\n\"\n .\"X-Mailer: PHP/\" . phpversion());\n\n if($mail)\n {\n $res = 'OK';\n }\n }", "public function sendActivationEmail()\n\t{\n\t\t$mailData = [\n\t\t\t'to' => $this->email,\n\t\t\t'from' => '[email protected]',\n\t\t\t'nameFrom' => 'Peter Štovka'\n\t\t];\n\n\n\t\tMail::send('email.activation', ['token' => $this->token], function ($message) use ($mailData) {\n\t\t\t$message->to($mailData['to'], 'Aktivačný email')\n\t\t\t\t->subject('Aktivácia účtu')\n\t\t\t\t->from($mailData['from'], $mailData['nameFrom']);\n\t\t});\n\t}", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "function sendAccountActivated($userData)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR003';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]'];\n $with = [$username];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "public function notifyReporter()\r\n {\r\n $message = new Message();\r\n if (!$message->create())\r\n {\r\n return false;\r\n } \r\n \r\n $message->from( \"TicketSystem\" ); \r\n $message->to( $this->getReporter() ); \r\n $message->subject( \"Antwort auf Ticket #\".$this->getId() );\r\n \r\n $subJ = $this->getSubject();\r\n $tID = $this->getId();\r\n \r\n $msgText = \"Deinem Ticket mit dem Betreff \\\"\".$subJ.\"\\\" wurde eine neue Nachricht hinzugefügt.<br/><br/>\";\r\n $msgText .= \"<a href=\\\"ticketsystem.php?ticketid=\".$tID.\"\\\">Klicke hier um zum Ticket zu gelangen</a>\"; \r\n \r\n $message->text( $msgText ); \r\n $message->html( true );\r\n \r\n $message->addUser( $this->getReporter(), 6 ); \r\n\r\n unset( $message ); \r\n }", "public function actionEmailTest() {\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo(\"[email protected]\")\n ->setSubject(\"test subject\")\n ->setHtmlBody(\"test body\")\n ->send();\n return CommonApiHelper::return_success_response(\"success\", \"success\", []);\n }", "public function sendMail($data)\n {\n $mailData = array('username'=>$data['username'],'token'=>base64_encode($data['email']));\n Mail::send('frontend.auth.email',$data, function ($message) use ($data) {\n $message->subject('Verify your account');\n $message->from(env('MAIL_USERNAME'));\n $message->to($data['email']);\n });\n }", "private function sendUserMessage($item, $username, $cookiePath) {\n\t\t$this->savelog(\"Reserving profile to send message: \".$item['username']. ' / UID : '. $item['user_id']);\n\t\tif($this->reserveUser($item['username']))\n\t\t{\n\t\t\t// Go to profile page\n\t\t\t$this->savelog(\"Go to profile page: \".$item['username']);\n\t\t\t$content = $this->getHTTPContent($item['profile_url'], $this->searchURL, $cookiePath);\n\t\t\t$this->sleep(5);\n\n\t\t\t/************************/\n\t\t\t/***** Send message *****/\n\t\t\t/************************/\n\t\t\t//RANDOM SUBJECT AND MESSAGE\n\t\t\t$this->savelog(\"Random new subject and message\");\n\t\t\t$text = botutil::getMessageText($this, $this->target, 'EN');\n $subject = $text['subject'];\n $message = $text['message'];\n\t\t\t$this->savelog(\"Message is : \".$message);\n\t\t\t\n\t\t\tif(time() < ($this->lastSentTime + $this->messageSendingInterval))\n\t\t\t\t$this->sleep(($this->lastSentTime + $this->messageSendingInterval)-time());\n\t\t\t$this->savelog(\"Sending message to \".$item['username']);\n\t\t\tif(!$this->isAlreadySent($item['username']) || $enableMoreThanOneMessage)\n\t\t\t{\t\t\t\n\t\t\t\t$content = $this->getHTTPContent($item['message_url'], $item['profile_url'], $cookiePath);\n\t\t\t\tif(!empty($content)) {\n\t\t\t\t\t$html = str_get_html($content);\n\t\t\t\t\t\n\t\t\t\t\t// echo '<p><textarea style=\"width:600px; height:400px;\">',htmlspecialchars($content),'</textarea></p>';\n\t\t\t\t\t// die( $html->find(\"input[id='hidS1']\",0)->value.' <== hidS1');\n\t\t\t\t\n\t\t\t\t\t$content = $this->getHTTPContent('http://www.connectingsingles.com/mailcompose.aspx?user='.$item['username'].'&du='.$item['user_id'], $item['message_url'], $cookiePath, array(\n\t\t\t\t\t\t'__VIEWSTATE' => $html->find(\"input[id='__VIEWSTATE']\",0)->value,\n\t\t\t\t\t\t'btnSubmit' => 'Send Email',\n\t\t\t\t\t\t'hidS1' => $html->find(\"input[name='hidS1']\",0)->value,\n\t\t\t\t\t\t'hidU' => $item['username'],\n\t\t\t\t\t\t'q1' => '',\n\t\t\t\t\t\t'txtMessage' => $message,\n\t\t\t\t\t\t'txtSubject' => 'Hello '.$item['username']\n\t\t\t\t\t));\n\t\t\t\t\t\n\t\t\t\t\t// Your message was sent to: fishinandshootin\n\t\t\t\t\tif(strpos($content, 'Your message was sent to')) {\n\t\t\t\t\t\tDBConnect::execute_q(\"INSERT INTO \".$this->_table_prefix.\"sent_messages (to_username,from_username,subject,message,sent_datetime) VALUES ('\".addslashes($item['username']).\"','\".$username.\"','\".addslashes($subject).\"','\".addslashes($message).\"',NOW())\");\n\t\t\t\t\t\t$this->savelog(\"Sending message completed.\");\n\t\t\t\t\t\t$this->lastSentTime = time();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->savelog(\"Sending message failed.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->sendmsg_total++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->savelog(\"Sending message failed. This profile reserved by other bot: \".$item['username']);\n\t\t\t}\n\t\t\t\n\t\t\t$this->cancelReservedUser($item['username']);\n\t\t\t$this->sleep(2);\n\t\t\t\n\t\t\t/* Logout after send x message completed */\n\t\t\tif($this->command['logout_after_sent'] == \"Y\"){\n\t\t\t\tif($this->sendmsg_total >= $this->command['messages_logout']){\n\t\t\t\t\t$this->sendmsg_total = 0;\n\t\t\t\t\t$this->logout();\n\t\t\t\t\t$this->savelog('Logout after sent messages for '.$this->command['messages_logout'].' time(s)');\n\t\t\t\t\t$this->savelog(\"Get a new Profile for Send Message\");\n\t\t\t\t\t$this->getNewProfile();\n\t\t\t\t\t$this->sleep(($this->command['wait_for_login']*60));\n\t\t\t\t\t$this->login();\n\t\t\t\t\t$this->work();\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* End of logout */\n\t\t}\n\t}", "function xgb_notify_user( $email_of_user, $subject, $message, $no_footer ) {\n\n\t// Add [MillionClues.NET] To The Subject\n\t$subject = '[MillionClues.NET] '.$subject;\n\n\t// Headers\n\t$headers = array();\n\t$headers[] = \"MIME-Version: 1.0\";\n\t$headers[] = \"Content-type: text/plain; charset=iso-8859-1\";\n\t$headers[] = \"Message-id: \" .sprintf( \"<%s.%s@%s>\", base_convert(microtime(), 10, 36), base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36), $_SERVER['SERVER_NAME'] );\n\t$headers[] = \"From: MillionClues.NET <[email protected]>\";\n\t$headers[] = \"Reply-To: MillionClues.NET <[email protected]>\";\n\t$headers[] = \"X-Mailer: PHP/\" .phpversion();\n\t\n\tif( $no_footer === null ) {\n\t\t// Add Footer For Email\n\t\t$message .= \"\\r\\n\\r\\nSee all pending notifications: http://www.millionclues.net/wp-admin/admin.php?page=notifications \\r\\n\\r\\n- MillionClues.NET\\r\\n\\r\\n---\\r\\n\".xgb_generate_quote();\n\t}\n\t\n\t$emailSent = wp_mail( $email_of_user, $subject, $message, $headers );\n\treturn $emailSent;\n}", "public function actionSendMail()\n {\n\n // trova la videoconferenza e gli utenti collegati\n $videoconfId = Yii::$app->request->get('id');\n\n $videoconference = Videoconf::findOne($videoconfId);\n if ($videoconference) {\n $collegati = $videoconference->getVideoconfUsersMms()->all();\n if (\\is_array($collegati)) {\n foreach ($collegati as $u) {\n $sent = EmailUtil::sendEmailPartecipant($videoconference, $u->user_id);\n }\n }\n }\n }", "public function broadcastOn($user)\n {\n \n return $this->mailer->to($user->email)->send(new Regemail($user,\"Successfully registered with Brigade poll\"));\n \n }", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "public function sendUserUpdateNotification(): void\n {\n $this->notify(new VerifyAccountNotification());\n }", "function wp_new_user_notification($user_id, $plaintext_pass = '')\n {\n }", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}", "public function p_signup() \n {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $q = 'SELECT user_id\n FROM users \n WHERE email = \"'.$_POST['email'].'\"';\n $user_id = DB::instance(DB_NAME)->select_field($q);\n if ($user_id!=NULL)\n {\n $error=\"User account already exists.\";\n $this->template->content = View::instance('v_users_signup');\n $this->template->content->error=$error;\n echo $this->template;\n }\n else\n {\n\t\t\n //Inserting the user into the database\n\t\t\t$_POST['created']=Time::now();\n\t\t\t$_POST['modified']=Time::now();\n\t\t\t$_POST['password']=sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t$_POST['token']=sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t\t\t$_POST['activation_key']=str_shuffle($_POST['password'].$POST['token']);\n\t\t\t$activation_link=\"http://\".$_SERVER['SERVER_NAME'].\"/users/p_activate/\".$_POST['activation_key'];\n\t\t\t$name=$_POST['first_name'];\n\t\t\t$name.=\" \";\n\t\t\t$name.=$_POST['last_name'];\n\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\t\t\t\n\t\t//Sending the confirmation mail\n\t\t\t$to[]=Array(\"name\"=>$name, \"email\"=>$_POST['email']);\n\t\t\t$subject=\"Confirmation letter\";\n\t\t\t$from=Array(\"name\"=>APP_NAME, \"email\"=>APP_EMAIL); \n $body = View::instance('signup_email');\n $body->name=$name;\n $body->activation_link=$activation_link;\n\n\n\t\t\t$email = Email::send($to, $from, $subject, $body, false, $cc, $bcc);\n\t\t\t\n\t\t\tRouter::redirect('/');\n } \n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "function sendLogin(){\n\t\t$id = $this->input->post(\"id\");\n\t\t$body = '';\n\t\t$studData = $this->db->query(\"SELECT email, uID FROM users WHERE uID = (SELECT uID FROM student WHERE studID = $id LIMIT 1) LIMIT 1\")->row();\n\t\t$new_pw = $this->rand_pw();\n\t\t$new_un = explode(\"@\", $studData->email)[0];\n\n\t\t$body .= \"Username: \".$new_un;\n\t\t$body .= \"\\n\";\n\t\t$body .= \"Password: \".$new_pw;\n\t\t\n\n\t\tif($this->send_mail($body, $studData->email)){\n\t\t\t$this->db->update('users', ['userName'=>$new_un, 'userPass'=>$new_pw, 'status'=>'active'], \"uID = \".$studData->uID);\n\t\t\techo \"success\";\n\t\t}else{\n\t\t\techo \"error\";\n\t\t}\n\t}", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\n }", "public function send(){\n \t$this->connect();\n \t$this->login();\n \t\n \t$this->sendMail();//send an email\n \t\n \t \n \t$this->quit();\n \t$this->close();\n }", "public function add_welcome_email() {\n $post_exists = post_exists( '[{{{site.name}}}] Welcome!' );\n \n if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' )\n return;\n \n // Create post object\n $my_post = array(\n 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress-welcome-email' ),\n 'post_content' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // HTML email content.\n 'post_excerpt' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // Plain text email content.\n 'post_status' => 'publish',\n 'post_type' => bp_get_email_post_type() // this is the post type for emails\n );\n \n // Insert the email post into the database\n $post_id = wp_insert_post( $my_post );\n \n if ( $post_id ) {\n // add our email to the taxonomy term 'activation_completed'\n // Email is a custom post type, therefore use wp_set_object_terms\n \n $tt_ids = wp_set_object_terms( $post_id, 'activation_completed', bp_get_email_tax_type() );\n foreach ( $tt_ids as $tt_id ) {\n $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() );\n wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(\n 'description' => 'Recipient has successfully activated an account.',\n ) );\n }\n }\n }", "public function send_otp_to_user($email=null,$phone=null,$otp)\n {\n //send if phone number not null\n if($phone != null)\n {\n $otprequest = \"http://tra.bulksmsinhyderabad.co.in/websms/sendsms.aspx?userid=BIGEQP&password=BIGEQP&sender=BIGEQP&mobileno=\".$phone.\"&msg=\".urlencode('Thanks for Registering with Big Equipments India. Your OTP: '.$otp);\n $curl_handle=curl_init();\n curl_setopt($curl_handle, CURLOPT_URL,$otprequest);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n $query = curl_exec($curl_handle);\n curl_close($curl_handle);\n $query = Yii::$app->db;\n $query->createCommand()->update('core_users', ['otp_code' => \"$otp\"], \"phone_number = '$phone'\")->execute();\n }\n //send if email not null\n if($email != null)\n {\n $query = Yii::$app->db;\n $query->createCommand()->update('core_users', ['otp_code' => \"$otp\"], \"email = '$email'\")->execute();\n \n $query = new Query;\n $user_details = $query->select('user_name')->from('core_users')->where(\"email = '$email'\")->one();\n //send mail to user\n $subject=\"Big Equipments India | USER REGISTRATION\";\n $message = Mail_settings::get_otp_message($otp,$user_details['user_name']);\n \n Mail_settings::send_email_notification($email,$subject,$message);\n \n }\n return true;\n }", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "public function registration ($data){\n $this->Email->from(array($this->noreply => $this->team));\n $this->Email->to($data['email']);\n $this->Email->emailFormat('both');\n $this->Email->subject('One more Step required to complete your Registration at '.$this->web.'!');\n $this->Email->template('reg_user');\n $this->Email->viewVars(array('viewData' => $data));\n return $this->Email->send();\n }", "function send_consulenza($c) {\n\n require 'vendor/autoload.php';\n\n $toEmail = \"[email protected]\"; \n\n $mail = new PHPMailer();\n $mail->setFrom('[email protected]', \"Admin\");\n $mail->addReplyTo($c->get_email(), $c->get_nome() . \" \" . $c->get_cognome());\n $mail->addAddress($toEmail, 'Admin'); \n $mail->Subject = 'Richiesta consulenza da ' . $c->get_nome() . \" \" . $c->get_cognome();\n $mail->Body = \"Recapito telefonico: \" . $c->get_phone() . \"\\n\";\n $mail->Body .= $c->get_msg();\n\n if($mail->send()) {\n set_message(\"La tua email è stata inviata con successo\", \"alert-success\");\n } \n else {\n set_message(\"Oops, qualcosa è andato storto: \" . $mail->ErrorInfo, \"alert-danger\"); \n }\n\n}", "public function send_registration_feedback()\n {\n // Get parameters.\n $admin_account = $this->GABIA_SMS_API->getAdminAccount();\n\n // From contact form.\n $email = $_POST['email'];\n $tel = $_POST['tel'];\n $course_title = $_POST['course_title'];\n $name = $_POST['name'];\n $amount = $_POST['amount'];\n\n wp_mail($email, '[어벤져스쿨] 성공적으로 강연 등록이 완료되었습니다.',\n '강의 제목: ' . $course_title . \"\\n\" .\n '수강자 이름: ' . $name . \"\\n\" .\n '결제 금액: ' . $amount . \"\\n\" .\n $admin_account . \"\\n\" .\n '입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다.' . \"\\n\" .\n '- 어벤져스쿨.');\n $message = '<' . $course_title . '> 강연 등록이 완료되었습니다. 입급 전 정원 초과시 자동 취소되오니 빠른 결제 부탁드립니다. - 어벤져스쿨';\n $this->sendSms($tel, $message, '무통장입금');\n }", "public function supplier_signup($edata) {\n\t\t\t\t$details = email_template_detail(\"supplierregister\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregister\");\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= $details[0]->temp_body;\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//sendsms($smsdetails[0]->temp_body, $edata['phone'], \"supplierregister\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($edata['email']);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "function reset_email()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Reset email\n if ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_new_email_failed'));\n }\n }", "function SendUserConfirmationEmail()\r\n{\r\n $mailer = new PHPMailer();\r\n $mailer->CharSet = 'utf-8';\r\n $mailer->AddAddress($_POST['email'],$_POST['name']);\r\n $mailer->Subject = \"Your registration with YOURSITE.COM\"; //example subject\r\n $mailer->From = \"[email protected]\";\r\n $mailer->Body =\"Hello $_POST[name], \\r\\n\\r\\n\".\r\n \"Thanks for your registration with YOURSITE.COM \\r\\n\".\r\n \"\\r\\n\".\r\n \"Regards,\\r\\n\".\r\n \"Webmaster\\r\\n\";\r\n\t\r\n if(!$mailer->Send())\r\n {\r\n $this->HandleError(\"Failed sending registration confirmation email.\");\r\n return false;\r\n }\r\n return true;\r\n}", "public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }", "public function resendConfirmationMailAction()\n {\n // @todo find a better way to fetch the data\n $result = GeneralUtility::_GP('tx_femanager_pi1');\n if (is_array($result)) {\n if (GeneralUtility::validEmail($result['user']['email'])) {\n $user = $this->userRepository->findFirstByEmail($result['user']['email']);\n if (is_a($user, User::class)) {\n $this->sendCreateUserConfirmationMail($user);\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailSend'),\n '',\n AbstractMessage::INFO\n );\n $this->redirect('resendConfirmationDialogue');\n }\n }\n }\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailFail'),\n LocalizationUtility::translate('validationError'),\n AbstractMessage::ERROR\n );\n $this->redirect('resendConfirmationDialogue');\n }", "abstract protected function _sendMail ( );", "function send_a_custom_email_fn( $user_id ) {\r\n\t$user = get_user_by( 'ID', $user_id );\r\n\t$email = $user->user_email;\r\n\r\n\t// Setup email data\r\n\t$subject = \"Thank you for registering on my site!\";\r\n\t$message = \"Hi there, Thank you for signing up for our site. An administrator will be in touch shortly to confirm your account.\";\r\n\t$headers = $headers = array('Content-Type: text/html; charset=UTF-8', 'From: Andrew <deepakshukla.com>');\r\n\r\n\twp_mail( $email, $subject, $message, $headers );\r\n}" ]
[ "0.71064544", "0.7001147", "0.6752328", "0.6739938", "0.67198044", "0.67095405", "0.66630244", "0.6653953", "0.6630405", "0.66128504", "0.6612142", "0.65974516", "0.65909904", "0.65508133", "0.6543881", "0.65415883", "0.65335226", "0.65244615", "0.6499075", "0.6496388", "0.6492107", "0.6487415", "0.6474315", "0.6466738", "0.6441077", "0.64405435", "0.6438746", "0.6426331", "0.6404832", "0.64016557", "0.6392316", "0.6389821", "0.6368887", "0.6358594", "0.63535553", "0.63453454", "0.6342935", "0.6342262", "0.6339807", "0.6335119", "0.6331758", "0.62937266", "0.6291567", "0.62903476", "0.62611794", "0.625872", "0.6250398", "0.62489265", "0.6246632", "0.62464774", "0.6240728", "0.62235916", "0.622306", "0.6212488", "0.62096506", "0.620909", "0.6205964", "0.6203289", "0.6202147", "0.61996275", "0.6195563", "0.61937016", "0.61891824", "0.6188649", "0.61843723", "0.6182472", "0.61707824", "0.6163091", "0.61611193", "0.6152457", "0.6150175", "0.6148904", "0.61392164", "0.6135159", "0.61300695", "0.61292785", "0.6128703", "0.6126351", "0.61245286", "0.61212164", "0.611509", "0.6115077", "0.6110409", "0.6101204", "0.60991955", "0.60936", "0.60909545", "0.60896754", "0.60880107", "0.608646", "0.6084664", "0.60813177", "0.6079418", "0.6077979", "0.60731494", "0.6072919", "0.6070934", "0.607073", "0.6066509", "0.6061725", "0.60482657" ]
0.0
-1
Send message on email admin, that user registered
public function alert(array $array, array $customerInfo) { // Send to main admin email if new account email is enabled if (in_array('account', (array)$this->config->get('config_mail_alert'))) { $language = new Language('ru-ru'); $language->load('ru-ru'); $language->load('mail/customer'); $data['html'] = $this->getHtmlForEmail($language, 2, HTTP_CATALOG); $data['firstname'] = $customerInfo['firstname']; $data['lastname'] = $customerInfo['lastname']; $data['email'] = $array['email']; $data['text_firstname'] = $language->get('text_firstname'); $data['text_lastname'] = $language->get('text_lastname'); $data['text_customer_group'] = $language->get('text_customer_group'); $data['text_new_customer'] = $language->get('text_new_customer'); $data['text_email'] = $language->get('text_email'); $data['text_telephone'] = $language->get('text_telephone'); $data['telephone'] = $customerInfo['telephone']; $data['store_url'] = HTTP_SERVER; $data['store'] = html_entity_decode( $this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8' ); if (isset($customerInfo['customer_group_id'])) { $customerGroupId = $customerInfo['customer_group_id']; } else { $customerGroupId = $this->config->get('config_customer_group_id'); } $this->load->model('customer/customer_group'); $customerGroupInfo = $this->model_customer_customer_group->getCustomerGroup($customerGroupId); if ($customerGroupInfo) { $data['customer_group'] = $customerGroupInfo['name']; } else { $data['customer_group'] = ''; } $mail = new Mail($this->config->get('config_mail_engine')); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode( $this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8' ); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setFrom($this->config->get('config_email')[$this->config->get('config_country_id')]); $mail->setSender(html_entity_decode( $this->config->get('config_name')[$this->config->get('config_country_id')], ENT_QUOTES, 'UTF-8' )); $mail->setSubject(html_entity_decode( $language->get('text_new_customer'), ENT_QUOTES, 'UTF-8' )); $mail->setHtml($this->load->view('mail/register_alert', $data)); $mail->send(); $emails = explode(',', $this->config->get('config_mail_alert_email')); foreach ($emails as $email) { if (utf8_strlen($email) > 0 && filter_var($email, FILTER_VALIDATE_EMAIL)) { $mail->setTo($email); $mail->send(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "function new_user_email_admin_notice()\n {\n }", "protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }", "function itstar_send_registration_admin_email($user_id){\n // add_user_meta( $user_id, 'hash', $hash );\n \n \n\n $message = '';\n $user_info = get_userdata($user_id);\n $to = get_option('admin_email'); \n $un = $user_info->display_name; \n $pw = $user_info->user_pass;\n $viraclub_id = get_user_meta( $user_id, 'viraclub', 1);\n\n $subject = __('New User Have Registered ','itstar').get_option('blogname'); \n \n $message .= __('Username: ','itstar').$un;\n $message .= \"\\n\";\n $message .= __('Password: ','itstar').$pw;\n $message .= \"\\n\\n\";\n $message .= __('ViraClub ID: ','itstar').'V'.$viraclub_id;\n\n \n //$message .= 'Please click this link to activate your account:';\n // $message .= home_url('/').'activate?id='.$un.'&key='.$hash;\n $headers = 'From: <[email protected]>' . \"\\r\\n\"; \n wp_mail($to, $subject, $message); \n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "public function sendGlobalUserActivated()\n {\n if ($this->_sendMails) {\n $row = $this->getModel()->getKwfUserRowById($this->id);\n $mail = new Kwf_User_Mail_GlobalUserActivated($row);\n $mail->send();\n $this->writeLog('user_mail_GlobalUserActivation');\n }\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "private function mailToevoegenAction()\n {\n $this->model->maakMail();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> E-mail adres is toegevoed. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Mail toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "function emailToAdmin($params, $admin='[email protected]'){\r\n\r\n \t$this->email->from($params['email'], $params['firstname'].' '.$params['lastname']);\r\n \t$this->email->to($admin);\r\n \t$this->email->cc('[email protected]');\r\n \t$this->email->bcc('[email protected]');\r\n \t$this->email->subject('A new member has registered');\r\n\r\n \t$message = \"Name: \".$params['firstname'].' '.$params['lastname'].\"\\n\";\r\n \t$message .= \"Business Name: \".$params['businessname'].\"\\n\";\r\n \t$message .= \"Email: \".$params['email'].\"\\n\";\r\n \t$message .= \"Zip Code: \".$params['postalcode'].\"\\n\";\r\n \t$message .= \"Link: \".$params['link'].\"\\n\";\r\n \t$message .= \"Info: \".$params['info'].\"\\n\";\r\n \t$message .= \"Role: \".$params['role'].\"\\n\";\r\n\r\n \t$this->email->message($message);\r\n\r\n \t$res = $this->email->send();\r\n }", "protected function notify(User $user){\n// '<a href=\"'.action('ProfileController@getActivate', $user->activation_code).'\">Activate My Email</a>';\n// //$msgBody = 'Your activation code is '.$user->phoneActivationCode;\n// $msgBody = 'Thank you for registering with our consultation services,\\nAn activation email has been sent to your mail, please activate it in order to access your account.';\n $emailData= [\n 'name'=>$user->name,\n 'link'=>action('UserController@getActivate', $user->activation_code)\n ];\n SharedFunctions::sendEmailTo('emails.welcome', $user->email,\n 'Register mail', $emailData);\n //SharedFunctions::sendSMS($user->phone, $msgBody);\n }", "public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }", "private function __sendNewAdminEmail($data) {\n\t\t$link = Router::Url('/', TRUE) . 'admin';\n\t\t$emailData = array(\n\t\t\t'username' => $data['username'],\n\t\t\t'email' => $data['email'],\n\t\t\t'password' => $data['password'],\n\t\t\t'link' => $link\n\t\t);\n\t\t$templateId = EmailTemplateComponent::NEW_ADMIN_EMAIL_TEMPLATE;\n\t\t$emailManagement = $this->EmailTemplate->getEmailTemplate($templateId, $emailData);\n\n\t\t$mailData = array(\n\t\t\t'subject' => $emailManagement['EmailTemplate']['template_subject'],\n\t\t\t'to_name' => $data['username'],\n\t\t\t'to_email' => $data['email'],\n\t\t\t'content' => json_encode($emailData),\n\t\t\t'module_info' => 'admin',\n\t\t\t'email_template_id' => $templateId\n\t\t);\n\n\t\t$this->EmailQueue->createEmailQueue($mailData);\n\t}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public static function sendWelcomeEmail($member_id, $emailaddress, $user_name, $password, $email_message = ''): void\n\t{\n\t\tif(empty($member_id) || empty($emailaddress) || empty($user_name) || empty($password)) return;\n\t\t$login_link = DashboardController::getLoginLink();\n\t\t$message = sprintf(__('Welkom bij %s', 'dda'), get_bloginfo('name')). \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Je bent aan %s toegevoegd.', 'dda'), get_the_title($member_id)). \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Gebruikersnaam: %s of %s', 'dda'), $user_name, $emailaddress).\"\\r\\n\";\n\t\t$message .= sprintf(__('Wachtwoord: %s', 'dda'), $password).\"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Bezoek het volgende adres om in te loggen: %s', 'dda'), $login_link). \"\\r\\n\\r\\n\";\n\n\t\tif($email_message) {\n\t\t\t$message .= $email_message;\n\t\t} else {\n\t\t\t$message .= __('We hebben je nog niet toegevoegd aan onze lijst met leden, zodra je de bedrijfsgegevens invult via mijn DDA, wordt je bedrijf toegevoegd aan de lijst met leden.', 'dda');\n\t\t}\n\n\t\twp_mail($emailaddress, 'Welkom bij '.get_bloginfo('name').'!', $message);\n\t}", "function itstar_user_registration_welcome_email($user_id){\n // $hash = md5( $random_number );\n // add_user_meta( $user_id, 'hash', $hash );\n \n $admin_email = get_option('admin_email');\n\n $user_info = get_userdata($user_id);\n $to = $user_info->user_email; \n $un = $user_info->display_name; \n $pw = $user_info->user_pass;\n $viraclub_id = get_user_meta( $user_id, 'viraclub', 1);\n\n $subject = __('Welcome to ','itstar').get_option('blogname'); \n $message = __('Hello,','itstar').$un;\n $message .= \"\\n\\n\";\n $message .= __('Welcome to Our Site','itstar');\n $message .= \"\\n\\n\";\n $message .= __('Username: ','itstar').$un;\n $message .= \"\\n\";\n $message .= __('Password: ','itstar').$pw;\n $message .= \"\\n\\n\";\n $message .= __('ViraClub ID: ','itstar').'V'.$viraclub_id;\n //$message .= 'Please click this link to activate your account:';\n // $message .= home_url('/').'activate?id='.$un.'&key='.$hash;\n $headers = 'From: <[email protected]>'.\"\\r\\n\"; \n wp_mail($to, $subject, $message); \n}", "public function sendRegistrationEmail()\n {\n $loginToken=$this->extractTokenFromCache('login');\n\n $url = url('register/token',$loginToken);\n Mail::to($this)->queue(new RegistrationConfirmationEmail($url));\n }", "function alertAdmin($subj,$msg) {\n global $cfg;\n $to=$cfg?$cfg->getAdminEmail():ADMIN_EMAIL;\n $from=$cfg?$cfg->getAlertEmail():ADMIN_EMAIL;\n //Send alert to admin.\n Misc::sendmail($to,$subj,$msg,$from); \n }", "private function emailAtLogin() {}", "private function __sendAdminActivatedEmail($adminUserData) {\n\t\t$adminUser = $adminUserData['User'];\n\t\t$email = $adminUser['email'];\n\t\t$templateData = array(\n\t\t\t'username' => $adminUser['username']\n\t\t);\n\n\t\t$Api = new ApiController();\n\t\t$Api->constructClasses();\n\t\t$templateId = EmailTemplateComponent::ADMIN_ACTIVATED_EMAIL_TEMPLATE;\n\t\t$Api->sendHTMLMail($templateId, $templateData, $email);\n\t}", "public function emailUser () {\n\t\t\t// Load the data helper class and get user instance\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$user = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t// Load the authentication model that belongs with logged in user\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $user->getUserId () );\n\t\t\t$auth->setId ( $user->getUserId () );\n\t\t\t// Construct the user contact's full name\n\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t// Format timestamp date and time\n\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t$timestampDate = \"-\";\n\t\t\t$timestampTime = \"-\";\n\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Construct and send out ban notice email to user\n\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_user\");\n\t\t\t$template->setSenderEmail ( Mage::getStoreConfig (\"trans_email/ident_general/email\") );\n\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t$template->setType (\"html\");\n\t\t\t$template->setTemplateSubject (\n\t\t\t\tMage::helper (\"twofactor\")->__(\"Your Magento admin account is locked\")\n\t\t\t);\n\t\t\t$template->send ( $user->getEmail (), $fullName,\n\t\t\t\tarray (\n\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\"username\" => $user->getUsername (),\n\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "private function sendDailyAdminEmail()\n {\n // Message\n $message = (new AdministratorDaily())->onQueue('platform-processing');\n // User Setting\n $settingProvider = (new PlatformSettingProvider());\n Mail::to($settingProvider->setting('admin_notification_email'),$settingProvider->setting('admin_notification_name'))\n ->send($message);\n Log::info(\"Sent Admin Email\");\n }", "public static function rb_casting_send_notification($user_id, $plaintext_pass = ''){\r\n\r\n\t\t\t\t$user = new WP_User($user_id);\r\n\r\n\t\t\t\t$user_login = stripslashes($user->user_login);\r\n\t\t\t\t$user_email = stripslashes($user->user_email);\r\n\r\n\t\t\t\t$message = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('Username: %s'), $user_login) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('E-mail: %s'), $user_email) . \"<br>\";\r\n\r\n\t\t\t\t$rb_agency_options_arr = get_option('rb_agency_options');\r\n\t\t\t\t$rb_agency_email = $rb_agency_options_arr[\"rb_agency_option_agencyemail\"];\r\n\t\t\t\t$rb_agency_email_can_received = $rb_agency_options_arr[\"rb_agency_option_agency_email_receive_notification\"] > 0 ? 1 : 0;\r\n\t\t\t\tadd_filter('wp_mail_content_type','rb_agency_set_content_type');\r\n\t\t\t\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);\r\n\r\n\t\t\t\tif($rb_agency_email_can_received > 0){\r\n\t\t\t\t\twp_mail($rb_agency_email, sprintf(__('[%s] New User Registration')), $message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( empty($plaintext_pass) )\r\n\t\t\t\t\treturn;\r\n\t\t\t\t$message = __('Hi there,',RBAGENCY_casting_TEXTDOMAIN) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__(\"Thanks for joining %s! Here's how to log in:\",RBAGENCY_casting_TEXTDOMAIN), get_option('blogname')) . \"<br><br>\";\r\n\t\t\t\t$message .= __('Login: ',RBAGENCY_interact_TEXTDOMAIN).\"<a href='\".get_option('home') .\"/casting-login'>\".get_option('home') .\"/casting-login </a><br>\";\r\n\t\t\t\t$message .= sprintf(__('Username: %s',RBAGENCY_casting_TEXTDOMAIN), $user_login) . \"<br>\";\r\n\t\t\t\t$message .= sprintf(__('Password: %s',RBAGENCY_casting_TEXTDOMAIN), $plaintext_pass) . \"<br><br>\";\r\n\t\t\t\t$message .= sprintf(__('If you have any problems, please contact us at %s.',RBAGENCY_casting_TEXTDOMAIN), get_option('admin_email')) . \"<br><br>\";\r\n\t\t\t\t$message .= __('Regards,',RBAGENCY_casting_TEXTDOMAIN).\"<br>\";\r\n\t\t\t\t$message .= get_option('blogname') . __(' Team',RBAGENCY_casting_TEXTDOMAIN) .\"<br>\";\r\n\t\t\t\t$message .= get_option('home') .\"<br>\";\r\n\t\t\t\t$message .= \"<br>\";\r\n\t\t\t\t$message .= '<img src=\"'.get_option('home').$rb_agency_options_arr['rb_agency_option_agencylogo'].'\" width=\"200\">';\r\n\t\t\t\t$headers = 'From: '. get_option('blogname') .' <'. get_option('admin_email') .'>' . \"<br>\";\r\n\r\n\t\t\t\t//add_filter( 'wp_mail_content_type', function set_content_type( $content_type ) {\r\n\t\t\t\t\t//return 'text/html';\r\n\t\t\t\t//});\r\n\t\t\t\tadd_filter('wp_mail_content_type','rb_agency_set_content_type');\r\n\t\t\t\twp_mail($user_email, sprintf(__('%s Registration Successful! Login Details',RBAGENCY_casting_TEXTDOMAIN), get_option('blogname')), $message, $headers);\r\n\t\t}", "public function send()\n\t{\n $user = new User();\n\n // Send mail to user with password if username exists\n return $user->sendEmail(Database::connection(), $_POST['username']);\n }", "function svbk_rcp_email_on_registration( $user_id ) {\n\t\n\tglobal $rcp_options;\n\n\t$rcp_member = new RCP_Member( $user_id );\n\n\t$emails = new RCP_Mandrill_Emails();\n\t$emails->member_id = $rcp_member->ID;\n\t\n\t$to = array(\n\t\t'email' => $rcp_member->user_email,\n\t\t'name' => $rcp_member->first_name . ' ' . $rcp_member->last_name,\n\t\t'type' => 'to',\n\t);\n\n\t$template = isset($rcp_options['mandrill_template_user_reg']) ? $rcp_options['mandrill_template_user_reg'] : '';\n\n\tif( $template && $emails->sendTemplate( $template, $to ) ) {\n\t\trcp_log( sprintf( '[Mandrill Emails] Registration email sent to user %s. Template : %s', $rcp_member->first_name . ' ' . $rcp_member->last_name, $template ) );\n\t} else {\n\t\trcp_log( sprintf( '[Mandrill Emails] Registration email not sent to user %s - template %s is empty or invalid.', $rcp_member->first_name . ' ' . $rcp_member->last_name, $template ) );\n\t}\n\t\n}", "public function sendConfirmationEmailMessage(UserInterface $user): void;", "function adminEmail($arr)\n{\n\t$email = $arr['email'];\n\t$module = new sociallogin();\n\t$sub = $module->l('New User Registration', 'sociallogin_functions');\n\t$msg = $module->l('New User Registered to your site<br/> E-mail address: ', 'sociallogin_functions');\n\t$msg .= $email;\n\tif (_PS_VERSION_ >= 1.6)\n\t{\n\t\t$vars = array('{name}' => 'admin', '{message}' => $msg, '{subject}' => $sub);\n\t\t$mail_format = 'lrsociallogin_account';\n\t}\n\telse\n\t{\n\t\t$vars = array('{email}' => $email, '{message}' => $msg);\n\t\t$mail_format = 'contact';\n\t}\n\t$db = Db::getInstance()->ExecuteS('SELECT * FROM '.pSQL(_DB_PREFIX_).'employee WHERE id_profile=1 ');\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tforeach ($db as $row)\n\t{\n\t\t$find_email = $row['email'];\n\t\tMail::Send($id_lang, $mail_format, $sub, $vars, $find_email);\n\t}\n}", "public function sendEmailUser($data)\n {\n $subject = 'Welcome to Our Atari Portal';\n $to_email = $data['email'];\n $url = $data['url'];\n Mail::send('emails.verify-email', ['username'=>$data['name'],'url'=>$url], function ($message) use ($subject, $to_email){ \n $message->subject($subject);\n $message->to($to_email);\n });\n }", "function send_registration_notice( $user_id ) {\n\n\t\t\t$the_user = get_userdata( $user_id );\n\t\t\t$user_email = $the_user->user_email;\n\t\t\t$user_name = $the_user->first_name . ' ' . $the_user->last_name;\n\n\t\t\t$from = Project045_Definitions::$email_from;\n\t\t\t$to = Project045_Definitions::$email_from;\n\t\t\t$subject = 'Nuevo registro de usuario';\n\t\t\t$message = \"Nombre: \" . $user_name . \"\\nEmail: \" . $user_email;\n\t\t\t$headers = 'From: Project045 <' . Project045_Definitions::$email_from . '>';\n\t\t\twp_mail( $to, $subject, $message, $headers );\t\n\n\t\t}", "public function send()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('Mail');\n\t\tif ($model->send())\n\t\t{\n\t\t\t$type = 'message';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$msg = $model->getError();\n\t\t$this->setredirect('index.php?option=com_users&view=mail', $msg, $type);\n\t}", "function send_a_custom_email_fn( $user_id ) {\r\n\t$user = get_user_by( 'ID', $user_id );\r\n\t$email = $user->user_email;\r\n\r\n\t// Setup email data\r\n\t$subject = \"Thank you for registering on my site!\";\r\n\t$message = \"Hi there, Thank you for signing up for our site. An administrator will be in touch shortly to confirm your account.\";\r\n\t$headers = $headers = array('Content-Type: text/html; charset=UTF-8', 'From: Andrew <deepakshukla.com>');\r\n\r\n\twp_mail( $email, $subject, $message, $headers );\r\n}", "public function sendWelcomeMail()\n {\n $user = Auth::user();\n \n $this->mailer->send('user.welcome', compact('user'), function (Message $message) use($user) {\n $message\n ->to($user->email)\n ->subject('Welcome! hope you enjoy your stay. :)');\n });\n }", "function ask_admin($querstion_for_admin){\n\t\tif( isset($_POST[$querstion_for_admin]) ){\n\t\t\tglobal $base;\n\n\t\t\t$content = $base->clear_string($_POST[$querstion_for_admin]);\n\n\t\t\t$query = \"SELECT * FROM users WHERE role='master_admin'\";\n $find_id = user::find_this_query($query);\n $master_admin_id='';\n\t foreach ($find_id as $id) {\n\t $master_admin_id = $id->user_id;\n\t\t\t\t}\n\n\t\t\t$user = user::find_this_id( $base->clear_string($_SESSION['user_id']) );\n\n\t\t\t$messages_admin = new messages_admin();\n\t\t\t$messages_admin->admin_id\t= $master_admin_id;\n\t\t\t$messages_admin->client_id \t= $user->user_id;\n\t\t\t$messages_admin->content \t= $content;\n\t\t\t$messages_admin->date \t\t= date('Y-m-d H:i:s');\n\n\t\t\t\n\t\t\t$messages_admin->create();\n\n\t\t\tmail('[email protected]', 'Pitanje Korisnika: '.$user->name, $content, \"From: \".$user->email);\n\n\t\t}\n\t}", "public static function sendRegistrationEmail($member_id, $emailaddress, $user_name, $password): void\n\t{\n\t\tif(empty($member_id) || empty($emailaddress) || empty($user_name) || empty($password)) return;\n\t\t$login_link = DashboardController::getLoginLink();\n\t\t$message = sprintf(__('Welkom bij %s', 'dda'), get_bloginfo('name')). \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Je bent aan %s toegevoegd.', 'dda'), get_the_title($member_id)). \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Gebruikersnaam: %s', 'dda'), $user_name).\"\\r\\n\";\n\t\t$message .= sprintf(__('Wachtwoord: %s', 'dda'), $password).\"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Bezoek het volgende adres om in te loggen: %s', 'dda'), $login_link). \"\\r\\n\\r\\n\";\n\t\twp_mail($emailaddress, 'Welkom bij '.get_bloginfo('name').'!', $message);\n\t}", "public function notify() \n {\n $user = User::find()->where(['username' => $this->username])->one();\n if (!$user) {\n return false;\n }\n \n if ($this->isPhone()) {\n // Notify by SMS\n if (!$this->password) {\n return false;\n }\n Yii::$app->sms->send($user->username, 'Your password is: ' . $this->password);\n } else {\n // Notify by email\n $user->generateVerificationToken();\n if ($user->save()) {\n $mail = Yii::$app->mailer->compose('notify', ['model' => $user])\n ->setFrom('[email protected]')\n ->setTo($user->username)\n ->setSubject('Complete Your Registration')\n ->send();\n }\n }\n \n return true;\n }", "public function sendUserUpdateNotification(): void\n {\n $this->notify(new VerifyAccountNotification());\n }", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "private function sendAdminData($data, $user)\n {\n $adminEmail = QpSettings::get('email_contact');\n $data['logo'] = 'http://media.logimonde.net/image/quickpresse/quickpresse.png';\n $data['user'] = $user;\n $data['host'] = $this->host;\n $data['adminEmails'] = (env('APP_ENV') == 'dev') ? '[email protected]' : explode(';', trim($adminEmail));\n\n \\Mail::send('logimonde.account::mail.new_user', $data, function ($message) use ($data, $user) {\n $message->to($data['adminEmails']);\n if (isset($data['logo_name_en']) && $data['logo_name_en'] != '') {\n $message->attach($data['logo_name_en']);\n }\n if (isset($data['logo_name_fr']) && $data['logo_name_fr'] != '') {\n $message->attach($data['logo_name_fr']);\n }\n });\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function it_sends_notification_to_user()\n {\n $this->migrateDatabase();\n $this->createUser();\n $user = UserModel::first();\n $bus = app('Joselfonseca\\LaravelTactician\\CommandBusInterface');\n $bus->addHandler('JJSoft\\SigesCore\\Notifications\\SendAppNotification\\SendAppNotificationCommand',\n 'JJSoft\\SigesCore\\Notifications\\SendAppNotification\\Handler\\SendAppNotificationCommandHandler');\n $bus->dispatch('JJSoft\\SigesCore\\Notifications\\SendAppNotification\\SendAppNotificationCommand', [\n 'user' => $user,\n 'type' => 'success',\n 'message' => 'Some Message'\n ],\n [\n 'JJSoft\\SigesCore\\Notifications\\SendAppNotification\\Middleware\\SetTheUserId'\n ]);\n $this->seeInDatabase('app_notifications', [\n 'user_id' => $user->id,\n 'type' => 'success',\n 'message' => 'Some Message'\n ]);\n }", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "function message(){\n\t\t\treturn \"New Admin has been successfully created!\";\n\t\t}", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function broadcastOn($user)\n {\n \n return $this->mailer->to($user->email)->send(new Regemail($user,\"Successfully registered with Brigade poll\"));\n \n }", "public function sendAction()\n {\n $_POST['email'] = Auth::getEmail();\n $chat = new Chat($_POST);\n $chat->send();;\n\n }", "public function sendAdminEmail($template, $user)\r\n {\r\n\t\t$to = User::findAdminEmails();\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('admin', $template, $to, $args);\r\n\t}", "function _mailToUser($userVoornaam, $userAchternaam, $userUsername, $userEmail, $generatedPassword) {\n $to = $userEmail;\n $subject = 'TEDxPXL registratie';\n $message = \"Beste \" . $userVoornaam . \" \" . $userAchternaam . \"\\n\\nBedankt voor uw registratie bij TEDxPXL.\\nU kan nu inloggen met \" . $userUsername . \" met als wachtwoord \" . $generatedPassword . \"\\nU zal uw wachtwoord moeten wijzigen bij de eerste keer inloggen.\\n\\nMet vriendelijke groet\\n\\nTEDxPXL Administratie\";\n $headers = 'From: [email protected]';\n if (!mail($to, $subject, $message, $headers)) {\n //echo \"Email sending failed\";\n }\n }", "function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "public function notifyUser()\n { \n $message = trim(Input::get('message'));\n $apiType = trim(Input::get('apiType'));\n $mobileNotificationService = App::make('MobileNotificationService');\n $mobileNotificationService->notifyMobileAppUser($message, $apiType, App::environment('production')); \n }", "public function sendEmail(): void\n {\n echo 'email sent';\n }", "public function sendEmailVerificationNotification();", "public function send_mail_to_accepted_user($username) {\n }", "function client_ask_admin($submit_button, $client_name, $client_email, $client_phone, $client_msg_content){\n\t\tif( isset($_POST[$submit_button]) ){\n\t\t\t\tglobal $base;\n\n\t\t\t\t$query = \"SELECT * FROM users WHERE role='master_admin'\";\n\t $find_id = user::find_this_query($query);\n\t $master_admin_id='';\n\t\t foreach ($find_id as $id) {\n\t\t $master_admin_id = $id->user_id;\n\t\t\t\t\t}\n\n\t\t\t\t$messages_admin = new messages_admin();\n\t\t\t\t$messages_admin->admin_id\t\t= $master_admin_id;\n\t\t\t\t$messages_admin->client_name\t= $_POST[$client_name];\n\t\t\t\t$messages_admin->client_email\t= $_POST[$client_email];\n\t\t\t\t$messages_admin->client_phone\t= $_POST[$client_phone];\n\t\t\t\t$messages_admin->content \t\t= $_POST[$client_msg_content];\n\t\t\t\t$messages_admin->date \t\t\t= date('Y-m-d H:i:s');\n\n\t\t\t\t\n\t\t\t\t$messages_admin->create();\n\n\t\t\t\tmail( '[email protected]', 'Pitanje Externog Korisnika: '.$base->clear_string($_POST[$client_name]), $base->clear_string($_POST[$client_msg_content]), \"From: \".$base->clear_string($_POST[$client_email]) );\n\t\t\t\t\n\n\t\t\t\techo (\"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\t\twindow.alert('Uspešno Ste poslali poruku. Odgovor će Vam biti prosleđen na E-mail.')\n\t\t\t\t \twindow.location.href='../../../contact.php';\n\t\t\t\t </SCRIPT>\n\t\t\t\t\");\n\n\t\t\t}\n}", "public function resendConfirmationMailAction()\n {\n // @todo find a better way to fetch the data\n $result = GeneralUtility::_GP('tx_femanager_pi1');\n if (is_array($result)) {\n if (GeneralUtility::validEmail($result['user']['email'])) {\n $user = $this->userRepository->findFirstByEmail($result['user']['email']);\n if (is_a($user, User::class)) {\n $this->sendCreateUserConfirmationMail($user);\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailSend'),\n '',\n AbstractMessage::INFO\n );\n $this->redirect('resendConfirmationDialogue');\n }\n }\n }\n $this->addFlashMessage(\n LocalizationUtility::translate('resendConfirmationMailFail'),\n LocalizationUtility::translate('validationError'),\n AbstractMessage::ERROR\n );\n $this->redirect('resendConfirmationDialogue');\n }", "public function sendMail($thisUser){\n Mail::to($thisUser['email'])->send(new welcome($thisUser));\n\n }", "public function add_welcome_email() {\n $post_exists = post_exists( '[{{{site.name}}}] Welcome!' );\n \n if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' )\n return;\n \n // Create post object\n $my_post = array(\n 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress-welcome-email' ),\n 'post_content' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // HTML email content.\n 'post_excerpt' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // Plain text email content.\n 'post_status' => 'publish',\n 'post_type' => bp_get_email_post_type() // this is the post type for emails\n );\n \n // Insert the email post into the database\n $post_id = wp_insert_post( $my_post );\n \n if ( $post_id ) {\n // add our email to the taxonomy term 'activation_completed'\n // Email is a custom post type, therefore use wp_set_object_terms\n \n $tt_ids = wp_set_object_terms( $post_id, 'activation_completed', bp_get_email_tax_type() );\n foreach ( $tt_ids as $tt_id ) {\n $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() );\n wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(\n 'description' => 'Recipient has successfully activated an account.',\n ) );\n }\n }\n }", "public function notifyReporter()\r\n {\r\n $message = new Message();\r\n if (!$message->create())\r\n {\r\n return false;\r\n } \r\n \r\n $message->from( \"TicketSystem\" ); \r\n $message->to( $this->getReporter() ); \r\n $message->subject( \"Antwort auf Ticket #\".$this->getId() );\r\n \r\n $subJ = $this->getSubject();\r\n $tID = $this->getId();\r\n \r\n $msgText = \"Deinem Ticket mit dem Betreff \\\"\".$subJ.\"\\\" wurde eine neue Nachricht hinzugefügt.<br/><br/>\";\r\n $msgText .= \"<a href=\\\"ticketsystem.php?ticketid=\".$tID.\"\\\">Klicke hier um zum Ticket zu gelangen</a>\"; \r\n \r\n $message->text( $msgText ); \r\n $message->html( true );\r\n \r\n $message->addUser( $this->getReporter(), 6 ); \r\n\r\n unset( $message ); \r\n }", "public function sendGoodbyeMail()\n {\n $user = Auth::user();\n\n $this->mailer->send('user.goodbye', compact('user'), function (Message $message) use($user) {\n $message\n ->to($user->email)\n ->subject('Sorry to see you leave...');\n });\n }", "private function verzendmailAction()\n {\n $factuur_id = $_POST['Factuur_id'];\n $factuur = $this->model->geefFactuur();\n $this->model->stuurMail($factuur);\n $productenOud = $_SESSION['geselecteerdeProducten'];\n $productenNieuw = $_SESSION['producten'];\n $this->model->wijzigMagazijn($productenNieuw, $productenOud);\n $this->forward('klant', 'admin');\n }", "function notify_register($email, $name) {\n\t$text = \"Hello $name,\\n\";\n\t$text .= \"\\nThanks for registering for an account with Ma-Maria. You will use this email address to login to your account.\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Registration', $text);\n\t}\n}", "function wp_new_user_notification($user_id, $plaintext_pass = '', $flag='') {\r\n\tif(func_num_args() > 1 && $flag !== 1)\r\n\t\treturn;\r\n\r\n\t$user = new WP_User($user_id);\r\n\r\n\t$user_login = stripslashes($user->user_login);\r\n\t$user_email = stripslashes($user->user_email);\r\n\r\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\r\n\t// we want to reverse this for the plain text arena of emails.\r\n\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\r\n\r\n\t$message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\r\n\t$message .= sprintf(__('Username: %s'), $user_login) . \"\\r\\n\\r\\n\";\r\n\t$message .= sprintf(__('E-mail: %s'), $user_email) . \"\\r\\n\";\r\n\r\n\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\r\n\t\r\n\tif ( empty($plaintext_pass) )\r\n\t\treturn;\r\n\r\n\t// 你可以在此修改发送给用户的注册通知Email\r\n\t$message = sprintf(__('Username: %s'), $user_login) . \"\\r\\n\";\r\n\t$message .= sprintf(__('Password: %s'), $plaintext_pass) . \"\\r\\n\";\r\n\t$message .= '登陆网址: ' . wp_login_url() . \"\\r\\n\";\r\n\r\n\t// sprintf(__('[%s] Your username and password'), $blogname) 为邮件标题\r\n\twp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);\r\n}", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function sendEmailAction()\n {\n $username = $this->container->get('request')->request->get('username');\n $t = $this->container->get('translator');\n\n /** @var $user UserInterface */\n $user = $this->container->get('fos_user.user_manager')->findUserByUsernameOrEmail($username);\n\n if (null === $user) {\n return $this->returnAjaxResponse(self::NO_USER, array('invalid_username' => $username));\n }\n if ($user->isPasswordRequestNonExpired($this->container->getParameter('fos_user.resetting.token_ttl'))) {\n return $this->returnAjaxResponse(self::TTL_EXPIRED);\n }\n\n if (null === $user->getConfirmationToken()) {\n /** @var $tokenGenerator \\FOS\\UserBundle\\Util\\TokenGeneratorInterface */\n $tokenGenerator = $this->container->get('fos_user.util.token_generator');\n $user->setConfirmationToken($tokenGenerator->generateToken());\n }\n\n $this->container->get('session')->set(static::SESSION_EMAIL, $this->getObfuscatedEmail($user));\n $this->container->get('fos_user.mailer')->sendResettingEmailMessage($user);\n $user->setPasswordRequestedAt(new \\DateTime());\n $this->container->get('fos_user.user_manager')->updateUser($user);\n\n $url = $this->container->get('router')->generate('fos_user_resetting_check_email',array(),TRUE);\n return new CheckAjaxResponse(\n $url,\n array('success'=>TRUE, 'url' => $url, 'title'=>$t->trans('Email confirmation sent'))\n );\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function sendMailAction()\n {\n $request = $this->get('request');\n $user = new User();\n $form = $this->createForm(new UserType(), $user);\n\n\n // modification pour avoir un id 1 dans categorie -> DOIT valider l'user dans php my admin...\n\n $em = $this->getDoctrine()->getManager();\n $categorie = $em->getRepository('ElevenmxBundle:Categorie')->findOneBy(array('id' => '1'));\n $user->setCategorie($categorie);\n $form->handleRequest($request);\n\n $user->setEnabled(1);\n\n $categorie = $form->get('categorie')->getData();\n if ($categorie == 'client') {\n $user->setRoles(array('ROLE_USER'));\n } elseif ($categorie == 'admin') {\n $user->setRoles(array('ROLE_ADMIN'));\n } else {\n $user->setRoles(array('ROLE_GRAPH'));\n }\n $plainpassword = $form->get('plain_password')->getData();\n\n\n if ($form->isSubmitted()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($user);\n $em->flush();\n\n $message = \\Swift_Message::newInstance()\n ->setSubject('Inscription à Eleven MX')\n ->setFrom('[email protected]')\n ->setTo($user->getEmail())\n ->setContentType('text/html')\n ->setBody(\n $this->renderView(\n 'Emails/registration.html.twig',\n array('user' => $user, 'plainpassword' => $plainpassword)\n )\n );\n $this->get('mailer')->send($message);\n return $this->render('ElevenmxBundle:Default:formMail.html.twig', array(\n 'form' => $form->createView()\n ));\n }\n return $this->render('ElevenmxBundle:Default:formMail.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "private function sendConfirmationMail() {\n\t\t\t\t$subject = 'Confirmation Mail';\n\t\t\t\t$from = '[email protected]';\n\t\t\t\t$replyTo = '[email protected]';\n\t\t\t\t\n\t\t\t\t//include some fancy stuff here, token is md5 of email\n\t\t\t\t$message = \"<a href='http://www.momeen.com/eCommerce/register/confirmUser.php?token=$this->token'> Confirm</a>\";\n\n\t\t\t\t$headers = \"From: \".\"$from\".\"\\r\\n\";\n\t\t\t\t$headers .= \"Reply-To: \".\"$replyTo\".\"\\r\\n\";\n\t\t\t\t$headers .= \"MIME-Version:1.0\\r\\n\";\n\t\t\t\t$headers .= \"Content-Type:text/html; charset=ISO-8859-1\\r\\n\";\n\t\t\t\tif(!mail($this->email, $subject, $message, $headers)) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Confirmation mail did not sent. Contact admin';\n\t\t\t\t}\n\t\t\t}", "public function emailAllAdministrators () {\n\t\t\t// Get the authentication model and admin role model\n\t\t\t$admin = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $admin->getUserId () );\n\t\t\t$auth->setId ( $admin->getUserId () );\n\t\t\t$role = Mage::getModel (\"admin/role\");\n\t\t\t// Get the role ID for administrator role\n\t\t\t$roleId = $role;\n\t\t\t$roleId = $roleId->getCollection ();\n\t\t\t$roleId = $roleId->addFieldToFilter ( \"role_name\", array ( \"eq\" => \"Administrators\" ) );\n\t\t\t$roleId = $roleId->getFirstItem ();\n\t\t\t$roleId = $roleId->getId ();\n\t\t\t// Get the users that belong to the administrator role\n\t\t\t$roleUsers = $role;\n\t\t\t$roleUsers = $roleUsers->getCollection ();\n\t\t\t$roleUsers = $roleUsers->addFieldToFilter ( \"parent_id\", array ( \"eq\" => $roleId ) );\n\t\t\t// Loop through all the users belonging to the role\n\t\t\tforeach ( $roleUsers as $roleUser ) {\n\t\t\t\t// Load the data helper class and get user instance\n\t\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t\t$user = Mage::getModel (\"admin/user\")->load ( $roleUser->getUserId () );\n\t\t\t\t// Do not send email if user is inactive\n\t\t\t\tif ( !$user->getIsActive () ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Format timestamp date and time\n\t\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t\t$timestampDate = \"-\";\n\t\t\t\t$timestampTime = \"-\";\n\t\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Construct the user contact's full name\n\t\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t\t// Construct and send out ban notice email to user\n\t\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_admin\");\n\t\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t\t$template->setType (\"html\");\n\t\t\t\t$template->setSenderEmail (\n\t\t\t\t\tMage::getStoreConfig (\"trans_email/ident_general/email\")\n\t\t\t\t);\n\t\t\t\t$template->setTemplateSubject (\n\t\t\t\t\tMage::helper (\"twofactor\")->__(\"2FA ban notice for user \") .\n\t\t\t\t\t$admin->getUsername ()\n\t\t\t\t);\n\t\t\t\t$test = $template->send ( $user->getEmail (), $fullName,\n\t\t\t\t\tarray (\n\t\t\t\t\t\t\"base_admin_url\" => Mage::getUrl (\"adminhtml\"),\n\t\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\t\"last_address\" => $auth->getLastAddress (),\n\t\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\t\"username\" => $admin->getUsername (),\n\t\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'u_email' => $this->username,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n \t$userName = $user->u_name;\n $userEmail = $user->u_email;\n \t \n \tif(!empty($userName) && !empty($userEmail)) {\n $subject = \"[Price Genius]: Your Reset Password Request\";\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['api/reset-password', 'token' => $user->password_reset_token]);\n $content = ['userName' => $userName, 'resetLink' => $resetLink];\n $promotionName = \"Forgot Password\";\n return SendMail::sendSupportMail($user->u_email, $user->u_name, $subject, $content, $promotionName);\n \t\t}\n }\n \n }\n return false;\n }", "function notifyReg($uName,$eMail) { //notify a new user registration\r\n\tglobal $ax, $set, $today;\r\n\t\t\r\n\t//compose email message\r\n\t$subject = \"{$ax['log_new_reg']}: {$uName}\";\r\n\t$msgBody = \"\r\n<p>{$ax['log_new_reg']}:</p><br>\r\n<table>\r\n\t<tr><td>{$ax['log_un']}:</td><td>{$uName}</td></tr>\r\n\t<tr><td>{$ax['log_em']}:</td><td>{$eMail}</td></tr>\r\n\t<tr><td>{$ax['log_date_time']}:</td><td>\".IDtoDD($today).\" {$ax['at_time']} \".ITtoDT(date(\"H:i\")).\"</td></tr>\r\n</table>\r\n\";\r\n\t//send email\r\n\t$result = sendEml($subject,$msgBody,$set['calendarEmail'],1,0,0);\r\n\treturn $result;\r\n}", "function sendEmail($user, $email, $loginInfo){\n\t$to = $email; // Send email to our user\n\t$subject = 'Signup | Verification'; // Give the email a subject \n\t$message = '\n\t \n\tThanks for signing up!\n\tYour account has been created, please verify your account in order to set up your password for your login.\n\t \n\t------------------------\n\tUsername: '.$user.'\n\tPassword: To be added\n\t------------------------\n\t \n\tPlease click this link to activate your account:\n\thttps://www.kobackproducts.ca/editoroverlay/verify.php?email='.$email.'&hash='.$loginInfo.''; // Our message above including the link\n\t\n\t$headers = 'From:[email protected]' . \"\\r\\n\"; // Set from headers\n\tmail($to, $subject, $message, $headers); // Send our email\n\t\n}", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "public function sTellFriend()\n {\n $checkMail = $this->sUserData['additional']['user']['email'];\n\n $tmpSQL = '\n SELECT * FROM s_emarketing_tellafriend WHERE confirmed=0 AND recipient=?\n ';\n $checkIfUserFound = $this->db->fetchRow($tmpSQL, [$checkMail]);\n if ($checkIfUserFound) {\n $this->db->executeUpdate('\n UPDATE s_emarketing_tellafriend SET confirmed=1 WHERE recipient=?\n ', [$checkMail]);\n\n $advertiser = $this->db->fetchRow('\n SELECT email, firstname, lastname FROM s_user\n WHERE s_user.id=?\n ', [$checkIfUserFound['sender']]);\n\n if (!$advertiser) {\n return;\n }\n\n $context = [\n 'customer' => $advertiser['firstname'] . ' ' . $advertiser['lastname'],\n 'user' => $this->sUserData['billingaddress']['firstname'] . ' ' . $this->sUserData['billingaddress']['lastname'],\n 'voucherValue' => $this->config->get('sVOUCHERTELLFRIENDVALUE'),\n 'voucherCode' => $this->config->get('sVOUCHERTELLFRIENDCODE'),\n ];\n\n $mail = Shopware()->TemplateMail()->createMail('sVOUCHER', $context);\n $mail->addTo($advertiser['email']);\n $mail->send();\n } // - if user found\n }", "public function mail()\n\t{\n $this->load->model('mailsjabloon_model');\n $this->load->model('gebruiker_model');\n $data['titel'] = 'Send mails';\n $data['auteur'] = \"<u>Lorenzo M.</u>| Arne V.D.P. | Kim M. | Eloy B. | Sander J.\";\n $data['gebruiker'] = $this->authex->getGebruikerInfo();\n $data['link'] = 'admin/index';\n \n $data['sjablonen'] = $this->mailsjabloon_model->getSjablonen();\n \n $partials = array('hoofding' => 'main_header','menu' => 'main_menu', 'inhoud' => 'mails_versturen');\n $this->template->load('main_master', $partials, $data);\n\t}", "function send_confirmation_mail(UsersEntity $user) {\n $content = $this->view->send_confirmation_mail($user);\n return $this->MailAPI->send_mail($user->email, $content['subject'], $content['body']);\n }", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "function success()\n {\n $message = null;\n $message = \"Một email đã được gửi tới hòm thư của bạn. <br />\";\n $message .= \"Vui lòng kiểm tra hộp thư đến và kích hoạt tài khoản.\";\n $this->view->load('frontend/user/register_success', [\n 'message' => $message\n ]);\n }", "function wp_new_user_notification($user_id, $plaintext_pass = '') {\n\t$user = get_userdata( $user_id );\n\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\n\t// we want to reverse this for the plain text arena of emails.\n\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n\t$signIn = join(array(get_site_url(),'/sign-in/'));\n\n\t$message = sprintf(__('Username: %s'), $user->user_email) . \"\\r\\n\";\n\t$message .= sprintf(__('Password: %s'), $plaintext_pass) . \"\\r\\n\";\n\t$message .= sprintf(__('Sign in at: %s'),$signIn) . \"\\r\\n\";\n\n\twp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);\n\n}", "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n $c = 0;\n foreach ($invites as $user){\n \n $create_at = strtotime($user->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue; \n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'invitation-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n $activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can \".$activation_url.\"!\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n Slack::message(\"CRON >> Invite to join reminders: \".$c);\n return 0;\n }", "function send_activation_mail(UsersEntity $user) {\n $to = $user->email;\n $content = $this->view->send_activation_mail($user);\n return $this->MailAPI->send_mail($to,$content['subject'],$content['body']);\n }", "public function sendCommonAdminNotification($text)\n {\n $this->messenger->sendEmail(\n $this->amd,\n $this->amd,\n 'Notificació pàgina web '.$this->urlBase,\n $this->twig->render('mails/common_user_notification.html.twig', [\n 'text' => $text,\n ])\n );\n }", "public function sendActivationEmail()\n\t{\n\t\t$mailData = [\n\t\t\t'to' => $this->email,\n\t\t\t'from' => '[email protected]',\n\t\t\t'nameFrom' => 'Peter Štovka'\n\t\t];\n\n\n\t\tMail::send('email.activation', ['token' => $this->token], function ($message) use ($mailData) {\n\t\t\t$message->to($mailData['to'], 'Aktivačný email')\n\t\t\t\t->subject('Aktivácia účtu')\n\t\t\t\t->from($mailData['from'], $mailData['nameFrom']);\n\t\t});\n\t}", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "public function sendAction()\n {\n $id = (int) $this->_request->getParam('id', 0);\n $userDto = $this->getDaoUser()->fetchOneWithAvatar('user.id',$id);\n \n if($this->_request->isPost())\n { \n $result = $this->getBusiness()->sendMessage($userDto, $this->_request->getPost('text'));\n \n $url = Qsoft_Helper_Url::generate($this->_request->getControllerName());\n $backLink = '<a href=\"' . $url . '\">' . $this->view->translate('Back to list') . '</a>';\n \n if($result['status'] === true) {\n $this->noticeMessage('Sent message successfully. %s', $backLink);\n } else {\n $this->noticeMessage('Cannot send message, check support user %s', $backLink); \n }\n } \n \n if ($id != 0 AND !$userDto) {\n $this->_redirect($this->_request->getControllerName());\n }\n \n $this->view->item = $userDto; \n }", "public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }", "public function welcomeNewUser(User $user): void\n {\n dispatch(new UserWelcomeEmailJob($user))\n ->onQueue('emails')\n ->delay(now()->addSeconds(5));\n }", "private function _sendNewStatusUpdateEmailToUser()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n\t\t\t$user = \\JFactory::getUser();\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Status Update...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$projectId = $this->recordData['hshrndreview_fk_project_id'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select($db->quoteName(array('name', 'owner')));\n\t\t\t$query->from($db->quoteName('#__hshrndreview_projects'));\n\t\t\t$query->where($db->quoteName('hshrndreview_project_id').\" = \". $projectId);\n\t\t\t$db->setQuery($query);\n\t\t\t$project = $db->loadRow();\n\t\t\t\n\t\t\t$body = \"Thank you for submitting a new status update for project named: \\\"\" . $project['0'] . \"\\\". It has been added to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }" ]
[ "0.7884341", "0.73652416", "0.7296909", "0.7022467", "0.6981888", "0.68622625", "0.68542683", "0.6843973", "0.6833348", "0.6817059", "0.68146116", "0.6803863", "0.6801985", "0.6760432", "0.67151946", "0.66846037", "0.6671598", "0.6661611", "0.66564333", "0.6640074", "0.66275615", "0.6614041", "0.6606045", "0.6599627", "0.6590611", "0.6568778", "0.6568194", "0.65667236", "0.65602016", "0.6552928", "0.6531175", "0.651641", "0.6492122", "0.6477557", "0.64663976", "0.64098954", "0.6402328", "0.63997096", "0.6391633", "0.6385145", "0.635536", "0.6352045", "0.63289094", "0.6317267", "0.6309847", "0.630566", "0.6304958", "0.6301221", "0.62846243", "0.6280168", "0.6270774", "0.6259568", "0.6259095", "0.62550545", "0.6254039", "0.62527806", "0.6249455", "0.6246372", "0.6238249", "0.623439", "0.6228203", "0.6224136", "0.6217018", "0.6212681", "0.6206396", "0.6205114", "0.6201127", "0.61958754", "0.6187047", "0.6183139", "0.6165247", "0.6162948", "0.6157703", "0.61551183", "0.6141562", "0.6137084", "0.6131602", "0.6131412", "0.61296326", "0.611898", "0.6112109", "0.61096454", "0.6108688", "0.6098194", "0.60978657", "0.6092971", "0.609163", "0.60860455", "0.60858566", "0.6084849", "0.6081065", "0.6070398", "0.60651857", "0.60641617", "0.60627455", "0.6061739", "0.60616773", "0.6060798", "0.6052968", "0.60498554", "0.60471857" ]
0.0
-1
Get html content for email message
public function getHtmlForEmail(Language $language, int $languageCustomer, string $storeUrl) { $this->load->model('catalog/information'); if (is_file(DIR_IMAGE . $this->config->get('config_logo'))) { $data['logo'] = $storeUrl . 'image/prolmlogo.png'; } else { $data['logo'] = ''; } $data['splitter'] = $storeUrl . 'image/catalog/splitter.png'; $data['domainLang'] = $this->model_catalog_information->getAddressInfo($languageCustomer); $data['telephone'] = empty($data['domainLang']['phone']) ? $data['domainLang']['phone'] : $this->config->get('config_telephone'); $url = new Url(HTTP_CATALOG, $this->config->get('config_secure') ? HTTP_CATALOG : HTTPS_CATALOG); $data['menu'] = [ 'catalog' => [ 'text' => $language->get('text_catalog'), 'link' => $url->link('product/category'), ], 'payAndDelivary' => [ 'text' => $language->get('text_pay_delivery'), 'link' => $url->link('information/delivery'), ], 'historyOrder' => [ 'text' => $language->get('text_history_order'), 'link' => $url->link('account/order'), ] ]; $data['menuBelow'] = [ 'termsOfUse' => [ 'text' => $language->get('text_terms_of_use'), 'link' => $url->link('information/articles/view', '&article_id=' . 5), ], 'contacts' => [ 'text' => $language->get('text_contacts'), 'link' => $url->link('information/contact'), ] ]; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBodyHtml(): string\n {\n return $this->htmlMessage;\n }", "public function getHTMLBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody('html');\n return $return;\n }", "public function getMailBodyHTML(Notification $notification) : string;", "public function get_content_html() {\n\t\tob_start();\n\t\twc_get_template(\n\t\t\t$this->template_html,\n\t\t\tarray(\n\t\t\t\t'order' => $this->object,\n\t\t\t\t'email_heading' => $this->get_heading(),\n\t\t\t\t'voucher_count' => $this->object['voucher_count'],\n\t\t\t\t'message' => $this->message,\n\t\t\t\t'recipient_name' => $this->recipient_name,\n\t\t\t),\n\t\t\t'',\n\t\t\t$this->template_base\n\t\t);\n\t\treturn ob_get_clean();\n\t}", "public function create_html_email(){\n\n $html = '';\n $html .= '<html>';\n $html .= '<head>';\n $html .= '<title></title>';\n $html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">';\n $html .= '</head>';\n $html .= '<body bgcolor=\"#f0ecec\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">';\n $html .= '<div style=\"background-color:#f0ecec;\">';\n $html .= '<table>';\n $html .= '<tr>';\n $html .= '<td height=\"30\">';\n $html .= '</td>';\n $html .= '</tr>';\n $html .= '</table>';\n $html .= '<table align=\"center\" width=\"650\" border=\"0\" cellpadding=\"30\" cellspacing=\"0\" bgcolor=\"#ffffff\">';\n $html .= '<tr>';\n $html .= '<td colspan=\"8\" bgcolor=\"#ffffff\">';\n $html .= $this->mensagem;\n $html .= \"<br><br>\";\n $html .= 'Obrigado.';\n $html .= \"<br><br>\";\n $html .= '</tr>';\n $html .= '</table>';\n $html .= '<table>';\n $html .= '<tr>';\n $html .= '<td height=\"30\">';\n $html .= '</td>';\n $html .= '</tr>';\n $html .= '</table>';\n $html .= '</div>';\n $html .= '</body>';\n $html .= '</html>';\n\n return $html;\n }", "function getEmailMessage($msg_text, $msg_html) {\n\t$message = \"------=MIME_BOUNDRY_message_parts\\n\";\n\t$message .= \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n\t$message .= \"Content-Transfer-Encoding: quoted-printable\\n\";\n\t$message .= \"Content-ID: RSSmsg\\n\"; //addition\n\t$message .= \"\\n\";\n\t$message .= \"$msg_text \\n\";\n\t$message .= \"\\n\";\n\t/* html section begins */\n\t$message .= \"------=MIME_BOUNDRY_message_parts\\n\";\n\t$message .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\n\t$message .= \"Content-Transfer-Encoding: quoted-printable\\n\";\n\t$message .= \"Content-ID: RSShtmlmsg\\n\"; //addition\n\t$message .= \"\\n\";\n\t/* html message begins */\n\t$message .= \"<link rel=3D\\\"stylesheet\\\" href=3D\\\"https://login.retailservicesystems.com/styles.css\\\" type=3D\\\"text/css\\\">\";\n\t$message .= \"$msg_html \\n\";\n\t/* html message ends */\n\t$message .= \"\\n\";\n\t/* this ends the message part */\n\t$message .= \"------=MIME_BOUNDRY_message_parts--\\n\";\n\t$message .= \"\\n\";\n\t/* message ends */\n\t$message .= \"------=MIME_BOUNDRY_main_message--\\n\";\n\treturn $message;\n}", "public function getMailBody()\n {\n if (sfContext::hasInstance())\n {\n sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');\n }\n\n $content = \n \"<div>\n %%message%%\n </div>\n <div>\n %%partial%%\n </div>\";\n\n $partial = $this->getPartial();\n\n $content = str_replace(array('%%message%%', '%%partial%%'), \n array($this->getMessage(), empty($partial) || !sfContext::hasInstance()? '' : get_partial($partial, array('mt_alert_message' => $this))),\n $content);\n return $content;\n }", "public static function smtp_inner () \n { \n $html = null;\n\n $top = __( 'SMTP Send : Message', 'default-message' );\n $inner = self::smtp_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'smtp', $top, $inner, $bottom );\n\n return $html;\n }", "public function get_content_html() {\n\n\t\treturn wc_get_template_html( $this->template_html, [\n\t\t\t'order' => $this->object,\n\t\t\t'email_heading' => $this->get_heading(),\n\t\t\t'sent_to_admin' => false,\n\t\t\t'plain_text' => false,\n\t\t\t'email' => $this,\n\t\t], '', $this->template_base );\n\n\t}", "public function getHtmlContent()\n {\n return $this->htmlContent;\n }", "abstract protected function getHtmlBody();", "public function get_content_plain() {\n\t\tob_start();\n\t\twc_get_template($this->template_plain, [\n\t\t\t'email_heading'\t=> $this->get_heading(),\n\t\t\t'sent_to_admin'\t=> true,\n\t\t\t'plain_text'\t=> true,\n\t\t\t'email'\t\t\t=> $this,\n\t\t\t'subscribers'\t=> $this->subscribers,\n\t\t], '', $this->template_base);\n\t\treturn ob_get_clean();\n\t}", "public function NotificationContent(){\n\t\treturn $this->config()->html_notifications ? $this->NotificationHTML : $this->NotificationText;\n\t}", "public function html()\n {\n return Mailblade\\View::make($this->view)\n ->with($this->data)\n ->render();\n }", "public function getHTML();", "public function test_generateContent()\n {\n $message = new Message();\n $message->content = '<p>Hello</p>';\n\n $builder = new EmailBuilder();\n $builder->setNotificationMessage($message);\n\n $html = $builder->generateEmailBody();\n self::assertStringContainsString('<p>Hello</p>', $html);\n }", "public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }", "private function html($prepared_message)\r\n\t{\r\n\t\tif( ! empty($prepared_message)){\r\n\t\t\t\r\n\t\t\t$html = \"<html>\r\n\t\t\t\t\t\t<head>\r\n\t\t\t\t\t\t\t<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>\r\n\t\t\t\t\t\t</head>\r\n\t\t\t\t\t\t<body topmargin=0 style='margin:0p\\\\x; padding:0px; text-align:left; background-color:#eee;'>\r\n\t\t\t\t\t\t\t<table cellpadding='0' cellspacing='0' border='0' width='500' align='center' bgcolor='#ffffff'>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td valign='top'>\r\n\t\t\t\t\t\t\t\t\t\t<div align='left'>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='http://www.indexconsult.com.br/' target='_blank'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img src='http://www.indexconsult.com.br/images/mail-topo.jpg' border='0'>\r\n\t\t\t\t\t\t\t\t\t\t\t</a>\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 align='left' style='font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333; line-height:16px; margin:20px'>\r\n\t\t\t\t\t\t\t\t\t\t\t{$prepared_message}\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</body>\r\n\t\t\t\t\t</html>\";\r\n\t\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}\r\n\t}", "public function getHtmlContent($subscriber = null, $msgId = null, $server = null)\n {\n // @note: IMPORTANT: the order must be as follows\n // * addTrackingURL\n // * appendOpenTrackingUrl\n // * tagMessage\n // STEP 01. Get RAW content\n $body = $this->content;\n\n // STEP 02. Append footer\n // Not applied\n \n // STEP 03. Parse RSS\n if (Setting::isYes('rss.enabled')) {\n $body = Rss::parse($body);\n }\n\n // STEP 04. Replace Bare linefeed\n // Replace bare line feed char which is not accepted by Outlook, Yahoo, AOL...\n // Not applied\n\n // STEP 05. Transform URLs\n // Note that $useTrackingHost is not needed\n $body = $this->transformWithoutUpdate($body, $useTrackingHost = false);\n\n if (is_null($msgId)) {\n $msgId = 'SAMPLE'; // for preview mode\n }\n\n // STEP 08. Transform Tags\n if (!is_null($subscriber)) {\n // Transform tags\n $body = $this->tagMessage($body, $subscriber, $msgId, $server);\n }\n\n // STEP 09. Make CSS inline\n //\n // Transform CSS/HTML content to inline CSS\n // Be carefule, it will make\n // <a href=\"{BUNSUBSCRIBE_URL}\"\n // become\n // <a href=\"%7BUNSUBSCRIBE_URL%7D\"\n $body = $this->inlineHtml($body);\n\n return $body;\n }", "function build_email_message_html($email_subject, $email_message) {\n\t$email_message_html =<<<CROWDSHOT\n<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t\t<title>$email_subject</title>\n\t</head>\n\t<body>$email_message</body>\n</html>\nCROWDSHOT;\n\n\treturn $email_message_html;\n}", "public function get_content_plain() {\n\t\tob_start();\n\t\twc_get_template(\n\t\t\t$this->template_plain,\n\t\t\tarray(\n\t\t\t\t'order' => $this->object,\n\t\t\t\t'email_heading' => $this->get_heading(),\n\t\t\t\t'voucher_count' => $this->object['voucher_count'],\n\t\t\t\t'message' => $this->message,\n\t\t\t\t'recipient_name' => $this->recipient_name,\n\t\t\t),\n\t\t\t'',\n\t\t\t$this->template_base\n\t\t);\n\t\treturn ob_get_clean();\n\t}", "private static function get_email_content( $email_notification_key, $args ) {\n\t\t$plain_text = self::send_as_plain_text( $email_notification_key );\n\n\t\tob_start();\n\n\t\t/**\n\t\t * Output the header for all job manager emails.\n\t\t *\n\t\t * @since 1.31.0\n\t\t *\n\t\t * @param string $email_notification_key Unique email notification key.\n\t\t * @param array $args Arguments passed for generating email.\n\t\t * @param bool $plain_text True if sending plain text email.\n\t\t */\n\t\tdo_action( 'job_manager_email_header', $email_notification_key, $args, $plain_text );\n\n\t\tif ( $plain_text ) {\n\t\t\techo html_entity_decode( wptexturize( $args['plain_content'] ) );\n\t\t} else {\n\t\t\techo wpautop( wptexturize( $args['rich_content'] ) );\n\t\t}\n\n\t\t/**\n\t\t * Output the footer for all job manager emails.\n\t\t *\n\t\t * @since 1.31.0\n\t\t *\n\t\t * @param string $email_notification_key Unique email notification key.\n\t\t * @param array $args Arguments passed for generating email.\n\t\t * @param bool $plain_text True if sending plain text email.\n\t\t */\n\t\tdo_action( 'job_manager_email_footer', $email_notification_key, $args, $plain_text );\n\n\t\t$content = ob_get_clean();\n\t\tif ( ! $plain_text ) {\n\t\t\t$content = self::inject_styles( $content );\n\t\t}\n\n\t\t/**\n\t\t * Filter the content of the email.\n\t\t *\n\t\t * @since 1.31.0\n\t\t *\n\t\t * @param string $content Email content.\n\t\t * @param string $email_notification_key Unique email notification key.\n\t\t * @param array $args Arguments passed for generating email.\n\t\t * @param bool $plain_text True if sending plain text email.\n\t\t */\n\t\treturn apply_filters( 'job_manager_email_content', $content, $email_notification_key, $args, $plain_text );\n\t}", "public function getHtml();", "private function getMessageRawContent(EmailMessage $message): string\n {\n $emailParts = $message->getBody()->getParts();\n return current($emailParts)->getRawContent();\n }", "public function getBodyText(): string\n {\n return $this->textMessage;\n }", "public function getHtml()\n {\n $html = '';\n foreach ($this->entries as $entry) {\n if ($entry == '') {\n $html .= '<br>';\n } else {\n list($msg, $style) = $entry;\n $msg = htmlspecialchars($msg);\n if ($style == 'bold') {\n $html .= '<b>' . $msg . '</b>';\n } elseif ($style == 'italic') {\n $html .= '<i>' . $msg . '</i>';\n } else {\n $html .= $msg;\n }\n }\n }\n return $html;\n }", "function Get()\r\n\t\t{\r\n\t\t$this->_build_headers();\r\n\t\tif( sizeof( $this->aattach ) > 0 )\r\n\t\t\t{\r\n\t\t\t$this->_build_attachement();\r\n\t\t\t$this->body= $this->body . $this->attachment;\r\n \t}\r\n\t\t$mail = $this->headers;\r\n\t\t$mail .= \"\\n$this->body\";\r\n\t\treturn $mail;\r\n\t\t}", "private function getEmailContent($template, $contentHTML, $fullContentHTML)\n\t{\n\t\t// require the CSSToInlineStyles class\n\t\trequire 'external/css_to_inline_styles.php';\n\n\t\t// fetch the template contents for this mailing\n\t\t$template = BackendMailmotorModel::getTemplate($this->mailing['language'], $template);\n\n\t\t// template content is empty\n\t\tif(!isset($template['content'])) $this->output(self::ERROR, array('mailing_id' => $this->mailing['id'], 'error' => true), BL::err('TemplateDoesNotExist', 'mailmotor'));\n\n\t\t// remove TinyMCE\n\t\t$fullContentHTML = preg_replace('/<!-- tinymce -->.*?<!-- \\/tinymce -->/is', $contentHTML, $fullContentHTML);\n\n\t\t// replace bracketed entities with their proper counterpart\n\t\t$fullContentHTML = preg_replace('/\\[ent=(.*?)]/', '&${1};', $fullContentHTML);\n\n\t\t// add Google UTM parameters to all anchors\n\t\t$fullContentHTML = $this->addUTMParameters($fullContentHTML);\n\n\t\t// search values\n\t\t$search[] = '{$siteURL}';\n\t\t$search[] = '&quot;';\n\t\t$search[] = 'src=\"/';\n\n\t\t// replace values\n\t\t$replace[] = SITE_URL;\n\t\t$replace[] = '\"';\n\t\t$replace[] = 'src=\"' . SITE_URL . '/';\n\n\t\t// replace some variables\n\t\t$fullContentHTML = str_replace($search, $replace, $fullContentHTML);\n\n\t\t// set CSS object\n\t\t$css = new CSSToInlineStyles($fullContentHTML, $template['css']);\n\t\t$fullContentHTML = $css->convert();\n\n\t\t// return the content\n\t\treturn $fullContentHTML;\n\t}", "public function getBody(): string\n {\n return $this->message;\n }", "public function getHTML(): string;", "public function html(): string\n {\n $parser = new \\Parsedown();\n return $parser->text($this->data);\n }", "public function getMailContent($values) \n\t{\n\t\t$renderer = new Zend_View();\n\t\t$renderer->setScriptPath(realpath(APPLICATION_PATH . '/emails/'));\n\t \n\t\t// create a layout object and set it to app_path/emails/layouts\n\t\t$layout = new Zend_Layout(APPLICATION_PATH . '/emails/layouts/');\n\t\t$layout->setView($renderer); \n\t \n\t\t// assign all values to the view renderer\t\t\n\t \t$renderer->item = $values;\t \t\n\t\t\n\t\t// render html assign to output\n\t\t$layout->content = $renderer->render('email.phtml');\n\t\t$layout->setLayout('email');\n\t\t$output = $layout->render();\n\t \n\t\t// all done, return output\n\t\treturn $output;\t \n\t}", "public function getBodyText();", "public function content() {\n $build = $this->helper->buildMessenger();\n return $build;\n }", "public function getHtml()\n {\n return $this->_getHtml();\n }", "public function renderBody()\n {\n $emailBody = $this->_renderer->render(\n $this->config->get('layout_email_push', 'default'),\n array(\n 'order' => $this->getOrder(),\n 'mailer' => $this->_mailer\n )\n );\n\n if (!$this->_isHtml()) {\n $emailBody = JString::trim($emailBody);\n\n // clean up text (experimental)\n //$emailBody = strip_tags($emailBody, '<br><br/>');\n //$emailBody = preg_replace('#<br[/\\s]*>#ius', PHP_EOL, $emailBody);\n //$emailBody = str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\", \"\\n\\r\", PHP_EOL), PHP_EOL, $emailBody);\n }\n\n return $emailBody;\n }", "public function getAutoResponderEmailContent() { return $this->_autoResponderEmailContent; }", "public function getBodyContent() {}", "abstract public function renderHtmlMessage();", "public function getMessage()\n {\n $args = [\n 'from' => $this->setFromData(),\n 'to' => $this->setToData(),\n 'subject' => $this->getSubject()\n ];\n\n if($ccData = $this->setCcData()){\n $args['cc'] = $ccData;\n }\n\n if($bccData = $this->setBccData()){\n $args['bcc'] = $bccData;\n }\n\n if($this->getText()){\n $args['text'] = $this->getText();\n }\n\n if($this->getHtml()){\n $args['html'] = $this->getHtml();\n }\n\n return array_merge_recursive($args, $this->getCustom());\n }", "public function getHtml() {\n\t\treturn $this->_html;\n\t}", "public function getContent(): MailingContent\n {\n return new MailingContent();\n }", "public function fetchHTML()\n {\n return $this->fetch();\n }", "public function getHTML(){\n\t\treturn $this->html;\n\t}", "public function get_content_plain()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_plain, array_merge($this->template_variables, array('plain_text' => true)));\n return ob_get_clean();\n }", "public function getMailBodyText(Notification $notification) : string;", "public function contentHtml()\n {\n return '<h3>Akun Personil Penghubung PME BBLK Palembang</h3>' .\n '<p>Terima kasih atas partisipasi Anda. Berikut tautan yang dapat Anda gunakan untuk mereset password Anda di dalam sistem PME BBLK Palembang.</p>' .\n '<p><a href=\"' . $this->link() . '\" target=\"_blank\">' . $this->link() . '</a></p>'.\n '<p>Dimohon untuk menjaga kerahasiaan password.<br/><br/>E-mail ini dikikrimkan oleh sistem. Mohon untuk tidak membalas e-mail ini.</p>';\n }", "public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }", "function getMessageBodyText() {\n\t\treturn $this->getParam(self::PARAM_MESSAGE_BODY_TEXT);\n\t}", "private function autoResponderEmailStr(){\n\t\t$NL=\"\\r\\n\";\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t\n\t\t$s_emailContentRaw = $this->_autoResponderEmailContent;\n\t\t$s_emailContent = str_replace('{{tableContent}}', $this->getFormTableContent(), $s_emailContentRaw);\n\t\t\n\t\t$s_ret='<div style=\"'.$s_style.'\">'.$NL.$s_emailContent.$NL.'</div>';\n\t\treturn $s_ret;\n\t}", "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 parseEmailAction() {\n $request = $this->getRequest()->request;\n $respondToFeedbackService = $this->get('e2w_respond_to_feedback_service');\n $to = $request->get('to') . '';\n $respondToFeedbackService->createFeedbackResponseFromEmail($to, $request->get('html'), $request->get('text'));\n return new Response();\n }", "public function render_html() {\n global $USER;\n $courseid = \\mod_customcert\\element_helper::get_courseid($this->get_id());\n $content = $this->get_decoded_data()->content;\n $text = format_text($content, FORMAT_HTML, ['context' => \\context_course::instance($courseid)]);\n\n return \\mod_customcert\\element_helper::render_html_content($this, $this->render_table($text, $USER, true));\n }", "public function get_email_template() {\n\t\t// determine which template file to use\n\t\t$template_file = locate_template( sprintf( 'templates/emails/%s.php', $this->get_key() ) );\n\t\tif ( ! $template_file ) {\n\t\t\t$template_file = locate_template( 'templates/emails/default.php' );\n\t\t}\n\n\t\t// load template\n\t\tob_start();\n\t\trequire $template_file;\n\t\t$template = ob_get_clean();\n\n\t\t// inline styles\n\t\ttry {\n\t\t\t$emogrifier = new \\MyListing\\Utils\\Emogrifier( $template );\n\t\t\t$rendered_template = $emogrifier->emogrify();\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// if inline styles can't be applied, use the original markup as the message body\n\t\t\t$rendered_template = $template;\n\t\t}\n\n\t\treturn $rendered_template;\n\t}", "abstract public function getHtml();", "public function getContent(): string\n {\n return $this->initiator . ' ' . $this->message;\n }", "function elegant_email_body($messagtext,$properties){ \n\n ob_start(); ?>\n\n\n<!DOCTYPE html>\n<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\">\n<head>\n <title></title><!--[if !mso]><!== -->\n <meta content=\"IE=edge\" http-equiv=\"X-UA-Compatible\"><!--<![endif]-->\n <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\">\n <meta content=\"width=device-width, initial-scale=1.0\" name=\"viewport\">\n <style type=\"text/css\">\n #outlook a { padding: 0; } .ReadMsgBody { width: 100%; } .ExternalClass { width: 100%; } .ExternalClass * { line-height:100%; } body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { border-collapse:collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } p { display: block; margin: 13px 0; }\n </style><!--[if !mso]><!-->\n <style type=\"text/css\">\n @media only screen and (max-width:480px) { @-ms-viewport { width:320px; } @viewport { width:320px; } }\n </style><!--<![endif]--><!--[if mso]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings></xml><![endif]--><!--[if lte mso 11]><style type=\"text/css\"> .outlook-group-fix { width:100% !important; }</style><![endif]--><!--[if !mso]><!-->\n <link href=\"https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700\" rel=\"stylesheet\" type=\"text/css\">\n <style type=\"text/css\">\n @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700); \n </style><!--<![endif]-->\n <style type=\"text/css\">\n ul {margin:0px;padding: 0px;}\n @media only screen and (min-width:480px) { .mj-column-per-100 { width:100%!important; }.mj-column-per-50 { width:50%!important; } }\n }\n </style>\n</head>\n<body style=\"background: #FFFFFF;\">\n <div class=\"mj-container\" style=\"background-color:#FFFFFF;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:9px 0px 9px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:600px;\"> <![endif]-->\n <div class=\"mj-column-per-100 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"word-wrap:break-word;font-size:0px;padding:18px 18px 18px 18px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:collapse;border-spacing:0px;\">\n <tbody>\n <tr>\n <td style=\"width:384px;\"><img alt=\"\" height=\"auto\" src=\"<?php /*Knoppys Elegant Variations Plugin*/ echo variations_email_logo(get_host()); ?>\" style=\"border:none;border-radius:0px;display:block;font-size:13px;outline:none;text-decoration:none;width:100%;height:auto;\" title=\"\" width=\"384\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]--><!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:9px 0px 9px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:600px;\"> <![endif]-->\n <div class=\"mj-column-per-100 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;\"> \n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <tr align=\"center\">\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <?php \n //The code for this function is located in the plugin Knoppys Elegant Variations\n echo variations_contact_details(get_host()); \n ?>\n </td>\n </tr>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]--><!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td>\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:14px 0px 14px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:600px;\"> <![endif]-->\n <div class=\"mj-column-per-100 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <div style=\"cursor:auto;color:#000000;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <p><?php echo $messagtext; ?></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table><!--[if mso | IE]> </td></tr></table> <![endif]-->\n\n\n<?php foreach ($properties as $property) { ?>\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:9px 0px 9px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:600px;\"> <![endif]-->\n <div class=\"mj-column-per-100 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <div style=\"cursor:auto;color:#000000;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <p><a href=\"<?php echo get_the_permalink($property[0]); ?>\" target=\"_blank\" style=\"color:#bc8536;\"><span style=\"color:#bc8536; font-size: 18px; line-height: 27px; font-weight: bold;margin-top:10px;\"><?php echo get_the_title($property[0]); ?></span></a></p>\n </div> \n <div style=\"cursor:auto;color:#bc8536;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <p><span style=\"color:#bc8536; font-size: 16px; line-height: 27px; font-weight: bold;margin-top:10px;\">Location: <?php echo location($property[0]); ?></span></p>\n </div> \n </td>\n </tr> \n <tr>\n <td align=\"center\" style=\"word-wrap:break-word;font-size:0px;padding:0px 0px 0px 0px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:collapse;border-spacing:0px;\">\n <tbody>\n <tr>\n <?php\n if (get_host() == 'elegant-address.com') {\n $imageurl = get_the_post_thumbnail_url($property[0],'medium');\n } else {\n $imageurl = knoppys_property_header($property[0],get_post_meta($property[0],'image_1', true)); \n }\n ?>\n <td style=\"width:600px;padding:10px;\"><img alt=\"\" width=\"100%\" height=\"auto\" src=\"<?php echo $imageurl; ?>\" style=\"border:none;border-radius:0px;display:block;font-size:13px;outline:none;text-decoration:none;width:100%;height:auto;\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]--><!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:9px 0px 9px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:300px;\"> <![endif]-->\n <div class=\"mj-column-per-50 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:50%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <div style=\"cursor:auto;color:#000000;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <?php echo variations_email_ataglance(get_host(),$property[0]); ?>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td><td style=\"vertical-align:top;width:300px;\"> <![endif]-->\n <div class=\"mj-column-per-50 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:50%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <div style=\"cursor:auto;color:#000000;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <p>Property Type: <?php echo get_post_meta($property[0],'type_name', true); ?><br>\n Location: <?php echo location($property[0]); ?><br> \n <span style=\"font-weight:bold;\">Price: <?php echo $property[2]; ?></span></p> \n <?php echo variations_brochurelink(get_host(),$property[0]); ?> \n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]--><!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" align=\"center\" style=\"width:600px;\"> <tr> <td style=\"line-height:0px;font-size:0px;mso-line-height-rule:exactly;\"> <![endif]-->\n <div style=\"margin:0px auto;max-width:600px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"font-size:0px;width:100%;\">\n <tbody>\n <tr>\n <td style=\"text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:9px 0px 9px 0px;\">\n <!--[if mso | IE]> <table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"vertical-align:top;width:600px;\"> <![endif]-->\n <div class=\"mj-column-per-100 outlook-group-fix\" style=\"vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;\">\n <div style=\"cursor:auto;color:#000000;font-family:Arial,Helvetica, Arial, sans-serif;font-size:14px;line-height:22px;text-align:left;\">\n <p><?php echo nl2br(rawurldecode(stripslashes($property[1]))); ?></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n </div><!--[if mso | IE]> </td></tr></table> <![endif]-->\n <?php } ?>\n\n </div>\n</body>\n</html>\n\n<?php $content = ob_get_clean();\nreturn $content;\n}", "public function getSentMIMEMessage()\n {\n }", "public function getMessageBody()\n {\n return $this->messageBody;\n }", "public function getBodyContent() {\n return htcms_get_body_content();\n }", "public function content()\n\t{\n\t\treturn nl2br($this->content);\n\t}", "public function content()\n\t{\n\t\treturn nl2br($this->content);\n\t}", "public function getInformSubjectContent()\n {\n return $this->inform_subject_content;\n }", "private function emailTemplate($data) {\n $body = array_reduce($data, function($prevInput, $curInput) {\n return $prevInput . '<p style=\"font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:2px;\">' . $curInput['name'] . ': ' . $curInput['value'] . '</p>' . PHP_EOL;\n });\n\n $email = '<!DOCTYPE html>\n <html>\n <head>\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <title>New Online Donation</title>\n <style type=\"text/css\">\n @media only screen and (max-width: 620px) {\n table[class=body] h1 {\n font-size: 28px !important;\n margin-bottom: 10px !important; }\n table[class=body] p,\n table[class=body] ul,\n table[class=body] ol,\n table[class=body] td,\n table[class=body] span,\n table[class=body] a {\n font-size: 16px !important; }\n table[class=body] .wrapper,\n table[class=body] .article {\n padding: 10px !important; }\n table[class=body] .content {\n padding: 0 !important; }\n table[class=body] .container {\n padding: 0 !important;\n width: 100% !important; }\n table[class=body] .main {\n border-left-width: 0 !important;\n border-radius: 0 !important;\n border-right-width: 0 !important; }\n table[class=body] .btn table {\n width: 100% !important; }\n table[class=body] .btn a {\n width: 100% !important; }\n table[class=body] .img-responsive {\n height: auto !important;\n max-width: 100% !important;\n width: auto !important; }}\n @media all {\n .ExternalClass {\n width: 100%; }\n .ExternalClass,\n .ExternalClass p,\n .ExternalClass span,\n .ExternalClass font,\n .ExternalClass td,\n .ExternalClass div {\n line-height: 100%; }\n .apple-link a {\n color: inherit !important;\n font-family: inherit !important;\n font-size: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n text-decoration: none !important; }\n .btn-primary table td:hover {\n background-color: #34495e !important; }\n .btn-primary a:hover {\n background-color: #34495e !important;\n border-color: #34495e !important; } }\n </style>\n </head>\n <body class=\"\" style=\"background-color:#f6f6f6;font-family:sans-serif;-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.4;margin:0;padding:0;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"body\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background-color:#f6f6f6;width:100%;\">\n <tr>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">&nbsp;</td>\n <td class=\"container\" style=\"font-family:sans-serif;font-size:14px;vertical-align:top;display:block;max-width:960px;padding:10px;width:100%;Margin:0 auto !important;\">\n <div class=\"content\" style=\"box-sizing:border-box;display:block;Margin:0 auto;max-width:100%;padding:10px;\">\n <span class=\"preheader\" style=\"color:transparent;display:none;height:0;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;visibility:hidden;width:0;\">New Form Submission</span>\n <table class=\"main\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background:#fff;border-radius:3px;width:100%;\">\n <tr>\n <td class=\"wrapper\" style=\"font-family:sans-serif;font-size:14px;vertical-align:top;box-sizing:border-box;padding:20px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;\">\n <tr>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">\n <p style=\"font-family:sans-serif;font-size:24px;font-weight:normal;margin:0;Margin-bottom:24px;\">Here are the details:</p>\n ' . $body . '\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n </td>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">&nbsp;</td>\n </tr>\n </table>\n </body>\n </html>';\n \n return $email;\n }", "public function message_viewer_modal()\n {\n $str = '<div class=\"modal fade\" id=\"viewmail-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\">';\n $str .= '<div class=\"credential-panel\" id=\"viewmail-panel\">';\n $str .= '<div class=\"credential-form\" id=\"viewmail-form\">';\n\t\t\t\t\t\t\t\t\t\t\t\t# Message Subject goes here\n $str .= '<h2 id=\"viewmail_subject\" class=\"sign-in font-24 modal-header mail_subject\"></h2>';\n $str .= '<hr style=\"margin-top: 0px\"></hr>';\n\t\t\t\t\t\t\t\t\t\t\t\t# To or From goes here\n $str .= '<label id=\"viewmail_label\" class=\"credential-label\" style=\"margin-top: 0px\"></label>';\n\t\t\t\t\t\t\t\t\t\t\t\t# Recipient or Sender goes here\n $str .= '<input id=\"viewmail_username\" class=\"reg-credential\" type=\"text\" readonly>';\n\n $str .= '<label class=\"credential-label\">Date:</label>';\n\t\t\t\t\t\t\t\t\t\t\t\t# Send date goes here\n $str .= '<input id=\"viewmail_date\" class=\"reg-credential\" type=\"text\" readonly>';\n\n $str .= '<textarea class=\"viewmail-textarea\" rows=\"8\" cols=\"50\" id=\"viewmail_body\" readonly></textarea>';\n\n $str .= '</div>';\n $str .= '</div>';\n $str .= '</div>';\n return $str;\n }", "public function fetch() {\n return $this->html;\n }", "public function getInnerHtml()\n {\n return implode(PHP_EOL, $this->content);\n }", "public function html(): string {\n\t\tif(empty($this->m_report)) {\n\t\t\tAppLog::warning(\"no validation report - creating empty output\", __FILE__, __LINE__, __FUNCTION__);\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$errors = $this->m_report->errors();\n\t\t$content = \"\";\n\t\t$class = \"message\";\n\n\t\tif(0 < count($errors)) {\n\t\t\t$class = \"error\";\n\t\t\t$content .= \"<p>\" . html(tr(\"The following errors were found:\")) . \"</p><ul>\";\n\n\t\t\tforeach($errors as $error) {\n\t\t\t\tif(!empty($error)) {\n\t\t\t\t\t$content .= \"<li>\" . html($error) . \"</li>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$content .= \"</ul>\";\n\t\t}\n\n\t\tif($this->m_doWarnings) {\n\t\t\t$warnings = $this->m_report->warnings();\n\n\t\t\tif(0 < count($warnings)) {\n\t\t\t\t$content .= \"<p>\";\n\n\t\t\t\tif(0 < count($errors)) {\n\t\t\t\t\t$content .= html(tr(\"The following warnings were also found:\"));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$content .= html(tr(\"The following warnings were found:\"));\n\t\t\t\t\t$class = \"warning\";\n\t\t\t\t}\n\n\t\t\t\t$content .= \"</p><ul>\";\n\n\t\t\t\tforeach($warnings as $warning) {\n\t\t\t\t\tif(!empty($warning)) {\n\t\t\t\t\t\t$content .= \"<li>\" . html($warning) . \"</li>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$content .= \"</ul>\";\n\t\t\t}\n\t\t}\n\n\t\tif(empty($content) && !empty($this->m_noErrorsMessage)) {\n\t\t\t$content = \"<p>\" . html($this->m_noErrorsMessage) . \"</p>\";\n\t\t}\n\n\t\tif(!empty($content) && !empty($this->m_title)) {\n\t\t\t$content = \"<h2>\" . html($this->m_title) . \"</h2>$content\";\n\t\t}\n\n\t\tif(!empty($content)) {\n\t\t\tif(\"message\" != $class) {\n\t\t\t\t$this->removeClassName(\"message\");\n\t\t\t\t$this->addClassName($class);\n\t\t\t}\n\n\t\t\t$this->setMessage($content, self::MessageIsHtml | self::NoChildElements);\n\t\t\treturn parent::html();\n\t\t}\n\n\t\treturn \"\";\n\t}", "public function content() {\n\t\treturn nl2br($this -> content);\n\t}", "function reply_content() {\n\tglobal $reply;\n\treturn Parsedown::instance()->parse($reply['content']);\n}", "public function getText()\n {\n if (\n !$this->Get('cached_content') ||\n (($this->Get('edittime') ? $this->Get('edittime') :\n $this->Get('dateline')) > ($this->Get('last_modified')))\n ) {\n $this->ForumCache($this->Get('message'));\n }\n \n return $this->Get('cached_content');\n }", "public function getCaptchaHtml()\n {\n return (string)$this->getReCaptcha();\n }", "public function html_text()\n {\n return $this->dispatch(\n new MarkdownToHtml(\n $this->wrappedObject->text\n )\n );\n }", "public function getHTML($data);", "public abstract function get_html();", "public function getEmailHeadHtml() { return $this->_emailHeadHtml; }", "public function getHTML() \n\t{\n\t\treturn $this->HTML;\n\t}", "function bodyContent($type_suffix)\n\t{\n\t\t$temp_layout = $this->controller->layout; // store the current controller layout\n\t\n\t\tif ($type_suffix == 'html')\n\t\t\t $this->controller->layout = '..'.DS.'email';\n\t\telse\n\t\t\t $this->controller->layout = '';\n\t\n\t\t$mail = $this->controller->render($this->templateLocation('_'.strtolower($type_suffix)));\n\t\t// render() automatically adds to the controller->output, we'll remove it\n\t\t$this->controller->output = str_replace($mail, '', $this->controller->output);\n\t\n\t\t$this->controller->layout = $temp_layout; // restore the controller layout\n\t\treturn $mail;\n\t}", "protected abstract function generateHtmlBody() : string;", "public function getContent()\n {\n\n //Save Form configuration post data\n $this->__saveConfiguration();\n\n //Show Configuration form\n $this->__setConfigurationForm();\n\n return $this->_html;\n }", "public function get_message_text()\n {\n return $this->message_text;\n }", "private function retrieveMessage() : ?string {\n $message = [];\n\n // The regex to find the head of the message wrapper (message lies between head and foot wrapper)\n $messageHeadWrapperRegex = $this->buildRegex([\n self::REGEX_CONTENT_HEAD ,\n self::REGEX_MESSAGE_WRAPPER_BODY,\n \"(\\s{2})\"\n ], \"\", \"\");\n\n // The regex to find the foot of the message wrapper (message lies between head and foot wrapper)\n $messageFootWrapperRegex = $this->buildRegex([\n self::REGEX_CONTENT_HEAD,\n self::REGEX_MESSAGE_WRAPPER_BODY\n ], \"\", \"\");\n\n // The regex for querying the message, including its queried wrapper\n $messageRegex = $this->buildRegex([\n $messageHeadWrapperRegex,\n self::REGEX_ALL,\n $messageFootWrapperRegex\n ]);\n\n // Querying the message\n preg_match($messageRegex, $this->currentEmail, $message);\n\n // If the message not found, there is most likely no message, so return null\n // Use index \"4\", because the regex group which represents the message only is at index \"4\"\n if (!isset($message[4]))\n return null;\n\n // Return the quoted-printable decoded and trimmed message\n // Use index \"4\", because the regex group which represents the message only is at index \"4\"\n $message = quoted_printable_decode($message[4]);\n return trim($message);\n }", "public function get_additional_content()\n {\n\n return apply_filters('subscriptio_email_additional_content_' . $this->id, $this->format_string($this->get_option('additional_content', '')), $this->object);\n }", "protected function getBody() {\n $db = DBManager::get();\n $stmt = $db->prepare('SELECT body FROM plugin_rich_text WHERE range_id = ?');\n $stmt->execute(array(Utils\\getSeminarId()));\n return Purifier\\purify($stmt->fetchColumn());\n }", "public function getHtml()\n {\n return $this->_toHtml();\n }", "public function getPlainTextBody(){\n return strip_tags($this->body);\n }", "public function findHtml($parsedEmail) {\n\t\t\treturn $this->find($parsedEmail, \"text/html\");\n\t\t}", "public function getBody ( \\r8\\Mail $mail )\n {\n // If both the text and HTML are set...\n if ( $mail->htmlExists() && $mail->textExists() ) {\n\n $mime = new \\r8\\Transform\\MIME\\Auto;\n $mime->setEOL( self::EOL );\n $mime->setLineLength( self::LINE_LENGTH );\n\n $boundary = $mail->getBoundary();\n\n return\n \"--\". $boundary . self::EOL\n .$mime->setHeader(\"Content-Type\")->to('text/plain; charset=\"ISO-8859-1\"') . self::EOL\n .$mime->setHeader(\"Content-Transfer-Encoding\")->to('7bit') . self::EOL\n\n .self::EOL\n\n .$this->prepareContent( $mail->getText() )\n\n .self::EOL\n .self::EOL\n\n .\"--\". $boundary . self::EOL\n .$mime->setHeader(\"Content-Type\")->to('text/html; charset=\"ISO-8859-1\"') . self::EOL\n .$mime->setHeader(\"Content-Transfer-Encoding\")->to('7bit') . self::EOL\n\n .self::EOL\n\n .$this->prepareContent( $mail->getHTML() )\n\n .self::EOL\n .self::EOL\n\n .\"--\". $boundary .\"--\". self::EOL;\n\n }\n\n // If just the HTML is set\n else if ( $mail->htmlExists() ) {\n return $this->prepareContent( $mail->getHTML() );\n }\n\n // If just the text was set\n else {\n return $this->prepareContent( $mail->getText() );\n }\n }", "public function getHtml() {\n\t\treturn $this->_boleto->getOutput();\n\t}", "function get_content() {\n\t\treturn $this->get_data( 'comment_content' );\n\t}", "private function getBody(PushMessage $message) : string\n {\n return $message->getBody();\n }", "public function html(): string;", "public function get_html() \n\t{\n\t\treturn $this->HTML; \n\t}", "public function getMessage() {\n $ret = \"\";\n if ($this->message !== \"\") {\n $ret = <<<EOF\n <p class=\"dice-message\">{$this->message}</p>\nEOF;\n }\n return $ret;\n }", "public function getHtmlResponse() {\n return \\Lib\\Format::forge($this->_response)->to_html();\n }", "private function getCAPTCHAAsHTML()\n {\n $retval = $this->_createCAPTCHA();\n if (PEAR::isError($retval)) {\n return PEAR::raiseError($retval->getMessage());\n }\n \n $charwidth = strpos($this->_output_string, \"\\n\");\n $data = str_replace(\"\\n\", '<br />', $this->_output_string);\n\n $textsize = ($this->_width / $charwidth) * 1.4;\n \n $css_output = \"\";\n foreach ($this->_style as $key => $value) {\n $css_output .= \"$key: $value;\"; \n }\n \n $htmloutput = '<div style=\"font-family: courier; \n font-size: '.$textsize.'px; \n width:'.$this->_width.'px; \n text-align:center;\">';\n $htmloutput .= '<div style=\"'.$css_output.'margin:0px;\">\n <pre style=\"padding: 0px; margin: 0px;\">'. $data. '</pre></div></div>';\n\n return $htmloutput; \n }", "function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='',$recepientsCopy='',$recepientsBcc='')\t{\n\t\tif (trim($recipient) && trim($content))\t{\n\t\t\t$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');\n\t\t\tif (class_exists($cls))\t{\t// If htmlmail lib is included, then generate a nice HTML-email\n\t\t\t\t$parts = spliti('<title>|</title>',$content,3);\n\t\t\t\t$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';\n\n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->useBase64();\n\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t//modif by CMD - add return path information\n\t\t\t\t$Typo3_htmlmail->returnPath = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\n\t\t\t\t\t// HTML\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $content;\t// Fetches the content of the page\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0);\t// 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\n\t\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain('');\n\n\t\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->recipient_copy=$recepientsCopy;\n\t\t\t\t$Typo3_htmlmail->recipient_blindcopy=$recepientsBcc;\n\t\t//\t\tdebug($Typo3_htmlmail->theParts);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t} else {\n\t\t\t\tdebug('SYSTEM ERROR: No HTML-mail library loaded. Set \"page.config.incT3Lib_htmlmail = 1\" is your TypoScript template.');\n\t\t\t}\n\t\t}\n\t}", "public function content(): string\n {\n return $this->content;\n }", "function set_email_to_html(){\n\treturn true;\n}", "public function getHtml(Notification $notification) : ?string;", "public function getContent() : string\n {\n return $this->content;\n }" ]
[ "0.7725141", "0.7192339", "0.7189205", "0.7127608", "0.7127307", "0.69888604", "0.6955731", "0.6950138", "0.6879559", "0.6826657", "0.6813142", "0.68102914", "0.67707115", "0.67331606", "0.6717965", "0.6703493", "0.6688689", "0.6680039", "0.666195", "0.6635774", "0.66192186", "0.6599587", "0.65974367", "0.6592654", "0.6570602", "0.6558694", "0.6514357", "0.64715135", "0.6463623", "0.64533615", "0.64385045", "0.6436953", "0.6427172", "0.64097196", "0.640803", "0.6374415", "0.636981", "0.6359703", "0.6352413", "0.6343179", "0.6319684", "0.6318325", "0.6315584", "0.6311284", "0.6309588", "0.63008875", "0.6297231", "0.62881154", "0.628347", "0.6260366", "0.6242192", "0.6219712", "0.6219175", "0.6212024", "0.6195846", "0.6188157", "0.61851704", "0.6181179", "0.616744", "0.61596435", "0.61522675", "0.61522675", "0.61501974", "0.6147504", "0.61454314", "0.61402756", "0.61282957", "0.61258763", "0.6124663", "0.61242694", "0.6123858", "0.6112434", "0.6103721", "0.6102194", "0.60997385", "0.60979617", "0.6095985", "0.60925066", "0.6089601", "0.6083", "0.60768425", "0.6066693", "0.60615265", "0.6057353", "0.6054579", "0.6052473", "0.6045413", "0.60427386", "0.6037551", "0.603143", "0.6027126", "0.6025725", "0.60228044", "0.60227305", "0.6015022", "0.6014945", "0.60109574", "0.60014343", "0.6000287", "0.5998191", "0.599525" ]
0.0
-1
Display Functions Functions to display information to the screen which may be called from multiple pages. Also performs database access in some cases
function displayPageAlerts(){ // This function will display any messages which have been added to // $_SESSION['alertMessages']. These alert messages are written to by many // data processing functions, either as errors or completion confirmations. // This function is called at the top of every page by the header // to display error messages created in processing POST data. // Only displays diagnostic errors for the Software Administrator if(ALLOW['SOFTWARE_ASSIST'] == true){ foreach($_SESSION['alertMessages']['systemErrors'] as $message){ displayAlert("<strong>Error: </strong>".$message, 'alert'); } } else { // If it is a normal user, alert them that there was an error. if(sizeof($_SESSION['alertMessages']['systemErrors']) > 0){ displayAlert("Appologies, but it seems we have encountered some sort of internal error.",'alert'); } } $_SESSION['alertMessages']['systemErrors'] = []; // Error messages for the user. foreach((array)$_SESSION['alertMessages']['userErrors'] as $message){ displayAlert("<strong>Error: </strong>".$message,'warning'); } $_SESSION['alertMessages']['userErrors'] = []; // Alert messages for the user (ie confirmation messages) $alertMessage = ''; if(sizeof($_SESSION['alertMessages']['userAlerts']) == 1){ $alertMessage = $_SESSION['alertMessages']['userAlerts'][0]; } elseif(sizeof($_SESSION['alertMessages']['userAlerts']) > 1) { $alertMessage = "<ul>"; foreach($_SESSION['alertMessages']['userAlerts'] as $message){ $alertMessage .= "<li>{$message}</li>"; } $alertMessage .= "</ul>"; } displayAlert($alertMessage); $_SESSION['alertMessages']['userAlerts'] = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function display(){}", "public function display() {}", "public function display() {}", "function showPage($db) {\n $this->user_info($db);\n $this->log_visitor($db,$_SERVER['PHP_SELF'],0);\n $this->showPage=true;\n }", "public function display() {\n\t}", "function print_details() \r\n{\r\n // Request access to the global variables we need\r\n\r\n global $fontface, $fontsize, $docroot, $REQUEST_URI, $PHP_SELF;\r\n global $bgcolor, $textcolor;\r\n global $currentlang;\r\n \r\n list($dbconn) = pnDBGetConn();\r\n $pntable = pnDBGetTables();\r\n \r\n $sitename = pnConfigGetVar('sitename');\r\n $reportlevel = pnConfigGetVar('reportlevel');\r\n $funtext = pnConfigGetVar('funtext');\r\n $top = pnConfigGetVar('top');\r\n\r\n if (pnConfigGetVar('multilingual') == 1) {\r\n $queryalang = \"WHERE (alanguage='$currentlang' OR alanguage='')\"; /* top stories */\r\n } else {\r\n $queryalang = \"\";\r\n }\r\n\r\n global $HTTP_SERVER_VARS;\r\n global $doc;\r\n $doc = getenv('REDIRECT_URL');\r\n if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {\r\n $server = getenv('HTTP_HOST');\r\n } else {\r\n $server = $HTTP_SERVER_VARS['HTTP_HOST'];\r\n } \r\n $doc = \"http://$server$doc\";\r\n \r\n include(\"header.php\");\r\n OpenTable();\r\n\r\n?>\r\n<a class=\"pn-logo\"><?php echo \"\"._ERR404.\"\"; ?></a><br>\r\n<font class=\"pn-logo-small\"><?php echo \"\"._ERRPAGENF.\"&nbsp;\"; echo $doc; ?> </font><hr>\r\n<?php echo \"<font class=\\\"pn-normal\\\">\"._ERRSORRY.\", $doc, \";\r\n echo \"\"._ERRDOESNTEXIST.\" \\\" $sitename \\\"<P></font>\";\r\n if ($reportlevel != 0)\r\n {\r\n echo \"<p><font style=\\\"pn-normal\\\">\";\r\n echo \"\"._ERRMAILED.\"\";\r\n }\r\nif ($funtext != 0) {\r\nfun();\r\n}\r\n\r\n\r\n?>\r\n<br><p>\r\n<a class=\"pn-storytitle\"><?php echo \"\"._ERRCOMMONM.\"\"; ?></a><br>\r\n<font class=\"pn-normal\"><?php echo \"\"._ERRCOMMONH.\"\"; ?> <?php echo \"$sitename\"; ?>:\r\n<UL>\r\n<LI><?php echo \"\"._ERRURLEND.\"\"; ?> <CODE>.htm</CODE> - <STRONG><?php echo \"\"._ERRALLPAGES.\" \\\"$sitename\\\" \"._ERRENDWITH.\"\"; ?> <CODE>.php</CODE></STRONG>\r\n<LI><?php echo \"\"._ERRUPPERCASE.\"\"; ?> - <STRONG><?php echo \"\"._ERRALLLOWER.\"\"; ?></STRONG>\r\n</UL></font></p>\r\n<a class=\"pn-storytitle\"><?php echo \"\"._ERRPOPPAGES.\"\"; ?></a><br>\r\n<?php\r\n /***\r\n * fifers: don't know what the $alanguage does here. left it in\r\n * because it always seems to be empty and I wasn't sure what it\r\n * was doing!\r\n */\r\n $column = &$pntable['stories_column'];\r\n $sql = \"SELECT $column[sid], $column[title], $column[time], $column[counter] FROM $pntable[stories] ORDER BY $column[counter] DESC\";\r\n $result = $dbconn->SelectLimit($sql,$top);\r\n\r\n if ($result === false) {\r\n\tPN_DBMsgError($dbconn, __FILE__, __LINE__, \"Error\");\r\n }\t\r\n\r\n if (!$result->EOF) {\r\n\techo \"<table border=\\\"0\\\" cellpadding=\\\"10\\\" width=\\\"100%\\\"><tr><td align=\\\"left\\\">\\n\"\r\n\t .\"<font class=\\\"pn-title\\\">$top \"._READSTORIES.\"</font><br><br>\\n\";\r\n\t$lugar=1;\r\n\r\n\twhile(list($sid, $title, $time, $counter) = $result->fields) {\r\n\t if($counter>0) {\r\n $mode = pnUserGetVar('umode');\r\n\t\tif (!empty($mode)) {\r\n\t\t $commentlink = \"&amp;mode=$mode\";\r\n\t\t} else {\r\n\t\t $commentlink = '&amp;mode=thread';\r\n\t\t}\r\n\t\techo \"<font class=\\\"pn-normal\\\">&nbsp;$lugar:</font> <a href=\\\"modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=$sid$commentlink\\\">$title</a><font class=\\\"pn-normal\\\"> - ($counter \"._READS.\")</font><br>\\n\";\r\n\t\t$lugar++;\r\n\t }\r\n\t $result->MoveNext();\r\n\t}\r\n\techo \"</td></tr></table><br>\\n\";\r\n }\r\n\r\n?></font><br>\r\n<a class=\"pn-storytitle\"><?php echo \"\"._ERRTRYHOME.\"\"; ?></a></br>\r\n<font class=\"pn-normal\"><?php echo \"\"._ERRSTARTHERE.\"\"; ?> <A HREF=\"/\"> <?php echo \"$sitename</a> \"._ERRHP; ?>.</font>\r\n<p>\r\n<a class=\"pn-storytitle\"><?php echo \"\"._SEARCH.\"\"; ?></a></br>\r\n<font class=\"pn-normal\"><?php echo \"\"._ERRFOPTION.\"\"; ?>.\r\n<CENTER><form action=\"modules.php\" method=post>\r\n<!-- Credit to Mayday (mayday6971) for fix -->\r\n<input type=\"hidden\" name=\"active_stories\" value=\"1\">\r\n<input type=\"hidden\" name=\"bool\" value=\"AND\">\r\n<input type=\"hidden\" name=\"stories_cat\" value=\"\">\r\n<input type=\"hidden\" name=\"stories_topics\" value=\"\">\r\n<input type=\"hidden\" name=\"op\" value=\"modload\">\r\n<input type=\"hidden\" name=\"name\" value=\"Search\">\r\n<input type=\"hidden\" name=\"file\" value=\"index\">\r\n<input type=\"hidden\" name=\"action\" value=\"search\">\r\n<input type=\"hidden\" name=\"overview\" value=\"1\">\r\n<font size=\"-1\" color=\"#000000\"><br><b>\r\n<?php echo \"\"._SEARCH.\"\"; ?> <?php echo $sitename ?></b><br>\r\n<input class=\"pn-text\" type=name name=query size=\"25\"></font></form></CENTER>\r\n\r\n<CENTER><form action=\"modules.php\" method=post>\r\n<!-- Credit to Mayday (mayday6971) for fix -->\r\n<input type=\"hidden\" name=\"active_stories\" value=\"1\">\r\n<input type=\"hidden\" name=\"stories_author\" value=\"\">\r\n<input type=\"hidden\" name=\"bool\" value=\"AND\">\r\n<input type=\"hidden\" name=\"stories_cat\" value=\"\">\r\n<input type=\"hidden\" name=\"q\" value=\"\"> \r\n<input type=\"hidden\" name=\"op\" value=\"modload\">\r\n<input type=\"hidden\" name=\"name\" value=\"Search\">\r\n<input type=\"hidden\" name=\"file\" value=\"index\">\r\n<input type=\"hidden\" name=\"action\" value=\"search\">\r\n<input type=\"hidden\" name=\"overview\" value=\"1\">\r\n<FONT size=\"-1\"><BR><B><?php echo \"\"._SEARCH.\"\"; ?></B><?php echo \"\"._TOPIC.\"\"; ?><BR>\r\n<!-- Topic Selection -->\r\n<?php\r\n echo \"<select class=\\\"pn-text\\\" NAME=\\\"topic\\\"onChange='submit()'>\" ;\r\n $column = &$pntable['topics_column'];\r\n $query = \"SELECT $column[tid], $column[topictext]\r\n\t FROM $pntable[topics]\r\n\t ORDER BY $column[topictext]\";\r\n $toplist = $dbconn->Execute($query);\r\n echo \"<option value=\\\"\\\">\"._SELECTTOPIC.\"</option>\\n\";\r\n while(list($topicid, $topics) = $toplist->fields) {\r\n\r\n\t$toplist->MoveNext();\r\n\tif ($topicid==$topic) {\r\n\t$sel = \"selected \";\r\n }\r\n\techo \"<option $sel value=\\\"$topicid\\\">$topics</option>\\n\";\r\n $sel = \"\";\r\n }\r\n echo \"</select>\";\r\n?>\r\n </FONT></FORM></CENTER>\r\n</p>\r\n<a href=\"#\" onload=\"type_text()\"></a>\r\n<?php\r\nCloseTable();\r\ninclude(\"footer.php\");\r\n}", "public abstract function showInfo();", "abstract function display();", "abstract function display();", "public abstract function display();", "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}", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function screen() {\n\t\tGFireMAutoComplete::getFreemius()->get_logger()->entrance();\n\t\tGFireMAutoComplete::getFreemius()->_account_page_load();\n\t\tGFireMAutoComplete::getFreemius()->_account_page_render();\n\t}", "function displayPage()\n{\n\tglobal $cmdOutput, $errorHolder;\n\n\t// DB Info\n\tinclude 'dbInfo.php';\n\t\n\n\t// REALTIME QUERY\n\t$problemSQL = 'SELECT * FROM Problem WHERE problemId=\"'.$_GET['problemId'].'\"';\n\t// LOCALQUERY\n\t//$problemSQL = 'SELECT * FROM problem WHERE problemId=\"1\"';\n\t$problemSQLResult = mysql_query($problemSQL, $conn);\n\t$row=mysql_fetch_array($problemSQLResult);\n\n\t\n\t$paramString = \"\";\n\tif ($row['param1'] != null and $row['param1'] != \"\") {\n\t\t$paramString = $paramString . $row['param1type'] . \" \" . $row['param1'];\n\t}\n\tif ($row['param2'] != null and $row['param2'] != \"\") {\n\t\t$paramString = $paramString . \", \" . $row['param2type'] . \" \" . $row['param2'];\n\t}\n\tif ($row['param3'] != null and $row['param3'] != \"\") {\n\t\t$paramString = $paramString . \", \" . $row['param3type'] . \" \" . $row['param3'];\n\t}\n\tif ($row['param4'] != null and $row['param4'] != \"\") {\n\t\t$paramString = $paramString . \", \" . $row['param4type'] . \" \" . $row['param4'];\n\t}\n\tif ($row['param5'] != null and $row['param5'] != \"\") {\n\t\t$paramString = $paramString . \", \" . $row['param5type'] . \" \" . $row['param5'];\n\t}\n\n\t$currentrole=$_SESSION['currentrole'];\n\t$firstname=$_SESSION['first_name'];\n\tinclude 'home_layout.php';\n\theaderLayout($currentrole, $firstname);\n\techo'\n\t\t\t\t<div>\n\t\t\t\t\t<h1>' . $row['title'] . '</h1>\n\t\t\t\t\t<p>' . $row['description'] . '</p>\n\t\t\t\t\t<form method=\"post\" action=\"./codeinput.php?problemId=' . $_GET['problemId'] . '&assignmentId='.$_GET['assignmentId'].'\">\n\t\t\t\t\t<textarea name=\"source\" rows=\"10\" cols=\"70\" style=\"resize:none;\">public ' . $row['resulttype'] . ' ' . $row['methodname'] . '(' . $paramString . ') {\n \n}</textarea></br><input type=\"submit\" /><input type=\"button\" value=\"Done\" onClick=\"goBackTwice()\"><input type=\"button\" value=\"Reset\" onClick=\"window.location.reload()\"></form></br>';\n\t// Do test case work here\n\t$testCaseSQL = 'SELECT * FROM TestCase WHERE problemId=\"'.$_GET['problemId'].'\"';\n\n\n\t\n\t$problemSolvedQuery='SELECT * FROM Gradebook WHERE studentId=\"'.$_SESSION['username'].'\" and problemId='.$_GET['problemId'].' and assignmentId='.$_GET['assignmentId'].'';\n\t$problemSolvedResult = mysql_query($problemSolvedQuery, $conn);\n\t#$finishedProb=mysql_num_rows($problemSolvedResult);\n\t\n\t$testCaseSQLResult = mysql_query($testCaseSQL, $conn);\n\t$rowCount=mysql_num_rows($testCaseSQLResult);\n\tif ($rowCount > 0) {\n\t\t$correctCounter = 0;\n\t\t\n\t\tfor($i = 0; $i < count($cmdOutput); $i++) {\n\t\t\tif ($cmdOutput[$i] == \"Y\") $correctCounter++;\n\t\t}\n\t\t\n\t\tif($correctCounter == $rowCount && mysql_num_rows($problemSolvedResult)==0) {\n\t\t\theader(\"Location: check_gradebook.php?problemId=\".$_GET['problemId'].\"&assignmentId=\".$_GET['assignmentId'].\"\");\n\t\t}\n\t\t\n\t\techo'<p>' . $errorHolder . '</p>\n\t\t\t\t<table border=\"1\" style=\"width:300px\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td> Input </td>\n\t\t\t\t\t\t<td> Expect </td>\n\t\t\t\t\t\t<td> Correct </td>\n\t\t\t\t\t\t<td> Output </td>\n\t\t\t\t\t</tr>';\n\t\t// update rows for each testcase set\n\t\t$cmdOutputCount = 0;\n\t\twhile($testCaseRow=mysql_fetch_array($testCaseSQLResult)) {\n\t\t\techo'<tr>';\n\t\t\techo'<td>';\n\t\t\tif ($testCaseRow['param1value'] != null and $testCaseRow['param1value'] != \"\") {\n\t\t\t\techo'' . $testCaseRow['param1value'] . '';\n\t\t\t}\n\t\t\tif ($testCaseRow['param2value'] != null and $testCaseRow['param2value'] != \"\") {\n\t\t\t\techo', ' . $testCaseRow['param2value'] . '';\n\t\t\t}\n\t\t\tif ($testCaseRow['param3value'] != null and $testCaseRow['param3value'] != \"\") {\n\t\t\t\techo', ' . $testCaseRow['param3value'] . '';\n\t\t\t}\n\t\t\tif ($testCaseRow['param4value'] != null and $testCaseRow['param4value'] != \"\") {\n\t\t\t\techo', ' . $testCaseRow['param4value'] . '';\n\t\t\t}\n\t\t\tif ($testCaseRow['param5value'] != null and $testCaseRow['param5value'] != \"\") {\n\t\t\t\techo', ' . $testCaseRow['param5value'] . '';\n\t\t\t}\n\t\t\techo'</td>';\n\t\t\techo'<td> ' . $testCaseRow['result'] . ' </td>';\n\t\t\techo'<td> ' . $cmdOutput[$cmdOutputCount] . ' </td>';\n\t\t\t$cmdOutputCount += 1;\n\t\t\techo'<td> ' . $cmdOutput[$cmdOutputCount] . ' </td>';\n\t\t\t$cmdOutputCount += 1;\n\t\t\techo'</tr>';\n\t\t}\n\t\techo'</table></div>';\n\t}\n\n\t\t\t#<!-- Manage Accounts tab -->\n\t\t\tinclude 'display_manage_accounts.php';\n\t\t\tif(isset($_GET['action']) && $_GET['action'] == 'manageCC'){\n\t\t\t\tmanageCC();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'manageStudent'){\n\t\t\t\tmanageStudent();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'manageFaculty'){\n\t\t\t\tmanageFaculty();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'editStudentAccount'){\n\t\t\t\teditStudentAccount();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'editFacultyAccount'){\n\t\t\t\teditFacultyAccount();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'editCCAccount'){\n\t\t\t\teditCCAccount();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'disable'){ \n\t\t\t\tdisableUser();\n\t\t\t} else if(isset($_GET['action']) && $_GET['action'] == 'activate'){ \n\t\t\t\tactivateUser();\n\t\t\t} else {\n\t\t\t\tdisplayManageAccounts();\n\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t#<!-- Question Pool tab -->\n\t\t\tinclude 'display_question_pool.php';\n\t\t\tdisplayQuestionPool($currentrole);\n\t\t\t\t\n\t\t#<!-- Gradebook tab -->\n\t\t\t\t\n\t\t\tinclude 'display_grades.php';\n\t\t\tdisplayGrades($currentrole);\n\t\t\t\n\t\t#<!-- Profile tab -->\n\t\t\n\t\t\tinclude 'display_profile.php';\n\t\t\tdisplayProfile($currentrole);\n\t\n\t\tfooterLayout();\n}", "function show()\r\n {\r\n $script = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&sort='.$this->sort.'&fltr='.$this->fltr.'&fln='.$this->fln;\r\n $script = $_SERVER['PHP_SELF'].\"?$script\";\r\n\r\n if( !$this->sort ) $this->sort='id';\r\n\t\tif($this->sort=='result') $this->sort='`result` desc';\r\n //if( strstr( $this->sort, 'seria' ) )$this->sort = $this->sort.' desc';\r\n $q = \"SELECT * FROM \".TblModSearchResult.\" where 1 order by \".$this->sort.\"\";\r\n //if( $this->srch ) $q = $q.\" and (name LIKE '%$this->srch%' OR email LIKE '%$this->srch%')\";\r\n if( $this->fltr ) $q = $q.\" and $this->fltr\";\r\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\r\n //echo '<br>$q='.$q.' $res='.$res.'$this->Right->result='.$this->Right->result.' $this->user_id='.$this->user_id;\r\n if( !$res )return false;\r\n $rows = $this->Right->db_GetNumRows();\r\n\r\n /* Write Form Header */\r\n $this->Form->WriteHeader( $script );\r\n\r\n /* Write Table Part */\r\n AdminHTML::TablePartH();\r\n\r\n /* Write Links on Pages */\r\n echo '<TR><TD COLSPAN=17>';\r\n $script1 = 'module='.$this->module.'&fltr='.$this->fltr;\r\n $script1 = $_SERVER['PHP_SELF'].\"?$script1\";\r\n\t\tif( !$this->display ) $this->display = 20;\r\n //$this->Form->WriteLinkPages( $script1, $rows, $this->display, $this->start, $this->sort );\r\n\t\t$this->Form->WriteLinkPages( $script1.'&fltr='.$this->fltr, $rows, $this->display, $this->start, $this->sort );\r\n\r\n echo '<TR><TD COLSPAN=5>';\r\n $this->Form->WriteTopPanel( $script );\r\n\r\n echo '<td colspan=5>';\r\n echo $this->Form->TextBox('srch', $this->srch, 25);\r\n echo '<input type=submit value='.$this->Msg->show_text('_BUTTON_SEARCH',TblSysTxt).'>';\r\n\r\n /*\r\n echo '<td><td><td><td><td colspan=2>';\r\n $this->Form->WriteSelectLangChange( $script, $this->fln);\r\n */\r\n\r\n $script2 = 'module='.$this->module.'&display='.$this->display.'&start='.$this->start.'&task=show&fltr='.$this->fltr;\r\n $script2 = $_SERVER['PHP_SELF'].\"?$script2\";\r\n ?>\r\n <TR>\r\n <td class=\"THead\">*</Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=id><?=$this->Msg->show_text('FLD_ID')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=query><?=$this->Msg->show_text('FLD_QUERY')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=ip><?=$this->Msg->show_text('FLD_IP')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=date><?=$this->Msg->show_text('FLD_DATE')?></A></Th>\r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=time><?=$this->Msg->show_text('FLD_TIME')?></A></Th>\r\n \r\n <td class=\"THead\"><A HREF=<?=$script2?>&sort=result><?=$this->Msg->show_text('FLD_RESULT')?></A></Th>\r\n \r\n <?\r\n\r\n $up = 0;\r\n $down = 0;\r\n $a = $rows;\r\n $j = 0;\r\n $row_arr = NULL;\r\n for( $i = 0; $i < $rows; $i++ )\r\n {\r\n $row = $this->Right->db_FetchAssoc();\r\n if( $i >= $this->start && $i < ( $this->start+$this->display ) )\r\n {\r\n $row_arr[$j] = $row;\r\n $j = $j + 1;\r\n }\r\n }\r\n\r\n $style1 = 'TR1';\r\n $style2 = 'TR2';\r\n for( $i = 0; $i < count( $row_arr ); $i++ )\r\n {\r\n $row = $row_arr[$i];\r\n\r\n if ( (float)$i/2 == round( $i/2 ) )\r\n {\r\n echo '<TR CLASS=\"'.$style1.'\">';\r\n }\r\n else echo '<TR CLASS=\"'.$style2.'\">';\r\n\r\n echo '<TD>';\r\n $this->Form->CheckBox( \"id_del[]\", $row['id'] );\r\n\r\n echo '<TD>';\r\n $this->Form->Link( $script.\"&task=edit&id=\".$row['id'], stripslashes( $row['id'] ) );\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['query'] )!='' ) echo $row['query'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['ip'] )!='' ) echo $row['ip'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['date'] )!='' ) echo $row['date'];\r\n\r\n echo '<TD align=center>';\r\n if( trim( $row['time'] )!='' ) echo $row['time'];\r\n\r\n echo '<TD align=center>';\r\n if( trim($row['result'])!='' ) echo $row['result'];\r\n\r\n } //-- end for\r\n\r\n AdminHTML::TablePartF();\r\n $this->Form->WriteFooter();\r\n return true;\r\n\r\n \r\n}", "function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "static public function displ_tbl( object &$pp1, array $other ): string \n {\n $pp1->stack_trace[]=str_replace('\\\\','/', __METHOD__ ).', lin='.__LINE__ ;\n\n if (isset($pp1->shared_dbadapter_obj)) self::$utldb = $pp1->shared_dbadapter_obj ;\n \n if (isset($pp1->category_from_url)) $category_from_url = $pp1->category_from_url ;\n else $category_from_url = '' ;\n if ('') //if ($autoload_arr['dbg']) \n { echo '<h2>'.__METHOD__ .'() '.', line '. __LINE__ .' SAYS: '.'</h2>' ; \n echo '<pre>' ; \n //echo '<br />$ u r i q='; print_r($pp1->uriq) ;\n //echo '<br />$_POST='; print_r($_POST) ;\n echo '<br />$pp1='; print_r($pp1) ;\n //echo 'ses fltr pg ='; print_r($_SESSION['filter_posts']) ;\n //echo 'For pagination (not for c o u n t !!) $qrywhere='; print_r($qrywhere) ;\n //echo '<br />$binds='; print_r($binds) ;\n //echo '<br /><span style=\"color: violet; font-size: large; font-weight: bold;\">Loading script of cls $nsclsname='.$nsclsname.'</span>'\n //exit(0) ;\n echo '</pre>'; }\n //P A G I N A T O R step 2. is click page in n avbar, read page (step 1. Create navigation bar)\n //if (isset($pp1->uriq->p) and null !== $pp1->uriq->p) {\n if (isset($pp1->urlqry_parts[3]) and null !== $pp1->urlqry_parts[3]) {\n $_SESSION['filter_posts']['pgordno_from_url'] = (int)$pp1->urlqry_parts[3] ;\n } else {\n if (!isset($_SESSION['filter_posts']['pgordno_from_url'])) {\n $_SESSION['filter_posts']['pgordno_from_url'] = 1 ;\n }\n }\n\n if (isset($pp1->uriq->c) and null !== $pp1->uriq->c) {\n $_SESSION['filter_posts']['category_from_url'] = $pp1->uriq->c ;\n $_SESSION['filter_posts']['pgordno_from_url'] = 1 ;\n } else {\n if (!isset($_SESSION['filter_posts']['category_from_url'])) {\n $_SESSION['filter_posts']['category_from_url'] = '' ;\n }\n }\n\n if ( isset($_POST[\"SearchButton\"]) and isset($_POST[\"Search\"]) \n ) {\n $_SESSION['filter_posts']['search_from_submit'] = $_POST[\"Search\"] ;\n $_SESSION['filter_posts']['pgordno_from_url'] = 1 ;\n } else {\n if (!isset($_SESSION['filter_posts']['search_from_submit'])) {\n $_SESSION['filter_posts']['search_from_submit'] = '' ;\n }\n } \n\n\n // 3 types of filter :\n $pgordno_from_url = $_SESSION['filter_posts']['pgordno_from_url'] ;\n $category_from_url = $_SESSION['filter_posts']['category_from_url'] ;\n $search_from_submit = $_SESSION['filter_posts']['search_from_submit'] ; //from $_POST\n\n if($pgordno_from_url == 0 or $pgordno_from_url < 1){ $row_ordno = 0;\n } else{ $row_ordno = ($pgordno_from_url * $pp1->rblk) - $pp1->rblk; }\n\n $qrywhere = \"'1'='1'\" ;\n $binds = [] ;\n if( $search_from_submit ) \n {\n $qrywhere .= \" and (title LIKE :search1\n OR category LIKE :search2\n OR datetime LIKE :search3\n OR img_desc LIKE :search4\n OR summary LIKE :search5\n )\" ; //OR post LIKE :search\n $binds[]=['placeh'=>':search1', 'valph'=>'%'.$search_from_submit.'%', 'tip'=>'str'];\n $binds[]=['placeh'=>':search2', 'valph'=>'%'.$search_from_submit.'%', 'tip'=>'str'];\n $binds[]=['placeh'=>':search3', 'valph'=>'%'.$search_from_submit.'%', 'tip'=>'str'];\n $binds[]=['placeh'=>':search4', 'valph'=>'%'.$search_from_submit.'%', 'tip'=>'str'];\n $binds[]=['placeh'=>':search5', 'valph'=>'%'.$search_from_submit.'%', 'tip'=>'str'];\n }\n\n if( $category_from_url ) {\n $qrywhere .= ' and category = :category_from_url' ;\n $binds[] =['placeh'=>':category_from_url', 'valph'=>$category_from_url, 'tip'=>'str'];\n }\n\n if ('') \n { echo '<h2>'.__METHOD__ .'() '.', line '. __LINE__ .' SAYS: '.'</h2>' ; \n echo '<pre>' ; \n echo 'ses fltr pg ='; print_r($_SESSION['filter_posts']) ;\n echo 'For c o u n t !! $qrywhere='; print_r($qrywhere) ;\n echo '<br />$binds='; print_r($binds) ;\n //echo '<br /><span style=\"color: violet; font-size: large; font-weight: bold;\">Loading script of cls $nsclsname='.$nsclsname.'</span>'\n echo '</pre>';\n exit(0) ;\n }\n $rcnt_filtered_posts = Tbl_crud_post::rrcount( $pp1, $qrywhere, $binds, $other=\n ['caller' => __METHOD__ .' '.', ln '. __LINE__ ] ) ;\n\n\n\n //P A G I N A T O R step 1. Create navigation bar (step 2. is click page in n avbar, read page)\n $pgn_links = self::get_pgnnav($pp1->urlqry_parts, $rcnt_filtered_posts, 'i/home/', $pp1->rblk);\n if ('') //if ($autoload_arr['dbg']) \n { echo '<h2>'.__METHOD__ .'() '.', line '. __LINE__ .' SAYS: '.'</h2>' ; \n echo '<pre>' ; \n echo '$pgn_links ='; print_r($pgn_links) ;\n echo '</pre>';\n exit(0) ;\n }\n //echo $pgn_links['navbar'];\n $pgnnavbar = $pgn_links['navbar'];\n $pgordno_from_url = (int)$pgn_links['pgordno_from_url'];\n $first_rinblock = (int)$pgn_links['first_rinblock'];\n $last_rinblock = (int)$pgn_links['last_rinblock'];\n\n if( $pgordno_from_url ) {\n $qrywhere .= \" ORDER BY datetime desc LIMIT :first_rinblock, :rblk\" ;\n $binds[]=['placeh'=>':first_rinblock', 'valph'=>$row_ordno, 'tip'=>'int'];\n $binds[]=['placeh'=>':rblk', 'valph'=>$pp1->rblk, 'tip'=>'int'];\n\n \n }\n\n if ('') //if ($autoload_arr['dbg']) \n { echo '<h2>'.__METHOD__ .'() '.', line '. __LINE__ .' SAYS: '.'</h2>' ; \n echo '<pre>' ; \n //shared_dbadapter_obj = B12phpfw\\core\\b12phpfw\\Db_allsites Object\n echo '$pp1 ='; print_r($pp1) ; \n echo 'self::$utldb ='; print_r(self::$utldb) ; \n echo '$pgn_links ='; print_r($pgn_links) ; \n //echo 'ses filter_ posts ='; print_r($_SESSION['filter_posts']) ;\n //echo 'For pagination (not for c o u n t !!) $qrywhere='; print_r($qrywhere) ;\n //echo '<br />$binds='; print_r($binds) ;\n ////echo '<br /><span style=\"color: violet; font-size: large; font-weight: bold;\">Loading script of cls $nsclsname='.$nsclsname.'</span>'\n echo '</pre>'; }\n\n self::$utldb::setdo_pgntion('1') ; \n $cursor_posts = Tbl_crud_post::get_cursor( $pp1 // new in ver. 10.0.3.0\n , $dmlrr='*'\n , $qrywhere //=\"'1'='1'\"\n , $binds //=[]\n , $other=['caller' => __METHOD__ .' '.', ln '. __LINE__ ] );\n\n\n\n\n\n //$title = 'MSG HOME';\n //require_once $pp1->shares_path . '/hdr.php'; //require $pp1->shares_path . '/hdr.php';\n //Home_view::navbar_top($pp1, $other=['caller' => __FILE__ .' '.', ln '. __LINE__ ]); \n //require_once(\"n avbar.php\");\n ?>\n\n\n <!-- Page content CENTER-->\n <!-- Main -->\n <main class=\"container\">\n <div class=\"grid\">\n\n <section>\n <!-- Left pge content-->\n\n <?php\n self::show_pge_hdr( $pp1, $pgn_links ) ;\n //, $category_from_url, $search_from_submit, $pgordno_from_url\n\n\n\n $ordno = 0 ;\n while ( $rx = Tbl_crud_post::rrnext( $cursor_posts // u tldb::r rnext\n , $other=['caller' => __METHOD__ .' '.', ln '. __LINE__ ] ) and $rx->rexists ): \n {\n ++$ordno ;\n if ('') //if ($autoload_arr['dbg']) \n { echo '<h2>'.__METHOD__ .'() '.', line '. __LINE__ .' SAYS: '.'</h2>' ; \n echo '<pre>' ; \n echo '$rx='; print_r($rx) ;\n //echo '<br /><span style=\"color: violet; font-size: large; font-weight: bold;\">Loading script of cls $nsclsname='.$nsclsname.'</span>'\n echo '</pre>'; \n }\n ?>\n\n\n\n\n\n <!-- P o s t c o n t e n t class=\"text-muted fst-italic mb-2\"-->\n <?php\n /*self::show_post_ttle($pp1, $rx, $first_rinblock, $ordno) ;\n self::show_post_meta($pp1, $rx, $first_rinblock, $ordno) ;\n self::show_post_summary($pp1, $rx) ;\n self::show_post_img($pp1, $rx) ; */\n ?>\n <div style=\"border: 1px solid rgb(51, 51, 51); padding: 12px 12px 0px; margin: 40px 0px 20px;\">\n <!-- ======================================\n 1. P o s t t i t l e \n h3 style=\"margin: 0px; background: rgb(230, 243, 255) ; width: 100%; \"\n #93ACC8 #9394C8 #AFB7C8 lightblue lightgray, darkblue\n =========================================== -->\n <h5 style=\"margin: 0px; color: rgb(40, 109, 193); background: #93ACC8 ;\n =========================================== -->; \n width: 100%; \">\n <?=self::escp($rx->title)?></h5>\n\n\n <?php\n //<!-- ======================================\n //<!-- 2. P o s t m e t a c o n t e n t-->\n // =========================================== -->\n\n echo //'<br><br><br>'. \n str_replace('!', \"&nbsp;\", \n //str_pad( \n (string) ($first_rinblock + $ordno - 1)\n // , 6, '!', STR_PAD_LEFT\n //) \n ) .'. ' ;\n ?>\n &nbsp; \n <!-- eg: Posted on January 1, 2021 by Start Bootstrap -->\n <a href=\"<?=$pp1->filter_postcateg?><?=self::escp($rx->category)?>/p/1\">\n <?=self::escp($rx->category)?> </a>\n\n Written by \n <a href=\"<?=$pp1->read_user?>username/<?=self::escp($rx->author)?>\">\n <?=self::escp($rx->author)?></a>\n\n\n On <a href=\"<?=$pp1->kalendar?>mm/<?=self::escp(substr($rx->datetime,0,7))?>\"\n title=\"Show all posts in post month\"><?=self::escp($rx->datetime)?></a>\n\n\n <?php\n $qrywhere=\"post_id=:id AND status=:status\" ;\n $binds=[ ['placeh'=>':id', 'valph'=>$rx->id, 'tip'=>'int']\n , ['placeh'=>':status', 'valph'=>'ON', 'tip'=>'str']\n ] ;\n $rcnt_post_comments = Tbl_crud_post_comment::rrcount( $pp1, $qrywhere, $binds\n , $other = ['caller' => __METHOD__ .' '.', ln '. __LINE__ ] ) ;\n\n\n ?>\n <!-- Post categories or...-->\n &nbsp;\n <!--a class=\"badge bg-secondary text-decoration-none link-light\" href=\"#!\"-->\n <span> <!-- style=\"float:right;\" class=\"badge badge-dark text-light\" -->\n Comments: <?=$rcnt_post_comments?>\n </span>\n\n &nbsp; <a href=\"<?=$pp1->read_post?>id/<?=$rx->id?>\" >More</a>\n <!-- e n d 2. P o s t m e t a c o n t e n t-->\n\n <!-- ======================================\n 3. P o s t s u m m a r y\n =========================================== -->\n <div>\n <?php\n if ($rx->summary and $rx->summary > '') {\n //echo '<h5>Article summary</h5>' ; // SUMMARY : \n echo '<b>'. str_replace('{{b}}','<b>', str_replace('{{/b}}','</b>', \n nl2br(self::escp($rx->summary))\n )) .'</b>';\n } else {\n\n }\n ?>\n </div>\n <!-- e n d 3. a r t i c l e s u m m a r y \n\n\n <!-- ======================================\n 4. P o s t i m a g e\n =========================================== -->\n <div id=\"clpsedTxt\">\n <div>\n <br>\n <?php\n //J://awww//www//fwphp//glomodul//blog//Uploads//mvc_M_V_data_flow.jpg\n //src=\"https://dummyimage.com/900x400/ced4da/6c757d.jpg\"\n $tmp_imgpath = str_replace('/',DS, __DIR__ .DS.'Uploads'.DS.self::escp(\n (null == $rx->image ? 'NON EXISTENT' : $rx->image)\n ));\n //$tmp_imgurlrel = 'Uploads/'.self::escp($rx->image) ;\n $tmp_imgurlrel = '/vendor/b12phpfw/img/'.self::escp($rx->image) ;\n //if (file_exists($tmp_imgpath)) \n { ?>\n <figure class=\"mb-4\">\n <img src=\"<?=$tmp_imgurlrel?>\" class=\"img-fluid card-img-top\"\n title = \"<?='$rx->image='. $rx->image .', $tmp_imgpath='\n .$tmp_imgpath .', $tmp_imgurlrel='. $tmp_imgurlrel?>\"\n style=\"max-height:450px;\" \n alt=\"<?=$tmp_imgurlrel?>\" />\n </figure>\n <?php\n } \n\n $tmp_imgpath = str_replace('/',DS, $pp1->shares_path\n . 'img'.DS.'img_big'.DS.self::escp(\n (null == $rx->image ? 'NON EXISTENT' : $rx->image)\n ) ) ;\n $tmp_imgurlrel = '/vendor/b12phpfw/img/img_big/'.self::escp($rx->image) ;\n if ('') {self::jsmsg( [ //b asename(__METHOD__).\n __METHOD__ .', line '. __LINE__ .' SAYS'=>'BEFORE img '\n ,'$tmp_imgurlrel'=>$tmp_imgurlrel\n ] ) ; }\n if ($rx->image and file_exists($tmp_imgpath)) { ?>\n <img src=\"<?=$tmp_imgurlrel?>\"\n title = \"<?='$rx->image='. $rx->image \n .', $tmp_imgpath='.$tmp_imgpath .', $tmp_imgurlrel='. $tmp_imgurlrel?>\"\n style=\"width:100%;\" \n /><?php\n\n\n } //<!-- e n d 3. a r t i c l e i m a g e -->\n\n\n //<!-- 4. i m a g e d e s c r i p t i on -->\n $tmptxt = self::escp($rx->img_desc) ; \n //if ($rx->image and file_exists($tmp_imgpath)) \n if ($tmptxt > '') \n { \n //$lnklabel = substr(strstr(self::escp($rx->img_desc), '{{lnktxt}}'), 10,9) ;\n ?>\n <div class=\"card-body\">\n <h5>Image description</h5>\n <p><?php\n echo str_replace('{{b}}','<b>', str_replace('{{/b}}','</b>', \n //str_replace('{{href}}','<a href=\"', str_replace('{{/href}}','\">'.$lnklabel.'</a>',\n nl2br($tmptxt)\n ));\n //echo '<br />('.__DIR__ .DS.'Uploads'.DS.$rx->image.')' ; ?>\n </p>\n </div><!-- e n d 4. i m a g e d e s c r i p t i on -->\n <?php\n } ?>\n\n\n\n </div><!-- ***** e n d Content for collapse component ********** -->\n </div> <!-- e n d c o l l a p s e -->\n\n\n </div> <!-- e n d P o s t c o n t e n t -->\n <?php\n } endwhile;\n\n echo $pgn_links['navbar'] ;\n echo '<br><small class=\"text-muted\">'. __METHOD__ .'</small>' ;\n ?>\n <br>\n\n\n\n\n\n </section>\n\n\n\n\n\n\n <aside>\n <?php\n Side_view::displ_tbl( $pp1 //, $fltr_sort\n , $category_from_url, $search_from_submit, $pgordno_from_url\n , $other=['caller' => __METHOD__ .' '.', ln '. __LINE__ ]);\n ?>\n </aside>\n\n </div><!-- grid -->\n </main><!-- Main -->\n\n\n <!--no m ore : ftr.php script src=\"<=$pp1->wsroot_url?>zinc/exp_collapse.js\" \n language='JScript' type='text/javascript'>\n </script-->\n\n <?php\n //require_once $pp1->shares_path . '/ftr.php';\n\n return('1') ;\n }", "function infoScreenObject()\n\t{\n\t\t$this->checkPermission(\"visible\");\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "function show_page() {\n\t$query = 'SELECT *, DATE_FORMAT(creation_date, \"%M %e, %Y\") AS formatted_creation FROM users WHERE id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" LIMIT 1';\n\t$result = DB::queryRaw($query);\t// have MySQL format the date for us\n\t\n\tif (mysqli_num_rows($result) != 1)\n\t\ttrigger_error('User not found', E_USER_ERROR);\n\t\n\t// ** User Found, info valid at this point **\n\t\n\t$row = mysqli_fetch_assoc($result);\n\t\n\t\n\t// Page header\n\tglobal $use_rel_external_script;\t// direct page_header to include some javascript that will make links\n\t$use_rel_external_script = true;\t// marked as rel=\"external\" open in a new tab while remaining XHTML-valid\n\t\n\tpage_header($row['name']);\t// the title of the page is the user's name; helpful if you open multiple users in different tabs\n\t\n\techo <<<HEREDOC\n <h1>View User</h1>\n \n\nHEREDOC;\n\t\n\t\n\t// Format Data\n\t$email_verified = 'No';\n\tif ($row['email_verification'] == '1')\n\t\t$email_verified = 'Yes';\n\t\t\n\t$cell = format_phone_number($row['cell']);\n\t\n\t$permissions = $row['permissions'];\n\t$account_type = 'Regular';\n\tif ($permissions == 'C')\n\t\t$account_type = 'Captain';\n\telse if ($permissions == 'A')\n\t\t$account_type = 'Non-Captain Admin';\n\telse if ($permissions == 'L')\n\t\t$account_type = 'Alumnus';\n\telse if ($permissions == 'T')\n\t\t$account_type = 'Temporary';\n\t\n\t// mailing list status\n\t$mailings = 'No';\n\tif ($row['mailings'] == '1')\n\t\t$mailings = 'Yes';\n\t\n\t\n\t// Format Approval Status line\n\t//\n\t// depending on whether the user is approved, banned, or in limbo, the link next to that\n\t// information needs to un-approve, un-ban, or approve/ban the user\n\t// eg. \"Approval Status: Approved (to un-approve, click here)\"\n\tif ($row['approved'] == '-1') {\n\t\t$approval_status = 'Banned';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Approve&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">approve</a> | <a href=\\\"Edit_User?Unapprove&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">make pending</a>)</span>\";\n\t}\n\telse if ($row['approved'] == '0') {\n\t\t$approval_status = 'Pending';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Approve&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">approve</a> | <a href=\\\"Edit_User?Ban&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">ban</a>)</span>\";\n\t}\n\telse if ($row['approved'] == '1') {\n\t\t$approval_status = 'Approved';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Ban&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">ban</a>)</span>\";\n\t}\n\t\t\n\techo <<<HEREDOC\n <table class=\"spacious\">\n <tr>\n <td>Name:</td>\n <td>\n <span class=\"b\">{$row['name']}</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_Name&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n </td>\n </tr><tr>\n <td>Email Address:</td>\n <td class=\"b\"><a href=\"mailto:{$row['email']}\" rel=\"external\">{$row['email']}</a></td>\n </tr><tr>\n <td>Cell Phone Number:&nbsp;</td>\n <td class=\"b\">$cell</td>\n </tr><tr>\n <td>Year of Graduation:</td>\n <td>\n <span class=\"b\">{$row['yog']}</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_YOG&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n <br /><br />\n </td>\n </tr><tr>\n <td>ID:</td>\n <td><span class=\"b\">{$row['id']}</span></td>\n </tr><tr>\n <td>Account Type:</td>\n <td>\n <span class=\"b\">$account_type</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_Permissions&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n </td>\n </tr><tr>\n <td>Mailing List:</td>\n <td><span class=\"b\">$mailings</span></td>\n </tr><tr>\n <td>Approval Status:</td>\n <td>\n <span class=\"b\">$approval_status</span>\n $approval_line\n </td>\n </tr><tr>\n <td>Email Verified:</td>\n <td class=\"b\">$email_verified</td>\n </tr><tr>\n <td>Creation Date:</td>\n <td><span class=\"b\">{$row['formatted_creation']}</span></td>\n </tr><tr>\n <td>Registered From:</td>\n <td class=\"b\">{$row['registration_ip']}</td>\n </tr>\n </table>\n <br />\n <span class=\"small i\">Only users are able to edit their email address and cell phone number.</span>\nHEREDOC;\n\t\n\t// Show test scores\n\t$query = 'SELECT test_scores.score AS score, tests.name AS name, tests.total_points AS total, DATE_FORMAT(tests.date, \"%M %e, %Y\") AS formatted_date, test_scores.score_id AS score_id'\n\t\t\t. ' FROM test_scores'\n\t\t\t. ' INNER JOIN tests ON tests.test_id=test_scores.test_id'\n\t\t\t. ' WHERE test_scores.user_id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" AND archived=\"0\"'\n\t\t\t. ' ORDER BY tests.date DESC';\n\t$result = DB::queryRaw($query);\n\t\n\tif (mysqli_num_rows($result) > 0) {\n\t\techo <<<HEREDOC\n\n \n <br /><br /><br /><br /><br />\n <h4>Recent Test Scores</h4>\n <table class=\"contrasting\">\n <tr>\n <th>Test</th>\n <th>Score</th>\n <th>Maximum</th>\n <th>Date</th>\n <th></th>\n </tr>\n\nHEREDOC;\n\t\t\n\t\t$row = mysqli_fetch_assoc($result);\n\t\twhile ($row) {\n\t\t\techo <<<HEREDOC\n <tr>\n <td>{$row['name']}</td>\n <td class=\"text-centered\">{$row['score']}</td>\n <td class=\"text-centered\">{$row['total']}</td>\n <td>{$row['formatted_date']}</td>\n <td><a href=\"Delete_Score?ID={$row['score_id']}&amp;xsrf_token={$_SESSION['xsrf_token']}\">Delete</a></td>\n </tr>\n\nHEREDOC;\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t}\n\t\t\n\t\techo <<<HEREDOC\n </table>\nHEREDOC;\n\t}\n\t\n\t$query = 'SELECT test_scores.score AS score, tests.name AS name, tests.total_points AS total, DATE_FORMAT(tests.date, \"%M %e, %Y\") AS formatted_date, test_scores.score_id AS score_id'\n\t\t\t. ' FROM test_scores'\n\t\t\t. ' INNER JOIN tests ON tests.test_id=test_scores.test_id'\n\t\t\t. ' WHERE test_scores.user_id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" AND archived=\"1\"'\n\t\t\t. ' ORDER BY tests.date DESC';\n\t$result = DB::queryRaw($query);\n\t\n\tif (mysqli_num_rows($result) > 0) {\n\t\techo <<<HEREDOC\n\n \n <br /><br />\n <h4>Old Test Scores</h4>\n <table class=\"contrasting\">\n <tr>\n <th>Test</th>\n <th>Score</th>\n <th>Maximum</th>\n <th>Date</th>\n <th></th>\n </tr>\n\nHEREDOC;\n\t\t\n\t\t$row = mysqli_fetch_assoc($result);\n\t\twhile ($row) {\n\t\t\techo <<<HEREDOC\n <tr>\n <td>{$row['name']}</td>\n <td class=\"text-centered\">{$row['score']}</td>\n <td class=\"text-centered\">{$row['total']}</td>\n <td>{$row['formatted_date']}</td>\n <td><a href=\"Delete_Score?ID={$row['score_id']}&amp;xsrf_token={$_SESSION['xsrf_token']}\">Delete</a></td>\n </tr>\n\nHEREDOC;\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t}\n\t\t\n\t\techo <<<HEREDOC\n </table>\nHEREDOC;\n\t}\n}", "function displayPage()\r\n{\r\n global $dam,$interim,$student;\r\n extract($interim);\r\n extract($student);\r\n\r\n echo '<h1>Interim '.$ID.'</h1>';\r\n echo '<center>';\r\n if($dam->userCanEditInterim('')) echo '<a href=\"./editinterim.php?interimid='.$ID.'\">[Edit this interim]</a> ';\r\n if($dam->userCanDeleteInterim('',$ID)) echo '<a href=\"./deleteinterim.php?interimid='.$ID.'\">[Delete this interim]</a> ';\r\n echo '<a href=\"./viewinterimpf.php?id='.$ID.'\" target=\"_blank\">[Click here for printer-friendly version]</a> ';\r\n echo '<a href=\"sendInterimEmail.php?interimid='.$ID.'\">[Email interim report]</a>';//createEmailLink();\r\n echo '<br /><br /></center>';\r\n\r\n echo '<table width=\"100%\" border=\"0\">';\r\n echo '<tr><td align=\"left\" width=\"25%\"><b>Student ID: </b></td><td align=\"left\">'.$StudentID.'</td></tr>\r\n <tr><td align=\"left\" width=\"25%\"><b>Student Name: </b></td><td align=\"left\"><a href=\"./viewstudent.php?id='.$StudentID.'\">'.$FIRST_NAME.' '.$MIDDLE_NAME.' '.$LAST_NAME.'</a></td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Class Year: </b></td><td align=\"left\">'.$CLASS_YEAR.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Course Number & Title: </b></td><td align=\"left\">'.$CourseNumberTitle.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Instructor: </b></td><td align=\"left\">'.$Instructor.'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Date: </b></td><td align=\"left\">'.readableDate($Date).'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Problem: </b></td><td align=\"left\">';\r\n\r\n $problems = explode(';',$Problem);\r\n for($i = 0; $i < count($problems); $i++){\r\n echo $problems[$i].'<br />';\r\n }\r\n\r\n echo '</td></tr><tr><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>';\r\n\r\n echo '<tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Comments: </b></td><td align=\"left\">'.stripslashes($Comments).'</td></tr>\r\n <tr><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Recommended Action: </b></td><td align=\"left\">';\r\n\r\n $actions = explode(';',$RecommendAction);\r\n for($i = 0; $i < count($actions); $i++){\r\n if(strcmp($actions[$i],\"Conference with a Dean []\") == 0) echo 'Conference with a Dean<br />';\r\n else echo $actions[$i].'<br />';\r\n }\r\n\r\n echo '</td></tr><tr valign=\"top\"><td align=\"left\" width=\"25%\">&nbsp;</td><td>&nbsp;</td></tr>';\r\n\r\n echo '<tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Other Recommended Action: </b></td><td align=\"left\">'.stripslashes($OtherAction).'</td></tr>\r\n <tr valign=\"top\"><td align=\"left\" width=\"25%\"><b>Date Processed: </b></td><td align=\"left\">'.readableDate($DateProcessed).'</td></tr>';\r\n\r\n echo '</table>'; \r\n}", "public function display_page_contents() {\n\t\tif ( ! $this->upgrader->table_is_ready() ) {\n\t\t\t// Page header.\n\t\t\t$this->display_error_page_header();\n\t\t\treturn;\n\t\t}\n\n\t\t// Get everything that is in the table.\n\t\t$this->table_contents = ( new CRUD( $this->table->get_table_definition() ) )->get( [ '*' ], [], OBJECT_K );\n\n\t\t// Page header.\n\t\t$this->display_page_header();\n\n\t\t// Display buttons to add/delete entries.\n\t\t$this->display_page_actions();\n\n\t\t// Display what is in the table.\n\t\t$this->display_table_contents();\n\t}", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "function information()\n\t\t{\n\t\t\t$this->directPageDetails(\"information\");\n\t\t}", "abstract protected function displayContent();", "public function show()\n {\n if ($this->mode > 0) {\n $this->tracker(\"END DEBUG-CLASS\");\n $out .= \"<div align=\\\"left\\\"><table width=\\\"100%\\\" border=\\\"0\\\" cols=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\";\n /* $out .= debug::row_top(\"<a name=\\\"debug_top\\\"><b>Quicknavi</b></a>\");\n $out .= debug::row_single(\"<a href=\\\"#debugtracker\\\">Debugtracker</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#debugvars\\\">User-Debugvars</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#post\\\">\\$_POST</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#get\\\">\\$_GET</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#cookie\\\">\\$_COOKIE</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#session\\\">\\$_SESSION</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#server\\\">\\$_SERVER</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#files\\\">\\$_FILES</a>&nbsp;|&nbsp;\"\n .\"<a href=\\\"#sql_querys\\\">SQL-Querys</a>\");*/\n $out .= debug::row_top(\"<a name=\\\"debugtracker\\\"><b>Debugtracker</b></a>\");\n $out .= debug::row_single($this->timer_show());\n /*\n $out .= debug::row_top(\"<a name=\\\"debugvars\\\"><b>Userdefined Debugvars</b></a>\");\n $out .= debug::row_array($this->debugvars);\n $out .= debug::row_top(\"<a name=\\\"post\\\"><b>\\$_POST-Data</b></a>\");\n $out .= debug::row_array($_POST);\n $out .= debug::row_top(\"<a name=\\\"get\\\"><b>\\$_GET-Data</b></a>\");\n $out .= debug::row_array($_GET);\n $out .= debug::row_top(\"<a name=\\\"cookie\\\"><b>\\$_COOKIE-Data</b></a>\");\n $out .= debug::row_array($_COOKIE);\n $out .= debug::row_top(\"<a name=\\\"session\\\"><b>\\$_Session-Data</b></a>\");\n $out .= debug::row_array($_SESSION);\n $out .= debug::row_top(\"<a name=\\\"server\\\"><b>\\$_SERVER-Data</b></a>\");\n $out .= debug::row_array($_SERVER);\n $out .= debug::row_top(\"<a name=\\\"files\\\"><b>\\$_FILES-Data</b></a>\");\n $out .= debug::row_array($_FILES);\n */\n $out .= debug::row_top(\"<a name=\\\"sql_querys\\\"><b>SQL-Querys (\".count($this->sql_query_list).\")</b></a>\");\n $out .= $this->query_fetchlist();\n $out .= \"</table></div>\";\n // Mode 2 write complete Debugvars to a file. The directory has to be protected.\n if ($this->mode == \"2\") {\n echo $this->mode;\n $file_handle = fopen($this->debug_path.\"debug_\".time().\".htm\", \"a\");\n fputs($file_handle, $out);\n fclose($file_handle);\n }\n return $out;\n } else {\n return \"\";\n }\n }", "function renderPage()\n{\n $calledFile = basename($_SERVER['PHP_SELF']);\n $privileges = getDataPrivileges($calledFile);\n if ($privileges['bolView'] !== true) {\n die(accessDenied($_SERVER['HTTP_REFERER']));\n }\n # Initialize all global variables.\n $globalVariables = [\n 'privileges' => $privileges,\n 'strConfirmStartCalculation' => getWords(\"do you want to start calculation?\"),\n 'strPageTitle' => getWords($privileges['menu_name']),\n 'pageIcon' => \"../images/icons/\" . $privileges['icon_file'],\n 'strPageDesc' => getWords(\"Service Charge management\"),\n 'pageHeader' => '',\n 'strTemplateFile' => getTemplate(str_replace(\".php\", \".html\", $calledFile)),\n 'formObject' => null,\n 'formInput' => '',\n 'gridContents' => null,\n 'gridList' => '',\n ];\n extractToGlobal($globalVariables);\n # Important to given access to our global variables.\n foreach (array_keys($GLOBALS) as $varName) {\n global $$varName;\n }\n $pageHeader = pageHeader($pageIcon, $strPageTitle, $strPageDesc);\n # Get form model contents.\n $formOptions = [\n 'column' => 1,\n 'caption' => strtoupper($strWordsINPUTDATA),\n 'references' => ['dataId']\n ];\n $formObject = getFormObject($formOptions);\n $formInput = $formObject->render();\n # Get grid list contents.\n $gridOptions = ['caption' => strtoupper($strWordsLISTOF . \" \" . getWords($privileges['menu_name']))];\n $gridContents = getGridListContents($gridOptions);\n $gridList = $gridContents->render();\n # Start to render using tiny but strong class.\n $tbsPage = new clsTinyButStrong;\n $tbsPage->LoadTemplate($strMainTemplate);\n $tbsPage->Show();\n}", "function displayMain(){\n $data='<div class=\"about\"><h2>About this tool</h2>\n<p>Graber Transcriptdb is an attempt to create an integrated transcript database of all the organisms and annotations found in UCSC,MGI,ENSEMBL,UNIPROT,and EBI databases. \n The database generates unique transcript_id and exon_id for all redundant transcripts and exons from various annotations for a given organism version.We store the start cordinates using the zero-base standard and the end cordinates using the one-base standard.\nBut we display all the cordinates using the one-base. \n</p>\n<h2>You can use the tool as followed</h2>\n <ul><list>You have genomic regions of interest or a gene and you would like to extract overlaping functional features</li>\n <list>You have a file containing genomic regions of interest or a list of genes or transcripts and you would like to extract overlaping functional features</li>\n </ul>\n <p> Database updates are ran monthly to synchronize both our data and external data sources.\n</p><hr/><h2>Good Practices:</h2>';\n$data.=getXmlUrl(\"Good Practices\");\n$data.='</div>';\n return $data;\n}", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "function Show_All() \n\t{\n\t\tglobal $eTraffic;\n\t\t\n\t\t$this->ShowIf('Debug Log', $this->Show_Log());\n\t\t$this->ShowIf('Traffic Counters', $eTraffic->Display());\n\t\t$this->ShowIf('Time Analysis', $this->Show_Performance());\n\t\t$this->ShowIf('SQL Analysis', $this->Show_SQL_Details());\n\t\t$this->ShowIf('Shortcodes / BBCode',$this->Show_SC_BB());\n\t\t$this->ShowIf('Paths', $this->Show_PATH());\n\t\t$this->ShowIf('Deprecated Function Usage', $this->Show_DEPRECATED());\n\t\t$this->ShowIf('Included Files', $this->Show_Includes());\n\t}", "public function displayAction() {\r\n\r\n //GET THE TEXT STRING\r\n $text = $this->_getParam('text_string');\r\n\r\n //GET PAGE ID\r\n $page_id = $this->_getParam('page_id');\r\n\r\n $writesTable = Engine_Api::_()->getDbtable('writes', 'sitepage')->setWriteContent($page_id, $text);\r\n exit();\r\n }", "public function display($pageName);", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "function display() {\n\t# Global Variables\n\tglobal $_db, $_GLOBALS, $validator;\n\t\n\t# Get Data\n\t$data\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= $_db->fetch(\"\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`orders`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`uid` DESC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\");\n\t\n\t# Generate Listing\n\t$listing\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= \"\";\n\tforeach ($data as $item) {\n\t\t$listing\t\t\t\t\t\t\t\t\t\t\t\t\t\t.= \"\n\t\t\t<tr>\n\t\t\t\t<td>{$item->datetime}</td>\n\t\t\t\t<td>{$item->reference}</td>\n\t\t\t\t<td>{$item->name}</td>\n\t\t\t\t<td>{$item->contact_number}</td>\n\t\t\t\t<td>{$item->email}</td>\n\t\t\t\t<td>{$item->amount}</td>\n\t\t\t</tr>\n\t\t\";\n\t}\n\t\n\t# Generate HTML\n\t$html\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= \"\n\t<div class='content'>\n\t\n\t\t<h2>Orders</h2>\n\t\t\n\t\t<table class='results_table' width='100%'>\n\t\t\t<tr>\n\t\t\t\t<th>Date/Time</th>\n\t\t\t\t<th>Reference No.</th>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Contact Number</th>\n\t\t\t\t<th>Email</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t</tr>\n\t\t\t{$listing}\n\t\t</table>\n\t\t\n\t</div>\n\t\";\n\t\n\t# Display HTML\n\tprint $html;\n}", "protected function infoScreenAction() {}", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "function renderFunctionDetail() {\n\n reset($this->accessModifiers);\n while (list($k, $access) = each($this->accessModifiers)) {\n if (0 == count($this->functions[$access]))\n continue;\n\n reset($this->functions[$access]);\n while (list($name, $function) = each($this->functions[$access])) {\n\n $tplvars = array();\n $tplvars[\"NAME\"] = $function[\"name\"];\n $tplvars[\"ACCESS\"] = $function[\"access\"];\n\n if (\"true\" == $function[\"undoc\"])\n $tplvars[\"UNDOC\"] = $this->undocumented;\n\n if (\"true\" == $function[\"abstract\"])\n $tplvars[\"ABSTRACT\"] = \"abstract\";\n\n if (\"true\" == $function[\"static\"])\n $tplvars[\"STATIC\"] = \"static\";\n\n if (isset($function[\"doc\"][\"shortdescription\"]))\n $tplvars[\"SHORTDESCRIPTION\"] = $this->encode($function[\"doc\"][\"shortdescription\"][\"value\"]);\n\n if (isset($function[\"doc\"][\"description\"]))\n $tplvars[\"DESCRIPTION\"] = $this->encode($function[\"doc\"][\"description\"][\"value\"]);\n\n $this->renderCommonDocfields(\"functiondetails_\", $function);\n \n if (isset($function[\"doc\"][\"parameter\"])) {\n $tplvars[\"PARAMETER\"] = $this->getParameter($function[\"doc\"][\"parameter\"]);\n $this->renderParameterDetail($function[\"doc\"][\"parameter\"]);\n }\n \n if (isset($function[\"doc\"][\"throws\"]))\n $this->renderThrows($function[\"doc\"][\"throws\"], \"functiondetails_\");\n\n if (isset($function[\"doc\"][\"global\"])) \n $this->renderGlobals($function[\"doc\"][\"global\"], \"functiondetails_\");\n\n if (isset($function[\"doc\"][\"return\"])) {\n\n $tplvars[\"RETURNTYPE\"] = $function[\"doc\"][\"return\"][\"type\"]; \n\n $this->tpl->setCurrentBlock(\"functiondetails_return\");\n $this->tpl->setVariable(\"TYPE\", $function[\"doc\"][\"return\"][\"type\"]);\n $this->tpl->setVariable(\"DESCRIPTION\", $this->encode($function[\"doc\"][\"return\"][\"value\"]));\n\n if (isset($function[\"doc\"][\"return\"][\"name\"]))\n $this->tpl->setVariable(\"NAME\", $function[\"doc\"][\"return\"][\"name\"]);\n\n $this->tpl->parseCurrentBlock();\n\n } else {\n\n $tplvars[\"RETURNTYPE\"] = \"void\";\n\n }\n\n $this->tpl->setCurrentBlock(\"functiondetails_loop\"); \n $this->tpl->setVariable($tplvars);\n $this->tpl->parseCurrentBlock(); \n }\n\n $this->tpl->setCurrentBlock(\"functiondetails\");\n $this->tpl->setVariable(\"ACCESS\", ucfirst($access) );\n $this->tpl->parseCurrentBlock();\n }\n\n }", "public function display(){\r\n echo \"Unique Row Id: \" . $this->getUnique_studentKey() . \"<br/>\";\r\n echo \"User Id: \" . $this->getStudentUserID() . \"<br/>\";\r\n echo \"Password: \" . $this->getStudentPassword() . \"<br/>\";\r\n echo \"First Name: \" . $this->getFirstName() . \"<br/>\";\r\n echo \"Middle Name: \" . $this->getMiddleName() . \"<br/>\";\r\n echo \"Last Name: \" . $this->getLastName() . \"<br/>\";\r\n echo \"Email: \" . $this->getEmail() . \"<br/>\"; \r\n echo \"School Name: \" . $this->getSchoolName() . \"<br/>\"; \r\n echo \"Grade: \" . $this->getGrade() . \"<br/>\";\r\n echo \"Role: \" . $this->getRole() . \"<br/>\";\r\n }", "public function getInfo()\n {\n ob_start();\n echo '<h3>ForWeb framework Page package</h3>';\n echo '<p>Contain main page rendering functions and database tables:</p>';\n echo '<ul>';\n echo '<li>Pages table</li>';\n echo '<li>Templates table</li>';\n echo '<li>Blocks table</li>';\n echo '<li>Includes table</li>';\n echo '</ul>';\n $out = ob_get_contents();\n ob_end_clean();\n return $out;\n }", "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "public function show()\n\t{\n\t\t\n\t}", "public static function outputPage() {\n\t\tself::phpSetup();\n\t\t// Set the session\n global $clsession;\n $clsession =new SessionV4;\n //--------------------------------------------------------------\n // Exit if the web is closed for maintenance except\n // when the user is the master\n if( self::ISCLOSED && $_SESSION['usr'] != 'master' )\n exit(pageMaintenance::show());\n # --------------------------------------------------------------\n \t# Show the parameters entered with the request\n self::see();\n\t\tif( self::SEEPHPINFO ) phpinfo();\n\t\t# --------------------------------------------------------------\n\t\t# Reset the session if requested\n\t\tif( isset($_POST['reset']) && $_POST['reset'] == 'XRESET')\n\t\t\t$clsession->logout(sessionV4::NOACT);\n # --------------------------------------------------------------\n\t\t# Open the main class of the system\n\t\trequire_once('main.php');\n $clmain=new main;\n $s=$clmain->execute();\n $shses=(singleton::SHOWSESSION ? $clsession->getSession() : '');\n\t\treturn $s.$shses;\n\t}", "public function show();", "public function show();", "public function show();", "public function show();", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "abstract protected function show();", "function display(&$db,&$StockID,&$DemandID) { //####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_#####\n\n// Display Seach fields at top and Entry form below that. This function is called the first time\n// the page is called, and is also invoked at the end of all of the other functions.\n// echo \"<br/>DISPLAY - DemandID = $DemandID<br/>\";\n\techo '<form action=\"' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '\" method=\"post\">';\n echo '<div>';\n\techo '<input type=\"hidden\" name=\"FormID\" value=\"' . $_SESSION['FormID'] . '\" />';\n\tif (!isset($StockID)) {\n\t\techo'<table cellpadding=\"3\" class=\"selection\"><tr>\n\t\t\t<td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td>\n\t\t\t<td><input tabindex=\"1\" type=\"text\" name=\"Keywords\" size=\"20\" maxlength=\"25\" /></td>\n\t\t\t<td><b>' . _('OR') . '</b></td>\n\t\t\t<td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td>\n\t\t\t<td><input tabindex=\"2\" type=\"text\" name=\"StockCode\" size=\"15\" maxlength=\"20\" /></td>\n\t\t\t<td><b>' . _('OR') . '</b></td>\n\t\t\t<td><a href=\"'. htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?listall=yes\">' . _('List All Demands') . '</a></td></tr>\n\t\t\t<tr><td colspan=\"7\"><div class=\"centre\"><input tabindex=\"3\" type=\"submit\" name=\"Search\" value=\"' . _('Search Now') .\n '\" /></div></td></tr></table>';\n\t} else {\n\t\tif (isset($DemandID)) {\n\t\t//editing an existing MRP demand\n\n\t\t\t$sql = \"SELECT demandid,\n\t\t\t\t\tstockid,\n\t\t\t\t\tmrpdemandtype,\n\t\t\t\t\tquantity,\n\t\t\t\t\tduedate\n\t\t\t\tFROM mrpdemands\n\t\t\t\tWHERE demandid='\" . $DemandID . \"'\";\n\t\t\t$result = DB_query($sql);\n\t\t\t$myrow = DB_fetch_array($result);\n\n\t\t\tif (DB_num_rows($result) > 0){\n\t\t\t\t$_POST['DemandID'] = $myrow['demandid'];\n\t\t\t\t$_POST['StockID'] = $myrow['stockid'];\n\t\t\t\t$_POST['MRPDemandtype'] = $myrow['mrpdemandtype'];\n\t\t\t\t$_POST['Quantity'] = locale_number_format($myrow['quantity'],'Variable');\n\t\t\t\t$_POST['Duedate'] = ConvertSQLDate($myrow['duedate']);\n\t\t\t}\n\n\t\t\techo '<input type=\"hidden\" name=\"DemandID\" value=\"' . $_POST['DemandID'] . '\" />';\n\t\t\techo '<input type=\"hidden\" name=\"StockID\" value=\"' . $_POST['StockID'] . '\" />';\n\t\t\techo '<table class=\"selection\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>' ._('Part Number') . ':</td>\n\t\t\t\t\t\t<td>' . $_POST['StockID'] . '</td>\n\t\t\t\t\t</tr>';\n\n\t\t} else {\n\t\t\tif (!isset($_POST['StockID'])) {\n\t\t\t\t$_POST['StockID'] = '';\n\t\t\t}\n\t\t\techo '<table class=\"selection\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>' . _('Part Number') . ':</td>\n\t\t\t\t\t\t<td><input type=\"text\" name=\"StockID\" size=\"21\" maxlength=\"20\" value=\"' . $_POST['StockID'] . '\" /></td>\n\t\t\t\t\t</tr>';\n\t\t}\n\n\n\t\tif (!isset($_POST['Quantity'])) {\n\t\t\t$_POST['Quantity']=0;\n\t\t}\n\n\t\tif (!isset($_POST['Duedate'])) {\n\t\t\t$_POST['Duedate']=' ';\n\t\t}\n\n\t\techo '<tr><td>' . _('Quantity') . ':</td>\n\t\t\t\t<td><input type=\"text\" name=\"Quantity\" class=\"number\" size=\"6\" maxlength=\"6\" value=\"' . $_POST['Quantity'] . '\" /></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>' . _('Due Date') . ':</td>\n\t\t\t\t<td><input type=\"text\" class=\"date\" alt=\"' . $_SESSION['DefaultDateFormat'] . '\" name=\"Duedate\" size=\"12\" maxlength=\"12\" value=\"' . $_POST['Duedate'] . '\" /></td>\n\t\t\t</tr>';\n\t\t// Generate selections for Demand Type\n\t\techo '<tr>\n\t\t\t\t<td>' . _('Demand Type') . '</td>\n\t\t\t\t<td><select name=\"MRPDemandtype\">';\n\n\t\t$sql = \"SELECT mrpdemandtype,\n\t\t\t\t\t\tdescription\n\t\t\t\tFROM mrpdemandtypes\";\n\t\t$result = DB_query($sql);\n\t\twhile ($myrow = DB_fetch_array($result)) {\n\t\t\tif (isset($_POST['MRPDemandtype']) and $myrow['mrpdemandtype']==$_POST['MRPDemandtype']) {\n\t\t\t\techo '<option selected=\"selected\" value=\"';\n\t\t\t} else {\n\t\t\t\techo '<option value=\"';\n\t\t\t}\n\t\t\techo $myrow['mrpdemandtype'] . '\">' . $myrow['mrpdemandtype'] . ' - ' .$myrow['description'] . '</option>';\n\t\t} //end while loop\n\t\techo '</select></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<br />\n\t\t\t<div class=\"centre\">\n\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"' . _('Enter Information') . '\" />&nbsp;&nbsp;\n\t\t\t\t<input type=\"submit\" name=\"listsome\" value=\"' . _('List Selection') . '\" />&nbsp;&nbsp;\n\t\t\t\t<input type=\"submit\" name=\"deletesome\" value=\"' . _('Delete Demand Type') . '\" />';\n\t\t// If mrpdemand record exists, display option to delete it\n\t\tif ((isset($DemandID)) AND (DB_num_rows($result) > 0)) {\n\t\t\techo '<br/><br/><a href=\"' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?delete=yes&amp;StockID='.$StockID.'&amp;DemandID=' . $DemandID . '\" onclick=\"return confirm(\\'' . _('Are you sure you wish to delete this demand?') . '\\');\">' . _('Or Delete Record') . '</a>';\n\t\t}\n echo '</div>';\n\t}\n\techo '</div>\n\t\t</form>';\n\n}", "public function display()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->backupDatabase();\n } else {\n $this->backupView('database');\n parent::display();\n }\n }", "protected function show_contents()\n\t\t{\n\t\t\t//echo(\"<a href='javascript:setTimeout(window.location.href=\\\"\". $_SERVER['PHP_SELF']. \"?\". $this->paramname. \"=\". $this->menuvalue. \"\\\",5000);'>\". $this->menutext. \"</a>\");\n\t\t\techo(\"<a href='javascript:openhelp(\\\"helppage.php?context=\". (isset($_GET['Page']) ? $_GET['Page'] : \"\"). \"\\\")'>\". $this->menutext. \"</a>\");\t\n\t\t\techo(\"<SCRIPT> function openhelp(aurl) { window.open(aurl,'_blank'); } </SCRIPT>\");\n\t\t}", "function showtable()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=mysql'>Show Database</a></center><br />\r\n <table width=50% align='center' class='xpltab' cellspacing=0 ><tr><th style='border-left:thin solid #f00;'>Table</th><th>Column count</th><th>Dump</th><th>Drop</th></tr>\";\r\n $db=$_GET['db'];\r\n $query=$this->qe(\"SHOW TABLES FROM $db\");\r\n while($data=mysql_fetch_array($query))\r\n {\r\n\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$data[0]\");\r\n $h=(mysql_num_rows($iml))?mysql_num_rows($iml):0;\r\n $r.= \"<tr><td><a href='?act=showcon&db=$db&table=$data[0]'>$data[0]</td><td>$h</td><td><a href='?act=downdb&db=$db&table=$data[0]'>Dump</a></td><td><a href='?act=dropdb&db=$db&tbl=$data[0]'>Drop</a></td></tr>\";\r\n \r\n }\r\n \r\n $r.= \"</table>\".$this->sqlcommand().\"</div>\";\r\n return $r;\r\n $this->free($query);\r\n $this->free($iml);\r\n mysql_close($c);\r\n }", "function print_user_info($query_result) {\n\n $row = pg_fetch_row($query_result);\n\n echo '<div class=\"user-info pure-g\">';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl><dt>UID</dt><dd>'.$row[0].'</dd></dl>';\n echo '</div>';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl><dt>First Name</dt><dd>'.$row[1].'</dd></dl>';\n echo '</div>';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl><dt>Last Name</dt><dd>'.$row[2].'</dd></dl>';\n echo '</div>';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl><dt> Gender</dt><dd>'.$row[3].'</dd></dl>';\n echo '</div>';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl><dt>Age</dt><dd>'.$row[4].'</dd></dl>';\n echo '</div>';\n echo '<div class=\"pure-u pure-u-1-6\">';\n echo '<dl class=\"last-child\"><dt>Location</dt><dd>'.$row[5].'</dd></dl>';\n echo '</div>';\n echo '</div>';\n }", "public final function display(){\n echo \"Username is{$this->user} and user id is{$this->userId}\";\n }", "function display($r){\r\n\t\t\t\t\t\t$f1=odbc_result($r,\"Subject\");\r\n \t\t\t\t\t\t$f2=odbc_result($r,\"Attendance\");\r\n\t\t\t\t\t\t$f3=odbc_result($r,\"AttItem\");\r\n \t\t\t\t\t\t$f4=odbc_result($r,\"Quizzes\");\r\n\t\t\t\t\t\t$f5=odbc_result($r,\"QuiItem\");\r\n \t\t\t\t\t\t$f6=odbc_result($r,\"OralProjectPart\");\r\n\t\t\t\t\t\t$f7=odbc_result($r,\"OralItem\");\r\n \t\t\t\t\t\t$f8=odbc_result($r,\"Exam\");\r\n\t\t\t\t\t\t$f9=odbc_result($r,\"ExamItem\");\r\n \t\t\t\t\t\t$f10=odbc_result($r,\"Grade\");\r\n\r\n\t\t\t\t\t\techo \"<tr bgcolor='#00CCee'><td>\" . $f1 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f2 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f3 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f4 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f5 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f6 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f7 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f8 . \"</td>\";\r\n\t\t\t\t\t\techo \"<td>\" . $f9 . \"</td>\";\r\n \t\t\t\t\t\techo \"<td>\" . $f10 . \"</td></tr>\";\r\n\t\t\t\t\t}", "function displayArticleInformation()\n {\n // query saved articles of the account\n $savedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted articles of the account\n $deletedArticlesQuery = mysql_query(\"SELECT saved_article_id FROM argus_saved_articles WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of articles\n $savedArticlesCount = mysql_num_rows($savedArticlesQuery);\n $deletedArticlesCount = mysql_num_rows($deletedArticlesQuery);\n $totalArticlesCount = $savedArticlesCount + $deletedArticlesCount;\n \n // display ARTICLE information\n echo \"\n <p>Article Information</p>\n <p id='box'>\n Saved Articles: \".$savedArticlesCount.\"<br />\n Trash Articles: \".$deletedArticlesCount.\"<br /><br>\n Total Articles: \".$totalArticlesCount.\"<br />\n </p>\";\n \n return;\n }", "public function displayContentOverview() {}", "function displayListScreen($TABLES,$DBSELECT,&$conf)\t{\n\t\tif ($this->conf['performanceaudit']) $this->perfArray['fe_adminLib.inc displaylist start:']=$this->metafeeditlib->displaytime().\" Seconds\";\n\t\t// Initialisation\n\t\t$conf['cmdmode']='list';\n\t\t$content='';\n\t\t$DEBUG='';\n\t\t\n\t\t$distinct=$conf['general.']['useDistinct']?\" distinct \":\"\";\n\t\t$dispDir= $conf['list.']['displayDirection']?$conf['list.']['displayDirection']:'Right'; //-- this should be handled in template choice...\n\t\t// Gestion des templates selon exporttype (can't this be done in Pi1 ?)\n\t\t$exporttype=$this->piVars['exporttype'];\n\t\t//Print parameters\n\t\t$print=$this->piVars['print'];\n\t\t$printerName=$this->piVars['printername'];\n\t\t$printServerName=$this->piVars['printservername'];\n\t\tif (($exporttype == 'PDF') && ($conf['list.']['nbCols'])){$exporttype = \"PDFTAB\";}\n\t\t\n\t\t//$this->markerArray['###BACK_URL###'] = \"\";\n\t\t// return navigation ... should this be not handled in template ... hmm ...\n\t\t/*if (!$conf['no_action']) {\n\t\t\t$this->backURL=$this->metafeeditlib->makeBackURLTypoLink($conf,$this->backURL);\n\t\t\tif (!strpos($this->backURL,'?')) $this->backURL.='?';\n\t\t\t$this->markerArray['###BACK_URL###'] = $this->backURL;\n\t\t}*/\n\t\t\n\t\t//@TODO replaced by specific pagebrowser \n\t\tif ($conf['list.']['pageSize']) $this->internal['results_at_a_time'] = $conf['list.']['pageSize']; // Number of results to show in a listing.\n\t\tif ($conf['list.']['pageSize']&& $conf['list.']['nbCols']) $this->internal['results_at_a_time'] = $conf['list.']['pageSize']*$conf['list.']['nbCols'];\n\t\tif ($conf['list.']['maxPages']) $this->internal['maxPages'] = $conf['list.']['maxPages']; // The maximum number of \"pages\" in the browse-box: \"Page 1\", 'Page 2', etc.\n\t\t$this->internal['currentTable'] = $this->theTable;\n\t\t//End init...\n\t\t//We get advanced search combo data if necessary.\n\t\t$this->metafeeditlib->getAdvancedSearchComboMarkerArray($conf,$this->markerArray);\n\t\t//We get templates\n\t\t$tpl=$this->prepareListTemplates($conf,$this->markerArray,$exporttype);\n\t\t//error_log(__METHOD__.':tPL '.$exporttype.'-'.print_r($tpl,true));\n\t\t//@region \n\t\t//@todo put this in a function\n\t\t//$searchfieldsSet=$this->checkSearchCriteriae($conf,$this->markerArray);\n\t\t$searchfieldsSet=true;\n\t\tif ($conf['list.']['forceSearch']) {\n\t\t\t$searchfieldsSet=false;\n\t\t\t$as=$conf['inputvar.']['advancedSearch'];\n\t\t\tif (is_array($as) && count($as)) {\n\t\t\t\tforeach($as as $searchField=>$searchFieldConf) {\n\t\t\t\t\tif (is_array($searchFieldConf)) {\n\t\t\t\t\t\tif ($this->metafeeditlib->is_extent($searchFieldConf['val']) || $this->metafeeditlib->is_extent($searchFieldConf['valsup'])) {\n\t\t\t\t\t\t\t$searchfieldsSet=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($this->metafeeditlib->is_extent($searchFieldConf)) {\n\t\t\t\t\t\t$searchfieldsSet=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Alphabetical Search\n\t\t\tif ($conf['inputvar.']['sortLetter']) $searchfieldsSet=true;\n\t\t\tif (!$searchfieldsSet) $this->markerArray['###EVAL_ERROR###'].=$this->metafeeditlib->makeErrorMarker($conf,$this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_LIST_NOSEARCHCRITERAE###'),$this->markerArray));\n\t\t}\n\t\tif ($searchfieldsSet) {\n\t\t\t// We build the SQL Query\n\t\t\t$sql=$this->metafeeditlib->getListSQL($TABLES,$DBSELECT,$conf,$this->markerArray,$DEBUG);\n\t\t\t//error_log(__METHOD__.\":\".print_r($sql,true));\n\t\t\t//@TODO : we get sort variable and sort direction from GET/POST Vars (should this not be done in Pi1 ?)...hmm ...\n\t\t\t$Arr=explode(',',$conf['list.']['show_fields']);\n\t\t\tif ($conf['list.']['sortFields']){\n\t\t\t\tforeach($Arr as $fieldName) {\n\t\t\t\t\t$this->markerArray['###SORT_CLASS_'.$fieldName.'###']=($fieldName==$this->internal['orderBy'])?($this->internal['descFlag']?'mfedt_sortdesc':'mfedt_sortasc'):'NOSORT';\n\t\t\t\t\t$this->markerArray['%23%23%23SORT_DIR_'.$fieldName.'%23%23%23']=($fieldName==$this->internal['orderBy'])?($this->internal['descFlag']?'0':'1&'.$this->prefixId.'[resetorderby]['.$conf['pluginId'].']=1'):'1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// End sort calculations\n\t\t\t// Page calculations\n\t\t\t// We handle pagination here and should just do a count here ...\n\t\t\t\n\t\t\t$cols=$conf['list.']['nbCols'];\n\t\t\t$ps=$conf['list.']['pageSize'];\n\t\n\t\t\t// default page size is 100\n\t \n\t\t\tif (!$ps) $ps=100;\n\t\t\t$ncols=1;\n\t\t\t$nbdispcols=0;\n\t\t\tif ($cols) $ncols=$cols;\n\t\n\t\t\t$nbe=$ncols; // number of elements per column (Down)/row (RIGHT) \n\t\t\t$nbep=$ps*$ncols; //Number of elements per page\n\t\t\tif ($conf['list.']['jumpPageOnGroupBy']) $nbe=$nbep;\n\t\t\tif ($dispDir=='Down') {\n\t\t\t\t$nbdispcols=$ncols;\n\t\t\t\t$ncols=$cols=1;\n\t\t\t\t$nbe=$ps;\n\t\t\t}\n\t\t\t//-- end page calculations\t\t\n\t\t\t// This counts the number of lines ...\n\t\n\t\t\t//TODO add distinct or not through flexform ...\n\t\t\tif ($conf['list.']['whereStringFunction']) {\n\t\t\t\teval($conf['list.']['whereStringFunction']);\n\t\t\t}\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']);\n\t\t\tif (!$res) {\n\t\t \t\tdie(__METHOD__.\":Sql error : \".$GLOBALS['TYPO3_DB']->sql_error().', sql : '.$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']));\n\t\t\t}\n\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList row count ',$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having']),$DEBUG);\n\t\t\t$num=$GLOBALS['TYPO3_DB']->sql_num_rows($res);\t// If there are menu-items ...\n\t\t\t$this->markerArray['###METAFEEDITNBROWS###']='<span class=\"nbrows\">'.$this->metafeeditlib->getLL(\"nbrows\",$this->conf).$num.'</span>';\n\t\t\t$NBSup=0; // Number of empty elements for page breaks and group by breaks;\n\t\t\t$pageidx=0;\n\t\t\t$pi=1; //page number we start at 1\n\t\t\t$pagedelta=array(); // array of page deltas for page browser\n\t\t\t$paged=0; // current page delta due to page and groupby breaks\n\t\t\t$oldpage=0; // pagechangeflag\n\t\t\t$pageid=1; // page number for grouby nb elts\n\t\t\t$mode=0;\n\t\t\t$NbGroupBys=0;\n\t\n\t\t\t// CALENDAR_SETUP\n\t\t\tif ($conf['list.']['calendarSearch']){\t\t\t\n\t\t\t\t$cal=t3lib_div::makeInstance('tx_metafeedit_calendar');\n\t\t\t\t$cal->init($conf,$sql,$this->metafeeditlib,$this->cObj);\n\t\t\t\t$this->markerArray['###CALENDAR_SEARCH###']=$cal->main('', $conf,$sql);\n\t\t\t}\n\t\t\t\n\t\t\t// Group by calculations\n\t\t\t$fNA=t3lib_div::trimexplode(',',$conf['list.']['groupByFieldBreaks']);\n\t\t\t//$groupBy Array initialisation\n\t\t\t$groupBy=array();\n\t\t\tforeach($fNA as $fN) {\n\t\t\t\t$groupBy[$fN]=null;\n\t\t\t}\n\t\t\tif ($sql['groupBy']) {\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('mod(count(*),'.$nbe.') as moduloelts, count(*) as nbelts, ceiling(count(*)/'.$nbep.') as pages'.$sql['gbFields'].$sql['calcFieldsSql'].($sql['groupBy']?','.$conf['table'].'.*':''), $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql']);\n\t\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList group by row count ',$GLOBALS['TYPO3_DB']->SELECTquery('mod(count(*),'.$nbe.') as moduloelts, count(*) as nbelts, ceiling(count(*)/'.$nbep.') as pages'.$sql['gbFields'].$sql['calcFieldsSql'].($sql['groupBy']?','.$conf['table'].'.*':''), $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql']),$DEBUG);\n\t\t\t\t\n\t\t\t\t$GBTA=array();\n\t\t\t\twhile($GbRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\t\t\t\t\t$gbLabel=$GbRow[$GBFieldLabel];\n\t\t\t\t\t$GBTA[$gbLabel]['mod']=$GbRow['moduloelts'];\n\t\t\t\t\t$GBTA[$gbLabel]['pages']=$GbRow['pages'];\n\t\t\t\t\t$GBTA[$gbLabel]['nbelts']=$GbRow['nbelts'];\n\t\t\t\t\t$GBTA[$gbLabel]['nbsup']=$NBSup;\n\t\n\t\t\t\t\tfor ($i = $pi; $i <= ($GbRow['pages']+$pi); $i++) {\n\t\t\t\t\t\t$pagedelta[$i]=$NBSup;\n\t\t\t\t\t}\n\t\n\t\n\t\t\t\t\t//$nbsupd=(($NBSup%$nbe)+($nbe-($NBSup%$nbe));\n\t\t\t\t\t$nbsupd=(($NBSup%$nbe)+($nbe-($NBSup%$nbe)));\n\t\t\n\t\t\t\t\t$nbbefelts=($pageid-1)*$nbep+$nbpelts;\n\t\t\t\t\t$nballelts=$nbbefelts +$GbRow['nbelts'];\n\t\n\t\t\t\t\t$paged=floor($NBSup/$nbep); //Number of empty elements...\n\t\t\t\t\t$firstpage=floor($nbbefelts/$nbep)+1;\n\t\t\t\t\t$lastpage=ceil($nballelts/$nbep);\n\t\n\t\t\t\t\tfor ($i = 1; $i < $firstpage; $i++) {\n\t\t\t\t\t\t$pageGrpElts[$gbLabel][$i]=0;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfor ($i = $firstpage; $i < $lastpage; $i++) {\n\t\t\t\t\t\t$pageGrpElts[$gbLabel][$i]=$nbep;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t$pageGrpElts[$gbLabel][$lastpage]=$GbRow['moduloelts']+($nbe-$GbRow['moduloelts']);\n\t\t\t\t\t$pageGrpElts[$gbLabel][$firstpage]=(($GbRow['nbelts']>$nbep)?$nbep:$GbRow['nbelts'])-$NBSup-$mode;\n\t\n\t\t\t\t\tif($GBTA[$gbLabel]['mod']) $NBSup=$NBSup+($nbe-$GBTA[$gbLabel]['mod']);\n\t\t\t\t\t// wrong !!\n\t\t\t\t\t$pi+=$GbRow['pages'];\n\t\t\t\t\t$pageid=$lastpage;\n\t\t\t\t\tif ($oldpage<$firstpage) { \n\t\t\t\t\t\t$oldpage=$lastpage;\n\t\t\t\t\t\t$nbpelts=0;\n\t\t\t\t\t}\n\t\t\t\t\t$nbpelts+=$nbsupd;\n\t\n\t\t\t\t\t$NbGroupBys++;\n\t\t\t\t\t$mode=$GbRow['moduloelts'];\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showFirstLast'])) $this->internal['showFirstLast']=$conf['list.']['showFirstLast'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['pagefloat'])) $this->internal['pagefloat']=$conf['list.']['pagefloat'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showRange'])) $this->internal['showRange']=$conf['list.']['showRange'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['dontLinkActivePage'])) $this->internal['dontLinkActivePage']=$conf['list.']['dontLinkActivePage'];\n\t\t\t$this->markerArray['###METAFEEDITNBPAGES###']='';\n\t\t\tif ($conf['list.']['pagination']) {\n\t\t\t\t$this->internal['res_count']=$num+$NBSup;\n\t\n\t\t\t\t$pointer = $conf['inputvar.']['pointer'];\n\t\t\t\t$pointer = intval($pointer);\n\t\t\t\tif ($pointer>(($num+$NBSup)/$conf['list.']['pageSize'])) $pointer=0;\n\t\t\t\t$nbpages=ceil(($num+$NBSup)/$conf['list.']['pageSize']);\n\t\t\t\t$this->markerArray['###METAFEEDITNBPAGES###']='<span class=\"nbpages\">'.$this->metafeeditlib->pageSelector($nbpages,$conf).$this->metafeeditlib->getLL(\"nbpages\",$this->conf).$nbpages.'</span>';\n\t\n\t\t\t\t// HACK to set navigation pointer for page browser;\n\t\t\t\t$this->piVars['pointer']=$pointer;\n\t\t\t\t$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);\n\t\t\t\t$LIMIT = ' LIMIT '.($pointer*$results_at_a_time - $pagedelta[$pointer+1]).','.$results_at_a_time;\n\t\t\t\tif ($conf['list.']['no_detail']) {\n\t\t\t\t\t$LIMIT='';\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// List SQL REQUEST with limitations, pagination, etc ...\n\t\t\t\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql'].($exporttype?'':$LIMIT));\n\t\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayList rows',$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where'].$sql['groupBy'].$sql['having'].$sql['orderBySql'].($exporttype?'':$LIMIT)),$DEBUG);\n\t\t\t// process variables\n\t\n\t\t\t$out='';\t\n\t\t\t$lcols='';\n\t\t\t$col=''; \n\t\t\t$row='';\n\t\t\t$rows='';\n\t\t\t$i=0; // col count\n\t\t\t$lc=0; // line count\n\t\t\t$nblines=0; // line count\n\t\t\t$gc=0; //groupby count\n\t\t\t$g_mod=0; // modulo for vertical display..\n\t\t\t$nbrowscol=0;\n\t\t\t$nbenreg=$num+$NbGroupBys;\n\t\t\t\n\t\t\tif ($conf['list.']['groupBySize'] && $dispDir!='Down') die(\"PLUGIN META FEEDIT : Group By Size is only handled when Display Direction is Down\");\n\t\t\tif (!$conf['list.']['groupBySize'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Group By Size must be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['groupBySize'] && $dispDir!='Down') die(\"PLUGIN META FEEDIT : Group By Size must not be set when Display Direction is not Down\");\n\t\t\tif ($conf['list.']['pageSize'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Page size must not be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['pagination'] && $dispDir=='Down') die(\"PLUGIN META FEEDIT : Pagination must not be set when Display Direction is Down\");\n\t\t\tif ($conf['list.']['groupBySize']) $nbenreg=$num+($NbGroupBys*$conf['list.']['groupBySize']);\n\t\t\t\n\t\t\t$nblines=$ps;\n\t\n\t\t\tif ($dispDir=='Down'){\n\t\t\t\tif ($conf['list.']['pagination']) {\n\t\t\t\t\t$nbrowscol=$ps;\n\t\t\t\t\t$nbenreg=$nbdispcols*$ps;\n\t\t\t\t\t$nblines=$nbenreg;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$nbrowscol=ceil($nbenreg/$nbdispcols);\n\t\t\t\t}\n\t\t\t\t$width=floor(100/$nbdispcols);\n\t\t\t} else {\n\t\t\t\t$nbrowscol=$nbe;\n\t\t\t\t//$nbrowscol=2;\n\t\t\t}\n\t\t\t// we iterate on list items here\n\t\t\t$mediafile='';\n\t\t\t$mediaplayer='';\n\t\t\t$nbrows=0;\n\t\t\t\n\t\t\t// MODIF CBY\n\t\t\t// List alternate templates\n\t\t\t$nbAltRow=$conf['list.']['nbAltRows'];\n\t\t\t$nar=1;\n\t\n\t\t\t$templateExport='';\n\t\t\t\n\t\t\t// List Item Loop \n\t\t\t$x=0;\n\t\t\twhile(($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) && ($exporttype || $lc<$nblines)) {\n\t\t\t\tif (t3lib_extmgm::isLoaded('ard_mcm')) {\n\t\t\t\t\t$this->langHandler->localizeRow($menuRow,$this->theTable);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//we add php calculated fields here ...\n\t\t\t\t$this->metafeeditlib->addPhpCalcFields($menuRow,$conf);\n\t\t\t\t$nbrows++;\n\t\t\t\t//TODO : $this->displayListItem($menuRow,$lc,$nbrows,$conf);\n\t\n\t\t\t\t// to display mediaplayer first file\n\t\t\t\tif ($lc==0 && $conf['list.']['mediaPlayer'] && !$mediaru) {\n\t\t\t\t\tforeach($menuRow as $key=>$val) {\n\t\t\t\t\t\tif ($conf['TCAN'][$this->theTable]['columns'][$key]['config']['type']=='group' && $conf['TCAN'][$this->theTable]['columns'][$key]['config']['internal_type'] == 'file') {\n\t\t\t\t\t\t\t$mediafiles = t3lib_div::trimexplode(',', $val);\n\t\t\t\t\t\t\t$mediafile=$conf['TCAN'][$this->theTable]['columns'][$key]['config']['uploadfolder'].'/'.$mediafiles[0];\n\t\t\t\t\t\t\t$mediaru=$menuRow['uid'];\n\t\t\t\t\t\t\t$mediaplayer = $this->metafeeditlib->getMediaPlayer($mediafile, $conf);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if ($this->performanceaudit) t3lib_div::devLog($conf['inputvar.']['cmd'].\" display Item List start :\".$this->metafeeditlib->displaytime(), $this->extKey );\n\t\n\t\t\t\t// We get foreign table data if necessary (should be in the the sql query ...)\n\t\t\t\t//@todo we shouldn't need this anymore\n\t\t\t\t///$this->foreignTableSetup($conf,$menuRow,$this->markerArray);\n\t\n\t\t\t\t// to be removed as soon as i find an alternative\n\t\n\t\t\t\t$this->markerArray['###OPENROW###']=\"\";\n\t\t\t\t$this->markerArray['###CLOSEROW###']=\"\";\n\t\t\t\t\n\t\t\t\t// List Item Data processing\n\t\t\t\t\n\t\t\t\t$menuRow=$this->userProcess('evalFunc',$menuRow);\n\t\t\t\t\n\t\t\t\t// group by field handling \n\t\t\t\t$pagejump=0;\n\t\t\t\t//error_log(__METHOD__.\": -\".print_r($tpl,true));\n\t\t\t\t$groupByFields=$this->groupByHeader($conf,$tpl['GBFCode'].$tpl['GBCode'],$menuRow,$groupBy,$lastgroupBy,$evalGroupBy,$GrpByField,$lc,$gc,$i,$pagejump,$sql,false,$DEBUG,$nbrows);\n\t\t\t\tif ($pagejump) break;\n\t\t\t\t// New cols \n\t\n\t\t\t\t// here for compatibility reasons .... to be removed\n\t\n\t\t\t\tif ($cols && $i==0) {\n\t\t\t\t\t$this->markerArray['###OPENROW###']='<tr '.$conf['caller']->pi_classParam('list-row-'.$nar).'>';\n\t\t\t\t}\n\t\n\t\t\t\t$i++;\n\t\n\t\t\t\t// here for compatibility reasons .... to be removed\n\t\n\t\t\t\tif ($cols && $i>=$cols && $dispDir=='Right') {\n\t\t\t\t\t$i=0;\n\t\t\t\t\t$lc++;\n\t\t\t\t\t$this->markerArray['###CLOSEROW###']=\"</tr>\";\n\t\t\t\t}\n\t\n\t\t\t\t// List Item Data processing\n\t\t\t\t$conf['recUid']=$menuRow[$conf['uidField']];\n\t\t\t\t\n\t\t\t\t// Call to user item marker function\n\t\t\t\t\n\t\t\t\tif ($conf['userFunc_afterItemMark']) t3lib_div::callUserFunction($conf['list.']['userFunc_afterItemMark'],$conf,$this);\n\t\n\t\t\t\t//$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $menuRow, '', TRUE, 'FIELD_', $conf['general.']['xhtml']);\n\t\t\t\t\n\t\t\t\t$markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $menuRow, '', TRUE, 'FIELD_', FALSE);\n\t\t\t\t$markerArray = $this->metafeeditlib->setCObjects($conf,$this->markerArray,$tpl['itemElCode'],$menuRow,$markerArray,'ITEM_');\n\t\t\t\t//error_log(__METHOD__.\" Mem x $x ma: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\t\t\n\t\t\t\t// MODIF CBY\n\t\t\t\t// alternate template marker ...\n\t\t\t\t$markerArray['###LIST-ROW-ALT###']=$nar;\n\t\t\t\t$nar++;\n\t\t\t\tif ($nar>$nbAltRow)$nar=1;\n\t\n\t\t\t\t$item=$this->cObj->substituteMarkerArray($tpl['itemElCode'], $markerArray);\n\t\t\t\t// List item stdWrap\n\t\t\t\tif (is_array($conf['list.']['item_stdWrap.'][$this->theTable.'.'])) {\n\t\t\t\t\t$this->cObj->start($menuRow,$this->theTable);\n\t\t\t\t\t$item=$this->cObj->stdWrap($item,$conf['list.']['item_stdWrap.'][$this->theTable.'.']);\n\t\t\t\t}\n\t\t\t\tif (!$conf['list.']['no_detail']) {\n\t\t\t\t\t$item=$this->cObj->substituteSubpart($tpl['itemCode'], '###ITEM-EL###', $item);\n\t\t\t\t\t$item=$this->cObj->substituteMarker($item, '###ACTIONS-LIST-ELEMENT###', $this->metafeeditlib->getListItemActions($conf,$this,$markerArray));\n\t\t\t\t}\n\t\t\t\t$item= $this->cObj->substituteMarkerArray($groupByFields.$item, $markerArray);\n\t\t\t\t// Col or row display \n\t\t\t\tif ($dispDir=='Down') {\n\t\t\t\t\tif (!$conf['list.']['no_detail']) $lc++; //MMMM\n\t\t\t\t\t$col.=$item;\n\t\t\t\t\t// If Display direction is Down (cols first) \n\t\t\t\t\tif ($lc%$nbrowscol<$g_mod) {\n\t\t\t\t\t\t$col=$this->cObj->substituteSubpart($tpl['itemColCode'], '###ITEM###', $col);\n\t\t\t\t\t\t$lcols.= $this->cObj->substituteMarkerArray($col, $markerArray);\n\t\t\t\t\t\t$col='';\n\t\t\t\t\t}\n\t\t\t\t\tif ($nbrowscol) $g_mod=$lc%$nbrowscol;\n\t\t\t\t} else {\n\t\t\t\t\t// Display Right (rows first)\n\t\t\t\t\t$row.=$item;\n\t\t\t\t\tif ($lc>$g_mod) {\n\t\t\t\t\t\t$row=$this->cObj->substituteSubpart($tpl['itemRowCode'], '###ITEM###', $row);\n\t\t\t\t\t\t$rows.= $this->cObj->substituteMarkerArray($row, $markerArray);\n\t\t\t\t\t\t$row='';\n\t\n\t\t\t\t\t}\n\t\t\t\t\tif ($nbrowscol) {\n\t\t\t\t\t\t\t$g_mod=$lc;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$tpl['itemRowCode']) $out.=$item;\n\t\t\t\t}\n\t\t\t\t//if ($conf['performanceaudit']) t3lib_div::devLog($conf['inputvar.']['cmd'].\" display Item List end :\".$this->metafeeditlib->displaytime(), $this->extKey );\n\t\t\t\t// End of list item iteration\n\t\t\t\t$x++;\n\t\t\t}\n\t\t\t\n\t\t\t//(__METHOD__.\" Mem x $x after moop: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\tif ($markerArray==null) $markerArray= array(); //TODO : this should not be here\n\t\t\tif ($dispDir=='Down' && $col) {\n\t\t\t\t$col=$this->cObj->substituteSubpart($tpl['itemColCode'], '###ITEM###', $col);\n\t\t\t\t$lcols.= $this->cObj->substituteMarkerArray($col, $markerArray);\n\t\t\t\t$col='';\n\t\t\t} else {\t\n\t\t\t\t$row=$this->cObj->substituteSubpart($tpl['itemRowCode'], '###ITEM###', $row);\n\t\t\t\t$rows.= $this->cObj->substituteMarkerArray($row, $markerArray);\n\t\t\t\t$row='';\n\t\t\t}\n\t\t\n\t\t\tif (!$nbrows) $rows='';\n\t\t\t\n\t\t\t// List post processing\n\t\t\t\n\t\t\t// Add last group by totals :\n\t\t\t\n\t\t\t$groupByFields=$this->groupByHeader($conf,$tpl['GBFCode'].$tpl['GBCode'],$menuRow,$groupBy,$lastgroupBy,$evalGroupBy,$GrpByField,$lc,$gc,$i,$pagejump,$sql,true,$DEBUG,$nbrows);\n\t\t\t$out.=$groupByFields;\n\t\t\t//error_log(__METHOD__.\" Mem x $x gbh2: \".$this->metafeeditlib->getMemoryUsage());\n\t\t\t$wraparray=array();\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['disabledLinkWrap'])) $wraparray['disabledLinkWrap']=$conf['list.']['disabledLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['inactiveLinkWrap'])) $wraparray['inactiveLinkWrap']=$conf['list.']['inactiveLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['activeLinkWrap'])) $wraparray['activeLinkWrap']=$conf['list.']['activeLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['browseLinksWrap'])) $wraparray['browseLinksWrap']=$conf['list.']['browseLinksWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showResultsWrap'])) $wraparray['showResultsWrap']=$conf['list.']['showResultsWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['showResultsNumbersWrap'])) $wraparray['showResultsNumbersWrap']=$conf['list.']['showResultsNumbersWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['browseBoxWrap'])) $wraparray['browseBoxWrap']=$conf['list.']['browseBoxWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['prevLinkWrap'])) $wraparray['prevLinkWrap']=$conf['list.']['prevLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['nextLinkWrap'])) $wraparray['nextLinkWrap']=$conf['list.']['nextLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['firstLinkWrap'])) $wraparray['firstLinkWrap']=$conf['list.']['firstLinkWrap'];\n\t\t\tif ($this->metafeeditlib->is_extent($conf['list.']['lastLinkWrap'])) $wraparray['lastLinkWrap']=$conf['list.']['lastLinkWrap'];\n\t\t\t$src=$this->metafeeditlib->is_extent($conf['list.']['showResultCount'])?$conf['list.']['showResultCount']:1;\n\t\t\t$this->markerArray['###PAGENAV###'] =$conf['list.']['pagination']?$this->pi_list_browseresults($src,'',$wraparray):'';\n\t\t\t\n\t\t\t// should create media player function here ...\n\t\t\t$this->markerArray['###MEDIAPLAYER###']=$this->markerArray['###MEDIA_ACTION_BLOG###']='';\n\t\t\tif ($conf['list.']['mediaPlayer']) {\n\t\t\t\t$this->markerArray['###MEDIAPLAYER###'] = $this->piVars['mediaplayer'] ? $this->metafeeditlib->showMediaPlayer($this->piVars['mediaplayer'],$this->piVars['mediafile'],$conf):($mediaplayer?$this->metafeeditlib->showMediaPlayer($mediaplayer,$mediafile,$conf):'');\n\t\t\t\t// media player data\n\t\t\t\t$mediauid=$this->piVars['mediaplayer'] ? $this->piVars['mediaru'] : $mediaru;\n\t\t\t\tif \t($mediauid) {\n\t\t\t\t\t$this->markerArray['###MEDIA_ACTION_BLOG###']=$this->metafeeditlib->getBlogActions($conf,$this,$mediauid );\n\t\t\t\t\t$mediarec = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable,$mediauid);\n\t\t\t\t\tif (is_array($mediarec)) {\n\t\t\t\t\t\t//on start pour pouvoir stdwrapper\n\t\t\t\t\t\t$this->cObj->start($mediarec,$this->theTable);\n\t\t\t\t\t\tforeach($mediarec as $key=>$val) {\n\t\t\t\t\t\t\t$this->markerArray['###MEDIAPLAYER_'.$key.'###']=$val;\n\t\t\t\t\t\t\t$this->markerArray['###MEDIAPLAYER_EVAL_'.$key.'###']=$this->cObj->stdWrap($val,$conf['list.']['mediaplayerWrap.'][$key.'.']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//we wrap the whole mediaplayer here.\n\t\t\t\t\t$this->markerArray['###EVAL_MEDIAPLAYER###']=$this->cObj->stdWrap(trim($this->markerArray['###MEDIAPLAYER###']),$conf['list.']['mediaplayerWrap.']['mediaplayer.']);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($dispDir=='Down') {\n\t\t\t\t$lcols=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM-COL###', $lcols);\n\t\t\t\t$lcols= $this->cObj->substituteMarkerArray($lcols, $markerArray);\n\t\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###ALLITEMS###', $lcols);\n\t\t\t} else {\n\t\t\t\tif ($rows) {\n\t\t\t\t\t$rows=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM-ROW###', $rows);\n\t\t\t\t\t$rows=$this->cObj->substituteMarkerArray($rows, $markerArray);\n\t\t\t\t}\n\t\t\t\tif ($out) {\n\t\t\t\t\t$out=$this->cObj->substituteSubpart($tpl['allItemsCode'], '###ITEM###', $out);\n\t\t\t\t} else {\n\t\t\t\t\t$out=$rows;\n\t\t\t\t}\n\t\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###ALLITEMS###', $out);\n\t\t\t}\n\t\t\tif (!$this->markerArray['###MEDIAPLAYER###']) $content=$this->cObj->substituteSubpart($content,'###MEDIAPLAYERTAG###','');\n\t\t\t// We handle List Actions here\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-LIB###',$this->metafeeditlib->getListItemActionsLib($conf));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-TOP###',$this->metafeeditlib->getListTopActions($conf,$this));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-BOTTOM###',$this->metafeeditlib->getListBottomActions($conf,$this));\n\t\t\t\n\t\t\tif (!$num) $this->markerArray['###EVAL_ERROR###'].=$this->metafeeditlib->makeErrorMarker($conf,$this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_EDITMENU_NOITEMS###'),$this->markerArray));\n\t\t} else {\n\t\t\t//echo \"displayListScreen 2 $DEBUG\";\n\t\t\t$this->metafeeditlib->getAdvancedSearchWhere($conf,$sql,$this->markerArray);\n\t\t\t//echo $tpl['templateCode'];\n\t\t\t$content=$this->cObj->substituteSubpart($tpl['templateCode'], '###TEMPLATE_LIST_TABLEDATA###', '');\n\t\t\t// We handle List Actions here\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-LIB###',$this->metafeeditlib->getListItemActionsLib($conf));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-TOP###',$this->metafeeditlib->getListTopActions($conf,$this));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-LIST-BOTTOM###',$this->metafeeditlib->getListBottomActions($conf,$this));\n\t\t\t\n\t\t}\n\t\t//echo \"displayListScreen 3 $DEBUG\";\n\t\t//error_log(__METHOD__.\" Mem x $x bf sub: \".$this->metafeeditlib->getMemoryUsage());\n\t\t// Call to user marker function\n\t\tif ($conf['list.']['userFunc_afterMark']) $this->userProcess_alt($conf['list.']['userFunc_afterMark'],$conf['list.']['userFunc_afterMark.'],array($conf['list.']['whereString']));\n\t\t//t3lib_div::callUserFunction($conf['metafeedit.']['userFunc_afterInitConf'],$conf,$this);\n\t\tif ($conf['userFunc_afterMark']) t3lib_div::callUserFunction($conf['metafeedit.']['userFunc_afterMark'],$conf,$this);\n\t\t$content=$this->cObj->stdWrap(trim($this->cObj->substituteMarkerArray($content, $this->markerArray)),$conf['list.']['formWrap.'][$this->theTable.'.']);\n\t\t//error_log(__METHOD__.\" Mem x $x af sub: \".$this->metafeeditlib->getMemoryUsage());\n\t\t//if (!$num) $content .= $this->cObj->substituteMarkerArray($this->metafeeditlib->getPlainTemplate($conf,$this->markerArray,'###TEMPLATE_EDITMENU_NOITEMS###'),$this->markerArray);\n\t\t//echo \"displayListScreen 3.5 $DEBUG\";\n\t\t$this->getListSums($conf,$sql,$content,$tpl,$DEBUG);\n\t\t//echo __METHOD__.\":displayListScreen 4 ($DEBUG):\".$this->isDebug($conf);\n\t\t\n\t\tif (!$DEBUG && !$this->isDebug($conf)) {\n\t\t\tswitch ($exporttype)\n\t\t\t{\n\t\t\t\tcase \"CSV\": \n\t\t\t\t\t$this->metafeeditexport->getCSV($content,$this,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDF\": \n\t\t\t\t\t$this->metafeeditexport->getPDF($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDFTAB\": \n\t\t\t\t\t$this->metafeeditexport->getPDFTAB($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PDFDET\": \n\t\t\t\t\t$this->metafeeditexport->getPDFDET($content,$this,$print,$printerName,$printServerName,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"XLS\":\n\t\t\t\tcase \"EXCEL\": \n\t\t\t\t\t$this->metafeeditexport->getEXCEL($content,$this,$this->piVars['exportfile']);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($this->piVars['exportfile']) {\n\t\t\t\t$retput=file_put_contents($this->piVars['exportfile'].'.dbg', $DEBUG);\n\t\t\t\tif ($retput===false) {\n\t\t\t\t\tthrow new Exception(__METHOD__.\":Could not create\". $this->piVars['exportfile'].'.dbg');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($this->conf['performanceaudit']) $this->perfArray['fe_adminLib.inc displaylist end:']=$this->metafeeditlib->displaytime().\" Seconds\";\n\t\treturn $content.$DEBUG;\n\t}", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function display()\n\t{\n\t $sql = \"SELECT * FROM address WHERE name = ?\";\n\t \n\t}", "public function index()\n\t{\n\t\tcreate_caller_table();\n\t\t$data['ajax_source'] = 'caller/table/';\n\t\t$data['page_title'] = lang('callers');\n\n\t\t$exp_without_callers = count($this->callerModel->get_experiments_without_callers());\n\t\tif ($exp_without_callers > 0) {\n\t\t\t$data['page_info'] = sprintf(lang('exp_without_call'), $exp_without_callers);\n\t\t}\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->authenticate->authenticate_redirect('templates/list_view', $data, UserRole::ADMIN);\n\t\t$this->load->view('templates/footer');\n\t}", "function dsp_single_office_info()\n {\n $VIEW_DATA['arr_single_office_info'] = $this->model->qry_single_office_info();\n $this->view->render('dsp_single_office_info',$VIEW_DATA);\n }", "function PageContent() {\r\n\r\n $api_url = \"api_controller.php?obj=user&operation=userlist\";\r\n\r\n echo(\"<a href='$api_url'>\".$api_url.\"</a><br/>\");\r\n echo '<div id=\"dgUserList\"></div>';\r\n \r\n echo '<div id=\"quickGrid\" style=\"margin-top:20px\"></div>';\r\n \r\n}", "function page_admincontrol() {\r\n\t\tglobal $admin_lang;\r\n\t\t//\r\n\t\t// get the coutnt of all pages\r\n\t\t//\r\n\t\t$sitedata_result = db_result(\"SELECT page_id FROM \" . DB_PREFIX . \"pages_content\");\r\n\t\t$page_count = mysql_num_rows($sitedata_result);\r\n\t\t//\r\n\t\t// get the count of all registered users\r\n\t\t//\r\n\t\t$users_result = db_result(\"SELECT user_id FROM \" . DB_PREFIX . \"users\");\r\n\t\t$users_count = mysql_num_rows($users_result);\r\n\t\t//\r\n\t\t// get the size of all tables with the prefix DB_PREFIX\r\n\t\t//\r\n\t\t$table_infos_result = db_result(\"SHOW TABLE STATUS\");\r\n\t\t$data_size = 0;\r\n\t\twhile($table_infos = mysql_fetch_object($table_infos_result)) {\r\n\t\t\tif(substr($table_infos->Name, 0, strlen(DB_PREFIX)) == DB_PREFIX)\r\n\t\t\t\t$data_size += $table_infos->Data_length + $table_infos->Index_length;\r\n\t\t}\r\n\t\r\n\t\t$out = \"<h3>AdminControl</h3><hr />\r\n\t<table>\r\n\t\t<tr><td>\" . $admin_lang['online since'] . \"</td><td>#DATUM</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['registered users'] . \"</td><td>\" . $users_count . \"</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['created pages'] . \"</td><td>\" . $page_count . \"</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['database size'] . \"</td><td>\" . kbormb($data_size) . \"</td></tr>\r\n\t</table>\r\n\t\r\n\t<h3>Aktuelle Besucher</h3><hr />\r\n\t<table>\r\n\t\t<tr>\r\n\t\t\t<td>\".$admin_lang['name'].\"</td>\r\n\t\t\t<td>\".$admin_lang['page'].\"</td>\r\n\t\t\t<td>\".$admin_lang['last action'].\"</td>\r\n\t\t\t<td>\".$admin_lang['language'].\"</td>\r\n\t\t\t<td>\".$admin_lang['ip'].\"</td>\r\n\t\t\t<td>\".$admin_lang['host'].\"</td>\r\n\t\t</tr>\";\r\n\t\t\t//output all visitors surfing on the site\r\n\t\t\t$users_online_result = db_result(\"SELECT userid, page, lastaction, lang, ip, host FROM \" . DB_PREFIX . \"online\");\r\n\t\t\twhile($users_online = mysql_fetch_object($users_online_result)) {\r\n\t\t\t\tif($users_online->userid == 0)\r\n\t\t\t\t\t$username = $admin_lang['not registered'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$username = getUserById($users_online->userid);\r\n\t\t\t\t//\r\n\t\t\t\t// FIXME: gethostbyaddr needes to much time if there are many users online\r\n\t\t\t\t//\r\n\t\t\t\t$out .= \"\\t\\t\\t<tr>\r\n\t\t\t<td>\".$username.\"</td>\r\n\t\t\t<td><a href=\\\"index.php?page=\".$users_online->page.\"\\\">\".$users_online->page.\"</a></td>\r\n\t\t\t<td>\" . date(\"d.m.Y H:i:s\", $users_online->lastaction).\"</td>\r\n\t\t\t<td>\" . $admin_lang[$users_online->lang] . \"</td>\r\n\t\t\t<td>\" . $users_online->ip . \"</td>\r\n\t\t\t<td>\" . $users_online->host . \"</td>\r\n\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t$out .= \"</table>\";\r\n\t\r\n\t\treturn $out;\r\n\t}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-customer-edit-page.php';\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "public function getDisplay();", "function show() {\n // Abort if empty file\n if($this->oParser->oManager->tsCurDate < 1) {\n return;\n }\n \n // We want to process the output later\n ob_start();\n\n $this->printHeading();\n $this->printDailyMessages();\n $this->printAbsentTeachers();\n $this->printStandInTable();\n $this->printStandInTableFooter();\n\n $str = ob_get_clean();\n #debugPrint($str);\n echo vpBeautifyString($str);\n }", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "public function show() {\n\t\t$variables = $this->sanitize($this->data);\n\t\tif (is_array($variables)) {\n\t\t\textract($variables);\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tob_start();\n\t\tif ($this->isPartial) {\n\t\t\trequire_once $this->pathToPartial;\n\t\t} else {\n\t\t\trequire_once $this->pathToLayout;\n\t\t}\n\t\t$this->performReplacements();\n\t\tif (ob_get_length() !== false) {\n\t\t\tob_end_flush();\n\t\t}\n\t}", "function\n\tGalleryStandardDisplay()\n\t{\n $phyType = new Field;\n $phyType->ColName = 'PhyType_tab';\n\n $phyHeight = new Field;\n $phyHeight->ColName = 'PhyHeight_tab';\n\n $phyWidth = new Field;\n $phyWidth->ColName = 'PhyWidth_tab';\n\n $phyDepth = new Field;\n $phyDepth->ColName = 'PhyDepth_tab';\n\n $phyDiameter = new Field;\n $phyDiameter->ColName = 'PhyDiameter_tab';\n\n $phyDimUnits = new Field;\n $phyDimUnits->ColName = 'PhyUnitLength_tab';\n\n $phyWeight = new Field;\n $phyWeight->ColName = 'PhyWeight_tab';\n\n $phyDimWeight = new Field;\n $phyDimWeight->ColName = 'PhyUnitWeight_tab';\n\n $sizeTable = new Table;\n $sizeTable->Name = 'Dimensions';\n $sizeTable->Headings = array('Height', 'Width', 'Depth', 'Diam', 'Unit', 'Type');\n $sizeTable->Columns = array($phyHeight, $phyWidth, $phyDepth, $phyDiameter, $phyDimUnits, $phyType);\n\n\t\t$narratives = new BackReferenceField;\n\t\t$narratives->RefDatabase = \"eevents\";\n\t\t$narratives->RefField = \"ObjAttachedObjectsRef_tab\";\n\t\t$narratives->ColName = \"SummaryData\";\n\t\t$narratives->Label = \"Events\";\n\t\t$narratives->LinksTo = $GLOBALS['DEFAULT_EXHIBITION_PAGE'];\n\n\t\t$creRole = new Field;\n\t\t$creRole->ColName = 'CreRole_tab';\n\t\t$creRole->Italics = 1;\n\t\t\n\t\t$creCreatorRef = new Field;\n\t\t$creCreatorRef->ColName = 'CreCreatorRef_tab->eparties->SummaryData';\n\t\t$creCreatorRef->LinksTo = $GLOBALS['DEFAULT_PARTY_DISPLAY_PAGE'];\n\t\t\n\t\t$creatorTable = new Table;\n\t\t$creatorTable->Name = \"CreCreatorRef_tab\";\n\t\t$creatorTable->Columns = array($creCreatorRef, $creRole);\n\n\t\t$this->Fields = array(\n 'TitMainTitle',\n 'TitAccessionNo',\n\t\t\t\t$creatorTable,\n 'TitMainTitle',\n 'CreDateCreated',\n 'PhyMediaCategory',\n 'PhyMedium',\n\t\t\t\t$sizeTable,\n\n\t\t\t\t'CrePrimaryInscriptions',\n\t\t\t\t'CreSecondaryInscriptions',\n 'AccCreditLineLocal',\n 'LocCurrentLocationRef->elocations->SummaryData',\n\n\t\t\t\t//'TitAccessionNo',\n\t\t\t\t//'TitMainTitle',\n\t\t\t\t//'TitAccessionDate',\n\t\t\t\t//'TitCollectionTitle',\n\t\t\t\t//'CreDateCreated',\n\t\t\t\t//'TitTitleNotes',\n\t\t\t\t//'CreCountry_tab',\n\t\t\t\t//'PhyMedium',\n\t\t\t\t//'PhyTechnique',\n\t\t\t\t//'PhySupport',\n\t\t\t\t//'PhyMediaCategory',\n\t\t\t\t//'LocCurrentLocationRef->elocations->SummaryData',\n\t\t\t\t//'NotNotes',\n\t\t\t\t//'MulMultiMediaRef:1->emultimedia->MulIdentifier',\n\t\t\t\t//'AssRelatedObjectsRef_tab->ecatalogue->SummaryData',\n\t\t\t\t//$AssRef,\n\t\t\t\t);\n\t\t\n\t\t$this->BaseStandardDisplay();\n\t}", "function display_header() {}", "function run()\r\n\t{\r\n//\t\t$trail->add(new Breadcrumb($this->get_browse_cda_languages_url(), Translation :: get('Cda')));\r\n//\t\t$trail->add(new Breadcrumb($this->get_variable_translations_searcher_url(), Translation :: get('SearchVariableTranslations')));\r\n\r\n\t\t$this->display_header($trail);\r\n\t\techo $this->display_form();\r\n\t\techo '<br />';\r\n echo $this->get_table();\r\n\t\t$this->display_footer();\r\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "protected function displayContent()\n {\n\n $html = '';\n if (!$this->model->userLoggedIn) {\n $html .= '<p>Please log in to view this page</p>' . \"\\n\";\n return $html;\n }\n $html .= '<h1>' . $_SESSION['userName'] . '</h1>' . \"\\n\";\n\n if ($_POST['seekEditSubmit']) {\n\n $result = $this->model->processEditSeekInfo();\n\n if ($result['ok']) {\n header('Location: index.php?page=home');\n } else {\n $html .= $this->result['msg'];\n }\n } elseif ($_POST['lanceEditSubmit']) {\n\n $result = $this->model->processEditLanceInfo();\n\n if ($result['ok']) {\n header('Location: index.php?page=home');\n } else {\n $html .= $this->result['msg'];\n }\n\n } elseif ($_POST['userEditSubmit']) {\n\n $uresult = $this->model->processEditUserInfo();\n\n if ($uresult['ok']) {\n header('Location: index.php?page=home');\n } else {\n $html .= $this->uresult['msg'];\n }\n\n }\n\n $html .= '<p>' . $result['msg'] . '</p><br />' . \"\\n\";\n\n $html .= $this->displayEditUserForm($uresult);\n\n if ($this->model->seekLoggedIn) {\n $html .= $this->displayEditSeekForm($result);\n return $html;\n } elseif ($this->model->lanceLoggedIn) {\n $html .= $this->displayEditLanceForm($result);\n return $html;\n }\n\n return $html;\n\n }", "public function show()\n\t{\n\n\t}", "public function display() {\n\t\techo $this->userName . \", \" . $this->firstName . \", \" . $this->lastName . \", \" . $this->yearOfBirth . \"\\n\";\n }", "public function info(){\n $this->display('Main/Person/info') ;\n }", "public function do_display_page_processing($p_metadata, $p_messages) {\n\n if(empty($p_messages))\n {\n $m_string = 'No messages are stored.';\n }\n else\n {\n $i = 0;\n $arr[] = array();\n $tab_output = '<p class=\"lead\" id=\"ret_home\"><a href=\"homepage\">&#8592; Return Home</a></p>';\n $tab_output .= '\n <table id=\"table\" class=\"table table-bordered table-responsive table-hover\">\n <thead>\n <tr>\n ';\n foreach ($p_metadata as $key1 => $value1) {\n $arr[$i] = $value1;\n $tab_output .= '<th scope=\"col\">'. $value1 .'</th>';\n $i++;\n }\n\n $tab_output .= '</tr></thead><tbody>';\n $i = 0;\n // $m_string = '';\n\n foreach ($p_messages as $key => $value) {\n $tab_output .= '<tr>';\n foreach ($value as $key2 => $value2){\n $tab_output .= '<td>' . $value2 . '</td>';\n $i++;\n }\n $tab_output .= '</tr>';\n $i = 0;\n }\n $tab_output .= '</tbody></table><br /><br />';\n }\n\n\n $this->c_display_page_processed = $tab_output;\n\n }", "function print_tables($db_name=null){ // print tables of the DB\n\t$inst=$_SESSION['vwmldbm_inst'];\n\tif(!$inst) return;\n\tglobal $conn,$DB,$DTB_PRE,$TB_PRE;\n\tif($db_name==null) $db_name=$DB;\n\t$count=0;\n\t$sql=\"select name,type,creating_order,sql_txt from {$DTB_PRE}vwmldbm_tb where db='$db_name' order by creating_order asc\";\n\t$res=mysqli_query($conn,$sql);\n\techo \"<table border=1 width=100%><tr><td align=center bgcolor=bbffbb>Name</td>\n\t\t\t<td align=center bgcolor=bbffbb>Type</td>\n\t\t\t<td align=center bgcolor=bbffbb>Creating Order</td>\n\t\t\t<td align=center bgcolor=bbffbb>SQL</td></tr>\";\n\tif($res) while($rs=mysqli_fetch_array($res)){\n\t\t$count++;\n\t\techo \"<tr>\";\n\t\techo \"\t<td width=120>[$count] \".$rs['name'].\"</td>\";\n\t\tif($rs['type']=='T') $tb_type='Table';\n\t\tif($rs['type']=='C') $tb_type='Table(Code)';\n\t\telseif($rs['type']=='V') $tb_type='VIEW';\n\t\t\n\t\techo \"\t<td width=100 align=center>$tb_type</td>\";\n\t\techo \"\t<td width=100 align=center>\".$rs['creating_order'].\"</td>\";\n\t\techo \"\t<td width=300><textarea rows=2 cols=34>\".$rs['sql_txt'].\"</textarea></td>\";\n\t\techo \"</tr>\";\n\t}\n\techo \"</table>\";\n}", "public static function display() {\n\t\t\techo \"Full Name is: \".UserData::NAME.\"<br>\";\n\t\t\techo \"Age is : \".self::$age;\n\t\t}", "function result_screen($mode = 'reg')\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$ADMIN->page_title = \"Statistic Center Results\";\r\n\r\n\t\t$ADMIN->page_detail = \"&nbsp;\";\r\n\r\n\t\t//+---------------------\r\n\r\n\t\tif (!checkdate($IN['to_month'], $IN['to_day'], $IN['to_year']))\r\n\t\t{\r\n\t\t\t$ADMIN->error(\"The 'Date To:' time is incorrect, please check the input and try again\");\r\n\t\t}\r\n\r\n\t\tif (!checkdate($IN['from_month'], $IN['from_day'], $IN['from_year']))\r\n\t\t{\r\n\t\t\t$ADMIN->error(\"The 'Date From:' time is incorrect, please check the input and try again\");\r\n\t\t}\r\n\r\n\t\t//+---------------------\r\n\r\n\t\t$to_time = mktime(12, 0, 0, $IN['to_month'], $IN['to_day'], $IN['to_year']);\r\n\t\t$from_time = mktime(12, 0, 0, $IN['from_month'], $IN['from_day'], $IN['from_year']);\r\n\r\n\t\t$human_to_date = getdate($to_time);\r\n\t\t$human_from_date = getdate($from_time);\r\n\r\n\t\t//+---------------------\r\n\r\n\t\tif ($mode == 'reg')\r\n\t\t{\r\n\t\t\t$table = 'Registration Statistics';\r\n\r\n\t\t\t$sql_table = 'ibf_members';\r\n\t\t\t$sql_field = 'joined';\r\n\r\n\t\t\t$ADMIN->page_detail = \"Showing the number of users registered. (Note: All times based on GMT)\";\r\n\t\t} else\r\n\t\t{\r\n\t\t\tif ($mode == 'topic')\r\n\t\t\t{\r\n\t\t\t\t$table = 'New Topic Statistics';\r\n\r\n\t\t\t\t$sql_table = 'ibf_topics';\r\n\t\t\t\t$sql_field = 'start_date';\r\n\r\n\t\t\t\t$ADMIN->page_detail = \"Showing the number of topics started. (Note: All times based on GMT)\";\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tif ($mode == 'post')\r\n\t\t\t\t{\r\n\t\t\t\t\t$table = 'Post Statistics';\r\n\r\n\t\t\t\t\t$sql_table = 'ibf_posts';\r\n\t\t\t\t\t$sql_field = 'post_date';\r\n\r\n\t\t\t\t\t$ADMIN->page_detail = \"Showing the number of posts. (Note: All times based on GMT)\";\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($mode == 'msg')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$table = 'PM Sent Statistics';\r\n\r\n\t\t\t\t\t\t$sql_table = 'ibf_messages';\r\n\t\t\t\t\t\t$sql_field = 'msg_date';\r\n\r\n\t\t\t\t\t\t$ADMIN->page_detail = \"Showing the number of sent messages. (Note: All times based on GMT)\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tswitch ($IN['timescale'])\r\n\t\t{\r\n\t\t\tcase 'daily':\r\n\t\t\t\t$sql_date = \"%w %U %m %Y\";\r\n\t\t\t\t$php_date = \"F jS - Y\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'monthly':\r\n\t\t\t\t$sql_date = \"%m %Y\";\r\n\t\t\t\t$php_date = \"F Y\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// weekly\r\n\t\t\t\t$sql_date = \"%U %Y\";\r\n\t\t\t\t$php_date = \" [F Y]\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t$stmt = $ibforums->db->query(\"SELECT MAX($sql_field) as result_maxdate,\r\n\t\t\t\t COUNT(*) as result_count,\r\n\t\t\t\t DATE_FORMAT(from_unixtime($sql_field),'$sql_date') AS result_time\r\n\t\t\t\t FROM $sql_table\r\n\t\t\t\t WHERE $sql_field > '$from_time'\r\n\t\t\t\t AND $sql_field < '$to_time'\r\n\t\t\t\t GROUP BY result_time\r\n\t\t\t\t ORDER BY $sql_field {$IN['sortby']}\");\r\n\r\n\t\t$running_total = 0;\r\n\t\t$max_result = 0;\r\n\r\n\t\t$results = array();\r\n\r\n\t\t$SKIN->td_header[] = array(\"Date\", \"20%\");\r\n\t\t$SKIN->td_header[] = array(\"Result\", \"70%\");\r\n\t\t$SKIN->td_header[] = array(\"Count\", \"10%\");\r\n\r\n\t\t//+-------------------------------\r\n\r\n\t\t$ADMIN->html .= $SKIN->start_table(ucfirst($IN['timescale']) . \" \" . $table . \" ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} to\" . \" {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})\");\r\n\r\n\t\tif ($stmt->rowCount())\r\n\t\t{\r\n\r\n\t\t\twhile ($row = $stmt->fetch())\r\n\t\t\t{\r\n\r\n\t\t\t\tif ($row['result_count'] > $max_result)\r\n\t\t\t\t{\r\n\t\t\t\t\t$max_result = $row['result_count'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$running_total += $row['result_count'];\r\n\r\n\t\t\t\t$results[] = array(\r\n\t\t\t\t\t'result_maxdate' => $row['result_maxdate'],\r\n\t\t\t\t\t'result_count' => $row['result_count'],\r\n\t\t\t\t\t'result_time' => $row['result_time'],\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($results as $pOOp => $data)\r\n\t\t\t{\r\n\r\n\t\t\t\t$img_width = intval(($data['result_count'] / $max_result) * 100 - 8);\r\n\r\n\t\t\t\tif ($img_width < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$img_width = 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$img_width .= '%';\r\n\r\n\t\t\t\tif ($IN['timescale'] == 'weekly')\r\n\t\t\t\t{\r\n\t\t\t\t\t$date = \"Week #\" . strftime(\"%W\", $data['result_maxdate']) . date($php_date, $data['result_maxdate']);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\t$date = date($php_date, $data['result_maxdate']);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t\t\t $date,\r\n\t\t\t\t \"<img src='{$SKIN->img_url}/bar_left.gif' width='4' height='11' alt=''><img src='{$SKIN->img_url}/bar.gif' width='$img_width' height='11' alt=''><img src='{$SKIN->img_url}/bar_right.gif' width='4' height='11' alt=''>\",\r\n\t\t\t\t \"<div class='center'>{$data['result_count']}</div>\",\r\n\t\t\t\t ));\r\n\t\t\t}\r\n\r\n\t\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t\t '&nbsp;',\r\n\t\t\t \"<div class='right'><b>Total</b></div>\",\r\n\t\t\t \"<div class='center'><b>$running_total</b></div>\",\r\n\t\t\t ));\r\n\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$ADMIN->html .= $SKIN->add_td_basic(\"No results found\", \"center\");\r\n\t\t}\r\n\r\n\t\t$ADMIN->html .= $SKIN->end_table();\r\n\r\n\t\t$ADMIN->output();\r\n\r\n\t}", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function display_table_contents() {\n\t\t// Display what is in the table.\n\t\tprintf(\n\t\t\t'<p>%s</p>',\n\t\t\tesc_html( __( 'Currently in the database:', 'autowpdb-example-plugin' ) )\n\t\t);\n\n\t\tif ( empty( $this->table_contents ) ) {\n\t\t\tesc_html_e( 'Nothing yet.', 'autowpdb-example-plugin' );\n\t\t\treturn;\n\t\t}\n\n\t\t$table_contents = $this->dump_data( $this->table_contents );\n\n\t\tif ( strpos( $table_contents, '<pre' ) !== 0 ) {\n\t\t\t// Classic output.\n\t\t\tprintf( '<pre>%s</pre>', esc_html( $table_contents ) );\n\t\t\treturn;\n\t\t}\n\n\t\t// Xdebug.\n\t\techo wp_kses(\n\t\t\t$table_contents,\n\t\t\t[\n\t\t\t\t'b' => [],\n\t\t\t\t'font' => [\n\t\t\t\t\t'color' => true,\n\t\t\t\t],\n\t\t\t\t'i' => [],\n\t\t\t\t'pre' => [\n\t\t\t\t\t'class' => true,\n\t\t\t\t\t'dir' => true,\n\t\t\t\t],\n\t\t\t\t'small' => [],\n\t\t\t]\n\t\t);\n\t}", "public function showBackEnd();", "function pistol_acc(){\n\t\t\t\t\trequire_once(\"database\\database_connection.php\");\n\t\t\t\t\t$conn=database();\n\t\t\t\t\t//Query the database\n\t\t\t\t\t$resultSet = $conn->query(\"SELECT * FROM pistolers_acc_view\");\n\n\t\t\t\t\tif($resultSet->num_rows != 0){\n\t\t\t\t\t\twhile($rows = $resultSet->fetch_assoc()){\n\t\t\t\t\t\t\t$username = $rows['UserName'];\n\t\t\t\t\t\t\t$pistolers_acc = $rows['pistolers_acc'];\n\n\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t<td>$username</td>\n\t\t\t\t\t\t\t<td>$pistolers_acc</td>\n\t\t\t\t\t\t\t</tr>\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\techo\"ERROR\";\n\t\t\t\t\t}\n\t\t \t\t$conn->close();\n}", "public function information() \n\t{\n UserModel::authentication();\n\n\t\t//get the activity\n\t\t$timeline = ActivityModel::timeline();\n\t\t\n $this->View->Render('user/timeline', ['timeline' => $timeline]);\n }", "function debug($print_to_screen=true)\n\t\t{\n\n\t\t\t// Start outup buffering\n\t\t\tob_start();\n\n\t\t\techo \"<blockquote>\";\n\n\t\t\t// Only show ezSQL credits once..\n\t\t\tif ( ! $this->debug_called )\n\t\t\t{\n\t\t\t\techo \"<font color=800080 face=arial size=2><b>ezSQL</b> (v\".EZSQL_VERSION.\") <b>Debug..</b></font><p>\\n\";\n\t\t\t}\n\n\t\t\tif ( $this->last_error )\n\t\t\t{\n\t\t\t\techo \"<font face=arial size=2 color=000099><b>Last Error --</b> [<font color=000000><b>$this->last_error</b></font>]<p>\";\n\t\t\t}\n\n\t\t\tif ( $this->from_disk_cache )\n\t\t\t{\n\t\t\t\techo \"<font face=arial size=2 color=000099><b>Results retrieved from disk cache</b></font><p>\";\n\t\t\t}\n\n\t\t\techo \"<font face=arial size=2 color=000099><b>Query</b> [$this->num_queries] <b>--</b> \";\n\t\t\techo \"[<font color=000000><b>$this->last_query</b></font>]</font><p>\";\n\n\t\t\t\techo \"<font face=arial size=2 color=000099><b>Query Result..</b></font>\";\n\t\t\t\techo \"<blockquote>\";\n\n\t\t\tif ( $this->col_info )\n\t\t\t{\n\n\t\t\t\t// =====================================================\n\t\t\t\t// Results top rows\n\n\t\t\t\techo \"<table cellpadding=5 cellspacing=1 bgcolor=555555>\";\n\t\t\t\techo \"<tr bgcolor=eeeeee><td nowrap valign=bottom><font color=555599 face=arial size=2><b>(row)</b></font></td>\";\n\n\n\t\t\t\tfor ( $i=0; $i < count($this->col_info); $i++ )\n\t\t\t\t{\n\t\t\t\t\techo \"<td nowrap align=left valign=top><font size=1 color=555599 face=arial>{$this->col_info[$i]->type} {$this->col_info[$i]->max_length}</font><br><span style='font-family: arial; font-size: 10pt; font-weight: bold;'>{$this->col_info[$i]->name}</span></td>\";\n\t\t\t\t}\n\n\t\t\t\techo \"</tr>\";\n\n\t\t\t\t// ======================================================\n\t\t\t\t// print main results\n\n\t\t\tif ( $this->last_result )\n\t\t\t{\n\n\t\t\t\t$i=0;\n\t\t\t\tforeach ( $this->get_results(null,ARRAY_N) as $one_row )\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t\techo \"<tr bgcolor=ffffff><td bgcolor=eeeeee nowrap align=middle><font size=2 color=555599 face=arial>$i</font></td>\";\n\n\t\t\t\t\tforeach ( $one_row as $item )\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<td nowrap><font face=arial size=2>$item</font></td>\";\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t}\n\n\t\t\t} // if last result\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<tr bgcolor=ffffff><td colspan=\".(count($this->col_info)+1).\"><font face=arial size=2>No Results</font></td></tr>\";\n\t\t\t}\n\n\t\t\techo \"</table>\";\n\n\t\t\t} // if col_info\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<font face=arial size=2>No Results</font>\";\n\t\t\t}\n\n\t\t\techo \"</blockquote></blockquote>\".$this->donation().\"<hr noshade color=dddddd size=1>\";\n\n\t\t\t// Stop output buffering and capture debug HTML\n\t\t\t$html = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\t// Only echo output if it is turned on\n\t\t\tif ( $this->debug_echo_is_on && $print_to_screen)\n\t\t\t{\n\t\t\t\techo $html;\n\t\t\t}\n\n\t\t\t$this->debug_called = true;\n\n\t\t\treturn $html;\n\n\t\t}", "function db_DisplayerINSERT($myServer, $myDB, $TableName){\n\n\t// Prepare the database\n\t$myServer->query('USE '.$myDB);\n\t$sql = 'SELECT * FROM `'.$myDB.'`.`'.$TableName.'`';\n\t$req = $myServer->query($sql);\n\n\t\n\t// Affichage de l'entête du tableau\n\techo '<h2> Table Displayer :</h2>';\n\techo \"<table border=\\\"0\\\" cellpadding=\\\"1\\\">\";\n\techo \"<tr>\";\n\t$tNames= $myServer->query(\"DESCRIBE \".$TableName);\n\t$table_fields = $tNames->fetchAll(PDO::FETCH_COLUMN);\n\t$colNb = $req->columnCount();\n\tfor ($i=0; $i < $colNb; $i++)\n\t{\n\techo \"<td width=\\\"150\\\" align=\\\"center\\\" bgcolor=\\\"#999999\\\">\".$table_fields[$i].\"</td>\";\n\t }\n\t//AJOUT TABLE INSERT : Titre correspondant aux boutons d'action\n\techo \"<td width=\\\"150\\\" align=\\\"center\\\" bgcolor=\\\"#999999\\\">MOD/SUPRR</td>\";\n\techo \"</tr>\";\n\n\n\t// affichage des datas\n\t$tValues = $myServer->query(\"SELECT * FROM \".$myDB.\".\".$TableName);\n\n\twhile ($datas = $tValues->fetch(PDO::FETCH_NUM))\n\t{\n\t\techo \"<tr>\"; // nouvelle ligne du tableau\n\n\t\tfor ($i=0; $i < $colNb; $i++){ // Toutes les lignes de datas\n\t\t\techo \"<td align=\\\"center\\\">\".$datas[$i].\"</td>\";\n\t\t}\n\t\t//AJOUT TABLE INSERT : btns correspondant à la ligne de donnees;\n\t\techo '<td>';\n\t\t\techo \"<table>\";\n\t\t\techo '<tr>';\n\t\t\t\techo '<td>';\n\t\t\t\t\tcreateBtnMod($myServer, $myDB, $TableName, $datas, $colNb);\n\t\t\t\techo '</td>';\n\t\t\t\techo '<td>';\n\t\t\t\tcreateBtnSuprr($myServer, $myDB, $TableName, $datas, $colNb);\n\t\t\t\techo '</td>';\n\t\t\techo '</tr>';\n\t\t\techo \"</table>\";\n\t\techo '</td>';\n\t\techo \"</tr>\"; // fin de la ligne du tableau\n\t}\n\t// terminer la table\n\techo \"</table>\";\n\t\n\t\n}", "function displayDatabase()\n\t{\n\t\tglobal $ilErr,$ilDB,$ilLog;\n\n\t\t$this->checkDisplayMode(\"setup_database\");\n\n\t\t//$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.clientsetup_db.html\", \"setup\");\n\n\t\t// database is intalled\n\t\tif ($this->setup->getClient()->db_installed)\n\t\t{\n\t\t\t$this->setDbSubTabs(\"db\");\n\n\t\t\t$ilDB = $this->setup->getClient()->db;\n\t\t\t$this->lng->setDbHandler($ilDB);\n\t\t\tinclude_once \"./Services/Database/classes/class.ilDBUpdate.php\";\n\t\t\t$dbupdate = new ilDBUpdate($ilDB);\n\t\t\t$db_status = $dbupdate->getDBVersionStatus();\n\t\t\t$hotfix_available = $dbupdate->hotfixAvailable();\n\t\t\t$custom_updates_available = $dbupdate->customUpdatesAvailable();\n\t\t\t$this->initClientDbForm(false, $dbupdate, $db_status, $hotfix_available, $custom_updates_available);\n\t\t\t$this->getClientDbFormValues($dbupdate);\n\t\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $this->form->getHTML());\n\n\t\t\tif ($db_status)\n\t\t\t{\n\t\t\t\t$this->setButtonNext(\"lang\");\n\t\t\t}\n\t\t}\n\t\telse\t// database is not installed\n\t\t{\n\t\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_db\").\"<br />\".\n\t\t\t\t\"<p><code>CREATE DATABASE &lt;your_db&gt; CHARACTER SET utf8 COLLATE &lt;your_collation&gt;</code></p>\".\n\t\t\t\t\"<p><b>\".$this->lng->txt(\"info_text_db2\").\"</b></p><br/>\");\n\n\t\t\t$this->initClientDbForm();\n\t\t\t$this->getClientDbFormValues();\n\t\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $this->form->getHTML());\n\t\t\t$this->setButtonPrev(\"ini\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\n\t\t$this->displaySubTabs();\n\t}", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "public function main() {\r\n // Access check!\r\n // The page will show only if there is a valid page and if this page may be viewed by the user\r\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\r\n $access = is_array($this->pageinfo) ? 1 : 0;\r\n\r\n if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\r\n\r\n // Draw the header.\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/css/bemodul.css'); \r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/bootstrap/css/bootstrap.min.css'); \r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n $this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js\"></script>\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/functions.js\"></script>\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL) {\r\n document.location = URL;\r\n }\r\n </script>\r\n ';\r\n $this->doc->postCode = '\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 1;\r\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\r\n . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->spacer(5);\r\n //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));\r\n //$this->content .= $this->doc->divider(5);\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n // Shortcut\r\n if ($GLOBALS['BE_USER']->mayMakeShortcut()) {\r\n $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\r\n }\r\n\r\n $this->content .= $this->doc->spacer(10);\r\n } else {\r\n // If no access or if ID == zero\r\n\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->spacer(5);\r\n $this->content .= $this->doc->spacer(10);\r\n }\r\n }" ]
[ "0.71792096", "0.70106566", "0.70011586", "0.70011586", "0.6912117", "0.6804588", "0.6782401", "0.6754691", "0.6753159", "0.6753159", "0.673801", "0.6693175", "0.665921", "0.665921", "0.6659037", "0.6659037", "0.6590923", "0.6582383", "0.6530309", "0.6517392", "0.6511864", "0.64810324", "0.64704317", "0.6450111", "0.6414328", "0.64063245", "0.6404685", "0.6401286", "0.6393563", "0.63916403", "0.63689524", "0.6344087", "0.6333823", "0.6329497", "0.6328726", "0.6307107", "0.6307107", "0.6307107", "0.6286771", "0.628444", "0.62840265", "0.6267833", "0.62590885", "0.6245792", "0.62367165", "0.6233656", "0.6226883", "0.62241125", "0.62071705", "0.62071705", "0.62071705", "0.62071705", "0.6185409", "0.6176888", "0.6165846", "0.61460835", "0.61355406", "0.61272424", "0.61210626", "0.61190206", "0.61094403", "0.61081064", "0.6105743", "0.60958976", "0.609329", "0.60920066", "0.60914874", "0.6090021", "0.6084704", "0.60783243", "0.60717565", "0.60705876", "0.6068862", "0.60685563", "0.6067523", "0.6063131", "0.6057808", "0.6052414", "0.60464764", "0.60396385", "0.6037063", "0.60348064", "0.603276", "0.6029766", "0.60289294", "0.6027872", "0.6027289", "0.60203743", "0.60189253", "0.59999627", "0.5999276", "0.5984947", "0.5983787", "0.59782404", "0.5978111", "0.59765", "0.5975787", "0.5972009", "0.59687024", "0.5968152", "0.59655607" ]
0.0
-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&amp;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 &gt;\" 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&uuml;ck\");\n\t\t$btv->addIcon(\"arrow_left\");\n\t\t$btv->write();\n\t}", "protected function getShortcutButton() {}", "function add_record_button($action_title, $file_name, $button_text)\n{\n ?>\n <p style=\"font-size:21px\"><?= ucwords($action_title) ?></p>\n <p>\n <a href=\"<?= $_SERVER['SCRIPT_NAME'] ?>?p=<?= $file_name ?>\" class=\"btn btn-primary\" role=\"button\">\n <span class=\"glyphicon glyphicon-plus-sign\"></span> Add <?= ucwords($button_text) ?></a>\n </p>\n <?php\n}", "public function makeHelpButton() {}", "function addButton($a_button_name)\n\t{\n\t\tarray_push($this->buttons, $a_button_name);\n\t}", "function addButton($label='Continue'){\n if(!is_array($label)){\n $label=array($label, 'icon-r'=>'right-big');\n }\n return $this->add('Button',null,'Button')\n ->set($label);\n }", "public function getCreateButtonUrl()\n {\n $uri = $this->Route->uri();\n $parameters = array(\n 'action' => 'create',\n );\n $queryString = http_build_query($this->addingExtraParameters($parameters));\n $url = url($uri . \"?\" . $queryString);\n return $url;\n }", "function btnGoToResult( string $href ) : string\n {\n $button = '<p style=\"text-align: right;\">'\n . '<span class=\"badge badge-success\">'\n . '<a href=\"' . $href . '\">GO</a>'\n . '</span>'\n . '</p>';\n \n return $button;\n }", "private function createImportButton() {\n\t\t$moduleUrl = t3lib_BEfunc::getModuleUrl(self::MODULE_NAME, array('id' => $this->id));\n\t\t$this->template->setMarker('module_url', htmlspecialchars($moduleUrl));\n\t\t$this->template->setMarker(\n\t\t\t'label_start_import',\n\t\t\t$GLOBALS['LANG']->getLL('start_import_button')\n\t\t);\n\t\t$this->template->setMarker('tab_number', self::IMPORT_TAB);\n\t\t$this->template->setMarker(\n\t\t\t'label_import_in_progress',\n\t\t\t$GLOBALS['LANG']->getLL('label_import_in_progress')\n\t\t);\n\n\t\treturn $this->template->getSubpart('IMPORT_BUTTON');\n\t}", "function addButton($context){\n\t\t$context .= '<a href=\"'.admin_url('admin.php?action=iframe_pagination_ssm&TB_iframe=1').'\" onclick=\"return false;\" class=\"thickbox\" title=\"' . __(\"Browse in shortcode manager\", 'ssm') . '\"><img src=\"'.SSM_URL . \"/images/shortcodes.png\".'\" alt=\"' . __(\"Insert a shortcode\", 'ssm') . '\" /></a>';\n\t\treturn $context;\n\t}", "function button ($arguments = \"\") {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tbutton');\n return $rc->newInstanceArgs( $arguments ); \n}", "public function click()\n {\n }", "protected abstract function getButtonCallbackURL();", "function edit_insert_button($caption, $js_onclick, $title = '')\t{\n\t?>\n\tif (toolbar) {\n\t\tvar theButton = document.createElement('input');\n\t\ttheButton.type = 'button';\n\t\ttheButton.value = '<?php echo $caption; ?>';\n\t\ttheButton.onclick = <?php echo $js_onclick; ?>;\n\t\ttheButton.className = 'ed_button';\n\t\ttheButton.title = \"<?php echo $title; ?>\";\n\t\ttheButton.id = \"<?php echo \"ed_{$caption}\"; ?>\";\n\t\ttoolbar.appendChild(theButton);\n\t}\n\t\n<?php }", "function tnpc_button($options, $prefix = 'button') {\n return TNP_Composer::button($options, $prefix);\n}", "public static function browseButtons($arguments)\n {\n $service = \"users:browse_buttons\";\n $role = $arguments['role'];\n\n service($service)\n ->add('create')\n ->icon('plus-circle')\n ->caption($role->slug == 'all' ? trans(\"users::forms.create_new_person\") : trans('manage::forms.button.add_to') . SPACE . $role->plural_title)\n ->link(\"modal:manage/users/create/$role->slug\")\n ->set('type', 'success')\n ->condition(user()->as('admin')->can(\"users-$role->slug.create\"))\n ;\n }", "protected function makeButtons()\n {\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n // Add CSH (Context Sensitive Help) icon to tool bar\n $contextSensitiveHelpButton = $this->buttonBar->makeHelpButton()\n ->setModuleName($this->descrTable)\n ->setFieldName('columns_' . $this->MOD_SETTINGS['function']);\n $this->buttonBar->addButton($contextSensitiveHelpButton);\n }\n $lang = $this->getLanguageService();\n // View page\n if (!VersionState::cast($this->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {\n $viewButton = $this->buttonBar->makeLinkButton()\n ->setOnClick(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid'])))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))\n ->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))\n ->setHref('#');\n\n $this->buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n // Shortcut\n $shortcutButton = $this->buttonBar->makeShortcutButton()\n ->setModuleName($this->moduleName)\n ->setGetVariables([\n 'id',\n 'M',\n 'edit_record',\n 'pointer',\n 'new_unique_uid',\n 'search_field',\n 'search_levels',\n 'showLimit'\n ])\n ->setSetVariables(array_keys($this->MOD_MENU));\n $this->buttonBar->addButton($shortcutButton);\n\n // Cache\n if (empty($this->modTSconfig['properties']['disableAdvanced'])) {\n $clearCacheButton = $this->buttonBar->makeLinkButton()\n ->setHref(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->pageinfo['uid'], 'clear_cache' => '1']))\n ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.clear_cache'))\n ->setIcon($this->iconFactory->getIcon('actions-system-cache-clear', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($clearCacheButton, ButtonBar::BUTTON_POSITION_RIGHT, 1);\n }\n if (empty($this->modTSconfig['properties']['disableIconToolbar'])) {\n // Edit page properties and page language overlay icons\n if ($this->pageIsNotLockedForEditors() && $this->getBackendUser()->checkLanguageAccess(0)) {\n // Edit localized page_language_overlay only when one specific language is selected\n if ($this->MOD_SETTINGS['function'] == 1 && $this->current_sys_language > 0) {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable('pages_language_overlay');\n $queryBuilder->getRestrictions()\n ->removeAll()\n ->add(GeneralUtility::makeInstance(DeletedRestriction::class))\n ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));\n $overlayRecord = $queryBuilder\n ->select('uid')\n ->from('pages_language_overlay')\n ->where(\n $queryBuilder->expr()->eq(\n 'pid',\n $queryBuilder->createNamedParameter($this->id, \\PDO::PARAM_INT)\n ),\n $queryBuilder->expr()->eq(\n 'sys_language_uid',\n $queryBuilder->createNamedParameter($this->current_sys_language, \\PDO::PARAM_INT)\n )\n )\n ->setMaxResults(1)\n ->execute()\n ->fetch();\n // Edit button\n $urlParameters = [\n 'edit' => [\n 'pages_language_overlay' => [\n $overlayRecord['uid'] => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editLanguageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageLanguageOverlayProperties'))\n ->setIcon($this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editLanguageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n $urlParameters = [\n 'edit' => [\n 'pages' => [\n $this->id => 'edit'\n ]\n ],\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);\n $editPageButton = $this->buttonBar->makeLinkButton()\n ->setHref($url)\n ->setTitle($lang->getLL('editPageProperties'))\n ->setIcon($this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL));\n $this->buttonBar->addButton($editPageButton, ButtonBar::BUTTON_POSITION_LEFT, 3);\n }\n }\n }", "public function create()\n {\n return view(\"admin.event_create\")->with([\n\n ]);\n }", "function techmarket_header_action_button() {\n\t\t\n\t\t$action_button_args = apply_filters( 'techmarket_header_action_button_args', array(\n\t\t\t'url'\t=> '#',\n\t\t\t'text' => esc_html__( 'Go to TechMarket Shop', 'techmarket' ),\n\t\t\t'icon'\t=> is_rtl() ? 'tm tm-long-arrow-left' : 'tm tm-long-arrow-right'\n\t\t) );\n\n\n\t\tif ( apply_filters( 'techmarket_show_header_action_button', true ) && ! empty( $action_button_args ) ) : ?>\n\t\t<a role=\"button\" class=\"header-action-btn\" href=\"<?php echo esc_url( $action_button_args['url'] );?>\">\n\t\t\t<?php echo esc_html( $action_button_args['text'] ); ?>\n\t\t\t<?php if( ! empty( $action_button_args['icon'] ) ) : ?>\n\t\t\t\t<i class=\"<?php echo esc_attr( $action_button_args['icon'] );?>\"></i>\n\t\t\t<?php endif; ?>\n\t\t</a>\n\t\t<?php endif;\n\t}", "public function getButtonHtml()\n {\n $button = $this->getLayout()->createBlock(Button::class);\n $button->setData('id', $this->getButtonId())\n ->setData('label', __('Verify keys and connect webhooks'));\n\n return $button->toHtml();\n }", "public function londontec_event(){\n\t \n\t\t$id = $this->uri->segment(3);\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_londontec_event';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Create londotec event',\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n \n\t}", "function insert_btn_detail(){\n\t?>\n\t<div class=\"text-center wrap-detail\">\n\t\t<a href=\"<?php the_permalink( );?>\" title=\"<?php _e( 'View detail', 'shtheme' );?>\">\n\t\t\t<?php _e( 'View detail', 'shtheme' );?>\n\t\t</a>\n\t</div>\n\t<?php\n}", "private function button2() {\n\t\tif ( $this->button_array['button2']['text'] ) {\n\t\t\t?>\n\t\t\tlastOpenedPointer.find( '#pointer-close' ).after('<a id=\"pointer-primary\" class=\"button-primary\">' +\n\t\t\t\t'<?php echo esc_attr( $this->button_array['button2']['text'] ); ?>' + '</a>');\n\t\t\tlastOpenedPointer.find('#pointer-primary').click(function () {\n\t\t\t<?php echo $this->button_array['button2']['function']; ?>\n\t\t\t});\n\t\t<?php\n\t\t}\n\t}", "public function button($value) {\n return $this->setProperty('button', $value);\n }", "function shortcode_insert_button()\n\t\t\t{\n\t\t\t\t$this->config['self_closing']\t=\t'no';\n\t\t\t\t\n\t\t\t\t$this->config['name']\t\t= __('Notification', 'avia_framework' );\n\t\t\t\t$this->config['tab']\t\t= __('Content Elements', 'avia_framework' );\n\t\t\t\t$this->config['icon']\t\t= AviaBuilder::$path['imagesURL'].\"sc-notification.png\";\n\t\t\t\t$this->config['order']\t\t= 80;\n\t\t\t\t$this->config['target']\t\t= 'avia-target-insert';\n\t\t\t\t$this->config['shortcode'] \t= 'av_notification';\n\t\t\t\t$this->config['tooltip'] \t= __('Creates a notification box to inform visitors', 'avia_framework' );\n\t\t\t\t$this->config['tinyMCE'] = array('tiny_always'=>true);\t\n\t\t\t\t$this->config['preview'] \t= true;\n\t\t\t}", "protected function createButtons()\n {\n $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();\n\n $uriBuilder = $this->objectManager->get(UriBuilder::class);\n $uriBuilder->setRequest($this->request);\n\n if ($this->request->getControllerActionName() === 'index') {\n $toggleButton = $buttonBar->makeLinkButton()\n ->setHref('#')\n ->setDataAttributes([\n 'togglelink' => '1',\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n ])\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.toggleForm'))\n ->setIcon($this->iconFactory->getIcon('actions-filter', Icon::SIZE_SMALL));\n $buttonBar->addButton($toggleButton, ButtonBar::BUTTON_POSITION_LEFT, 1);\n }\n\n $buttons = [\n [\n 'table' => 'tx_news_domain_model_news',\n 'label' => 'module.createNewNewsRecord',\n 'action' => 'newNews',\n 'icon' => 'ext-news-type-default'\n ],\n [\n 'table' => 'tx_news_domain_model_tag',\n 'label' => 'module.createNewTag',\n 'action' => 'newTag',\n 'icon' => 'ext-news-tag'\n ],\n [\n 'table' => 'sys_category',\n 'label' => 'module.createNewCategory',\n 'action' => 'newCategory',\n 'icon' => 'mimetypes-x-sys_category'\n ]\n ];\n foreach ($buttons as $key => $tableConfiguration) {\n if ($this->showButton($tableConfiguration['table'])) {\n $title = $this->getLanguageService()->sL('LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:' . $tableConfiguration['label']);\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($uriBuilder->reset()->setRequest($this->request)->uriFor($tableConfiguration['action'],\n [], 'Administration'))\n ->setDataAttributes([\n 'toggle' => 'tooltip',\n 'placement' => 'bottom',\n 'title' => $title])\n ->setTitle($title)\n ->setIcon($this->iconFactory->getIcon($tableConfiguration['icon'], Icon::SIZE_SMALL, 'overlay-new'));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 2);\n }\n }\n\n $clipBoard = GeneralUtility::makeInstance(Clipboard::class);\n $clipBoard->initializeClipboard();\n $elFromTable = $clipBoard->elFromTable('tx_news_domain_model_news');\n if (!empty($elFromTable)) {\n $viewButton = $buttonBar->makeLinkButton()\n ->setHref($clipBoard->pasteUrl('', $this->pageUid))\n ->setOnClick('return ' . $clipBoard->confirmMsg('pages',\n BackendUtilityCore::getRecord('pages', $this->pageUid), 'into',\n $elFromTable))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:clip_pasteInto'))\n ->setIcon($this->iconFactory->getIcon('actions-document-paste-into', Icon::SIZE_SMALL));\n $buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 4);\n }\n\n // Refresh\n $path = VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch) >= VersionNumberUtility::convertVersionNumberToInteger('8.6') ? 'Resources/Private/Language/' : '';\n $refreshButton = $buttonBar->makeLinkButton()\n ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI'))\n ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/' . $path . 'locallang_core.xlf:labels.reload'))\n ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));\n $buttonBar->addButton($refreshButton, ButtonBar::BUTTON_POSITION_RIGHT);\n }", "public static function my_account_links_newButton()\n {\n //let other method do all the checks and stuff\n return self::geoCart_cartDisplay_newButton(true);\n }", "function backend_button($caption, $attributes = array(), $ajaxHandler=null, $ajaxParams = null, $formElement = null)\n\t{\n\t\treturn Backend_Html::button($caption, $attributes, $ajaxHandler, $ajaxParams, $formElement);\n\t}", "public function btn($key) {\n return $this->msg('button', $key);\n }", "function getOnClick() {return $this->readOnClick();}", "public function addButtons()\n {\n if (!Mage::getSingleton('sheep_subscription/adminhtml_acl')->canEditSubscription()) {\n return;\n }\n\n /** @var Sheep_Subscription_Model_Subscription $subscription */\n $subscription = $this->_getModel();\n /** @var Sheep_Subscription_Model_Service $service */\n $service = Mage::getSingleton('sheep_subscription/service');\n\n if ($service->canBeCancelled($subscription)) {\n $this->addButton('cancel', array(\n 'label' => 'Cancel',\n 'onclick' => \"window.setLocation('{$this->getCancelUrl()}')\"\n ));\n }\n\n if ($service->canBePaused($subscription)) {\n $this->addButton('pause', array(\n 'label' => $this->__('Pause'),\n 'onclick' => \"window.setLocation('{$this->getPauseUrl()}')\"\n ));\n }\n\n if ($service->canBeResumed($subscription)) {\n $this->addButton('resume', array(\n 'label' => 'Resume',\n 'onclick' => \"window.setLocation('{$this->getResumeUrl()}')\"\n ));\n }\n }", "function sexy_button_to( $name, $internal_uri, $options = array())\n{\n $css_to_include = sfConfig::get( 'app_sfSexyButtonPlugin_stylesheet', '/sfSexyButtonPlugin/css/sexy_button' );\n $def_div_class = sfConfig::get( 'app_sfSexyButtonPlugin_div_class', 'sexy-button-clear' );\n $def_button_class = sfConfig::get( 'app_sfSexyButtonPlugin_button_class', 'sexy-button');\n sfContext::getInstance()->getResponse()->addStylesheet( $css_to_include );\n $html_options = _convert_options($options);\n // div class\n $div_class = _get_option($html_options, 'div_class', $def_div_class);\n // button class\n $button_class = _get_option($html_options, 'button_class', $def_button_class );\n $html_options['class'] = $button_class;\n // output div ?\n $nodiv = _get_option($html_options, 'nodiv', false);\n \n // One extra measure for IE\n $html_options['onclick'] = 'this.blur(); ponerLoading(this); '.\n ((isset($html_options['onclick']) ) ?\n $html_options['onclick'] : '');\n $html_options['id'] = \"sexyid\";\n // generate html\n $html = link_to( content_tag( 'span', $name), $internal_uri, $html_options );\n return ($nodiv) ? $html : content_tag( 'div', $html, \"class=$div_class\" );\n}", "public function create()\n\t{\n\t\treturn View::make('administrator.events.create')->with('page_title','Create New Event');\n\t\t\n\t}", "public function add_two_step_next_btn() {\n\n\t\t\t$button_title = astra_get_option( 'two-step-checkout-modern-button-text' );\n\t\t\t$button_sub_title = astra_get_option( 'two-step-checkout-modern-button-sub-text' );\n\n\t\t\t$two_step_next_btn_html = '';\n\n\t\t\t$two_step_next_btn_html .= '<div class=\"ast-embed-checkout-form-nav-btns\">';\n\n\t\t\t\t$two_step_next_btn_html .= '<a href=\"#ast-order-wrap\" class=\"button ast-next-button\" >';\n\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-content\">';\n\n\t\t\tif ( '' != $button_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-icon-wrap\">';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"dashicons dashicons-arrow-right-alt\"></span>';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-text\">' . esc_html( $button_title ) . '</span>';\n\t\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t}\n\n\t\t\tif ( '' != $button_sub_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-sub-text\">' . esc_html( $button_sub_title ) . '</span>';\n\t\t\t}\n\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t\t$two_step_next_btn_html .= '</a>';\n\n\t\t\t$two_step_next_btn_html .= '</div>';\n\n\t\t\techo $two_step_next_btn_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "public static function getIDerButtonLink()\n {\n return static::getBasePath() . 'iderbutton';\n }", "public function create()\n {\n return view('events::create_event');\n }", "static function Field_button($sysForm, $fieldId) {\n self::emLine($sysForm->getHtml_Button($fieldId));\n}", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "public function create()\n {\n return view(\"Event::create\");\n }", "public function addButton(TDProject_Core_Interfaces_Block_Widget_Button $block);", "public function listNextAction()\n {\n $date = \\FreeBet\\Bundle\\UIBundle\\Services\\DateManager::getUtcDateTime();\n $events = $this->get('free_bet.event.repository')->findNextEvents($date);\n\n return $this->render('FreeBetCompetitionBundle:Event:listNext.html.twig', array(\n 'events' => $events\n ));\n }", "function learn_press_single_quiz_buttons() {\n\t\tlearn_press_get_template( 'content-quiz/buttons.php' );\n\t}", "function echotheme_button($a) {\n\textract(shortcode_atts(array(\n\t\t'label' \t=> 'Button Text',\n\t\t'id' \t=> '1',\n\t\t'url'\t=> '',\n\t\t'target' => '_parent',\t\t\n\t\t'size'\t=> '',\n\t\t'ptag'\t=> false\n\t), $a));\n\t\n\t$link = $url ? $url : get_permalink($id);\t\n\t\n\tif($ptag) :\n\t\treturn wpautop('<a href=\"'.$link.'\" target=\"'.$target.'\" class=\"button '.$size.'\">'.$label.'</a>');\n\telse :\n\t\treturn '<a href=\"'.$link.'\" target=\"'.$target.'\" class=\"button '.$size.'\">'.$label.'</a>';\n\tendif;\n\t\n}", "function tia_button($a) {\n\textract(shortcode_atts(array(\n\t\t'label' \t=> 'Button Text',\n\t\t'url'\t=> '',\n\t\t'id' \t=> '1',\t\t\n\t\t'target' => '',\t\t\n\t\t'size'\t=> ''\n\t), $a));\n\t\n\t$link = $url ? $url : get_permalink($id);\t\n\t\n\treturn '<a href=\"'.$link.'\"target=\"'.$target.'\" class=\"button '.$size.'\">'.$label.'</a>';\n\t\n}", "function addButton($caption, $href, $img = '', $hint = '',\n $down = FALSE, $noTranslation = FALSE) {\n if (!$noTranslation) {\n $hint = $this->_gt($hint);\n $caption = $this->_gt($caption);\n }\n $downString = (($down) ? ' down=\"down\"' : '');\n if (isset($this->images[$img])) {\n $glyph = ' glyph=\"'.papaya_strings::escapeHTMLChars($this->images[$img]).'\"';\n } elseif (preg_match('~^module:([a-f\\d]{32})/(.+)~', $img, $regs)) {\n $glyph = ' glyphscript=\"modglyph.php?module='.\n urlencode($regs[1]).'&amp;src='.urlencode($regs[2]).'\"';\n } else {\n $glyph = ' glyph=\"'.papaya_strings::escapeHTMLChars($img).'\"';\n }\n $button = sprintf(\n '<button title=\"%s\" href=\"%s\"%s hint=\"%s\" target=\"_self\"%s/>',\n papaya_strings::escapeHTMLChars($caption),\n papaya_strings::escapeHTMLChars($href),\n $glyph,\n papaya_strings::escapeHTMLChars($hint),\n $downString\n );\n $this->toolbar[] = array('btn', $button);\n }", "function protocol_button($element) {\n if (isset($element['#attributes']['class'])) {\n $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class'];\n }\n else {\n $element['#attributes']['class'] = 'form-' . $element['#button_type'];\n }\n\n return '<div class=\"button-wrapper-outer\"><div class=\"button-wrapper\"><input type=\"submit\" ' . (empty($element['#name']) ? '' : 'name=\"' . $element['#name'] . '\" ') . 'id=\"' . $element['#id'] . '\" value=\"' . check_plain($element['#value']) . '\" ' . drupal_attributes($element['#attributes']) . \" /></div></div>\\n\";\n}", "function sexy_button_to_function($name, $function, $options = array())\n{\n $html_options = _convert_options($options);\n $html_options['href'] = isset($html_options['href']) ? $html_options['href'] : '#';\n $html_options['onclick'] = \"$function; return false;\";\n return sexy_button_to( $name, null, $html_options);\n}", "function getOnClick() {return $this->_onclick;}", "function getOnClick() {return $this->_onclick;}", "public function create()\n {\n return view('admin.event.create');\n }", "public function create()\n {\n return view('admin.event.create');\n }", "public function handleClickEvent(object $message): void;", "protected function _setAddButton()\n {\n $this->setChild('add_button',\n $this->getLayout()->createBlock('adminhtml/widget_button')\n ->setData(array('id' => \"add_tax_\" . $this->getElement()->getHtmlId(),\n 'label' => Mage::helper('catalog')->__('Add Tax'),\n 'onclick' => \"weeeTaxControl.addItem('\" . $this->getElement()->getHtmlId() . \"')\",\n 'class' => 'add'\n )));\n }", "public function create()\n {\n return view('admin.adminevent.create_event');\n }", "public function add_page_button($button) {\n $this->buttons[]=$button;\n }", "public function getDefaultButton() {}", "public function exportButton ()\n\t{\n\t}", "function readOnClick() {return $this->_onclick;}", "function shortcode_insert_button()\n\t\t{\n\t\t\t$this->config['name']\t\t= __('Job Submit Form', 'avia_framework' );\n\t\t\t$this->config['tab']\t\t= __('Plugin Additions', 'avia_framework' );\n\t\t\t$this->config['icon']\t\t= AviaBuilder::$path['imagesURL'].\"sc-comments.png\";\n\t\t\t$this->config['order']\t\t= 2;\n\t\t\t$this->config['target']\t\t= 'avia-target-insert';\n\t\t\t$this->config['shortcode'] \t= 'av_jobs_submit_form';\n\t\t\t$this->config['tooltip'] \t= __('Display the job submission form for WP Job Manager', 'avia_framework' );\n\t\t\t$this->config['drag-level'] = 3;\n\t\t}", "function drawButtonPlan() {?>\r\n <button id=\"planButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('buttonPlan');?>\" class=\"buttonIconNewGui detailButton\"\r\n iconClass=\"dijitIcon iconPlanStopped\" >\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showPlanParam();\r\n return false;\r\n </script>\r\n </button>\r\n<?php \r\n}", "public static function CreateInsertTagButton(EventData_IEM_EDITOR_TAG_BUTTON $data) {\n\n $userAPI = GetUser ();\n\n // Permission checking\n $access = $userAPI->HasAccess('dynamiccontenttags', 'general');\n $access = $access || $userAPI->Admin();\n if (!$access) {\n $data->tagButtonHtml = $data->tagButtonText = '';\n return;\n }\n $data->tagButtonText = '\n <li>\n <a href=\"#\" title=\"'.GetLang('DynContentTagsInsert_Editor').'\" onclick=\"javascript: ShowDynamicContentTag(\\'TextContent\\', \\'myDevEditControl\\', \\'%%PAGE%%\\'); return false;\">\n <img src=\"images/mce_dct_add.gif\" alt=\"icon\" />'.GetLang('DynContentTagsInsert_Editor').'</a>\n </li>\n ';\n $data->tagButtonHtml = '\n <li>\n <a href=\"#\" title=\"'.GetLang('DynContentTagsInsert_Editor').'\" onclick=\"javascript: ShowDynamicContentTag(\\'html\\', \\'myDevEditControl\\', \\'%%PAGE%%\\'); return false;\">\n <img src=\"images/mce_dct_add.gif\" alt=\"icon\" />'.GetLang('DynContentTagsInsert_Editor').'</a>\n </li>\n ';\n }", "public function create()\n {\n return view ('event.create');\n }", "public function testAddNewButtonRoute(){\n $user = factory(User::class)->create();\n $this->actingAs($user)->withSession(['sarbik'=>'sarbik'])->visit('admin/price')\n ->click(\"Add New\")\n ->seePageIs(\"admin/price/add\")\n ->assertResponseStatus(200) ;\n }", "protected function Form_Create() {\n\t\t\t// Define the Label\n\t\t\t$this->lblMessage = new QLabel($this);\n\t\t\t$this->lblMessage->Text = 'Click the button to change my message.';\n\n\t\t\t// Define the Button\n\t\t\t$this->btnButton = new QButton($this);\n\t\t\t$this->btnButton->Text = 'Click Me!';\n\n\t\t\t// Add a Click event handler to the button\n\t\t\t$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));\n\t\t}", "public function getButtonHtml()\n {\n $button = $this->getLayout()->createBlock(\n 'Magento\\Backend\\Block\\Widget\\Button'\n );\n $button->setData(\n [\n 'id' => 'test_api_button',\n 'label' => __('Run Test'),\n ]\n );\n return $button->toHtml();\n }", "private function button3() {\n\t\tif ( $this->button_array['button3']['text'] ) {\n\t\t\t?>\n\t\t\tlastOpenedPointer.find('#pointer-primary').after('<a id=\"pointer-ternary\" style=\"float: left;\" class=\"button-secondary\">' +\n\t\t\t\t'<?php echo esc_attr( $this->button_array['button3']['text'] ); ?>' + '</a>');\n\t\t\tlastOpenedPointer.find('#pointer-ternary').click(function () {\n\t\t\t<?php echo $this->button_array['button3']['function']; ?>\n\t\t\t});\n\t\t<?php }\n\t}", "public function build_button($title, $url) {\n\t return array(\n\t\t 'title' => $title,\n\t\t 'openUrlAction' => array(\n\t\t\t 'url' => $url,\n\t\t\t)\n\t );\n }", "public function generate_buttons_HTML( ) {\n\t\t$follow_count_HTML = $this->get_count_html( $shape );\n\t\treturn\n<<<BUTTON\n<a target=\"_blank\" href=\"{$this->href}\">\n\t<div class=\"swfw-follow-button swfw_buttons_button swp-$this->key\">\n\t\t<div class='swfw-network-icon'>\n\t\t\t{$this->icon}\n\t\t</div>\n\n\t\t<div class=\"swfw-text\">\n\t\t\t<span class='swfw-cta'>$this->cta</span>\n\t\t\t{$follow_count_HTML}\n\t\t</div>\n\t</div>\n</a>\nBUTTON;\n\t}", "function rt_button_delete($target)\n{\n return rt_ui_button('delete', $target, 'trash', array('method' => 'post', 'confirm' => 'Are you sure?'));\n}", "function print_button($url, $text) {\n\techo '<a href=\"'.$url.'\" class=\"btn btn-primary\">'.$text.'</a>';\t\n}", "public function modalButton() {\n\n $postID = $this->postID;\n\n $button = false;\n\n\n if ( get_field( 'jumbotron_show_button', $postID ) === false ) {\n return $button;\n }\n\n $button_text = get_field( 'jumbotron_button_text', $postID );\n $target = get_field( 'jumbotron_link_target', $postID );\n\n if ( get_field( 'jumbotron_link_type', $postID ) === 'internal' ) {\n $link = get_field( 'jumbotron_internal_link', $postID );\n } else {\n $link = get_field( 'jumbotron_custom_link', $postID );\n }\n\n $button = sprintf( '<a href=\"%1$s\" class=\"btn btn-primary btn-lg\" target=\"%2$s\">%3$s</a>', $link, $target, $button_text );\n\n return $button;\n\n }", "public function get_export_button() {\n\n\t\t$this->output_export_button();\n\t}" ]
[ "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.55983174", "0.5559939", "0.5539714", "0.55354947", "0.5527324", "0.5522786", "0.5510899", "0.54893893", "0.5482969", "0.5481616", "0.5472936", "0.5452986", "0.5449806", "0.5443234", "0.5441953", "0.542916", "0.5408317", "0.54022574", "0.538324", "0.53782165", "0.5363062", "0.5362184", "0.5361061", "0.5360095", "0.53586155", "0.5334635", "0.5323653", "0.5302969", "0.5297432", "0.5297164", "0.5296767", "0.52939", "0.5288536", "0.5281357", "0.52629364", "0.52623695", "0.52608407", "0.5258807", "0.5245823", "0.52391565", "0.52361244", "0.5236115", "0.52344996", "0.5231975", "0.522922", "0.5228914", "0.5228914", "0.521582", "0.521582", "0.52138805", "0.52092737", "0.5208412", "0.5207817", "0.5206925", "0.5193002", "0.51925683", "0.51870054", "0.51821387", "0.51717526", "0.51695454", "0.5164652", "0.5164324", "0.51547635", "0.51530546", "0.51501644", "0.5148999", "0.5148171", "0.51388484", "0.5135509", "0.51315355" ]
0.6582091
1
/ Function to display each exchange on regular screens
function displayExchangeReg($exchange, $num = null, $showExchTime = false){ $colorCode1 = COLOR_CODE_1; $colorCode2 = COLOR_CODE_2; $t1 = $exchange[1][1]; if($t1 == null){$t1 = "&nbsp;";} $t2 = $exchange[1][2]; if($t2 == null){$t2 = "&nbsp;";} $b1 = $exchange[2][1]; if($b1 == null){$b1 = "&nbsp;";} $b2 = $exchange[2][2]; if($b2 == null){$b2 = "&nbsp;";} if($showExchTime && $exchange['time'] == ''){ $exchange['time'] = "0:00"; } $class = ''; $odd = ''; if($num % 2 != 1){ $class= 'old-exch-odd'; } else { $odd= "opacity:0.92;"; } ?> <div class='shrink text-center' style='width: 40px'> <?php if($showExchTime): ?> <div class='cell <?=$class?>'> <?=$exchange['time']?> </div> <?php endif ?> <div class='cell f1-BG' style='<?=$odd?>'> <?=$t1?><BR><?=$t2?> </div> <div class='cell f2-BG' style='<?=$odd?>'> <?=$b1?><BR><?=$b2?> </div> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayExchangeSmall($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 = \"&nbsp;\";}\r\n\t\t$t2 = $exchange[1][2];\r\n\t\tif($t2 == null){$t2 = \"&nbsp;\";}\r\n\t\t$b1 = $exchange[2][1];\r\n\t\tif($b1 == null){$b1 = \"&nbsp;\";}\r\n\t\t$b2 = $exchange[2][2];\r\n\t\tif($b2 == null){$b2 = \"&nbsp;\";}\r\n\t\t\r\n\t\tif($showExchTime && $exchange['time'] == ''){\r\n\t\t\t$exchange['time'] = \"0:00\";\r\n\t\t}\t\r\n\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<tr class='old-exch-mini'>\r\n\t\t\t<td class='<?=$class?>'>\r\n\t\t\t\t<?php if($showExchTime){\r\n\t\t\t\t\techo $exchange['time'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $num;\r\n\t\t\t\t} ?>\r\n\t\t\t</td>\r\n\t\t\t<td class='f1-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$t1?>\r\n\t\t\t</td>\r\n\t\t\t<td class='f1-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$t2?>\r\n\t\t\t</td>\r\n\t\t\t<td class='f2-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$b1?>\r\n\t\t\t</td>\r\n\t\t\t<td class='f2-BG' style='<?=$odd?>'>\r\n\t\t\t\t<?=$b2?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\r\n\t\t<?php\r\n\t}", "public function getDisplay();", "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, '&amp;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}", "public function view(){\n\t\t\t$this->__switchboard();\n\t\t}", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "protected function _screen() {}", "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 display(){}", "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).\"'>&nbsp</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\">&nbsp;</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!='&nbsp;')\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!='&nbsp;')\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 = '&nbsp;';\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 = '&nbsp;';\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!='&nbsp;')\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}", "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "public abstract function display();", "function display1()\r\n\t{\r\n\t\techo \"<div id=\\\"page-wrapper\\\"> <div class=\\\"compare\\\">\";\r\n\t}", "abstract function display();", "abstract function display();", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "public function actionExchange() {\n $student_id = $this->_user['studentId'];\n $teacher_id = StudentTeacher::model()->findAllByAttributes(array('student_id' => $student_id));\n\n $this->render('exchange', array('teacher_id' => $teacher_id));\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "public function index()\n\t{\n\t\t$exchanges = $this->exchange->all();\n\n\t\treturn View::make('exchanges.index', compact('exchanges'));\n\t}", "private function display($list)\n {\n $this->view->downNumber = count($list);\n $this->view->downHostList = $list;\n }", "public function display() {}", "public function display() {}", "public function display() {\n\t}", "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}", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "function cart_do_display (&$hookdata) {\n\t$orderhash=$hookdata[\"order\"][\"order_hash\"];\n\n\t$order=cart_loadorder($orderhash);\n\t$calldata = Array(\"order\"=>$order,\"content\"=>null);\n\tcall_hooks('cart_display_before',$calldata);\n\t$hookdata[\"content\"].= isset($calldata[\"content\"]) ? $calldata[\"content\"] : '';\n\n\tforeach ($order[\"items\"] as $iteminfo) {\n\t\t$itemtype = isset($iteminfo[\"item_type\"]) ? $iteminfo[\"item_type\"] : null;\n\t\tif ($itemtype && !array_has_key($cart_itemtypes,$iteminfo['item_type'])) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$calldata = Array('item'=>$iteminfo,'error'=>null,'content'=>null);\n\t\t$itemtype = isset($calldata['item']['item_type']) ? $calldata['item']['item_type'] : null;\n\n\t\tif ($itemtype) {\n\t\t\t$itemtypehook='cart_display_before_'.$itemtype;\n\t\t\tcall_hooks($itemtypehook,$calldata);\n\t\t\t$hookdata[\"content\"].= isset($calldata[\"content\"]) ? $calldata[\"content\"] : '';\n\t\t\tunset($calldata[\"content\"]);\n\t\t}\n\n\t\t$calldata[\"content\"]=null;\n\n\t\tcall_hooks(\"cart_display_item\",$calldata);\n\t\t$hookdata[\"content\"].= isset($calldata[\"content\"]) ? $calldata[\"content\"] : '';\n\t\tunset($calldata[\"content\"]);\n\t\tcall_hooks(\"cart_display_item_after\",$calldata);\n\t\t$hookdata[\"content\"].= isset($calldata[\"content\"]) ? $calldata[\"content\"] : '';\n\t\tunset($calldata[\"content\"]);\n\n\t\tif ($itemtype) {\n\t\t\t$itemtypehook='cart_display_after_'.$itemtype;\n\t\t\t$calldata[\"content\"]=null;\n\t\t\tcall_hooks($itemtypehook,$calldata);\n\t\t\t$hookdata[\"content\"].= isset($calldata[\"content\"]) ? $calldata[\"content\"] : '';\n\t\t\tunset($calldata[\"content\"]);\n\t\t}\n\t}\n\n\t$calldata = Array(\"orderhash\"=>$orderhash,\"content\"=>null);\n\tcall_hooks('cart_display_after',$calldata);\n\t$hookdata[\"content\"].= $calldata[\"content\"];\n}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "function display_essay(){\n\t\n\t\t$dbc = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME)or die('Database Error 2!');\n\t\t$query0=$query = \"select distinct es.essay_name ename, ss.service_type_id stypeid, es.essay_id eid, ss.service_selection_id ssid, ss.service_status ssstatus \".\n\t\t\t\t\" from essay es, service_selection ss where ss.essay_id = es.essay_id and service_status = 'assigned' and ss.uid = \".$_SESSION['user_id'].\"\";\n\t\t$data0 = mysqli_query($dbc,$query0)or die(mysqli_error());\n\t\t// the list of essays\n\t\t$count=1;\n\t\twhile($row0 = mysqli_fetch_array($data0)){\n\t\t $eid = $row0['eid'];\n\t\t\n\t\t\t$query1=\"select version_id, submited_essay_name, scomment, submit_date, edited_essay_name, edit_date, ecomment from essay_change_history ech where \".\n \" ech.essay_id = \".$eid.\" order by ech.submit_date\"; \n\t\t\n\t\t\t$data1 = mysqli_query($dbc,$query1)or die(mysqli_error());\n\n\t\t\t$num1 = mysqli_num_rows($data1);\n\t\t\t\n\t\t\tif($num1!=0){\n ?>\n <div id=\"current2\">\n\t\t\t\t <div id=\"current4\">\n\t\t\t\t\t<h2 class=\"hname1\"><strong><?php echo $count. '.'; ?> Essay Name: &nbsp;</strong><?php echo $row0['ename'];?></h2>\n\t\t\t\t\t<h2 class=\"hname1\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Service Package:</strong><?php if ($row0['stypeid'] == 1) echo ' Basic'; else echo ' Comprehensive'; ?></h2> \n\t\t\t\t <div id=\"Curtable2\">\n\t\t\t\t <table width=\"650\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#999999\" id=\"showlink\"> \n\t\t\t\t <tr> \n\t\t\t\t <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Version</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Submitted Essay </strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\" nowrap><strong>Date Submitted</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Student Comment</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Edited Essay</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\" nowrap><strong>Edited Date</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Editor Comment</strong></td>\n\t\t\t\t </tr> \n\t\t\t<?php\n\t\t\t // the change history of an essay\n\t\t\t\twhile($row1 = mysqli_fetch_array($data1)){\n\t\t\t\t $_SESSION['versionid'] = $row1[\"version_id\"];\n\t\t\t\t if (empty($row1['edited_essay_name']))\n\t\t\t\t\t$_SESSION['action'] = 'update';\n\t\t\t\t else\n\t\t\t\t\t$_SESSION['action'] = 'insert';\n\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"version_id\"];?></td> \n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><a style=\"color:black\" href=\"download.php?versionid=<?php echo $row1[\"version_id\"]; ?>&essayid=<?php echo $eid; ?>&se=s\"><?php echo $row1[\"submited_essay_name\"]; ?></a></td>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"submit_date\"];?></td> \n\t\t\t\t<!--\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"scomment\"];?></td> \n\t\t\t\t-->\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\">\n\t\t\t\t<?php \n\t\t\t\t\t\tif (!empty($row1[\"scomment\"])) { \n\t\t\t\t\t\t echo '<input type=\"button\" onclick=\"show_alert(\\'' . $row1['scomment'] .'\\')\" value=\"See comments\" />';\n\t\t\t\t\t\t}\n\t\t\t\t ?>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><a style=\"color:black\" href=\"download.php?versionid=<?php echo $row1[\"version_id\"]; ?>&essayid=<?php echo $eid; ?>&se=e\"><?php echo $row1[\"edited_essay_name\"]; ?></a></td> \n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"edit_date\"];?></td> \n\t\t\t\t<!--\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"ecomment\"];?></td>\n\t\t\t\t-->\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\">\n\t\t\t\t<?php \n\t\t\t\t\t\tif (!empty($row1[\"ecomment\"])) { \n\t\t\t\t\t\t echo '<input type=\"button\" onclick=\"show_alert(\\'' . $row1['ecomment'] .'\\')\" value=\"See comments\" />';\n\t\t\t\t\t\t}\n\t\t\t\t ?>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t <?php\n\t\t\t\t }\n\t\t\t\t ?>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t</div>\n <div id=\"current5\">\n\t\t\t\t<div id=\"browseaera3\">\n\t\t\t\t<p class=\"hname8\" >Upload Revised Essay </p>\n <div id=\"browseaera2\">\n\t\t\t\t\t<form name=\"smform\" enctype=\"multipart/form-data\" method=\"post\" action=\"uploadfile.php\">\n\t\t\t\t\t<!-- post version ID and essay ID so a file can be inserted into a essay -->\n\t\t\t\t\t<input type=\"hidden\" name=\"essayid\" value=\"<?php echo $eid; ?>\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"versionid\" value=\"<?php if ($_SESSION['action'] == 'update') { echo $_SESSION['versionid']; } else { echo ++$_SESSION['versionid']; } ?>\" />\n\t\t\t\t\t<input name=\"uploadfile\" type=\"file\" class=\"text1\" id=\"uploadessay\" />\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <div id=\"inputaera\">\n\t\t\t\t<p class=\"hname8\">Comments (Anything in particular you want the editor to look at in your essay)</p>\n\t\t\t\t<p class=\"aeraborder2\">\n\t\t\t\t\t<textarea class=\"area\" name=\"comments\" id=\"textarea4\" cols=\"45\" rows=\"5\"></textarea> \n\t\t\t\t</p>\n\t\t\t\t</div>\t\t\t\t\n <div id=\"save\"><input type=\"image\" alt=\"submit\" name=\"save\" src=\"images/save01.gif\" width=\"60\" height=\"24\" /></div>\n\t\t\t </form>\n\t\t\t </div>\n\t\t </div>\n\t<?php\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"Sorry no essay\";\n\t\t\t}\n\t\t\t++$count;\n\t\t}\t\n\t\tif ($count == 1) {\n\t\t\t echo '<h2 class=\"hname4\">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;No essay is needed for you to revise at this moment. </h2>';\n\t\t}\n\t\tmysqli_close($dbc);\n\t\t\n\t}", "abstract protected function doDisplay(array $context, array $blocks = array());", "public function show()\n {\n //the board string is used in the view\n $data = $this->getBoardAsString();\n require VIEW_PATH.'web.php';\n\n }", "public function listExchange()\n\t{\n\t\t$params = $this->session->get('user');\n\t\t$result = $this->model->listExchange();\n\t\t $i = 0;\n\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t$rowdata[$i] = $row;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif ($i>0){\n\t\t\t\t$res = json_encode($rowdata,JSON_UNESCAPED_UNICODE);\n\t\t\t} else {\n\t\t\t\t$res = '[{\"ext_id\":\"0\"}]';\t\n\t\t\t}\n\t\t\techo $res;\n\n\t\t // $params = array('unidad' => $res);\n\t\t // $this->render(__CLASS__, $params);\n\t}", "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 Show_All() \n\t{\n\t\tglobal $eTraffic;\n\t\t\n\t\t$this->ShowIf('Debug Log', $this->Show_Log());\n\t\t$this->ShowIf('Traffic Counters', $eTraffic->Display());\n\t\t$this->ShowIf('Time Analysis', $this->Show_Performance());\n\t\t$this->ShowIf('SQL Analysis', $this->Show_SQL_Details());\n\t\t$this->ShowIf('Shortcodes / BBCode',$this->Show_SC_BB());\n\t\t$this->ShowIf('Paths', $this->Show_PATH());\n\t\t$this->ShowIf('Deprecated Function Usage', $this->Show_DEPRECATED());\n\t\t$this->ShowIf('Included Files', $this->Show_Includes());\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 }", "abstract protected function show();", "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}", "public function exchange_rates()\n {\n $exchangeRates = ExchangeRates::with('Currencies:name')->get();\n return view('setup.exchange_rates.index', compact('exchangeRates'));\n }", "public function display_account_orders( ){\n\t\tif( $this->is_page_visible( \"orders\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_orders.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_orders.php' );\n\t\t\telse\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_orders.php' );\n\t\t}\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 }", "public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}", "public function display()\n {\n $current = $this->head;\n while ($current != null) \n {\n echo $current->data->name.\" \";\n echo $current->data->share.\" \";\n echo $current->data->price;\n echo \"\\n\";\n $current = $current->next;\n }\n }", "public function display()\n\t\t{\n\t\t\techo \"<table border=\\\"1\\\">\";\n\t\t\techo \"<tr><th>Artikel</th><th>Menge</th><th>Optionen</th></tr>\";\n\t\t\tforeach ($this->items as $art=>$qty)\n\t\t\t\techo \"<tr>\n\t\t\t\t\t\t<td>$art</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<form name='qtyForm' action='cart.php' method='get'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='artChangeQty' value='$art'/>\n\t\t\t\t\t\t\t\t<input name='artQty' value='$qty'/>\n\t\t\t\t\t\t\t\t<input name='positive' type='submit' value='1' />\n\t\t\t\t\t\t\t\t<input name='negative' type='submit' value='-1' />\n\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t<input type='submit' value='Ändern' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<form name='removeForm' action='cart.php' method='get'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='artRemoveAll' value='$art'/>\n\t\t\t\t\t\t\t\t<input type='submit' value='Remove' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\";\n\t\t\techo \"</table>\";\n\t\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function surfacesAction() {\n\t$surfaces = new Surftreatments();\n\t$this->view->surfaces = $surfaces->getSurfaceTreatments();\n\t}", "public function runsAction()\n {\n $this->validateRunManager();\n $class1 = $this->container->getParameter('dtc_queue.class_run');\n $class2 = $this->container->getParameter('dtc_queue.class_run_archive');\n $label1 = 'Live Runs';\n $label2 = 'Archived Runs';\n\n $params = $this->getDualGridParams($class1, $class2, $label1, $label2);\n\n return $this->render('@DtcQueue/Queue/grid.html.twig', $params);\n }", "public function display($set = true)\n {\n print $this->get_display_template($set);\n }", "function displayCards() {\n global $deck;\n foreach ($deck as $card){\n $value = $card['value'];\n $suit = $card['suit'];\n }\n }", "public function show()\n\t{\n\t\t\n\t}", "function display() {\r parent::display();\r }", "function view_items() {\n $items = \\Model\\Item::all();\n \n $this->SC->CP->load_view('stock/view_items',array('items'=>$items));\n }", "function display($tpl = null)\n\t{\n\t\t$this->Item=$this->get('Item');\n\t\t\n//\t\techo \"<pre>\" . var_dump($this->Item) . \"</pre>\";\n\t\t$tour=new TournamentHelper();\n\t\t\t\n\t\tif (isset($this->Item[\"tournament\"][\"id\"]))\n\t\t{\n\t\t\t$tour->tournament=$this->Item[\"tournament\"];\n\t\t\t$tour->player=$this->Item[\"player\"];\n\t\t\t$tour->result=$this->Item[\"result\"];\n\t\t\t$tour->head=$this->Item[\"tournament\"]['event'];\n\t\t\t$this->table=$tour->displayTable(999);\n\t\t}\n\t\tparent::display($tpl);\n\t}", "protected function _display ()\n {\n $class_name = $this->app->final_class_name ('RELEASE_SHIPPER', 'projects/obj/release_updater.php');\n\n /** @var RELEASE_SHIPPER $committer */\n $committer = new $class_name ($this->object);\n?>\n <div class=\"text-flow\">\n <p>Shipping this release will make the following changes (scroll down or hide this preview to accept).</p>\n<?php\n $replacement = $committer->replacement_release ();\n if (isset ($replacement))\n {\n $text = 'These jobs are still open and will be <span class=\"field\">moved</span> to ' . $replacement->title_as_link ();\n }\n else\n {\n $text = 'These jobs are still open and will be <span class=\"field\">removed from </span> this release.';\n }\n\n $status = $committer->status_map->to_status ();\n\n $this->_draw_section ('change(s)', 'These changes will be <span class=\"field\">assigned to</span> this release.', $committer->change_query ());\n $this->_draw_section ('open job(s)', $text, $committer->open_job_query ());\n $this->_draw_section ('closed job(s)', 'These jobs are closed and will be <span class=\"field\">assigned to</span> this release.', $committer->closed_job_query ());\n $this->_draw_section ('job(s) will change status', 'These jobs will have their status changed to <span class=\"field\">' . $status->icon_as_html () . ' ' . $status->title . '</span>.', $committer->remapped_job_query ());\n\n?>\n </div>\n<?php\n if (! $this->_objects_displayed)\n {\n?>\n <p class=\"info-box-bottom\">There are no jobs or changes that will be affected by shipping this release.</p>\n<?php\n }\n }", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\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 showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "public function show(Turnos $turnos)\n {\n //\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "function display($tpl = null){\n $app = JFactory::getApplication();\n $this->plugin = $app->input->get('plugin');\n $this->model = $this->getModel();\n $this->items = $this->model->getItems();\n $this->queue = $this->model->getNextItem($this->plugin);\n parent::display($tpl);\n }", "public function display() {\n echo $this->render();\n }", "public function listDisplayElements();", "function displayMailInformation()\n {\n // query saved mails of the account\n $savedMailsQuery = mysql_query(\"SELECT mail_id FROM argus_mails WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted mails of the account\n $deletedMailsQuery = mysql_query(\"SELECT mail_id FROM argus_mails WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of mails\n $savedMailsCount = mysql_num_rows($savedMailsQuery);\n $deletedMailsCount = mysql_num_rows($deletedMailsQuery);\n $totalMailsCount = $savedMailsCount + $deletedMailsCount;\n \n // display the MAIL information\n echo \"\n <p>Mail Information</p>\n <p id='box'>\n Saved Mails: \".$savedMailsCount.\"<br />\n Trash Mails: \".$deletedMailsCount.\"<br /><br>\n Total Mails: \".$totalMailsCount.\"<br />\n </p>\";\n \n return;\n }", "public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function runs()\n {\n $this->validateRunManager();\n $this->checkDtcGridBundle();\n $class1 = $this->container->getParameter('dtc_queue.class.run');\n $class2 = $this->container->getParameter('dtc_queue.class.run_archive');\n $label1 = 'Live Runs';\n $label2 = 'Archived Runs';\n\n $params = $this->getDualGridParams($class1, $class2, $label1, $label2);\n\n return $this->render('@DtcQueue/Queue/grid.html.twig', $params);\n }", "public function show(printers $printers)\n {\n //\n }", "public function index()\n {\n $screenOne = DamageScreen::where('order', 0)->first();\n $screenTwo = DamageScreen::where('order', 1)->first();\n $status = DamageStatus::get();\n return view('dashboard.screens.index')->with('screenOne', $screenOne)->with('screenTwo', $screenTwo)->with('status',$status);\n }", "function display_menu()\n{\n\tglobal $avalaible_config;\n\t\n\tforeach ($avalaible_config as $choice) {\n\t\techo \"<tr><td>\" . $choice['name'] . \"</td><td>\";\n\t\tdisplay_choice($choice);\n\t\techo \"</td></tr>\\n\";\n\t}\n}", "public function show(Multipics $multipics)\n {\n //\n }", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "abstract protected function displayContent();", "public function gridAction()\n {\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock(\n 'inchoo_gsfeed/adminhtml_feed_grid')->toHtml()\n );\n }", "public function display($games) {\n //display page header\n parent::displayHeader(\"List All Games\");\n ?>\n <div id=\"main-header\"> Games in the Library</div>\n\n <div class=\"grid-container\">\n \n <?php\n //print_r($games);\n ?>\n <?php\n if ($games === 0) {\n echo \"No game was found.<br><br><br><br><br>\";\n } else {\n //display games in a grid\n foreach ($games as $i => $game) {\n $id = $game->getId();\n $title = $game->getTitle();\n $publisher = $game->getPublisher();\n //$release_year = new \\DateTime($game->getRelease_year());\n $category = $game->getCategory();\n $platform = $game->getPlatform(); \n $cover = $game->getCover();\n if (strpos($cover, \"http://\") === false AND strpos($cover, \"https://\") === false) {\n $cover = BASE_URL . \"/\" . GAME_IMG . $cover;\n }\n if ($i % 6 == 0) {\n echo \"<div class='row'>\";\n }\n\n echo \"<div class='col'><p><a href='\", BASE_URL, \"/game/detail/$id'><img src='\" . $cover .\n \"'></a><span>$title<br>$category<br>\" . \"</span></p></div>\";\n ?>\n <?php\n if ($i % 6 == 5 || $i == count($games) - 1) {\n echo \"</div>\";\n }\n }\n }\n \n //$release_year->format('m-d-Y')\n ?> \n </div>\n \n <?php\n //display page footer\n parent::displayFooter();\n }", "function internship(){\n // show the internship page\n echo Template::instance()->render('views/internships.php');\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!='&nbsp;')\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 show() {\n echo $this->fetch();\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 infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "public function display()\n\t{\n\t\t$serviceLocator = $this->_application->getServiceLocator();\n\t\t$eventDispatcher = $this->_application->getEventDispatcher();\n\n\t\t// Finish configuring Open Power Template\n\t\t$opt = $serviceLocator->get('template.Opt');\n\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.template.configure',\n\t\t\tarray('opt' => $opt)\n\t\t));\n\n\t\t$opt->setup();\n\n\t\t// Configure the layout view\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.configure',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\n\t\t// Add placeholders\n\t\tforeach($this->_placeholders as $name => &$placeholder)\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($placeholder as $view)\n\t\t\t{\n\t\t\t\t$data[] = array('view' => $view);\n\t\t\t}\n\t\t\t$this->_layout->assign($name, $data);\n\t\t}\n\n\t\t// Render everything. Actually, this is redirected to events, so\n\t\t// that we can easily change the exact rendering procedure.\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.render',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\t\t$this->_output->render($this->_layout);\n\t}", "public function index()\n {\n $this->data['pagebody'] = 'Parts_View';\n $source = $this->parts->all();\n $parts_onhand = array();\n foreach ($source as $record)\n {\n $model = strtoupper($record->model);\n if(ord($model) >= ord('A') && ord($model) <= ord('L')){\n $line = 'household';\n } else if(ord($model) >= ord('M') && ord($model) <= ord('V')){\n $line = 'butler';\n } else{\n $line = 'companion';\n }\n $parts_onhand[] = array ('part_code' => $record->model.$record->piece, 'image' => $record->model.$record->piece.'.jpeg',\n 'certificate' => $record->certificate, 'ahref' => '/part/'.$record->certificate, 'line' => $line);\n }\n \n usort($parts_onhand, function($a, $b){\n return strcmp($a['line'], $b['line']);\n });\n\n $this->data['parts'] = $parts_onhand;\n $this->render();\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}", "function warquest_view_awards() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $config;\r\n\tglobal $browser;\r\n\t\r\n\t$page = '<div class=\"award\">';\r\n\t\r\n\t/* Get battle award data */\r\n\t$query = \"select id, won from battle_award where id<\".$player->won_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_BATTLE_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_battle_award_image($data->id, $data->won);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\t\t\r\n\t/* Get mission award data */\r\n\t$query = \"select id, won from mission_award where id<\".$player->mission_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_MISSION_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_mission_award_image($data->id, $data->won);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t/* Get bounty award data */\r\n\t$query = \"select id, amount from bounty_award where id<\".$player->bounty_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_BOUNTY_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_bounty_award_image($data->id, $data->amount);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t/* Get rebel award data */\r\n\t$query = \"select id, amount from rebel_award where id<\".$player->rebel_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_REBEL_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_rebel_award_image($data->id, $data->amount);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t$page .= '</div>';\n\t\r\n\treturn $page;\r\n}", "public function show()\n\t{\n\n\t}", "public function display_menu_page() {\n\t\trequire_once( dirname( __FILE__ ) . '/class.wpcom-vip-plugins-ui-list-table.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/class.wpcom-vip-featured-plugins-ui-list-table.php' );\n\n\t\tdo_action( 'wpcom_vip_plugins_ui_menu_page' );\n\n\t\t$fpp_table = new WPCOM_VIP_Featured_Plugins_List_Table();\n\t\t$fpp_table->prepare_items();\n\n\t\t// @todo replace with custom table\n\t\t$community_table = _get_list_table('WP_Plugins_List_Table');\n\t\t$community_table->prepare_items();\n\n\t\t$shared_table = new WPCOM_VIP_Plugins_UI_List_Table();\n\t\t$shared_table->prepare_items();\n\n\t\tif ( ! empty( $_GET['activated'] ) )\n\t\t\tadd_settings_error( 'wpcom-vip-plugins-ui', 'wpcom-vip-plugins-activated', __( 'Plugin activated.', 'wpcom-vip-plugins-ui' ), 'updated' );\n\t\telseif( ! empty( $_GET['deactivated'] ) )\n\t\t\tadd_settings_error( 'wpcom-vip-plugins-ui', 'wpcom-vip-plugins-activated', __( 'Plugin deactivated.', 'wpcom-vip-plugins-ui' ), 'updated' );\n\n?>\n<div class=\"wrap\">\n\t<?php screen_icon( 'plugins' ); ?>\n\t<h2><?php esc_html_e( 'WordPress.com VIP Plugins & Services', 'wpcom-vip-plugins-ui' ); ?></h2>\n\n\t<?php settings_errors( 'wpcom-vip-plugins-ui' ); ?>\n\n\t<main id=\"plugins\" role=\"main\">\n\n\t\t<?php $fpp_table->display(); ?>\n\n\t\t<?php $community_table->display(); ?>\n\n\t\t<?php $shared_table->display(); ?>\n\n\t</main>\n\n</div>\n<?php\n\t}", "public function all_deliveries() {\n\t\t$delivery=$this->uri->segment(3);\n\t\t//echo $delivery;\n $data['title'] = \"All Deliveries\";\n $data['content_view'] = \"dispatched_listing_v\";\n $data['banner_text'] = \"Dispatched Orders\";\n $data['link'] = \"dispatched_listing_v\";\n\t\t$data['myClass'] = $this;\n $data['order_list']=Kemsa_Order::get_facility_order($delivery);\n $data['quick_link'] = \"dispatched_listing_v\";\n $this -> load -> view(\"template\", $data);\n }", "function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\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\" />&nbsp;'; \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\"/>&nbsp;'; \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\">&nbsp;';\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?>&nbsp;\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}", "function double_display($sql){\r\n\t$conn=mysqli_connect(\"localhost\",\"root\",\"alaa\",\"registration_database\");\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\r\n\t\t}\r\n\t\t$result = $conn->query($sql);\r\n\t\t\r\n\t\tif ($result->num_rows > 0) {\r\n\t\t//\techo \"<table class='items'>\";\r\n\t\t\r\n\t\t\techo ' \r\n\t\t\t\t <div class=\"container\">\r\n\t\t\t\t \r\n\t\t\t\t <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\r\n\t\t\t\t <p><strong>Exchange</strong></p>\r\n\t\t\t\t \r\n\t\t\t\t <div class=\"panel panel-default\">\r\n\t\t\t\t \r\n\t\t\t\t ';\r\n\t\t\t\t \r\n\t\t\t// output data of each row\r\n\r\n\t\t\twhile($row = $result->fetch_assoc()) {\r\n\t\t\t// retieving the data of the logged in user\r\n\t\t\t$requested_data=(\"SELECT `ads`.id,image,date,title,name,Interestitem,detail FROM `ads` WHERE `ads`.id=\".$row[\"requested_item\"].\"\");\r\n\t\t\t\r\n\t\t\t$q = mysqli_query($conn,$requested_data);\r\n\t\t\t$r_data = mysqli_fetch_assoc($q);\r\n\t\t\t// retrieving the data of the other user\r\n\t\t\t$logged_data=(\"SELECT `ads`.id,image,date,title,name,Interestitem,detail FROM `ads` WHERE `ads`.id=\".$row[\"chosen_item\"].\"\");\r\n\t\t\t\r\n\t\t\t$q2 = mysqli_query($conn,$logged_data);\r\n\t\t\t$l_data = mysqli_fetch_assoc($q2);\r\n\t\t\t\r\n\t\t\t\techo\t' <div class=\"panel-body\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-12 col-sm-8 col-md-4 col-lg-3 text-left\">\r\n\t\t\t\t\t\t<h4>Your Item: </h4>\r\n\t\t\t\t\t\t<img src='.$r_data[\"image\"].' style=\"height:300px; width:90%;\">\r\n\t\t\t\t\t\t<h4>'.$r_data[\"title\"].'</h4>\r\n\t\t\t\t\t\t<h4>Username: '.$row[\"requested_user\"].'</h4> <h4>Name: '.$r_data[\"name\"].'</h4>\r\n <h4>Item for exchange: '.$r_data[\"Interestitem\"].'<h4>\r\n \r\n <p>Details: '.$r_data[\"detail\"].'</p>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-1-hidden col-sm-1 col-md-1 col-lg-1 text-center\">\r\n\t\t\t\t\t\t\t<img src=Drawing1-Model2.png style=\"height:300px; width:250px; position:absolute;top:40px;\">\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-4 pull-right\">\r\n\t\t\t\t\t\t\t\t<h4>Traders Item: </h4>\r\n\t\t\t\t\t\t\t\t<img src='.$l_data[\"image\"].' style=\"height:300px; width:90%;\">\r\n\t\t\t\t\t\t\t\t<h4>'.$l_data[\"title\"].'</h4>\r\n\t\t\t\t\t\t\t\t<h4>Username: '.$row[\"choosing_user\"].'</h4> <h4>Name: '.$l_data[\"name\"].'</h4>\r\n\t\t\t\t\t\t\t\t<h4>Item for exchange: '.$l_data[\"Interestitem\"].'<h4>\r\n\r\n\t\t\t\t\t\t\t\t<p>Details: '.$l_data[\"detail\"].'</p>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</div>\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<hr>';\t\t\t\t\t\r\n\r\n\t\t}\r\n\t\techo '</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\t</div>';\r\n\t\t\r\n\t\t$conn->close();\r\n\r\n\t\t\r\n\t\t}}" ]
[ "0.6211648", "0.6066554", "0.60325634", "0.5869405", "0.5693486", "0.56888366", "0.5667165", "0.5645903", "0.5638992", "0.5635639", "0.56331897", "0.5608421", "0.5589225", "0.5583504", "0.5583504", "0.5550186", "0.5550186", "0.5549243", "0.5549243", "0.55442953", "0.55334306", "0.5530049", "0.5523338", "0.5519944", "0.549332", "0.54762655", "0.54758805", "0.54758805", "0.5474043", "0.546086", "0.54503465", "0.544608", "0.5415996", "0.5415645", "0.5415645", "0.5415645", "0.5411553", "0.54067755", "0.5398603", "0.5397695", "0.5396917", "0.5384047", "0.53677", "0.53388035", "0.53362364", "0.5335389", "0.533225", "0.5331916", "0.5328833", "0.5326411", "0.5315822", "0.531574", "0.5310263", "0.5283533", "0.5278504", "0.5271972", "0.5269543", "0.5267949", "0.5263757", "0.5255453", "0.5252918", "0.5246004", "0.5243495", "0.5243495", "0.5243495", "0.52391136", "0.5234595", "0.5229199", "0.5225323", "0.5224555", "0.5219257", "0.5207571", "0.5206354", "0.52063406", "0.52057004", "0.52028203", "0.519358", "0.51929146", "0.5186975", "0.5185101", "0.51833445", "0.5181085", "0.5165376", "0.5160817", "0.51602477", "0.5156601", "0.5154525", "0.5152532", "0.51488763", "0.5148241", "0.51449025", "0.514389", "0.51438236", "0.5141458", "0.51396096", "0.5133344", "0.5130651", "0.5130123", "0.5116561", "0.5107334" ]
0.6019705
3
/ 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 = "&nbsp;";} $t2 = $exchange[1][2]; if($t2 == null){$t2 = "&nbsp;";} $b1 = $exchange[2][1]; if($b1 == null){$b1 = "&nbsp;";} $b2 = $exchange[2][2]; if($b2 == null){$b2 = "&nbsp;";} 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).\"'>&nbsp</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\">&nbsp;</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!='&nbsp;')\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!='&nbsp;')\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 = '&nbsp;';\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 = '&nbsp;';\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!='&nbsp;')\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, '&amp;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\" />&nbsp;'; \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\"/>&nbsp;'; \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\">&nbsp;';\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?>&nbsp;\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 = \"&nbsp;\";}\r\n\t\t$t2 = $exchange[1][2];\r\n\t\tif($t2 == null){$t2 = \"&nbsp;\";}\r\n\t\t$b1 = $exchange[2][1];\r\n\t\tif($b1 == null){$b1 = \"&nbsp;\";}\r\n\t\t$b2 = $exchange[2][2];\r\n\t\tif($b2 == null){$b2 = \"&nbsp;\";}\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 &raquo;</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 &raquo;</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!='&nbsp;')\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}", "protected function calculateDisplayRange() {}", "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "function getGameToShow(){\n $id = $_REQUEST['id'];\n\n // Connect to the database for the data\n $gameData = getGameData1($id);\n $photos = getGameData2($id);\n $stock = getGameStock($id);\n $stock = $stock['STOCK'][0];\n $price = getGamePrice($id);\n $price = $price['PRICE'][0];\n $pegi = $gameData['PEGI'][0];\n $plataforma = $gameData['PLATAFORMA'][0];\n\n $answer = \"<div id=\\\"game\\\">\";\n // The part of buy and front\n\n // The part of the data\n $answer = $answer.\"<div id=\\\"gameDataBox\\\">\";\n $answer = $answer.\"<div id=\\\"gameName\\\">\".$gameData['NOMBRE'][0].\"</div>\";\n\n $answer = $answer.\"<div id=\\\"gameBuyBox\\\">\";\n $answer = $answer.\"<div id=\\\"gameFront\\\" class=\\\"left\\\">\";\n // If has front\n if($gameData['FRONT'][0] == 'Y'){\n $answer = $answer.\"<img src=\\\"/Images/Games/\".$id.\"/big/front.jpg\\\">\";\n }\n $answer = $answer.\"</div>\";\n $answer = $answer.\"<div id=\\\"gameBuy\\\" class=\\\"right\\\">\";\n $answer = $answer.\"<div class=\\\"topPricePlatform\\\">\";\n // Price\n $answer = $answer.\"<p id=\\\"topPriceGame\\\" class=\\\"bigPrice\\\" >\".$price.\" &euro;</p>\";\n // Platform\n $answer = $answer.\"<div class=\\\"topPlatform bigPlatform\\\">\";\n $answer = $answer.\"<p class=\\\"sliderPlatformGame\\\" >\".$plataforma.\"</p>\";\n $iconPlatform = \"\";\n switch ($plataforma){\n case 'Xbox': $iconPlatform = \"/Images/Icons/xboxIcon.png\"; break;\n case 'PS4': $iconPlatform = \"/Images/Icons/psIcon.png\"; break;\n case '3DS': $iconPlatform = \"/Images/Icons/3dsIcon.png\"; break;\n case 'PC': $iconPlatform = \"/Images/Icons/pcIcon.png\"; break;\n }\n $answer = $answer.\"<img class=\\\"reducedIcon\\\" src=\\\"\".$iconPlatform.\"\\\">\";\n $answer = $answer.\"</div>\";\n $answer = $answer.\"</div>\";\n\n $answer = $answer.\"<div id=\\\"platformPegi\\\" class=\\\"oneLine\\\">\";\n $answer = $answer.\"<p class=\\\"\\\">\".pegi.\"</p>\";\n $answer = $answer.\"<p class=\\\"\\\">\".$pegi.\"</p>\";\n $answer = $answer.\"</div>\";\n\n $answer = $answer.\"<div id=\\\"buySellButtons\\\">\";\n $answer = $answer.\"<form class=\\\"oneLine\\\" method=\\\"post\\\" action=\\\"game.php\\\">\";\n $answer = $answer.\"<p>\".quantity.\"</p>\";\n $answer = $answer.\"<input class=\\\"inputQuantity\\\" type=\\\"text\\\" name=\\\"quantity\\\" value=\\\"1\\\" />\";\n $answer = $answer.\"<input type=\\\"text\\\" class=\\\"hider\\\" name=\\\"id\\\" value=\\\"\".$id.\"\\\" />\";\n $aux = \"\";\n $class = \"\";\n $rentText = \"\";\n if($stock == 0){\n $aux = reserve;\n $class = \"reserve buttonGame\";\n $rentText = reserve;\n }\n else if($stock > 0){\n $aux = buy;\n $class = \"buy buttonGame\";\n $rentText = rent;\n }\n else {\n $aux = noStock;\n $class = \"noStock buttonGame\";\n $rentText = noStock;\n }\n $answer .= \"<input type=\\\"submit\\\" name=\\\"buy\\\" value=\\\"\".$aux.\"\\\" class=\\\"\".$class.\"\\\"\";if($aux==noStock){$answer .=\" disabled \";} $answer .= \" />\";\n $answer = $answer.\"<input type=\\\"submit\\\" name=\\\"sell\\\" value=\\\"\".sell.\"\\\" class=\\\"buy buttonGame\\\" />\";\n $answer = $answer.\"<input type=\\\"submit\\\" name=\\\"rent\\\" value=\\\"\".$rentText.\"\\\" class=\\\"\".$class.\"\\\" />\";\n $answer = $answer.\"</form>\";\n\n\n $answer = $answer.\"</div>\";\n\n $answer = $answer.\"</div>\";\n\n $answer = $answer.\"<div class=\\\"separatorOrange\\\"></div>\";\n $answer = $answer.\"<div id=\\\"youtube\\\">\";\n $answer = $answer.\"<embed id=\\\"youtubeVideo\\\" src=\\\"http://www.youtube.com/v/\".$gameData['YOUTUBE'][0].\"?version=3&amp;hl=en_US&amp;rel=0&amp;autohide=1\\\"\";\n $answer = $answer.\"wmode=\\\"transparent\\\" type=\\\"application/x-shockwave-flash\\\" allowfullscreen=\\\"true\\\" title=\\\"Adobe Flash Player\\\">\";\n $answer = $answer.\"</div>\";\n $answer = $answer.\"<div id=\\\"gamePhotos\\\">\";\n // Get some random numbers for the photos\n $photosRan = $photos['NOMBRE'];\n shuffle($photosRan);\n\n // select the number of photos\n for($i = 0; $i < getGamesPhotos(); $i++){\n $aux = $photosRan[$i];\n $photoName = trim($photosRan[$i]);\n $answer = $answer.\"<img class=\\\"gamePhoto\\\" src=\\\"/Images/Games/\".$id.\"/big/\".$photoName.\"\\\">\";\n }\n $answer = $answer.\"</div>\";\n $answer = $answer.\"<div id=\\\"gameDescription\\\">\";\n $desc = $gameData['DESCRIPCION'][0];\n if(strpos($desc, \"#REQUISITOS#\")){\n $desc = substr($desc, 0, strpos($desc, \"#REQUISITOS#\"));\n }\n $desc = trim($desc);\n $answer = $answer.\"<div>\".$desc.\"</div>\";\n $answer = $answer.\"</div>\";\n\n $answer = $answer.\"<div class=\\\"separatorOrange\\\"></div>\";\n\n $answer = $answer.\"</div>\";\n $answer = $answer.\"</div>\";\n\n return $answer.\"</div>\";\n}", "function displaypaintings($row, &$flag, $cnt)\n{\n if($flag) // do it one time and set it back to false\n {\n echo '<div class=\"ui centered grid\">';\n echo '<div class=\"twelve wide column\"><h2 class=\"ui header\">Paintings</h2><div class=\"ui divider\"></div></div>';\n $flag = false;\n }\n if($cnt % 6 == 0)\n {\n if($cnt != 0) echo '</div>'; // close previous tag\n echo '<div class=\"ui six column row\">';\n }\n echo '<div class=\"two wide column\"><a href=\"single-painting.php?id=' . $row['PaintingID'] . '\">\n <img class=\"thumbnail\" src=\"images/art/works/square-medium/' . $row['ImageFileName'] . '.jpg\" alt=\"' . utf8_encode($row['Title']) . '\">\n </a></div>';\n}", "function casano_open_product_mobile_more_detail_wrap() {\r\n\t$enable_single_product_mobile = casano_get_option( 'enable_single_product_mobile', true );\r\n\tif ( $enable_single_product_mobile && casano_is_mobile() ) {\r\n\t\techo '<div class=\"product-mobile-more-detail-wrap\">';\r\n\t}\r\n}", "function onwatch(){\n\t\t$who_u = $_SESSION['logged'];\n\t\t$query1 = mysqli_query($conn,\"SELECT * FROM watchlist WHERE memberid = '$who_u'\");\n\t\twhile($row1 = mysqli_fetch_array($query1)){\n\t\t\t$prod = $row1['productid'];\n\t\t\t$query = mysqli_query($conn,\"SELECT * FROM products WHERE productid = '$prod'\");\n\t\t\twhile($row = mysqli_fetch_array($query)){\n\t\t\t\techo \"<div class='prod_box'>\";\n\t\t\t\t\techo \"<div class='top_prod_box'></div>\";\n\t\t\t\t\techo \"<div class='center_prod_box'>\";\n\t\t\t\t\t\techo \"<div class='product_title'><a href='details.php?id=\".$row['productid'].\"'>\".$row['prodname'].\"</a></div>\";\n\t\t\t\t\techo \"<div class='product_img'><a href='details.php?id=\".$row['productid'].\"'><img src='administrator/images/products/\".$row['prodimage'].\"' width='94' height='92' alt='' border='0' /></a></div>\";\n\t\t\t\t\techo \"<div class='prod_price'><span class='reduce'>\".$row['regularprice'].\"$</span> <span class='price'>\".$row['startingbid'].\"$</span></div>\";\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"<div class='bottom_prod_box'></div>\";\n\t\t\t\techo \"<div class='prod_details_tab'><a href='details.html' class='prod_details' title='header=[Click for Details] body=[&nbsp;] fade=[on]'>Details</a> </div>\";\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}\n\t }", "function showBestSellingProducts($arr)\n\t{\n\t\t\n\t\t$output ='\n\t\t<div class=\"quickview_border\" style=\"margin-top:14px;\" >\n\t\t<div class=\"heading1\"><span class=\"headingTXT\">Best Selling Products</span></div>\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding-left:10px;padding-top:10px;padding-bottom:10px;padding-right:10px;\">';\n\t\t$i=0;\n\t\tif((count($arr)>0))\n\t\t{\n\t\t\twhile($i<count($arr))\n\t\t\t{\n\t\t\t\tif(($i%2)==0)\n\t\t\t\t\t$output.='<tr>';\n\t\t\t\t\n\t\t\t\t$style[0]='background:url(images/bg_line1.gif) repeat-y right';\n\t\t\t\t$style[1]='';\n\t\t\t\t$style[2]='background:url(images/bg_line1.gif) repeat-y right';\n\t\t\t\t\t\t\t\t\n\t\t\t $output.='<td style=\"'.$style[1].'\"><table width=\"95%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t <td width=\"43%\" valign=top><a href=\"'.$_SESSION['base_url'].'/index.php?do=prodetail&action=showprod&prodid='.$arr[$i]['product_id'].'\"><img src=\"'.(file_exists($arr[$i]['thumb_image']) ? $arr[$i]['thumb_image'] : 'images/noimage1.jpg').'\" alt=\"'.addslashes($arr[$i]['title']).'\" width=\"'.THUMB_WIDTH.'\" border=0/></a></td>\n\t\t\t\t <td width=\"57%\" valign=\"top\" class=\"bestsellingTXT\"><a href=\"'.$_SESSION['base_url'].'/index.php?do=prodetail&action=showprod&prodid='.$arr[$i]['product_id'].'\">'.((strlen($arr[$i]['title'])>15) ? substr( $arr[$i]['title'],0,15).'...' : $arr[$i]['title']).'</a><br><br /><span class=\"featurePRICE\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].number_format($_SESSION['currencysetting']['selected_currency_settings']['conversion_rate']*$arr[$i]['msrp'],2).'</span>\n\t\t\t\t\t<br /><br>\n\t\t\t\t\tSee all <span><!--<a href=\"'.$_SESSION['base_url'].'/index.php?do=featured&action=showmaincatlanding&maincatid='.$arr[$i]['category_id'].'\">'.$arr[$i]['category_name'].'</a>-->\n\t\t\t\t\t<a href=\"'.$_SESSION['base_url'].'/index.php?do=featured&action=showfeaturedproduct&subcatid='.$arr[$i]['category_id'].'\">'.$arr[$i]['category_name'].'</a></span></td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t </table></td>';\n\t\t\t \t\n\t\t\t\tif(($i%2)!=0 || empty($arr[$i+1]['product_id']))\n\t\t\t\t{\n\t\t\t\t\tif (empty($arr[$i+1]['product_id']))\n\t\t\t\t\t\t $output.='<td>&nbsp;</td>';\n\t\t\t\t $output.='</tr> ';\n\t\t\t\t}\n\t\t\t\tif ($i==1)\n\t\t\t\t\t$output.='<tr>\n\t\t\t\t<td colspan=\"2\" class=\"dot_line\">&nbsp;</td>\n\t\t\t\t</tr>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $output='<tr><td><b>No Product found for this category</b></td></tr>';\n\t\t}\n\t\t$output.=' </table></div>';\n\t\t\n\t\treturn $output;\n\t}", "public function DisplaySliderShelf()\n\t{\tob_start();\n\t\tif ($this->products)\n\t\t{\n\t\t\techo '<div class=\"shelf_slider_wrapper\">', count($this->products) > 1 ? '<div class=\"products_next\"></div><div class=\"products_prev\"></div>' : '', '<ul class=\"storeShelfList\">';\n\t\t\tforeach($this->products as $product_row)\n\t\t\t{\t\n\t\t\t\tif (is_a($product_row, 'StoreProduct'))\n\t\t\t\t{\t$product = $product_row;\n\t\t\t\t} else\n\t\t\t\t{\tif (is_array($product_row))\n\t\t\t\t\t{\t$product = new StoreProduct($product_row);\n\t\t\t\t\t} else\n\t\t\t\t\t{\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '<li><a href=\"', $link = $this->link->GetStoreProductLink($product), '\"><img class=\"storeShelfImg\" src=\"', ($img = $product->HasImage('thumbnail')) ? $img : $product->DefaultImageSRC('thumbnail'), '\" alt=\"', $title = $this->InputSafeString($product->details['title']), ' - Image\" /></a><h4><a href=\"', $link, '\">', $title, '</a></h4>','&nbsp;<span class=\"prodItemCode\">Code: ', $product->ProductID(), '</span><div class=\"storeShelfAuthor\">', $product->GetAuthorString(), '</div><div class=\"storeShelfPrice\">&pound;', number_format($product->GetPriceWithTax(), 2), '</div>', $this->CartLinkButton($product), '<div class=\"clear\"></div></li>';\n\t\t\t}\n\t\t\techo '</ul></div>';\n\t\t\tif (count($this->products) > 1)\n\t\t\t{\t\n\t\t\t\techo '<script>$(function() { $(\".shelf_slider_wrapper ul\").cycle({ fx: \"scrollHorz\", timeout: 0, next: \".products_next\", prev: \".products_prev\" }); }); </script>';\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "public function screen()\n {\n $poolScreens = json_decode(\\Session::get('poll_screens'));\n \n if (!is_array($poolScreens) || count($poolScreens) < 1) {\n return view('poll.error', ['content' => __('poll.error.generic')]);\n }\n \n $currentScreenId = array_shift($poolScreens);\n \n \\Session::put('poll_screens', json_encode($poolScreens));\n \n $screen = Screen::find($currentScreenId);\n\n $questions = (new Question())->getForScreen($currentScreenId);\n\n $questionAnswers = [];\n foreach ($questions as $question) {\n $className = \"\\\\App\\\\Research\\\\Poll\\\\Question\\\\\" . ucfirst($question->question_type);\n $questionAnswers[$question->id] = new $className($question->id);\n }\n\n return view('poll.screen', compact('questions', 'screen', 'questionAnswers', 'currentScreenId'));\n }", "function showAllProd() {\n \n //set time var\n $curEtime = `/bin/date -u +%s`;\n $curEpochTime = trim($curEtime);\n \n #first, read validProducts.txt into memory.\n $validProd = file(\"./validProducts.txt\");\n \n echo \"<div id='allProd'>\";\n echo \"<div class='SPCProducts'>\";\n \n foreach($validProd as $line) {\n $tline = trim($line);\n $data = explode(\"|\",$tline);\n $prodType = $data[0];\n $prodTime = $data[1];\n $prodTimeYYYY = substr($prodTime,0,4);\n $prodTimeMM = substr($prodTime,4,2);\n $prodTimeDD = substr($prodTime,6,2);\n $prodTimeHHMM = substr($prodTime,8,4);\n $prodEpochTime = $data[2];\n $timeDiff = $curEpochTime - $prodEpochTime;\n $hhDiff = gmdate(\"H\", $timeDiff);\n $mmDiff = gmdate(\"i\", $timeDiff);\n if ($mmDiff < 10) {\n $mmDiff %= 10;\n }\n \n //determine hazard level of the outlooks\n if (($prodType == \"OTLK\" ) || ($prodType == \"OTLK2\" ) || ($prodType == \"OTLK3\" ) || ($prodType == \"OTLK4\" )) { \n $otlkHaz = $data[3];\n $otlkCat = trim($otlkHaz);\n if ($otlkCat == \"High\") { $otlkCatDiv = \"ac-high\"; }\n if ($otlkCat == \"Moderate\") { $otlkCatDiv = \"ac-mod\"; }\n if ($otlkCat == \"Enhanced\") { $otlkCatDiv = \"ac-enh\"; }\n if ($otlkCat == \"Slight\") { $otlkCatDiv = \"ac-slight\"; }\n if ($otlkCat == \"Marginal\") { $otlkCatDiv = \"ac-mrgl\"; }\n if ($otlkCat == \"No Severe\") { $otlkCatDiv = \"ac-nosevere\"; }\n if ($otlkCat == \"No Thunder\") { $otlkCatDiv = \"ac-nothunder\"; }\n if ($otlkCat == \"Severe\") { $otlkCatDiv = \"ac48-severe\"; }\n if ($otlkCat == \"Severe 15%\") { $otlkCatDiv = \"ac48-15p\"; }\n if ($otlkCat == \"Severe 30%\") { $otlkCatDiv = \"ac48-30p\"; }\n if ($otlkCat == \"No Areas\") { $otlkCatDiv = \"ac48-noarea\"; }\n if ($otlkCat == \"30 %\") { $otlkCatDiv = \"ac48-30p\"; }\n if ($otlkCat == \"15 %\") { $otlkCatDiv = \"ac48-15p\"; }\n }\n \n if (($otlkCat == \"Severe 15%\") || ($otlkCat == \"Severe 30%\")) { $otlkCat = \"Severe\"; } \n\n if (($prodType == \"FIRE\" ) || ($prodType == \"FIRE2\" ) || ($prodType == \"FIRE3\" )) {\n $otlkCat = $data[3];\n if ($otlkCat == \"Extreme\") { $otlkCatDiv = \"fw12-extreme\"; }\n if ($otlkCat == \"Critical\") { $otlkCatDiv = \"fw12-critical\"; }\n if ($otlkCat == \"Elevated\") { $otlkCatDiv = \"fw12-seetext\"; }\n if ($otlkCat == \"Iso DryT\") { $otlkCatDiv = \"fw12-seetext\"; }\n if ($otlkCat == \"No Critical\") { $otlkCatDiv = \"fw12-low\"; }\n if ($otlkCat == \"No Areas\") { $otlkCatDiv = \"fw38-noarea\"; }\n }\n \n if (($prodType == \"OTLK\" ) && ($timeDiff < \"3600\" )) { \n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day1otlk.html'><img class='ACbg' id='SWODY1img' src='/products/outlook/day1otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day1otlk.html'>Day 1 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day1otlk.html'><img class='ACsm' id='SWODY1img' src='/products/outlook/day1otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day1otlk.html'>Day 1 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK2\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day2otlk.html'><img class='ACbg' id='SWODY2img' src='/products/outlook/day2otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day2otlk.html'>Day 2 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK2\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day2otlk.html'><img class='ACsm' id='SWODY2img' src='/products/outlook/day2otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day2otlk.html'>Day 2 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK3\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day3otlk.html'><img class='ACbg' id='SWODY3img' src='/products/outlook/day3otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day3otlk.html'>Day 3 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK3\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day3otlk.html'><img class='ACsm' id='SWODY3img' src='/products/outlook/day3otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day3otlk.html'>Day 3 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK4\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/day4-8/'><img class='ACbg' id='SWODY48img' src='/products/exper/day4-8/day48prob_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/day4-8/'>Day 4-8 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td align='left' class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"OTLK4\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/day4-8/'><img class='ACsm' id='SWODY48img' src='/products/exper/day4-8/day48prob_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/day4-8/'>Day 4-8 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"ENH\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/enhtstm/'><img class='ACbg' id='ENHimg' src='/products/exper/enhtstm/enh_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/enhtstm/'>Thunderstorm Outlook</a></td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"ENH\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/enhtstm/'><img class='ACsm' id='ENHimg' src='/products/exper/enhtstm/enh_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/enhtstm/'>Thunderstorm Outlook</a></td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table>\";\n echo \"</tr></table></li></ul>\";\n }\t\n \n if (($prodType == \"FIRE\" ) && ($timeDiff < \"3600\" )) { \n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/fire_wx/fwdy1.html'><img class='ACbg' id='FIRE1img' src='/products/fire_wx/day1fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/fire_wx/fwdy1.html'>Day 1 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td align='left' class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"FIRE\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/fire_wx/fwdy1.html'><img class='ACsm' id='FIRE1img' src='/products/fire_wx/day1fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/fire_wx/fwdy1.html'>Day 1 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"FIRE2\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/fire_wx/fwdy2.html'><img class='ACbg' id='FIRE2img' src='/products/fire_wx/day2fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/fire_wx/fwdy2.html'>Day 2 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td align='left' class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"FIRE2\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/fire_wx/fwdy2.html'><img class='ACsm' id='FIRE2img' src='/products/fire_wx/day2fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/fire_wx/fwdy2.html'>Day 2 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n \n if (($prodType == \"FIRE3\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/fire_wx/'><img class='ACbg' id='FIRE38img' src='/products/exper/fire_wx/day3-8fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/fire_wx/'>Day 3-8 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td align='left' class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\"; \n }\n \n if (($prodType == \"FIRE3\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/fire_wx/'><img class='ACsm' id='FIRE38img' src='/products/exper/fire_wx/day3-8fireotlk_sm.png'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/fire_wx/'>Day 3-8 Fire Weather Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\"; \n }\n \n //Check for WWs\t\n// WW0283|201306061445|1370529900|FL GA AM GM CW|TORNADO|06 07 2013 0200|NORMAL|TROPICAL STORM|ANDREA\n $strCheck = substr($prodType,0,2);\n if ($strCheck == \"WW\") {\n $ww = substr($prodType,0,2);\n $wwNum = substr($prodType,2,4);\n if (($wwNum != \"none\") && ($timeDiff <= \"3600\")) {\n $wwType = $data[4];\n $wwArea = $data[3];\n $wwExpire = $data[5];\n $wwEnh = $data[6];\n $wwTCType = $data[7];\n $wwTCName = $data[8];\n $wwExpireMM = substr($wwExpire,0,2);\n $wwExpireDD = substr($wwExpire,3,2);\n $wwExpireYYYY = substr($wwExpire,6,4);\n $wwExpireHHMM = substr($wwExpire,11,4);\n $wwEnd = $wwExpireMM . \"/\" . $wwExpireDD . \"/\" . $wwExpireYYYY . \" \" . $wwExpireHHMM . \"Z\";\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td><a href='/products/watch/ww${wwNum}.html'><img class='WWbg' src='/products/watch/ww${wwNum}_thumb.gif'></a></td>\";\n echo \"<td valign='top'><a href='/products/watch/ww${wwNum}.html'>${wwType} ${wwNum}</a><br>\";\n echo \"&ndash; Valid until: ${wwEnd}<br>\";\n echo \"&ndash; States affected: ${wwArea}<br>\";\n if ($wwEnh == \"PDS\") { echo \"&ndash; <font color='#ff0000'><strong>Particularly Dangerous Situation</strong></font><br>\"; }\n if ($wwTCType != \"TCnone\") { echo \"&ndash; <font color='#ff0000'><strong>$wwTCType $wwTCName Related Watch</strong></font><br />\";}\n if ($mmDiff > 1) {\n echo \"&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font>\";\n } else {\n echo \"&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font>\";\n }\n echo \"</td></tr></table></li></ul>\";\n } else if (($wwNum != \"none\") && ($timeDiff > \"3600\")) {\n $wwType = $data[4];\n $wwArea = $data[3];\n $wwExpire = $data[5];\n $wwEnh = $data[6];\n $wwTCType = $data[7];\n $wwTCName = $data[8];\n $wwExpireMM = substr($wwExpire,0,2);\n $wwExpireDD = substr($wwExpire,3,2);\n $wwExpireYYYY = substr($wwExpire,6,4);\n $wwExpireHHMM = substr($wwExpire,11,4);\n $wwEnd = $wwExpireMM . \"/\" . $wwExpireDD . \"/\" . $wwExpireYYYY . \" \" . $wwExpireHHMM . \"Z\";\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td><a href='/products/watch/ww${wwNum}.html'><img class='WWsm' src='/products/watch/ww${wwNum}_thumb.gif'></a></td>\";\n echo \"<td valign='top'><a href='/products/watch/ww${wwNum}.html'>${wwType} ${wwNum}</a><br>\";\n echo \"&ndash; Valid until: ${wwEnd}<br>\";\n echo \"&ndash; States affected: ${wwArea}<br>\";\n if ($wwEnh == \"PDS\") { echo \"&ndash; <font color='#ff0000'><strong>Particularly Dangerous Situation</strong></font><br>\"; }\n if ($wwTCType != \"TCnone\") { echo \"&ndash; <font color='#ff0000'><strong>$wwTCType $wwTCName Related Watch</strong></font><br />\";}\n echo \"&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr>\";\n echo \"</td></tr></table></li></ul>\";\n }\n }\n \n //Check for MDs\n $strCheck = substr($prodType,0,3);\n if ($strCheck == \"MCD\") {\n $mcd = $strCheck;\n $mdNum = substr($prodType,3,4);\n if (($mdNum != \"none\") && ($timeDiff <= \"3600\")) {\n $mdArea = $data[3];\n $mdConc = $data[4];\n $mdProb = $data[5];\n $mdTCType = $data[6];\n $mdTCName = $data[7];\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td><a href='/products/md/md${mdNum}.html'><img class='MDbg' src='/products/md/mcd${mdNum}_thumb.gif'></a></td>\";\n echo \"<td valign='top'><a href='/products/md/md${mdNum}.html'>Mesoscale Discussion ${mdNum}</a><br>\";\n echo \"&ndash; Concerning: ${mdConc}<br>\";\n if ($mdTCType != \"TCnone\") { echo \"&ndash; <font color='#ff0000'><strong>$mdTCType $mdTCName Related MD</strong></font><br />\";}\n if ($mmDiff > 1) {\n echo \"&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font>\";\n } else {\n echo \"&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font>\";\n }\n echo \"</td></tr></table></li></ul>\";\n } else if (($mdNum != \"none\") && ($timeDiff > \"3600\")) {\n $mdArea = $data[3];\n $mdConc = $data[4];\n $mdProb = $data[5];\n $mdTCType = $data[6];\n $mdTCName = $data[7];\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td><a href='/products/md/md${mdNum}.html'><img class='MDsm' src='/products/md/mcd${mdNum}_thumb.gif'></a></td>\";\n echo \"<td valign='top'><a href='/products/md/md${mdNum}.html'>Mesoscale Discussion ${mdNum}</a><br>\";\n echo \"&ndash; Concerning: ${mdConc}<br>\";\n if ($mdTCType != \"TCnone\") { echo \"&ndash; <font color='#ff0000'><strong>$mdTCType $mdTCName Related MD</strong></font><br />\";}\n echo \"&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr>\";\n echo \"</td></tr></table></li></ul>\";\n }\n }\n }\n echo \"</div>\";\n echo \"</div>\";\n}", "function sendit_woocommerce_screen()\n{ ?>\n\t<div class=\"wrap\">\n\n\t<h2><?php echo __('To import your Woocommerce customer into Sendit you need to buy Sendit pro Woocommerce importer','sendit');?></h2>\n\t\t<p><?php echo __('With Sendit pro Woocommerce importer (available now for only 5 euros) you will be able to import your Woocommerce customers and orders and build mailing lists. Sendit can also send products post_type with thumbnails!','sendit'); ?></p>\n\t\t\t<div class=\"sendit_box_woocommerce sendit_box_menu\"><h2><?php __('Woocommerce user?', 'sendit'); ?></h2>\n\t\t \t<a href=\"http://sendit.wordpressplanet.org/plugin-shop/wordpress-plugin/sendit-pro-csv-list-exporter\" class=\"button-primary\"><?php echo __('Import your customer into Sendit', 'sendit'); ?></a>\n\t\t </div>\t\n\t</div>\n<?php }", "function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "abstract function display();", "abstract function display();", "function display_essay(){\n\t\n\t\t$dbc = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME)or die('Database Error 2!');\n\t\t$query0=$query = \"select distinct es.essay_name ename, ss.service_type_id stypeid, es.essay_id eid, ss.service_selection_id ssid, ss.service_status ssstatus \".\n\t\t\t\t\" from essay es, service_selection ss where ss.essay_id = es.essay_id and service_status = 'assigned' and ss.uid = \".$_SESSION['user_id'].\"\";\n\t\t$data0 = mysqli_query($dbc,$query0)or die(mysqli_error());\n\t\t// the list of essays\n\t\t$count=1;\n\t\twhile($row0 = mysqli_fetch_array($data0)){\n\t\t $eid = $row0['eid'];\n\t\t\n\t\t\t$query1=\"select version_id, submited_essay_name, scomment, submit_date, edited_essay_name, edit_date, ecomment from essay_change_history ech where \".\n \" ech.essay_id = \".$eid.\" order by ech.submit_date\"; \n\t\t\n\t\t\t$data1 = mysqli_query($dbc,$query1)or die(mysqli_error());\n\n\t\t\t$num1 = mysqli_num_rows($data1);\n\t\t\t\n\t\t\tif($num1!=0){\n ?>\n <div id=\"current2\">\n\t\t\t\t <div id=\"current4\">\n\t\t\t\t\t<h2 class=\"hname1\"><strong><?php echo $count. '.'; ?> Essay Name: &nbsp;</strong><?php echo $row0['ename'];?></h2>\n\t\t\t\t\t<h2 class=\"hname1\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Service Package:</strong><?php if ($row0['stypeid'] == 1) echo ' Basic'; else echo ' Comprehensive'; ?></h2> \n\t\t\t\t <div id=\"Curtable2\">\n\t\t\t\t <table width=\"650\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#999999\" id=\"showlink\"> \n\t\t\t\t <tr> \n\t\t\t\t <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Version</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Submitted Essay </strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\" nowrap><strong>Date Submitted</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Student Comment</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Edited Essay</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\" nowrap><strong>Edited Date</strong></td>\n <td align=\"center\" valign=\"middle\" bgcolor=\"#CCCCCC\" class=\"hname9\"><strong>Editor Comment</strong></td>\n\t\t\t\t </tr> \n\t\t\t<?php\n\t\t\t // the change history of an essay\n\t\t\t\twhile($row1 = mysqli_fetch_array($data1)){\n\t\t\t\t $_SESSION['versionid'] = $row1[\"version_id\"];\n\t\t\t\t if (empty($row1['edited_essay_name']))\n\t\t\t\t\t$_SESSION['action'] = 'update';\n\t\t\t\t else\n\t\t\t\t\t$_SESSION['action'] = 'insert';\n\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"version_id\"];?></td> \n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><a style=\"color:black\" href=\"download.php?versionid=<?php echo $row1[\"version_id\"]; ?>&essayid=<?php echo $eid; ?>&se=s\"><?php echo $row1[\"submited_essay_name\"]; ?></a></td>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"submit_date\"];?></td> \n\t\t\t\t<!--\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"scomment\"];?></td> \n\t\t\t\t-->\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\">\n\t\t\t\t<?php \n\t\t\t\t\t\tif (!empty($row1[\"scomment\"])) { \n\t\t\t\t\t\t echo '<input type=\"button\" onclick=\"show_alert(\\'' . $row1['scomment'] .'\\')\" value=\"See comments\" />';\n\t\t\t\t\t\t}\n\t\t\t\t ?>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><a style=\"color:black\" href=\"download.php?versionid=<?php echo $row1[\"version_id\"]; ?>&essayid=<?php echo $eid; ?>&se=e\"><?php echo $row1[\"edited_essay_name\"]; ?></a></td> \n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"edit_date\"];?></td> \n\t\t\t\t<!--\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\"><?php echo $row1[\"ecomment\"];?></td>\n\t\t\t\t-->\n\t\t\t\t<td align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\">\n\t\t\t\t<?php \n\t\t\t\t\t\tif (!empty($row1[\"ecomment\"])) { \n\t\t\t\t\t\t echo '<input type=\"button\" onclick=\"show_alert(\\'' . $row1['ecomment'] .'\\')\" value=\"See comments\" />';\n\t\t\t\t\t\t}\n\t\t\t\t ?>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t <?php\n\t\t\t\t }\n\t\t\t\t ?>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t</div>\n <div id=\"current5\">\n\t\t\t\t<div id=\"browseaera3\">\n\t\t\t\t<p class=\"hname8\" >Upload Revised Essay </p>\n <div id=\"browseaera2\">\n\t\t\t\t\t<form name=\"smform\" enctype=\"multipart/form-data\" method=\"post\" action=\"uploadfile.php\">\n\t\t\t\t\t<!-- post version ID and essay ID so a file can be inserted into a essay -->\n\t\t\t\t\t<input type=\"hidden\" name=\"essayid\" value=\"<?php echo $eid; ?>\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"versionid\" value=\"<?php if ($_SESSION['action'] == 'update') { echo $_SESSION['versionid']; } else { echo ++$_SESSION['versionid']; } ?>\" />\n\t\t\t\t\t<input name=\"uploadfile\" type=\"file\" class=\"text1\" id=\"uploadessay\" />\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <div id=\"inputaera\">\n\t\t\t\t<p class=\"hname8\">Comments (Anything in particular you want the editor to look at in your essay)</p>\n\t\t\t\t<p class=\"aeraborder2\">\n\t\t\t\t\t<textarea class=\"area\" name=\"comments\" id=\"textarea4\" cols=\"45\" rows=\"5\"></textarea> \n\t\t\t\t</p>\n\t\t\t\t</div>\t\t\t\t\n <div id=\"save\"><input type=\"image\" alt=\"submit\" name=\"save\" src=\"images/save01.gif\" width=\"60\" height=\"24\" /></div>\n\t\t\t </form>\n\t\t\t </div>\n\t\t </div>\n\t<?php\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"Sorry no essay\";\n\t\t\t}\n\t\t\t++$count;\n\t\t}\t\n\t\tif ($count == 1) {\n\t\t\t echo '<h2 class=\"hname4\">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;No essay is needed for you to revise at this moment. </h2>';\n\t\t}\n\t\tmysqli_close($dbc);\n\t\t\n\t}", "function fgallery_screen_settings($current, $screen){\n if ( $screen->id == '1-flash-gallery_page_fgallery_images' && !isset($_GET['action'])){\n $current = '<h5>'._x('Show on screen', 'Screen Options').'</h5>';\n $current .= fgallery_screen_options($screen);\n $current .= '<div>'. wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', true ).'</div>';\n } elseif ($screen->id == 'toplevel_page_fgallery' && !isset($_GET['action'])){\n $current = '<h5>'._x('Show on screen', 'Screen Options').'</h5>';\n $current .= fgallery_screen_options($screen);\n $current .= '<div>'. wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', true ).'</div>';\n }\n return $current;\n}", "function bpfit_weight_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_weight_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_weight_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "function display()\n{\n $obPage = new PageDisplay(\"CST Auction\");\n $obPage->pageHead();\n $obPage->nav(isset($_SESSION[\"user\"]));\n\n $obPage->mainBody(\"<div id='homePagePic' \"\n . \"class='col-lg-offset-3 col-lg-12 \"\n .\"col-md-offset-3 col-md-12 \"\n .\"col-xs-offset-1 col-xs-12 \"\n . \"col-sm-offset-1 col-sm-12' >\"\n . \"<img src='images/homepg.jpg' alt='home page image'/></div>\");\n echo $obPage->displayPage();\n}", "function viewProducts($arr)\n\t{\n\t\t\n\t\t$output='<div style=\"width:466px;\">\n\t\t\t<div class=\"resultBOX\" style=\"width:465px;\">\n\t\t\t<div class=\"resultTOP\">';\n\t\t\t\n\t\t$cnt=count($arr);\n\t\t$output.='<div class=\"resultTOPTXT\">'.$cnt.' Item(s) Found</div></div>';\n\t\tif($cnt > 0)\n\t\t{\n\t\t\tfor($i=0;$i<$cnt;$i++)\n\t\t\t{\n\t\t\t\t$imgPath=$arr[$i]['thumb_image']; \n\t\t\t\tif(!file_exists($imgPath))\n\t\t\t\t\t$imgPath='images/noimage.jpg';\n\n\t\t\t\t$proDesc=$arr[$i]['description'];\n\t\t\t\tif(strlen($proDesc) > 20 )\n\t\t\t\t\t$proDesc=substr($proDesc,0,20).'...';\t\t\t\t\t\n\t\t\t\t\n\t\t\t$class = ($i<$cnt-1) ? 'resultITEM linebg' : 'resultITEM';\n\t\t\t\n\t\t\t$output.='<div class=\"'.$class.'\" style=\"width:455px;\">\t\t\t\t\t\n\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n\t\t\t<tr>\n\t\t\t<td class=\"resultIMG\" width=\"13%\"><a href=\"'.$_SESSION['base_url'].'/index.php?do=prodetail&action=showprod&prodid='.$arr[$i]['product_id'].'\"><img src=\"'.$_SESSION['base_url'].'/'.$imgPath.'\" alt=\"'.addslashes($arr[$i]['title']).'\" width=\"60\" border=0 title=\"'.addslashes($arr[$i]['title']).'\" /></a>\n\t\t\t\t</td>\n\t\t\t<td valign=\"top\" class=\"resultDETAILS\" width=\"35%\"><a href=\"'.$_SESSION['base_url'].'/index.php?do=prodetail&action=showprod&prodid='.$arr[$i]['product_id'].'\">'.$arr[$i]['title'].'</a><br />\n\t\t\t<span>'.$proDesc.'</span> \n\t\t\t</td>\n\t\t\t<td valign=\"top\" class=\"resultPRICE\" width=\"25%\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].number_format($arr[$i]['msrp']*$_SESSION['currencysetting']['selected_currency_settings']['conversion_rate'],2).'\n\t\t\t</td>\n\t\t\t<td width=\"23%\" valign=top> \n\t\t\t<form name=\"addtocart\" id=\"addtocart\" action=\"?do=addtocart&prodid='.$arr[$i]['product_id'].'\" method=\"post\" >\n\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"featureBUTTON\" style=\"padding-top: 1px\">\t\t \n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\" class=\"button_left\" style=\"padding-top:2px\" ></td>\n\t\t\t\t\t<td valign=top><input type=\"submit\" value=\"Add to Cart\" class=\"button\" /></td>\n\t\t\t\t\t<td class=\"button_right\"></td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t\n\t\t\t<form name=\"addtowishlist\" id=\"addtowishlist\" action=\"'.$_SESSION['base_url'].'/index.php?do=wishlist&action=viewwishlist&prodid='.$arr[$i]['product_id'].'\" method=\"post\">\n\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"featureBUTTON\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align=\"right\" class=\"button_left\" ></td>\n\t\t\t\t\t\t<td valign=top><input type=\"submit\" value=\"Add to Wishlist\" class=\"button\" /></td>\n\t\t\t\t\t\t<td class=\"button_right\" ></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t</form>\n\t\t\t<form name=\"addtocompare\" id=\"addtocompare\" action=\"'.$_SESSION['base_url'].'/index.php?do=compareproduct&action=addtocompareproduct&prodid='.$arr[$i]['product_id'].'\" method=\"post\" >\n\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"featureBUTTON\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align=\"right\" class=\"button_left\" ></td>\n\t\t\t\t\t\t<td valign=top><input type=\"submit\" value=\"Add to Compare\" class=\"button\" /></td>\n\t\t\t\t\t\t<td class=\"button_right\" ></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t</form>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</div>';\n\t\t\t\n\t\t\t}\n\t\t\t$output.='</div><div>\n\t\t\t<div class=\"pagination\" style=\"line-height:20px;\"><span class=\"disabled\"><!--<img src=\"css/default/images/arrow1.gif\" alt=\"arrow\" /><span class=\"current\">1</span></span><a href=\"#\">2</a><a href=\"#\">3</a><a href=\"#\">4</a><a href=\"#\">5</a><a href=\"#\">6</a><a href=\"#\">7</a>&#8230;<a href=\"#\">199</a><a href=\"#\">200</a><a href=\"#\" style=\"margin-right:none; color:#a81f1f\"><img src=\"css/default/images/arrow2.gif\" alt=\"arrow\" border=\"0\" /></a>--></div>\n\t\t\t</div>\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "function watsnew(){\n\t\t$query = mysqli_query($conn,\"SELECT * FROM products WHERE status = 0 ORDER BY productid DESC LIMIT 0,1\") or die (mysqli_error());\n\t\twhile($row = mysqli_fetch_array($query)){\n\t\techo \n\t\t\t'<div class=\"border_box\">\n\t\t\t\t<div class=\"product_title\"><a href=\"details.php?id='.$row['productid'].'\">'.$row['prodname'].'</a></div>\n\t\t\t\t<div class=\"product_img\"><img src=\"administrator/images/products/'.$row['prodimage'].'\" width=\"94\" height=\"92\" alt=\"\" border=\"0\" /></div>\n\t\t\t\t<div class=\"prod_price\"></div>\n\t\t\t</div>';\n\t\t}\n\t}", "public function show(Size $size)\n {\n //\n }", "public function limitedproductCard(){\n $table = \"products\";\n $results = $this->getThreerecords($table);\n foreach($results as $sbtable){\n \n echo(' <div class=\"d-block d-md-flex listing\">'.\n '<a href=\"listings-single.html\" class=\"img d-block\" style=\"background-image: url('.$sbtable[\"product_mainimg\"].')\"></a>'.\n '<div class=\"lh-content\">'.\n '<a href=\"#\" class=\"bookmark\"><span class=\"icon-heart\"></span></a>'.\n '<h3><a href=\"http://localhost/drive/listings-single.php?pvid='.$sbtable[\"product_id\"].'\">'.$sbtable[\"product_title\"].'</a></h3>'.\n '<address>'.$sbtable[\"post_time\"].'</address>'.\n '<p class=\"mb-0\">'.\n '<span class=\"review\">$'.$sbtable[\"product_price\"].'.00</span>'.\n '</p>'.\n '</div>'.\n '</div>');\n }\n}", "public function matrix()\n {\n echo \"在Linux下通过,Matrix,展示>>{$this->imgFile->play()}<<\";\n }", "function show_tire()\n{\n global $con;\n $get_pro = \"SELECT g.id_guma , g.id_marka, g.slika, g.cena, g.sirina, g.visina, g.opterecenje, g.precnik, g.indeks_brzine, id_sezona, m.marka from gume g \n JOIN marka m ON g.id_marka = m.id_marka \";\n /*JOIN product_size ps ON s.size_id = ps.size_id*/\n\n\n $run_pro = mysqli_query($con, $get_pro);\n\n while ($row_pro = mysqli_fetch_array($run_pro)) {\n $id_guma = $row_pro ['id_guma'];\n $tire_brand = $row_pro ['marka'];\n $product_image = $row_pro ['slika'];\n $cena = $row_pro ['cena'];\n $sirina= $row_pro ['sirina'];\n $visina = $row_pro ['visina'];\n $opterecenje = $row_pro ['opterecenje'];\n $precnik = $row_pro ['precnik'];\n $indeks_brzine = $row_pro ['indeks_brzine'];\n $tire_season = $row_pro ['id_sezona'];\n\n\n\n\n echo \"\n <div class='col-xs-12 col-sm-4 col-md-4 products mr-0' style='padding: 60px;height:400px;border: 1px solid lightgrey'><br /><span> \n <img src='http://localhost/ProdajaGuma/product_images/$product_image' class='img-responsive'/></span> \n <h2 class='top-left' style='background-color: aqua;color:white;position: absolute;top:20px;left: 0px;width: 150px;font-size: 15px'>&nbsp SEZONA &nbsp<span style='color:blue'>\n <img src='http://localhost/ProdajaGuma/ikonice/snow.ico' width='35px' ></span></span></h2><br /><br /><span></span> \n <div style='background-color: white;position: relative;top: -130px'><hr style='border: 1px solid #31708f'></span><span>$tire_brand $visina/$sirina $precnik $tire_season $opterecenje $indeks_brzine</span><br /><br /><span style='color: #428bca'>Cena: $cena</span><br/>\n <span><br /><a href='details.php?id_guma=$id_guma'><button class='btn btn-primary btn-responsive' style='background-color:green;margin: auto;display: block; width: 150px;height: 40px; color: white;'>Detaljnije...</button></a>\n </span></div></div>\n \";\n\n }\n\n\n}", "public abstract function display();", "public function displayGridlines() {\n\t}", "public function settings_screen () {\n \n $this->ui->get_header();\n\n $screen = $this->ui->get_current_screen();\n\n switch ( $screen ) {\n //** Products screen. */\n case 'more_products':\n $this->more_products = $this->get_more_products();\n require_once( $this->screens_path . 'screen-more.php' );\n break;\n //** Licenses screen. */\n case 'licenses':\n default:\n $this->ensure_keys_are_actually_active();\n $this->installed_products = $this->get_detected_products();\n $this->pending_products = $this->get_pending_products();\n require_once( $this->screens_path . 'screen-manage-' . $this->type . '.php' );\n break;\n }\n\n $this->ui->get_footer();\n }", "public function geoCart_previewDisplay($sell_type = null)\n {\n return parent::geoCart_previewDisplay(2);\n }", "public function display($set = true)\n {\n print $this->get_display_template($set);\n }", "function wcfm_view_manage_posts() {\n\t\tglobal $WCFM, $typenow;\n\n\t\tif ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_orders_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t} elseif ( 'product' == $typenow ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_products_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t} elseif ( 'shop_coupon' == $typenow ) {\n\t\t\techo '<a style=\"float: right;\" href=\"' . get_wcfm_coupons_url() . '\"><img src=\"' . $WCFM->plugin_url . '/assets/images/wcfm-30x30.png\" alt=\"' . __( 'WCFM Home', 'wc-frontend-manager' ) . '\" /></a>';\n\t\t}\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "function ecome_shop_display_mode_tmp() {\r\n\t\t$shop_display_mode = Ecome_Functions::ecome_get_option( 'shop_display_mode', 'grid' );\r\n\t\t$current_url = home_url( add_query_arg( null, null ) );\r\n\t\t?>\r\n <div class=\"grid-view-mode\">\r\n <form method=\"POST\" action=\"\">\r\n <button type=\"submit\"\r\n data-toggle=\"tooltip\"\r\n data-placement=\"top\"\r\n title=\"<?php echo esc_attr( 'Shop Grid v.1' ); ?>\"\r\n class=\"modes-mode mode-grid display-mode <?php if ( $shop_display_mode == 'grid' ): ?>active<?php endif; ?>\"\r\n value=\"<?php echo esc_attr( $current_url ); ?>\"\r\n name=\"display_mode_action\">\r\n <span class=\"button-inner\">\r\n <?php echo esc_html__( 'Grid', 'ecome' ); ?>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </span>\r\n </button>\r\n <input type=\"hidden\" value=\"grid\" name=\"display_mode_value\">\r\n </form>\r\n <form method=\"POST\" action=\"<?php echo esc_attr( $current_url ); ?>\">\r\n <button type=\"submit\"\r\n data-toggle=\"tooltip\"\r\n data-placement=\"top\"\r\n title=\"<?php echo esc_attr( 'Shop Grid v.2' ); ?>\"\r\n class=\"modes-mode mode-grid-v2 display-mode <?php if ( $shop_display_mode == 'grid-v2' ): ?>active<?php endif; ?>\"\r\n value=\"<?php echo esc_attr( $current_url ); ?>\"\r\n name=\"display_mode_action\">\r\n <span class=\"button-inner\">\r\n <?php echo esc_html__( 'Grid v2', 'ecome' ); ?>\r\n <span></span>\r\n <span></span>\r\n </span>\r\n </button>\r\n <input type=\"hidden\" value=\"grid-v2\" name=\"display_mode_value\">\r\n </form>\r\n <form method=\"POST\" action=\"<?php echo esc_attr( $current_url ); ?>\">\r\n <button type=\"submit\"\r\n data-toggle=\"tooltip\"\r\n data-placement=\"top\"\r\n title=\"<?php echo esc_attr( 'Shop List Mode' ); ?>\"\r\n class=\"modes-mode mode-list display-mode <?php if ( $shop_display_mode == 'list' ): ?>active<?php endif; ?>\"\r\n value=\"<?php echo esc_attr( $current_url ); ?>\"\r\n name=\"display_mode_action\">\r\n <span class=\"button-inner\">\r\n <?php echo esc_html__( 'List', 'ecome' ); ?>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </span>\r\n </button>\r\n <input type=\"hidden\" value=\"list\" name=\"display_mode_value\">\r\n </form>\r\n </div>\r\n\t\t<?php\r\n\t}", "function my_magic_cards_grid_setup() {\r\n\r\n\r\n}", "function double_display($sql){\r\n\t$conn=mysqli_connect(\"localhost\",\"root\",\"alaa\",\"registration_database\");\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\r\n\t\t}\r\n\t\t$result = $conn->query($sql);\r\n\t\t\r\n\t\tif ($result->num_rows > 0) {\r\n\t\t//\techo \"<table class='items'>\";\r\n\t\t\r\n\t\t\techo ' \r\n\t\t\t\t <div class=\"container\">\r\n\t\t\t\t \r\n\t\t\t\t <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\r\n\t\t\t\t <p><strong>Exchange</strong></p>\r\n\t\t\t\t \r\n\t\t\t\t <div class=\"panel panel-default\">\r\n\t\t\t\t \r\n\t\t\t\t ';\r\n\t\t\t\t \r\n\t\t\t// output data of each row\r\n\r\n\t\t\twhile($row = $result->fetch_assoc()) {\r\n\t\t\t// retieving the data of the logged in user\r\n\t\t\t$requested_data=(\"SELECT `ads`.id,image,date,title,name,Interestitem,detail FROM `ads` WHERE `ads`.id=\".$row[\"requested_item\"].\"\");\r\n\t\t\t\r\n\t\t\t$q = mysqli_query($conn,$requested_data);\r\n\t\t\t$r_data = mysqli_fetch_assoc($q);\r\n\t\t\t// retrieving the data of the other user\r\n\t\t\t$logged_data=(\"SELECT `ads`.id,image,date,title,name,Interestitem,detail FROM `ads` WHERE `ads`.id=\".$row[\"chosen_item\"].\"\");\r\n\t\t\t\r\n\t\t\t$q2 = mysqli_query($conn,$logged_data);\r\n\t\t\t$l_data = mysqli_fetch_assoc($q2);\r\n\t\t\t\r\n\t\t\t\techo\t' <div class=\"panel-body\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-12 col-sm-8 col-md-4 col-lg-3 text-left\">\r\n\t\t\t\t\t\t<h4>Your Item: </h4>\r\n\t\t\t\t\t\t<img src='.$r_data[\"image\"].' style=\"height:300px; width:90%;\">\r\n\t\t\t\t\t\t<h4>'.$r_data[\"title\"].'</h4>\r\n\t\t\t\t\t\t<h4>Username: '.$row[\"requested_user\"].'</h4> <h4>Name: '.$r_data[\"name\"].'</h4>\r\n <h4>Item for exchange: '.$r_data[\"Interestitem\"].'<h4>\r\n \r\n <p>Details: '.$r_data[\"detail\"].'</p>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-1-hidden col-sm-1 col-md-1 col-lg-1 text-center\">\r\n\t\t\t\t\t\t\t<img src=Drawing1-Model2.png style=\"height:300px; width:250px; position:absolute;top:40px;\">\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"col-xs-12 col-sm-12 col-md-4 col-lg-4 pull-right\">\r\n\t\t\t\t\t\t\t\t<h4>Traders Item: </h4>\r\n\t\t\t\t\t\t\t\t<img src='.$l_data[\"image\"].' style=\"height:300px; width:90%;\">\r\n\t\t\t\t\t\t\t\t<h4>'.$l_data[\"title\"].'</h4>\r\n\t\t\t\t\t\t\t\t<h4>Username: '.$row[\"choosing_user\"].'</h4> <h4>Name: '.$l_data[\"name\"].'</h4>\r\n\t\t\t\t\t\t\t\t<h4>Item for exchange: '.$l_data[\"Interestitem\"].'<h4>\r\n\r\n\t\t\t\t\t\t\t\t<p>Details: '.$l_data[\"detail\"].'</p>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</div>\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<hr>';\t\t\t\t\t\r\n\r\n\t\t}\r\n\t\techo '</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\t</div>';\r\n\t\t\r\n\t\t$conn->close();\r\n\r\n\t\t\r\n\t\t}}", "function\n\tGalleryStandardDisplay()\n\t{\n $phyType = new Field;\n $phyType->ColName = 'PhyType_tab';\n\n $phyHeight = new Field;\n $phyHeight->ColName = 'PhyHeight_tab';\n\n $phyWidth = new Field;\n $phyWidth->ColName = 'PhyWidth_tab';\n\n $phyDepth = new Field;\n $phyDepth->ColName = 'PhyDepth_tab';\n\n $phyDiameter = new Field;\n $phyDiameter->ColName = 'PhyDiameter_tab';\n\n $phyDimUnits = new Field;\n $phyDimUnits->ColName = 'PhyUnitLength_tab';\n\n $phyWeight = new Field;\n $phyWeight->ColName = 'PhyWeight_tab';\n\n $phyDimWeight = new Field;\n $phyDimWeight->ColName = 'PhyUnitWeight_tab';\n\n $sizeTable = new Table;\n $sizeTable->Name = 'Dimensions';\n $sizeTable->Headings = array('Height', 'Width', 'Depth', 'Diam', 'Unit', 'Type');\n $sizeTable->Columns = array($phyHeight, $phyWidth, $phyDepth, $phyDiameter, $phyDimUnits, $phyType);\n\n\t\t$narratives = new BackReferenceField;\n\t\t$narratives->RefDatabase = \"eevents\";\n\t\t$narratives->RefField = \"ObjAttachedObjectsRef_tab\";\n\t\t$narratives->ColName = \"SummaryData\";\n\t\t$narratives->Label = \"Events\";\n\t\t$narratives->LinksTo = $GLOBALS['DEFAULT_EXHIBITION_PAGE'];\n\n\t\t$creRole = new Field;\n\t\t$creRole->ColName = 'CreRole_tab';\n\t\t$creRole->Italics = 1;\n\t\t\n\t\t$creCreatorRef = new Field;\n\t\t$creCreatorRef->ColName = 'CreCreatorRef_tab->eparties->SummaryData';\n\t\t$creCreatorRef->LinksTo = $GLOBALS['DEFAULT_PARTY_DISPLAY_PAGE'];\n\t\t\n\t\t$creatorTable = new Table;\n\t\t$creatorTable->Name = \"CreCreatorRef_tab\";\n\t\t$creatorTable->Columns = array($creCreatorRef, $creRole);\n\n\t\t$this->Fields = array(\n 'TitMainTitle',\n 'TitAccessionNo',\n\t\t\t\t$creatorTable,\n 'TitMainTitle',\n 'CreDateCreated',\n 'PhyMediaCategory',\n 'PhyMedium',\n\t\t\t\t$sizeTable,\n\n\t\t\t\t'CrePrimaryInscriptions',\n\t\t\t\t'CreSecondaryInscriptions',\n 'AccCreditLineLocal',\n 'LocCurrentLocationRef->elocations->SummaryData',\n\n\t\t\t\t//'TitAccessionNo',\n\t\t\t\t//'TitMainTitle',\n\t\t\t\t//'TitAccessionDate',\n\t\t\t\t//'TitCollectionTitle',\n\t\t\t\t//'CreDateCreated',\n\t\t\t\t//'TitTitleNotes',\n\t\t\t\t//'CreCountry_tab',\n\t\t\t\t//'PhyMedium',\n\t\t\t\t//'PhyTechnique',\n\t\t\t\t//'PhySupport',\n\t\t\t\t//'PhyMediaCategory',\n\t\t\t\t//'LocCurrentLocationRef->elocations->SummaryData',\n\t\t\t\t//'NotNotes',\n\t\t\t\t//'MulMultiMediaRef:1->emultimedia->MulIdentifier',\n\t\t\t\t//'AssRelatedObjectsRef_tab->ecatalogue->SummaryData',\n\t\t\t\t//$AssRef,\n\t\t\t\t);\n\t\t\n\t\t$this->BaseStandardDisplay();\n\t}", "public function listDisplayElements();", "public function display(){}", "function emc_sharing_display() {\r\n\r\n\tif ( class_exists( 'Jetpack', false ) ) {\r\n\t\t$jetpack_active_modules = get_option('jetpack_active_modules');\r\n\t\tif ( $jetpack_active_modules && in_array( 'sharedaddy', $jetpack_active_modules ) ) {\r\n\t\t\techo sharing_display();\r\n\t\t\t?>\r\n\t\t\t<!--<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:</h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow\" class=\"share-facebook sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=facebook\" title=\"Share on Facebook\" id=\"sharing-facebook-6199\"><span>Facebook</span></a></li><li class=\"share-twitter\"><a rel=\"nofollow\" class=\"share-twitter sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=twitter\" title=\"Click to share on Twitter\" id=\"sharing-twitter-6199\"><span>Twitter</span></a></li><li class=\"share-pinterest\"><a rel=\"nofollow\" class=\"share-pinterest sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=pinterest\" title=\"Click to share on Pinterest\"><span>Pinterest</span></a></li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" class=\"share-google-plus-1 sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=google-plus-1\" title=\"Click to share on Google+\" id=\"sharing-google-6199\"><span>Google +1</span></a></li><li class=\"share-email\"><a rel=\"nofollow\" class=\"share-email sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=email\" title=\"Click to email this to a friend\"><span>Email</span></a></li><li class=\"share-print\"><a rel=\"nofollow\" class=\"share-print sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/#print\" title=\"Click to print\"><span>Print</span></a></li><li class=\"share-end\"></li></ul></div></div></div>-->\r\n\t\t\t<?php\r\n\t\t}\r\n\t}\r\n\r\n}", "public function StoreSideMenuBestSellers()\n\t{\tob_start();\n\t\tif ($this->products)\n\t\t{\techo '<ul class=\"storeShelfList\">';\n\t\t\tforeach ($this->products as $product_row)\n\t\t\t{\t$product = new StoreProduct($product_row);\n\t\t\t\techo '<li><a href=\"', $link = $this->link->GetStoreProductLink($product), '\"><img class=\"storeShelfImg\" src=\"', ($img = $product->HasImage('thumbnail')) ? $img : $product->DefaultImageSRC('thumbnail'), '\" alt=\"', $title = $this->InputSafeString($product->details['title']), ' - Image\" /></a><h4><a href=\"', $link, '\">', $title, '</a></h4><div class=\"storeShelfAuthor\">', $product->GetAuthorString(), '</div><div class=\"storeShelfPrice\">&pound;', number_format($product->GetPriceWithTax(), 2), '</div>', $this->CartLinkButton($product), '<div class=\"clear\"></div></li>';\n\t\t\t}\n\t\t\t//$this->VarDump($products);\n\t\t\techo '</ul>';\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "protected function render() {\r\n $settings = $this->get_settings_for_display(); \r\n\r\n if ( $settings['list'] ) { ?>\r\n\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\"> \r\n <?php foreach ( $settings['list'] as $item ) : ?>\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" <?php echo $item['imagen']['url'] ?> \">\r\n <h5 class=\"DSMCA__item-title\"><?php echo $item['titulo'] ?></h5>\r\n </div>\r\n <?php endforeach; ?> \r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n\r\n\r\n <?php }\r\n\t}", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function displaySendSingleSMS()\n {\n if (Tools::getValue('SEND_SINGLE_SMS_MOBILE') == null) {\n $this->context->smarty->assign('smsMobileNo', '');\n }\n if (Tools::getValue('SEND_SINGLE_SENDER_ID') == null) {\n $this->context->smarty->assign('smsSenderid', '');\n }\n if (Tools::getValue('SEND_SINGLE_SMS_LABEL') == null) {\n $this->context->smarty->assign('smsLabel', '');\n }\n if (Tools::getValue('SEND_SINGLE_SMS_TEMPLATE') == null) {\n $this->context->smarty->assign('smsTemplate', '');\n }\n if (Tools::getValue('SEND_SIGNLE_SMS_BODY') == null) {\n $this->context->smarty->assign('templateBody', '');\n }\n if (_PS_VERSION_ > 1.5) {\n return $this->display(__FILE__, 'send_single_sms.tpl');\n } else {\n return $this->display(dirname(__FILE__), '/views/templates/front/send_single_sms.tpl');\n }\n }", "function showFeaturedItems($arr,$flag,$r)\n\t{\n\n\t\t$output='<div class=\"image_grid portfolio_4col\">\n\t\t<div id=\"horz_scroll_id\">';\n\n\t\t$output.='<div class=\"scroller_div\">\n \t\t <div class=\"row-fluid\">';\n\n\t\tif((count($arr)>0))\n\t\t{\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\tif($i%8==0 && $i!=0 && $i%4==0 )\n\t\t\t\t{\n\n\t\t\t\t\t$output.='</div></div><div class=\"scroller_div\"><div class=\"row-fluid\">';\n\t\t\t\t}\n\t\t\t\tif($i%4==0 && $i!=0 && $i%8==0)\n\t\t\t\t{\n\n\t\t\t\t\t$output.=' </div> <div class=\"row-fluid\">';\n\t\t\t\t}\n\n\t\t\t\tif($arr[$i]['product_status']==1)\n\t\t\t\t{\n\t\t\t\t\t$imagetag='<img src=\"'.$_SESSION['base_url'].'/assets/img/ribbion/new.png\" alt=\"new\">';\n\t\t\t\t}\n\t\t\t\telseif($arr[$i]['product_status']==2)\n\t\t\t\t{\n\t\t\t\t\t$imagetag='<img src=\"'.$_SESSION['base_url'].'/assets/img/ribbion/sale.png\" alt=\"sale\">';\n\t\t\t\t}\n\t\t\t\telseif($arr[$i]['product_status']==0)\n\t\t\t\t{\t\n\t\t\t\t\t$imagetag='';\n\t\t\t\t}\n\n\t\t\t\t//category name\n\t\t\t\t$sql=\"SELECT * FROM category_table WHERE category_id='\".$arr[$i]['category_id'].\"'\";\n\t\t\t\t$obj=new Bin_Query();\n\t\t\t\t$obj->executeQuery($sql);\n\t\t\t\t$cat=$obj->records[0]['category_name'];\n\n\t\t\t\t//sub category\n\t\t\t\t$sqlsub=\"SELECT * FROM category_table WHERE category_id='\".$arr[$i]['sub_category_id'].\"'\";\n\t\t\t\t$objsub=new Bin_Query();\n\t\t\t\t$objsub->executeQuery($sqlsub);\n\t\t\t\t$subcat=$objsub->records[0]['category_name'];\n\n\t\t\t\t//sub under category\n\t\t\t\t$sqlsubun=\"SELECT * FROM category_table WHERE category_id='\".$arr[$i]['sub_under_category_id'].\"'\";\n\t\t\t\t$objsubun=new Bin_Query();\n\t\t\t\t$objsubun->executeQuery($sqlsubun);\n\t\t\t\t$subuncat=$objsubun->records[0]['category_name'];\n\t\t\t\t//soh \n\t\t\t\t$sql=\"SELECT * FROM product_inventory_table WHERE product_id='\".$arr[$i]['product_id'].\"'\";\n\t\t\t\t$obj=new Bin_Query();\n\t\t\t\t$obj->executeQuery($sql);\n\t\t\t\t$recordssoh=$obj->records;\n\n \t\t\t$output.='<div class=\"span3\"><form name=\"product\" method=\"post\" action=\"'.$_SESSION['base_url'].'/index.php?do=addtocart&prodid='.$arr[$i]['product_id'].'\" /><div class=\"view view-first\">\n\t\t\t\t<img src=\"'.$_SESSION['base_url'].'/timthumb/timthumb.php?src='.$_SESSION['base_url'].'/'.$arr[$i]['image'].'&h=800&w=800&zc=1&s=1&f=4,9&q=1000\" alt=\"'.$arr[$i]['title'].'\">\n\t\t\t\t<div class=\"mask\">\n\t\t\t\t<h2>'.$arr[$i]['title'].' <br/>'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].''.$arr[$i]['msrp'].'</h2>\n\t\t\t\t<p><a href=\"'.$_SESSION['base_url'].'/index.php?do=prodetail&action=showprod&prodid='.$arr[$i]['product_id'].'\" class=\"list_icn\"></a> <a data-toggle=\"modal\" href=\"#uploadReferenceDocuments\" data-id=\"'.$arr[$i]['product_id'].'\" class=\"search_icn\"></a></p>';\n\t\t\t\tif($recordssoh[0]['soh']>0)\n\t\t\t\t{\n\t\t\t\t$output.='<button class=\"info\" type=\"submit\" >Add to Cart</button>';\n\t\t\t\t}\n\t\t\t\t$output.='</div>\n\t\t\t\t</div><input type=\"hidden\" name=\"addtocart\" value=\"'.$arr[$i]['product_id'].'\"></form></div>';\n\t\t\t\t\n\t\t\t}\n\t\t\t$output.='</div></div>';\n\t\t}\n \n\n\n\t $output.='</div>\n\t\t</div>';\t\n\t\treturn $output;\n\t}", "public function index()\n {\n $screenOne = DamageScreen::where('order', 0)->first();\n $screenTwo = DamageScreen::where('order', 1)->first();\n $status = DamageStatus::get();\n return view('dashboard.screens.index')->with('screenOne', $screenOne)->with('screenTwo', $screenTwo)->with('status',$status);\n }", "function warquest_view_awards() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $config;\r\n\tglobal $browser;\r\n\t\r\n\t$page = '<div class=\"award\">';\r\n\t\r\n\t/* Get battle award data */\r\n\t$query = \"select id, won from battle_award where id<\".$player->won_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_BATTLE_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_battle_award_image($data->id, $data->won);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\t\t\r\n\t/* Get mission award data */\r\n\t$query = \"select id, won from mission_award where id<\".$player->mission_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_MISSION_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_mission_award_image($data->id, $data->won);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t/* Get bounty award data */\r\n\t$query = \"select id, amount from bounty_award where id<\".$player->bounty_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_BOUNTY_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_bounty_award_image($data->id, $data->amount);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t/* Get rebel award data */\r\n\t$query = \"select id, amount from rebel_award where id<\".$player->rebel_level.' order by id'; \r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\r\n\tif ($count>0) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= t('HOME_REBEL_AWARDS_TEXT');\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\twhile ($data = warquest_db_fetch_object($result)) {\r\n \t\t\r\n\t\t\t$max=9;\t\t\r\n\t\t\t$page .= warquest_rebel_award_image($data->id, $data->amount);\r\n\t\t\t\t\t\r\n\t\t\tif ((($data->id % $max)==0) && ($data->id!=$count)) { \r\n\t\t\t\t$page .='<br/>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '<br/>';\r\n\t}\r\n\t\r\n\t$page .= '</div>';\n\t\r\n\treturn $page;\r\n}", "function displayDealer(){\n\n $dealer_cards = array_column($_SESSION['dealer'], 'display');\n\n if (count($dealer_cards)==1){\n\n foreach ($dealer_cards as $dealer_display){\n echo $dealer_display . \"<img src='cards/b1fv.png'>\";\n }\n }\n else\n {\n foreach ($dealer_cards as $dealer_display){\n echo $dealer_display . \" \";\n }\n }\n}", "public function display() {}", "public function display() {}", "function Show_All() \n\t{\n\t\tglobal $eTraffic;\n\t\t\n\t\t$this->ShowIf('Debug Log', $this->Show_Log());\n\t\t$this->ShowIf('Traffic Counters', $eTraffic->Display());\n\t\t$this->ShowIf('Time Analysis', $this->Show_Performance());\n\t\t$this->ShowIf('SQL Analysis', $this->Show_SQL_Details());\n\t\t$this->ShowIf('Shortcodes / BBCode',$this->Show_SC_BB());\n\t\t$this->ShowIf('Paths', $this->Show_PATH());\n\t\t$this->ShowIf('Deprecated Function Usage', $this->Show_DEPRECATED());\n\t\t$this->ShowIf('Included Files', $this->Show_Includes());\n\t}", "function wpfifc_activate() {\r\n\t\t$wpfifc_curr_option =\tget_option('wpfifc_image_padding');\r\n\t\tif( !$wpfifc_curr_option ){\r\n\t\t\tupdate_option('wpfifc_image_padding', '2' );\r\n\t\t}\r\n\t\t$wpfifc_curr_option =\tget_option('wpfifc_default_columns');\r\n\t\tif( !$wpfifc_curr_option ){\r\n\t\t\tupdate_option('wpfifc_default_columns', '3' );\r\n\t\t}\r\n\t\t$wpfifc_curr_option =\tget_option('wpfifc_default_size');\r\n\t\tif(!$wpfifc_curr_option){\r\n\t\t\tupdate_option('wpfifc_default_size', 'thumbnail' );\r\n\t\t}\r\n\t\t$wpfifc_curr_option =\tget_option('wpfifc_genesis_taxonomy');\r\n\t\tif(!$wpfifc_curr_option){\r\n\t\t\tupdate_option('wpfifc_genesis_taxonomy', array() );\r\n\t\t}\r\n\t\t$wpfifc_curr_option =\tget_option('wpfifc_genesis_position');\r\n\t\tif(!$wpfifc_curr_option){\r\n\t\t\tupdate_option('wpfifc_genesis_position', 'left');\r\n\t\t}\r\n\t}", "function sendit_templates() {\n\n?>\n\n\t\t<div style=\"width:100%; display:block;clear:both;\">\n\t\t<div style=\"float:left; margin:10px;\"><h2>Zurb based (responsive)</h2>\n\t\t\t \t<a href=\"#\">\n\t\t\t \t<img src=\"<?php echo WP_PLUGIN_URL ?>/sendit/images/sendit-template-basic.jpg\" />\n\t\t\t \t</a>\n\t\t</div>\n\n\t\t<div style=\"float:left; margin:10px;\"><h2>Helvetico Black style</h2>\n\t\t\t \t<a href=\"#\">\n\t\t\t \t<img src=\"<?php echo WP_PLUGIN_URL ?>/sendit/images/sendit-template-helv.jpg\" />\n\t\t\t \t</a>\n\t\t</div>\n\n\t\t<div style=\"float:left; margin:10px;\"><h2>Sendit Light</h2>\n\t\t\t \t<a href=\"#\">\n\t\t\t \t<img src=\"<?php echo WP_PLUGIN_URL ?>/sendit/images/sendit-template-light.jpg\" />\n\t\t\t \t</a>\n\t\t</div>\n\t\t</div>\t\n<?php }", "protected function show() {\r\n\t\tglobal $wpdb;\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\t\t$upload = Maps_Marker_Pro::get_instance('MMP\\Upload');\r\n\t\t$l10n = Maps_Marker_Pro::get_instance('MMP\\L10n');\r\n\t\t$mmp_settings = Maps_Marker_Pro::get_instance('MMP\\Settings');\r\n\r\n\t\t$maps = $db->get_all_maps(true);\r\n\t\t$settings = $mmp_settings->get_map_defaults();\r\n\t\t$old_version = get_option('leafletmapsmarker_version_pro');\r\n\r\n\t\t$basemaps = $mmp_settings->get_basemaps();\r\n\t\t$custom_basemaps = $db->get_all_basemaps();\r\n\t\tforeach ($custom_basemaps as $custom_basemap) {\r\n\t\t\t$basemaps[$custom_basemap->id] = array(\r\n\t\t\t\t'type' => 1,\r\n\t\t\t\t'wms' => absint($custom_basemap->wms),\r\n\t\t\t\t'name' => $custom_basemap->name,\r\n\t\t\t\t'url' => $custom_basemap->url,\r\n\t\t\t\t'options' => json_decode($custom_basemap->options)\r\n\t\t\t);\r\n\t\t}\r\n\t\t$overlays = array();\r\n\t\t$custom_overlays = $db->get_all_overlays();\r\n\t\tforeach ($custom_overlays as $custom_overlay) {\r\n\t\t\t$overlays[$custom_overlay->id] = array(\r\n\t\t\t\t'name' => $custom_overlay->name,\r\n\t\t\t\t'url' => $custom_overlay->url,\r\n\t\t\t\t'options' => json_decode($custom_overlay->options)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t?>\r\n\t\t<div class=\"wrap mmp-wrap\">\r\n\t\t\t<h1><?= esc_html__('Tools', 'mmp') ?></h1>\r\n\t\t\t<div class=\"mmp-tools-tabs\">\r\n\t\t\t\t<button id=\"maps_markers_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Maps and markers', 'mmp') ?></button>\r\n\t\t\t\t<button id=\"import_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Import markers', 'mmp') ?></button>\r\n\t\t\t\t<button id=\"export_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Export markers', 'mmp') ?></button>\r\n\t\t\t\t<button id=\"backup_restore_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Backup and restore', 'mmp') ?></button>\r\n\t\t\t\t<?php if ($old_version !== false): ?>\r\n\t\t\t\t\t<button id=\"migration_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Data migration', 'mmp') ?></button>\r\n\t\t\t\t<?php endif; ?>\r\n\t\t\t\t<button id=\"reset_tab\" class=\"mmp-tablink\" type=\"button\"><?= esc_html__('Reset', 'mmp') ?></button>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"maps_markers_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t<div id=\"batch_settings_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Batch update map settings', 'mmp') ?></h2>\r\n\t\t\t\t\t<div class=\"mmp-batch-settings-tabs\">\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"mapDimensions\"><?= esc_html__('Map dimensions', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"initialView\"><?= esc_html__('Initial view', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"panel\"><?= esc_html__('Panel', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"layers\"><?= esc_html__('Layers', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"zoomButtons\"><?= esc_html__('Zoom buttons', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"fullscreenButton\"><?= esc_html__('Fullscreen button', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"resetButton\"><?= esc_html__('Reset button', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"locateButton\"><?= esc_html__('Locate button', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"scale\"><?= esc_html__('Scale', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"layersControl\"><?= esc_html__('Layers control', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"filtersControl\"><?= esc_html__('Filters control', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"minimap\"><?= esc_html__('Minimap', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"attribution\"><?= esc_html__('Attribution', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"icon\"><?= esc_html__('Icon', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"clustering\"><?= esc_html__('Clustering', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"tooltip\"><?= esc_html__('Tooltip', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"popup\"><?= esc_html__('Popup', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"list\"><?= esc_html__('List', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"interaction\"><?= esc_html__('Interaction', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"track\"><?= esc_html__('Track', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"metadata\"><?= esc_html__('Metadata', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"waypoints\"><?= esc_html__('Waypoints', 'mmp') ?></button>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"mmp-batch-settings-tablink\" data-target=\"elevationChart\"><?= esc_html__('Elevation chart', 'mmp') ?></button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"mmp-batch-settings\">\r\n\t\t\t\t\t\t<form id=\"mapSettings\" method=\"POST\">\r\n\t\t\t\t\t\t\t<div id=\"mapDimensionsContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"widthCheck\" class=\"batch-settings-check\" name=\"widthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"width\"><?= esc_html__('Width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"width\" name=\"width\" value=\"<?= $settings['width'] ?>\" min=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"widthUnitCheck\" class=\"batch-settings-check\" name=\"widthUnitCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label><?= esc_html__('Width unit', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label><input type=\"radio\" id=\"widthUnitPct\" name=\"widthUnit\" value=\"%\" <?= !($settings['widthUnit'] == '%') ?: 'checked=\"checked\"' ?> />%</label>\r\n\t\t\t\t\t\t\t\t\t\t<label><input type=\"radio\" id=\"widthUnitPx\" name=\"widthUnit\" value=\"px\" <?= !($settings['widthUnit'] == 'px') ?: 'checked=\"checked\"' ?> />px</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"heightCheck\" class=\"batch-settings-check\" name=\"heightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"height\"><?= esc_html__('Height', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"height\" name=\"height\" value=\"<?= $settings['height'] ?>\" min=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tabbedCheck\" class=\"batch-settings-check\" name=\"tabbedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tabbed\"><?= esc_html__('Tabbed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tabbed\" name=\"tabbed\" <?= !$settings['tabbed'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"initialViewContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"latCheck\" class=\"batch-settings-check\" name=\"latCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"lat\"><?= esc_html__('Latitude', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"lat\" name=\"lat\" value=\"<?= $settings['lat'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"lngCheck\" class=\"batch-settings-check\" name=\"lngCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"lng\"><?= esc_html__('Longitude', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"lng\" name=\"lng\" value=\"<?= $settings['lng'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"maxBoundsCheck\" class=\"batch-settings-check\" name=\"maxBoundsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"maxBounds\"><?= esc_html__('Max bounds', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<textarea id=\"maxBounds\" name=\"maxBounds\"><?= str_replace(',', \",\\n\", $settings['maxBounds']) ?></textarea>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"zoomCheck\" class=\"batch-settings-check\" name=\"zoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"zoom\"><?= esc_html__('Zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"zoom\" name=\"zoom\" value=\"<?= $settings['zoom'] ?>\" min=\"0\" max=\"23\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minZoomCheck\" class=\"batch-settings-check\" name=\"minZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minZoom\"><?= esc_html__('Min zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minZoom\" name=\"minZoom\" value=\"<?= $settings['minZoom'] ?>\" min=\"0\" max=\"23\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"maxZoomCheck\" class=\"batch-settings-check\" name=\"maxZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"maxZoom\"><?= esc_html__('Max zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"maxZoom\" name=\"maxZoom\" value=\"<?= $settings['maxZoom'] ?>\" min=\"0\" max=\"23\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"zoomStepCheck\" class=\"batch-settings-check\" name=\"zoomStepCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"zoomStep\"><?= esc_html__('Zoom step', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"zoomStep\" name=\"zoomStep\" value=\"<?= $settings['zoomStep'] ?>\" min=\"0.1\" max=\"1\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"panelContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelCheck\" class=\"batch-settings-check\" name=\"panelCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panel\"><?= esc_html__('Show', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panel\" name=\"panel\" <?= !$settings['panel'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelColorCheck\" class=\"batch-settings-check\" name=\"panelColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panelColor\"><?= esc_html__('Color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"panelColor\" name=\"panelColor\" value=\"<?= $settings['panelColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelFsCheck\" class=\"batch-settings-check\" name=\"panelFsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panelFs\"><?= esc_html__('Fullscreen button', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelFs\" name=\"panelFs\" <?= !$settings['panelFs'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelGeoJsonCheck\" class=\"batch-settings-check\" name=\"panelGeoJsonCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panelGeoJson\"><?= esc_html__('GeoJSON button', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelGeoJson\" name=\"panelGeoJson\" <?= !$settings['panelGeoJson'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelKmlCheck\" class=\"batch-settings-check\" name=\"panelKmlCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panelKml\"><?= esc_html__('KML button', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelKml\" name=\"panelKml\" <?= !$settings['panelKml'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelGeoRssCheck\" class=\"batch-settings-check\" name=\"panelGeoRssCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"panelGeoRss\"><?= esc_html__('GeoRss button', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"panelGeoRss\" name=\"panelGeoRss\" <?= !$settings['panelGeoRss'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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<span></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"layersContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"basemapDetectRetinaCheck\" class=\"batch-settings-check\" name=\"basemapDetectRetinaCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"basemapDetectRetina\"><?= esc_html__('Detect retina', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"basemapDetectRetina\" name=\"basemapDetectRetina\" <?= !$settings['basemapDetectRetina'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"basemapEdgeBufferTilesCheck\" class=\"batch-settings-check\" name=\"basemapEdgeBufferTilesCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"basemapEdgeBufferTiles\"><?= esc_html__('Edge buffer tiles', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"basemapEdgeBufferTiles\" name=\"basemapEdgeBufferTiles\" value=\"<?= $settings['basemapEdgeBufferTiles'] ?>\" min=\"0\" max=\"10\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"basemapGoogleStylesCheck\" class=\"batch-settings-check\" name=\"basemapGoogleStylesCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"basemapGoogleStyles\"><?= esc_html__('Google styles', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<textarea id=\"basemapGoogleStyles\" name=\"basemapGoogleStyles\"><?= $settings['basemapGoogleStyles'] ?></textarea><br />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"zoomButtonsContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"zoomControlPositionCheck\" class=\"batch-settings-check\" name=\"zoomControlPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zoomControlPosition\" value=\"hidden\" <?= !($settings['zoomControlPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zoomControlPosition\" value=\"topleft\" <?= !($settings['zoomControlPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zoomControlPosition\" value=\"topright\" <?= !($settings['zoomControlPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zoomControlPosition\" value=\"bottomleft\" <?= !($settings['zoomControlPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zoomControlPosition\" value=\"bottomright\" <?= !($settings['zoomControlPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"fullscreenButtonContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"fullscreenPositionCheck\" class=\"batch-settings-check\" name=\"fullscreenPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"fullscreenPosition\" value=\"hidden\" <?= !($settings['fullscreenPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"fullscreenPosition\" value=\"topleft\" <?= !($settings['fullscreenPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"fullscreenPosition\" value=\"topright\" <?= !($settings['fullscreenPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"fullscreenPosition\" value=\"bottomleft\" <?= !($settings['fullscreenPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"fullscreenPosition\" value=\"bottomright\" <?= !($settings['fullscreenPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"resetButtonContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"resetPositionCheck\" class=\"batch-settings-check\" name=\"resetPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"resetPosition\" value=\"hidden\" <?= !($settings['resetPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"resetPosition\" value=\"topleft\" <?= !($settings['resetPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"resetPosition\" value=\"topright\" <?= !($settings['resetPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"resetPosition\" value=\"bottomleft\" <?= !($settings['resetPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"resetPosition\" value=\"bottomright\" <?= !($settings['resetPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"resetOnDemandCheck\" class=\"batch-settings-check\" name=\"resetOnDemandCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"resetOnDemand\"><?= esc_html__('On demand', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"resetOnDemand\" name=\"resetOnDemand\" <?= !$settings['resetOnDemand'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"locateButtonContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locatePositionCheck\" class=\"batch-settings-check\" name=\"locatePositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"locatePosition\" value=\"hidden\" <?= !($settings['locatePosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"locatePosition\" value=\"topleft\" <?= !($settings['locatePosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"locatePosition\" value=\"topright\" <?= !($settings['locatePosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"locatePosition\" value=\"bottomleft\" <?= !($settings['locatePosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"locatePosition\" value=\"bottomright\" <?= !($settings['locatePosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateDrawCircleCheck\" class=\"batch-settings-check\" name=\"locateDrawCircleCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateDrawCircle\"><?= esc_html__('Draw circle', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateDrawCircle\" name=\"locateDrawCircle\" <?= !$settings['locateDrawCircle'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateDrawMarkerCheck\" class=\"batch-settings-check\" name=\"locateDrawMarkerCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateDrawMarker\"><?= esc_html__('Draw marker', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateDrawMarker\" name=\"locateDrawMarker\" <?= !$settings['locateDrawMarker'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateSetViewCheck\" class=\"batch-settings-check\" name=\"locateSetViewCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateSetView\"><?= esc_html__('Set view', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"locateSetView\" name=\"locateSetView\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"once\" <?= !($settings['locateSetView'] == 'once') ?: 'selected=\"selected\"' ?>><?= esc_html__('Once', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"always\" <?= !($settings['locateSetView'] == 'always') ?: 'selected=\"selected\"' ?>><?= esc_html__('Always', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"untilPan\" <?= !($settings['locateSetView'] == 'untilPan') ?: 'selected=\"selected\"' ?>><?= esc_html__('Until pan', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"untilPanOrZoom\" <?= !($settings['locateSetView'] == 'untilPanOrZoom') ?: 'selected=\"selected\"' ?>><?= esc_html__('Until pan or zoom', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateKeepCurrentZoomLevelCheck\" class=\"batch-settings-check\" name=\"locateKeepCurrentZoomLevelCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateKeepCurrentZoomLevel\"><?= esc_html__('Keep current zoom level', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateKeepCurrentZoomLevel\" name=\"locateKeepCurrentZoomLevel\" <?= !$settings['locateKeepCurrentZoomLevel'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateClickBehaviorInViewCheck\" class=\"batch-settings-check\" name=\"locateClickBehaviorInViewCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateClickBehaviorInView\"><?= esc_html__('Click behavior in view', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"locateClickBehaviorInView\" name=\"locateClickBehaviorInView\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"stop\" <?= !($settings['locateClickBehaviorInView'] == 'stop') ?: 'selected=\"selected\"' ?>><?= esc_html__('Stop', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"setView\" <?= !($settings['locateClickBehaviorInView'] == 'setView') ?: 'selected=\"selected\"' ?>><?= esc_html__('Set view', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateClickBehaviorOutOfViewCheck\" class=\"batch-settings-check\" name=\"locateClickBehaviorOutOfViewCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateClickBehaviorOutOfView\"><?= esc_html__('Click behavior out of view', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"locateClickBehaviorOutOfView\" name=\"locateClickBehaviorOutOfView\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"stop\" <?= !($settings['locateClickBehaviorOutOfView'] == 'stop') ?: 'selected=\"selected\"' ?>><?= esc_html__('Stop', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"setView\" <?= !($settings['locateClickBehaviorOutOfView'] == 'setView') ?: 'selected=\"selected\"' ?>><?= esc_html__('Set view', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateIconCheck\" class=\"batch-settings-check\" name=\"locateIconCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateIcon\"><?= esc_html__('Icon', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"locateIcon\" name=\"locateIcon\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"icon-cross-hairs\" <?= !($settings['locateIcon'] == 'icon-cross-hairs') ?: 'selected=\"selected\"' ?>><?= esc_html__('Crosshairs', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"icon-pin\" <?= !($settings['locateIcon'] == 'icon-pin') ?: 'selected=\"selected\"' ?>><?= esc_html__('Pin', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"icon-arrow\" <?= !($settings['locateIcon'] == 'icon-arrow') ?: 'selected=\"selected\"' ?>><?= esc_html__('Arrow', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateMetricCheck\" class=\"batch-settings-check\" name=\"locateMetricCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateMetric\"><?= esc_html__('Metric units', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateMetric\" name=\"locateMetric\" <?= !$settings['locateMetric'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateShowPopupCheck\" class=\"batch-settings-check\" name=\"locateShowPopupCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateShowPopup\"><?= esc_html__('Show popup', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateShowPopup\" name=\"locateShowPopup\" <?= !$settings['locateShowPopup'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateAutostartCheck\" class=\"batch-settings-check\" name=\"locateAutostartCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"locateAutostart\"><?= esc_html__('Autostart', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"locateAutostart\" name=\"locateAutostart\" <?= !$settings['locateAutostart'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"scaleContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scalePositionCheck\" class=\"batch-settings-check\" name=\"scalePositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"scalePosition\" value=\"hidden\" <?= !($settings['scalePosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"scalePosition\" value=\"topleft\" <?= !($settings['scalePosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"scalePosition\" value=\"topright\" <?= !($settings['scalePosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"scalePosition\" value=\"bottomleft\" <?= !($settings['scalePosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"scalePosition\" value=\"bottomright\" <?= !($settings['scalePosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scaleMaxWidthCheck\" class=\"batch-settings-check\" name=\"scaleMaxWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"scaleMaxWidth\"><?= esc_html__('Max width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"scaleMaxWidth\" name=\"scaleMaxWidth\" value=\"<?= $settings['scaleMaxWidth'] ?>\" min=\"0\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scaleMetricCheck\" class=\"batch-settings-check\" name=\"scaleMetricCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"scaleMetric\"><?= esc_html__('Show metric', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scaleMetric\" name=\"scaleMetric\" <?= !$settings['scaleMetric'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scaleImperialCheck\" class=\"batch-settings-check\" name=\"scaleImperialCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"scaleImperial\"><?= esc_html__('Show imperial', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scaleImperial\" name=\"scaleImperial\" <?= !$settings['scaleImperial'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"layersControlContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"layersPositionCheck\" class=\"batch-settings-check\" name=\"layersPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"layersPosition\" value=\"hidden\" <?= !($settings['layersPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"layersPosition\" value=\"topleft\" <?= !($settings['layersPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"layersPosition\" value=\"topright\" <?= !($settings['layersPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"layersPosition\" value=\"bottomleft\" <?= !($settings['layersPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"layersPosition\" value=\"bottomright\" <?= !($settings['layersPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"layersCollapsedCheck\" class=\"batch-settings-check\" name=\"layersCollapsedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"layersCollapsed\"><?= esc_html__('Collapsed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"layersCollapsed\" name=\"layersCollapsed\" <?= !$settings['layersCollapsed'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"filtersControlContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersPositionCheck\" class=\"batch-settings-check\" name=\"filtersPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"filtersPosition\" value=\"hidden\" <?= !($settings['filtersPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"filtersPosition\" value=\"topleft\" <?= !($settings['filtersPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"filtersPosition\" value=\"topright\" <?= !($settings['filtersPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"filtersPosition\" value=\"bottomleft\" <?= !($settings['filtersPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"filtersPosition\" value=\"bottomright\" <?= !($settings['filtersPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersCollapsedCheck\" class=\"batch-settings-check\" name=\"filtersCollapsedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersCollapsed\"><?= esc_html__('Collapsed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersCollapsed\" name=\"filtersCollapsed\" <?= !$settings['filtersCollapsed'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersButtonsCheck\" class=\"batch-settings-check\" name=\"filtersButtonsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersButtons\"><?= esc_html__('Buttons', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersButtons\" name=\"filtersButtons\" <?= !$settings['filtersButtons'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersIconCheck\" class=\"batch-settings-check\" name=\"filtersIconCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersIcon\"><?= esc_html__('Icon', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersIcon\" name=\"filtersIcon\" <?= !$settings['filtersIcon'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersNameCheck\" class=\"batch-settings-check\" name=\"filtersNameCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersName\"><?= esc_html__('Name', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersName\" name=\"filtersName\" <?= !$settings['filtersName'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersCountCheck\" class=\"batch-settings-check\" name=\"filtersCountCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersCount\"><?= esc_html__('Count', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersCount\" name=\"filtersCount\" <?= !$settings['filtersCount'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersOrderByCheck\" class=\"batch-settings-check\" name=\"filtersOrderByCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersOrderBy\"><?= esc_html__('Order by', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"filtersOrderBy\" name=\"filtersOrderBy\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"id\" <?= !($settings['filtersOrderBy'] == 'id') ?: 'selected=\"selected\"' ?>><?= esc_html__('ID', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"name\" <?= !($settings['filtersOrderBy'] == 'name') ?: 'selected=\"selected\"' ?>><?= esc_html__('Name', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"count\" <?= !($settings['filtersOrderBy'] == 'count') ?: 'selected=\"selected\"' ?>><?= esc_html__('Count', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"custom\" <?= !($settings['filtersOrderBy'] == 'custom') ?: 'selected=\"selected\"' ?>><?= esc_html__('Custom', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"filtersSortOrderCheck\" class=\"batch-settings-check\" name=\"filtersSortOrderCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"filtersSortOrder\"><?= esc_html__('Sort order', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"filtersSortOrder\" name=\"filtersSortOrder\" <?= !($settings['filtersOrderBy'] == 'custom') ? '' : 'disabled=\"disabled\"' ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"asc\" <?= !($settings['filtersSortOrder'] == 'asc') ?: 'selected=\"selected\"' ?>><?= esc_html__('Ascending', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"desc\" <?= !($settings['filtersSortOrder'] == 'desc') ?: 'selected=\"selected\"' ?>><?= esc_html__('Descending', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"minimapContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapPositionCheck\" class=\"batch-settings-check\" name=\"minimapPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Position', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"minimapPosition\" value=\"hidden\" <?= !($settings['minimapPosition'] == 'hidden') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-hidden.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"minimapPosition\" value=\"topleft\" <?= !($settings['minimapPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"minimapPosition\" value=\"topright\" <?= !($settings['minimapPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"minimapPosition\" value=\"bottomleft\" <?= !($settings['minimapPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"minimapPosition\" value=\"bottomright\" <?= !($settings['minimapPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapMinimizedCheck\" class=\"batch-settings-check\" name=\"minimapMinimizedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapMinimized\"><?= esc_html__('Collapsed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapMinimized\" name=\"minimapMinimized\" <?= !$settings['minimapMinimized'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapWidthCheck\" class=\"batch-settings-check\" name=\"minimapWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapWidth\"><?= esc_html__('Width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapWidth\" name=\"minimapWidth\" value=\"<?= $settings['minimapWidth'] ?>\" min=\"1\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapHeightCheck\" class=\"batch-settings-check\" name=\"minimapHeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapHeight\"><?= esc_html__('Height', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapHeight\" name=\"minimapHeight\" value=\"<?= $settings['minimapHeight'] ?>\" min=\"1\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapCollapsedWidthCheck\" class=\"batch-settings-check\" name=\"minimapCollapsedWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapCollapsedWidth\"><?= esc_html__('Collapsed width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapCollapsedWidth\" name=\"minimapCollapsedWidth\" value=\"<?= $settings['minimapCollapsedWidth'] ?>\" min=\"1\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapCollapsedHeightCheck\" class=\"batch-settings-check\" name=\"minimapCollapsedHeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapCollapsedHeight\"><?= esc_html__('Collapsed height', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapCollapsedHeight\" name=\"minimapCollapsedHeight\" value=\"<?= $settings['minimapCollapsedHeight'] ?>\" min=\"1\" step=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapZoomLevelOffsetCheck\" class=\"batch-settings-check\" name=\"minimapZoomLevelOffsetCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapZoomLevelOffset\"><?= esc_html__('Zoom level offset', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapZoomLevelOffset\" name=\"minimapZoomLevelOffset\" value=\"<?= $settings['minimapZoomLevelOffset'] ?>\" min=\"-23\" max=\"23\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"minimapZoomLevelFixedCheck\" class=\"batch-settings-check\" name=\"minimapZoomLevelFixedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"minimapZoomLevelFixed\"><?= esc_html__('Fixed zoom level', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"minimapZoomLevelFixed\" name=\"minimapZoomLevelFixed\" value=\"<?= $settings['minimapZoomLevelFixed'] ?>\" min=\"0\" max=\"23\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"attributionContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"attributionPositionCheck\" class=\"batch-settings-check\" name=\"attributionPositionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<?= esc_html__('Positon', 'mmp') ?>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"attributionPosition\" value=\"topleft\" <?= !($settings['attributionPosition'] == 'topleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"attributionPosition\" value=\"topright\" <?= !($settings['attributionPosition'] == 'topright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-topright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"attributionPosition\" value=\"bottomleft\" <?= !($settings['attributionPosition'] == 'bottomleft') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomleft.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\"mmp-radio\">\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"attributionPosition\" value=\"bottomright\" <?= !($settings['attributionPosition'] == 'bottomright') ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t<span><img src=\"<?= plugins_url('images/icons/control-bottomright.png', __DIR__) ?>\" /></span>\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"attributionCondensedCheck\" class=\"batch-settings-check\" name=\"attributionCondensedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"attributionCondensed\"><?= esc_html__('Condensed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"attributionCondensed\" name=\"attributionCondensed\" <?= !$settings['attributionCondensed'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"iconContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"markerOpacityCheck\" class=\"batch-settings-check\" name=\"markerOpacityCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"markerOpacity\"><?= esc_html__('Opacity', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"markerOpacity\" name=\"markerOpacity\" value=\"<?= $settings['markerOpacity'] ?>\" min=\"0\" max=\"1\" step=\"0.01\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"clusteringContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"clusteringCheck\" class=\"batch-settings-check\" name=\"clusteringCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"clustering\"><?= esc_html__('Enable', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"clustering\" name=\"clustering\" <?= !$settings['clustering'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"showCoverageOnHoverCheck\" class=\"batch-settings-check\" name=\"showCoverageOnHoverCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"showCoverageOnHover\"><?= esc_html__('Show bounds on hover', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"showCoverageOnHover\" name=\"showCoverageOnHover\" <?= !$settings['showCoverageOnHover'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"disableClusteringAtZoomCheck\" class=\"batch-settings-check\" name=\"disableClusteringAtZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"disableClusteringAtZoom\"><?= esc_html__('Disable at zoom', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"disableClusteringAtZoom\" name=\"disableClusteringAtZoom\" value=\"<?= $settings['disableClusteringAtZoom'] ?>\" min=\"0\" max=\"23\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"maxClusterRadiusCheck\" class=\"batch-settings-check\" name=\"maxClusterRadiusCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"maxClusterRadius\"><?= esc_html__('Max cluster radius', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"maxClusterRadius\" name=\"maxClusterRadius\" value=\"<?= $settings['maxClusterRadius'] ?>\" min=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"singleMarkerModeCheck\" class=\"batch-settings-check\" name=\"singleMarkerModeCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"singleMarkerMode\"><?= esc_html__('Single marker mode', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"singleMarkerMode\" name=\"singleMarkerMode\" <?= !$settings['singleMarkerMode'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"spiderfyDistanceMultiplierCheck\" class=\"batch-settings-check\" name=\"spiderfyDistanceMultiplierCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"spiderfyDistanceMultiplier\"><?= esc_html__('Spiderfy multiplier', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"spiderfyDistanceMultiplier\" name=\"spiderfyDistanceMultiplier\" value=\"<?= $settings['spiderfyDistanceMultiplier'] ?>\" min=\"0\" max=\"10\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"tooltipContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipCheck\" class=\"batch-settings-check\" name=\"tooltipCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tooltip\"><?= esc_html__('Show', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltip\" name=\"tooltip\" <?= !$settings['tooltip'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipDirectionCheck\" class=\"batch-settings-check\" name=\"tooltipDirectionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tooltipDirection\"><?= esc_html__('Direction', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"tooltipDirection\" name=\"tooltipDirection\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"auto\" <?= !($settings['tooltipDirection'] == 'auto') ?: 'selected=\"selected\"' ?>><?= esc_html__('Auto', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\" <?= !($settings['tooltipDirection'] == 'right') ?: 'selected=\"selected\"' ?>><?= esc_html__('Right', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\" <?= !($settings['tooltipDirection'] == 'left') ?: 'selected=\"selected\"' ?>><?= esc_html__('Left', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"top\" <?= !($settings['tooltipDirection'] == 'top') ?: 'selected=\"selected\"' ?>><?= esc_html__('Top', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"bottom\" <?= !($settings['tooltipDirection'] == 'bottom') ?: 'selected=\"selected\"' ?>><?= esc_html__('Bottom', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\" <?= !($settings['tooltipDirection'] == 'center') ?: 'selected=\"selected\"' ?>><?= esc_html__('Center', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipPermanentCheck\" class=\"batch-settings-check\" name=\"tooltipPermanentCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tooltipPermanent\"><?= esc_html__('Permanent', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipPermanent\" name=\"tooltipPermanent\" <?= !$settings['tooltipPermanent'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipStickyCheck\" class=\"batch-settings-check\" name=\"tooltipStickyCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tooltipSticky\"><?= esc_html__('Sticky', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipSticky\" name=\"tooltipSticky\" <?= !$settings['tooltipSticky'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tooltipOpacityCheck\" class=\"batch-settings-check\" name=\"tooltipOpacityCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"tooltipOpacity\"><?= esc_html__('Opacity', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"tooltipOpacity\" name=\"tooltipOpacity\" value=\"<?= $settings['tooltipOpacity'] ?>\" min=\"0\" max=\"1\" step=\"0.01\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"popupContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupOpenOnHoverCheck\" class=\"batch-settings-check\" name=\"popupOpenOnHoverCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupOpenOnHover\"><?= esc_html__('Open on hover', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupOpenOnHover\" name=\"popupOpenOnHover\" <?= !$settings['popupOpenOnHover'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCenterOnMapCheck\" class=\"batch-settings-check\" name=\"popupCenterOnMapCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupCenterOnMap\"><?= esc_html__('Center on map', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCenterOnMap\" name=\"popupCenterOnMap\" <?= !$settings['popupCenterOnMap'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupMarkernameCheck\" class=\"batch-settings-check\" name=\"popupMarkernameCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupMarkername\"><?= esc_html__('Show marker name', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupMarkername\" name=\"popupMarkername\" <?= !$settings['popupMarkername'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupAddressCheck\" class=\"batch-settings-check\" name=\"popupAddressCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupAddress\"><?= esc_html__('Show address', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupAddress\" name=\"popupAddress\" <?= !$settings['popupAddress'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCoordinatesCheck\" class=\"batch-settings-check\" name=\"popupCoordinatesCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupCoordinates\"><?= esc_html__('Show coordinates', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCoordinates\" name=\"popupCoordinates\" <?= !$settings['popupCoordinates'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupDirectionsCheck\" class=\"batch-settings-check\" name=\"popupDirectionsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupDirections\"><?= esc_html__('Show directions link', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupDirections\" name=\"popupDirections\" <?= !$settings['popupDirections'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupMinWidthCheck\" class=\"batch-settings-check\" name=\"popupMinWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupMinWidth\"><?= esc_html__('Min width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"popupMinWidth\" name=\"popupMinWidth\" value=\"<?= $settings['popupMinWidth'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupMaxWidthCheck\" class=\"batch-settings-check\" name=\"popupMaxWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupMaxWidth\"><?= esc_html__('Max width', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"popupMaxWidth\" name=\"popupMaxWidth\" value=\"<?= $settings['popupMaxWidth'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupMaxHeightCheck\" class=\"batch-settings-check\" name=\"popupMaxHeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupMaxHeight\"><?= esc_html__('Max height', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"popupMaxHeight\" name=\"popupMaxHeight\" value=\"<?= $settings['popupMaxHeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCloseButtonCheck\" class=\"batch-settings-check\" name=\"popupCloseButtonCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupCloseButton\"><?= esc_html__('Add close button', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupCloseButton\" name=\"popupCloseButton\" <?= !$settings['popupCloseButton'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupAutoCloseCheck\" class=\"batch-settings-check\" name=\"popupAutoCloseCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"popupAutoClose\"><?= esc_html__('Auto close', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"popupAutoClose\" name=\"popupAutoClose\" <?= !$settings['popupAutoClose'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"listContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listCheck\" class=\"batch-settings-check\" name=\"listCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"list\"><?= esc_html__('Show', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"list\" name=\"list\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"0\" <?= !($settings['list'] == '0') ?: 'selected=\"selected\"' ?>><?= esc_html__('None', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"1\" <?= !($settings['list'] == '1') ?: 'selected=\"selected\"' ?>><?= esc_html__('Below', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"2\" <?= !($settings['list'] == '2') ?: 'selected=\"selected\"' ?>><?= esc_html__('Right', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"3\" <?= !($settings['list'] == '3') ?: 'selected=\"selected\"' ?>><?= esc_html__('Left', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listWidthCheck\" class=\"batch-settings-check\" name=\"listWidthCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listWidth\"><?= esc_html__('Width', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"listWidth\" name=\"listWidth\" value=\"<?= $settings['listWidth'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listBreakpointCheck\" class=\"batch-settings-check\" name=\"listBreakpointCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listBreakpoint\"><?= esc_html__('Breakpoint', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"listBreakpoint\" name=\"listBreakpoint\" value=\"<?= $settings['listBreakpoint'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listSearchCheck\" class=\"batch-settings-check\" name=\"listSearchCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listSearch\"><?= esc_html__('Search and sort bar', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listSearch\" name=\"listSearch\" <?= !$settings['listSearch'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listIconCheck\" class=\"batch-settings-check\" name=\"listIconCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listIcon\"><?= esc_html__('Icon', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listIcon\" name=\"listIcon\" <?= !$settings['listIcon'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listNameCheck\" class=\"batch-settings-check\" name=\"listNameCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listName\"><?= esc_html__('Name', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listName\" name=\"listName\" <?= !$settings['listName'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listPopupCheck\" class=\"batch-settings-check\" name=\"listPopupCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listPopup\"><?= esc_html__('Popup', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listPopup\" name=\"listPopup\" <?= !$settings['listPopup'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listAddressCheck\" class=\"batch-settings-check\" name=\"listAddressCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listAddress\"><?= esc_html__('Address', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listAddress\" name=\"listAddress\" <?= !$settings['listAddress'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDistanceCheck\" class=\"batch-settings-check\" name=\"listDistanceCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listDistance\"><?= esc_html__('Distance', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDistance\" name=\"listDistance\" <?= !$settings['listDistance'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDistanceUnitCheck\" class=\"batch-settings-check\" name=\"listDistanceUnitCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listDistanceUnit\"><?= esc_html__('Distance unit', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"listDistanceUnit\" name=\"listDistanceUnit\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"metric\" <?= !($settings['listDistanceUnit'] == 'metric') ?: 'selected=\"selected\"' ?>><?= esc_html__('Metric', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"imperial\" <?= !($settings['listDistanceUnit'] == 'imperial') ?: 'selected=\"selected\"' ?>><?= esc_html__('Imperial', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"metric-imperial\" <?= !($settings['listDistanceUnit'] == 'metric-imperial') ?: 'selected=\"selected\"' ?>><?= esc_html__('Metric (imperial)', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"imperial-metric\" <?= !($settings['listDistanceUnit'] == 'imperial-metric') ?: 'selected=\"selected\"' ?>><?= esc_html__('Imperial (metric)', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDistancePrecisionCheck\" class=\"batch-settings-check\" name=\"listDistancePrecisionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listDistancePrecision\"><?= esc_html__('Distance precision', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"listDistancePrecision\" name=\"listDistancePrecision\" value=\"<?= $settings['listDistancePrecision'] ?>\" min=\"0\" max=\"6\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByCheck\" class=\"batch-settings-check\" name=\"listOrderByCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderBy\"><?= esc_html__('Default order by', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"listOrderBy\" name=\"listOrderBy\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"id\" <?= !($settings['listOrderBy'] == 'id') ?: 'selected=\"selected\"' ?>><?= esc_html__('ID', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"name\" <?= !($settings['listOrderBy'] == 'name') ?: 'selected=\"selected\"' ?>><?= esc_html__('Name', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"address\" <?= !($settings['listOrderBy'] == 'address') ?: 'selected=\"selected\"' ?>><?= esc_html__('Address', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"distance\" <?= !($settings['listOrderBy'] == 'distance') ?: 'selected=\"selected\"' ?>><?= esc_html__('Distance', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"icon\" <?= !($settings['listOrderBy'] == 'icon') ?: 'selected=\"selected\"' ?>><?= esc_html__('Icon', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"created\" <?= !($settings['listOrderBy'] == 'created') ?: 'selected=\"selected\"' ?>><?= esc_html__('Created', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"updated\" <?= !($settings['listOrderBy'] == 'updated') ?: 'selected=\"selected\"' ?>><?= esc_html__('Updated', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listSortOrderCheck\" class=\"batch-settings-check\" name=\"listSortOrderCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listSortOrder\"><?= esc_html__('Default sort order', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"listSortOrder\" name=\"listSortOrder\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"asc\" <?= !($settings['listSortOrder'] == 'asc') ?: 'selected=\"selected\"' ?>><?= esc_html__('Ascending', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"desc\" <?= !($settings['listSortOrder'] == 'desc') ?: 'selected=\"selected\"' ?>><?= esc_html__('Descending', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByIdCheck\" class=\"batch-settings-check\" name=\"listOrderByIdCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderById\"><?= esc_html__('ID', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderById\" name=\"listOrderById\" <?= !$settings['listOrderById'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByNameCheck\" class=\"batch-settings-check\" name=\"listOrderByNameCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByName\"><?= esc_html__('Name', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByName\" name=\"listOrderByName\" <?= !$settings['listOrderByName'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByAddressCheck\" class=\"batch-settings-check\" name=\"listOrderByAddressCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByAddress\"><?= esc_html__('Address', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByAddress\" name=\"listOrderByAddress\" <?= !$settings['listOrderByAddress'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByDistanceCheck\" class=\"batch-settings-check\" name=\"listOrderByDistanceCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByDistance\"><?= esc_html__('Distance', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByDistance\" name=\"listOrderByDistance\" <?= !$settings['listOrderByDistance'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByIconCheck\" class=\"batch-settings-check\" name=\"listOrderByIconCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByIcon\"><?= esc_html__('Icon', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByIcon\" name=\"listOrderByIcon\" <?= !$settings['listOrderByIcon'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByCreatedCheck\" class=\"batch-settings-check\" name=\"listOrderByCreatedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByCreated\"><?= esc_html__('Created', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByCreated\" name=\"listOrderByCreated\" <?= !$settings['listOrderByCreated'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByUpdatedCheck\" class=\"batch-settings-check\" name=\"listOrderByUpdatedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listOrderByUpdated\"><?= esc_html__('Updated', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listOrderByUpdated\" name=\"listOrderByUpdated\" <?= !$settings['listOrderByUpdated'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listLimitCheck\" class=\"batch-settings-check\" name=\"listLimitCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listLimit\"><?= esc_html__('Markers per page', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"listLimit\" name=\"listLimit\" value=\"<?= $settings['listLimit'] ?>\" min=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDirCheck\" class=\"batch-settings-check\" name=\"listDirCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listDir\"><?= esc_html__('Show directions link', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listDir\" name=\"listDir\" <?= !$settings['listDir'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listFsCheck\" class=\"batch-settings-check\" name=\"listFsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listFs\"><?= esc_html__('Show fullscreen link', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listFs\" name=\"listFs\" <?= !$settings['listFs'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"listActionCheck\" class=\"batch-settings-check\" name=\"listActionCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"listAction\"><?= esc_html__('List action', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"listAction\" name=\"listAction\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"none\" <?= !($settings['listAction'] == 'none') ?: 'selected=\"selected\"' ?>><?= esc_html__('None', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"setview\" <?= !($settings['listAction'] == 'setview') ?: 'selected=\"selected\"' ?>><?= esc_html__('Jump to marker', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"popup\" <?= !($settings['listAction'] == 'popup') ?: 'selected=\"selected\"' ?>><?= esc_html__('Open popup', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"interactionContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gestureHandlingCheck\" class=\"batch-settings-check\" name=\"gestureHandlingCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gestureHandling\"><?= esc_html__('Gesture handling', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gestureHandling\" name=\"gestureHandling\" <?= !$settings['gestureHandling'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"responsiveCheck\" class=\"batch-settings-check\" name=\"responsiveCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"responsive\"><?= esc_html__('Responsive map', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"responsive\" name=\"responsive\" <?= !$settings['responsive'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"boxZoomCheck\" class=\"batch-settings-check\" name=\"boxZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"boxZoom\"><?= esc_html__('Box zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"boxZoom\" name=\"boxZoom\" <?= !$settings['boxZoom'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"doubleClickZoomCheck\" class=\"batch-settings-check\" name=\"doubleClickZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"doubleClickZoom\"><?= esc_html__('Double click zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"doubleClickZoom\" name=\"doubleClickZoom\" <?= !$settings['doubleClickZoom'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"draggingCheck\" class=\"batch-settings-check\" name=\"draggingCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"dragging\"><?= esc_html__('Dragging', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"dragging\" name=\"dragging\" <?= !$settings['dragging'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"inertiaCheck\" class=\"batch-settings-check\" name=\"inertiaCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"inertia\"><?= esc_html__('Inertia', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"inertia\" name=\"inertia\" <?= !$settings['inertia'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"inertiaDecelerationCheck\" class=\"batch-settings-check\" name=\"inertiaDecelerationCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"inertiaDeceleration\"><?= esc_html__('Inertia deceleration', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"inertiaDeceleration\" name=\"inertiaDeceleration\" value=\"<?= $settings['inertiaDeceleration'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"inertiaMaxSpeedCheck\" class=\"batch-settings-check\" name=\"inertiaMaxSpeedCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"inertiaMaxSpeed\"><?= esc_html__('Inertia max speed', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"inertiaMaxSpeed\" name=\"inertiaMaxSpeed\" value=\"<?= $settings['inertiaMaxSpeed'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"keyboardCheck\" class=\"batch-settings-check\" name=\"keyboardCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"keyboard\"><?= esc_html__('Keyboard navigation', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"keyboard\" name=\"keyboard\" <?= !$settings['keyboard'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"keyboardPanDeltaCheck\" class=\"batch-settings-check\" name=\"keyboardPanDeltaCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"keyboardPanDelta\"><?= esc_html__('Keyboard pan delta', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"keyboardPanDelta\" name=\"keyboardPanDelta\" value=\"<?= $settings['keyboardPanDelta'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scrollWheelZoomCheck\" class=\"batch-settings-check\" name=\"scrollWheelZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"scrollWheelZoom\"><?= esc_html__('Scroll wheel zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"scrollWheelZoom\" name=\"scrollWheelZoom\" <?= !$settings['scrollWheelZoom'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"touchZoomCheck\" class=\"batch-settings-check\" name=\"touchZoomCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"touchZoom\"><?= esc_html__('Two finger zoom', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"touchZoom\" name=\"touchZoom\" <?= !$settings['touchZoom'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"bounceAtZoomLimitsCheck\" class=\"batch-settings-check\" name=\"bounceAtZoomLimitsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"bounceAtZoomLimits\"><?= esc_html__('Bounce at zoom limits', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"bounceAtZoomLimits\" name=\"bounceAtZoomLimits\" <?= !$settings['bounceAtZoomLimits'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"trackContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxIconsCheck\" class=\"batch-settings-check\" name=\"gpxIconsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxIcons\"><?= esc_html__('Show start/end icons', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxIcons\" name=\"gpxIcons\" <?= !$settings['gpxIcons'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxTrackSmoothFactorCheck\" class=\"batch-settings-check\" name=\"gpxTrackSmoothFactorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxTrackSmoothFactor\"><?= esc_html__('Track smooth factor', 'mmp') ?>*</label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxTrackSmoothFactor\" name=\"gpxTrackSmoothFactor\" value=\"<?= $settings['gpxTrackSmoothFactor'] ?>\" min=\"0\" step=\"0.1\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxTrackColorCheck\" class=\"batch-settings-check\" name=\"gpxTrackColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxTrackColor\"><?= esc_html__('Track color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxTrackColor\" name=\"gpxTrackColor\" value=\"<?= $settings['gpxTrackColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxTrackWeightCheck\" class=\"batch-settings-check\" name=\"gpxTrackWeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxTrackWeight\"><?= esc_html__('Track weight', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxTrackWeight\" name=\"gpxTrackWeight\" value=\"<?= $settings['gpxTrackWeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxTrackOpacityCheck\" class=\"batch-settings-check\" name=\"gpxTrackOpacityCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxTrackOpacity\"><?= esc_html__('Track opacity', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxTrackOpacity\" name=\"gpxTrackOpacity\" value=\"<?= $settings['gpxTrackOpacity'] ?>\" min=\"0\" max=\"1\" step=\"0.01\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"metadataContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaCheck\" class=\"batch-settings-check\" name=\"gpxMetaCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMeta\"><?= esc_html__('Add popup to track', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMeta\" name=\"gpxMeta\" <?= !$settings['gpxMeta'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaUnitsCheck\" class=\"batch-settings-check\" name=\"gpxMetaUnitsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaUnits\"><?= esc_html__('Units', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"gpxMetaUnits\" name=\"gpxMetaUnits\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"metric\" <?= !($settings['gpxMetaUnits'] == 'metric') ?: 'selected=\"selected\"' ?>><?= esc_html__('Metric', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"imperial\" <?= !($settings['gpxMetaUnits'] == 'imperial') ?: 'selected=\"selected\"' ?>><?= esc_html__('Imperial', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"metric-imperial\" <?= !($settings['gpxMetaUnits'] == 'metric-imperial') ?: 'selected=\"selected\"' ?>><?= esc_html__('Metric (imperial)', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"imperial-metric\" <?= !($settings['gpxMetaUnits'] == 'imperial-metric') ?: 'selected=\"selected\"' ?>><?= esc_html__('Imperial (metric)', 'mmp') ?></option>\r\n\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaIntervalCheck\" class=\"batch-settings-check\" name=\"gpxMetaIntervalCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaInterval\"><?= esc_html__('Max interval', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxMetaInterval\" name=\"gpxMetaInterval\" value=\"<?= $settings['gpxMetaInterval'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaNameCheck\" class=\"batch-settings-check\" name=\"gpxMetaNameCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaName\"><?= esc_html__('Name', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaName\" name=\"gpxMetaName\" <?= !$settings['gpxMetaName'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDescCheck\" class=\"batch-settings-check\" name=\"gpxMetaDescCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaDesc\"><?= esc_html__('Description', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDesc\" name=\"gpxMetaDesc\" <?= !$settings['gpxMetaDesc'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaStartCheck\" class=\"batch-settings-check\" name=\"gpxMetaStartCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaStart\"><?= esc_html__('Start', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaStart\" name=\"gpxMetaStart\" <?= !$settings['gpxMetaStart'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaEndCheck\" class=\"batch-settings-check\" name=\"gpxMetaEndCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaEnd\"><?= esc_html__('End', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaEnd\" name=\"gpxMetaEnd\" <?= !$settings['gpxMetaEnd'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaTotalCheck\" class=\"batch-settings-check\" name=\"gpxMetaTotalCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaTotal\"><?= esc_html__('Total', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaTotal\" name=\"gpxMetaTotal\" <?= !$settings['gpxMetaTotal'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaMovingCheck\" class=\"batch-settings-check\" name=\"gpxMetaMovingCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaMoving\"><?= esc_html__('Moving', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaMoving\" name=\"gpxMetaMoving\" <?= !$settings['gpxMetaMoving'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDistanceCheck\" class=\"batch-settings-check\" name=\"gpxMetaDistanceCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaDistance\"><?= esc_html__('Distance', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDistance\" name=\"gpxMetaDistance\" <?= !$settings['gpxMetaDistance'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaPaceCheck\" class=\"batch-settings-check\" name=\"gpxMetaPaceCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaPace\"><?= esc_html__('Pace', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaPace\" name=\"gpxMetaPace\" <?= !$settings['gpxMetaPace'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaHeartRateCheck\" class=\"batch-settings-check\" name=\"gpxMetaHeartRateCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaHeartRate\"><?= esc_html__('Heart rate', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaHeartRate\" name=\"gpxMetaHeartRate\" <?= !$settings['gpxMetaHeartRate'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaElevationCheck\" class=\"batch-settings-check\" name=\"gpxMetaElevationCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaElevation\"><?= esc_html__('Elevation', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaElevation\" name=\"gpxMetaElevation\" <?= !$settings['gpxMetaElevation'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDownloadCheck\" class=\"batch-settings-check\" name=\"gpxMetaDownloadCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxMetaDownload\"><?= esc_html__('Download', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxMetaDownload\" name=\"gpxMetaDownload\" <?= !$settings['gpxMetaDownload'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"waypointsContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypoints\"><?= esc_html__('Show', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypoints\" name=\"gpxWaypoints\" <?= !$settings['gpxWaypoints'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsRadiusCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsRadiusCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsRadius\"><?= esc_html__('Waypoints radius', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxWaypointsRadius\" name=\"gpxWaypointsRadius\" value=\"<?= $settings['gpxWaypointsRadius'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsStrokeCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsStrokeCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsStroke\"><?= esc_html__('Stroke', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsStroke\" name=\"gpxWaypointsStroke\" <?= !$settings['gpxWaypointsStroke'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsColorCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsColor\"><?= esc_html__('Stroke color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxWaypointsColor\" name=\"gpxWaypointsColor\" value=\"<?= $settings['gpxWaypointsColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsWeightCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsWeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsWeight\"><?= esc_html__('Stroke weight', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxWaypointsWeight\" name=\"gpxWaypointsWeight\" value=\"<?= $settings['gpxWaypointsWeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsFillColorCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsFillColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsFillColor\"><?= esc_html__('Fill color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxWaypointsFillColor\" name=\"gpxWaypointsFillColor\" value=\"<?= $settings['gpxWaypointsFillColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxWaypointsFillOpacityCheck\" class=\"batch-settings-check\" name=\"gpxWaypointsFillOpacityCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxWaypointsFillOpacity\"><?= esc_html__('Fill opacity', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxWaypointsFillOpacity\" name=\"gpxWaypointsFillOpacity\" value=\"<?= $settings['gpxWaypointsFillOpacity'] ?>\" min=\"0\" max=\"1\" step=\"0.01\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"elevationChartContent\" class=\"mmp-map-batch-settings-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartCheck\" class=\"batch-settings-check\" name=\"gpxChartCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChart\"><?= esc_html__('Show', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChart\" name=\"gpxChart\" <?= !$settings['gpxChart'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartHeightCheck\" class=\"batch-settings-check\" name=\"gpxChartHeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartHeight\"><?= esc_html__('Height', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartHeight\" name=\"gpxChartHeight\" value=\"<?= $settings['gpxChartHeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartBgColorCheck\" class=\"batch-settings-check\" name=\"gpxChartBgColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartBgColor\"><?= esc_html__('Background color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartBgColor\" name=\"gpxChartBgColor\" value=\"<?= $settings['gpxChartBgColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolylineCheck\" class=\"batch-settings-check\" name=\"gpxChartPolylineCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartPolyline\"><?= esc_html__('Chart stroke', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolyline\" name=\"gpxChartPolyline\" <?= !$settings['gpxChartPolyline'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolylineColorCheck\" class=\"batch-settings-check\" name=\"gpxChartPolylineColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartPolylineColor\"><?= esc_html__('Chart stroke color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartPolylineColor\" name=\"gpxChartPolylineColor\" value=\"<?= $settings['gpxChartPolylineColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolylineWeightCheck\" class=\"batch-settings-check\" name=\"gpxChartPolylineWeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartPolylineWeight\"><?= esc_html__('Chart stroke weight', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartPolylineWeight\" name=\"gpxChartPolylineWeight\" value=\"<?= $settings['gpxChartPolylineWeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolygonCheck\" class=\"batch-settings-check\" name=\"gpxChartPolygonCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartPolygon\"><?= esc_html__('Chart fill', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolygon\" name=\"gpxChartPolygon\" <?= !$settings['gpxChartPolygon'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartPolygonFillColorCheck\" class=\"batch-settings-check\" name=\"gpxChartPolygonFillColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartPolygonFillColor\"><?= esc_html__('Chart fill color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartPolygonFillColor\" name=\"gpxChartPolygonFillColor\" value=\"<?= $settings['gpxChartPolygonFillColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartIndicatorCheck\" class=\"batch-settings-check\" name=\"gpxChartIndicatorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartIndicator\"><?= esc_html__('Indicator', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartIndicator\" name=\"gpxChartIndicator\" <?= !$settings['gpxChartIndicator'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartIndicatorColorCheck\" class=\"batch-settings-check\" name=\"gpxChartIndicatorColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartIndicatorColor\"><?= esc_html__('Indicator color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartIndicatorColor\" name=\"gpxChartIndicatorColor\" value=\"<?= $settings['gpxChartIndicatorColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartIndicatorWeightCheck\" class=\"batch-settings-check\" name=\"gpxChartIndicatorWeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartIndicatorWeight\"><?= esc_html__('Indicator weight', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartIndicatorWeight\" name=\"gpxChartIndicatorWeight\" value=\"<?= $settings['gpxChartIndicatorWeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocator\"><?= esc_html__('Locator', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocator\" name=\"gpxChartLocator\" <?= !$settings['gpxChartLocator'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorRadiusCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorRadiusCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorRadius\"><?= esc_html__('Locator radius', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartLocatorRadius\" name=\"gpxChartLocatorRadius\" value=\"<?= $settings['gpxChartLocatorRadius'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorStrokeCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorStrokeCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorStroke\"><?= esc_html__('Locator stroke', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"switch\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorStroke\" name=\"gpxChartLocatorStroke\" <?= !$settings['gpxChartLocatorStroke'] ?: 'checked=\"checked\"' ?> />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"slider\"></span>\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</label>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorColorCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorColor\"><?= esc_html__('Locator stroke color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartLocatorColor\" name=\"gpxChartLocatorColor\" value=\"<?= $settings['gpxChartLocatorColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorWeightCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorWeightCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorWeight\"><?= esc_html__('Locator stroke weight', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartLocatorWeight\" name=\"gpxChartLocatorWeight\" value=\"<?= $settings['gpxChartLocatorWeight'] ?>\" min=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorFillColorCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorFillColorCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorFillColor\"><?= esc_html__('Locator fill color', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"gpxChartLocatorFillColor\" name=\"gpxChartLocatorFillColor\" value=\"<?= $settings['gpxChartLocatorFillColor'] ?>\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"mmp-map-batch-setting mmp-advanced\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"mmp-map-setting-desc\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gpxChartLocatorFillOpacityCheck\" class=\"batch-settings-check\" name=\"gpxChartLocatorFillOpacityCheck\" />\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"gpxChartLocatorFillOpacity\"><?= esc_html__('Locator fill opacity', 'mmp') ?></label>\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=\"mmp-map-setting-input\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"gpxChartLocatorFillOpacity\" name=\"gpxChartLocatorFillOpacity\" value=\"<?= $settings['gpxChartLocatorFillOpacity'] ?>\" min=\"0\" max=\"1\" step=\"0.01\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<label><input name=\"batch_settings_mode\" type=\"radio\" value=\"all\" checked=\"checked\" /> <?= esc_html__('Apply settings to all maps', 'mmp') ?></label><br />\r\n\t\t\t\t\t\t\t<label><input name=\"batch_settings_mode\" type=\"radio\" value=\"include\" /> <?= esc_html__('Apply settings to these maps', 'mmp') ?></label><br />\r\n\t\t\t\t\t\t\t<select id=\"batch_settings_maps\" name=\"batch_settings_maps[]\" multiple=\"multiple\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<button type=\"button\" id=\"save_batch_settings\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-batch-settings') ?>\"><?= esc_html__('Save', 'mmp') ?></button>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"batch_layers_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Batch update layers', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<form id=\"mapLayers\" method=\"POST\">\r\n\t\t\t\t\t\t\t<ul id=\"basemapList\"></ul>\r\n\t\t\t\t\t\t\t<select id=\"basemapsList\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($basemaps as $bid => $basemaps): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $bid ?>\"><?= esc_html($basemaps['name']) ?></option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<button type=\"button\" id=\"basemapsAdd\" class=\"button button-secondary\"><?= esc_html__('Add basemap', 'mmp') ?></button><br />\r\n\t\t\t\t\t\t\t<ul id=\"overlayList\"></ul>\r\n\t\t\t\t\t\t\t<select id=\"overlaysList\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($overlays as $oid => $overlays): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $oid ?>\"><?= esc_html($overlays['name']) ?></option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<button type=\"button\" id=\"overlaysAdd\" class=\"button button-secondary\"><?= esc_html__('Add overlay', 'mmp') ?></button><br />\r\n\t\t\t\t\t\t\t<label><input name=\"batch_layers_mode\" type=\"radio\" value=\"all\" checked=\"checked\" /> <?= esc_html__('Apply settings to all maps', 'mmp') ?></label><br />\r\n\t\t\t\t\t\t\t<label><input name=\"batch_layers_mode\" type=\"radio\" value=\"include\" /> <?= esc_html__('Apply settings to these maps', 'mmp') ?></label><br />\r\n\t\t\t\t\t\t\t<select id=\"batch_layers_maps\" name=\"batch_layers_maps[]\" multiple=\"multiple\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<button type=\"button\" id=\"save_batch_layers\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-batch-layers') ?>\"><?= esc_html__('Save', 'mmp') ?></button>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"replace_icon_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Replace marker icons', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<input type=\"hidden\" id=\"replaceIcon\" value=\"0\" />\r\n\t\t\t\t\t\t<?= esc_html__('Icon to replace', 'mmp') ?>: <img id=\"sourceIcon\" class=\"mmp-align-middle\" src=\"<?= plugins_url('images/leaflet/marker.png', __DIR__) ?>\" /><br />\r\n\t\t\t\t\t\t<?= esc_html__('Replacement icon', 'mmp') ?>: <img id=\"targetIcon\" class=\"mmp-align-middle\" src=\"<?= plugins_url('images/leaflet/marker.png', __DIR__) ?>\" /><br />\r\n\t\t\t\t\t\t<button type=\"button\" id=\"replace_icon\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-replace-icon') ?>\"><?= esc_html__('Replace', 'mmp') ?></button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"move_markers_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Move markers to a map', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t<?= esc_html__('Source', 'mmp') ?>\r\n\t\t\t\t\t\t\t<select id=\"move_markers_source\" name=\"move_markers_source\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</label><br />\r\n\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t<?= esc_html__('Target', 'mmp') ?>\r\n\t\t\t\t\t\t\t<select id=\"move_markers_target\" name=\"move_markers_target\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</label><br />\r\n\t\t\t\t\t\t<button type=\"button\" id=\"move_markers\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-move-markers') ?>\"><?= esc_html__('Move markers', 'mmp') ?></button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"remove_markers_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Remove all markers from a map', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><?= esc_html__('Note: markers are only unassigned, but not deleted.', 'mmp') ?></p>\r\n\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t<?= esc_html__('Source', 'mmp') ?>\r\n\t\t\t\t\t\t\t<select id=\"remove_markers_map\" name=\"remove_markers_map\">\r\n\t\t\t\t\t\t\t\t<?php if ($maps !== null): ?>\r\n\t\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</label><br />\r\n\t\t\t\t\t\t<button type=\"button\" id=\"remove_markers\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-remove-markers') ?>\"><?= esc_html__('Remove markers', 'mmp') ?></button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"register_strings_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Register strings for translation', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<?php if (!$l10n->ml): ?>\r\n\t\t\t\t\t\t\t<p><a href=\"https://www.mapsmarker.com/multilingual/\" target=\"_blank\"><?= esc_html__('No supported multilingual plugin installed.', 'mmp') ?></a></p>\r\n\t\t\t\t\t\t<?php else: ?>\r\n\t\t\t\t\t\t\t<button type=\"button\" id=\"register_strings\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-register-strings') ?>\"><?= esc_html__('Register strings', 'mmp') ?></button>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"import_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t<div id=\"import\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Import markers', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?= sprintf(esc_html__('Import file needs to be in GeoJSON format. For more details about the import feature and a tutorial on how to convert other formats into GeoJSON, please visit %1$s.', 'mmp'), '<a href=\"https://www.mapsmarker.com/import-export/\" target=\"_blank\">https://www.mapsmarker.com/import-export/</a>') ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t<form id=\"import_form\" method=\"POST\">\r\n\t\t\t\t\t\t\t<input name=\"action\" type=\"hidden\" value=\"mmp_import\" />\r\n\t\t\t\t\t\t\t<input name=\"nonce\" type=\"hidden\" value=\"<?= wp_create_nonce('mmp-tools-import') ?>\" />\r\n\t\t\t\t\t\t\t<div id=\"import_log\" class=\"mmp-log\"></div>\r\n\t\t\t\t\t\t\t<?= esc_html__('Test mode', 'mmp') ?>:<br />\r\n\t\t\t\t\t\t\t<input name=\"test_mode\" type=\"radio\" value=\"on\" checked=\"checked\" /> <?= esc_html__('On', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"test_mode\" type=\"radio\" value=\"off\" /> <?= esc_html__('Off', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<?= esc_html__('Marker mode', 'mmp') ?>:<br />\r\n\t\t\t\t\t\t\t<input name=\"marker_mode\" type=\"radio\" value=\"add\" checked=\"checked\" /> <?= esc_html__('Add markers', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"marker_mode\" type=\"radio\" value=\"update\" /> <?= esc_html__('Update markers', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"marker_mode\" type=\"radio\" value=\"both\" /> <?= esc_html__('Update existing, add remaining', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<?= esc_html__('Geocoding', 'mmp') ?>:<br />\r\n\t\t\t\t\t\t\t<input name=\"geocoding\" type=\"radio\" value=\"off\" checked=\"checked\" /> <?= esc_html__('Off (markers with missing coordinates will be skipped)', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"geocoding\" type=\"radio\" value=\"missing\" /> <?= esc_html__('Missing (markers with missing coordinates will be geocoded)', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"geocoding\" type=\"radio\" value=\"on\" /> <?= esc_html__('On (all markers will be geocoded)', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<button id=\"import_start\" class=\"button button-primary\" disabled=\"disabled\"><?= esc_html__('Start import', 'mmp') ?></button>\r\n\t\t\t\t\t\t\t<input id=\"import_file\" name=\"file\" type=\"file\" />\r\n\t\t\t\t\t\t\t<input id=\"import_max_size\" type=\"hidden\" value=\"<?= $upload->get_max_upload_size(); ?>\" />\r\n\t\t\t\t\t\t\t<span id=\"import_filesize_error\">(<?= esc_html__('Maximum upload size exceeded', 'mmp') ?>)</span>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"export_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t<div id=\"export\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Export markers', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?= sprintf(esc_html__('Markers will be exported to GeoJSON format. For more details about the export feature and a tutorial on how to convert the output file into other formats, please visit %1$s.', 'mmp'), '<a href=\"https://www.mapsmarker.com/import-export/\" target=\"_blank\">https://www.mapsmarker.com/import-export/</a>') ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t<form id=\"export_form\" method=\"POST\">\r\n\t\t\t\t\t\t\t<input name=\"action\" type=\"hidden\" value=\"mmp_export\" />\r\n\t\t\t\t\t\t\t<input name=\"nonce\" type=\"hidden\" value=\"<?= wp_create_nonce('mmp-tools-export') ?>\" />\r\n\t\t\t\t\t\t\t<div id=\"export_log\" class=\"mmp-log\"></div>\r\n\t\t\t\t\t\t\t<?= esc_html__('Filter mode', 'mmp') ?>:<br />\r\n\t\t\t\t\t\t\t<input name=\"filter_mode\" type=\"radio\" value=\"all\" checked=\"checked\" /> <?= esc_html__('All markers', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<input name=\"filter_mode\" type=\"radio\" value=\"include\" /> <?= esc_html__('Only markers from these maps', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<select id=\"export_include\" name=\"filter_include[]\" multiple=\"multiple\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<input name=\"filter_mode\" type=\"radio\" value=\"exclude\" /> <?= esc_html__('All markers except from these maps', 'mmp') ?><br />\r\n\t\t\t\t\t\t\t<select id=\"export_exclude\" name=\"filter_exclude[]\" multiple=\"multiple\">\r\n\t\t\t\t\t\t\t\t<?php foreach ($maps as $map): ?>\r\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $map->id ?>\">[<?= $map->id ?>] <?= esc_html($map->name) ?> (<?= $map->markers ?> <?= esc_html__('markers', 'mmp') ?>)</option>\r\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t\t\t</select><br />\r\n\t\t\t\t\t\t\t<button id=\"export_start\" class=\"button button-primary\"><?= esc_html__('Start export', 'mmp') ?></button>\r\n\t\t\t\t\t\t</form>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"backup_restore_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t<div id=\"backup_restore_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Backup or restore database', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?= esc_html__('This includes custom layers, maps, markers and relationships. Settings need to be backed up separately.', 'mmp') ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t<div id=\"backup_log\" class=\"mmp-log\"></div>\r\n\t\t\t\t\t\t<div class=\"mmp-progress-bar\">\r\n\t\t\t\t\t\t\t<div id=\"backup_progress\" class=\"mmp-progress-bar-fill\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<button id=\"backup_start\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-backup') ?>\"><?= esc_html__('Start backup', 'mmp') ?></button>\r\n\t\t\t\t\t\t<div class=\"mmp-restore\">\r\n\t\t\t\t\t\t\t<p class=\"mmp-warning\"><?= esc_html__('WARNING: If you restore a backup, the entire Maps Marker Pro database will be wiped and replaced with the data from the file. This cannot be undone.', 'mmp') ?></p>\r\n\t\t\t\t\t\t\t<button id=\"restore_start\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-restore-backup') ?>\" disabled=\"disabled\"><?= esc_html__('Restore backup', 'mmp') ?></button>\r\n\t\t\t\t\t\t\t<input id=\"backup_max_size\" type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<?= $upload->get_max_upload_size(); ?>\" />\r\n\t\t\t\t\t\t\t<input id=\"backup_file\" name=\"file\" type=\"file\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"update_settings_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Backup or restore settings', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?= esc_html__('Below are your current settings, encoded in JSON. Use copy and paste to create or restore a backup.', 'mmp') ?><br/>\r\n\t\t\t\t\t\t\t<?= sprintf(esc_html__('Please be aware that restoring settings from a version other than %1$s will result in settings that have been added, changed or removed in this version to revert to their default values.', 'mmp'), Maps_Marker_Pro::$version) ?><br />\r\n\t\t\t\t\t\t\t<?= sprintf($l10n->kses__('In case of any issues, you can always <a href=\"%1$s\">reset the plugin settings</a>.', 'mmp'), get_admin_url(null, 'admin.php?page=mapsmarkerpro_tools#reset')) ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t<textarea id=\"settings\" class=\"mmp-tools-settings\" name=\"settings\"><?= json_encode(array_map('htmlspecialchars_decode', Maps_Marker_Pro::$settings)) ?></textarea><br />\r\n\t\t\t\t\t\t<button type=\"button\" id=\"update_settings\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-update-settings') ?>\"><?= esc_html__('Update settings', 'mmp') ?></button>\r\n\t\t\t\t\t\t<?php if (is_multisite() && is_super_admin()): ?>\r\n\t\t\t\t\t\t\t<label><input type=\"checkbox\" id=\"update_settings_multisite\" name=\"update_settings_multisite\" /><?= esc_html__('Multisite-only: also update settings on all subsites', 'mmp') ?></label>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<?php if ($old_version !== false): ?>\r\n\t\t\t\t<div id=\"migration_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t\t<div id=\"data_migration\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t\t<h2><?= esc_html__('Maps Marker Pro 3.1.1 data migration', 'mmp') ?></h2>\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<?php if ($old_version === '3.1.1'): ?>\r\n\t\t\t\t\t\t\t\t<p><?= esc_html__('Maps Marker Pro 4.0 was completely rewritten from scratch and received a new database structure. As a result, existing data needs to be migrated. To make this as risk-free as possible, the plugin folder was renamed (which means it is considered a different plugin by WordPress) and a new database was created. This allows you to easily go back to the old plugin, should you encounter any issues, by simply deactivating this version and reactivating Maps Marker 3.1.1.', 'mmp') ?></p>\r\n\t\t\t\t\t\t\t\t<p class=\"mmp-warning\"><?= esc_html__('Warning: If you migrate your data, any maps or markers created with Maps Marker Pro 4.0 will be deleted and replaced with the Maps Marker Pro 3.1.1 data (which will remain unchanged). This cannot be undone.', 'mmp') ?></p>\r\n\t\t\t\t\t\t\t\t<p><?= sprintf(esc_html__('Please do not delete Maps Marker Pro 3.1.1 until you have verified that all data has been migrated correctly. We also recommend to make a backup of the %1$s and %2$s database tables, to be able to run the migration again at a later point, should it become necessary.', 'mmp'), \"<code>{$wpdb->prefix}leafletmapsmarker_layers</code>\", \"<code>{$wpdb->prefix}leafletmapsmarker_markers</code>\") ?></p>\r\n\t\t\t\t\t\t\t\t<p><?= esc_html__('Starting with Maps Marker Pro 4.0, marker maps have been deprecated, but can still be used for backwards compatibility. However, additional shortcode attributes are needed in order to make them look the same. Due to the high risk of doing this programmatically, we require you to replace these shortcodes manually. Start the migration check to get a list of used shortcodes and how they need to be updated. Only shortcodes in posts and pages can be detected, so please also check if you are using any shortcodes in widgets or other places. This only affects shortcodes for marker maps. Shortcodes for layer maps do not need to be updated.', 'mmp') ?></p>\r\n\t\t\t\t\t\t\t\t<div id=\"migration_log\"></div>\r\n\t\t\t\t\t\t\t\t<button id=\"data_migration_check\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-check-migration') ?>\"><?= esc_html__('Check migration', 'mmp') ?></button>\r\n\t\t\t\t\t\t\t\t<button id=\"data_migration_start\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-migration') ?>\" disabled=\"disabled\"><?= esc_html__('Start migration', 'mmp') ?></button>\r\n\t\t\t\t\t\t\t<?php else: ?>\r\n\t\t\t\t\t\t\t\t<?= sprintf($l10n->kses__('If you want to copy your existing maps to this version, you need to update the old Maps Marker Pro installation to version %1$s first.', 'mmp'), '3.1.1') ?>\r\n\t\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<div id=\"reset_tab_content\" class=\"mmp-tools-tab\">\r\n\t\t\t\t<div id=\"reset_database_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Reset database', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><?= esc_html__('This will reset the Maps Marker Pro database. All custom layers, maps, markers and relationships will be deleted. Settings are not affected.', 'mmp') ?></p>\r\n\t\t\t\t\t\t<p class=\"mmp-warning\"><?= esc_html__('WARNING: this cannot be undone.', 'mmp') ?></p>\r\n\t\t\t\t\t\t<button type=\"button\" id=\"reset_database\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-reset-db') ?>\" disabled=\"disabled\"><?= esc_html__('Reset database', 'mmp') ?></button>\r\n\t\t\t\t\t\t<label><input type=\"checkbox\" id=\"reset_database_confirm\" name=\"reset_database_confirm\" /><?= esc_html__('Are you sure?', 'mmp') ?></label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div id=\"reset_settings_section\" class=\"mmp-tools-section\">\r\n\t\t\t\t\t<h2><?= esc_html__('Reset settings', 'mmp') ?></h2>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><?= esc_html__('This will reset the Maps Marker Pro settings to their default values.', 'mmp') ?></p>\r\n\t\t\t\t\t\t<p class=\"mmp-warning\"><?= esc_html__('WARNING: this cannot be undone.', 'mmp') ?></p>\r\n\t\t\t\t\t\t<button type=\"button\" id=\"reset_settings\" class=\"button button-primary\" data-nonce=\"<?= wp_create_nonce('mmp-tools-reset-settings') ?>\" disabled=\"disabled\"><?= esc_html__('Reset settings', 'mmp') ?></button>\r\n\t\t\t\t\t\t<label><input type=\"checkbox\" id=\"reset_settings_confirm\" name=\"reset_settings_confirm\" /><?= esc_html__('Are you sure?', 'mmp') ?></label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"icons\" class=\"mmp-hidden\">\r\n\t\t\t\t<div id=\"iconsList\">\r\n\t\t\t\t\t<img class=\"mmp-icon\" src=\"<?= plugins_url('images/leaflet/marker.png', __DIR__) ?>\" />\r\n\t\t\t\t\t<?php foreach ($upload->get_icons() as $icon): ?>\r\n\t\t\t\t\t\t<img class=\"mmp-icon\" src=\"<?= Maps_Marker_Pro::$icons_url . $icon ?>\" />\r\n\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "public function viewSupplies() {\n\t\t//SQL\n\t\t$servername = \"localhost\";\n\t\t$username = \"root\";\n\t\t$password = \"\";\n\t\t$dbname = \"a2Database\";\n\n\t\t// Create connection\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\n\t\t// Check connection\n\t\tif ($conn->connect_error) {\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t\t} \n\n\t\t$sql = \"SELECT * FROM supplies\";\n\t\t$result = $conn->query($sql);\n\n\t\tif ($result->num_rows > 0) {\n\t\t\t// output data of each row\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\techo \"<br>code: \" . $row[\"code\"]. \"<br> name: \" . $row[\"name\"]. \"<br> description: \" . $row[\"description\"] . \"<br> receiving_cost: \" . $row[\"receiving_cost\"] . \"<br> receiving_unit: \" . $row[\"receiving_unit\"] . \"<br> stocking_unit: \" . $row[\"stocking_unit\"] . \"<br> quantity: \" . $row[\"quantity\"] .\"<br>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0 results\";\n\t\t}\n\t\t$conn->close();\n\t\t//SQL//\n\t}", "public function displayMedia()\n {\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CC begin\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CC end\n }", "function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "function warquest_home_welcome() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $config;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\tglobal $output;\r\n\t\r\n\t$output->title = t('HOME_OVERVIEW_TITLE');\r\n\t\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('HOME_OVERVIEW_TITLE').'</div>';\r\n\t\r\n\t$page .= '<div class=\"box\">';\r\n\r\n\tif ($player->lid <= 5) {\r\n\t\r\n\t\t$page .= '<br/>';\r\n\t\r\n\t\t$query1 = 'select ugid from unit_group where type=2 and planet='.$player->planet;\r\n\t\t$result1 = warquest_db_query($query1);\r\n\t\t$data1 = warquest_db_fetch_object($result1);\r\n\r\n\t\t$query2 = 'select bgid from building_group where planet='.$player->planet.' order by bgid limit 1';\r\n\t\t$result2 = warquest_db_query($query2);\r\n\t\t$data2 = warquest_db_fetch_object($result2);\r\n\t\r\n\t\t$page .= warquest_image('other/commander.jpg', ' align=\"left\" width=\"160\" height=\"120\" ');\r\n\t\t\r\n\t\t$page .= t('HOME_WELCOME', warquest_rank($player->lid), player_format($player->pid, $player->name, $player->country));\r\n\t\t$page .= '<br/><br/>';\r\n\t\r\n\t\t$page .= t('HOME_INTRO_MISSIONS', warquest_link('mid='.MENU_MISSIONS.'&sid='.PAGE_MISSION_PLAYER.'&ssid='.warquest_get_default_mission($player->planet),t('LINK_MISSIONS'), 'mission1'));\r\n\t\t$page .= t('HOME_INTRO_BATTLES', warquest_link('mid='.MENU_BATTLE.'&sid='.PAGE_ENEMIES,t('LINK_BATTLES'), 'battle1'));\r\n\t\t$page .= t('HOME_INTRO_UNITS', warquest_link('mid='.MENU_UNITS.'&sid='.PAGE_UNIT_PLAYER.'&ssid='.$data1->ugid, t('LINK_UNITS'), 'unit1'));\r\n\t\t$page .= t('HOME_INTRO_BUILDINGS', warquest_link('mid='.MENU_BUILDINGS.'&sid='.$data2->bgid, t('LINK_BUILDINGS'), 'building1'));\r\n\t\t\r\n\t\t$page .= '<br/>';\t\t\t\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\t/*$query1 = 'select count(pid) as count, sum(won) as won from player';\r\n\t\t$result1 = warquest_db_query($query1); \r\n\t\t$data1 = warquest_db_fetch_object($result1);*/\r\n\t\t\r\n\t\t/*$query = 'select distinct(country) from player';\r\n\t\t$result = warquest_db_query($query); \r\n\t\t$count = warquest_db_num_rows($result);*/\r\n\t\t\t\r\n\t\t$query2 = 'select pid from player where country=\"'.$player->country.'\" and experience>='.$player->experience;\r\n\t\t$result2 = warquest_db_query($query2);\r\n\t\t$count2 = warquest_db_num_rows($result2);\r\n\t\t\r\n\t\t$query3 = 'select pid from player where experience>='.$player->experience.' and country!=\"EU\"';\r\n\t\t$result3 = warquest_db_query($query3);\r\n\t\t$count3 = warquest_db_num_rows($result3);\r\n\t\r\n\t\t/*$yesterday = mktime(date(\"H\"), date(\"i\"), date(\"s\"), date(\"m\"), date(\"d\")-1, date(\"Y\"));\r\n\t\t$query4 = 'select count(pid) as count from member where last_login > \"'.date(\"Y-m-d H:i:s\", $yesterday).'\" ';\t\t\r\n\t\t$result4 = warquest_db_query($query4);\r\n\t\t$data4 = warquest_db_fetch_object($result4);*/\r\n\t\r\n\t\t/*$query5 = 'select sum(requests) as requests from views';\r\n\t\t$result5 = warquest_db_query($query5); \r\n\t\t$data5 = warquest_db_fetch_object($result5);*/\n\t\r\n\t\t$page .= '<div class=\"right\">';\r\n\t\t$page .= warquest_rank_image($player->lid);\r\n\t\t$page .= '</div>';\n\t\r\n\t\t$page .= t('HOME_WELCOME', warquest_rank($player->lid), player_format($player->pid, $player->name, $player->country));\r\n\t\t\r\n\t\t$page .= '<br/><br/>';\n\t\r\n\t\t$member = warquest_db_member($player->pid);\r\n\t\tif ($member->prev_login!=0) {\r\n\t\t\t$page .= t('HOME_LAST_LOGIN', warquest_ui_ago($member->prev_login)).'<br/>';\r\n\t\t}\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\t$page .= t('HOME_INTRO_PLACE1', \r\n\t\t\t\t\t\twarquest_link('mid='.MENU_PLAYERS.'&sid='.PAGE_LEADERBOARD.'&ssid='.PAGE_BEST_PLAYER, warquest_place($count3)));\r\n\t\t\r\n\t\t$code = sprintf(\"%03d%03d\",ord($player->country[0]),ord($player->country[1]));\r\n\t\t$page .= t('HOME_INTRO_PLACE2', \r\n\t\t\t\t\t\twarquest_link('mid='.MENU_PLAYERS.'&sid='.PAGE_LEADERBOARD.'&ssid='.PAGE_BEST_COUNTRY2.'&uid='.$code, warquest_place($count2)), warquest_landcode($player->country));\r\n\t\t$page .= '<br/>';\r\n\t\t\r\n\t\t/*$page .= '<br/>';\t\t\r\n\t\t$page .= t('HOME_INTRO_PLAYERS', energy_format($data1->count), country_format($count));\r\n\t\t$page .= t('HOME_INTRO_FIGHTS', health_format($data1->won));\r\n\t\t$page .= t('HOME_INTRO_REQUESTS', money_format1($data5->requests));\r\n\t\t$page .= t('HOME_PLAYERS_ONLINE',energy_format($data4->count));\t\t\t\r\n\t\t$page .= '<br/>';*/\r\n\t}\r\n\t\t\r\n\t$page .= warquest_view_awards();\r\n\t\r\n\tif ($player->lid > 4) {\r\n\t\t$page .= warquest_poll_teaser();\t\r\n\t}\r\n\r\n\t/* Show tip */\r\n\t$page .= warquest_ui_tip();\t\n\t$page .= '<div class=\"spacer\"></div>';\t\r\n\t\r\n\t$page .= '</div>';\t\r\n}", "public function theSizeIsDesktop()\n {\n $this->getSession()->resizeWindow(1400, 900, 'current');\n }", "public function gridAction()\n {\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock(\n 'inchoo_gsfeed/adminhtml_feed_grid')->toHtml()\n );\n }", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-better-newsticker', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'better-newsticker' );\n\n\t\tpublisher_clear_props();\n\t\tpublisher_clear_query();\n\n\t\treturn ob_get_clean();\n\t}", "function ppmess_shortcode_all_communications_view($atts = [], $content = null){\n\t\n\tglobal $post;\n\t\n\t$data = ppmess_shortcode_all_communications();\n?>\t\n\t<!--------- User info --------->\n\t<div class=\"post-info-commun\">\n\t\t<?php echo __('Logged user', 'ppmess'); ?>\n\t\t<span class=\"span-mark\"><?php echo esc_html($data['logged_user']['user_login']); ?></span>\n\t\t<a id=\"link-logout\" href=\"<?php echo wp_logout_url(); ?>\">\n\t\t\t<?php echo __('LogOut ?', 'ppmess'); ?>\n\t\t</a>\n\t\t<div class=\"circle-mark-div-frame\">\n\t\t\t<div class=\"ppmess-box-inline\">\n\t\t\t\t<span class=\"circle-mark-1\"></span>\n\t\t\t\t<span style=\"margin-left:5px;\"><?php echo __('my posts', 'ppmess'); ?></span>\n\t\t\t</div>\n\t\t\t<div class=\"ppmess-box-inline\">\n\t\t\t\t<span class=\"circle-mark-2\"></span>\n\t\t\t\t<span style=\"margin-left:5px;\"><?php echo __('sender\\'s posts', 'ppmess'); ?></span>\n\t\t\t</div>\n\t\t</div>\t\n\t</div>\n\t\t\t\n\t<div class=\"ppmess-commun-frame\">\n<?php\t\n\t\tif( ! empty($data['all_communs'])): ?>\n\t\t\t<!------------ List of the communications ------------>\n\t\t\t<div id=\"communsListFrame\" class=\"communsList-frame\">\t\t\t\t\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<div><?php echo __('Sender', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Post title', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Date', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Status', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div></div>\n\t\t\t\t\t</li>\n\t\t\t\t<?php\t\n\t\t\t\t\tforeach( $data['all_communs'] as $value ):\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$post_info = get_post($value['post_id']);\n\t\t\t\t\t\t$post_author_id = $post_info->post_author;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Determining secound user\n\t\t\t\t\t\tif($value['sender_id'] != $data['logged_user']['user_id'])\n\t\t\t\t\t\t\t$sender = get_userdata($value['sender_id']);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$sender = get_userdata($value['receiver_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Mark new message\n\t\t\t\t\t\tif($value['sent_to'] == $data['logged_user']['user_id']){\n\t\t\t\t\t\t\t$status_class = 'ppmess-new-message';\n\t\t\t\t\t\t\t$status_mess = '';\n\t\t\t\t\t\t\t$title_mess = __('new message', 'ppmess');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$status_class = '';\t\n\t\t\t\t\t\t\t$status_mess = 'OK';\n\t\t\t\t\t\t\t$title_mess = __('message read', 'ppmess');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check if the post was deleted or not\n\t\t\t\t\t\tif( ! empty($post_info->post_title) )\n\t\t\t\t\t\t\t$post_title = $post_info->post_title;\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$post_title = $value['post_name'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// token\n\t\t\t\t\t\t$token_single_commun = md5(SALT_SINGLE_COMMUN_PPMESS . $value['message_id'] . $value['post_id'] . $data['logged_user']['user_id'] );\n\t\t\t\t\t\t$token_delete_commun = md5(SALT_DELETE_COMMUN_PPMESS . $value['message_id'] . $value['post_id'] . $data['logged_user']['user_id'] );\n\t\t\t\t\t?>\n\t\t\t\t\t\t<li onmouseover=\"ppmess_change_style(this)\" onmouseout=\"ppmess_return_style(this)\">\n\t\t\t\t\t\t\t<!----------------------- Sender ---------------------->\n\t\t\t\t\t\t\t<div><?php echo esc_html($sender->user_login); ?></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-------------------- Post title -------------------->\n\t\t\t\t\t\t\t<?php if( !empty($post_info->post_status) && $post_info->post_status == 'publish'): ?>\n\t\t\t\t\t\t\t\t\t<div><?php echo esc_html($post_title); ?>\n\t\t\t\t\t\t\t\t\t\t<?php if($data['logged_user']['user_id'] == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-1\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php else: if($sender->ID == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-2\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php endif; endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t\t<div><span style=\"font-style:italic;text-decoration:line-through;\">\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_html($post_title); ?></span>\n\t\t\t\t\t\t\t\t\t\t<?php if($data['logged_user']['user_id'] == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-1\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php else: if($sender->ID == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-2\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php endif; endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!------------------ Created message date --------------------->\n\t\t\t\t\t\t\t<div><?php echo esc_html(date('d-M-Y', strtotime($value['date_created'])) ); ?></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--------------------- Message status -------------------------->\n\t\t\t\t\t\t\t<div class=\"<?php echo esc_attr($status_class); ?>\" title=\"<?php echo esc_attr($title_mess); ?>\">\n\t\t\t\t\t\t\t\t<?php echo esc_html($status_mess); ?>\n\t\t\t\t\t\t\t\t<?php if($value['number_messages'] > 0): ?>\n\t\t\t\t\t\t\t\t\t<span class=\"colorMark-1\" style=\"float:right;\"><?php echo ' (' . $value['number_messages'] . ')'; ?></span>\n\t\t\t\t\t\t\t\t<?php endif;?>\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--------------------- View, Delete links --------------------->\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<!-------------- Delete single communication -------------->\n\t\t\t\t\t\t\t\t<a class=\"delete-commun-a\" title=\"<?php echo __('Delete the single communication', 'ppmess'); ?>\" href=\"<?php echo esc_url( get_permalink() . '?delete_commun=1&message_id=' . $value['message_id'] . \n\t\t\t\t\t\t\t\t\t\t'&post_id=' . $value['post_id'] . '&token_delete_commun=' . $token_delete_commun ); ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo __('Delete', 'ppmess'); ?>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<!-------------- View single communication -------------->\n\t\t\t\t\t\t\t\t<a class=\"view-commun-a\" title=\"<?php echo __('View the single communication', 'ppmess'); ?>\" href=\"<?php echo esc_url(get_permalink($post) . '?message_id=' . $value['message_id'] . \n\t\t\t\t\t\t\t\t\t\t'&post_id=' . $value['post_id'] . '&token_single_commun=' . $token_single_commun . '&single_commun=1#ppmessage-' . $value['message_id']); ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo __('View', 'ppmess'); ?>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t<?php\t\n\t\t\t\t\tendforeach;\t?>\n\t\t\t\t</ul>\n\t\t\t</div><!-- all-communications -->\n<?php\telse: ?>\n\t\t\t<div class=\"ppmess-info-light\">\n\t\t\t\t<span class=\"colorMark-1\"><?php echo __('No one communication established', 'ppmess'); ?></span>\n\t\t\t\t<br/><br/>\n\t\t\t\t<?php echo __('For start communication you need a looked to certain post first and send private message to author of the post', 'ppmess'); ?>\n\t\t\t</div>\n<?php \tendif; ?>\t\t\t\t\t\t\n\t</div><!-- ppmess-commun-frame -->\n\t\n\t<?php\n\treturn $content;\n}", "abstract protected function show();", "public function view(){\n $collectionObjAll = array_filter($this->_collectionList->smart_collections, function($collObj){\n return (bool)($collObj->handle == 'all');\n });\n\n $this->set('activeCollectionID', $collectionObjAll[0]->id);\n $this->set('productList', Shopifiable::getProducts(array(\n 'collection_id' => $collectionObjAll[0]->id,\n 'published_status' => 'published',\n 'limit' => 100\n )));\n\n }", "public function show(Surface $surface)\n {\n //\n }", "public function show(sms $sms)\n {\n //\n }", "function showAllOTLK () {\n\n // set time var\n $curEtime = `/bin/date -u +%s`;\n $curEpochTime = trim($curEtime);\n\n #first, read validProducts.txt into memory.\n $validProd = file(\"./validProducts.txt\");\n\n echo \"<div id='allOTLK'>\";\n echo \"<div class='SPCProducts'>\";\n\n foreach($validProd as $line) {\n $tline = trim($line);\n $data = explode(\"|\",$tline);\n $prodType = $data[0];\n $prodTime = $data[1];\n $prodTimeYYYY = substr($prodTime,0,4);\n $prodTimeMM = substr($prodTime,4,2);\n $prodTimeDD = substr($prodTime,6,2);\n $prodTimeHHMM = substr($prodTime,8,4);\n $prodEpochTime = $data[2];\n $timeDiff = $curEpochTime - $prodEpochTime;\n $hhDiff = gmdate(\"H\", $timeDiff);\n $mmDiff = gmdate(\"i\", $timeDiff);\n if ($mmDiff < 10) {\n $mmDiff %= 10;\n }\n\n //determine hazard level of the outlooks\n if (($prodType == \"OTLK\" ) || ($prodType == \"OTLK2\" ) || ($prodType == \"OTLK3\" ) || ($prodType == \"OTLK4\" )) {\n $otlkHaz = $data[3];\n $otlkCat = trim($otlkHaz);\n if ($otlkCat == \"High\") { $otlkCatDiv = \"ac-high\"; }\n if ($otlkCat == \"Moderate\") { $otlkCatDiv = \"ac-mod\"; }\n if ($otlkCat == \"Enhanced\") { $otlkCatDiv = \"ac-enh\"; }\n if ($otlkCat == \"Slight\") { $otlkCatDiv = \"ac-slight\"; }\n if ($otlkCat == \"Marginal\") { $otlkCatDiv = \"ac-mrgl\"; }\n if ($otlkCat == \"See Text\") { $otlkCatDiv = \"ac-seetext\"; }\n if ($otlkCat == \"No Severe\") { $otlkCatDiv = \"ac-nosevere\"; }\n if ($otlkCat == \"No Thunder\") { $otlkCatDiv = \"ac-nothunder\"; }\n if ($otlkCat == \"Severe\") { $otlkCatDiv = \"ac48-severe\"; }\n if ($otlkCat == \"Severe 15%\") { $otlkCatDiv = \"ac48-15p\"; }\n if ($otlkCat == \"Severe 30%\") { $otlkCatDiv = \"ac48-30p\"; }\n if ($otlkCat == \"No Areas\") { $otlkCatDiv = \"ac48-noarea\"; }\n }\n\n if (($otlkCat == \"Severe 15%\") || ($otlkCat == \"Severe 30%\")) { $otlkCat = \"Severe\"; } \n\n if (($prodType == \"OTLK\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day1otlk.html'><img class='ACbg' id='SWODY1img' src='/products/outlook/day1otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day1otlk.html'>Day 1 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day1otlk.html'><img class='ACsm' id='SWODY1img' src='/products/outlook/day1otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day1otlk.html'>Day 1 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK2\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day2otlk.html'><img class='ACbg' id='SWODY2img' src='/products/outlook/day2otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day2otlk.html'>Day 2 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK2\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day2otlk.html'><img class='ACsm' id='SWODY2img' src='/products/outlook/day2otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day2otlk.html'>Day 2 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK3\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day3otlk.html'><img class='ACbg' id='SWODY3img' src='/products/outlook/day3otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day3otlk.html'>Day 3 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK3\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/outlook/day3otlk.html'><img class='ACsm' id='SWODY3img' src='/products/outlook/day3otlk_sm.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/outlook/day3otlk.html'>Day 3 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK4\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/day4-8/'><img class='ACbg' id='SWODY48img' src='/products/exper/day4-8/day48prob_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/day4-8/'>Day 4-8 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td align='left' class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table></td>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table></td>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"OTLK4\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/day4-8/'><img class='ACsm' id='SWODY48img' src='/products/exper/day4-8/day48prob_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/day4-8/'>Day 4-8 Convective Outlook</a></td></tr>\";\n echo \"<tr><td width='105px'>&ndash; Categorical Risk: </td><td class='${otlkCatDiv}'>$otlkCat</td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table></td>\";\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"ENH\" ) && ($timeDiff < \"3600\" )) {\n echo \"<ul class='SPCProductsNew'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/enhtstm/'><img class='ACbg' id='ENHimg' src='/products/exper/enhtstm/enh_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/enhtstm/'>Thunderstorm Outlook</a></td></tr>\";\n if ($mmDiff > 1) {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minutes ago</font></td></tr></table>\";\n } else {\n echo \"<tr><td colspan='2'>&ndash; Issued: <font color='#ff0000'>$mmDiff minute ago</font></td></tr></table>\";\n }\n echo \"</tr></table></li></ul>\";\n }\n\n if (($prodType == \"ENH\" ) && ($timeDiff >= \"3600\" )) {\n echo \"<ul class='SPCProductsOld'>\";\n echo \"<li><table><tr><td>\";\n echo \"<div><a href='/products/exper/enhtstm/'><img class='ACsm' id='ENHimg' src='/products/exper/enhtstm/enh_small.gif'></a></div></td>\";\n echo \"<td valign='top'><table><tr>\";\n echo \"<td colspan='2' valign='top'><a href='/products/exper/enhtstm/'>Thunderstorm Outlook</a></td></tr>\";\n echo \"<tr><td colspan='2'>&ndash; Issued: ${prodTimeMM}/${prodTimeDD}/${prodTimeYYYY} at ${prodTimeHHMM}Z</td></tr></table>\";\n echo \"</tr></table></li></ul>\";\n }\n }\n\n echo \"</div>\";\n echo \"</div>\";\n}", "public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}", "function dsp_single_office_info()\n {\n $VIEW_DATA['arr_single_office_info'] = $this->model->qry_single_office_info();\n $this->view->render('dsp_single_office_info',$VIEW_DATA);\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.50359035", "0.5026581", "0.5025247", "0.50197077", "0.5016297", "0.49932313", "0.49918774", "0.49858886", "0.4973632", "0.49712417", "0.49582756", "0.49504077", "0.4945422", "0.4945422", "0.49449357", "0.49407122", "0.49402255", "0.4934516", "0.4929991", "0.4929667", "0.49259248", "0.49228904", "0.49217358", "0.49207684", "0.49070078", "0.4904509", "0.49041095", "0.49031577", "0.4899972", "0.48999718", "0.48950753", "0.48950753", "0.48950753", "0.4894706", "0.4884795", "0.488071", "0.48677307", "0.48614463", "0.4860973", "0.48600593", "0.48535725", "0.4850789", "0.4850184", "0.4849901", "0.48484033", "0.48410547", "0.483928", "0.4833543", "0.48305854", "0.48239788", "0.48239788", "0.48182052", "0.48164567", "0.48160017", "0.4814129", "0.48129553", "0.48081005", "0.48026967", "0.48004353", "0.4799222", "0.47941875", "0.479169", "0.47880927", "0.47848046", "0.4784069", "0.47834474", "0.478192", "0.4780487", "0.4778834", "0.47754657" ]
0.64309853
0
10 minutes to seconds ApiSDK constructor.
public function __construct(Client $guzzleClient, CacheItemPoolInterface $cacheManager, string $api_url, string $api_key) { $this->client = $guzzleClient; $this->cacheManager = $cacheManager; $this->api_url = $api_url; $this->api_key = $api_key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function secondsToMinutes() {\n return $this;\n }", "function getTime10sec(){\n /** Setting the variable to override the Warning **/\n $modifiedLast2=0;\n\n /** Getting the epoch seconds **/\n $time = microtime(false);\n $time = explode(\" \", $time); \n $time = $time[1];\n \n\n /** Splitting the epoch removing the last 2 digits **/\n $epochLength = strlen($time);\n $last2=$epochLength-2;\n $allTime=substr($time,0,$last2);\n $last2 = substr($time,$last2);\n\n /** Checking the seconds to modify the last 2 digits **/\n if($last2>=0&&$last2<=10){\n $modifiedLast2=01;\n }elseif($last2>=11&&$last2<=20){\n $modifiedLast2=11;\n }elseif($last2>=21&&$last2<=30){\n $modifiedLast2=21;\n }elseif($last2>=31&&$last2<=40){\n $modifiedLast2=31;\n }elseif($last2>=41&&$last2<=50){\n $modifiedLast2=41;\n }elseif($last2>=51&&$last2<=60){\n $modifiedLast2=51;\n }elseif($last2>=61&&$last2<=70){\n $modifiedLast2=61;\n }elseif($last2>=71&&$last2<=80){\n $modifiedLast2=71;\n }elseif($last2>=81&&$last2<=90){\n $modifiedLast2=81;\n }elseif($last2>=91&&$last2<=100){\n $modifiedLast2=91;\n }\n\n /** Merging the original first part with the modified last 2 digits **/\n $modifiedTime=$allTime.$modifiedLast2;\n\n /** Returning the modified epoch **/\n return $modifiedTime;\n }", "function setSecond( $value )\r\n {\r\n $value = min( $value, 59 );\r\n $this->SecondsElapsed = ( ( $this->hour() * 3600 ) + ( $this->minute() * 60 ) + $value );\r\n }", "public function __construct() {\n\t\t$this->startTime = self::getMicrotime();\n\t}", "public function setTimeLimit(int $timeLimit): self;", "public function howLongToCacheInSeconds(){\n return(1200); //twenty minutes by default\n }", "public function everyTenMinutes()\n {\n return $this->everyNMinutes(10);\n }", "public function getTtl(): int\n {\n return 10;\n }", "public function __construct($url, $seconds = 3) {\n $content = $seconds . ';url=' . $url;\n\n parent::__construct(self::NAME, $content, true);\n }", "public function __construct()\n {\n $this->startTime = microtime(true);\n parent::__construct();\n }", "public function __construct() {\n $this->time = time();\n }", "public function howLongToCacheInSeconds(){\n return(120); //two minutes by default\n }", "function setSecond($s) {\r\n if($s > 59 || $s < 0) {\r\n $this->segundo = 0;\r\n } else {\r\n $this->segundo = $s;\r\n }\r\n }", "private function __construct()\n {\n $this->time = time();\n }", "public function __construct() {\n\t\tparent::__construct();\n\n\t\t//Increase max execution time\n @ini_set(\"max_execution_time\", \"3600\");\n }", "public function __construct($minute)\n {\n $this->minute = $minute;\n }", "function __construct() {\n $this->start_time = microtime(true);\n }", "public static function createDuration();", "function setMinute( $value )\r\n {\r\n $value = min( $value, 59 );\r\n $this->SecondsElapsed = ( ( $this->hour() * 3600 ) + ( $value * 60 ) + $this->second() );\r\n }", "public function __construct()\n {\n $this->_timeStart = (float)microtime(true); \n parent::__construct();\n }", "function cron_add_10_minutes($schedules) {\n\t\t\t$schedules['10minutes'] = array(\n\t\t\t\t'interval' => 600,\n\t\t\t\t'display' => __( 'Once 10 Minutes' )\n\t\t\t);\n\t\t\treturn $schedules;\n\t\t }", "public function getSmallVClock() {}", "public function __construct(){\n $this->Num_operacion = time();\n }", "public function setSessionTimer($limit)\r\n\t\t{\r\n\t\t\t\t$startTime = $this->get('timeStart');\r\n\t\t\t\t$endTime = time();\r\n\r\n\t\t\t\t$itemStartDate = $startTime . '<br>';\r\n\t\t\t\t$itemEndDate = $endTime . '<br>';\r\n\r\n\t\t\t\t$timeLeft = $itemEndDate - $itemStartDate;\r\n\r\n\t\t\t\tif ($timeLeft > 0) {\r\n\t\t\t\t\t\t$aDayInSecs = 24 * 60 * 60;\r\n\t\t\t\t\t\t$days = $timeLeft / $aDayInSecs;\r\n\t\t\t\t\t\t$days = intval($Days);\r\n\r\n\t\t\t\t\t\t$timeLeft = $timeLeft - ($days * $aDayInSecs);\r\n\t\t\t\t\t\t$hours = $timeLeft / (60 * 60);\r\n\t\t\t\t\t\t$hours = intval($hours);\r\n\t\t\t\t\t\t$timeLeft = $timeLeft - ($hours * 60 * 60);\r\n\r\n\t\t\t\t\t\t$minutes = $timeLeft / 60;\r\n\t\t\t\t\t\t$minutes = intval($minutes);\r\n\t\t\t\t\t\t$timeLeft = $timeLeft - ($minutes * 60);\r\n\r\n\t\t\t\t\t\t$seconds = $timeLeft;\r\n\t\t\t\t\t\t$seconds = intval($seconds);\r\n\r\n\t\t\t\t\t\t$timeLeft = $timeLeft - ($seconds / 60 * 60 );\r\n\t\t\t\t\t\t$milliSeconds = $timeLeft;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * SESSION ZAMANLAMAYI BITIRIYORUM\r\n\t\t\t\t * $Minute : Dakika cinsinden, $Second : Saniye cinsinden sonuc veriyor\r\n\t\t\t\t * Sureyi $limit degiskeninden aliyor\r\n\t\t\t\t *\r\n\t\t\t\t */\r\n\t\t\t\t$timeOut = $limit;\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Istersek bu sekilde zamanlamayi saniye cinsinden ekrana yazdirabiliyoruz : echo $Seconds . ' Seconds ' ;\r\n\t\t\t\t */\r\n\t\t\t\t//echo 'Gecen Saniye : ' . $seconds . ' Kalan Saniye : ' . ($timeOut - $seconds);\r\n\t\t\t\t/**\r\n\t\t\t\t *\r\n\t\t\t\t * Zamanin dolup dolmadigi kontrol ediliyor. Dolmussa destroy metodu cagiriliyor\r\n\t\t\t\t *\r\n\t\t\t\t */\r\n\t\t\t\tif ($seconds < $timeOut)\r\n\t\t\t\t\t\t$this->set('timeStart', $endTime);\r\n\t\t\t\telse\r\n\t\t\t\t\t\t$this->destroy();\r\n\t\t}", "public function howLongToCacheInSeconds(){\n return(12000); //200 minutes\n }", "public function setSeconds($seconds) {\n $this->_seconds = $seconds;\n return $this;\n }", "function Now($seconds_to_add=0);", "protected function _initTimer()\n {\n $this->_timer->reset();\n $timeout = $this->_options[self::OPT_FIRST_DIGIT_TIMEOUT];\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $timeout ) );\n }", "public function __construct()\n {\n $this->dateTime = new Time('now', 'Asia/Jakarta', 'id_ID');\n }", "public function __construct( $timeout=GUMROAD_API_TIMEOUT ) {\n\t\t$this->timeout = $timeout;\n\t\t$this->token = null;\n\t}", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->changedAtMs = func_get_arg(0);\n $this->tempInMilliC = func_get_arg(1);\n }\n }", "function get_20_minutes() {\n\t$array = array();\n\n\tfor ($i = 0; $i <= 20; $i++) {\n\t\tif($i < 10) {\n\t\t\t$array[$i] = 0 . $i;\n\t\t}\n\t\telse {\n\t\t\t$array[$i] = $i;\n\t\t}\n\t}\n\n\treturn $array;\n}", "function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->library(\"Services\");\r\n $this->load->library('apifunct');\r\n $this->load->model('users_model');\r\n $this->load->model('general_model');\r\n\r\n ini_set('display_errors', 1);\r\n\r\n date_default_timezone_set('Asia/Jakarta');\r\n\r\n $this->time_now = date('H:i:s');\r\n\r\n }", "public function __construct()\n {\n $this->conversions = array(\n 'km' => 1.60934,\n 'm' => 1609.34,\n 'cm' => 160934,\n 'mm' => 1609340,\n 'yd' => 1760,\n 'ft' => 5280,\n 'in' => 63360,\n 'mi' => 1\n );\n }", "public function useMicroseconds() {\n $this->type = self::MICRSECONDS;\n }", "public function startTimer(): void;", "function __construct($id, array $properties = array()) {\n // be overridden manually.\n $this->description = t('Use the format HH:MM:SS.');\n parent::__construct($id, $properties);\n $this->expand_callbacks[] = 'fapitng_form_expand_time';\n $this->attributes['size'] = 8;\n }", "function get_60_seconds() {\n\t$array = array();\n\n\tfor ($i = 0; $i <= 59; $i++) {\n\t\tif($i < 10) {\n\t\t\t$array[$i] = 0 . $i;\n\t\t}\n\t\telse {\n\t\t\t$array[$i] = $i;\n\t\t}\n\t}\n\n\treturn $array;\n}", "public function __construct($id, $secret, $cainfo = null, $timedout = 10, $host = 'https://api.weixin.qq.com/cgi-bin') {\r\n parent::__construct($host, $cainfo, $timedout);\r\n $this->expiration = 0;\r\n $this->secret = $secret;\r\n $this->id = $id;\r\n }", "public function setSeconds($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "private function __construct(){\r\n $this->ttl_by_type = array(\r\n 'short' => 300 , // 5 minutes\r\n 'default' => 7200, // 2 hours\r\n 'halfday' => 43200, // 12 hours\r\n 'day' => 86400, // 24 hours\r\n 'week' => 604800, // 7 days\r\n 'month' => 2592000, // 30 days (1 month)\r\n 'longterm' => 15811200 // 183 days (6 months)\r\n );\r\n }", "public function __construct($paramRefreshInterval = 1000){\n $this->refreshInterval = $paramRefreshInterval;\n }", "public function decayMinutes(): int\n {\n return 1;\n }", "public function getBigVClock() {}", "public function __construct($arg, Clock $clock= null) {\n if ($arg instanceof Rate) {\n $this->rate= $arg;\n } else {\n $this->rate= new Rate($arg, Per::$SECOND);\n }\n $this->clock= $clock ?: new SystemClock();\n }", "public function __construct()\n\t{\n\t\t$this->setTimeStamp();\n\t}", "function setSecondsElapsed( $value )\r\n {\r\n $this->SecondsElapsed = $value;\r\n }", "function getSecondsInMinute($y=null,$m=null,$d=null,$h=null,$i=null)\n {\n return 60;\n }", "public function getSeconds(): int\n {\n return $this->seconds;\n }", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "public function getTimeout(): float\n {\n }", "function Interval($id = null) {\r\n\r\n\t# get the current microtime\r\n\t$now = microtime(true);\r\n\r\n\t# if no $id name is given for the interval\r\n\tif ($id == null) {\r\n\r\n\t\t# give it a counter interval name\r\n\t\t$cnt = count($this->intervals) ;\r\n\t\t$cnt++;\r\n\t\t$id = \"~interval $cnt\";\r\n\r\n\t# ....\r\n\t}\r\n\r\n\t# if starting the stop watch\r\n\tif ($this->startTime == false) {\r\n\r\n\t\t# set start time interval to zero\r\n\t\t$incr = 0;\r\n\r\n\t\t# note the starting time\r\n\t\t$this->startTime = $now;\r\n\r\n\t# else\r\n\t} else {\r\n\r\n\t\t# compute time since the prior interval\r\n\t\t$incr = $now - $this->lastInterval;\r\n\r\n\t\t# if calling for microseconds round the time to microseconds otherwise to milliseconds\r\n\t\t$incr = ($this->microsec)\r\n\t\t\t? round($incr, 6)\r\n\t\t\t: round($incr, 3);\r\n\t# ....\r\n\t}\r\n\r\n\t# add it to the interval array\r\n\t$this->AddInterval($id, $incr);\r\n\r\n\t# update the last interval time\r\n\t$this->lastInterval = $now;\r\n\r\n# end function\r\n}", "public function __construct()\n {\n $this->svc = new IntegerConversion();\n }", "public function timeout($seconds)\n {\n $this->option('-t', $seconds);\n return $this;\n }", "public function seconds($callback = null)\n {\n Carbon::setTestNow(Carbon::now()->addSeconds($this->value));\n\n return $this->handleCallback($callback);\n }", "function __construct() {\n\t\t// TODO: Form validation on number text box\n\t\t$minutes = $_POST['time']; // Grab number of minutes from input box named 'time'\n\t\t$seconds = 59; // Init seconds at 59\n\t\tcountdown($minutes, $seconds); // Starts countdown\n\t}", "public static function milliseconds() {}", "public static function fromInfo(array $info) {\n $info += [\n 'refresh_interval' => new \\DateInterval('PT23H30M'),\n ];\n return new static($info['path'], $info['timeframe'], $info['refresh_interval'], $info);\n }", "function atime ( $arguments = \"\" ) {\n $arguments = func_get_args ();\n $rc = new ReflectionClass('ttime');\n return $rc->newInstanceArgs ( $arguments );\n}", "function __construct($server = '', $timeout = '')\n {\n }", "public function __construct(array $data = [])\n\t{\n\t\t$this->id = isset($data['id']) ? $data['id'] : $this->generateRequestId();\n\t\t$this->time = microtime(true);\n\t\t$this->updateToken = isset($data['updateToken']) ? $data['updateToken'] : $this->generateUpdateToken();\n\n\t\tforeach ($data as $key => $val) $this->$key = $val;\n\n\t\t$this->currentLog = new Log($this->log);\n\t\t$this->currentTimeline = new Timeline\\Timeline($this->timelineData);\n\t}", "public function setLegElapsedTimeIncludingLayoverDurationInMinutes(int $value): self\n {\n $this->LegElapsedTimeIncludingLayoverDurationInMinutes = $value;\n\n return $this;\n }", "public function time($value): self\n {\n $this->time = $value;\n \n return $this;\n }", "public function __construct()\n {\n if (13 == func_num_args()) {\n $this->serviceId = func_get_arg(0);\n $this->dateRecursBy = func_get_arg(1);\n $this->days = func_get_arg(2);\n $this->endDate = func_get_arg(3);\n $this->endTime = func_get_arg(4);\n $this->frequency = func_get_arg(5);\n $this->occurrence = func_get_arg(6);\n $this->recursBy = func_get_arg(7);\n $this->resourceId = func_get_arg(8);\n $this->startDate = func_get_arg(9);\n $this->startTime = func_get_arg(10);\n $this->totalMinutes = func_get_arg(11);\n $this->userId = func_get_arg(12);\n }\n }", "public function __construct(float $time)\n {\n $this->time = $time;\n }", "public function timer_start()\n {\n }", "public function __construct()\n {\n $this->api_id = Config::get('biddingos.ym.api_id');\n $this->api_token = md5(Config::get('biddingos.ym.api_token'));\n $this->refresh_time = Config::get('biddingos.ym.refresh_time');\n parent::__construct();\n }", "public static function init_timer()\n {\n if (!isset(self::$timer)) {\n $time_now = self::get_miliseconds_now();\n self::$timer = new TimerModel($time_now);\n }\n }", "public function __construct()\n\t{\n\t\tsession_start();\n\t\t$this->timer = microtime();\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_languagePrefix \t\t= \"ChronoPayApi\";\n\t\t\t$this->_id \t\t\t\t\t= \"checkout_chronopayapi\";\n\t\t\t$this->_image \t\t\t\t= \"logo.gif\";\n\n\t\t\tparent::__construct();\n\n\t\t\t$this->_requiresSSL \t\t= true;\n\t\t\t$this->_currenciesSupported = array('USD');\n\t\t\t$this->_liveTransactionURL \t= 'https://secure.chronopay.com';\n\t\t\t$this->_testTransactionURL \t= 'https://secure.chronopay.com';\n\t\t\t$this->_liveTransactionURI \t= '/gateway.cgi';\n\t\t\t$this->_testTransactionURI \t= '/gateway.cgi';\n\t\t\t$this->_curlSupported \t\t= true;\n\t\t\t$this->_fsocksSupported \t= true;\n\t\t\t$this->cardCodeRequired \t= true;\n\t\t}", "function getAsSeconds()\n {\n return $this->seconds;\n }", "public function __construct()\n {\n $this->middleware('auth');\n date_default_timezone_set('Asia/Bangkok');\n $this->curr_raw_time = getdate();\n $this->curr_date = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'];\n $this->curr_date_time = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'] . ' ' . $this->curr_raw_time['hours'] . ':' . $this->curr_raw_time['minutes'] . ':' . $this->curr_raw_time['seconds'];\n }", "public function __construct()\n {\n $this->local_time = time();\n }", "function __construct() {\n parent::__construct();\n \n date_default_timezone_set('Europe/London');\n \n $this->updateTime = date('Y-m-d H:m:s', strtotime('now'));\n \n\n }", "public function __construct($timeout = null) {\n $this->timeout = $timeout;\n }", "public function setSettingsSessionTimeoutInMinutes(?int $value): void {\n $this->getBackingStore()->set('settingsSessionTimeoutInMinutes', $value);\n }", "function __construct() {\n $this->day = strtolower(date('l')); // monday, tuesday ....\n //$this->day = 'monday';\n //$this->day = $url;\n \n $ltime = localtime();\n $this->time = ($ltime[2] * 60 * 60) + ($ltime[1] * 60) + $ltime[0]; // seconds past in day\n $ltime = null;\n \n //$utc = new DateTime(NULL, new DateTimeZone('UTC'));\n //$utc->setDate(1985, 1, 22);\n //$this->UTCday = $utc->getTimestamp();\n }", "protected function constructor()\r\n\t{\r\n\t\t$this->finalYear = self::MAX_INT;\r\n\t\t$this->finalMillis = self::MAX_DBL;\r\n\t\t$this->finalZone = null;\r\n\r\n\t\t$this->constructEmpty();\r\n\t}", "public function setCurlTimeout($seconds) {\n if (!is_numeric($seconds) || $seconds < 0) {\n throw new \\coding_exception('Timeout value must be numeric and a non-negative number.');\n }\n\n $this->curlTimeout = $seconds;\n return $this;\n }", "public function timeout($seconds) {\n $this->timeout = $seconds;\n\n return $this;\n }", "public function setRestTimes($value)\n {\n return $this->set(self::_REST_TIMES, $value);\n }", "public function time(int $time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function __construct()\n {\n $now = new \\DateTime();\n $this->number = 'CR' . $now->format('Y') . $now->format('m') . '-';\n $this->dateCreation = new \\DateTime();\n $this->dateEnlevement = new \\DateTime();\n $this->heureEnlevement = new \\DateTime('14:00');\n $this->dateRetour = new \\DateTime('NOW + 2 day');\n $this->heureRetour = new \\DateTime('14:00');\n $this->effectue = false;\n $this->annule = false;\n $this->factureRecue = false;\n $this->mailSent = false;\n $this->nbJoursExploit = 1;\n $this->avecHayon = false;\n }", "public function display_option_server_min_seconds() {\n $min_seconds = $this->options['server_min_seconds'];\n $this->display_input_text_field('server_min_seconds', $min_seconds);\n?>\nThe number of seconds that must pass since the previous request to clear the cache before the next one is accepted.\n<?php\n }", "function __construct()\n {\n parent::__construct();\n $this->load->helper(array(\n 'form',\n 'url',\n 'security'\n ));\n $this->load->model('api/TasklistAccountPlanning_model');\n $this->load->model('PerformanceAccountPlanning_model');\n $this->load->model('MonitoringAccountPlanning_model');\n $this->load->model('MonitoringRm_model');\n\n $current_datetime = new DateTime(date('Y-m-d H:i:s'));\n $this->current_year = $current_datetime->format('Y');\n $this->month_current = $current_datetime->format('m');\n $this->current_date = $current_datetime->format('Y-m-d');\n $this->current_datetime = $current_datetime->format('Y-m-d H:i:s');\n\n $this->checkTokenMobile();\n }", "public static function asTimeLimit($value)\r\n {\r\n if (is_int($value) && $value > 0) {\r\n $value = yii::$app->formatter->format($value*60, 'duration');\r\n } else {\r\n $value = \"No Time Limit\";\r\n }\r\n return $value;\r\n }", "public function __construct()\n {\n $this->startedAt = Date::now();\n\n parent::__construct();\n }", "public function test_seconds_to_unit() {\n $this->assertEquals(array(0, 60), $this->element->seconds_to_unit(0)); // Zero minutes, for a nice default unit.\n $this->assertEquals(array(1, 1), $this->element->seconds_to_unit(1));\n $this->assertEquals(array(3601, 1), $this->element->seconds_to_unit(3601));\n $this->assertEquals(array(1, 60), $this->element->seconds_to_unit(60));\n $this->assertEquals(array(3, 60), $this->element->seconds_to_unit(180));\n $this->assertEquals(array(1, 3600), $this->element->seconds_to_unit(3600));\n $this->assertEquals(array(2, 3600), $this->element->seconds_to_unit(7200));\n $this->assertEquals(array(1, 86400), $this->element->seconds_to_unit(86400));\n $this->assertEquals(array(25, 3600), $this->element->seconds_to_unit(90000));\n\n $this->element = $this->mform->addElement('duration', 'testel', null, array('defaultunit' => 86400, 'optional' => false));\n $this->assertEquals(array(0, 86400), $this->element->seconds_to_unit(0)); // Zero minutes, for a nice default unit.\n }", "public function getSeconds($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "function __construct(){\r\n $this->timestamp = time();\r\n }", "public function __construct($service_url, $api_key) {\n $this->service_url = $service_url;\n $this->api_key = $api_key;\n\n $this->options = array(\n 'debug' => FALSE,\n 'timeout' => 30\n );\n }", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->timestamp = time();\n\t}", "public function getMakeApiCallTimeout()\n {\n $returnValue = 40; // default value\n $configValue = strval(Mage::getConfig()->getNode('stores/default/innobyte_payu_lite_make_api_call_timeout'));\n if (is_numeric($configValue) && $configValue >= 0) {\n $returnValue = intval($configValue);\n }\n return $returnValue;\n }", "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('mod_cron_jobs');\n\t\t$this->load->model('mod_common');\n\t\tini_set('max_execution_time', 0); \n\t}" ]
[ "0.55712605", "0.55442446", "0.5442015", "0.54371256", "0.533712", "0.5324363", "0.5313277", "0.52750695", "0.52659523", "0.52457553", "0.5219858", "0.52064866", "0.5192312", "0.51876837", "0.5181743", "0.5160134", "0.51496243", "0.5142288", "0.5128972", "0.51199937", "0.51064944", "0.5087602", "0.5068135", "0.5058974", "0.50572586", "0.505013", "0.5044062", "0.50333124", "0.5026339", "0.5012274", "0.49802116", "0.49733996", "0.49643108", "0.49452567", "0.49424928", "0.49390727", "0.49288788", "0.49280885", "0.49226102", "0.49112985", "0.49105293", "0.48898068", "0.48518974", "0.48419508", "0.48412862", "0.48325312", "0.48237818", "0.4815452", "0.48110554", "0.48103064", "0.48103064", "0.48047456", "0.47856638", "0.47651953", "0.47543496", "0.4753528", "0.47521788", "0.47505233", "0.47489458", "0.47420415", "0.47413597", "0.4732455", "0.4726854", "0.47195488", "0.47185427", "0.47165784", "0.47142172", "0.47133186", "0.4711781", "0.47065616", "0.4701705", "0.47013044", "0.46989295", "0.46965605", "0.46965086", "0.4696208", "0.46934807", "0.4688765", "0.46745428", "0.4673665", "0.46718737", "0.46697965", "0.4664595", "0.4660152", "0.46573994", "0.46535498", "0.46521372", "0.46518984", "0.46509182", "0.4642123", "0.46387038", "0.46370888", "0.46361062", "0.46361062", "0.46361062", "0.46361062", "0.46361062", "0.46361062", "0.46349907", "0.46273848", "0.46265602" ]
0.0
-1
/currently working from backup controller purpose of making Backup controller is to manage multiple backup options like backing up/restoring selected tables, files etc but have not done
public function fullDownload(){ Artisan::call('backup:run'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionBackup()\n {\n $user = \\Yii::$app->db->username;\n $pass = \\Yii::$app->db->password;\n $db = preg_replace('/^.*\\=(\\w+)$/', '$1', \\Yii::$app->db->dsn);\n $name = date('Y-m-d_H-i').\".sql\";\n $tables = implode(\" \", array_filter(\\Yii::$app->db->schema->tableNames, function($v){\n return !preg_match('/^data_.*$/', $v);\n }));\n exec(\"mysqldump -u$user -p$pass $db $tables > \" . \\Yii::getAlias(\"@app/runtime/$name\"));\n }", "public function actionBackup()\n {\n $user = \\Yii::$app->db->username;\n $pass = \\Yii::$app->db->password;\n $db = preg_replace('/^.*\\=(\\w+)$/', '$1', \\Yii::$app->db->dsn);\n $name = date('Y-m-d_H-i').\".sql\";\n $tables = implode(\" \", array_filter(\\Yii::$app->db->schema->tableNames, function($v){\n return !preg_match('/^data_.*$/', $v);\n }));\n exec(\"mysqldump -u$user -p$pass $db $tables > \" . \\Yii::getAlias(\"@app/runtime/$name\"));\n }", "public function backup()\n {\n if($this->isLoggedIn())\n {\n $group = $this->session->userdata['role'];\n $data['menu'] = $this->Menu_model->getMenuItems($group);\n $data['company_info'] = $this->Settings_model->get_company_info();\n $data['bkups'] = directory_map('./backups/', 1);\n $sort = arsort($data['bkups']);\n $data['title'] = $data['company_info']['name'].\" | Backup Databases\";\n $this->load->view(\"admin/backup_databases\", $data);\n }\n else {\n redirect(base_url());\n }\n }", "function backup()\n {\n if($this->input->post('backup'))\n {\n $this->load->dbutil();\n \n if($this->input->post('format') == 'txt')\n {\n $extencion = 'sql'; \n }else{\n $extencion = $this->input->post('format'); \n }\n \n $prefs = array(\n 'tables' => $this->input->post('tablas'), // Array of tables to backup.\n 'ignore' => array(), // List of tables to omit from the backup\n 'format' => $this->input->post('format'), // gzip, zip, txt\n 'filename' => $this->input->post('name').'.'.$extencion, // File name - NEEDED ONLY WITH ZIP FILES\n 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n 'add_insert' => TRUE, // Whether to add INSERT data to backup file\n 'newline' => \"\\n\" // Newline character used in backup file\n );\n\n // Backup your entire database and assign it to a variable\n $backup = $this->dbutil->backup($prefs);\n \n if($this->input->post('truncate'))\n {\n if(in_array('logs_usuarios', $prefs['tables']))\n {\n $this->model->truncate();\n } \n } \n \n // Load the file helper and write the file to your server\n $this->load->helper('file');\n write_file('/path/to/'.$prefs['filename'], $backup);\n \n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n force_download($prefs['filename'], $backup); \n }\n\n $db['tables'] = $this->db->list_tables();\n \n $this->armarVista('backup', $db);\n }", "public function take_backup(){\n\t\t$this->load->dbutil();\n\n\t\t$prefs = array(\n 'tables' => array(), // Array of tables to backup.\n 'ignore' => array(), // List of tables to omit from the backup\n 'format' => 'zip', // gzip, zip, txt\n 'filename' => 'chikitsa-backup.sql', // File name - NEEDED ONLY WITH ZIP FILES\n 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n 'add_insert' => TRUE, // Whether to add INSERT data to backup file\n 'newline' => \"\\n\" // Newline character used in backup file\n );\n\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup =& $this->dbutil->backup($prefs);\n\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\twrite_file('./chikitsa-backup.zip', $backup);\n\n\t\t// Load the download helper and send the file to your desktop\n\t\t$this->load->helper('download');\n\t\tforce_download('chikitsa-backup.zip', $backup);\n\n\t\t$this->backup();\n\t}", "public function backupData()\n {\n $this->load->dbutil();\n\n // Backup database dan dijadikan variable\n $backup = $this->dbutil->backup();\n\n // Load file helper dan menulis ke server untuk keperluan restore\n $this->load->helper('file');\n write_file('/backup/database/mybackup.zip', $backup);\n\n // Load the download helper dan melalukan download ke komputer\n $this->load->helper('download');\n force_download('mybackup.zip', $backup);\n }", "public function create_backup()\n {\n if($this->isloggedIn())\n {\n $group = $this->session->userdata['role'];\n $data['menu'] = $this->Menu_model->getMenuItems($group);\n $data['users'] = $this->Settings_model->getAdminUsers();\n $data['company_info'] = $this->Settings_model->get_company_info();\n\n $result = $this->db->query(\"SHOW TABLE STATUS\")->result();\n $tableinfo = array();\n $totalsize = 0;\n $totalrows = 0;\n foreach($result as $res){\n $size = round($res->Data_length/1000,2);\n $totalsize += $size;\n $totalrows += $res->Rows;\n $tableinfo['all'][] = (object)array(\"name\" => $res->Name, \"size\" => $size.\" KB\", \"rows\" => $res->Rows);\n }\n $tableinfo['totalSize'] = round(($totalsize/1000),2).\" MB\";\n $tableinfo['totalRows'] = $totalrows;\n $data['dbtables'] = $tableinfo;\n $data['title'] = $data['company_info']['name'].\" | Database Backup\";\n $this->load->view(\"admin/create_backup\", $data);\n }\n else\n {\n redirect(base_url());\n }\n }", "public function backup(){\n\t\t$this->verify();\n\t\t$this->load->dbutil();\n\t\t$this->load->helper('file');\n\t\t$this->load->helper('download');\n\t\t$this->load->library('zip');\n\t\t$database_tables=['admin','behaviour','class','comments','parentlogin','resources','resources_cat','scores','studentlogin','students','subject','teachers'];\n\t\tforeach ($database_tables as $tables) {\n\t\t\t$query = $this->db->query(\"SELECT * FROM \".$tables);\n\t\t\t$data=$this->dbutil->csv_from_result($query);\n\t\t\twrite_file('../backup/'.$tables.'-'.date(\"F-d-Y\").'.csv', $data);\n\t\t\t\n\t\t}\n\t\t$this->zip->read_dir('../backup', TRUE);\n\t\t$this->zip->read_dir('../assets/myResources');\n\t\t//$this->zip->read_dir('assets/documents', FALSE);\n\t\t//$this->zip->download('officers_credential.zip');\n\t\tdelete_files('../backup/');\n\t\t$this->zip->download('backup'.date(\"F-d-Y\").'.zip');\n\t}", "public function create_backup_action()\n {\n if($this->isLoggedIn())\n {\n $getbackup = $this->input->post('getbackup');\n if(!empty($getbackup)){\n $tables = $this->input->post('dbtables');\n\n if(empty($tables)){\n echo json_encode(array(\"msg_type\" => \"error\", \"message\" => \"Please Select Table for Backup\"));\n }else{\n $this->getBackup($tables);\n }\n }\n }\n else {\n redirect(base_url());\n }\n }", "function index()\n\t{\n\t\t$this->_validate_user('tools/backup');\n\t\t$download_path = $this->fuel->backup->config('backup_path');\n\t\tif (!empty($_POST['action']))\n\t\t{\n\t\t\t\n\t\t\t// set assets flag\n\t\t\t$this->fuel->backup->include_assets = (!empty($_POST['include_assets'])) ? TRUE : FALSE;\n\t\t\t\n\t\t\t// set assets flag\n\t\t\t$this->fuel->backup->allow_ftp = (!empty($_POST['include_ftp'])) ? TRUE : FALSE;\n\t\n\t\t\t// perform backup\n\t\t\tif (!$this->fuel->backup->do_backup())\n\t\t\t{\n\t\t\t\tadd_errors($this->fuel->backup->errors());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// log message\n\t\t\t\t$msg = lang('data_backup');\n\t\t\t\t$this->fuel->logs->write($msg);\n\t\t\t}\n\n\t\t}\n\t\t$vars['download_path'] = $download_path;\n\t\t$vars['is_writable'] = is_writable($download_path);\n\t\t$vars['has_cronjobs_module'] = $this->fuel->modules->exists('cronjobs');\n\t\t$vars['include_assets'] = ($this->input->get_post('include_assets')) ? TRUE : FALSE;\n\t\t$vars['include_ftp'] = ($this->input->get_post('include_ftp')) ? TRUE : FALSE;\n\t\tif ($vars['has_cronjobs_module'])\n\t\t{\n\t\t\t$vars['cron_command'] = $this->fuel->backup->config('cron_backup_command');\n\t\t}\n\t\t$ftp_prefs = $this->fuel->backup->config('ftp_prefs');\n\t\t$vars['ftp_hostname'] = $ftp_prefs['hostname'];\n\t\t\n\t\t$crumbs = array('tools' => lang('section_tools'), lang('module_backup'));\n\t\t$this->fuel->admin->set_titlebar($crumbs, 'ico_tools_backup');\n\t\t$this->fuel->admin->render('_admin/backup', $vars, Fuel_admin::DISPLAY_NO_ACTION);\n\t}", "public function backup_database(){\n $this->load->dbutil();\n $prefs = array(\n 'tables' => array(), // Array of tables to backup.\n 'ignore' => array(), // List of tables to omit from the backup\n 'format' => 'zip', // gzip, zip, txt\n 'filename' => 'mybackup.sql', // File name - NEEDED ONLY WITH ZIP FILES\n 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n 'add_insert' => TRUE, // Whether to add INSERT data to backup file\n 'newline' => \"\\n\" // Newline character used in backup file\n );\n // Backup your entire database and assign it to a variable\n $backup = $this->dbutil->backup($prefs);\n\n $filename = \"db_backup_\" . date('YmdHis') . \".zip\";\n // Load the file helper and write the file to your server\n $this->load->helper('file');\n write_file(\"C:/wamp64/www/nsmdih_cms/database/backups/\" . $filename, $backup); \n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n force_download($filename, $backup);\n\n }", "public function enableBackup();", "public function index()\r\n\t{\r\n\t\t$this->load->dbutil();\r\n\r\n// Backup your entire database and assign it to a variable\r\n\t\t$backup =& $this->dbutil->backup();\r\n\r\n// Load the file helper and write the file to your server\r\n\t\t$this->load->helper('file');\r\n\t\twrite_file('bkp/mybackup.gz', $backup);\r\n\r\n// Load the download helper and send the file to your desktop\r\n\t\t$this->load->helper('download');\r\n\t\tforce_download('mybackup.gz', $backup);\r\n\t}", "public function savebackup(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n set_time_limit(3600);\n $filename='dbbackup_'.date('dmy').'.gz';\n // Load the download helper and send the file to your desktop\n $this->load->helper('file');\n $this->load->helper('download');\n //create and download backup\n $this->load->dbutil();\n $backup = $this->dbutil->backup();\n force_download($filename, $backup);\n \n \n echo \"Backup downloading successful\";\n \n }", "private function get_db_backup($file_path, $backup_type, $file_format = 1) {\n$this->load->helper('string');\n$key_name1 = md5(date(\"d_m_Y_H_i_s\")) . '_';\n$key_name2 = '_db';\n$key_name3 = date(\"d_m_Y_H_i_s\");\nif ($file_format == 1) {\n//strong file name\n$file_name = $key_name1 . $key_name3 . $key_name2 . '.zip';\n$prefs = array(\n'ignore' => array($this->ignore_directories),\n'format' => 'zip', // gzip, zip, txt\n'filename' => $file_name, // File name - NEEDED ONLY WITH ZIP FILES\n'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n'add_insert' => TRUE, // Whether to add INSERT data to backup file\n'newline' => \"\\n\" // Newline character used in backup file\n);\n//Backup your entire database and assign it to a variable\n$ci = get_instance();\n$backup = $ci->dbutil->backup($prefs); // waaaaa 2\n$file = $file_path . $file_name;\nif (strlen($backup)) {\nif (!write_file($file, $backup)) {\n$this->handle_error('Erreur lors de l\\'écriture de sauvegarde de la bd sur le disque: ' . $file_name);\n} else {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('La bd sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name3);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$saved_data = $this->backup->save_backup_details($file_name, $file_path);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde de le bd ici ' . anchor($this->db_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde de la bd ici ' . anchor($this->db_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_error('Error while saving db backup to database: ' . $file_name);\n}\n}\n} else {\n$this->handle_error('Error while getting db backup: ' . $file_name);\n}\n} else if ($file_format == 2) {\n$file_name = $key_name1 . $key_name3 . $key_name2 . '.sql.gz';\n$prefs = array(\n'ignore' => array($this->ignore_directories),\n'format' => 'gzip', // gzip, zip, txt\n'filename' => $file_name, // File name - NEEDED ONLY WITH ZIP FILES\n'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n'add_insert' => TRUE, // Whether to add INSERT data to backup file\n'newline' => \"\\n\" // Newline character used in backup file\n);\n//Backup your entire database and assign it to a variable\n$ci = get_instance();\n$backup = $ci->dbutil->backup($prefs); // waaaaaa 1\n$file = $file_path . $file_name;\nif (strlen($backup)) {\nif (!write_file($file, $backup)) {\n$this->handle_error('Erreur lors de l\\'écriture de sauvegarde de la bd sur le disque: ' . $file_name);\n} else {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('La bd sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name3);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$saved_data = $this->backup->save_backup_details($file_name, $file_path);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde de le bd ici ' . anchor($this->db_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde de la bd ici ' . anchor($this->db_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_error('Erreur lors de la sauvegarde de la db à la base de données: ' . $file_name);\n}\n}\n} else {\n$this->handle_error('Erreur lors de l\\'obtention du sauvegarde de la bd: ' . $file_name);\n}\n}\n}", "function index(){\n\t\t$this->load->dbutil();\n\t\t$dbs = $this->dbutil->list_databases();\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup = $this->dbutil->backup();\n\t\t$filename = sprintf('backup-%s.sql.gz',date('Y-m-d-H-i-s'));\n\t\t$path = sprintf('/tmp/');\n\t\t$temp_file = $path . $filename;\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\twrite_file($temp_file, $backup);\n\t\t$this->logging->log('backup','success');\n\t\t$this->session->set_flashdata('notice','Move the file backup file from your downloads folder to your backups folder.');\n\t\t\n\t\t// Load the download helper and send the file to your desktop\n\t\t$this->load->helper('download');\n\t force_download($filename, $backup);\n\t\tredirect('home');\n\t}", "function createBackup()\n {\n\n\n //Enter your database information here and the name of the backup file\n $mysqlDatabaseName ='edumarxc_bmwdatabase';\n $mysqlUserName ='edumarxc_bmw';\n $mysqlPassword ='bmw_INF370';\n $mysqlHostName ='dbxxx.hosting-data.io';\n $mysqlExportPath ='backup.sql';\n\n //Please do not change the following points\n //Export of the database and output of the status\n $command='mysqldump --opt -u' .$mysqlUserName .' -p' .$mysqlPassword .' ' .$mysqlDatabaseName .' > ' .$mysqlExportPath;\n exec($command,$output=array(),$worked);\n switch($worked){\n case 0:\n return true;\n break;\n case 1:\n return false;\n break;\n case 2:\n return false;\n break;\n }\n\n\n\n }", "public function backup() {\n $result = $this->dumpDatabase();\n $size = $this->getFilesize($this->filename);\n $this->sendMail($result, $size);\n echo $this->lang['all_done'];\n }", "protected function backupTable() {\n\t\t\t// check if table parameter is set and in session\n\t\t$this->checkTableAccess();\n\n\t\t$table = $_REQUEST['table'];\n\t\t$table = $GLOBALS['TYPO3_DB']->quoteStr($table, $table);\n\t\t$backup = $this->backupPrefix . $table;\n\n\t\t\t// get create statement\n\t\t$sql = 'SHOW CREATE TABLE ' . $table;\n\t\t$res = $GLOBALS['TYPO3_DB']->sql_query($sql);\n\t\tif (!$res) {\n\t\t\t\t## @ToDo: change die() with displayMessage()\n\t\t $msg = $GLOBALS['LANG']->sL($this->locallangXML . ':error.dbShowCreate');\n\t\t\t$msg = sprintf($msg, $sql/*$GLOBALS['TYPO3_DB']->sql_error()*/);\n\t\t\t\t// log\n\t\t\tif (!empty ($this->extConf['enableDevlog'])) {\n\t\t\t\tt3lib_div::devLog($msg, $this->extKey, 3);\n\t\t\t}\n\t\t\tdie($msg);\n\t\t}\n\t\t$ftc = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\t\t// delete backup table\n\t\t$sql = 'DROP TABLE IF EXISTS ' . $backup;\n\t\t$GLOBALS['TYPO3_DB']->sql_query($sql);\n\t\t\t// create backup table\n\t\t$sql = $ftc['Create Table'];\n\t\t\t\t// replace table name (but not field names with same value)\n\t\t$firstLineOri = substr($sql, 0, (15 + strlen($table)));\n\t\t$firstLineNew = strtr($firstLineOri, array($table => $backup));\n\t\t$sql = strtr($sql, array($firstLineOri => $firstLineNew));\n\t\t$res = $GLOBALS['TYPO3_DB']->sql_query($sql);\n\t\tif (!$res) {\n\t\t\t\t## @ToDo: change die() with displayMessage()\n\t\t $msg = $GLOBALS['LANG']->sL($this->locallangXML . ':error.dbCreateBackupTable');\n\t\t\t$msg = sprintf($msg, $GLOBALS['TYPO3_DB']->sql_error());\n\t\t\t\t// log\n\t\t\tif (!empty ($this->extConf['enableDevlog'])) {\n\t\t\t\tt3lib_div::devLog($msg, $this->extKey, 3);\n\t\t\t}\n\t\t\tdie($msg);\n\t\t}\n\n\t\t\t// copy data\n\t\t$sql = 'INSERT INTO ' . $backup . '\n\t\t\t\tSELECT * FROM ' . $table;\n\t\t$res = $GLOBALS['TYPO3_DB']->sql_query($sql);\n\t\tif (!$res) {\n\t\t\t\t## @ToDo: change die() with displayMessage()\n\t\t $msg = $GLOBALS['LANG']->sL($this->locallangXML . ':error.dbInsertSelect');\n\t\t\t$msg = sprintf($msg, $GLOBALS['TYPO3_DB']->sql_error());\n\t\t\t\t// log\n\t\t\tif (!empty ($this->extConf['enableDevlog'])) {\n\t\t\t\tt3lib_div::devLog($msg, $this->extKey, 3);\n\t\t\t}\n\t\t\tdie($msg);\n\t\t} else {\n\t\t\techo 'ok';\n\t\t\texit;\n\t\t}\n\t}", "public function backupDatabase($backupPath='', $compression='false', $database='') {\nif(!empty($database)){\n\t\t\n\t\t $this->dbname = $database;\n\t\t \n\t}\n\n$serverInfo = $this->serverInfo();\n\n \n$databaseData = $this->showTables_Fields($this->dbname, true);\n\n$result_ENGINE = $this->selectData(\"ENGINE\", 'information_schema.TABLES', \"WHERE TABLE_SCHEMA = '\".$this->dbname.\"'\");\n\n $query_1 = \"show variables like 'character_set_database'\";\n\t\t\n $query_2 = \"show variables like 'collation_database'\";\n\t\t\n $query_3 = \"SHOW TABLE STATUS\";\n\t\t\n\n$charset = $this->showData($query_1);\n$collation = $this->showData($query_2);\n$table_status = $this->showData($query_3);\n\n$hostName = preg_replace('/MySQL host info: /', '', $serverInfo['host_info']);\n$serverVersion = preg_replace('/[a-z -]/us', '', $serverInfo['server_info']);\n\n\n\n\t $exportData = '-----------------------------------------------------------'.\"\\n\";\n $exportData .= '-- teDatabase SQL Dump -----------------------------'.\"\\n\";\n $exportData .= '-- http://te-edu.com -------------------------------'.\"\\n\";\n\t $exportData .= '-- te-edu development team -------------------------'.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n\t $exportData .= '-- FILE CREATED WITH : -------------------------------'.\"\\n\";\n\t $exportData .= '-- teDatabase class version 1.11 --------------------'.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n \t $exportData .= '-- HOST NAME : ----------------------------------------'.\"\\n\";\n\t $exportData .= '-- '.$hostName.' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n \t $exportData .= '-- FILE CREATION TIME : -------------------------------'.\"\\n\";\n\t $exportData .= '-- '.date('l dS \\of F Y h:i:s A').' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n \t $exportData .= '-- SERVER VERSION : ----------------------------------'.\"\\n\";\n\t $exportData .= '-- '.$serverVersion.' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n \t $exportData .= '-- PHP VERSION : ----------------------------------'.\"\\n\";\n\t $exportData .= '-- '. phpversion().' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\\n\";\n\t \n\t $exportData .= 'SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO '.\"\\n\\n\";\n\t \n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n\t $exportData .= '-- DATABASE NAME : '.$this->dbname.' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\\n\";\n\n\t $exportData .= 'CREATE DATABASE `'.$this->dbname.'` DEFAULT CHARACTER SET '.$charset[0]['Value'].' COLLATE '.$collation[0]['Value'].';'.\"\\n\\n\";\n\n$counter = 0;\n$increment = '';\nforeach($databaseData as $table=>$tableFiels){\n\n\t$tableKeysData = '';\t\t\n$query_4 = \"SHOW KEYS FROM \".$table.\"\";\n$tableKeys = $this->showData($query_4);\n\n$type = array();\nfor($i=0;$i<count($tableKeys);$i++){\n\t\n\t$type[$tableKeys[$i][\"Key_name\"]][] = array($tableKeys[$i][\"Column_name\"], $tableKeys[$i][\"Non_unique\"]);\n\n}\n\nforeach($type as $key=>$keyType){\n\n\t\t\tif(end($type) !== $keyType){\n\t\t\t\t$comma = ', ';\n\t\t\t}else{\n\t\t\t\t$comma = '';\n\t\t\t}\n\tif($key == 'PRIMARY'){\n\t\t\n\t\t$tableKeysData .= ' PRIMARY KEY(';\n\t\t\t\t\t\t\t\t\t\t\t \n\t\tforeach($keyType as $keys=>$col){\n\t\t\t\n\t\t\tif(end($keyType) !== $col){\n\t\t\t\t$tableKeysData .= '`'.$col[0].'`, ';\n\t\t\t}else{\n\t\t\t\t$tableKeysData .= '`'.$col[0].'`';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$tableKeysData .= ')'.$comma.''.\"\\n\";\n\t\t\n\t}else{\n\n\t $tableKeysDataS = '';\n\t\t\t\t\t\t\t\t\t\t \n\t\tforeach($keyType as $keys=>$col){\n\t\t\tif($keyType[$keys][1] == 0){\n\t\t\t\t$tableKeysDataT = ' UNIQUE KEY `'.$key.'`(';\n\t\t\t}else{\n\t\t\t\t$tableKeysDataT = ' KEY `'.$key.'`(';\n\t\t\t}\n\n\t\t\tif(end($keyType) !== $col){\n\t\t\t\t$tableKeysDataS .= '`'.$col[0].'`, ';\n\t\t\t}else{\n\t\t\t\t$tableKeysDataS .= '`'.$col[0].'`';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$tableKeysDataS .= ')'.$comma.''.\"\\n\";\n\t\t$tableKeysData .= $tableKeysDataT.$tableKeysDataS;\n\t\t$tableKeysDataS = '';\n\t\t$tableKeysDataT='';\n\t}\n\t\n}\nunset($type);\n\n\t\t$databaseData[$table]['engine'] = $table_status[$counter]['Engine'];\n\t\t\n\t\t$ai = '';\n\n\t\tif($table_status[$counter]['Auto_increment'] !== ''){\n\t\t\t$ai = strtoupper($table_status[$counter]['Auto_increment']);\n\t\t\t\n\t\t}\t\n\t\t\t\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\";\n\t $exportData .= '-- STRUCTURE FOR TABLE : '.$table.' '.\"\\n\";\n\t $exportData .= '-----------------------------------------------------------'.\"\\n\\n\";\n\t \n\t $exportData .= 'DROP TABLE IF EXISTS `'.$table.'`;'.\"\\n\\r\"; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t $exportData .= 'CREATE TABLE IF NOT EXISTS `'.$table.'` ('.\"\\n\\r\"; \n\nforeach($tableFiels as $key=>$tableData){\n\t\t\n\t\tif($tableData[\"Null\"] == 'NO'){\n\t\t\t$tableData[\"Null\"] = 'NOT NULL';\n\t\t}else{\n\t\t\t$tableData[\"Null\"] = 'DEFAULT NULL';\n\t\t}\n\t\t\n\t\t$default = \"\";\n\t\t\n\t\tif(empty($tableData[\"Default\"])){\n\t\t\t\n\t\t\tif($key !== 0){\n\t\t\t\t$default = \"DEFAULT ''\";\n\t\t\t}\n\t\t\t\n\t\t}elseif($tableData[\"Default\"] == '0'){\n\t\t\t\n\t\t\t$default = \"DEFAULT '0'\";\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$default = \"DEFAULT '\".$tableData['Default'].\"'\";\n\n\t\t}\n\t\t\n\t\tif(!empty($ai)){\n\t\t\t$default = $default.\" AUTO_INCREMENT\";\n\t\t\t$increment = 'AUTO_INCREMENT='.$ai;\n\t\t\t$ai = '';\n\t\t}\n\t\t\n\t \t $exportData .= '`'.$tableData[\"Field\"].'` '.$tableData[\"Type\"].' '.$tableData[\"Null\"].' '.$default.','.\"\\n\";\n\t\t\n\t\t $lastElement = end(array_keys($tableFiels));\n\t\t $lastElement = $tableFiels[$lastElement][\"Field\"];\n\t\t\n\t\t if($lastElement == $tableData[\"Field\"]){\n\t\t\t\t\n\t\t\t$exportData .= $tableKeysData;\n\t\t\t$exportData .= \")ENGINE=\".$databaseData[$table]['engine'].\" DEFAULT CHARSET=\".$charset[0]['Value'].\" \".$increment.\";\".\"\\n\";\n\t \t\t\n\t\t}\n\t}\n\t\n\t\t $counter++;\n}\n\nif($compression){\n\t$ext = \".sql.gz\";\n}else{\n\t$ext = \".sql\";\n}\n$backupFile = $this->dbname .\"__\". date(\"Y-m-d-H-i-s\");\n\n$matchBackupDestination = is_array($backupPath);\n//$matchBackupDestination = preg_match(\"/http|https|ftp/\", $backupPath);\nif(!$matchBackupDestination){\n\t\t\t\t\n\tif($backupPath == 'download'){\n\t\t\n\t\tif($compression){\n\t\t\t\theader(\"Cache-Control: no-cache, must-revalidate\"); \n\t\t\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"); \n\t\t\t\theader('Content-Description: File Transfer');\n\t\t\t\theader('Content-Type: application/x-gzip');\n\t\t\t\theader('Content-Disposition: attachment; filename='. $backupFile.$ext); \n\t\t\t\t\n\t\t\t\tif (!extension_loaded('zlib')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$exportData = gzencode($exportData, 9);\n\t\t\t\t\t\techo $exportData;\n\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tif (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){\n\t\t\t\t\t\tob_start(\"ob_gzhandler\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t ob_start(); \n\t\t\t\t\t}\n\t\t\t\t\t\techo $exportData;\n\t\t\t\n\t\t\t\t\tob_end_flush();\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t}else{\n\t\t\t\theader('Content-Description: File Transfer');\n\t\t\t\theader('Content-Type: text/plain');\n\t\t\t\theader('Content-Disposition: attachment; filename='. $backupFile.$ext); \n\t\t\t\techo $exportData;\n\t\t\t\n\t\t}\n\t}else{\n\t\t\t$checkDir = is_dir($backupPath.\"/\");\n\t\t\t\n\t\t\t$check = true;\n\t\t\t\n\t\t\tif(!$checkDir){\n\n\t\t\t\t$check = mkdir($backupPath.\"/\", 0644, true);\n\t\t\t\t\n\t\t\t}\n\t\t\t\tif(!$check){\n\t\t\t\t\t\n\t\t\t\t\t\t$this->errorMessage(\"Not possible to create directory with path defined. Possibly incorect path\");\n\t\t\t\t\t\texit;\n\t\t\t\t}else{\n\t\t\t\t\t\tif($compression){\n\t\t\t\t\t\t$exportData = gzencode($exportData, 9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$wFile = fopen($backupPath.\"/\".$backupFile.$ext,'w');\n\t\t\t\t\t\t\n\t\t\t\t\t\tfile_put_contents($backupPath.\"/\".$backupFile.$ext, $exportData);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfclose($wFile); \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\n\t}\n}else{\n\t\n// preg_match(\"/http|https|ftp/\", strtolower($backupPath[0]), $matchAddress);\n \t\t\t\n\t\t\t$backupDir = \"backup/\";\n\t\t\t\n \t\t\t$checkDir = is_dir(dirname(__FILE__).\"/\".$backupDir);\n\t\t\t\n\t\t\t$check = true;\n\t\t\t\n\t\t\tif(!$checkDir){\n\n\t\t\t\t$check = mkdir(dirname(__FILE__).\"/\".$backupDir, 0644, true);\n\t\t\t\t\n\t\t\t}\n\t\t\t\tif(!$check){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->errorMessage(\"Not possible to create backup directory.\");\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\tif($compression){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$exportData = gzencode($exportData, 9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$wFile = fopen($backupDir.$backupFile.$ext,'w');\n\t\t\t\t\t\t\n\t\t\t\t\t\tfile_put_contents($backupDir.$backupFile.$ext, $exportData);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfclose($wFile); \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\n\t//$data = $tr->backupDatabase(array('ftp', 'localhost', 'database', 'bogyvet', '654321'), true, 'te_edu_info_novi');\nif($backupPath[0] == 'ftp' || $backupPath[0] == 'ftps'){\n\n\tif(!extension_loaded('curl')) {\n\t\t$wFile = fopen($backupDir.$backupFile.$ext,'rb');\n\t\t\n\t\t$curl_init = curl_init();\n\t\tcurl_setopt($curl_init, CURLOPT_URL, \"\".$backupPath[0].\"://\".$backupPath[3].\":\".$backupPath[4].\"@\".$backupPath[1].\":\".$backupPath[5].\"/\".$backupPath[2].\"/\".$backupFile.$ext);\n\t\t\n\t\tif( $backupPath[0] == 'ftps'){\n\t\t\n\t\tcurl_setopt($curl_init, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl_init, CURLOPT_SSL_VERIFYHOST, 1);\n\t\tcurl_setopt($curl_init, CURLOPT_FTP_SSL, CURLOPT_FTPSSLAUTH);\n\t\t//curl_setopt($curl_init, CURLOPT_SSLVERSION, 3);\n\t\t\n\t\t}\n\t\tcurl_setopt($curl_init, CURLOPT_UPLOAD, 1);\n\t\tcurl_setopt($curl_init, CURLOPT_INFILE, $wFile);\n\t\tcurl_setopt($curl_init, CURLOPT_INFILESIZE, filesize($backupDir.$backupFile.$ext));\n\t\tcurl_exec ($curl_init);\n\t\t$curl_error = curl_error($curl_init);\n\t\tcurl_close ($curl_init);\n\n\t\n\n\t\t\n if(!empty($curl_error)) {\n\t\t\t$this->errorMessage($curl_error);\n }\n\t\n\t\tfclose($wFile);\n\t\t\n\t\t\n\t}elseif(!extension_loaded('ftp')) {\n\n\t\t$connectionCreate = @ftp_connect($backupPath[1], $backupPath[5]);\n\t\t\n\t\tif(!$connectionCreate){\n\t\t\t\n\t\t \t$this->errorMessage(\"Not possible to connect to ftp: \n\t\t\t\t\t\t\t\t- server : \".$backupPath[1].\" \n\t\t\t\t\t\t\t\t- port : \".$backupPath[5].\"\");\n\t\t\texit;\t\t\n\t\t}\n\t\t\n\t\t$ftpLogin = @ftp_login($connectionCreate, $backupPath[3], $backupPath[4]); \n\t\t\n\t\tif(!$ftpLogin){\n\t\t\t\n\t\t \t$this->errorMessage(\"Not possible to login ftp: \n\t\t\t\t\t\t\t\t- server : \".$backupPath[1].\"\\n \n\t\t\t\t\t\t\t\t- port : \".$backupPath[5].\"\n\t\t\t\t\t\t\t\t- user : \".$backupPath[3].\" \n\t\t\t\t\t\t\t\t- password : \".$backupPath[4].\" \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\");\n\t\t\texit;\t\t\n\t\t}\n\t\tftp_pasv($connectionCreate, true);\n\n\t\t$uploadBackup = ftp_put($connectionCreate, $backupPath[2].\"/\".$backupFile.$ext, $backupDir.$backupFile.$ext, FTP_BINARY); \n\t\treturn $uploadBackup;\n\t\tif (!$uploadBackup) { \n\t\t\n\t\t\t$this->errorMessage(\"FTP upload failed ftp:\n\t\t\t\t\t\t\t\t- server : \".$backupPath[1].\" \n\t\t\t\t\t\t\t\t- port : \".$backupPath[5].\" \n\t\t\t\t\t\t\t\t- source file path: \".$backupDir.$backupFile.$ext.\" \n\t\t\t\t\t\t\t\t- destination file name: \". $backupFile.$ext.\"\");\n\t\t\texit;\t\n\t\t} \n\t\n\t ftp_close ($connectionCreate);\n\n\n\t\n\t}else{\n\t//RADI SA FTPS\n$wFile = fopen($backupDir.$backupFile.$ext,'rb');\n\n$opts = array( 'ftp'=>array('overwrite'=> true)); \n $context = stream_context_create($opts); \n\n@file_put_contents(\"\".$backupPath[0].\"://\".$backupPath[3].\":\".$backupPath[4].\"@\".$backupPath[1].\":\".$backupPath[5].\"/\".$backupPath[2].\"/\".$backupFile.$ext, \n\t\t\t\t\t$wFile, \n\t\t\t\t\tFILE_APPEND);\t\n\n\t\n\t\n\t\n\t\n//$wFile = @file_get_contents(\"\".$backupPath[0].\"://\".$backupPath[3].\":\".$backupPath[4].\"@\".$backupPath[1].\":\".$backupPath[5].\"/classicalmusic.te-edu.com/Untitled-1.jpg\"); \n//\n//$opts = array( 'ftp'=>array('overwrite'=> true)); \n// $context = stream_context_create($opts); \n//@file_put_contents(\"\".$backupPath[0].\"://\".$backupPath[3].\":\".$backupPath[4].\"@\".$backupPath[1].\":\".$backupPath[5].\"/\".$backupPath[2].\"/Untitled-1.jpg\", \n//\t\t\t\t\t$wFile, \n//\t\t\t\t\tfalse, $context);\t\n\n\n\n\t\t}\n}elseif($backupPath[0] == 'http' || $backupPath[0] == 'https'){\n\t\n\tif(extension_loaded('curl')) {\n\n\t\t\n\t\t\n\n\t\t$backupPath[3] = base64_encode($backupPath[3]);\n\t\t$backupPath[4] = sha1($backupPath[4]);\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\n\t\t\n\t\tif( $backupPath[0] == 'https'){\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);\n\t\t\n\t\t}\n\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_URL, \"\".$backupPath[0].\"://\".$backupPath[3].\":\".$backupPath[4].\"@\".$backupPath[1].\":80/\".$backupPath[2].\"/upload.php\");\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, array(\"file\"=>\"@$wFile\"));\n\t\tcurl_setopt($ch, CURLOPT_INFILESIZE, filesize($backupDir.$backupFile.$ext));\n\n\t\t$response = curl_exec($ch);\n\t\t$curl_error = curl_error($ch);\n\n\t\tcurl_close ($ch);\n\n if(!empty($curl_error)) {\n\t\t\t$this->errorMessage($curl_error);\n }\n\t\t preg_match(\"/Warning/\", $response, $matchError);\n\n if($matchError) {\n\t\t\n\t\t\t$this->errorMessage(\"Error occured during uploading backup file to server\");\n }\n\n\t\t\n\t}else{\n\t\t\n\t\t//OTHER WAY TO UPLOAD\n\t}\n\t\t\t\t\t\t\t \n}elseif($matchAddress[0] == 'https'){\n\t\n\t\tif(extension_loaded('curl')) {\n\n\n\n\t\t}else{\n\t\t\t\n\t\t\t//OTHER WAY TO UPLOAD\n\t\t\t\n\t\t}\n}\n}\n\n}", "public function index(){\n\t $mysqlUserName = \"bolsa\";\n\t $mysqlPassword = \"trabajo\";\n\t $mysqlHostName = \"localhost\";\n\t $DbName = \"bolsa_trabajo\";\n\t $backup_name = \"mybackup.sql\";\n\t //$tables = \"Your tables\";\n\t\n\t //or add 5th parameter(array) of specific tables: array(\"mytable1\",\"mytable2\",\"mytable3\") for multiple tables\n\t\n\tfunction Export_Database($host,$user,$pass,$name, $tables=false, $backup_name=false )\n\t {\n\t $mysqli = new mysqli($host,$user,$pass,$name); \n\t $mysqli->select_db($name); \n\t $mysqli->query(\"SET NAMES 'utf8'\");\n\t\n\t $queryTables = $mysqli->query('SHOW TABLES'); \n\t while($row = $queryTables->fetch_row()) \n\t { \n\t $target_tables[] = $row[0]; \n\t } \n\t if($tables !== false) \n\t { \n\t $target_tables = array_intersect( $target_tables, $tables); \n\t }\n $content = \"SET FOREIGN_KEY_CHECKS=0;\\n\\n\";\n\t foreach($target_tables as $table)\n\t {\n\t $result = $mysqli->query('SELECT * FROM '.$table); \n\t $fields_amount = $result->field_count; \n\t $rows_num=$mysqli->affected_rows; \n\t $res = $mysqli->query('SHOW CREATE TABLE '.$table); \n\t $TableMLine = $res->fetch_row();\n\t $content = (!isset($content) ? '' : $content) . \"\\n\\n\".$TableMLine[1].\";\\n\\n\";\n\t\n\t for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0) \n\t {\n\t while($row = $result->fetch_row()) \n\t { //when started (and every after 100 command cycle):\n\t if ($st_counter%100 == 0 || $st_counter == 0 ) \n\t {\n\t $content .= \"\\nINSERT INTO \".$table.\" VALUES\";\n\t }\n\t $content .= \"\\n(\";\n\t for($j=0; $j<$fields_amount; $j++) \n\t { \n\t $row[$j] = str_replace(\"\\n\",\"\\\\n\", addslashes($row[$j]) ); \n\t if (isset($row[$j]))\n\t {\n\t $content .= '\"'.$row[$j].'\"' ; \n\t }\n\t else \n\t { \n\t $content .= '\"\"';\n\t } \n\t if ($j<($fields_amount-1))\n\t {\n\t $content.= ',';\n\t } \n\t }\n\t $content .=\")\";\n\t //every after 100 command cycle [or at last line] ....p.s. but should be inserted 1 cycle eariler\n\t if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num) \n\t { \n\t $content .= \";\";\n\t } \n\t else \n\t {\n\t $content .= \",\";\n\t } \n\t $st_counter=$st_counter+1;\n\t }\n\t } $content .=\"\\n\\n\\n\";\n\t }\n $content = $content.\"SET FOREIGN_KEY_CHECKS=1;\";\n\t //$backup_name = $backup_name ? $backup_name : $name.\"___(\".date('H-i-s').\"_\".date('d-m-Y').\")__rand\".rand(1,11111111).\".sql\";\n\t $backup_name = $backup_name ? $backup_name : $name.\".sql\";\n\t header('Content-Type: application/octet-stream'); \n\t header(\"Content-Transfer-Encoding: Binary\"); \n\t header(\"Content-disposition: attachment; filename=\\\"\".$backup_name.\"\\\"\"); \n\t echo $content; exit;\n }\n\t Export_Database($mysqlHostName,$mysqlUserName,$mysqlPassword,$DbName, $tables=false, $backup_name=false); \n }", "public function db_backups()\n {\n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'menu_data' => ee()->backup_pro->get_dashboard_view_menu(),\n 'method' => $this->platform->getPost('method')\n );\n \n ee()->view->cp_page_title = ee()->lang->line('database_backups');\n ee()->jquery->tablesorter('#database_backups table', '{headers: {8: {sorter: false}, 0: {sorter: false}, 1: {sorter: false}, 2: {sorter: false}, 3: {sorter: false}}, widgets: [\"zebra\"], sortList: [[4,1]]}');\n ee()->javascript->compile();\n \n return array(\n 'body' => ee()->load->view('database_backups', $variables, true),\n 'heading' => $this->services['lang']->__('database_backups'),\n 'breadcrumb' => array(\n ee('CP/URL', 'addons/settings/backup_pro')->compile() => lang('backup_pro_module_name'),\n ee('CP/URL', 'addons/settings/backup_pro/index')->compile() => lang('home_bp_dashboard_menu')\n )\n );\n }", "abstract public function backup_table($table_name, $backup_table);", "function index() {\nif ($this->input->post('backup')) {\n$this->form_validation->set_rules('backup_type', 'Backup Type', 'required');\n$this->form_validation->set_rules('file_type', 'File Type', 'required');\nif ($this->form_validation->run($this)) {\n$backup_type = $this->input->post('backup_type');\n$file_format = $this->input->post('file_type');\nif (trim($backup_type) == 1) {\n$this->get_db_backup($this->db_backup_path, $backup_type, $file_format);\n} else if (trim($backup_type) == 2) {\n$this->get_site_backup($this->site_backup_path, $backup_type, $file_format);\n}\n}\n}\n$data['errors'] = $this->error;\n$data['success'] = $this->success;\n$this->load->view('backup_view', $data);\n}", "public function index() {\n try { \n \\Artisan::call('backup:run');\n }\n catch( \\Exception $e ) {\n \t//dd( $e );\n return redirect()->back();\n /*->withErrors(['error_aplicacion'=>'Error al crear el backup, contacte con el administrador.']); */ \n } \n \n return redirect()->back();\n }", "function backup() {\n global $host, $user, $pwd, $base, $path;\n $file = 'backup_' . date(\"Y-m-d-H:i:s\") . '.gz';\n\n system(\"mysqldump --add-drop-table --create-options --skip-lock-tables --extended-insert --quick --set-charset --host=$host --user=$user --password=$pwd $base | gzip > $path/backup/$file\");\n }", "public function createAction() {\r\n $request = reqEbbs::get('post');\r\n $response = new responseEbbs();\r\n /** @var backupLogTxtModelEbbs $logTxt */\r\n $logTxt = $this->getModel('backupLogTxt');\r\n /** @var backupTechLogModelEbbs $techLog */\r\n $techLog = $this->getModel('backupTechLog');\r\n /** @var warehouseEbbs $bupFolder */\r\n $bupFolder = frameEbbs::_()->getModule('warehouse');\r\n $uploadingList = array();\r\n $backupComplete = false;\r\n\r\n if(!empty($request['opt_values'])){\r\n do_action('bupBeforeSaveBackupSettings', $request['opt_values']);\r\n /* @var $optionsModel optionsModelEbbs*/\r\n $optionsModel = frameEbbs::_()->getModule('options')->getModel();\r\n $optionsModel->saveMainFromDestGroup($request);\r\n $optionsModel->saveGroup($request);\r\n $optionsModel->refreshOptions();\r\n\r\n // if warehouse changed - create necessary dir\r\n if (!$bupFolder->getFolder()->exists())\r\n $bupFolder->getFolder()->create();\r\n }\r\n\r\n $destination = $this->getModel()->getConfig('dest');\r\n if($destination !== 'ftp') {\r\n $isAuthorized = $this->getModel()->checkCloudServiceRemoteServerIsAuth($destination);\r\n if(!$isAuthorized){\r\n $response->addError($this->getModel()->getErrors());\r\n return $response->ajaxExec();\r\n }\r\n }\r\n\r\n // We are need to check \"warehouse\" directory (usually: wp-content/upsupsystic)\r\n if (!$this->getModel()->checkWarehouse()) {\r\n $response->addError($this->getModel()->getWarehouseError());\r\n return $response->ajaxExec();\r\n }\r\n\r\n if($this->getModel()->isFilesystemRequired() && !$this->checkExtensions($response)) {\r\n return $response->ajaxExec();\r\n }\r\n\r\n $currentBackupPath = $this->getModel()->generateFilename(array('zip', 'sql', 'txt'));\r\n $logTxt->setLogName(basename($currentBackupPath['folder']));\r\n $logTxt->writeBackupSettings($request['opt_values']);\r\n $logTxt->add(__('Clear temporary directory', EBBS_LANG_CODE));\r\n $techLog->deleteOldLogs();\r\n $techLog->setLogName(basename($currentBackupPath['folder']));\r\n\r\n if ($this->getModel()->isDatabaseRequired()) {\r\n $logTxt->add(__(sprintf('Start database backup: %s', $currentBackupPath['sql']), EBBS_LANG_CODE));\r\n $this->getModel()->getDatabase()->create($currentBackupPath['sql']);\r\n $dbErrors = $this->getModel()->getDatabase()->getErrors();\r\n\r\n if (!empty($dbErrors)) {\r\n $logTxt->add(__(sprintf('Errors during creation of database backup, errors count %d', count($dbErrors)), EBBS_LANG_CODE));\r\n $response->addError($dbErrors);\r\n return $response->ajaxExec();\r\n }\r\n\r\n $logTxt->add(__('Database backup complete.'), EBBS_LANG_CODE);\r\n $uploadingList[] = $currentBackupPath['sql'];\r\n $backupComplete = true;\r\n }\r\n\r\n if ($this->getModel()->isFilesystemRequired()) {\r\n if(!file_exists($currentBackupPath['folder'])) {\r\n $bupFolder->getController()->getModel('warehouse')->create($currentBackupPath['folder'] . DS);\r\n }\r\n\r\n $logTxt->add(__('Scanning files.', EBBS_LANG_CODE));\r\n $files = $this->getModel()->getFilesList();\r\n // $files = array_map('realpath', $files);\r\n\r\n $logTxt->add(sprintf('%s files scanned.', count($files, true) - count($files)));\r\n $logTxt->add(__('Total stacks: ' . count($files), EBBS_LANG_CODE));\r\n $techLog->set('stacks', $files);\r\n $uploadingList[] = $currentBackupPath['folder'];\r\n $backupComplete = false;\r\n }\r\n\r\n // if need create filesystem backup or send DB backup on cloud - backup not complete\r\n if(!empty($files) || $destination !== 'ftp') {\r\n $backupComplete = false;\r\n $techLog->set('destination', $destination);\r\n $techLog->set('uploadingList', $uploadingList);\r\n $techLog->set('emailNotifications', (frameEbbs::_()->getModule('options')->get('email_ch') == 1) ? true : false);\r\n\r\n $data = array(\r\n 'page' => 'backup',\r\n 'action' => 'createBackupAction',\r\n 'backupId' => $currentBackupPath['folder'],\r\n );\r\n\r\n if(!empty($files))\r\n $logTxt->add(__('Send request to generate backup file stacks', EBBS_LANG_CODE));\r\n\r\n $this->getModel('backup')->sendSelfRequest($data);\r\n }\r\n\r\n if($backupComplete && frameEbbs::_()->getModule('options')->get('email_ch') == 1) {\r\n $email = frameEbbs::_()->getModule('options')->get('email');\r\n $subject = __('DropBox Backup by Supsystic Notifications', EBBS_LANG_CODE);\r\n\r\n $logTxt->add(__('Email notification required.', EBBS_LANG_CODE));\r\n $logTxt->add(sprintf(__('Sending to', EBBS_LANG_CODE) . '%s', $email));\r\n\r\n $message = $logTxt->getContent(false);\r\n\r\n wp_mail($email, $subject, $message);\r\n }\r\n\r\n $response->addData(array(\r\n 'backupLog' => $logTxt->getContent(),\r\n 'backupId' => basename($currentBackupPath['folder']),\r\n 'backupComplete' => $backupComplete\r\n ));\r\n\r\n return $response->ajaxExec();\r\n\r\n $cloud = $log->getCurrentBackupFilesName();\r\n\r\n $handlers = $this->getModel()->getDestinationHandlers();\r\n\r\n if (array_key_exists($destination, $handlers)) {\r\n\r\n $cloud = array_map('basename', $cloud);\r\n\r\n $log->string(__(sprintf('Upload to the \"%s\" required', ucfirst($destination)), EBBS_LANG_CODE));\r\n $log->string(sprintf('Files to upload: %s', rtrim(implode(', ', $cloud), ', ')));\r\n $handler = $handlers[$destination];\r\n $result = call_user_func_array($handler, array($cloud));\r\n if ($result === true || $result == 200 || $result == 201) {\r\n $log->string(__(sprintf('Successfully uploaded to the \"%s\"', ucfirst($destination)), EBBS_LANG_CODE));\r\n\r\n $path = frameEbbs::_()->getModule('warehouse')->getPath();\r\n $path = untrailingslashit($path);\r\n\r\n foreach ($cloud as $file) {\r\n $log->string(__(sprintf('Removing %s from the local storage.', $file), EBBS_LANG_CODE));\r\n if (@unlink($path . '/' . $file)) {\r\n $log->string(__(sprintf('%s successfully removed.', $file), EBBS_LANG_CODE));\r\n } else {\r\n $log->string(__(sprintf('Failed to remove %s', $file), EBBS_LANG_CODE));\r\n }\r\n }\r\n } else {\r\n switch ($result) {\r\n case 401:\r\n $error = __('Authentication required.', EBBS_LANG_CODE);\r\n break;\r\n case 404:\r\n $error = __('File not found', EBBS_LANG_CODE);\r\n break;\r\n case 500:\r\n $error = is_object($handler[0]) ? $handler[0]->getErrors() : __('Unexpected error (500)', EBBS_LANG_CODE);\r\n break;\r\n default:\r\n $error = __('Unexpected error', EBBS_LANG_CODE);\r\n }\r\n\r\n $log->string(__(\r\n sprintf(\r\n 'Cannot upload to the \"%s\": %s',\r\n ucfirst($destination),\r\n is_array($error) ? array_pop($error) : $error\r\n )\r\n , EBBS_LANG_CODE));\r\n }\r\n }\r\n\r\n if(empty($error)) {\r\n $response->addMessage(__('Backup complete.', EBBS_LANG_CODE));\r\n } else {\r\n $response->addError(__('Error occurred: ' . ucfirst($destination) . ', ' . $error, EBBS_LANG_CODE));\r\n }\r\n\r\n // Allow to do new backups.\r\n $this->unlock();\r\n\r\n $backupPath = untrailingslashit($bupStorageRoot) . DS;\r\n $pathInfo = pathinfo($cloud[0]);\r\n $log->save($backupPath . $pathInfo['filename'] . '.txt');\r\n\r\n $response->addData(\r\n array(\r\n 'backupLog' => frameEbbs::_()->getModule('backup')->getModel('backupLog')->getBackupLog(),\r\n )\r\n );\r\n\r\n $log->clear();\r\n\r\n return $response->ajaxExec();\r\n\t}", "public function backupdb(Request $request)\n\t{\n\t\t//path - Storage/app/public/database_backup \n\t\t\n\t\t$arrTables = array(); \n\t\t$tables = DB::select('SHOW TABLES');\n\t\tforeach($tables as $table)\n\t\t{ \n\t\t\tforeach ($table as $key => $value)\n\t\t\t{ \n \t\t\t\t$arrTables[] = $value;\n\t\t\t}\n\t\t} \n\t\t\n\t\t$return = '';\n\t\t$return .= \"-- \\n\";\n\t\t$return .= \"-- Database: `\".env('DB_DATABASE').\"` \\n\";\n\t\t$return .= \"-- \\n\\n\";\n\t\t \t\n\t\t$return .= \"-- -------------------------------------------------------- \\n\\n\";\n\t\t \n\t\t$return .= 'SET FOREIGN_KEY_CHECKS = 0;' . \"\\r\\n\";\n\t\t$return .= 'SET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";' . \"\\r\\n\";\n\t\t$return .= 'SET AUTOCOMMIT = 0;' . \"\\r\\n\";\n\t\t$return .= 'START TRANSACTION;' . \"\\r\\n\";\n\t\t \n\t\tforeach($arrTables as $table) \n\t\t{\n \t\t\t$arrResult = DB::table($table)->get();\n \t\t\t$num_fields = count($arrResult); \n\t\t\t\n\t\t\t\n\t\t\t$return .= \"-- \\n\";\n\t\t\t$return .= \"-- Table structure for table `\".$table.\"` \\n\";\n\t\t\t$return .= \"-- \\n\\n\";\n \n\t\t\t$return .= 'DROP TABLE IF EXISTS '.$table.';'; \n\t\t\t\n\t\t\t$row2 = DB::select(\"SHOW CREATE TABLE \".$table);\n\t\t\t \n\t\t\tforeach($row2 as $statement)\n\t\t\t{ \n\t\t\t\tforeach($statement as $k1=>$v1)\n\t\t\t\t{\n\t\t\t\t\tif($k1==\"Create Table\")\n\t\t\t\t\t{ \n\t\t\t\t\t\t$return .= \"\\n\\n\".$v1.\";\\n\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\tforeach($arrResult as $k2=>$v2)\n\t\t\t{ \t\t\t \n\t\t\t\t$i = 0; \n\t\t\t\t\n\t\t\t\t$keys = $values = ''; \n\t\t\t\tforeach($v2 as $k3=>$v3) \n\t\t\t\t{ \n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t\tif($i!=1){\n\t\t\t\t\t\t$keys .= ','; \n\t\t\t\t\t\t$values .= ','; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(isset($k3)) \n\t\t\t\t\t{\n\t\t\t\t\t\t$keys .= '`'.$k3.'`';\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$keys .= '';\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(isset($v3)) \n\t\t\t\t\t{\n\t\t\t\t\t\t$values .= '\"'.$v3.'\"';\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{ \n\t\t\t\t\t\t$values .= '\"\"';\n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t$return .= 'INSERT INTO '.$table.' ('.$keys.') VALUES('.$values; \n\t\t\t\t \n\t\t\t\t$return .= \");\\n\"; \n\t\t\t}\n\t\t\t$return .= \"\\n\\n\\n\"; \n\t\t}\n\t\t\n\t\t// enable foreign keys\n $return .= 'SET FOREIGN_KEY_CHECKS = 1;' . \"\\r\\n\";\n $return.= 'COMMIT;';\n\t\t \n\t\t//Save file to storage folder\n\t\t$extension = \"sql\"; \n $filename = uniqid() . '_' . time() . '.' . $extension;\n\t\t$target_path = 'database_backup/'.$filename; \n\t\n\t\tStorage::disk('public')->put($target_path, $return); \n\t\t\n\t\t$array = array(\"success\"=>1,\"message\"=>\"Database backup done successfully.\"); \n\t\treturn $array; \n\t}", "public function dbBackupStructure($args){\n\n $this->dbBackup($args, true);\n\n }", "function backup($db)\n\t{\n\t\t$existing_tables = $db->getTableList();\n\t\t$prefix = $db->getPrefix();\n\t\t$filename='j2store_db_backup_'. date(\"d-m-Y_H-i-s\") .'_file_'.time().'.sql';\n\t\t//get all tables\n\n\t\t$tables = array($prefix.'j2store_address',\n\t\t\t\t$prefix.'j2store_countries',\n\t\t\t\t$prefix.'j2store_coupons',\n\t\t\t\t$prefix.'j2store_emailtemplates',\n\t\t\t\t$prefix.'j2store_geozonerules',\n\t\t\t\t$prefix.'j2store_geozones',\n\t\t\t\t$prefix.'j2store_lengths',\n\t\t\t\t$prefix.'j2store_options',\n\t\t\t\t$prefix.'j2store_optionvalues',\n\t\t\t\t$prefix.'j2store_orderfiles',\n\t\t\t\t$prefix.'j2store_orderinfo',\n\t\t\t\t$prefix.'j2store_orderitemattributes',\n\t\t\t\t$prefix.'j2store_orderitems',\n\t\t\t\t$prefix.'j2store_orders',\n\t\t\t\t$prefix.'j2store_ordershippings',\n\t\t\t\t$prefix.'j2store_order_coupons',\n\t\t\t\t$prefix.'j2store_prices',\n\t\t\t\t$prefix.'j2store_productfiles',\n\t\t\t\t$prefix.'j2store_productquantities',\n\t\t\t\t$prefix.'j2store_product_options',\n\t\t\t\t$prefix.'j2store_product_optionvalues',\n\t\t\t\t$prefix.'j2store_productattributeoptions',\n\t\t\t\t$prefix.'j2store_productattributes',\n\t\t\t\t$prefix.'j2store_shippingmethods',\n\t\t\t\t$prefix.'j2store_shippingrates',\n\t\t\t\t$prefix.'j2store_storeprofiles',\n\t\t\t\t$prefix.'j2store_taxprofiles',\n\t\t\t\t$prefix.'j2store_taxrates',\n\t\t\t\t$prefix.'j2store_taxrules',\n\t\t\t\t$prefix.'j2store_weights',\n\t\t\t\t$prefix.'j2store_zones'\n\t\t);\n\n\n\t\t$data = \"\";\n\n\t//\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t\t//print_r($tables); exit;\n\t\t// Cycle through each provided table\n\t\tforeach($tables as $table) {\n\t\tif(in_array($table, $existing_tables)) {\n\t\t\t//lock table\n\t\t\ttry {\n\t\t\t\t$db->lockTable($table);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t//just dont do anything\n\t\t\t}\n\t\t\t$this->_dump_table($table, $db);\n\t\t\t$data .= $this->output;\n\t\t }\n\t\t}\n\t\tif(!empty($data)) {\n\t\t\t$this->_writeOutput($filename, $data);\n\t\t\ttry {\n\t\t\t$db->unlockTables();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t//just dont do anything.\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function backup_restore($operation = '', $type = '') {\n if ($this->session->userdata('teacher_login') != 1)\n redirect(base_url(), 'refresh');\n\n if ($operation == 'create') {\n $this->crud_model->create_backup($type);\n }\n if ($operation == 'restore') {\n $this->crud_model->restore_backup();\n $this->session->set_flashdata('backup_message', 'Backup Restored');\n redirect(base_url() . 'teacher/backup_restore/', 'refresh');\n }\n if ($operation == 'delete') {\n $this->crud_model->truncate($type);\n $this->session->set_flashdata('backup_message', 'Data removed');\n redirect(base_url() . 'teacher/backup_restore/', 'refresh');\n }\n\n $page_data['page_info'] = 'Create backup / restore from backup';\n $page_data['page_name'] = 'backup_restore';\n $page_data['page_title'] = get_phrase('manage_backup_restore');\n $this->load->view('backend/index', $page_data);\n}", "static private function database_backup() {\n // set the backup directory and filename\n $dir = mySpires::content_root() . \"/database_backups/\";\n $file = $dir . \"ajainphysics_\" . date('Y-m-d') . \".sql\";\n\n // If backup was already done, return\n if(file_exists($file) && self::quick()) return;\n\n // perform the backup\n // Set .my.cnf in the home folder\n $opts = include(__DIR__ . \"/../../../.mysqldb.php\");\n $query = \"HOME=/home/kz0qr7otxolj/ mysqldump --single-transaction {$opts->dbname} > {$file}\";\n exec($query,$output, $error);\n\n if($error) {\n self::message($error, 5);\n self::log(\"Database backup was interrupted!\", 5);\n return;\n }\n\n $backups = scandir($dir);\n foreach($backups as $backup) {\n $e = explode(\"ajainphysics_\", $backup);\n if($e[1]) {\n $e = explode(\".sql\", $e[1]);\n $backup_date = strtotime($e[0]);\n $days_past = floor((time() - $backup_date)/(60*60*24));\n\n if($days_past > 180 || ($days_past > 7 && date(\"w\", $backup_date) != 0))\n unlink($dir.$backup);\n }\n }\n\n self::log(\"I backed up your database.\");\n }", "public function backup_database()\n\t{\n\t\t$db = Database::instance();\n\n\t\t$tables_to_dump = array('client', 'contact', 'currency', 'invoice', 'invoice_payment', 'module', 'operation_type', 'project', 'role', 'ticket', 'time', 'user');\n\n\t\t// Add the table structure\n\t\t$sql = View::factory('admin/settings/schema/tables')->render().\"\\n\";\n\t\t// Add the constraints\n\t\t$sql.= View::factory('admin/settings/schema/constraints')->render().\"\\n\";\n\n\t\t// Dump the data\n\t\tforeach ($tables_to_dump as $model)\n\t\t{\n\t\t\t$model_name = $model.'_Model';\n\t\t\t$old = $model;\n\t\t\t$model = new $model_name;\n\n\t\t\t$rows = $model->fetch_all();\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t$row = $row->as_array();\n\t\t\t\t$sql.= 'INSERT INTO `'.inflector::plural($old).'` ('.implode(',', array_keys($row)).') VALUES ('.implode(',', array_values($row)).')'.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\theader('Content-Description: File Transfer');\n\t\theader('Content-Type: text/plain');\n\t\theader('Content-Disposition: attachment; filename=schema.sql');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Pragma: public');\n\t\theader('Content-Length: '.strlen($sql));\n\t\tob_clean();\n\t\tflush();\n\t\techo $sql;\n\t\texit;\n\t}", "public function start_app_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->start_backup();\n \n }", "public function backup_action($action_name, $data) {\n\t\tglobal $app, $conf;\n\n\t\t$backup_id = intval($data);\n\t\t$backup = $app->dbmaster->queryOneRecord(\"SELECT * FROM web_backup WHERE backup_id = ?\", $backup_id);\n\n\t\tif(is_array($backup)) {\n\n\t\t\t$app->uses('ini_parser,file,getconf,system');\n\n\t\t\t$web = $app->db->queryOneRecord(\"SELECT * FROM web_domain WHERE domain_id = ?\", $backup['parent_domain_id']);\n\t\t\t$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');\n\t\t\t$backup_dir = trim($server_config['backup_dir']);\n\t\t\tif($backup_dir == '') return;\n\t\t\t$backup_dir .= '/web'.$web['domain_id'];\n\t\t\t\n\t\t\t$backup_dir_is_ready = true;\n //* mount backup directory, if necessary\n if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($server_config['backup_dir']) ) $backup_dir_is_ready = false;\n\n\t\t\tif($backup_dir_is_ready){\n\t\t\t\t//* Make backup available for download\n\t\t\t\tif($action_name == 'backup_download') {\n\t\t\t\t\t//* Copy the backup file to the backup folder of the website\n\t\t\t\t\tif(file_exists($backup_dir.'/'.$backup['filename']) && file_exists($web['document_root'].'/backup/') && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {\n\t\t\t\t\t\tcopy($backup_dir.'/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename']);\n\t\t\t\t\t\tchgrp($web['document_root'].'/backup/'.$backup['filename'], $web['system_group']);\n\t\t\t\t\t\tchown($web['document_root'].'/backup/'.$backup['filename'], $web['system_user']);\n\t\t\t\t\t\tchmod($web['document_root'].'/backup/'.$backup['filename'],0600);\n\t\t\t\t\t\t$app->log('cp '.$backup_dir.'/'.$backup['filename'].' '.$web['document_root'].'/backup/'.$backup['filename'], LOGLEVEL_DEBUG);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//* Restore a mysql backup\n\t\t\t\tif($action_name == 'backup_restore' && $backup['backup_type'] == 'mysql') {\n\t\t\t\t\t//* Load sql dump into db\n\t\t\t\t\tinclude 'lib/mysql_clientdb.conf';\n\n\t\t\t\t\tif(file_exists($backup_dir.'/'.$backup['filename'])) {\n\t\t\t\t\t\t//$parts = explode('_',$backup['filename']);\n\t\t\t\t\t\t//$db_name = $parts[1];\n\t\t\t\t\t\tpreg_match('@^db_(.+)_\\d{4}-\\d{2}-\\d{2}_\\d{2}-\\d{2}\\.sql\\.gz$@', $backup['filename'], $matches);\n\t\t\t\t\t\t$db_name = $matches[1];\n\t\t\t\t\t\t$command = \"gunzip --stdout \".escapeshellarg($backup_dir.'/'.$backup['filename']).\" | mysql -h \".escapeshellarg($clientdb_host).\" -u \".escapeshellarg($clientdb_user).\" -p\".escapeshellarg($clientdb_password).\" \".escapeshellarg($db_name);\n\t\t\t\t\t\texec($command);\n\t\t\t\t\t}\n\t\t\t\t\tunset($clientdb_host);\n\t\t\t\t\tunset($clientdb_user);\n\t\t\t\t\tunset($clientdb_password);\n\t\t\t\t\t$app->log('Restored MySQL backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);\n\t\t\t\t}\n\n\t\t\t\t//* Restore a web backup\n\t\t\t\tif($action_name == 'backup_restore' && $backup['backup_type'] == 'web') {\n\t\t\t\t\t$app->system->web_folder_protection($web['document_root'], false);\n\t\t\t\t\tif($backup['backup_mode'] == 'userzip') {\n\t\t\t\t\t\tif(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {\n\t\t\t\t\t\t\tif(file_exists($web['document_root'].'/backup/'.$backup['filename'])) rename($web['document_root'].'/backup/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename'].'.bak');\n\t\t\t\t\t\t\tcopy($backup_dir.'/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename']);\n\t\t\t\t\t\t\tchgrp($web['document_root'].'/backup/'.$backup['filename'], $web['system_group']);\n\t\t\t\t\t\t\t//chown($web['document_root'].'/backup/'.$backup['filename'],$web['system_user']);\n\t\t\t\t\t\t\t$command = 'sudo -u '.escapeshellarg($web['system_user']).' unzip -qq -o '.escapeshellarg($web['document_root'].'/backup/'.$backup['filename']).' -d '.escapeshellarg($web['document_root']).' 2> /dev/null';\n\t\t\t\t\t\t\texec($command);\n\t\t\t\t\t\t\tunlink($web['document_root'].'/backup/'.$backup['filename']);\n\t\t\t\t\t\t\tif(file_exists($web['document_root'].'/backup/'.$backup['filename'].'.bak')) rename($web['document_root'].'/backup/'.$backup['filename'].'.bak', $web['document_root'].'/backup/'.$backup['filename']);\n\t\t\t\t\t\t\t$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($backup['backup_mode'] == 'rootgz') {\n\t\t\t\t\t\tif(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {\n\t\t\t\t\t\t\t$command = 'tar xzf '.escapeshellarg($backup_dir.'/'.$backup['filename']).' --directory '.escapeshellarg($web['document_root']);\n\t\t\t\t\t\t\texec($command);\n\t\t\t\t\t\t\t$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$app->system->web_folder_protection($web['document_root'], true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($action_name == 'backup_delete') {\n\t\t\t\t\tif(file_exists($backup_dir.'/'.$backup['filename']) && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {\n\t\t\t\t\t\tunlink($backup_dir.'/'.$backup['filename']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql = \"DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?\";\n\t\t\t\t\t\t$app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']);\n\t\t\t\t\t\tif($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']);\n\t\t\t\t\t\t$app->log('unlink '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);\n\t\t\t} else {\n\t\t\t\t$app->log('Backup directory not ready.', LOGLEVEL_DEBUG);\n\t\t\t}\n\t\t} else {\n\t\t\t$app->log('No backup with ID '.$backup_id.' found.', LOGLEVEL_DEBUG);\n\t\t}\n\n\t\treturn 'ok';\n\t}", "function backup_restore($operation = '', $type = '') {\n\n if ($operation == 'create') {\n $this->crud_model->create_backup($type);\n }\n if ($operation == 'restore') {\n $this->crud_model->restore_backup();\n $this->session->set_flashdata('backup_message', 'Backup Restored');\n redirect(base_url() . 'admin/backup_restore/', 'refresh');\n }\n if ($operation == 'delete') {\n $this->crud_model->truncate($type);\n $this->session->set_flashdata('backup_message', 'Data removed');\n redirect(base_url() . 'admin/backup_restore/', 'refresh');\n }\n\n $page_data['page_info'] = 'Create backup / restore from backup';\n $page_data['page_name'] = 'backup_restore';\n $page_data['page_title'] = get_phrase('manage_backup_restore');\n $this->load->view('backend/index', $page_data);\n}", "public function backup(Request $request)\r\n {\r\n Helper::checkPermissions('backup'); // check user permission\r\n $backup_db = !empty($request->backup_db) ? true : false;\r\n $backup_files = !empty($request->backup_files) ? true : false;\r\n\r\n // initiate job to take the backup\r\n \\App\\Jobs\\Backup::dispatch(Auth::user()->id, Auth::user()->app_id, $backup_db, $backup_files);\r\n \\Artisan::call('queue:work', ['--once' => true, '--timeout' => 120]); // execute queue\r\n\r\n activity('backup')->withProperties(['app_id' => Auth::user()->app_id])->log(__('app.tools_backup') . \" (\". Auth::user()->email .\") \". __('app.log_backup')); // log\r\n }", "public function dbBackup($args, $structureOnly = false){\n\n $path = '/app/db/';\n if(isset($args[0]) && $args[0]){\n $path = $args[0];\n }//if\n\n if($structureOnly == true){\n $fileName = \\App::config('DB_DB') . '_STRUCTURE.sql';\n }//if\n else {\n $fileName = \\App::config('DB_DB') . '.sql';\n }//el\n\n if(isset($args[1])){\n $fileName = $args[1];\n }//if\n\n $path = \\App::path() . '/' . trim($path,'/') . '/';\n\n if(!is_dir($path)){\n echo 'Directory ' . $path . ' does not exsist, exiting.' . PHP_EOL;\n exit;\n }//if\n\n if(!is_writable($path)){\n echo 'Directory ' . $path . ' is not writable, exiting.' . PHP_EOL;\n exit;\n }//if\n\n $fileName = $path . $fileName;\n\n $connect = sprintf(\"%1\\$s:host=%2\\$s;dbname=%3\\$s\",\n \\App::config('DB_ENGINE'),\n \\App::config('DB_HOST'),\n \\App::config('DB_DB')\n );\n\n $config_path = \\App::path() . '/app/config/db-backup-settings.php';\n\n if(is_file($config_path)){\n $settings = require $config_path;\n if(!is_array($settings)){\n $settings = Array();\n }//if\n }//if\n else {\n $settings = Array();\n }//el\n\n if(!array_key_exists('add-drop-table',$settings)){\n $settings['add-drop-table'] = true;\n }//if\n\n if($structureOnly == true){\n $settings['no-data'] = true;\n }//if\n\n $dump = new \\Ifsnop\\Mysqldump\\Mysqldump($connect, \\App::config('DB_USER'), \\App::config('DB_PASSWORD'),$settings);\n\n\n $dump->start($fileName);\n\n echo \"Backup successfully created at `{$fileName}`\" . PHP_EOL;\n\n }", "public function canManageBackup();", "public function backup(){\n try{\n $date = \\Carbon\\Carbon::now()->toW3cString();\n $exitCode = \\Artisan::call('db:backup', [\n '--database'=> 'mysql', '--destination'=>'local', '--destinationPath'=>'sisfa_'.date('YmdHis'), '--compression'=>'null'\n ]);\n \\DB::table('log_navegaciones')->delete();\n \\DB::table('log_sesiones')->delete();\n return redirect('/');\n }catch (Exception $e) {\n return \"<script> alert('Error R0013: Generacion del Respaldo de base de datos \\n\".$e->getMessage().\"'); location.href='\".asset('index.php/Reportes').\"'; </script>\";\n }\n\n }", "function BackupRestore() {\n\n // Variables Passed Globally\n global $Access_Level;\n global $DB;\n global $msg;\n global $Lang;\n global $Linux_Mode;\n $Sudo = \"\"; if($Linux_Mode != \"balena.io\") { $Sudo = \"sudo \"; }\n \n // Includes\n include_once \"./lang/admin.module.BackupRestore.php\";\n \n // Local Variables\n $URI_Check = \"none\";\n $base_URI = substr($_SERVER['SCRIPT_FILENAME'],0,strpos(substr($_SERVER['SCRIPT_FILENAME'],1),\"/\")+1);\n\n // Action Requested via Form? \n $action = html_postget(\"action\");\n \n // Setting variables and Restore Config Settings\n $fileOK=\"\"; \n $sql = \"SELECT * FROM `ha_settings` WHERE `variable`='backup_uri' OR `variable`='daily_backup' OR `variable`='weekly_backup' OR `variable`='monthly_backup';\";\n $query = mysqli_query($DB,$sql);\n while ($row = mysqli_fetch_array($query, MYSQLI_BOTH)) {\n $Var = $row['variable'];\n\t$Val = $row['value'];\n\tif ($Var==\"backup_uri\") { if ($Val==\"\") { $BackupDir = $_SERVER['DOCUMENT_ROOT'].\"/backups/\"; $BackupDirDisplay = \"\";} else { $BackupDir = $BackupDirDisplay = $Val; }}\n\tif ($Var==\"daily_backup\") { $daily_backup = $Val; }\n\tif ($Var==\"weekly_backup\") { $weekly_backup = $Val; }\n\tif ($Var==\"monthly_backup\") { $monthly_backup = $Val; }\n } // END WHILE\n \n //echo(\"Action=$action<br>\");\n // Change URI?\n if (($action==\"CheckURI\") || ($action==\"Save\")) {\n $BackupDest = html_postget(\"BackupDest\");\n //echo(\"dest=$BackupDest=-<br>\");\n\tif ($BackupDest != $BackupDirDisplay) {\n\t // Backup Dest changed => Check & Update DB if OK\n\t $URIChecked = \"N\";\n\t if ($BackupDest==\"\") {\n\t // Empty path => back to DEFAULT\n\t\t$URIChecked = \"Y\"; $BackupDir = $_SERVER['DOCUMENT_ROOT'].\"/backups/\"; $BackupDirDisplay = \"\";\n\t\techo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"back2default\"][$Lang].\"</b><br>\");\n\t } else {\n\t $choppedURL = parse_url($BackupDest);\n\t if ($choppedURL[\"scheme\"]==\"ftp\") {\n\t\t $user = $choppedURL[\"user\"];\n\t\t $pass = $choppedURL[\"pass\"];\n\t\t $host = $choppedURL[\"host\"];\n\t\t if (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"ftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t $conn_id = ftp_connect($host); \n\t\t // login with username and password \n\t\t $login_result = ftp_login($conn_id, $user, $pass); \n\t\t // upload a file \n\t\t if (ftp_put($conn_id, $path.\"/SmartCAN-Test.txt\", $_SERVER['DOCUMENT_ROOT'].\"/test-ftp.txt\", FTP_BINARY)) { \n\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"ftptested\"][$Lang].\"</b><br>\");\n\t\t\t$URIChecked = \"Y\";\n\t\t\t$BackupDir = $BackupDirDisplay = $BackupDest;\n\t\t\tftp_delete($conn_id, $path.\"/SmartCAN-Test.txt\");\n\t\t } else {\n\t\t echo(\"<font color=red<b>\".$msg[\"BACKUPRESTORE\"][\"ftpNOK\"][$Lang].\"</b></font> <br>\");\n\t\t } // END IF\n\t } else {\n\t if ($choppedURL[\"scheme\"]==\"sftp\") {\n\t\t $user = $choppedURL[\"user\"];\n\t\t $pass = $choppedURL[\"pass\"];\n\t\t $host = $choppedURL[\"host\"];\n\t\t if (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"sftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t\t$connection = ssh2_connect($host, 22);\n\t\t\tssh2_auth_password($connection, $user, $pass);\n\t\t\t$sftp = ssh2_sftp($connection);\n\t\t\t$stream = fopen(\"ssh2.sftp://$sftp/\".$path.\"/SmartCAN-Test.txt\", 'w');\n\t\t\tif ($stream) {\n\t\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"sftptested\"][$Lang].\"</b><br>\");\n\t\t\t ssh2_sftp_unlink($sftp, \"/\".$path.\"/SmartCAN-Test.txt\");\n\t\t\t ssh2_exec($connection, 'logout');\n\t\t\t $URIChecked = \"Y\";\n\t\t\t $BackupDir = $BackupDirDisplay = $BackupDest;\n\t\t\t} else {\n\t\t\t echo(\"<font color=red<b>\".$msg[\"BACKUPRESTORE\"][\"sftpNOK\"][$Lang].\"</b></font> <br>\");\n\t\t\t} // END IF\n\t\t } else {\n\t\t // Other Local PATH\n\t\t\t$URIChecked = \"Y\";\n\t\t } // END IF SFTP\n\t } // END IF FTP\n\t } // END IF Empty PATH\n\t \n\t // URI Checked? => Update DB \n if ($URIChecked==\"Y\") {\n\t $sql = \"UPDATE `ha_settings` SET `value` = '\".$BackupDest.\"' WHERE `ha_settings`.`variable` = 'backup_uri';\";\n\t\t$query = mysqli_query($DB,$sql);\n } // END IF\t \n\t} // END IF URI Changed\n } // END IF\n \n // Change Automatic Backup Frequency\n if ($action==\"Save\") {\n $FormDailyBackup = html_postget(\"AutoDailyBackup\"); if ($FormDailyBackup!=\"\") { $FormDailyBackup = \"Y\"; } else { $FormDailyBackup = \"N\"; }\n\t$FormWeeklyBackup = html_postget(\"AutoWeeklyBackup\"); if ($FormWeeklyBackup!=\"\") { $FormWeeklyBackup = \"Y\"; } else { $FormWeeklyBackup = \"N\"; }\n\t$FormMonthlyBackup = html_postget(\"AutoMonthlyBackup\"); if ($FormMonthlyBackup!=\"\") { $FormMonthlyBackup = \"Y\"; } else { $FormMonthlyBackup = \"N\"; }\n\t//echo(\"Save/Change Backup Frequency: Daily=$daily_backup<>$FormDailyBackup, Monthly=$monthly_backup<>$FormMonthlyBackup<br>\");\n\t// Daily Backup?\n\tif ($FormDailyBackup!=$daily_backup) {\n\t $sql = \"UPDATE `ha_settings` SET `value` = '\".$FormDailyBackup.\"' WHERE `ha_settings`.`variable` = 'daily_backup';\";\n\t $query = mysqli_query($DB,$sql);\n\t $daily_backup= $FormDailyBackup;\n\t} // END IF\n\t// Weekly Backup?\n\tif ($FormWeeklyBackup!=$weekly_backup) {\n\t $sql = \"UPDATE `ha_settings` SET `value` = '\".$FormWeeklyBackup.\"' WHERE `ha_settings`.`variable` = 'weekly_backup';\";\n\t $query = mysqli_query($DB,$sql);\n\t $weekly_backup = $FormWeeklyBackup;\n\t} // END IF\n\t// Monthly Backup?\n\tif ($FormMonthlyBackup!=$monthly_backup) {\n\t $sql = \"UPDATE `ha_settings` SET `value` = '\".$FormMonthlyBackup.\"' WHERE `ha_settings`.`variable` = 'monthly_backup';\";\n\t $query = mysqli_query($DB,$sql);\n\t $monthly_backup = $FormMonthlyBackup;\n\t} // END IF\n } // END IF\n \n \n // Manual Backup\n if ($action==\"backUp\") {\n //echo(\"Manual Backup<br>\");\n $BackupDest = $_SERVER['DOCUMENT_ROOT'].\"/backups/\";\n\t$Sudo = \"\"; $Tar = \"\";\n\tif($Linux_Mode != \"balena.io\") { $Sudo = \"sudo \"; $Tar = '/etc/network --exclude={\"/etc/network/run\",\"/etc/network/if*.d\"}';}\n exec($Sudo . \"mysqldump --opt --user=\" . mysqli_LOGIN . \" --password='\".mysqli_real_escape_string($DB,mysqli_PWD).\"' \" . mysqli_DB . \" > \" . $BackupDest . \"domotique.sql\");\n\texec($Sudo . \"mysqldump --user=\" . mysqli_LOGIN . \" --password='\".mysqli_real_escape_string($DB,mysqli_PWD).\"' mysql user > \" . $BackupDest . \"mysql.sql\");\n\texec($Sudo . \"pdbedit -e smbpasswd:\" . $BackupDest . \"samba-users.smbback\");\n\t$fileName = date(\"Ymd-His-\").'FULLsmartCAN-BACKUP.tar.gz';\n\texec($Sudo . 'tar --exclude=\"' . $base_URI . '/sys-files/node-red/node_modules\" --exclude=\"' . $base_URI . '/sys-files/zigbee2mqtt/data/log\" -czvf '. $BackupDest.$fileName . ' ' .\n\t\t\t$BackupDest . 'domotique.sql ' .\n\t\t\t$BackupDest . 'mysql.sql ' .\n\t\t\t$BackupDest . 'samba-users.smbback ' .\n\t\t\tPATHBASE . '/www/conf ' .\n\t\t\tPATHBASE . '/www/js/weather.js ' .\n\t\t\tPATHBASE . '/www/images/outputs ' .\n\t\t\tPATHBASE . '/www/images/plans ' .\n\t\t\tPATHBASE . '/bin/domocan-server ' .\n\t\t\tPATHBASE . '/rrdtool ' .\n\t\t\t$base_URI . '/sys-files/node-red ' .\n\t\t\t$base_URI . '/sys-files/zigbee2mqtt/data ' .\n\t\t\t'/usr/local/nginx/conf/nginx.conf ' .\n\t\t\t'/etc/passwd ' .\n\t\t\t'/etc/shadow ' .\n\t\t\t$Tar);\n\texec($Sudo . 'rm ' . $BackupDest . 'domotique.sql');\n\texec($Sudo . 'rm ' . $BackupDest . 'mysql.sql');\n\texec($Sudo . 'rm ' . $BackupDest . 'samba-users.smbback');\n\t// Need to move?\n\tif ($BackupDest!=$BackupDir) {\n\t // to Local?\n\t if (substr($BackupDir,0,1)==\"/\") {\n\t rename($BackupDest.$fileName, $BackupDir.$fileName);\n\t } // END IF\n\t // to FTP ?\n\t $choppedURL = parse_url($BackupDir);\n\t if ($choppedURL[\"scheme\"]==\"ftp\") {\n\t\t$user = $choppedURL[\"user\"];\n\t\t$pass = $choppedURL[\"pass\"];\n\t\t$host = $choppedURL[\"host\"];\n\t\tif (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"ftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t$conn_id = ftp_connect($host); \n\t\t// login with username and password \n\t\t$login_result = ftp_login($conn_id, $user, $pass); \n\t\t// upload a file \n\t\t//echo(\"Move =\".$BackupDest.$fileName.\"= to FTP =\" . $path.$fileName . \"=<br>\");\n\t\tif (ftp_put($conn_id, \"/\".$path.\"/\".$fileName, $BackupDest.$fileName, FTP_BINARY)) { \n\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"moveftpOK\"][$Lang].\"</b><br>\");\n\t\t exec('rm ' . $BackupDest . $fileName);\n\t\t} // END IF\n\t\tftp_close($conn_id);\n\t } // END IF\n\t // to SFTP ?\n\t if ($choppedURL[\"scheme\"]==\"sftp\") {\n\t\t$user = $choppedURL[\"user\"];\n\t\t$pass = $choppedURL[\"pass\"];\n\t\t$host = $choppedURL[\"host\"];\n\t\tif (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"sftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t$connection = ssh2_connect($host, 22);\n\t\tssh2_auth_password($connection, $user, $pass);\n\t\t$sftp = ssh2_sftp($connection);\n\t\t//echo(\"Move =\".$BackupDest.$fileName.\"= to SFTP =\" . $path.$fileName . \"=<br>SFTP: =ssh2.sftp://\".$sftp.\"/\".$path.$fileName.\"<br>\");\n\t\t$file = file_get_contents($BackupDest.$fileName);\n\t\tif (file_put_contents(\"ssh2.sftp://\".$sftp.\"/\".$path.\"/\".$fileName, $file)) {\n\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"movesftpOK\"][$Lang].\"</b><br>\");\n\t\t exec('rm ' . $BackupDest . $fileName);\n\t\t} // END IF\n\t\tssh2_exec($connection, 'logout');\n\t } // END IF\n\t} // END IF\n } // END IF\n \n \n // Restore Stored Backup\n if ($action==\"reStoreBackup\") {\n $BackupDest = $_SERVER['DOCUMENT_ROOT'].\"/backups/\";\n\t$BackupURI = html_postget(\"backupURI\");\n\t$fileName = substr($BackupURI, strrpos($BackupURI,\"/\")+1);\n\techo($msg[\"BACKUPRESTORE\"][\"restore\"][$Lang].\" $fileName<br>\");\n\t// Move?\n\t\n\t// local?\n\tif (substr($BackupURI,0,1)==\"/\") {\n\t rename($BackupURI , $BackupDest.$fileName);\n\t} // END IF\n\t\n\t// from FTP ?\n\tif (substr($BackupURI,0,4)==\"ftp:\") {\n\t $pass_pos = strrpos($BackupURI,\":\");\n\t $user = substr($BackupURI,6, $pass_pos-6);\n\t $host_pos = strrpos($BackupURI,\"@\");\n\t $pass = substr($BackupURI, $pass_pos+1, $host_pos-$pass_pos-1);\n\t $path_pos = strpos(substr($BackupURI,$host_pos),\"/\")+$host_pos;\n\t $host = substr($BackupURI, $host_pos+1, $path_pos-$host_pos-1);\n\t $path = substr($BackupURI, $path_pos+1);\n\t $fileName = substr($BackupURI, strrpos($BackupURI,\"/\")+1);\n\t //echo(\"ftp ! Host=$host, Path=$path, User=$user, Passwd=$pass, fileName=$fileName<br>\");\n\t $conn_id = ftp_connect($host); \n\t $login_result = ftp_login($conn_id, $user, $pass); \n\t //echo(\"Move ftp =\" . $path.$fileName . \"= to =\" . $BackupDest.$fileName.\"=<br>\");\n\t if (ftp_get($conn_id, $BackupDest.$fileName, \"/\".$path, FTP_BINARY)) { \n\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"moveftpOK\"][$Lang].\"</b><br>\");\n\t } // END IF\n\t ftp_close($conn_id);\n\t} // END IF\n\t\n\t// from SFTP ?\n\tif (substr($BackupURI,0,5)==\"sftp:\") {\n\t $pass_pos = strrpos($BackupURI,\":\");\n\t $user = substr($BackupURI,7, $pass_pos-7);\n\t $host_pos = strrpos($BackupURI,\"@\");\n\t $pass = substr($BackupURI, $pass_pos+1, $host_pos-$pass_pos-1);\n\t $path_pos = strpos(substr($BackupURI,$host_pos),\"/\")+$host_pos;\n\t $host = substr($BackupURI, $host_pos+1, $path_pos-$host_pos-1);\n\t $file_pos = strrpos($BackupURI,\"/\");\n\t $path = substr($BackupURI, $path_pos+1, $file_pos-$path_pos);\n\t $fileName = substr($BackupURI, $file_pos+1);\n\t //echo(\"sftp ! Host=$host, Path=$path, User=$user, Passwd=$pass, FileName=$fileName<br>\");\n\t $connection = ssh2_connect($host, 22);\n\t ssh2_auth_password($connection, $user, $pass);\n\t $sftp = ssh2_sftp($connection);\n\t //echo(\"Move STFP =\".$path.$fileName . \"=<br>SFTP: =ssh2.sftp://\".$sftp.\"/\".$path.$fileName.\"= to =\".$BackupDest.$fileName.\"<br>\");\n\t $remote = fopen(\"ssh2.sftp://$sftp/$path$fileName\", 'r');\n\t $local = fopen($BackupDest . $fileName, 'w');\n\t $read = 0;\n\t $filesize = filesize(\"ssh2.sftp://$sftp/$path$fileName\");\n\t while (($read < $filesize) && ($buffer = fread($remote, $filesize - $read))) {\n\t\t$read += strlen($buffer);\n\t\tif (fwrite($local, $buffer) === FALSE) {\n\t\t echo(\"<font color=red><b>\".$msg[\"BACKUPRESTORE\"][\"sftpError\"][$Lang].\"</b></font><br>\");\n\t\t} // END IF\n\t } // END WHILE\n\t fclose($local);\n\t fclose($remote);\n\t ssh2_exec($connection, 'logout');\n\t} // END IF\t\n\t \n\t// UnTAR & Restore Files & DB\n\t//echo($Sudo . \"/bin/tar zxvf \".$BackupDest . $fileName.\" -C / 2>&1<br>\");\n\t//echo(exec($Sudo . \"chmod 777 \".$BackupDest . $fileName));\n\texec(\"sudo /bin/tar zxvf \".$BackupDest . $fileName.\" -C / 2>&1\");\n\tif (($Linux_Mode == \"balena.io\") && (is_dir('/var/www/backups'))) { \n\t //rename(\"/var/www/backups/*.* /data/www/backups/\");\n\t // Identify directories\n\t $srcDir = '/var/www/backups';\n\t $destDir = '/data/www/backups';\n\t echo(exec(\"sudo chmod 777 \" . $srcDir . \"/*.*\"));\n\t //echo(exec(\"sudo mv \" . $srcDir . \"/*.* \" . $destDir . \"/\"));\n\t echo(exec(\"sudo cp \" . $srcDir . \"/domotique.sql \" . $destDir . \"/domotique.sql\"));\n\t echo(exec(\"sudo cp \" . $srcDir . \"/mysql.sql \" . $destDir . \"/mysql.sql\"));\n\t echo(exec(\"sudo cp \" . $srcDir . \"/samba-users.smbback \" . $destDir . \"/samba-users.smbback\"));\n\t echo(exec(\"sudo rm \" . $srcDir . \"/*.*\"));\n\t echo(exec(\"sudo rm -r \" . $srcDir));\n\t // Modify nginx.conf (if imported from old system)\n\t replace_string_in_file(\"/usr/local/nginx/conf/nginx.conf\", \"/var/www\", \"/data/www\");\n\t replace_string_in_file(\"/var/www/smartcan/www/conf/config.php\", \"/var/www\", \"/data/www\");\n\t //echo(exec(\"sudo rm -r /var/www/smartcan/www/conf/config.php\"));\n\t replace_string_in_file(\"/var/www/smartcan/www/conf/config-DEFAULT.php\", \"/var/www\", \"/data/www\");\n\t echo(exec(\"sudo rm -r /var/www/smartcan/bin\"));\n\t echo(exec(\"cp -r /var/www /data\"));\n\t echo(exec(\"sudo rm -r /var/www\"));\n\t echo(exec(\"sudo cp /usr/local/nginx/conf/nginx.conf /data/sys-files/nginx.conf\"));\n\t} // ENDIF\n\t// SQL File present in Extracted files\n\t$ScanDir = scandir($BackupDest);\n\t$ndir=0;\n\twhile (isset($ScanDir[$ndir+2])) {\n\t echo(\"<br>File in dir: \" . $ScanDir[$ndir+2] .\"<br>\");\n\t if (substr($ScanDir[$ndir+2],-4)==\".sql\") { \n\t //echo(\"<br>Restoring: \" . $ScanDir[$ndir+2] .\"<br>\");\n\t\techo($msg[\"BACKUPRESTORE\"][\"SQLrestored\"][$Lang].$ScanDir[$ndir+2].\"<br>\");\n\t\timportDB($BackupDest.\"/\".$ScanDir[$ndir+2]);\n\t\tunlink($BackupDest.\"/\".$ScanDir[$ndir+2]);\n\t } // END IF\n\t if ($ScanDir[$ndir+2]==\"samba-users.smbback\") {\n\t\t//echo(\"<br>Restoring: \" . $ScanDir[$ndir+2] .\"<br>\");\n\t shell_exec($Sudo . \"pdbedit -i smbpasswd:\".$BackupDest.\"/samba-users.smbback\");\n\t\tshell_exec(\"sudo pdbedit -i smbpasswd:\".$BackupDest.\"/samba-users.smbback\");\n\t\tunlink($BackupDest.\"/\".$ScanDir[$ndir+2]);\n\t } // END IF\n\t $ndir++;\n\t} // END WHILE\n\n } // END IF\n \n // Upload & Restore\n if ($action==\"upLoadBackup\") {\n\t$Sudo = \"\";\n\tif($Linux_Mode != \"balena.io\") { $Sudo = \"sudo \"; }\n if (basename($_FILES['PackageFile']['type'])==\"x-gzip\") {\n\t $BackupDest = $_SERVER['DOCUMENT_ROOT'].\"/backups/\";\n //echo(\"UPLOAD!-=\".basename($_FILES['PackageFile']['name']).\"=-<br>\");\n $fileName = basename($_FILES['PackageFile']['name']);\n\t $uploadfile = $BackupDest . $fileName;\n\t if (move_uploaded_file($_FILES['PackageFile']['tmp_name'], $uploadfile)) {\n\t\t//echo(\"tar zxvf \".$uploadfile.\" -C <br>\");\n\t\t//shell_exec(\"chmod u+s \".$uploadfile.\" 2>&1\");\n\t\t//echo(\"Moved to $uploadfile!<br>\");\t\t\n\t\t\n\t\tif (!shell_exec($Sudo . \"/bin/tar zxvf \".$uploadfile.\" -C / 2>&1\")) {\n\t\t $fileOK=\"NOK\";\n\t\t} else {\n\t\t // SQL File present in Extracted files\n\t\t $ScanDir = scandir($BackupDest);\n\t\t $ndir=0;\n\t\t while (isset($ScanDir[$ndir+2])) {\n\t\t //echo(\"Dir=\".$ScanDir[$ndir+2].\"<br>\");\n\t\t\tif (substr($ScanDir[$ndir+2],-4)==\".sql\") { importDB($BackupDest.\"/\".$ScanDir[$ndir+2]); unlink($BackupDest.\"/\".$ScanDir[$ndir+2]); }\n\t\t\t$ndir++;\n\t\t } // END WHILE\n\t\t $fileOK=\"OK\";\n\t\t //system(\"rm \".$uploadfile);\n\t\t} // ENDIF\n\t\t\n\n\t } else {\n echo \"<font size=4 color=red><b>\".$msg[\"BACKUPRESTORE\"][\"CopyError\"][$Lang].\"</b></font>\\n\";\n } // ENDIF\n } else {\n echo \"<font size=4 color=red><b>\".$msg[\"BACKUPRESTORE\"][\"IncorrectFile\"][$Lang].\"</b></font>\\n\";\n } // ENDIF\n } // ENDIF\n\n // Start Build Page ...\n echo(\"<h2 class='title'> \".$msg[\"BACKUPRESTORE\"][\"TitleBackup\"][$Lang].\" </h2>\");\n echo(\"<div class='post_info'>&nbsp;</div>\" . CRLF);\n\n echo(\"\t<div class='postcontent' name='plan' \" .\n \"style='\" .\n \" width: 550px; margin-left: 50px;'>\" . CRLF);\n\t\t\n echo(\"<style>\" . CRLF);\n echo(\"<\" . CRLF);\n echo(\"img\" . CRLF);\n echo(\"{\" . CRLF);\n echo(\"position:relative;\" . CRLF);\n echo(\"}\" . CRLF);\n echo(\"</style>\" . CRLF);\n\n if ($fileOK==\"OK\") {\n echo (\"<h2>\".$msg[\"BACKUPRESTORE\"][\"DBrestoreOK\"][$Lang].\"</h2>\");\n\t// Need to move?\n\tif ($BackupDest!=$BackupDir) {\n\t // to Local?\n\t if (substr($BackupDir,0,1)==\"/\") {\n\t rename($BackupDest.$fileName, $BackupDir.$fileName);\n\t } // END IF\n\t // to FTP ?\n\t $choppedURL = parse_url($BackupDest);\n\t if ($choppedURL[\"scheme\"]==\"ftp\") {\n\t\t$user = $choppedURL[\"user\"];\n\t\t$pass = $choppedURL[\"pass\"];\n\t\t$host = $choppedURL[\"host\"];\n\t\tif (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"ftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t$conn_id = ftp_connect($host); \n\t\t// login with username and password \n\t\t$login_result = ftp_login($conn_id, $user, $pass); \n\t\t// upload a file \n\t\t//echo(\"Move =\".$BackupDest.$fileName.\"= to FTP =\" . $path.$fileName . \"=<br>\");\n\t\tif (ftp_put($conn_id, \"/\".$path.\"/\".$fileName, $BackupDest.$fileName, FTP_BINARY)) { \n\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"moveftpOK\"][$Lang].\"</b><br>\");\n\t\t exec('rm ' . $BackupDest . $fileName);\n\t\t} // END IF\n\t\tftp_close($conn_id);\n\t } // END IF\n\t // to SFTP ?\n\t if ($choppedURL[\"scheme\"]==\"ftp\") {\n\t\t$user = $choppedURL[\"user\"];\n\t\t$pass = $choppedURL[\"pass\"];\n\t\t$host = $choppedURL[\"host\"];\n\t\tif (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"sftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t\t$connection = ssh2_connect($host, 22);\n\t\tssh2_auth_password($connection, $user, $pass);\n\t\t$sftp = ssh2_sftp($connection);\n\t\t//echo(\"Move =\".$BackupDest.$fileName.\"= to SFTP =\" . $path.$fileName . \"=<br>SFTP: =ssh2.sftp://\".$sftp.\"/\".$path.$fileName.\"<br>\");\n\t\t$file = file_get_contents($BackupDest.$fileName);\n\t\tif (file_put_contents(\"ssh2.sftp://\".$sftp.\"/\".$path.\"/\".$fileName, $file)) {\n\t\t echo(\"<b>\".$msg[\"BACKUPRESTORE\"][\"movesftpOK\"][$Lang].\"</b><br>\");\n\t\t exec('rm ' . $BackupDest . $fileName);\n\t\t} // END IF\n\t\tssh2_exec($connection, 'logout');\n\t } // END IF\n\t} // END IF\n } // ENDIF\n if ($fileOK==\"NOK\") {\n echo (\"<h2><font color=red><b>\".$msg[\"BACKUPRESTORE\"][\"DecompressNOK\"][$Lang].\"</font></h2>\");\n } // ENDIF\n \n echo(\"<form name='ChangeVariables' id='ChangeVariables' enctype='multipart/form-data' action='./index.php?page=BackupRestore' method='post'>\" . CRLF);\n echo(\"<input type='hidden' name='action' id ='action' value=''/><input type='hidden' name='MAX_FILE_SIZE' value='20000000' />\" . CRLF);\n echo(\"<table>\" . CRLF);\n\n // Backup\n //Backup Destination\n echo(\"<tr><td colspan=2><b>\".$msg[\"BACKUPRESTORE\"][\"BackupDest\"][$Lang].\" &nbsp;</b><input type='text' name='BackupDest' id='BackupDest' value='\".$BackupDirDisplay.\"' size=35>\" .CRLF);\n echo(\"<a href='javascript:submitform(\\\"ChangeVariables\\\",\\\"action\\\",\\\"CheckURI\\\")'>\" . CRLF);\n echo(\"<img id='VerifyButton' src='\" . CRLF);\n if ($URI_Check==\"none\") { echo(\"./images/verify.png\" . CRLF); }\n echo(\"' width=36 height=36 style='visibility:\" . CRLF);\n if ($URI_Check==\"none\") { echo(\"hidden\" . CRLF); }\n echo(\"'></a><br><font color=red>\".$msg[\"BACKUPRESTORE\"][\"BackupMsg1\"][$Lang]);\n echo(\"<br>\".$msg[\"BACKUPRESTORE\"][\"BackupMsg2\"][$Lang].\"</td></tr>\");\n // Cron? ... Automatic backup @ 4 AM?\n echo(\"<tr><td colspan=2><br><b>\".$msg[\"BACKUPRESTORE\"][\"AutoBackup\"][\"en\"].\"</b>&nbsp;<input type='checkbox' name='AutoDailyBackup' id='AutoDailyBackup' \");\n if ($daily_backup==\"Y\") { echo(\"checked \"); }\n echo(\"/>\".$msg[\"BACKUPRESTORE\"][\"DailyBackup\"][$Lang].\"</td></tr>\");\n echo(\"<tr><td colspan=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' name='AutoWeeklyBackup' id='AutoWeeklyBackup' \");\n if ($weekly_backup==\"Y\") { echo(\"checked \"); }\n echo(\"/>\".$msg[\"BACKUPRESTORE\"][\"WeeklyBackup\"][$Lang].\"&nbsp;</td></tr>\");\n echo(\"<tr><td colspan=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' name='AutoMonthlyBackup' id='AutoMonthlyBackup' \");\n if ($monthly_backup==\"Y\") { echo(\"checked \"); }\n echo(\"/>\".$msg[\"BACKUPRESTORE\"][\"MonthlyBackup\"][$Lang].\"<br>&nbsp;</td></tr>\");\n // Save?\n echo(\"<tr><td colspan=2 align=middle><a href='javascript:submitform(\\\"ChangeVariables\\\",\\\"action\\\",\\\"Save\\\")'><img src='./images/save.png' width='64px' heigth='64px'/></a><br>&nbsp;</td></tr>\");\n // Manual Backup\n echo(\"<tr><td valign='top'><a href='javascript:submitform(\\\"ChangeVariables\\\",\\\"action\\\",\\\"backUp\\\")'><img src='./images/backup.png' width='64px' heigth='64px'/></a></td>\" .\n\t\t\"<td style='font-size:30px'><a href='javascript:submitform(\\\"ChangeVariables\\\",\\\"action\\\",\\\"backUp\\\")' v-align='middle'> \".$msg[\"BACKUPRESTORE\"][\"ManualBackup\"][$Lang].\"</a><br>&nbsp;</td></tr>\");\n\n \n echo(\"</table>\" . CRLF);\n\n echo(\"</form>\" . CRLF);\n \n // Javascript to hide VERIFY Button, if PATH empty or Invalid\n echo(\"<script type=\\\"text/javascript\\\">\" . CRLF);\n \n echo(\"var textBox_Change = function(e) {\" . CRLF);\n echo(\" // just calls the function that sets the visibility\" . CRLF);\n echo(\" button_SetVisibility();\" . CRLF);\n echo(\" };\" . CRLF);\n\n echo(\" var button_SetVisibility = function() {\" . CRLF);\n echo(\" // simply check if the visibility is set to 'visible' AND textbox hasn't been filled\" . CRLF);\n echo(\" if (textBox.value === '') {\" . CRLF);\n echo(\" button.style.visibility = 'hidden';\" . CRLF);\n echo(\" } else {\" . CRLF);\n echo(\" if (textBox.value.length>6) {\" . CRLF);\n echo(\" if (((textBox.value.substring(0,6)=='ftp://') && (textBox.value.slice(-1)!='/') && (textBox.value.indexOf(':',7)!==-1) && (textBox.value.indexOf('@') !== -1) && (textBox.value.indexOf('@')+1<textBox.value.length)) || ((textBox.value.substring(0,7)=='sftp://') && (textBox.value.slice(-1)!='/') && (textBox.value.indexOf(':',8)!==-1) && (textBox.value.indexOf('@') !== -1) && (textBox.value.indexOf('@')+1<textBox.value.length)) || ((textBox.value.substring(0,1)=='/') && (textBox.value.substring(1,2)!='/')) ) {\" . CRLF);\n //echo(\" alert('local path, FTP or SFTP URI OK!'+textBox.value.indexOf(':',7));\" . CRLF);\n echo(\" button.style.visibility = 'visible';\" . CRLF);\n echo(\" } else { button.style.visibility = 'hidden'; }\" . CRLF);\n echo(\" }\" . CRLF);\n echo(\" }\" . CRLF);\n echo(\" }; \" . CRLF);\n echo(\"(function() {\" . CRLF);\n echo(\" textBox = document.getElementById(\\\"BackupDest\\\");\" . CRLF);\n echo(\" button = document.getElementById(\\\"VerifyButton\\\");\" . CRLF);\n echo(\" if('' === button.style.visibility) { button.style.visibility = 'visible'; }\" . CRLF);\n echo(\" textBox.oninput = textBox_Change;\" . CRLF);\n echo(\"\" . CRLF);\n echo(\"})();\" . CRLF);\n echo(\"</script>\" . CRLF);\n // END Javascript\n \n echo(\"<br><div class='clear'></div>\" . CRLF);\n echo(\"</div>\t<!-- end .postcontent -->\" . CRLF);\n\n // Restore\n echo(\"<h2 class='title'> Restore </h2>\");\n echo(\"<div class='post_info'>&nbsp;</div>\" . CRLF);\n\n echo(\"\t<div class='postcontent' name='plan' \" .\n \"style='\" .\n \" width: 550px; margin-left: 50px;'>\" . CRLF);\n\t\t\n echo(\"<style>\" . CRLF);\n echo(\"<\" . CRLF);\n echo(\"img\" . CRLF);\n echo(\"{\" . CRLF);\n echo(\"position:relative;\" . CRLF);\n echo(\"}\" . CRLF);\n echo(\"</style>\" . CRLF);\n echo(\"<form name='ChangeVariables2' id='ChangeVariables2' enctype='multipart/form-data' action='./index.php?page=BackupRestore' method='post'>\" . CRLF);\n echo(\"<input type='hidden' name='action' id ='action2' value=''/>\" . CRLF);\n echo(\"<input type='hidden' name='backupURI' id ='backupURI' value=''/>\" . CRLF);\n echo(\"<input type='hidden' name='MAX_FILE_SIZE' value='20000000' />\" . CRLF);\n echo(\"<table>\" . CRLF);\n \n // File List\n echo(\"<tr><td colspan=2><b>\".$msg[\"BACKUPRESTORE\"][\"AvailableBackup\"][$Lang].\"</b></td></tr>\");\n $i=0;\n // Local Folder? or FTP Folder?\n if ((substr($BackupDir,0,1)==\"/\") || (substr($BackupDir,0,4)==\"ftp:\")) { \n // Local backup\n\t$files = scandir($BackupDir, 1);\n } else {\n // SFTP?\n $choppedURL = parse_url($BackupDir);\n if ($choppedURL[\"scheme\"]==\"sftp\") {\n\t $user = $choppedURL[\"user\"];\n\t $pass = $choppedURL[\"pass\"];\n\t $host = $choppedURL[\"host\"];\n\t if (isset($choppedURL[\"path\"])) { $path = $choppedURL[\"path\"]; } else { $path = \"\";}\n\t //echo(\"sftp ! Host=$host, Path=$path, User=$user, Passwd=$pass<br>\");\n\t $connection = ssh2_connect($host, 22);\n\t ssh2_auth_password($connection, $user, $pass);\n\t $sftp = ssh2_sftp($connection);\n $files = scandir('ssh2.sftp://' . $sftp . '/' . $path, 1);\n\t ssh2_exec($connection, 'logout');\n } // END IF\n } // END IF\n \n while ((isset($files[$i]))) {\n if (($files[$i]!=\"..\") && (substr($files[$i],-7)==\".tar.gz\")) {\n if (substr($BackupDir,-1)!=\"/\") { $BackupDir=$BackupDir.\"/\"; }\n\techo(\"<tr><td colspan=2><a href='javascript:submitformConfirm(\\\"ChangeVariables2\\\",\\\"action2\\\",\\\"reStoreBackup\\\",\\\"\".$BackupDir.$files[$i].\"\\\");' title='Restore'>\".$files[$i].\"</a>\");\n\t$Dir=\"\";\n\tif (substr($BackupDir,0,8)==$_SERVER['DOCUMENT_ROOT']) { $Dir = substr($BackupDir,8); }\n\tif (substr($BackupDir,0,4)==\"ftp:\") { $Dir = $BackupDir.'/'; }\n\tif ($Dir!=\"\") {\n\t echo(\"&nbsp;<a href='\".$Dir.$files[$i].\"' target='_blank'><img src='./images/download.png' width=32 height=32 title='Download'/></a>\");\n\t} // END IF\n\techo(\"</td></tr>\");\n } // END IF\n $i++;\n } // END WHILE\n \n \n // NO Files :-(\n if ($i==0) { echo(\"<tr><td colspan=2><font color=red><b>\".$msg[\"BACKUPRESTORE\"][\"NoBackupFile\"][$Lang].\"</b></font></td></tr>\"); }\n \n echo(\"<tr><td colspan=2>&nbsp;</td></tr>\");\n \n // Upload File\n echo(\"<tr><td colspan=2><b>\".$msg[\"BACKUPRESTORE\"][\"BackupUpload\"][$Lang].\" (.tar.gz):</b></td></tr>\");\n echo(\"<tr><td>&nbsp;</td><td><input name='PackageFile' type='file' /></td></tr>\");\n \n echo(\"<tr><td colspan=2 align=middle><a href='javascript:submitform(\\\"ChangeVariables2\\\",\\\"action2\\\",\\\"upLoadBackup\\\")'><img src='./images/upload.png' width='64px' heigth='64px' /></a></td></tr>\");\n \n echo(\"</table>\" . CRLF);\n\n echo(\"</form>\" . CRLF);\n echo(\"</div>\");\n \n echo(\"<body>\" . CRLF);\n echo(\"<div id='data'></div>\" . CRLF);\n echo(\"</body>\" . CRLF);\n echo(\"<div id='rss-3' class='block widget_rss'>\" . CRLF);\n echo(\"<ul>\" . CRLF);\n\n echo(\"</ul>\" . CRLF);\n echo(\"</div>\" . CRLF);\n \n echo(\"</div>\" . CRLF);\n echo(\"</div>\" . CRLF);\n\n echo(\"<div id='sidebar'>\" . CRLF);\n echo(\"<div id='text-11' class='block widget_text'>&nbsp;\" . CRLF);\n\n echo(\"</div>\" . CRLF);\n echo(\"<div id='rss-3' class='block widget_rss'>\" . CRLF);\n echo(\"<ul>\" . CRLF);\n \n\n echo(\"</ul></div>\" . CRLF);\n echo(\"<div class='postcontent'>\" . CRLF);\n echo(\"<div class='clear'></div>\" . CRLF);\n echo(\"</div>\" . CRLF);\n echo(\"<input type='hidden' name='action' value='' />\" . CRLF);\n echo(\"</div>\" . CRLF);\n echo(\"<script type='text/javascript'>\" . CRLF);\n echo(\"function submitform(formID,actionID,action) {\" . CRLF);\n //echo(\" alert('submit from Form='+formID+' + Action='+action);\" . CRLF);\n echo(\" document.getElementById(actionID).value = action;\" . CRLF);\n echo(\" document.getElementById(formID).submit();\" . CRLF);\n echo(\"}\" . CRLF);\n //echo(\"</script>\" . CRLF);\n //echo(\"<script type='text/javascript'>\" . CRLF);\n echo(\"function submitformConfirm(formID,actionID,action,uri) {\" . CRLF);\n //echo(\" alert('submit Confirm + Action='+action+', from form='+formID);\" . CRLF);\n echo(\" var answer = confirm('\".$msg[\"BACKUPRESTORE\"][\"ConfirmRestore\"][$Lang].\" '+uri+' ?')\" . CRLF);\n echo(\" document.getElementById(actionID).value = action;\" . CRLF);\n echo(\" document.getElementById('backupURI').value = uri;\" . CRLF);\n echo(\" if (answer) { document.getElementById(formID).submit(); }\" . CRLF);\n echo(\"}\" . CRLF);\n echo(\"</script>\" . CRLF);\n\n //mysqli_close($DB);\n}", "public function actionBackup($name){\n /* 所有数据表 */\n $alltables = Yii::$app->db->createCommand('SHOW TABLE STATUS')->queryAll();\n $alltables = array_map('array_change_key_case', $alltables);\n $alltables = ArrayHelper::getColumn($alltables, 'name');\n\n $name = trim($name,',');\n if ($name == 'all') {\n /* 备份所有数据 */\n $tables = $alltables;\n } else if(strpos($name, ',')){\n /* 备份部分数据表 */\n $tables = explode(',', $name);\n } else {\n /* 备份一个数据表 */\n $tables = [$name];\n }\n /* 检查表是否存在 */\n foreach ($tables as $table) {\n if (!in_array($table,$alltables)) {\n $this->stdout($table.\" table no find ...\\n\", Console::FG_RED);\n die();\n }\n }\n /* 创建migration */\n foreach ($tables as $table) {\n //$migrate = new MigrateCreate();\n $migrate = Yii::createObject([\n 'class' => 'e282486518\\migration\\components\\MigrateCreate',\n 'migrationPath' => '@app/migrations'\n ]);\n $migrate->create($table);\n unset($migrate);\n }\n\n $this->stdout(\"backup success.\\n\", Console::FG_GREEN);\n }", "function make_backup_2($file=NULL,$b_type=NULL,$max_size=NULL) // This is called as a shutdown function and thus cannot script-timeout\n{\n\tglobal $STARTED_BACKUP;\n\tif ($STARTED_BACKUP) return;\n\t$STARTED_BACKUP=true;\n\n\tif (is_null($file))\n\t{\n\t\tglobal $MB2_FILE,$MB2_B_TYPE,$MB2_MAX_SIZE;\n\t\t$file=$MB2_FILE;\n\t\t$b_type=$MB2_B_TYPE;\n\t\t$max_size=$MB2_MAX_SIZE;\n\t}\n\n\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\t$logfile_path=get_custom_file_base().'/exports/backups/'.$file.'.txt';\n\t$logfile=@fopen($logfile_path,'wt') OR intelligent_write_error($logfile_path); // .txt file because IIS doesn't allow .log download\n\t@ini_set('log_errors','1');\n\t@ini_set('error_log',$logfile_path);\n\tfwrite($logfile,'This is a log file for an ocPortal backup. The backup is not complete unless this log terminates with a completion message.'.\"\\n\\n\");\n\n\trequire_code('tar');\n\t$myfile=tar_open(get_custom_file_base().'/exports/backups/'.filter_naughty($file),'wb');\n\n\t// Write readme.txt file\n\ttar_add_file($myfile,'readme.txt',do_lang('BACKUP_README',get_timezoned_date(time())),0664,time());\n\n\t// Write restore.php file\n\t$template=get_custom_file_base().'/data_custom/modules/admin_backup/restore.php.pre';\n\tif (!file_exists($template)) $template=get_file_base().'/data/modules/admin_backup/restore.php.pre';\n\t$_install_php_file=file_get_contents($template);\n\t$place=strpos($_install_php_file,'{!!DB!!}');\n\t$__install_php_file=ocp_tempnam('ocpbak');\n\t$install_php_file=fopen($__install_php_file,'wb');\n\tfwrite($install_php_file,substr($_install_php_file,0,$place));\n\tget_table_backup($logfile,'db_meta','db_meta_indices',$install_php_file);\n\tif (fwrite($install_php_file,substr($_install_php_file,$place+8))==0) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\tfclose($install_php_file);\n\n\ttar_add_file($myfile,'restore.php',$__install_php_file,0664,time(),true);\n\t@unlink($__install_php_file);\n\n\tif ($b_type=='full')\n\t{\n\t\tset_value('last_backup',strval(time()));\n\t\t$original_files=(get_param_integer('keep_backup_alien',0)==1)?unserialize(file_get_contents(get_file_base().'/data/files.dat')):NULL;\n\t\t$root_only_dirs=array_merge(find_all_zones(false,false,true),array(\n\t\t\t'data','data_custom',\n\t\t\t'exports','imports',\n\t\t\t'lang','lang_custom',\n\t\t\t'lang_cached',\n\t\t\t'pages',\n\t\t\t'persistant_cache','safe_mode_temp',\n\t\t\t'sources','sources_custom',\n\t\t\t'text','text_custom',\n\t\t\t'themes',\n\t\t\t'uploads',\n\n\t\t\t'site', // In case of collapsed zones blocking in\n\t\t));\n\t\ttar_add_folder($myfile,$logfile,get_file_base(),$max_size,'',$original_files,$root_only_dirs,!running_script('cron_bridge'),true);\n\t} elseif ($b_type=='incremental')\n\t{\n\t\t$threshold=intval(get_value('last_backup'));\n\n\t\tset_value('last_backup',strval(time()));\n\t\t$directory=tar_add_folder_incremental($myfile,$logfile,get_file_base(),$threshold,$max_size);\n\t\t$_directory='';\n\t\tforeach ($directory as $d)\n\t\t{\n\t\t\t$a='';\n\t\t\tforeach ($d as $k=>$v)\n\t\t\t{\n\t\t\t\tif ($a!='') $a.=\", \";\n\t\t\t\t$a.=$k.'='.$v;\n\t\t\t}\n\t\t\t$_directory.=$a.\"\\n\";\n\t\t}\n\t\ttar_add_file($myfile,'DIRECTORY',$_directory,0664,time());\n\t} else\n\t{\n\t\tset_value('last_backup',strval(time()));\n\t}\n\ttar_close($myfile);\n\tif (!file_exists(get_custom_file_base().'/exports/backups/'.filter_naughty($file))) warn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n\trename(get_custom_file_base().'/exports/backups/'.filter_naughty($file),get_custom_file_base().'/exports/backups/'.filter_naughty($file).'.tar');\n\tsync_file('exports/backups/'.filter_naughty($file).'.tar');\n\tfix_permissions('exports/backups/'.filter_naughty($file).'.tar');\n\n\t$url=get_base_url().'/exports/backups/'.$file.'.tar';\n\tif (function_exists('gzopen'))\n\t{\n\t\tif (fwrite($logfile,\"\\n\".do_lang('COMPRESSING').\"\\n\")==0) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\n\t\t$myfile=gzopen(get_custom_file_base().'/exports/backups/'.$file.'.tar.gz.tmp','wb') OR intelligent_write_error(get_custom_file_base().'/exports/backups/'.$file.'.tar.gz.tmp');\n\t\t$tar_path=get_custom_file_base().'/exports/backups/'.filter_naughty($file).'.tar';\n\n\t\t$fp_in=fopen($tar_path,'rb');\n\t\twhile (!feof($fp_in))\n\t\t{\n\t\t\t$read=fread($fp_in,8192);\n\t\t gzwrite($myfile,$read,strlen($read));\n\t\t}\n\t\tfclose($fp_in);\n\t\tgzclose($myfile);\n\n\t\trename(get_custom_file_base().'/exports/backups/'.$file.'.tar.gz.tmp',get_custom_file_base().'/exports/backups/'.$file.'.tar.gz');\n\n\t\tfix_permissions(get_custom_file_base().'/exports/backups/'.$file.'.tar.gz');\n\t\tsync_file('exports/backups/'.filter_naughty($file).'.tar.gz');\n\t\t$url=get_base_url().'/exports/backups/'.$file.'.tar.gz';\n\t}\n\n\tif (fwrite($logfile,\"\\n\".do_lang('SUCCESS').\"\\n\")==0) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\tfclose($logfile);\n\tsync_file($logfile_path);\n\tfix_permissions($logfile_path);\n\tsync_file($logfile_path);\n\n\t// Remote backup\n\t$copy_server=get_option('backup_server_hostname');\n\tif ($copy_server!='')\n\t{\n\t\t$path_stub=get_custom_file_base().'/exports/backups/';\n\t\tif (file_exists($path_stub.$file.'.tar.gz')) $_file=$file.'.tar.gz';\n\t\telseif (file_exists($path_stub.$file.'.tar')) $_file=$file.'.tar';\n\t\telse $file=NULL;\n\n\t\tif (!is_null($file)) // If the backup was actually made\n\t\t{\n\t\t\t$copy_port=get_option('backup_server_port');\n\t\t\tif ($copy_port=='') $copy_port='21';\n\t\t\t$copy_user=get_option('backup_server_user');\n\t\t\tif ($copy_user=='') $copy_user='anonymous';\n\t\t\t$copy_password=get_option('backup_server_password');\n\t\t\tif (is_null($copy_password)) $copy_password=get_option('staff_address');\n\t\t\t$copy_path=get_option('backup_server_path');\n\t\t\tif ($copy_path=='') $copy_path=$_file;\n\t\t\telseif ((substr($copy_path,-1)=='/') || ($copy_path=='')) $copy_path.=$_file;\n\t\t\t$ftp_connection=@ftp_connect($copy_server,intval($copy_port));\n\t\t\tif ($ftp_connection!==false)\n\t\t\t{\n\t\t\t\tif (@ftp_login($ftp_connection,$copy_user,$copy_password))\n\t\t\t\t{\n\t\t\t\t\t@ftp_delete($ftp_connection,$path_stub.$_file);\n\t\t\t\t\t@ftp_put($ftp_connection,$copy_path,$path_stub,FTP_BINARY);\n\t\t\t\t}\n\t\t\t\t@ftp_close($ftp_connection);\n\t\t\t}\n\t\t}\n\t}\n\n\trequire_code('notifications');\n\tdispatch_notification('backup_finished',NULL,do_lang('BACKUP',NULL,NULL,NULL,get_site_default_lang()),do_lang('BACKUP_FINISHED',comcode_escape($url),get_site_default_lang()),NULL,A_FROM_SYSTEM_PRIVILEGED);\n}", "function load_backup()\n\t{\t\n\t\t$this->load->view('incl/backup');\n\t}", "public function download_backup(){\n\t\tif ($this->in->get('backups') != \"\"){\n\n\t\t\t$file_name = $this->pfh->FolderPath('backup', 'eqdkp').$this->in->get('backups');\n\n\t\t\tif (preg_match('#^eqdkp-backup_([0-9]{10})_([0-9]{1,10})\\.(sql|zip?)$#', $this->in->get('backups'), $matches) || preg_match('#^eqdkp-fbackup_([0-9]{10})_([0-9]{1,10})\\.(sql|zip?)$#', $this->in->get('backups'), $matches) ){\n\n\t\t\t\t$name = 'eqdkp-backup_' . $this->time->date('Y-m-d_Hi', $matches[1]).\".\".$matches[3];\n\n\t\t\t\tswitch ($matches[3]){\n\t\t\t\t\tcase 'sql':\n\t\t\t\t\t\t$mimetype = 'text/x-sql';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'zip':\n\t\t\t\t\t\t$mimetype = 'application/zip';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\theader('Pragma: no-cache');\n\t\t\t\theader(\"Content-Type: $mimetype; name=\\\"$name\\\"\");\n\t\t\t\theader(\"Content-disposition: attachment; filename=$name\");\n\n\t\t\t\t@set_time_limit(0);\n\n\t\t\t\t$fp = @fopen($file_name, 'rb');\n\n\t\t\t\tif ($fp !== false){\n\t\t\t\t\twhile (!feof($fp)){\n\t\t\t\t\t\techo fread($fp, 8192);\n\t\t\t\t\t}\n\t\t\t\t\tfclose($fp);\n\t\t\t\t}\n\t\t\t\tflush();\n\t\t\t}\n\t\t\texit();\n\t\t\t//$this->display('1');\n\t\t} else {\n\t\t}\n\t}", "function backup_tables(){\n\t$tables = '*';\n\tglobal $connection; \n\t$backuptime = date('YMd_His');\n\t$backupdatabasefiletime = date('Y-m-d H:i:s');\n\t$username = $_SESSION['user_id'];\n\t$ipaddress = $_SERVER[\"REMOTE_ADDR\"];\n\t\n\t$backupdatabasefilename = $backuptime.'.sql';\n\t$backupdatabasefiletime = $backupdatabasefiletime;\n\t\n\t$query1db = \"insert into kp_backdb (backupfilename, backupfiledate, username, ipaddress) \n\tvalues ('$backupdatabasefilename', '$backupdatabasefiletime', '$username', '$ipaddress')\";\n\t$exec1db = mysqli_query($connection,$query1db) or die (\"Error in Query1db\".mysqli_error($connection));\n\n\t$return = '';\n\t\n\t\n\t//get all of the tables\n\tif($tables == '*'){\n\t\t$tables = array();\n\t\t$result = mysqli_query($connection, 'SHOW TABLES');\n\t\twhile($row = mysqli_fetch_row($result))\n\t\t{\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t}\n\t\n\t//cycle through\n\tforeach($tables as $table)\n\t{ \n\t\t$result = mysqli_query($connection, \"SELECT * FROM $table\");\n\t\t$num_fields = mysqli_num_fields($result);\n\t\t\n\t\t//$return.= 'DROP TABLE '.$table.';';\n\t\t$row2 = mysqli_fetch_row(mysqli_query($connection, 'SHOW CREATE TABLE '.$table));\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\t\n\t\tfor ($i = 0; $i < $num_fields; $i++) \n\t\t{\n\t\t\twhile($row = mysqli_fetch_row($result))\n\t\t\t{\n\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\tfor($j=0; $j<$num_fields; $j++) \n\t\t\t\t{\n\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t\n\t\t\t\t\t//Slash after and before double quote is compulsory.\n\t\t\t\t\t$patterns = \"/\\n/\";\n\t\t\t\t\t$replacements = \"/\\\\n/\";\n\t\t\t\t\t$string = $row[$j]; \n\t\t\t\t\t\n\t\t\t\t\t//$row[$j] = preg_replace(\"\\n\",\"\\\\n\",$row[$j]); \n\t\t\t\t\t$row[$j] = preg_replace($patterns, $replacements, $string);\n\t\t\t\t\t\n\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\n\t\t\t\t}\n\t\t\t\t$return.= \");\\n\";\n\t\t\t}\n\t\t}\n\t\t$return.=\"\\n\\n\\n\";\n\t}\n\t$handle = fopen('../../assets/back/db/'.$backuptime.'.sql','w+'); //z given to list folders at the end.\n\tfwrite($handle,$return);\n\tfclose($handle);\n}", "function restoreBackup()\n {\n $mysqlDatabaseName ='edumarxc_bmwdatabase';\n $mysqlUserName ='edumarxc_bmw';\n $mysqlPassword ='bmw_INF370';\n $mysqlHostName ='dbxxx.hosting-data.io';\n $mysqlImportFilename ='backup.sql';\n\n //Please do not change the following points\n //Import of the database and output of the status\n $command='mysql -u '.$mysqlUserName .' -p' .$mysqlPassword .' ' .$mysqlDatabaseName .' < ' .$mysqlImportFilename;\n exec($command,$output=array(),$worked);\n switch($worked){\n case 0:\n return true;\n break;\n case 1:\n return false;\n break;\n }\n\n }", "public function file_backups()\n {\n \n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'menu_data' => ee()->backup_pro->get_dashboard_view_menu(),\n 'method' => $this->platform->getPost('method')\n );\n\n ee()->jquery->tablesorter('#file_backups table', '{headers: {8: {sorter: false}, 0: {sorter: false}, 1: {sorter: false}, 2: {sorter: false}, 3: {sorter: false}}, widgets: [\"zebra\"], sortList: [[4,1]]}');\n ee()->javascript->compile();\n \n return array(\n 'body' => ee()->load->view('file_backups', $variables, true),\n 'heading' => $this->services['lang']->__('file_backups'),\n 'breadcrumb' => array(\n ee('CP/URL', 'addons/settings/backup_pro')->compile() => lang('backup_pro_module_name'),\n ee('CP/URL', 'addons/settings/backup_pro/index')->compile() => lang('home_bp_dashboard_menu')\n )\n );\n }", "function BackupTabla($Tabla){\n \n if($Tabla==\"preventa\" or $Tabla==\"precotizacion\"){\n print(\"OK;0\");\n exit();\n }\n $obCon = new Backups($_SESSION['idUser']);\n\n $DatosServer=$obCon->DevuelveValores(\"servidores\", \"ID\", 2);\n $FechaSinc=date(\"Y-m-d H:i:s\");\n $CondicionUpdate=\"WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated LIMIT 5000\";\n $sql=$obCon->ArmeSqlReplace($Tabla, DB, $CondicionUpdate,$DatosServer[\"DataBase\"],$FechaSinc, \"\");\n //print($sql);\n if($sql==''){\n print(\"OK;0\");\n exit();\n }\n $Mensaje=\"\";\n $Mensaje=$obCon->QueryExterno($sql, $DatosServer[\"IP\"], $DatosServer[\"Usuario\"], $DatosServer[\"Password\"], $DatosServer[\"DataBase\"], \"\");\n if($Mensaje<>\"\" and $Mensaje<>1){\n $Mensaje=\"Error: al insertar datos en la tabla $Tabla: \".$Mensaje;\n $obCon->RegistraAlerta(\"\", \"\", \"Backups\", $Mensaje, \"\");\n }\n $sqlUp=\"UPDATE $Tabla SET Sync='$FechaSinc', Updated='$FechaSinc' $CondicionUpdate\";\n $Mensaje=$obCon->Query($sqlUp);\n if($Mensaje<>\"\" and $Mensaje<>1){\n $Mensaje=\"Error: al insertar datos en la tabla $Tabla: \".$Mensaje;\n $obCon->RegistraAlerta(\"\", \"\", \"Backups\", $Mensaje, \"\");\n }\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 print(\"OK;$TotalRegistros\");\n }", "function init__backup()\n{\n\tglobal $STARTED_BACKUP;\n\t$STARTED_BACKUP=false;\n}", "public function getBackup($tables){\n $this->load->dbutil();\n $prefs = array(\n 'tables' => $tables,\n 'format' => 'txt',\n 'filename' => 'my_db_backup.sql'\n );\n $backup = $this->dbutil->backup($prefs);\n $db_name = 'backup-on-'. date(\"Y-m-d-H-i-s\") .'.sql';\n $save = 'backups/'.$db_name;\n $this->load->helper('file');\n write_file($save, $backup);\n $redirect_link = base_url('Backup/backup');\n echo json_encode(array(\"msg_type\" => \"success\", \"message\" => \"Backup Created Successfully\", 'redirect_link' => $redirect_link));\n }", "protected function makeBackupsList() {\n\t\t$backups = array();\n\t\t$metaArray = $this->backupService->getBackupObj()->getMetaInfos(2);\n\t\tif (is_array($metaArray)) {\n\t\t\t$keys = array_keys($metaArray);\n\t\t\tforeach ($keys as $langFile) {\n\t\t\t\tforeach ($metaArray[$langFile] as $fileName => $informations) {\n\t\t\t\t\t$backup = array();\n\n\t\t\t\t\t// get path to filename\n\t\t\t\t\t$backupPath = $informations['pathBackup'];\n\t\t\t\t\t$file = Typo3Lib::fixFilePath(PATH_site . '/' . $backupPath . '/' . $fileName);\n\t\t\t\t\t$origFile = Typo3Lib::fixFilePath(\n\t\t\t\t\t\t$this->session->getDataByKey('extensionSelection') . '/' . $langFile\n\t\t\t\t\t);\n\n\t\t\t\t\t// check state\n\t\t\t\t\tif (!is_file($file)) {\n\t\t\t\t\t\t$backup['state'] = 'function.backupMgr.missing';\n\t\t\t\t\t} elseif (!is_file($origFile)) {\n\t\t\t\t\t\t$backup['state'] = 'lang.file.missing';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$backup['state'] = 'function.backupMgr.ok';\n\t\t\t\t\t}\n\n\t\t\t\t\t$backup['date'] = date('Y-m-d H:i:s', $informations['createdAt']);\n\t\t\t\t\t$backup['langFile'] = $langFile;\n\t\t\t\t\t$backup['fileName'] = $fileName;\n\t\t\t\t\t$backups[] = $backup;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $backups;\n\t}", "public function start_midrub_backup() {\n \n // Backup\n (new MidrubBaseAdminCollectionUpdateHelpers\\Midrub)->start_backup();\n \n }", "public function createBackup($type = 'all', $options = array()) {\n $backup = '-- --------------------------------------------------------' .\"\\n\"\n . '-- Dump of Nuked-Klan database' .\"\\n\"\n . '-- Database: `'. $this->_dbName .'`' .\"\\n\"\n . '-- Date: '. strftime('%c') .\"\\n\"\n . '-- --------------------------------------------------------' .\"\\n\\n\";\n\n $tableList = $this->getTableList();\n $nbTable = count($tableList);\n $t = 0;\n\n foreach ($tableList as $table) {\n $backup .= '--' .\"\\n\"\n . '-- Table structure for table `'. $table .'`' .\"\\n\"\n . '--' .\"\\n\\n\"\n . 'DROP TABLE IF EXISTS '. $table .';' .\"\\n\\n\"\n . $this->_getTableStructure($table) .';' .\"\\n\\n\"\n . '-- --------------------------------------------------------' .\"\\n\\n\";\n\n if ($type == 'all') {\n $tableDataList = $this->selectMany('SELECT * FROM '. $table, array(DB_NUM));\n $nbData = count($tableDataList);\n\n if ($nbData > 0) {\n $backup .= '--' .\"\\n\"\n . '-- Dumping data for table `'. $table .'`' .\"\\n\"\n . '--' .\"\\n\\n\";\n\n $tableInfo = $this->getTableInfo($table);\n $fields = array();\n\n foreach ($tableInfo as $row)\n $fields[] = $row['Field'];\n\n $backup .= 'INSERT INTO '. $table .' (`'. implode('`, `', $fields) .'`) VALUES' .\"\\n\";\n\n $nbFields = count($fields);\n $d = 0;\n\n // TODO : Limiter la taille de la requete\n foreach ($tableDataList as $tableData) {\n $backup .= '(';\n\n for ($f = 0; $f < $nbFields; $f++) {\n $tableData[$f] = $this->_backupQuote($tableData[$f]);\n\n if (isset($tableData[$f]))\n $backup .= '\\''. $tableData[$f] .'\\'' ;\n else\n $backup .= '\\'\\'';\n\n if ($f < ($nbFields - 1))\n $backup .= ', ';\n }\n\n $d++;\n\n if ($d == $nbData)\n $backup .= ');' .\"\\n\";\n else\n $backup .= '),' .\"\\n\";\n }\n }\n }\n\n $t++;\n\n if ($t != $nbTable && $nbData > 0)\n $backup .= \"\\n\" .'-- --------------------------------------------------------' .\"\\n\\n\";\n\n }\n\n return $backup;\n }", "function wwassignment_backup_mods($bf,$preferences) {\n //error_log(\"wwassignment_backup_mods\");\n ////error_log(\"preferences \".print_r($preferences,true));\n global $CFG;\n\n $status = true;\n\n //Iterate over assignment table\n $wwassignments = get_records (\"wwassignment\",\"course\",$preferences->backup_course);\n if ($wwassignments) {\n foreach ($wwassignments as $wwassignment) {\n ////error_log(\"backing up wwassignment \".$wwassignment->id);\n if (backup_mod_selected($preferences,'wwassignment',$wwassignment->id)) {\n $status = wwassignment_backup_one_mod($bf,$preferences,$wwassignment);\n // backup files happens in backup_one_mod now too.\n }\n }\n }\n \n\n \n //error_log(\"end wwassignment_backup_mods\");\n return $status; \n }", "function download(){\n $file = $this->input->get('backup');\n $sql = file_get_contents('backups/'.$file);\n $this->load->helper('download');\n force_download($file, $sql);\n }", "public function start_plugin_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Plugins)->start_backup();\n \n }", "public function create()\n {\n// dd('backup.create');\n $exitCode = Artisan::call('backup:run', ['--only-db'=>true]);\n return redirect()->route('backup.index');\n }", "function drush_acapi_ac_database_backup_download($db, $backupid) {\n $command = drush_get_context('command');\n list($site, $env) = acapi_get_site();\n $simulate = drush_get_option('simulate', FALSE);\n $result_file = drush_get_option('result-file', '');\n // Similar to drush_sql_build_dump_command(). If the user has set\n // $options['result-file'] = TRUE, then we will generate an SQL dump file in\n // an automatically-generated backup directory based on site and env values.\n if ($result_file === TRUE) {\n // User did not pass a specific value for --result-file. Make one.\n $backup = drush_include_engine('version_control', 'backup');\n $backup_dir = $backup->prepare_backup_dir($site . '.' . $env);\n if (empty($backup_dir)) {\n $backup_dir = \"/tmp\";\n }\n $result_file = $backup_dir . '/' . $db . '-' . $backupid .'.sql.gz';\n }\n if ($result_file == '') {\n $fp = STDOUT;\n }\n else {\n $fp = fopen($result_file, 'w');\n if ($fp == NULL) {\n return drush_set_error('ACAPI_ENOENT', dt('Cannot write to result file @result_file.', array('@name' => $result_file)));\n }\n }\n\n $api_args = acapi_get_site_args() + array(\n ':db' => $db,\n ':backup' => $backupid,\n );\n list($status, $result) = acapi_call(\n $command['method'],\n $command['resource'],\n $api_args,\n array(),\n array(),\n array('result_stream' => $fp, 'redirect' => 1, 'display' => FALSE)\n );\n}", "function backup_tables($host,$user,$pass,$name,$tables = '*') \n{ \n\t\n\t$link = mysql_connect($host,$user,$pass);\n\tmysql_select_db($name,$link);\n\t\n\t//get all of the tables \n\tif($tables == '*') \n\t{ \n\t$tables = array();\n\t$result = mysql_query('SHOW TABLES');\n\twhile($row = mysql_fetch_row($result)) \n\t{ \n\t$tables[] = $row[0];\n\t} \n\t} \n\telse \n\t{ \n\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t} \n\t\n\t//cycle through \n\tforeach($tables as $table) \n\t{ \n\t$result = mysql_query('SELECT * FROM '.$table);\n\t$num_fields = mysql_num_fields($result);\n\t\n\t//$return.= 'DROP TABLE '.$table.';';\n\t$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\n\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\n\tfor ($i = 0; $i < $num_fields; $i++) \n\t{ \n\twhile($row = mysql_fetch_row($result)) \n\t{ \n\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\tfor($j=0; $j<$num_fields; $j++) \n\t{ \n\t$row[$j] = addslashes($row[$j]);\n\t$row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; } \n\tif ($j<($num_fields-1)) { $return.= ','; } \n\t} \n\t$return.= \");\\n\";\n\t} \n\t} \n\t$return.=\"\\n\\n\\n\";\n\t} \n\techo(\"start...\");\n\t//save file \n\t$handle = fopen('db-backup-'.time().'-'.(md5(implode(',',$tables))).'.sql','w+');\n\tfwrite($handle,$return);\n\tfclose($handle);\n\techo(\"end\");\n}", "function backup_restore($operation = '', $type = '') {\r\n if ($this->session->userdata('accountant_login') != 1)\r\n redirect(base_url(), 'refresh');\r\n\r\n if ($operation == 'create') {\r\n $this->crud_model->create_backup($type);\r\n }\r\n if ($operation == 'restore') {\r\n $this->crud_model->restore_backup();\r\n $this->session->set_flashdata('backup_message', 'Backup Restored');\r\n redirect(base_url() . 'index.php?admin/backup_restore/', 'refresh');\r\n }\r\n if ($operation == 'delete') {\r\n $this->crud_model->truncate($type);\r\n $this->session->set_flashdata('backup_message', 'Data removed');\r\n redirect(base_url() . 'index.php?admin/backup_restore/', 'refresh');\r\n }\r\n\r\n $page_data['page_info'] = 'Create backup / restore from backup';\r\n $page_data['page_name'] = 'backup_restore';\r\n $page_data['page_title'] = get_phrase('manage_backup_restore');\r\n $this->load->view('index', $page_data);\r\n }", "function backup_tables($host,$user,$pass,$name,$tables = '*')\n{\n\n\t$link = mysql_connect($host,$user,$pass);\n\tmysql_select_db($name,$link);\n\n\t//get all of the tables\n\tif($tables == '*')\n\t{\n\t\t$tables = array();\n\t\t$result = mysql_query('SHOW TABLES');\n\t\twhile($row = mysql_fetch_row($result))\n\t\t{\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t}\n\n\t//cycle through\n\tforeach($tables as $table)\n\t{\n\t\t$result = mysql_query('SELECT * FROM '.$table);\n\t\t$num_fields = mysql_num_fields($result);\n\n\t\t$return.= 'DROP TABLE '.$table.';';\n\t\t$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\n\t\tfor ($i = 0; $i < $num_fields; $i++)\n\t\t{\n\t\twhile($row = mysql_fetch_row($result))\n\t\t{\n\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\tfor($j=0; $j<$num_fields; $j++)\n\t\t\t\t{\n\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t$row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\n\t\t\t\t}\n\t\t\t\t$return.= \");\\n\";\n\t\t}\n\t\t}\n\t\t$return.=\"\\n\\n\\n\";\n\t}\nprint $return ;\n\t//save file\n//\t\t$handle = fopen('db-backup-'.time().'-'.(md5(implode(',',$tables))).'.sql','w+');\n//\tfwrite($handle,$return);\n//\tfclose($handle);\n}", "function backup_tables($host,$user,$pass,$name,$tables = '*')\r\n{\r\n\r\n\t$link = mysql_connect($host,$user,$pass);\r\n\tmysql_select_db($name,$link);\r\n\r\n\t//get all of the tables\r\n\tif($tables == '*')\r\n\t{\r\n\t\t$tables = array();\r\n\t\t$result = mysql_query('SHOW TABLES');\r\n\t\twhile($row = mysql_fetch_row($result))\r\n\t\t{\r\n\t\t\t$tables[] = $row[0];\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\r\n\t}\r\n\r\n\t//cycle through\r\n\tforeach($tables as $table)\r\n\t{\r\n\t\t$result = mysql_query('SELECT * FROM '.$table);\r\n\t\t$num_fields = mysql_num_fields($result);\r\n $return.= 'DROP TABLE IF EXISTS '.$table.';';\r\n\t\t$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\r\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\r\n\r\n\t\tfor ($i = 0; $i < $num_fields; $i++)\r\n\t\t{\r\n\t\t\twhile($row = mysql_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\r\n\t\t\t\tfor($j=0; $j<$num_fields; $j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$row[$j] = addslashes($row[$j]);\r\n\t\t\t\t\t$row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\r\n\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\r\n\t\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\r\n\t\t\t\t}\r\n\t\t\t\t$return.= \");\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$return.=\"\\n\\n\\n\";\r\n\t}\r\n\r\n\t//save file\r\n\t//$handle = fopen('_db-backup/db-backup-'.time().'-'.(md5(implode(',',$tables))).'.sql','w+');\r\n $handle = fopen('../_db-backup/all/db-backup-'.date(dmYHis).'.sql','w+');\r\n $nama = \"db-backup-\".date(dmYHis).\".sql\";\r\n $lokasi = \"_db-backup/all/\".$nama;\r\n\t$s = mysql_query(\"insert into backup(file,lokasi,status) values('$nama','$lokasi','1')\");\r\n //$time = date(\"dmY-gis\");\r\n\t//$handle = fopen('_db-backup/db-backup-'.$time.'.sql','w+');\r\n fwrite($handle,$return);\r\n\tfclose($handle);\r\n}", "private function create_clone_backup() { // phpcs:ignore -- Current complexity is the only way to achieve desired results, pull request solutions appreciated.\r\n\t\tMainWP_Helper::end_session();\r\n\t\t$files = glob( WP_CONTENT_DIR . '/dbBackup*.sql' );\r\n\t\tforeach ( $files as $file ) {\r\n\t\t\tunlink( $file );\r\n\t\t}\r\n\t\tif ( file_exists( ABSPATH . 'clone/config.txt' ) ) {\r\n\t\t\tunlink( ABSPATH . 'clone/config.txt' );\r\n\t\t}\r\n\t\tif ( MainWP_Helper::is_dir_empty( ABSPATH . 'clone' ) ) {\r\n\t\t\trmdir( ABSPATH . 'clone' );\r\n\t\t}\r\n\r\n\t\t$wpversion = isset( $_POST['wpversion'] ) ? sanitize_text_field( wp_unslash( $_POST['wpversion'] ) ) : '';\r\n\t\tglobal $wp_version;\r\n\t\t$includeCoreFiles = ( $wpversion !== $wp_version );\r\n\t\t$excludes = ( isset( $_POST['exclude'] ) ? explode( ',', wp_unslash( $_POST['exclude'] ) ) : array() );\r\n\t\t$excludes[] = str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '/uploads/mainwp';\r\n\t\t$uploadDir = MainWP_Helper::get_mainwp_dir();\r\n\t\t$uploadDir = $uploadDir[0];\r\n\t\t$excludes[] = str_replace( ABSPATH, '', $uploadDir );\r\n\t\t$excludes[] = str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '/object-cache.php';\r\n\t\tif ( version_compare( phpversion(), '5.3.0' ) >= 0 || ! ini_get( 'safe_mode' ) ) {\r\n\t\t\tset_time_limit( 6000 );\r\n\t\t}\r\n\r\n\t\t$newExcludes = array();\r\n\t\tforeach ( $excludes as $exclude ) {\r\n\t\t\t$newExcludes[] = rtrim( $exclude, '/' );\r\n\t\t}\r\n\r\n\t\t$method = ( ! isset( $_POST['zipmethod'] ) ? 'tar.gz' : wp_unslash( $_POST['zipmethod'] ) );\r\n\t\tif ( 'tar.gz' === $method && ! function_exists( 'gzopen' ) ) {\r\n\t\t\t$method = 'zip';\r\n\t\t}\r\n\r\n\t\t$file = false;\r\n\t\tif ( isset( $_POST['f'] ) ) {\r\n\t\t\t$file = ! empty( $_POST['f'] ) ? wp_unslash( $_POST['f'] ) : false;\r\n\t\t} elseif ( isset( $_POST['file'] ) ) {\r\n\t\t\t$file = ! empty( $_POST['file'] ) ? wp_unslash( $_POST['file'] ) : false;\r\n\t\t}\r\n\r\n\t\t$res = MainWP_Backup::get()->create_full_backup( $newExcludes, $file, true, $includeCoreFiles, 0, false, false, false, false, $method );\r\n\t\tif ( ! $res ) {\r\n\t\t\t$information['backup'] = false;\r\n\t\t} else {\r\n\t\t\t$information['backup'] = $res['file'];\r\n\t\t\t$information['size'] = $res['filesize'];\r\n\t\t}\r\n\r\n\t\t$plugins = array();\r\n\t\t$dir = WP_CONTENT_DIR . '/plugins/';\r\n\t\t$fh = opendir( $dir );\r\n\t\twhile ( $entry = readdir( $fh ) ) {\r\n\t\t\tif ( ! is_dir( $dir . $entry ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( ( '.' === $entry ) || ( '..' === $entry ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$plugins[] = $entry;\r\n\t\t}\r\n\t\tclosedir( $fh );\r\n\t\t$information['plugins'] = $plugins;\r\n\r\n\t\t$themes = array();\r\n\t\t$dir = WP_CONTENT_DIR . '/themes/';\r\n\t\t$fh = opendir( $dir );\r\n\t\twhile ( $entry = readdir( $fh ) ) {\r\n\t\t\tif ( ! is_dir( $dir . $entry ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ( ( '.' === $entry ) || ( '..' === $entry ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$themes[] = $entry;\r\n\t\t}\r\n\t\tclosedir( $fh );\r\n\t\t$information['themes'] = $themes;\r\n\t\tMainWP_Helper::write( $information );\r\n\t}", "function backup_tables($host,$user,$pass,$name,$nama_file,$tables = '*')\n{\n\t//untuk koneksi database\n\t$link = mysql_connect($host,$user,$pass);\n\tmysql_select_db($name,$link);\n\t\n\tif($tables == '*')\n\t{\n\t\t$tables = array();\n\t\t$result = mysql_query('SHOW TABLES');\n\t\twhile($row = mysql_fetch_row($result))\n\t\t{\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t}else{\n\t\t//jika hanya table-table tertentu\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t}\n\t\n\t//looping dulu ah\n\tforeach($tables as $table)\n\t{\n\t\t$result = mysql_query('SELECT * FROM `'.$table.'`');\n\t\t$num_fields = mysql_num_fields($result);\n\t\t\n\t\t//menyisipkan query drop table untuk nanti hapus table yang lama\n\t\t$return.= 'DROP TABLE `'.$table.'`;';\n\t\t$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE `'.$table.'`'));\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\t\n\t\tfor ($i = 0; $i < $num_fields; $i++) \n\t\t{\n\t\t\twhile($row = mysql_fetch_row($result))\n\t\t\t{\n\t\t\t\t//menyisipkan query Insert. untuk nanti memasukan data yang lama ketable yang baru dibuat. so toy mode : ON\n\t\t\t\t$return.= 'INSERT INTO `'.$table.'` VALUES(';\n\t\t\t\tfor($j=0; $j<$num_fields; $j++) \n\t\t\t\t{\n\t\t\t\t\t//akan menelusuri setiap baris query didalam\n\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t$row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\n\t\t\t\t}\n\t\t\t\t$return.= \");\\n\";\n\t\t\t}\n\t\t}\n\t\t$return.=\"\\n\\n\\n\";\n\t}\n\t\n\t//simpan file di folder yang anda tentukan sendiri. kalo saya sech folder \"DATA\"\n\t$nama_file;\n\t\n\t$handle = fopen('./backup/'.$nama_file,'w+');\n\tfwrite($handle,$return);\n\tfclose($handle);\n}", "public function backup() {\r\n\t\tglobal $wpdb;\r\n\t\t$api = Maps_Marker_Pro::get_instance('MMP\\API');\r\n\t\t$l10n = Maps_Marker_Pro::get_instance('MMP\\L10n');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-backup') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$table = (isset($_POST['table'])) ? absint($_POST['table']) : 0;\r\n\t\t$offset = (isset($_POST['offset'])) ? absint($_POST['offset']) : 0;\r\n\t\t$total = (isset($_POST['offset'])) ? json_decode($_POST['total'], true) : array();\r\n\t\t$file = (isset($_POST['filename']) && $_POST['filename']) ? Maps_Marker_Pro::$temp_dir . $_POST['filename'] : Maps_Marker_Pro::$temp_dir . 'backup-' . date('Y-m-d-his') . '.mmp';\r\n\r\n\t\tif (!count($total)) {\r\n\t\t\t$index = 0;\r\n\t\t\twhile (($cur_table = $this->get_table($index)) !== false) {\r\n\t\t\t\t$rows = $wpdb->get_var(\"SELECT COUNT(1) FROM $cur_table\");\r\n\t\t\t\t$total[] = intval($rows); // MySQL always returns a string\r\n\t\t\t\t$index++;\r\n\t\t\t}\r\n\t\t\tfclose(fopen($file, 'w'));\r\n\t\t}\r\n\r\n\t\t$handle = fopen($file, 'a');\r\n\t\t$batch = $wpdb->get_results(\"SELECT * FROM \" . $this->get_table($table) . \" LIMIT $offset, 1000\");\r\n\t\tif (!count($batch)) {\r\n\t\t\t$log[] = '[OK] Table ' . $this->get_table($table) . ' skipped (empty)';\r\n\t\t} else {\r\n\t\t\tforeach ($batch as $line) {\r\n\t\t\t\t$data = \"$table:\" . json_encode($line) . \"\\n\";\r\n\t\t\t\tfwrite($handle, $data);\r\n\t\t\t}\r\n\t\t\t$log[] = '[OK] Processed table ' . $this->get_table($table) . ' (' . ($offset / 1000 + 1) . ' of ' . ceil($total[$table] / 1000) . ')';\r\n\t\t}\r\n\t\tfclose($handle);\r\n\r\n\t\t$filename = basename($file);\r\n\t\t$response = array(\r\n\t\t\t'table' => $table,\r\n\t\t\t'offset' => $offset,\r\n\t\t\t'total' => $total,\r\n\t\t\t'log' => $log,\r\n\t\t\t'filename' => basename($filename)\r\n\t\t);\r\n\t\tif (($table + 1) > 3) {\r\n\t\t\t$url = \"{$api->base_url}index.php?mapsmarkerpro=download_file&filename={$filename}\";\r\n\t\t\t$response['message'] = esc_html__('Backup completed successfully', 'mmp') . '<br />' . sprintf($l10n->kses__('If the download does not start automatically, please <a href=\"%1$s\">click here</a>', 'mmp'), $url);\r\n\t\t\t$response['url'] = $url;\r\n\t\t}\r\n\t\twp_send_json($response);\r\n\t}", "private function backupLevel()\n\t{\n\t\tif( realpath( $this->OutputPath ) )\n\t\t{\n\t\t\t$this->ensureDirectoryExists( $this->BackupDirectory );\n\t\t\trename( $this->OutputPath, $this->getBackupPath( $this->BackupDirectory ) );\n\t\t}\n\t}", "function backup_restore($operation = '', $type = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n if ($operation == 'create') {\n $this->crud_model->create_backup($type);\n }\n if ($operation == 'restore') {\n $this->crud_model->restore_backup();\n $this->session->set_flashdata('backup_message', 'Backup Restored');\n redirect(base_url() . 'index.php?admin/backup_restore/', 'refresh');\n }\n if ($operation == 'delete') {\n $this->crud_model->truncate($type);\n $this->session->set_flashdata('backup_message', 'Data removed');\n redirect(base_url() . 'index.php?admin/backup_restore/', 'refresh');\n }\n\n $page_data['page_info'] = 'Create backup / restore from backup';\n $page_data['page_name'] = 'backup_restore';\n $page_data['page_title'] = get_phrase('manage_backup_restore');\n $this->load->view('backend/index', $page_data);\n }", "function backup_tables($link,$name,$tables = '*')\n{\n\tmysqli_select_db($link,$name);\n\t\n\t//get all of the tables\n\tif($tables == '*')\n\t{\n\t\t$tables = array();\n\t\t$result = mysqli_query($link, 'SHOW TABLES');\n\t\twhile($row = mysqli_fetch_row($result))\n\t\t{\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t}\n\t\n\t//cycle through\n\tforeach($tables as $table)\n\t{\n\t\t$result = mysqli_query($link, 'SELECT * FROM '.$table);\n\t\t$num_fields = mysqli_num_fields($result);\n\t\t\n\t\t@$return.= 'DROP TABLE '.$table.';';\n\t\t$row2 = mysqli_fetch_row(mysqli_query($link, 'SHOW CREATE TABLE '.$table));\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\t\n\t\tfor ($i = 0; $i < $num_fields; $i++) \n\t\t{\n\t\t\twhile($row = mysqli_fetch_row($result))\n\t\t\t{\n\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\tfor($j=0; $j < $num_fields; $j++) \n\t\t\t\t{\n\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\tif ($j < ($num_fields-1)) { $return.= ','; }\n\t\t\t\t}\n\t\t\t\t$return.= \");\\n\";\n\t\t\t}\n\t\t}\n\t\t$return.=\"\\n\\n\\n\";\n\t}\n\t\n\t//save file\n\t$handle = fopen('db/'.$name.'-'.time().'-'.(md5(implode(',',$tables))).'.sql','w+');\n\tfwrite($handle,@$return);\n\tfclose($handle);\n\tif($handle){\n\t\techo \"<h3>Database bakeup taken Successfully</h3>\";\n\t}\n}", "function backup_restore($operation = '' , $type = '')\n\t{\n\t\tif($this->session->userdata('admin_login') != 1)redirect(base_url() , 'refresh');\n\t\t\n\t\tif($operation == 'create')\n\t\t{\n\t\t\t$this->crud_model->create_backup($type);\n\t\t}\n\t\tif($operation == 'restore')\n\t\t{\n\t\t\t$this->crud_model->restore_backup();\n\t\t\t$this->session->set_flashdata('backup_message', 'Backup Restored');\n\t\t\tredirect(base_url().'index.php/admin/backup_restore/' , 'refresh');\n\t\t}\n\t\tif($operation == 'delete')\n\t\t{\n\t\t\t$this->crud_model->truncate($type);\n\t\t\t$this->session->set_flashdata('backup_message', 'Data removed');\n\t\t\tredirect(base_url().'index.php/admin/backup_restore/' , 'refresh');\n\t\t}\n\t\t\n\t\t$page_data['page_info']\t=\t'Create backup / restore from backup';\n\t\t$page_data['page_name']\t=\t'admin/backup_restore';\n\t\t$page_data['page_title']=\t'Create backup / restore from backup';\n\t\t$this->load->view('index' , $page_data);\n\t}", "public function backup_tables($host,$user,$pass,$name,$tables = '*')\n {\n\n $link = mysql_connect($host,$user,$pass);\n mysql_select_db($name,$link);\n\n //get all of the tables\n if($tables == '*')\n {\n $tables = array();\n $result = mysql_query('SHOW TABLES');\n while($row = mysql_fetch_row($result))\n {\n $tables[] = $row[0];\n }\n }\n else\n {\n $tables = is_array($tables) ? $tables : explode(',',$tables);\n }\n\n //cycle through\n foreach($tables as $table)\n {\n $result = mysql_query('SELECT * FROM '.$table);\n $num_fields = mysql_num_fields($result);\n\n $return.= 'DROP TABLE '.$table.';';\n $row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\n $return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\n for ($i = 0; $i < $num_fields; $i++) \n {\n while($row = mysql_fetch_row($result))\n {\n $return.= 'INSERT INTO '.$table.' VALUES(';\n for($j=0; $j<$num_fields; $j++) \n {\n $row[$j] = addslashes($row[$j]);\n $row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n if (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n if ($j<($num_fields-1)) { $return.= ','; }\n }\n $return.= \");\\n\";\n }\n }\n $return.=\"\\n\\n\\n\";\n }\n\n //save file\n $handle = fopen('db-backup-'.time().'-'.(md5(implode(',',$tables))).'.sql','w+');\n fwrite($handle,$return);\n fclose($handle);\n }", "function createNewArchive($archiveName){\n$mysqli = new mysqli(HOST , USER , PASSWORD , DB_NAME) ;\nif (mysqli_connect_errno())\n{\n printf(\"Connect failed: %s\", mysqli_connect_error());\n exit();\n}\n // Introduction information\n \n$return = \"--\\n\";\n$return .= \"-- A Mysql Backup System \\n\";\n$return .= \"--\\n\";\n$return .= '-- Export created: ' . date(\"Y/m/d\") . ' on ' . date(\"h:i\") . \"\\n\\n\\n\";\n$return .= \"--\\n\";\n$return .= \"-- Database : \" . DB_NAME . \"\\n\";\n$return .= \"--\\n\";\n$return .= \"-- --------------------------------------------------\\n\";\n$return .= \"-- ---------------------------------------------------\\n\";\n$return .= 'SET AUTOCOMMIT = 0 ;' .\"\\n\" ;\n$return .= 'SET FOREIGN_KEY_CHECKS=0 ;' .\"\\n\" ;\n$tables = array() ;\n// Exploring what tables this database has\n$result = $mysqli->query('SHOW TABLES' ) ;\n// Cycle through \"$result\" and put content into an array\nwhile ($row = $result->fetch_row())\n{\n$tables[] = $row[0] ;\n}\n// Cycle through each table\n foreach($tables as $table)\n {\n// Get content of each table\n$result = $mysqli->query('SELECT * FROM '. $table) ;\n// Get number of fields (columns) of each table\n$num_fields = $mysqli->field_count ;\n// Add table information\n$return .= \"--\\n\" ;\n$return .= '-- Tabel structure for table `' . $table . '`' . \"\\n\" ;\n$return .= \"--\\n\" ;\n$return.= 'DROP TABLE IF EXISTS `'.$table.'`;' . \"\\n\" ;\n// Get the table-shema\n$shema = $mysqli->query('SHOW CREATE TABLE '.$table) ;\n// Extract table shema\n$tableshema = $shema->fetch_row() ;\n// Append table-shema into code\n$return.= $tableshema[1].\";\" . \"\\n\\n\" ;\n// Cycle through each table-row\nwhile($rowdata = $result->fetch_row())\n{\n// Prepare code that will insert data into table\n$return .= 'INSERT INTO `'.$table .'` VALUES ( ' ;\n// Extract data of each row\nfor($i=0; $i<$num_fields; $i++)\n{\n$return .= '\"'.$rowdata[$i] . \"\\\",\" ;\n }\n // Let's remove the last comma\n $return = substr(\"$return\", 0, -1) ;\n $return .= \");\" .\"\\n\" ;\n }\n $return .= \"\\n\\n\" ;\n}\n// Close the connection\n$mysqli->close() ;\n$return .= 'SET FOREIGN_KEY_CHECKS = 1 ; ' . \"\\n\" ;\n$return .= 'COMMIT ; ' . \"\\n\" ;\n$return .= 'SET AUTOCOMMIT = 1 ; ' . \"\\n\" ;\n//$file = file_put_contents($archiveName , $return) ;\n$zip = new ZipArchive() ;\n$resOpen = $zip->open(BACKUP_DIR . '/' .$archiveName.\".zip\" , ZIPARCHIVE::CREATE) ;\nif( $resOpen ){\n$zip->addFromString( $archiveName , \"$return\" ) ;\n }\n$zip->close() ;\n$fileSize = getFileSizeUnit(filesize(BACKUP_DIR . \"/\". $archiveName . '.zip')) ;\n$message = <<<msg\n <h2>BACKUP completed ,</h2><br>\n the archive has the name of : <b> $archiveName </b> and it's file-size is : $fileSize .\n \n This zip archive can't be accessed via a web browser , as it's stored into a protected directory .\n \n It's highly recomended to transfer this backup to another filesystem , use your favorite FTP client to download the archieve .\nmsg;\necho $message ;\n}", "public function createAction() {\n // Since version 0.3.9 we'll check for array of file stacks if filesystem backup is required\n\n $request = reqBup::get('post');\n $response = new responseBup();\n\n $filename = $this->getModel()->generateFilename(array('zip', 'sql', 'txt'));\n\n /** @var backupLogModelBup $log */\n $log = $this->getModel('backupLog');\n $cloud = array();\n\n if ($this->getModel()->isFilesystemRequired()) {\n\n if (!isset($request['complete'])) {\n\n $files = $this->getModel()->getFilesList();\n $log->string(sprintf('%s files scanned.', count($files)));\n\n $log->string('Clear out old temporary files');\n if (file_exists($file = sys_get_temp_dir() . '/stacks.dat')) {\n if (unlink($file)) {\n $log->string(sprintf('%s successfully deleted', basename($file)));\n } else {\n $log->string(sprintf('Cannot delete file %s. If you notice a problem with archives - delete the file manually', $file));\n }\n }\n\n foreach (glob(sys_get_temp_dir() . '/*') as $tmp) {\n if (substr(basename($tmp), 0, 3) === 'BUP') {\n if (unlink($tmp)) {\n $log->string(sprintf('%s successfully deleted', $tmp));\n } else {\n $log->string(sprintf('Cannot delete file %s', $tmp));\n }\n }\n }\n\n // Defined in ./config.php\n if (!defined('BUP_FILES_PER_STACK')) {\n define('BUP_FILES_PER_STACK', 500);\n }\n\n $response->addData(array(\n 'files' => $files,\n 'per_stack' => BUP_FILES_PER_STACK,\n ));\n\n $log->string('Send request to generate temporary file stacks');\n\n return $response->ajaxExec();\n }\n\n $log->string(sprintf('Create a backup of the file system: %s', $filename['zip']));\n $this->getModel()->getFilesystem()->create($filename['zip']);\n $cloud[] = $filename['zip'];\n }\n\n if ($this->getModel()->isDatabaseRequired()) {\n $log->string(sprintf('Create a backup of the database: %s', $filename['sql']));\n $this->getModel()->getDatabase()->create($filename['sql']);\n $cloud[] = $filename['sql'];\n }\n\n $log->string('Backup complete');\n\n $destination = $this->getModel()->getConfig('dest');\n\t\t$handlers = $this->getModel()->getDestinationHandlers();\n\n\t\tif (array_key_exists($destination, $handlers)) {\n\n $cloud = array_map('basename', $cloud);\n\n $log->string(sprintf('Upload to the <%s> required', ucfirst($destination)));\n $log->string(sprintf('Files to upload: %s', rtrim(implode(', ', $cloud), ', ')));\n\t\t\t$handler = $handlers[$destination];\n\t\t\t$result = call_user_func_array($handler, array($cloud));\n\t\t\tif ($result === true || $result == 200 || $result == 201) {\n\t\t\t\t$log->string(sprintf('Successfully uploaded to the <%s>', ucfirst($destination)));\n\t\t\t} else {\n $log->string(sprintf('Cannot upload to the <%s>: %s', ucfirst($destination), (is_array($result) ? print_r($result, true) : $result)));\n }\n\t\t}\n\n $log->save($filename['txt']);\n $response->addMessage(langBup::_('Backup complete'));\n\n $log->clear();\n\n return $response->ajaxExec();\n\t}", "public function backupWallet($destination);", "function wps3backup_make_backup($backupDir, $backupFiles, $backupDatabase) {\n $filename = $backupDir . DIRECTORY_SEPARATOR . WPS3BACKUP_LATEST_BACKUP_NAME;\n\n if (file_exists($filename)) {\n unlink($filename);\n }\n\n $archive = new ZipArchive();\n $archive->open($filename, ZipArchive::CREATE);\n\n $rootPath = wps3backup_get_root_path(__DIR__);\n\n if (!$rootPath) {\n throw new RuntimeException('Unable to find site root path');\n }\n\n if ($backupFiles) {\n $archive = wps3backup_fill_archive($rootPath, $archive, $rootPath . DIRECTORY_SEPARATOR);\n }\n\n if ($backupDatabase) {\n require 'vendor/autoload.php';\n \n $dumper = new \\Ifsnop\\Mysqldump\\Mysqldump(\n sprintf(\n 'mysql:host=%s;dbname=%s',\n DB_HOST,\n DB_NAME\n ),\n DB_USER,\n DB_PASSWORD\n );\n\n $dumper->start($backupDir . DIRECTORY_SEPARATOR . WPS3BACKUP_DUMP_NAME);\n $archive->addFile($backupDir . DIRECTORY_SEPARATOR . WPS3BACKUP_DUMP_NAME, WPS3BACKUP_DUMP_NAME);\n }\n\n $archive->close();\n\n // delete dump file only after archive was closed\n if ($backupDatabase) {\n unlink($backupDir . DIRECTORY_SEPARATOR . WPS3BACKUP_DUMP_NAME);\n }\n}", "function backup_tables($host, $user, $pass, $name, $tables = '*')\n {\n $link = mysqli_connect($host, $user, $pass, $name);\n //mysql_select_db($name, $link);\n mysqli_query($link, \"SET NAMES 'utf8'\");\n\n //get all of the tables\n if($tables == '*') {\n $tables = array();\n $result = mysqli_query($link, 'SHOW TABLES');\n while ($row = mysqli_fetch_row($result)) {\n $tables[] = $row[0];\n }\n }\n else {\n $tables = is_array($tables) ? $tables : explode(',', $tables);\n }\n $return = '';\n\n //cycle through\n foreach ($tables as $table) {\n $result = mysqli_query($link, 'SELECT * FROM ' . $table);\n $num_fields = mysqli_num_fields($result);\n\n $return .= 'DROP TABLE ' . $table . ';';\n $row2 = mysqli_fetch_row(mysqli_query($link, 'SHOW CREATE TABLE ' . $table));\n $return .= \"\\n\\n\" . $row2[1] . \";\\n\\n\";\n\n for ($i = 0; $i < $num_fields; $i++) {\n while ($row = mysqli_fetch_row($result)) {\n $return .= 'INSERT INTO ' . $table . ' VALUES(';\n for ($j = 0; $j < $num_fields; $j++) {\n $row[$j] = addslashes($row[$j]);\n $row[$j] = str_replace(\"\\n\", \"\\\\n\", $row[$j]);\n if(isset($row[$j])) {\n $return .= '\"' . $row[$j] . '\"';\n }\n else {\n $return .= '\"\"';\n }\n if($j < ($num_fields - 1)) {\n $return .= ',';\n }\n }\n $return .= \");\\n\";\n }\n }\n $return .= \"\\n\\n\\n\";\n }\n\n //save file\n $fileName = 'db-backup-' . date('d-m-Y') . '.sql';\n $handle = fopen(storage_path('app/' . $fileName), 'w+');\n fwrite($handle, $return);\n fclose($handle);\n\n $this->emailDatabase($fileName);\n\n if($this->deleteBackupFile) {\n unlink(storage_path('app/' . $fileName));\n }\n\n }", "public function createBackup() {\n $dbType = config('database.default');\n $info = config('database.connections.' . $dbType);\n $hostname = escapeshellcmd($info['host']);\n $user = escapeshellcmd($info['username']);\n $password = $info['password'];\n $database = escapeshellcmd($info['database']);\n\n $date = Carbon::now()->toDateString();\n $exportPath = 'backups/' . $database . '-' . $date . '.sql';\n $command = \"mysqldump --no-tablespaces --host=$hostname --user=$user --password='$password' $database --result-file='~/$exportPath' 2>&1\";\n\n exec($command, $output, $error);\n\n return response()->json(['msg' => $output], $error ? 500 : 200);\n }", "public function backup($filepath = null)\r\n\t\t{\r\n\t\t\t//check out the last post on this site for inspiration\r\n\t\t\t//http://stackoverflow.com/questions/18279066/pdo-mysql-backups-function\r\n\t\t\t\r\n\t\t\t//I should simply record data and not table structure information!\r\n\r\n\t\t\t$tablesArray = array();\r\n\r\n\t\t\t//let the server prepare, execute and check for errors\r\n\t\t\t$this->_query = $this->_prepare(\"SELECT `TABLE_NAME` FROM `information_schema`.`TABLES` WHERE `TABLE_TYPE` = 'BASE TABLE' AND `TABLE_SCHEMA` = '{$this->_dbName}'\");\r\n\t\t\t$this->_execute($this->_query);\r\n\t\t\t$this->_errors($this->_query);\r\n\r\n\t\t\twhile($table = $this->fetch()){\r\n\t\t\t\tif($table['TABLE_NAME'] != \"{$this->_prefix}primrix_backup\"){\r\n\t\t\t\t\t$tablesArray[] = str_replace($this->_prefix, '', $table['TABLE_NAME']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->close();\r\n\t\t\t//\\Help::pre($tablesArray);\r\n\r\n\t\t\t$sql = \"\";\r\n\r\n\t\t\tforeach($tablesArray as $table){\r\n\t\t\t\t\r\n\t\t\t\t$columns = array();\r\n\t\t\t\t$columns = $this->getColumnNames($table);\r\n\r\n\t\t\t\t$insertInto = \"INSERT INTO `{$this->_prefix}{$table}`\";\r\n\t\t\t\t$insertColumns = \"\";\r\n\t\t\t\t$insertValues = \"\";\r\n\r\n\t\t\t\tforeach($columns as $col){\r\n\t\t\t\t\t$insertColumns .= \"`{$col}`, \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$insertColumns = Text::groom(', ', $insertColumns);\r\n\r\n\t\t\t\t$this->query($table);\r\n\t\t\t\t$totalRows = $this->numRows();\r\n\t\t\t\twhile($row = $this->fetch()){\r\n\t\t\t\t\t$insertValues .= \"(\";\r\n\t\t\t\t\tforeach($columns as $col){\r\n\t\t\t\t\t\t$insertValues .= \"'\" . addcslashes($row[$col], \"\\n\\r\") . \"', \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$insertValues = Text::groom(', ', $insertValues);\r\n\t\t\t\t\t$insertValues .= \"),\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif($totalRows > 0){\r\n\t\t\t\t\t$insertValues = Text::groom(', ', $insertValues);\r\n\t\t\t\t\t$insertValues .= \";\";\r\n\r\n\t\t\t\t\t$sql .= $insertInto . \"(\" . $insertColumns . \")\\n\";\r\n\t\t\t\t\t$sql .= \"VALUES \\n\";\r\n\t\t\t\t\t$sql .= $insertValues . \"\\n\\n\";\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif($filepath == null) return $sql;\r\n\t\t\telse {\r\n\t\t\t\t//check that the file doesn't already exist\r\n\t\t\t\t//for some reason and unlink it if it does\r\n\t\t\t\tFile::delete($filepath);\r\n\r\n\t\t\t\t//create file\r\n\t\t\t\t$fh = fopen($filepath, 'x');\r\n\r\n\t\t\t\t//add sql to file\r\n\t\t\t\tfile_put_contents($filepath, $sql);\r\n\r\n\t\t\t\t//close file\r\n\t\t\t\tfclose($fh);\r\n\t\t\t}\r\n\t\r\n\t\t}", "function mysqlbackup($host,$dbname, $uid, $pwd, $structure_only, $crlf) { \n \n $con=@mysql_connect(\"localhost\",$uid, $pwd) or die(\"Could not connect\"); \n $db=@mysql_select_db($dbname,$con) or die(\"Could not select db\");\n\n // here we check MySQL Version\n $result=@mysql_query(\"SELECT VERSION() AS version\"); \n if ($result != FALSE && @mysql_num_rows($result) > 0) {\n $row = @mysql_fetch_array($result);\n $match = explode('.', $row['version']);\n } else {\n $result=@mysql_query(\"SHOW VARIABLES LIKE \\'version\\'\"); \n if ($result != FALSE && @mysql_num_rows($result) > 0){\n $row = @mysql_fetch_row($result);\n $match = explode('.', $row[1]);\n }\n }\n\n if (!isset($match) || !isset($match[0])) {\n $match[0] = 3;\n }\n if (!isset($match[1])) {\n $match[1] = 21;\n }\n if (!isset($match[2])) {\n $match[2] = 0;\n }\n if(!isset($row)) {\n $row = '3.21.0';\n }\n\n define('MYSQL_INT_VERSION', (int)sprintf('%d%02d%02d', $match[0], $match[1], intval($match[2])));\n define('MYSQL_STR_VERSION', $row['version']);\n unset($match);\n\n $sql = \"# MySQL dump by phpMyDump\".$crlf;\n $sql.= \"# Host: $host Database: $dbname\".$crlf;\n $sql.= \"# ----------------------------\".$crlf;\n $sql.= \"# Server version: \".MYSQL_STR_VERSION.$crlf;\n\n $sql.= $crlf.$crlf.$crlf; \n out(1,$sql);\n $res=@mysql_list_tables($dbname); \n $nt=@mysql_num_rows($res); \n\n for ($a=0;$a<$nt;$a++) { \n $row=mysql_fetch_row($res); \n $tablename=$row[0];\n\n $sql=$crlf.\"# ----------------------------------------\".$crlf.\"# table structure for table '$tablename' \".$crlf;\n // For MySQL < 3.23.20 \n echo \"DROP TABLE IF EXISTS `$tablename`;\";\n if (MYSQL_INT_VERSION >= 32321) {\n $result=mysql_query(\"SHOW CREATE TABLE $tablename\");\n if ($result != FALSE && mysql_num_rows($result) > 0) {\n $tmpres = mysql_fetch_array($result);\n $pos = strpos($tmpres[1], ' (');\n $tmpres[1] = substr($tmpres[1], 0, 13)\n . $tmpres[0]\n . substr($tmpres[1], $pos);\n\t\t\t\t \n $sql .= $tmpres[1].\";\".$crlf.$crlf;\n }\n mysql_free_result($result);\n } else { \n $sql.=\"CREATE TABLE $tablename(\".$crlf; \n $result=mysql_query(\"show fields from $tablename\",$con); \n\n while ($row = mysql_fetch_array($result)) {\n $sql .= \" \".$row['Field'];\n $sql .= ' ' . $row['Type'];\n if (isset($row['Default']) && $row['Default'] != '') {\n $sql .= ' DEFAULT \\'' . $row['Default'] . '\\'';\n }\n if ($row['Null'] != 'YES') {\n $sql .= ' NOT NULL';\n }\n if ($row['Extra'] != '') {\n $sql .= ' ' . $row['Extra'];\n }\n $sql .= \",\".$crlf;\n }\n \n mysql_free_result($result);\n $sql = ereg_replace(',' . $crlf . '$', '', $sql);\n \n $result = mysql_query(\"SHOW KEYS FROM $tablename\");\n while ($row = mysql_fetch_array($result)) {\n $ISkeyname = $row['Key_name'];\n $IScomment = (isset($row['Comment'])) ? $row['Comment'] : '';\n $ISsub_part = (isset($row['Sub_part'])) ? $row['Sub_part'] : '';\n if ($ISkeyname != 'PRIMARY' && $row['Non_unique'] == 0) {\n $ISkeyname = \"UNIQUE|$kname\";\n }\n if ($IScomment == 'FULLTEXT') {\n $ISkeyname = 'FULLTEXT|$kname';\n }\n if (!isset($index[$ISkeyname])) {\n $index[$ISkeyname] = array();\n }\n if ($ISsub_part > 1) {\n $index[$ISkeyname][] = $row['Column_name'] . '(' . $ISsub_part . ')';\n } else {\n $index[$ISkeyname][] = $row['Column_name'];\n }\n } \n mysql_free_result($result);\n \n while (list($x, $columns) = @each($index)) {\n $sql .= \",\".$crlf;\n if ($x == 'PRIMARY') {\n $sql .= ' PRIMARY KEY (';\n } else if (substr($x, 0, 6) == 'UNIQUE') {\n $sql .= ' UNIQUE ' . substr($x, 7) . ' (';\n } else if (substr($x, 0, 8) == 'FULLTEXT') {\n $sql .= ' FULLTEXT ' . substr($x, 9) . ' (';\n } else {\n $sql .= ' KEY ' . $x . ' (';\n }\n $sql .= implode($columns, ', ') . ')';\n } \n $sql .= $crlf.\");\".$crlf.$crlf;\n \n } \n out(1,$sql);\n if ($structure_only == FALSE) {\n // here we get table content\n $result = mysql_query(\"SELECT * FROM $tablename\");\n $fields_cnt = mysql_num_fields($result);\n while ($row = mysql_fetch_row($result)) {\n $table_list = '(';\n for ($j = 0; $j < $fields_cnt; $j++) {\n $table_list .= mysql_field_name($result, $j) . ', ';\n }\n $table_list = substr($table_list, 0, -2);\n $table_list .= ')';\n\n $sql = 'INSERT INTO ' . $tablename \n . ' VALUES (';\n for ($j = 0; $j < $fields_cnt; $j++) {\n if (!isset($row[$j])) {\n $sql .= ' NULL, ';\n } else if ($row[$j] == '0' || $row[$j] != '') {\n $type = mysql_field_type($result, $j);\n // a number\n if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' ||\n $type == 'bigint' ||$type == 'timestamp') {\n $sql .= $row[$j] . ', ';\n }\n // a string\n else {\n $dummy = '';\n $srcstr = $row[$j];\n for ($xx = 0; $xx < strlen($srcstr); $xx++) {\n $yy = strlen($dummy);\n if ($srcstr[$xx] == '\\\\') $dummy .= '\\\\\\\\';\n if ($srcstr[$xx] == '\\'') $dummy .= '\\\\\\'';\n if ($srcstr[$xx] == \"\\x00\") $dummy .= '\\0';\n if ($srcstr[$xx] == \"\\x0a\") $dummy .= '\\n';\n if ($srcstr[$xx] == \"\\x0d\") $dummy .= '\\r';\n if ($srcstr[$xx] == \"\\x1a\") $dummy .= '\\Z';\n if (strlen($dummy) == $yy) $dummy .= $srcstr[$xx];\n }\n $sql .= \"'\" . $dummy . \"', \";\n }\n } else {\n $sql .= \"'', \";\n } // end if\n } // end for\n $sql = ereg_replace(', $', '', $sql);\n $sql .= \");\".$crlf;\n out(1,$sql); \n\n } \n mysql_free_result($result);\n } \n }\n return; \n}", "function delete_backup()\n {\n $this->backup->delete_backup($this->uri->segment(4));\n redirectPrev('', 'backup');\n }", "function backup_tables($host,$user,$pass,$name,$tables = '*')\n{\n\n include_once '../Model/Access_DB.php';\n $mysqli = ConnectDB();\n\n //si se quieren todas las tablas se guardan en un array\n if($tables == '*')\n {\n $tables = array();\n $result = $mysqli->query('SHOW TABLES');\n while($row = mysqli_fetch_row($result))\n {\n $tables[] = $row[0];\n }\n }\n //si no se guardan solo las tablas necesarias\n else\n {\n $tables = is_array($tables) ? $tables : explode(',',$tables);\n }\n\n $return=\"\"; //string donde se guarda el script\n //cycle through\n\n //para cada tabla que se quiera guardar\n foreach($tables as $table)\n {\n\n $result = $mysqli->query('SELECT * FROM '.$table); //se escogen todos los datos\n $num_fields = mysqli_num_fields($result); //se cuentan el numero de campos\n\n $return.= 'DROP TABLE '.$table.';'; //se concatena DROP TABLE\n $row2 = mysqli_fetch_row($mysqli->query('SHOW CREATE TABLE '.$table));\n $return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\n for ($i = 0; $i < $num_fields; $i++) //para cada campo se guarda la informacion del campo\n {\n while($row = mysqli_fetch_row($result)) //mientras haya mas filas se añaden al script\n {\n $return.= 'INSERT INTO '.$table.' VALUES('; //los valores de las filas\n for($j=0; $j < $num_fields; $j++)\n {\n $row[$j] = addslashes($row[$j]);\n //$row[$j] = preg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n if (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n if ($j < ($num_fields-1)) { $return.= ','; }\n }\n $return.= \");\\n\";\n }\n }\n $return.=\"\\n\\n\\n\";\n }\n\n $handle = fopen('IU2018backup.sql','w+'); //escogemos el fichero en el que se quiere guardar el script y le damos permisos\n fwrite($handle,$return); //se escribe el fichero\n fclose($handle); //se cierra el fichero\n}", "function _terminatur_data_make_backup($site) {\n $backup_complete = FALSE;\n $backup_started = time();\n $current_backup = terminus_latest_bucket($site['uuid'], $site['env'], 'database');\n terminus_api_site_make_backup($site['uuid'], $site['env'], 'backup', FALSE, TRUE, FALSE);\n // @todo Check for Terminus API failure.\n // Terminus API just queues the backup, so wait around till it's done.\n while (!$backup_complete) {\n drush_log(dt('Creating database backup...'), 'warning');\n sleep(5);\n // Check if backup finished.\n $latest_backup = terminus_latest_bucket($site['uuid'], $site['env'], 'database');\n if ($latest_backup != $current_backup) {\n $backup_complete = TRUE;\n $current_backup = $latest_backup;\n }\n // Error out if the backup has taken too long.\n elseif ((time() - $backup_started) > TERMINATUR_DB_BACKUP_TIMEOUT) {\n return FALSE;\n }\n }\n drush_log(dt('Database backup complete!'), 'success');\n return $current_backup;\n}", "function restore_backup()\n {\n move_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/backup.sql');\n $this->load->dbutil();\n\n\n $prefs = array(\n 'filepath' => 'uploads/backup.sql',\n 'delete_after_upload' => TRUE,\n 'delimiter' => ';'\n );\n $restore = & $this->dbutil->restore($prefs);\n unlink($prefs['filepath']);\n }", "function backup ($datos){\n //verificamos si la asignacion ya existe\n //if(!$this->existe($datos)){\n //persistir en asignacion, asignacion_definitiva y asignacion_periodo\n //hay que inferir a que cuatrimestre pertenece la asignacion\n \n \n $datos['nro_doc']=$this->s__nro_doc;\n $datos['tipo_doc']=$this->s__tipo_doc; \n $this->dep('datos')->tabla('asignacion')->nueva_fila($datos);\n $this->dep('datos')->tabla('asignacion')->sincronizar();\n $this->dep('datos')->tabla('asignacion')->resetear();\n $cuatrimestre=$this->obtener_cuatrimestre();\n $fecha= getdate();\n $dato=array(\n \n 'cuatrimestre' => $cuatrimestre,\n 'anio' => $fecha['year'],\n \n );\n $secuencia=recuperar_secuencia('asignacion_id_asignacion_seq');\n if(strcmp($this->s__tipo, 'Definitiva')==0){\n $dato['id_asignacion']=$secuencia;\n $dato['nombre'] = $this->s__dia;\n $this->dep('datos')->tabla('asignacion_definitiva')->nueva_fila($dato);\n $this->dep('datos')->tabla('asignacion_definitiva')->sincronizar();\n $this->dep('datos')->tabla('asignacion_definitiva')->resetear();\n }\n else{ \n $periodo=array(\n 'id_asignacion' => $secuencia,\n 'fecha_inicio' => $datos['fecha_inicio'],\n 'fecha_fin' => $datos['fecha_fin']\n );\n $this->dep('datos')->tabla('asignacion_periodo')->nueva_fila($periodo);\n $this->dep('datos')->tabla('asignacion_periodo')->sincronizar();\n $this->dep('datos')->tabla('asignacion_periodo')->resetear();\n //en esta seccion se guarda informacion en la relacion esta_formada\n $dias=$datos['dias'];\n foreach ($dias as $dia){\n $dato['nombre']=$dia;\n $dato['id_asignacion']=$secuencia;\n $this->dep('datos')->tabla('esta_formada')->nueva_fila($dato);\n $this->dep('datos')->tabla('esta_formada')->sincronizar();\n $this->dep('datos')->tabla('esta_formada')->resetear();\n }\n }\n// }\n// else{\n// toba::notificacion()->agregar(\"No es posible registrar la asignación porque ya existe\", 'error');\n// }\n }", "public function backupDatabase() {\r\n $this->sqlBackupFilename = 'database_' . date('YmdHis') . '_' . MD5(microtime()) . '.sql';\r\n\r\n // setup the sql backup path\r\n $sqlBackupFilePath = $this->getBackupPath() . '/' . $this->sqlBackupFilename;\r\n\r\n // setup the options\r\n $dumpSettings = array(\r\n 'add-drop-table' => true,\r\n 'exclude-table-data' => $this->skipDatabaseTableData,\r\n );\r\n\r\n // dump the database\r\n $dump = new Mysqldump('mysql:host=' . _CONFIG_DB_HOST . ';dbname=' . _CONFIG_DB_NAME, _CONFIG_DB_USER, _CONFIG_DB_PASS, $dumpSettings);\r\n $dump->start($sqlBackupFilePath);\r\n\r\n return file_exists($sqlBackupFilePath);\r\n }", "function wps3backup_backup_handler() {\n check_ajax_referer('wps3backup_controls');\n\n if (empty($_POST['backup_dir'])) {\n wp_send_json_error('Empty backup directory');\n }\n\n if (empty($_POST['backup_files']) && empty($_POST['backup_database'])) {\n wp_send_json_error('Empty backup options');\n }\n\n $backupDir = realpath($_POST['backup_dir']);\n\n if (!$backupDir) {\n wp_send_json_error('Backup directory does not exist');\n }\n\n if (!is_writable($backupDir)) {\n wp_send_json_error('Backup directory is not writable');\n }\n\n try {\n wps3backup_make_backup($backupDir, $_POST['backup_files'], $_POST['backup_database']);\n } catch (Exception $e) {\n wp_send_json_error($e->getMessage());\n }\n\n if (file_exists($backupDir . DIRECTORY_SEPARATOR . WPS3BACKUP_LATEST_BACKUP_NAME)) {\n wp_send_json_success(\n sprintf(\n 'Successfully created backup for your site! See \"%s\" in your backup directory',\n WPS3BACKUP_LATEST_BACKUP_NAME\n )\n );\n } else {\n wp_send_json_error(\n sprintf(\n 'Failed to create backup for your site. Can\\'t find \"%s\" in your backup directory',\n WPS3BACKUP_LATEST_BACKUP_NAME\n )\n );\n }\n}", "private function descargarBackup($sql)\n\t{\n\t\theader(\"Pragma: public\");\n\t\theader(\"Expires: 0\"); // set expiration time\n\t\theader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n\t\t// browser must download file from server instead of cache\n\n\t\t// force download dialog\n\t\theader(\"Content-Type: application/force-download\");\n\t\theader(\"Content-Type: application/octet-stream\");\n\t\theader(\"Content-Type: application/download\");\n\n\t\t// use the Content-Disposition header to supply a recommended filename and\n\t\t// force the browser to display the save dialog.\n\t\theader(\"Content-Disposition: attachment; filename=resc_\".date(\"d-m-Y\").\".sql;\");\n\n\t\t/*\n\t\tThe Content-transfer-encoding header should be binary, since the file will be read\n\t\tdirectly from the disk and the raw bytes passed to the downloading computer.\n\t\tThe Content-length header is useful to set for downloads. The browser will be able to\n\t\tshow a progress meter as a file downloads. The content-lenght can be determines by\n\t\tfilesize function returns the size of a file.\n\t\t*/\n\t\theader(\"Content-Transfer-Encoding: binary\");\n\t\t//header(\"Content-Length: \".filesize($filename));\n\t\techo $sql;\n\t}", "public function showBackupPage() {\n echo '<div class=\"wrap\">';\n echo '<h2>' . self::NAME . ' v ' . self::VERSION . '</h2>';\n\n if ($this->getNonce()) {\n if (isset($_GET['kickoff'])) {\n $this->renderRefresh(\n $this->initArchiving()\n );\n } elseif (isset($_GET['holding'])) {\n $this->renderRefresh(\n false,\n $this->resumeArchiving()\n );\n }\n } else {\n echo '<hr>';\n echo '<p>When you click the button below, Wordpress will create a zip archive of your content directory (in <code>' . $this->content_dir . '</code>) and a SQL export of your database.</p>';\n echo '<p>You can then import said archive into an <a target=\"_blank\" href=\"https://github.com/evolution/wordpress\">Evolution Wordpress</a> site.</p>';\n echo '<form action=\"\" method=\"get\">';\n wp_nonce_field(__CLASS__, __CLASS__.'_nonce', true);\n echo '<input type=\"hidden\" name=\"page\" value=\"' . __CLASS__ . '_opt_menu\">';\n echo '<input type=\"submit\" name=\"kickoff\" value=\"Create Archive\" class=\"button button-primary\">';\n echo '</form>';\n }\n\n echo '</div>';\n }", "protected function backupSqlDatabase() : array \n {\n global $config;\n global $server;\n global $database;\n \n $response = array(\n 'success' => true,\n );\n\n $currTime = new DelayTime();\n $archiveData = array();\n $archiveData['archive_id'] = 0;\n $archiveData['server_name'] = ServerFile::generateFilename($config['logs_dir']);\n $archiveData['notes'] = ''; \n $archiveData['mime_type'] = 'application/sql';\n $archiveData['timestamp'] = $currTime->getTime();\n $archiveData['content_tz'] = 'UTC';\n\n $filePath = $server['host_address'].$config['logs_dir'].'/'.$archiveData['server_name'];\n\n $command = 'mysqldump --no-tablespaces'. \n ' --host=\\''.$database['db_host'].'\\''.\n ' --user=\\''.$database['db_user'].'\\''.\n ' --password=\\''.$database['db_pass'].'\\''.\n ' \\''.$database['db_name'].'\\''.\n ' > '.$filePath;\n $startTime = microtime(true);\n exec($command, $output, $worked);\n $response['time'] = microtime(true) - $startTime;\n\n if($worked == 0)\n {\n // Add file notes including size and MD5\n $missionCfg = MissionConfig::getInstance();\n $archiveData['notes'] = 'Mission: '.$missionCfg->name.'<br/>'. \n 'Archive Timezone: UTC<br/>'. \n 'Size: '.ServerFile::getHumanReadableSize(filesize($filePath)).'<br/>'. \n 'MD5: '.md5_file($filePath);\n\n $archiveDao = ArchiveDao::getInstance();\n $result = $archiveDao->insert($archiveData);\n \n if($result === false)\n {\n unlink($filePath);\n Logger::warning('admin::backupSqlDatabase failed to add archive to database.');\n $response['success'] = false;\n $response['error'] = 'Failed to create archive. See system log for details.';\n }\n }\n else\n {\n Logger::warning('admin::backupSqlDatabase failed to create \"'.$archiveData['server_name'].'\"', \n array('output'=>$output, 'worked'=>$worked));\n unlink($filePath); \n $response['success'] = false;\n $response['error'] = 'Failed to create archive. See system log for details.';\n }\n\n Logger::info('admin::backupSqlDatabase finished for \"'. $archiveData['server_name'].\n '\" in '.$response['time'].' sec. ('.$result.')');\n\n return $response;\n }", "function index()\n\t{\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(4, array('action'));\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\n\t\t$data['userdetails'] = $this->session->userdata('alluserdata');\n\t\t$this->load->view('settings/backupform_view', $data);\n\t}", "function restore_backup()\n\t{\n\t\tmove_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/backup.sql');\n\t\t$this->load->dbutil();\n\t\t\n\t\t\n\t\t$prefs = array(\n 'filepath'\t\t\t\t\t\t=> 'uploads/backup.sql',\n\t\t\t'delete_after_upload'\t\t\t=> TRUE,\n\t\t\t'delimiter'\t\t\t\t\t\t=> ';'\n );\n\t\t$restore =& $this->dbutil->restore($prefs); \n\t\tunlink($prefs['filepath']);\n\t}", "function restore_backup()\n\t{\n\t\tmove_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/backup.sql');\n\t\t$this->load->dbutil();\n\t\t\n\t\t\n\t\t$prefs = array(\n 'filepath'\t\t\t\t\t\t=> 'uploads/backup.sql',\n\t\t\t'delete_after_upload'\t\t\t=> TRUE,\n\t\t\t'delimiter'\t\t\t\t\t\t=> ';'\n );\n\t\t$restore =& $this->dbutil->restore($prefs); \n\t\tunlink($prefs['filepath']);\n\t}", "function db_backup($DBUSER,$DBPASSWD,$DATABASE,$DBFilename)\n{\n $cmd = \"mysqldump -u $DBUSER --password=$DBPASSWD $DATABASE | gzip --best > $DBFilename\";\n passthru($cmd);\n}", "public function backup($type, $mod_name) {\r\r\n\t\t\r\r\n\t\tswitch ($type) {\r\r\n\t\t\tcase 'module':\r\r\n\t\t\t\t$table = DB_PREFIX.'rgen_modules';\r\r\n\t\t\t\t$table_theme = DB_PREFIX.'rgen_modules_customize';\r\r\n\t\t\t\t$table_layout = DB_PREFIX.'layout_module';\r\r\n\t\t\t\t$table_setting = DB_PREFIX.'setting';\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t$output = '';\r\r\n\t\t\t\t\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- Module - \" . $mod_name . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Module data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table. \"` WHERE `section` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"DELETE FROM `\" .$table. \"` WHERE `section` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Theme data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_theme. \"` WHERE `key` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_theme. \"` WHERE `key` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_theme);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Layout data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_layout. \"` WHERE `code` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('layout_id', 'code', 'position', 'sort_order');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_layout. \"` WHERE `code` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (isset($query->rows) && sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_layout);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t/*======================*/\r\r\n\t\t\t\t// Settings data\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM `\" .$table_setting. \"` WHERE `code` LIKE '%\".$mod_name.\"%'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'code', 'key', 'value', 'serialized');\r\r\n\t\t\t\t$output .= \"\\n\\n\".\"DELETE FROM `\" .$table_setting. \"` WHERE `code` LIKE '%\" .$mod_name. \"%';\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (isset($query->rows) && sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_setting);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\t\r\r\n\t\t\t\treturn $output;\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'theme':\r\r\n\t\t\t\t$table = DB_PREFIX.'rgen_theme';\r\r\n\t\t\t\t$table_setting = DB_PREFIX.'rgen_settings';\r\r\n\r\r\n\t\t\t\t$output = '';\r\r\n\t\t\t\t\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- R.Gen theme setting\" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- \" . \"\\n\";\r\r\n\t\t\t\t$output .= \"-- ------------------------------------\" . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM \" . $table . \" WHERE `group` = 'rgen_theme'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= 'TRUNCATE TABLE `' . $table . '`;' . \"\\n\\n\";\r\r\n\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM \" . $table_setting . \" WHERE `group` = 'rgen_settings'\");\r\r\n\t\t\t\t$field_keys = array('store_id', 'group', 'section', 'key', 'value');\r\r\n\t\t\t\t$output .= \"\\n\\n\".'TRUNCATE TABLE `' . $table_setting . '`;' . \"\\n\\n\";\r\r\n\t\t\t\t\r\r\n\t\t\t\tif (sizeof($query->rows) > 0) {\r\r\n\t\t\t\t\tforeach ($query->rows as $row_value) {\r\r\n\t\t\t\t\t\t$output .= $this->dbProcess($row_value, $field_keys, $table_setting);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\treturn $output;\r\r\n\t\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}", "public function index()\n {\n \t$result = array('status' => false, 'message'=> '');\n \t$output = NULL;\n \t$return_val = NULL;\n \t$result_val;\n\n\t\t$databases=array(\"users\", \"students\", \"books\"); // databases array\n\n\t\tfor ($i=0; $i < count($databases); $i++) { \n\t\t\t$result_val = $this->backupDatabase($databases[$i]); // calling backupDatabase function\n\t\t}\n\n\t\t// checking function return value\n\t\tif ($result_val == 0) {\n\t\t\t$result['status'] = true;\n\t\t\t$result['message'] = \"Backup successful for \".strtoupper(implode(\",\", $databases)).\" databases\";\n\t\t} else {\n\t\t\t$result['status'] = false;\n\t\t\t$result['message'] = \"Something went wrong\";\n\t\t}\n\n\t\t// return the final result\n\t\treturn json_encode($result);\n\t}", "private function get_site_backup($file_path, $backup_type, $file_format = 1) {\n$this->zip->clear_data();\n$this->check_directory($file_path);\n$this->check_directory($this->copy_directory);\n//loop each of the folder that will be backed up\nif (count($this->directories) > 0) {\nforeach ($this->directories as $dir) {\nif (!in_array($dir, $this->ignore_directories)) {\n$location = $this->base_path . $dir . \"/\";\n$this->zip->read_dir($location, FALSE);\n}\n}\n} else {\n//takes a copy of the code to ensure that the backup of backups is not made.\n$copied = FALSE;\nif ($this->structure_copied === FALSE) {\n$path = str_replace('\\\\', '/', realpath($this->base_path));\n$copied = $this->copy_site_files($path, $this->base_path . $this->copy_directory . \"/\");\n}\nif (($copied === TRUE) || ($this->structure_copied === TRUE)) {\n$this->zip->read_dir($this->base_path . $this->copy_directory . \"/\", FALSE);\n}\n}\nflush();\n$key_name = date(\"d_m_Y_H_i_s\");\nif ($file_format == 1) {\n$file_name = md5($key_name) . '_site.zip';\n$zipped = $this->zip->archive($file_path . $file_name);\n$this->zip->clear_data();\nif ($this->structure_copied === TRUE) { //we need to remove the copied files to ensure that the server is kept nice and tidy\n$this->remove_temp_files($this->base_path . $this->copy_directory . \"/\");\n}\nif ($zipped == 1) {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('Le site sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$file = $file_path . $file_name;\n$saved_data = $this->backup->save_backup_details($file_name, $file_path, $backup_type);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde du site ici ' . anchor($this->site_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde du site ici ' . anchor($this->site_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_success('Erreur lors de la sauvegarde du site dans la base de données: ' . $file_name);\n}\n} else {\n$this->handle_error('Erreur lors l\\'écriture de sauvegarde sur disque: ' . $file_name);\n}\n} else if ($file_format == 2) {\n$file_name = md5($key_name) . '_site.tar.gz';\n$zipped = $this->zip->archive($file_path . $file_name);\n$this->zip->clear_data();\nif ($this->structure_copied === TRUE) { //we need to remove the copied files to ensure that the server is kept nice and tidy\n$this->remove_temp_files($this->base_path . $this->copy_directory . \"/\");\n}\nif ($zipped == 1) {\n$this->handle_success('Nom de fichier: ' . $file_name . '. ');\n$this->handle_success('Le site sauvegarder avec succès sur le disque. ');\n$date_arr = explode('_', $key_name);\n$date = $date_arr[0] . '-' . $date_arr[1] . '-' . $date_arr[2] . ' ' . $date_arr[3] . ':' . $date_arr[4] . ':' . $date_arr[5];\n$file = $file_path . $file_name;\n$saved_data = $this->backup->save_backup_details($file_name, $file_path, $backup_type);\nif ($saved_data !== NULL) {\n$this->handle_success('Les détails du site sont enregistrées avec succès à la base de données. ');\n$this->handle_success('Vous pouvez obtenir la sauvegarde du site ici ' . anchor($this->site_download_url . $saved_data, 'download', array('class' => 'download')));\n$this->handle_success('Vous pouvez supprimer la sauvegarde du site ici ' . anchor($this->site_delete_url . $saved_data, 'delete', array('class' => 'delete', 'onclick' => \"return confirm('Are you sure want to delete this file ?')\")));\n} else {\nif (file_exists($file)) {\nunlink($file);\n}\n$this->handle_success('Erreur lors de la sauvegarde du site dans la base de données: ' . $file_name);\n}\n} else {\n$this->handle_error('Erreur lors l\\'écriture de sauvegarde sur disque: ' . $file_name);\n}\n}\n}", "public function actionCreate()\n\t{\n\t\t$this->actionRegister();\n\t\t/*\n\t\tif (isset($_GET['newModel']) && isset(Yii::app()->session[$this->createBackup.'_Time']) && $_GET['newModel']>Yii::app()->session[$this->createBackup.'_Time']){\n\t\t\t\tunset(Yii::app()->session[$this->createBackup]);\n\t\t\t\tunset(Yii::app()->session[$this->createBackup.'_Time']);\n\t\t\t\tunset($_GET['newModel']);\n\t\t}\n\t\t$this->prepareCreateOrUpdate(null, 'create');\n\t\t*/\n\t}", "public function start_user_component_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\User_components)->start_backup();\n \n }", "public function backup_settings_default() {\n $all_tables = $this->_get_table_names();\n\n // Basic modules that should be excluded.\n $basic = array(\n // Default core tables.\n 'accesslog',\n 'sessions',\n 'watchdog',\n // Search module.\n 'search_dataset',\n 'search_index',\n 'search_keywords_log',\n 'search_total',\n // Devel module.\n 'devel_queries',\n 'devel_times',\n );\n\n // Identify all cache tables.\n $cache = array('cache');\n foreach ($all_tables as $table_name) {\n if (strpos($table_name, 'cache_') === 0) {\n $cache[] = $table_name;\n }\n }\n\n // Simpletest can create a lot of tables that do not need to be backed up,\n // but all of them start with the string 'simpletest' so they can be easily\n // excluded.\n $simpletest = array();\n foreach ($all_tables as $table_name) {\n if (strpos($table_name, 'simpletest') === 0) {\n $simpletest[] = $table_name;\n }\n }\n\n return array(\n 'nodata_tables' => drupal_map_assoc(array_merge($basic, $cache, module_invoke_all('devel_caches'))),\n 'exclude_tables' => $simpletest,\n 'utils_lock_tables' => FALSE,\n );\n }", "public function backup_tables($tables = '*'){\n\t\t$return = \"\";\n\t\t$date_string = date(\"Y-m-d\");\n\t\t$database_name = DB_NAME;\n\t\tdefine(\"BACKUP_PATH\", RootURI.\"media/backup/\");\n\n\t\t$this->con = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);\n\t\tif(mysqli_connect_error()) {\n\t\t\techo \"Failed to connect to MySQL\". mysqli_connect_error();exit();\n\t\t}\n\t\t\n\t\t//get all of the tables\n\t\tif($tables == '*'){\n\t\t\t$tables = array();\n\t\t\t$result = mysqli_query($this->con,\"SHOW TABLES\");\n\t\t\twhile($row = mysqli_fetch_row($result))\n\t\t\t{\n\t\t\t\t$tables[] = $row[0];\n\t\t\t}\n\t\t} else {\n\t\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t\t}\n\t\t\n\t\t//cycle through\n\t\tforeach($tables as $table) {\n\t\t\t$result = mysqli_query($this->con,'SELECT * FROM '.$table);\n\t\t\t$num_fields = mysqli_num_fields($result);\n\t\t\t$num_rows = mysqli_num_rows($result);\n\t\t\t\n\t\t\t$return.= 'DROP TABLE IF EXISTS '.$table.';';\n\t\t\t$row2 = mysqli_fetch_row(mysqli_query($this->con,'SHOW CREATE TABLE '.$table));\n\t\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\t\t$counter = 1;\n\n\t\t\t//Over tables\n\t\t\tfor ($i = 0; $i < $num_fields; $i++) { \n\t\t\t\twhile($row = mysqli_fetch_row($result)) \n\t\t\t\t{ \n\t\t\t\t\tif($counter == 1){\n\t\t\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return.= '(';\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\t//Over fields\n\t\t\t\t\tfor($j=0; $j<$num_fields; $j++) {\n\t\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t\t$row[$j] = str_replace(\"\\n\",\"\\\\n\",$row[$j]);\n\t\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tif($num_rows == $counter){\n\t\t\t\t\t\t$return.= \");\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return.= \"),\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t++$counter;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return.=\"\\n\\n\\n\";\n\t\t\n\t\t}\n\t\t\n\t\t//save file\n\t\t$handle = fopen(BACKUP_PATH.\"db_backup_{$date_string}_{$database_name}.sql\",'w+');\n\t\tfwrite($handle,$return);\n\n\t\tif(fclose($handle)){\n\t\t\treturn true;\n\t\t} else return false;\n }" ]
[ "0.7501994", "0.7501994", "0.74587715", "0.7380878", "0.72930586", "0.71496445", "0.7110567", "0.70745957", "0.7070066", "0.70070225", "0.69423586", "0.69091964", "0.68951863", "0.68580306", "0.6805526", "0.6804428", "0.67792207", "0.66517615", "0.65997326", "0.65959764", "0.65736884", "0.6562898", "0.6483109", "0.6474641", "0.6464468", "0.6413436", "0.6412913", "0.63937575", "0.6391204", "0.6385922", "0.6344857", "0.63423175", "0.63420105", "0.6321581", "0.6319616", "0.63010097", "0.6280118", "0.6272134", "0.62419885", "0.62258387", "0.6196407", "0.61958295", "0.6156224", "0.6131057", "0.6078977", "0.60664266", "0.6057607", "0.6042775", "0.6042694", "0.60364", "0.60358787", "0.5991342", "0.59869343", "0.5976772", "0.59669167", "0.59474015", "0.5940831", "0.5929049", "0.5923456", "0.59175295", "0.5915036", "0.5914252", "0.58608", "0.5854064", "0.5850553", "0.58406425", "0.583484", "0.58179027", "0.5816838", "0.5815926", "0.5814855", "0.5804435", "0.580232", "0.5791893", "0.5788941", "0.5787868", "0.5775533", "0.57734704", "0.57706296", "0.5763453", "0.5761038", "0.57519937", "0.5732618", "0.57313955", "0.5726597", "0.57040924", "0.57025397", "0.5701806", "0.56982386", "0.5686683", "0.5653792", "0.5653792", "0.56492686", "0.5643784", "0.56430864", "0.56348133", "0.5622379", "0.56150585", "0.560167", "0.5587461" ]
0.5672623
90
Checks $request if it contains a key username
private function handleKeyUsername(UserInterface $user, Request $request) { $data = $request->request->all(); if (array_key_exists('username', $data)) { // Change username only if username is changed if ($data['username'] != $user->getUsername()) { // Check if username is already taken $user1 = $this->container->get('fos_user.user_manager')->findUserByUsernameOrEmail($data['username']); if (null != $user1) { $this->logAndThrowError(400, 'Already taken by Username: '.$user1->getUsername(), $this->get('translator')->trans('api.show_error_username_taken', array(), 'messages', $request->getLocale()), $request->getLocale()); } $user->setUsername($data['username']); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkUsernameAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeUsername = Application_Model_User::checkUsername($json_data);\n\t\t\t\n\t\t\tif($isFreeUsername) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// username exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}", "public function ajax_check_username() {\n\t\tglobal $wpdb;\n\n\t\tif ( !isset( $_REQUEST['action'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual_form_builder_check_username' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\t$username = esc_html( $_REQUEST['username'] );\n\t\t$user_id = username_exists( $username );\n\t\t$valid = 'true';\n\n\t\t// If username exists, not valid\n\t\tif ( $user_id )\n\t\t\t$valid = 'false';\n\n\t\techo $valid;\n\n\t\tdie(1);\n\t}", "private static function userExists() {\r\n\t\tif (!isset($_GET) || !isset($_GET['userName']))\r\n\t\t\treturn self::jsonError('User name missing from request.');\r\n\r\n\t\t// make sure user name is not already taken\r\n\t\tif (UsersDB::userExists($_GET['userName']))\r\n\t\t\treturn self::jsonResponse(true, true, null, 'User name already exists.');\r\n\r\n\t\treturn self::jsonResponse(true, false, null, 'User name does not exist.');\r\n\t}", "public function hasUsername(){\n return $this->_has(4);\n }", "public function checkUserNameExist()\n {\n $collection = new AjaxModel();\n\n if ($collection->CheckUserName($_POST['username'])) {\n echo \"true\";\n } else {\n echo \"false\";\n }\n }", "public function checkusername()\n\t\t{\n\t\t\t$username = $_POST['owner_username'];\n\t\t\t$data = $this->UserModel->checkusername($username);\n\t\t\tif (empty($data)){\n\t\t\t\techo 'true';\n\t\t\t}else {\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}", "public function hasUsername() {\n return $this->_has(1);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "private function getRequestUserName() {\n\t\t//RETURN REQUEST VARIABLE: USERNAME\n if(!empty($_POST[self::$userName])){\n\t\t\treturn $_POST[self::$userName];\n\t\t}\n else{\n return \"\";\n }\n\t}", "protected function lookupUsername() {\n\t\tif (!isset($_POST['username'])) {\n\t\t\techo \"<p class=\\\"error\\\">Missing username</p>\\n\";\n\t\t\texit;\n\t\t}\n\t\t$this->username = $_POST['username'];\n\t}", "function check_username($h, $t, $r, $p) {\n\t$handlers = _elgg_services()->router->getPageHandlers();\n\treturn !in_array($p['username'], array_keys($handlers));\n}", "private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }", "private function makeRequestUsingUsername()\n {\n if(!empty($this->_username))\n {\n // Now make sure this person exists in our database\n $query = $this->pdo->prepare(\"SELECT * FROM users WHERE user_name=:username\");\n $query->execute(array(\n ':username' => $this->_username\n ));\n\n if($query->rowCount() == 1)\n {\n // Now construct the request by first making the request id and passing in the unique_salt_id\n $fetch = $query->fetch(PDO::FETCH_ASSOC);\n\n // Now use the users salt id to make a new request\n $this->_request_id = md5($fetch['unique_id_string']) . $this->_CI->encryption->randomHash();\n\n // Also since this is the username we need to send a email to the user. Now fetch the email and use it\n $this->_email = $fetch['email'];\n\n // Now construct the request and send everything\n $this->constructRequest($fetch['unique_id_string']);\n return false;\n }else{\n echo $this->_CI->response->make(\"There is no account with this username!\", 'JSON', 0);\n return false;\n }\n }\n }", "public function check_username()\n\t\t{\n\t\t\t$username = $this->input->post('username');\n\t\t\t$where = array('username' => $username);\n\t\t\tif($this->Admin_model->check_exits($where)){\n\t\t\t\t$this->form_validation->set_message(__FUNCTION__, 'Tài khoản đã tồn tại');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public function usernameEntryIsValid() {\r\n if (array_key_exists(\"username\", $_POST) )\r\n {\r\n if ( !Validator::usernameIsValid($_POST[\"username\"]) )\r\n {\r\n $this->errors[\"username\"] = \"Username is not valid!\";// if the username is not valid then the error will be filled with this message\r\n }\r\n if( $this->usernameIsTaken($_POST[\"username\"]) == true ) \r\n {\r\n $this->errors[\"username\"] = \"That Username has been taken!\"; // if the website that the user entered is already in the database\r\n }\r\n }\r\n else\r\n {\r\n $this->errors[\"username\"] = \"Username is required!\"; // requires a Username to be entered\r\n }\r\n \r\n return ( empty($this->errors[\"username\"]) ? true : false );\r\n }", "public function getUser(CakeRequest $request) {\n return false;\n }", "public function is_username_available() {\n\t\tif (User::where('username', $_GET['username'])->active()->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => true\n\t\t\t], 200);\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => false\n\t\t\t], 200);\n\t\t}\n\t}", "private static function was_username_provided($input)\n {\n }", "public function getRequestUserName() {\n if(isset($_POST[self::$name])){\n return trim($_POST[self::$name]);\n }\n\t}", "private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}", "public function hasUsername() : bool;", "public function getUsername() {\n if (isset($_REQUEST['username']))\n return $_REQUEST['username'];\n else\n return false;\n }", "function usernameExists($user_name) {\n return valueExists('users', 'user_name', $user_name);\n}", "public function usernameEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // set the var equal to function call of username\r\n $username = $this->getUsername();\r\n // If the field is empty\r\n if ( empty($username) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"username\"] = \"Username is missing.\";\r\n // Other test calls the validator class and nameisvalid function to test\r\n // the user name is it returns invalid the message is displayed to the user\r\n } else if ( !Validator::nameIsValid($this->getUsername()) ) {\r\n $this->errors[\"username\"] = \"Username is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"username\"]) ? true : false ) ;\r\n }", "private function noAction() {\n if(strlen($this->get('username')) <= 0){\n echo 'no-user';\n }\n }", "public function checkIfUsernameExist(Request $request)\n {\n\t\t$data = $request->post();\n\t\t$condition = [['username','=',$data['username']]] ;\n\t\t$conditionWithId = [['username','=',$data['username']],['id','!=',$data['id']]] ;\n\t\t$count = 0;\n\t\tif($data['id'] == 0){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"user\"){\n\t\t\t$count = $count + User::where($conditionWithId)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"admin\"){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($conditionWithId)->count();\n\t\t}\t\t\n\t\t\n\t\treturn new Response($count);\n }", "public function checkUsername($sender,$param)\r\n\t{\r\n\t\t$userRecord=TblUsers::finder()->findBy_username($this->Username->Text);\r\n\r\n\t\tif($userRecord != null)\r\n\t\t\t$param->IsValid = false;\r\n\t}", "public function validate_username() {\n\n\t\tif(strtolower($this->username) == 'admin')\n\t\t\t$this->addError('username','Usuario no disponible.');\n\t}", "public function usernameExists() {\n\t\tif(!check($this->_username)) return;\n\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_USERNM_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = ?\", array($this->_username));\n\t\tif(!is_array($result)) return;\n\t\treturn true;\n\t}", "public function checkUsername()\n {\n $username = $this->input->post('username');\n\n $user_login_id = $this->authentication_helper->checkUsername($username);\n\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(false);\n }\n else\n {\n echo json_encode(true);\n }\n }", "public function isUniqueUsername(){\n \tif(!empty($this->data['User']['username'])){\n \t\t$username = $this->data['User']['username'];\n\n \t\t$user = $this->find('first', array(\n \t\t\t'conditions' => array(\n \t\t\t\t'User.username' => $username,\n \t\t\t)\n \t\t));\n \t\tif(empty($user)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn false;\n }", "public function postName(Request $request)\n {\n $user = User::where('username', $request->username)->count();\n $exists = $user > 0 ? \"<small class='form-text text-danger'>Sorry, <strong>\" . $request->username . \"</strong> is already registered</small>\" :\n \"\";\n return response($exists);\n }", "function usernameExists($f): bool\n {\n $exists = false;\n if(!empty($this->load(array('username=?',$f->get('POST.login_username'))))){\n $exists = true;\n }\n return $exists;\n }", "function kiemtra_username($username)\n {\n if($this->default_model->getInfoID($this->_table,array(\"username\" => $username))!=TRUE){ //ko ton tai username\n return TRUE;\n }\n else{\n $this->form_validation->set_message(\"kiemtra_username\",sprintf($this->lang->line('error_kiemtra_username'),$username));\n return FALSE;\n }\n }", "public function checkUsername() {\r\n if (isset($this->data[$this->name]['id'])) {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"id !=\" => $this->data[$this->name]['id'],\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n } else {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n }\r\n\r\n $this->find(\"first\", $condition);\r\n $count = $this->getNumRows();\r\n if ($count > 0) {\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n }", "function checkUser(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$db \t = JFactory::getDbo();\n\t\t$inputstr = $app->input->get('inputstr', '', 'string');\n\t\t$name \t = $app->input->get('name', '', 'string');\n\t\n\t\tif($name == 'username'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE username=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_USERNAME_EXISTS';\n\t\t}\n\t\telseif($name == 'email'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE email=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_EMAIL_EXISTS';\n\t\t}\n\t\n\t\t$db->setQuery($query);\n\t\tif($db->loadResult()){\n\t\t\techo JText::sprintf($msg, $inputstr);\n\t\t}\n\t\telse {\n\t\t\techo 'OK';\n\t\t}\n\t\texit;\n\t}", "function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "public function findUsername($request)\n {\n return self::tikApi([\n 'request_type' => 'GET',\n 'endpoint_url' => 'https://api.tikapi.io/public/check?username='.$request\n ]);\n }", "public static function hasAdminCredentialsForJSONRequest($username)\n {\n if (strcmp($username, 'awesome_admin') != 0) {\n return false;\n }\n\n return true;\n }", "public function checkEmail(Request $request) {\n if($request->get('username')){\n $username = $request->get('username');\n $qry = DB::table('users')\n ->where('username', $username)\n ->count();\n if($qry > 0){\n return response()->json(array('msg' => 'not unique'), 200);\n } else{\n return response()->json(array('msg' => 'unique'), 200);\n }\n }\n }", "public static function handleRequest()\n {\n if(isset($_SESSION['user']) && $_SESSION['user'] !== NULL)\n return true;\n return false;\n }", "private function _validateUsername()\n\t{\n\t\t$state = $this->getStateVariables();\n\n\t\t$ret = (object)array('username' => false);\n\t\t$username = $state->username;\n\t\tif(empty($username)) return $ret;\n\t\t$myUser = JFactory::getUser();\n\t\t$user = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t->username($username)\n\t\t\t->getFirstItem();\n\n\t\tif($myUser->guest) {\n\t\t\tif(empty($user->username)) {\n\t\t\t\t$ret->username = true;\n\t\t\t} else {\n\t\t\t\t// If it's a blocked user, we should allow reusing the username;\n\t\t\t\t// this would be a user who tried to subscribe, closed the payment\n\t\t\t\t// window and came back to re-register. However, if the validation\n\t\t\t\t// field is non-empty, this is a manually blocked user and should\n\t\t\t\t// not be allowed to subscribe again.\n\t\t\t\tif($user->block) {\n\t\t\t\t\tif(!empty($user->activation)) {\n\t\t\t\t\t\t$ret->username = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ret->username = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$ret->username = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$ret->username = ($user->username == $myUser->username);\n\t\t}\n\t\treturn $ret;\n\t}", "function username_check($username)\r\n\t{\r\n\t\tif ( $user = $this->generic_model->get_where_single_row('users', array('username' => $username))) \r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('username_check', 'This %s is already registered.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse { return true; }\t\t\r\n\t}", "function userExists( $username ) {\n return true;\n }", "public function username_exist($username) {\n\n $isExist = $this->User_m->username_exist_m($username);\n\n if($isExist) {\n $res['status'] = false;\n $res['message'] = 'Username already exist..! Pls Regenerate Username';\n http_response_code(404);\n echo json_encode($res);\n exit;\n }\n\n }", "public function CheckUsername($username, $userId);", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "public function hasRequest(string $name): bool {}", "public function isGetUserStep(ServerRequest $request);", "public function check_username_exists($username){\n\t\t\t$this->form_validation->set_message('check_username_exists', 'That username is taken. Please choose a different one');\n\t\t\tif($this->um->check_username_exists($username)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function username_check($user_name)\n {\n session_check();\n $user_id = $this->uri->segment(3);\n $user_id = empty($user_id) ? $this->session->userdata('user_id') : $user_id;\n if($this->uri->segment(2) == 'add' || $this->uri->segment(2) == 'Add')\n $user_id = 0;\n if($this->users_model->isusernameexist($user_name, $user_id))\n {\n $this->form_validation->set_message('username_check', $this->lang->line('validation_username_exist'));\n return FALSE;\n }else\n {\n return TRUE;\n }\n }", "private static function usernameExists($username) {\n return \\Drupal::entityQuery('user')->condition('name', $username)->execute();\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 }", "public function __isset($name)\n {\n return array_key_exists($name, $this->userParams);\n }", "public function isUsernameMissing($username) \r\n {\r\n if($username == \"\")\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "function UserNameExistsEdit($username) {\n\t$usernameUser = GetUser('username');\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\t$resultUsername = mysqli_fetch_assoc($result);\n\t$resultUsername = $resultUsername['username'];\n\n\tif (mysqli_num_rows($result) <= 0 || $usernameUser == $resultUsername)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function check_username_exists($username){\n $this->form_validation->set_message('check_username_exists', 'Usrname Sudah diambil. Silahkan gunakan username lain');\n if($this->m_login->check_username_exists($username)){\n return true;\n } else {\n return false;\n }\n }", "private function _requestHasParam(string $key, array $request)\n {\n return array_key_exists($key, $request);\n }", "public function check_username()\n\t{\n\t \textract($this->input->post());\n\t $this->db->select('*')\n\t\t->from('wl_user')\n\t\t->where('fname',$username)\n\t\t->where('id !=', $u_id);;\n\t\t$query = $this->db->get();\n\t return\t$query->num_rows();\t\n\t}", "public function username($username);", "public function check_username( $username )\n\t{\n\t\t// Check the username\n\t\t$sanitized_user_login = sanitize_user( $username );\n\t\tif (! validate_username( $username ) ) {\n\t\t\t$this->errors['username'] = apply_filters( \"{$this->prefix}/create_object/error/username\", $this->settings['strings']['username'] );\n\t\t\t$sanitized_user_login = '';\n\t\t} elseif ( username_exists( $sanitized_user_login ) ) {\n\t\t\t$this->errors['username'] = apply_filters( \"{$this->prefix}/create_object/error/username_exists\", $this->settings['strings']['username_exists'] );\n\t\t}\n\n\t\treturn $sanitized_user_login;\n\t}", "public function _userntexists($input) {\n\n\t\t$prepare \t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ?\");\n\t\t$prepare->execute(array(r::post($input)));\n\t\t$result \t= $prepare->fetch();\n\n\t\tif(empty($result)) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getCheckUsername()\n {\n $username = Input::get('username');\n $user = User::where(array('username' => $username))->first();\n\n return array('valid' => empty($user));\n }", "public function issetUser($value)\n {\n $username = trim($value);\n\n foreach ($this->users as $user) {\n foreach ($user as $key => $value) {\n if ($key === $username) {\n return $username;\n }\n }\n }\n return $this->addError('username', 'Такого имени не существует.');\n }", "protected function _is_valid_request($request) {\n if ( empty($request) ) {\n return true;\n }\n return Auth::is_token_valid($request, $this->classname());\n }", "public function check_username(){\n\t\tif(isset($_POST[\"submit\"])){\n\t\t\t$user = $_POST[\"uname\"];\n\t\t\t$query = $this->db->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM admin \n\t\t\t\t\t\t\t\t\t\tWHERE username LIKE '$user'\");\n\t\t\treturn $query->num_rows();\n\t\t}\n\t}", "public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "protected function has_request( $key = '' ) {\n\t\treturn $this->has( $key, 'REQUEST' );\n\t}", "function getUserExists($username)\n\t{\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"filter\" => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"portal_name\" => array( '$equals' => $username,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$url = $this->url.\"/Contacts/filter\";\n\n\t\t\t$response = self::call($url, $this->token, 'POST', $filter_arguments);\n\n\t\t\t$isUser = $response->records[0]->portal_name;\n\n\t\t\tif($isUser == $username)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function getRequestUserName() : array {\n\t\t//RETURN REQUEST VARIABLE: USERNAME\n\n\t\t$credits = array();\n\n\t\t// TODO: LÄGG TRIM I MODELLEN.\n\t\t$credits[] = trim($_POST[self::$name]);\n\t\t$credits[] = trim($_POST[self::$password]);\n\n\t\tif (isset( $_POST[self::$keep])) { \n\n\t\t\t$credits[] = $_POST[self::$keep];\n\n\t\t} else {\n\t\t\t$credits[] = false;\n\t\t}\n\n\t\treturn $credits;\n\t}", "public function username_existe($attribute, $params)\r\n {\r\n $table = Users::find()->where(\"username=:username\", [\":username\" => $this->username]);\r\n \r\n //Si el username existe mostrar el error\r\n if ($table->count() == 1){\r\n \r\n $this->addError($attribute, Yii::t('backend', 'The selected username exists'));\r\n }\r\n }", "function userExists($username) {\r\n\t\treturn username_exists($username);\r\n\t}", "public function checkUserCode(Request $request){\n $sql = DB::table('sys_users')->where('user_code', $request->user_code);\n if (!empty($request->id)){\n $sql->where('id', '!=', $request->id);\n }\n $user_data = $sql->first();\n if (!empty($user_data)){\n return response()->json([\n 'result'=>'exist',\n ]);\n }else{\n return response()->json([\n 'result'=>'valid',\n ]);\n }\n }", "public function matches(Request $request): bool\n {\n // RewriteEngine On\n // RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n foreach ($this->options['user_identifier_headers'] as $header) {\n if ($request->headers->has($header)) {\n return false;\n }\n }\n\n if ($this->options['session_name_prefix']) {\n foreach ($request->cookies as $name => $value) {\n if (0 === strpos($name, $this->options['session_name_prefix'])) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function checkusernameTask()\n\t{\n\t\t// Incoming\n\t\t$username = Request::getString('userlogin', '', 'get');\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t// Check the username\n\t\t$usernamechecked = $xregistration->checkusername($username);\n\n\t\techo json_encode($usernamechecked);\n\t\tdie;\n\t}", "function _validate_pnhempusername()\r\n\t{\r\n\t\t$username = $this->input->post('username');\r\n\t\tif($this->db->query('select count(*) as t from king_admin where username = ? ',$username)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_validate_pnhempusername','Username already available');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "private function userExists($username){ return $this->redis->exists($username);\n }", "public function unique_username()\n {\n $username = $this->input->post('username');\n $id = $this->input->post('id');\n $user = $this->user->where('username', $username)->first();\n\n if ($user) {\n if ($id == $user->id) {\n return true;\n }\n $this->load->library('form_validation');\n $this->form_validation->set_message('unique_username', '%s has been used!');\n return false;\n }\n\n return true;\n }", "function getRequestUserName() {\n\n\t\treturn $this->loginModel->getUsernameInSession();\n=======\n\t//CREATE GET-FUNCTIONS TO FETCH REQUEST VARIABLES\n\tprivate function getRequestUserName()\n\t{\n\t\t/*if(isset($_POST[self::$name]))\n\t\t{\n\t\t\treturn ($_POST[self::$name]);\n\t\t}\n\t\treturn \"\";*/\n\n\t\treturn $this->cookieStorage->load(self::$cookieName);\n>>>>>>> origin/master\n\t}\n\t\n}", "static public function is_login( Request $request ){\n return 0;\n }", "function validateUser($username){\n\t\tglobal $dataModel;\n\n\t\tif($dataModel->userExist($username, \"\")){\n\t\t\t$_SESSION['error'] = \"Username already taken\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\t\n\t\tif (strlen($username)< 6){\n\t\t\t$_SESSION['error'] = \"Username too short\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\n\t\treturn true;\n\t}", "function inputHas($key){\n\n\treturn isset($_REQUEST[$key]);\n\n}", "function _user_exists($username)\n {\n $this->where('username', $username);\n $user = $this->get('users');\n //return true/false\n if ($user)\n {\n return true;\n } else {\n return false;\n }\n }", "function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){\r\n $username = addslashes($username);\r\n }\r\n $q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\r\n $result = mysql_query($q, $this->connection);\r\n return (mysql_numrows($result) > 0);\r\n }", "function inputHas($key)\n\t{\n\treturn isset($_REQUEST[$key]);\n\t\n\t}", "function strictUserAuth($username) {\r\n\t\treturn true;\r\n\t}", "private function CheckForAuthentication(Request $request){\n if(!isset($_SESSION['username'])){ // If NOT\n // Create new request for redirection\n $redirectionRequest = new Request('User', 'Signin', $request->Application);\n // Setting via magic method previous controller\n $redirectionRequest->previousController = $request->Controller;\n // Setting via magic method previous action\n $redirectionRequest->previousAction = $request->Action;\n $this->Redirect($redirectionRequest);\n }\n }", "public function usernameExists($username) {\n\n\t $app = getApp();\n\n\t $sql = 'SELECT ' . $app->getConfig('security_username_property') . ' FROM ' . $this->table .\n\t ' WHERE ' . $app->getConfig('security_username_property') . ' = :username LIMIT 1';\n\n\t $dbh = ConnectionModel::getDbh();\n\t $sth = $dbh->prepare($sql);\n\t $sth->bindValue(':username', $username);\n\t if($sth->execute()) {\n\t $foundUser = $sth->fetch();\n\t if($foundUser){\n\t return true;\n\t }\n\t }\n\t return false;\n\t}", "public function userExists( $user_name ) { return true;}", "function usernameTaken($username){\n\t\tif(!get_magic_quotes_gpc()){\n\t\t\t$username = addslashes($username);\n\t\t}\n\t\t$q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\n\t\t$result = mysql_query($q, $this->connection);\n\t\treturn (mysql_numrows($result) > 0); \n\t}", "public function checkUsername($panelUserName){\n\t}", "private function checkrequest()\n {\n // This method checks if there is user input, and returns the request_method if evaluated to be true\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->request = \"post\";\n return true;\n } elseif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n $this->request = \"get\";\n return true;\n } else {\n $this->request = false;\n }\n }", "function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }", "public function checkAuthentication(\\WP_Rest_Request $request)\n {\n if ($request->get_param('key') != $this->key) {\n $this->responseJson(['message' => 'Key invalid'], 422);\n }\n\n return $this->handle($request);\n }", "static function isUsernameUsed(string $username) {\n $sql = 'SELECT * FROM users WHERE lower(username) = lower(\"'.$username.'\")';\n $db = new Database();\n $row = $db->query($sql);\n\n if (empty($row)) {\n return false;\n } else {\n return true;\n }\n }", "function strictUserAuth( $username ) {\n return true;\n }", "function filterUsername($username)\r\n {\r\n return $username;\r\n }", "function filterUsername($username) {\r\n \treturn $username;\r\n }" ]
[ "0.71173346", "0.6623698", "0.6560921", "0.64837253", "0.64821213", "0.6460515", "0.6368974", "0.6340982", "0.6340982", "0.6275556", "0.62253416", "0.62231296", "0.6200667", "0.61848736", "0.61238307", "0.61106", "0.6106317", "0.60954565", "0.6094907", "0.6088458", "0.6083287", "0.6041853", "0.6034929", "0.60303736", "0.60258543", "0.59803456", "0.5962041", "0.5957585", "0.5948541", "0.59408915", "0.59324956", "0.592214", "0.5917545", "0.5889287", "0.58568496", "0.5837025", "0.58363414", "0.5832822", "0.5831829", "0.5803778", "0.5802597", "0.5795734", "0.5777021", "0.5763166", "0.5759925", "0.5755238", "0.57379776", "0.57366884", "0.5727926", "0.57083964", "0.57045776", "0.5703647", "0.5685457", "0.5663741", "0.56586593", "0.56578857", "0.5657064", "0.5642209", "0.56246704", "0.56192493", "0.5619121", "0.561084", "0.5589849", "0.5585122", "0.5579952", "0.5578279", "0.5577322", "0.5572101", "0.5564762", "0.55645496", "0.5558197", "0.5550489", "0.55391836", "0.55356354", "0.5532508", "0.5529005", "0.55201536", "0.5516867", "0.55149245", "0.55114406", "0.5507901", "0.5506098", "0.55033916", "0.55032706", "0.5502091", "0.54951787", "0.549382", "0.54906183", "0.548774", "0.5486403", "0.54849", "0.5475881", "0.54727125", "0.5471259", "0.54687464", "0.54550517", "0.5453509", "0.54533184", "0.5445196", "0.5437253" ]
0.66007006
2
Checks $request if it contains a key email
private function handleKeyEmail(UserInterface $user, Request $request) { $data = $request->request->all(); if (array_key_exists('email', $data)) { // Check if email is valid if (!filter_var($data['email'], FILTER_VALIDATE_EMAIL)) { $this->logAndThrowError(400, 'Invalid email: '.$data['email'], 'Invalid email: '.$data['email']); } // Update email only if email is changed if ($data['email'] != $user->getEmail()) { // Check if email is already taken $user1 = $this->container->get('fos_user.user_manager')->findUserByUsernameOrEmail($data['email']); if (null != $user1) { $this->logAndThrowError(400, 'Email ' .$user1->getEmail().' already taken by Username: '.$user1->getUsername(), $this->get('translator')->trans('api.show_error_email_taken', array(), 'messages', $request->getLocale()), $request->getLocale()); } $user->setEmail($data['email']); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function emailCheck(Request $request)\n\t{\n\t\t\t$enteredEmail= $request['datafile'];\n\t\t\tif(DB::table('users')->where('email', '?')->setBindings([$enteredEmail])->exists())\n\t\t\t{\n\t\t\t\techo '<div style=\"color: red;\"> <b>'.$enteredEmail.'</b> is already in use! </div>|false';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\techo '<div style=\"color: green;\"> <b>'.$enteredEmail.'</b> is avaialable! </div>|true';\n\t\t\t}\t\n\t}", "public function checkEmailAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeEmail = Application_Model_User::checkEmail($json_data);\n\t\t\t\n\t\t\tif($isFreeEmail) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// email exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}", "public function checkEmail(Request $request)\n { \n // dd($request->all());\n if (User::where('email', $request->email)->exists()) {\n return 1;\n }else{\n return 0;\n }\n }", "public function check_email(Request $request) {\n $email = $request->input('email');\n $id = $request->input('id');\n\n $user = \\App\\User::where('id', '!=', $id)->where('email', $email)->get();\n\n if ($user->count() > 0)\n return response()->json(false);\n else\n return response()->json(true);\n }", "public function checkEmail(Request $request) {\n if($request->get('username')){\n $username = $request->get('username');\n $qry = DB::table('users')\n ->where('username', $username)\n ->count();\n if($qry > 0){\n return response()->json(array('msg' => 'not unique'), 200);\n } else{\n return response()->json(array('msg' => 'unique'), 200);\n }\n }\n }", "public function checkEmailExist(Request $request){\n if($request->email==''){\n return response()->json([\n 'result'=>'valid',\n ]);\n }\n $sql = DB::table('sys_users')->where('email', $request->email);\n if (!empty($request->id)){\n $sql->where('id', '!=', $request->id);\n }\n $user_data = $sql->first();\n if (!empty($user_data)){\n return response()->json([\n 'result'=>'exist',\n ]);\n }else{\n return response()->json([\n 'result'=>'valid',\n ]);\n }\n }", "function checkEmail($data){\n\n $formErrors = array();\n $key = 'Email';\n\n if(array_key_exists($key, $data)){\n\n if($_POST[$key] != null){\n\n $key = filter_var($key,FILTER_SANITIZE_EMAIL);\n \n if(filter_var($_POST[$key],FILTER_VALIDATE_EMAIL) === false){\n \n $formErrors[] = $_POST[$key]. \" not a valid email address\";\n \n }\n\n }\n }\n\n return $formErrors;\n\n }", "public function check_email() {\n\t\t$email = urldecode($_GET['email']);\n\n\t\t$result = $this->Member_Model->check_email_if_exists($email);\n\n\t\tif ($result > 0) {\n\t\t\techo json_encode(false);\n\t\t} else {\n\t\t\techo json_encode(true);\n\t\t}\n\t}", "public function check_key($email){\n \n $this->db->where('u_email', $email);\n \n $result = $this->db->get('users');\n\n if($result->num_rows() == 1){\n if($result->row(0)->u_app_key != ''){\n return false;\n }else{\n return true;\n }\n }else{\n return false;\n }\n }", "public function CheckAdminEmailExist(Request $request) {\n $email = $request->email_address;\n\n $id = $request->id;\n if ($id != '') {\n $EmailResArray = DB::table('tbl_adminuser')->where('email_address', '=', $email)->where('id', '!=', $id)->first();\n } else {\n $EmailResArray = DB::table('tbl_adminuser')->where('email_address', '=', $email)->first();\n }\n\n if (count($EmailResArray) > 0) {\n echo '1';\n die;\n } else {\n echo '0';\n die;\n }\n }", "function checkEmail(){\n\t\t$json\t= ceHelper::checkEmail(JRequest::getVar('email'));\n\t\t$this->jsonReturn($json);\n\t}", "public function checkemail() {\n\n if (env(\"NEW_ACCOUNTS\") == \"Disabled\" && env(\"GUEST_SIGNING\") == \"Disabled\") {\n\n $account = Database::table(\"users\")->where(\"email\", input(\"email\"))->first();\n if (!empty($account)){\n response()->json(array(\"exists\" => true));\n }else{\n response()->json(array(\"exists\" => false));\n }\n\n }\n\n }", "public function _check_email_exists($email = ''){\n\t\t\n\t}", "public function validateEmailAction(){\n\t\t \n\t\t $isValid = ! User::emailExists($_GET['email'], $_GET['ignore_id'] ?? null);\n\t\t \n\t\t header('Content-Type: application/json');\n\t\t echo json_encode($isValid);\n\t }", "public function validateEmailAction()\n {\n $is_valid = ! User::emailExists($_GET['email'], $_GET['ignore_id']);\n\n header('Content-Type: application/json');\n echo json_encode($is_valid);\n }", "public function byemailAction(Request $request)\n {\n $maincompany = $this->getUser()->getMaincompany();\n $email = $request->query->get('email');\n $emailConstraint = new Email();\n $errorList = $this->get('validator')->validateValue($email, $emailConstraint);\n $result = array();\n $result['error'] = 0; \n if (count($errorList) != 0) {\n $result['error'] = -1;\n $result['id'] = -1;\n $result['name'] = '';\n goto next;\n }\n $em = $this->getDoctrine()->getManager();\n $customer = $em->getRepository('NvCargaBundle:Customer')->findoneBy(['maincompany'=>$maincompany,'email'=>$email]);\n \n if ($customer) {\n $result['id'] = $customer->getId();\n $result['name'] = $customer->getName() . ' ' . $customer->getLastname();\n } else {\n $result['id'] = 0;\n $result['name'] = '';\n }\n next:\n return new JsonResponse($result); \n }", "public function hasEmail(): bool;", "protected function validateEmail(Request $request)\n {\n $request->validate(['email' => 'required|email:filter']);\n }", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "public function checkIfEmailExists($email);", "public function checkreferemailandkey($email,$key){\n\t\t$this->db->where('ReferedTo', $email);\n\t\t$this->db->where('UniqueKey', $key);\n\t\t$query=$this->db->get('tbl_bvpoint_data');\n\t\tif($query->num_rows()==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public function check_email_existence() {\n\t\t$email = $_GET['email'];\n\t\t$checkExistEmail = $this->User->find('count', array('conditions'=>array('User.email' => $email)));\n\t\techo $checkExistEmail;\n\t\texit();\n\t}", "public function testEmail($key)\n {\n if (!$this->keyExists($key)) {\n return false;\n }\n return eregi(\"^[a-z0-9\\._-]+@+[a-z0-9\\._-]+\\.+[a-z]{2,4}$\", $this->_source[$key]);\n }", "public function addEmail(Request $request)\n {\n // Retrieve post data from request\n $user_data = $request->data;\n\n $emailAddrValue = $user_data['email_addr'];\n $key_value = $user_data['summaryId'];\n\n // Find user with key value and return if cannot find the user\n $user = User::where('email', $emailAddrValue)->first();\n if ($user) {\n if ($user->payment()->first()) {\n return (['success' => false, 'paid' => true, 'summaryId' => $user->key]);\n }\n }\n\n // Find user with key value and return if cannot find the user\n $user = User::where('key', $key_value)->first();\n if (!$user) {\n return (['success' => false, 'summaryId' => $key_value]);\n }\n\n // Save email on the user\n $user->update([\n 'email' => $emailAddrValue\n ]);\n\n return (['success' => true, 'summaryId' => $key_value]);\n }", "public function checkEmailAction(\\Symfony\\Component\\HttpFoundation\\Request $request)\n {\n $email = $request->query->get('email');\n\n if (empty($email)) {\n // the user does not come from the sendEmail action\n return new RedirectResponse($this->generateUrl('fos_user_resetting_request'));\n }\n\n return new JsonResponse(array(\n 'email' => $email,\n ));\n }", "public function validemail(Request $request) {\n\t\t$rfc = $request->rfc;\n\t\t//dd($rfc);\n\t\t$email = $request->remail;\n\t\t$datos = User::validaCorreo($email);\n\t\tif ($datos == null) {\n\t\t\t\\Log::info(__METHOD__ . ' valida existencia de email');\n\t\t\ttry {\n\t\t\t\treturn response()->json(['status' => 'valido'], 200);\n\t\t\t} catch (\\Exception $th) {\n\t\t\t\treturn response()->json(['status' => 'error al consultar'], 200);\n\t\t\t}\n\t\t} else {\n\t\t\treturn response()->json(['status' => 'ya existe el correo'], 200);\n\t\t}\n\t}", "public function email_check($email)\n {\n session_check();\n $user_id = $this->uri->segment(3);\n $user_id = empty($user_id) ? $this->session->userdata('user_id') : $user_id;\n if($this->uri->segment(2) == 'add' || $this->uri->segment(2) == 'Add')\n $user_id = 0;\n if($this->users_model->isemailexist($email, $user_id))\n {\n $this->form_validation->set_message('email_check', $this->lang->line('validation_email_exist'));\n return FALSE;\n }\n return TRUE; \n }", "public function emailEntryIsValid() {\r\n \r\n $email = $this->getEmail();\r\n \r\n if ( empty($email) ) {\r\n $this->errors[\"email\"] = \"Email is missing.\";\r\n } else if ( !Validator::emailIsValid($this->getEmail()) ) {\r\n $this->errors[\"email\"] = \"Email is not valid.\"; \r\n }\r\n \r\n return ( empty($this->errors[\"email\"]) ? true : false ) ;\r\n }", "public function validateEmail (Request $request)\n {\n $val = $this->initialFormService->validateEmail($request->email);\n\n if ($val != NULL) {\n return response()->json(['success' => true, 'messages' => [__('pages.initial_request.email.success')],], 200);\n }\n return response()->json(['success' => true, 'messages' => [__('pages.initial_request.email.fail')],], 200);\n }", "public function emailNotVerified($request)\n {\n $user = User::where('email', $request->get('email'))->first();\n if ($user->verified === 0) {\n return true;\n } else {\n return false;\n }\n }", "public function checkIfEmailExist(Request $request)\n {\n\t\t$data = $request->post();\n\t\t$condition = [['email','=',$data['email']]] ;\n\t\t$conditionWithId = [['email','=',$data['email']],['id','!=',$data['id']]] ;\n\t\t$count = 0;\n\t\tif($data['id'] == 0){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"user\"){\n\t\t\t$count = $count + User::where($conditionWithId)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"admin\"){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($conditionWithId)->count();\n\t\t}\t\t\n\t\t\n\t\treturn new Response($count);\n }", "public function isEmail();", "public function checkEmail(Request $request){\n $data = $request->all();\n $usersCount = User::where('email',$data['email'])->count();\n if($usersCount>0){\n echo \"false\";\n } else {\n echo \"true\"; die;\n }\n }", "public function checkEmailAvailability()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }", "public function hasEmail() {\n return $this->_has(4);\n }", "public function actionEmailunique()\n\t{\n\t\t$email = $_GET['email'];\n\t\t$isexits = '0';\n\t\t$check=UsersDetails::model()->find(\"user_details_email='$email'\");\n\t\tif(isset($check))\t\t\t\t\n\t\t\t$isexits = '1'; //This email already used.\n\t\techo $isexits;\n\t\tYii::app()->end();\n\t}", "function emailExists($email) {\n return valueExists('users', 'email', $email);\n}", "public function is_valid_emailAction() {\r\n\t\t$validator = new Zend_Validate_EmailAddress();\r\n\t\t$email_address = $this->getRequest()->getPost('email_address');\r\n\t\t$message = 'Invalid';\r\n\t\tif ($email_address != '') {\r\n\t\t\t// Check if email is in valid format\r\n\t\t\tif(!$validator->isValid($email_address)) {\r\n\t\t\t\t$message = 'invalid';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//if email is valid, check if this email is registered\r\n\t\t\t\tif($this->_emailIsRegistered($email_address)) {\r\n\t\t\t\t\t$message = 'exists';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$message = 'valid';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$result = array('message' => $message);\r\n\t\t$this->getResponse()->setBody(Zend_Json::encode($result));\r\n\t}", "public function emailEntryIsValid() {\r\n if (array_key_exists(\"email\", $_POST) )\r\n {\r\n if ( !Validator::emailIsValid($_POST[\"email\"]) )\r\n {\r\n $this->errors[\"email\"] = \"Email is not valid!\"; // if the email is not valid then the error will be filled with this message\r\n }\r\n }\r\n else\r\n {\r\n $this->errors[\"email\"] = \"Email is required!\"; // if the email is not entered then the error will be filled with this message\r\n }\r\n \r\n return ( empty($this->errors[\"email\"]) ? true : false ); // if there are no errors then this will return true, if the error messege is filled with something it will return false\r\n }", "function check_email()\n\t{\n\t\tif($this->user_model->check_email($_POST['email'])>0)\n\t\t\techo json_encode(false);\n\t\telse\n\t\t\techo json_encode(true);\n\t}", "function emailExists($f): bool\n {\n $exists = false;\n if(!empty($this->load(array('email=?',$f->get('POST.login_email'))))){\n $exists = true;\n }\n return $exists;\n }", "public function email_exists() {\n\t\t\n\t\t$email = $this->input->post('users_email');\n\t\t$edit_id = $this->input->post ( 'edit_id' );\n\t\t$where = array (\n\t\t\t'users_email' => trim ( $email )\n\t\t);\n\n\t\tif ($edit_id != \"\") {\n\n\t\t\t$where = array_merge ( $where, array (\n\t\t\t\t\t\"users_id !=\" => $edit_id \n\t\t\t) );\n\t\n\t\t} \n\n\t\t$result = $this->Mydb->get_record( 'users_id', $this->table, $where );\n\t\t\n\t\tif ( !empty ( $result ) ) {\n\t\t\t$this->form_validation->set_message ( 'email_exists', get_label ( 'user_email_exist' ) );\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function checkEmailAction(Request $request)\n {\n $event = new \\SKCMS\\FrontBundle\\Event\\PreRenderEvent($this->getRequest());\n $this->get('event_dispatcher')\n ->dispatch(\\SKCMS\\FrontBundle\\Event\\SKCMSFrontEvents::PRE_RENDER, $event);\n \n return parent::checkEmailAction($request);\n }", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t/*echo $count;\n\t\tdie;*/\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "public function check_email() {\n\n\t\t$email = Input::post('email');\n \n\t\tif(is_string($email)) {\n\t\t\t\n\t\t\t$this->_password_reset->_unlocked_me($email);\n\t\t\t$row = $this->_password_reset->_validate_email($email);\n\t\t\t$res = $this->_password_reset->getData($email);\n\t\t\t$_res = $this->_password_reset->_check_if_reg($email);\n\t\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t\t\tif($row > 0) {\n\t\t\t\tif($_res > 0) {\n\t\t\t\t\tif($res['status'] != 0) {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::EMAIL_CONFIRM, 'question' => $ques['security_question']);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::LOCKED);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$_arr = array('msg' =>Constant::NOT_REGISTERED);\n\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} else {\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\t}", "function kiemtra_email($email)\n {\n if($this->default_model->getInfoID($this->_table,array(\"Email\" => $email))!=TRUE){ // ko ton tai $email\n return TRUE;\n }\n else{\n $this->form_validation->set_message(\"kiemtra_email\",sprintf($this->lang->line('error_kiemtra_email'),$email));\n return FALSE;\n }\n }", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "public function actionUniqueEmailCheck() {\n //validate webservice\n $requiredParams = ['email'];\n\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n $response = [];\n\n //Get request parameters.\n $post = Yii::$app->request->bodyParams;\n $post = array_map('trim', $post);\n $email = $post['email'];\n\n //Email uniqueness check\n $userEmailCheck = Users::find()->where(['email' => $email])->asArray()->one();\n if (empty($userEmailCheck)) {\n return CommonApiHelper::generate_success_response(\"Email Id is available\", []);\n } else {\n return CommonApiHelper::generate_error_response('3', 'Email Id has been already registered. Please try with different email Id.');\n }\n }", "public function checkEmail()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(false);\n }\n else\n {\n echo json_encode(true);\n }\n }", "function checkEmail()\n {\n\t\t\t$email = $_POST['email'];\n\n\t\t\t// Check its existence (for example, execute a query from the database) ...\n\t\t\t$email_cek = $this->account_model->Check_TblUsers('email',$email);\n\t\t\t\n\t\t\tif($email_cek == 0)\n\t\t\t{\n\t\t\t\t$isAvailable = true;\n\t\t\t}else{\n\t\t\t\t$isAvailable = False;\n\t\t\t} \n\n\t\t\t// Finally, return a JSON\n\t\t\techo json_encode(array(\n\t\t\t\t'valid' => $isAvailable,\n\t\t\t));\n\t\t}", "public function checkRegisteredEmail()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n \n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }", "static function confirm_email($email, $key) {\n // update data base to email_confirmed = 1 if the key is correct\n \n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` = '\".$email.\"' AND `hash` = '\".$key.\"';\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 1) { // the given key exists\n $sql = \"UPDATE `user` SET `email_confirmed` = 1 WHERE `id` = \".self::email2id($email).\";\";\n $query = mysqli_query($con, $sql);\n return TRUE;\n }\n return FALSE;\n }", "public function email(HttpRequest $request)\n\t{\n\n\t\t// Form validator\n\t\t$validator = Validator::make(\n\t\t\tInput::all(), \n\t\t\tarray(\n\t\t\t\t'mail' => 'bail|required|email'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->passes()) {\n\n\t\t\t$is_valid_email = ValidatorModel::email(Input::get('mail'));\n\n\t\t\tif ($is_valid_email) {\n\n\t\t\t\treturn $is_valid_email;\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\treturn Msg::error('Email is not available.');\n\t\t\t}\n \n } else {\n\n \treturn Msg::error('Invalid email.');\n }\n\t}", "function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }", "private function makeRequestUsingEmail()\n {\n if(!empty($this->_email))\n {\n // Now make sure this person exists in our database\n $query = $this->pdo->prepare(\"SELECT * FROM users WHERE email=:email\");\n $query->execute(array(\n ':email' => $this->_email\n ));\n\n if($query->rowCount() == 1)\n {\n // Now construct the request by first making the request id and passing in the unique_salt_id\n $fetch = $query->fetch(PDO::FETCH_ASSOC);\n // Now use the users salt id to make a new request\n// $this->_request_id = md5($fetch['unique_string_id']) . $this->_CI->encryption->randomHash();\n\n $this->_request_id = md5($fetch['unique_string_id']) . md5(uniqid(rand(), true));\n\n // Also since this is the username we need to send a email to the user. Now fetch the email and use it\n $this->_email = $fetch['email'];\n\n // Now construct the request and send everything\n $this->constructRequest($fetch['unique_string_id']);\n return false;\n }else{\n echo $this->_CI->response->make(\"There is no account with this email!\", 'JSON', 0);\n return false;\n }\n }\n }", "public function validateEmail()\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 $test = trim($_POST[$this->key]);\n\n if (!empty(trim($_POST[$this->key])) && isset($test)) {\n $valid = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);\n if (!$valid) {\n self::$errors[] = \"Email is not valid!\";\n }\n }\n return self::$errors ? false : true;\n }", "public function isExists(Request $request){\n $mode = $this->isEmail($request->phn_or_email);\n $user = null;\n $flashmail=$request->phn_or_email;\n if($mode){\n $user = User::where('email', $request->phn_or_email)->first();\n }else{\n $user = User::where('phone', $request->phn_or_email)->first();\n }\n if($user){\n $data['flag'] = 6;\n Session::flash ( 'email', $flashmail );\n return redirect('login-user')->with(['msg2' =>'You already have an account, Please login using ' . $request->phn_or_email,'phn_or_email' => $request->phn_or_email]);\n }else{\n return redirect('registration')->with('msg', 'You dont have an account, Please register.');\n }\n }", "function requestRequires($fields, $request){\n \treturn !array_diff_key(array_flip($fields), $request);\n }", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "function _email_callback($email)\n {\n $id = $this->uri->segment(4);\n $data = $this->user_model->email_validation($id, $email);\n \n if ($data->num_rows() > 0) {\n $this->form_validation->set_message('_email_callback', '%s already taken.');\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function hasEmailAddress()\n {\n return $this->_hasVar('user_email') && $this->_getVar('user_email');\n }", "public function uniqueEmail() {\n if (CmsUser::model()->exists(\"id != \" . userId() . \" AND email='{$this->register_email}'\")) {\n $this->addError('register_email', 'Email already exist');\n }\n }", "public function checkEmail(){\n\t\t\t$user = new User;\n\t\t\t$doubleCount = $user->where('login','=', Input::get('new_user_email'))->count();\n\t\t\t\n\t\t\tif($doubleCount > 0){\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>1,\n\t\t\t\t\t'msg'=>trans('alerts.exist_email')\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>0,\n\t\t\t\t\t'msg'=>'good email'\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\treturn Response::json($result);\n\t\t}", "public function verifyEmailAddress($request)\n {\n return $this->startAnonymous()->uri(\"/api/user/verify-email\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getReqEmail()\n\t{\n\t\treturn $this->req_email;\n\t}", "function _elastic_email_has_valid_settings() {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, NULL);\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, NULL);\n\n if (is_null($site_mail) || $site_mail == '') {\n return FALSE;\n }\n if (is_null($username) || $username == '') {\n return FALSE;\n }\n if (is_null($api_key) || $api_key == '') {\n return FALSE;\n }\n return TRUE;\n}", "public function hasByEmail(Email $email): bool\n {\n }", "function check_forgot_password(Request $request) {\n\n //set email \n $email = Request::all();\n\n $encrypted_email = Crypt::encrypt($email['email']);\n\n $rules = array('email' => 'required|email');\n\n $message = array(\n 'email.required' => 'The Email field is required',\n );\n // validate email address\n $validator = Validator::make($email, $rules, $message);\n\n if ($validator->fails()) {\n return redirect('forgot_password')->withErrors($validator);\n } else {\n //check email address in database\n $email_data = DB::table('users')->where('email', $email['email'])->get();\n //if email existing\n if ((count($email_data)) > 0) {\n\n //redirect\n return view('User/forgot_pass', ['encrypted_email' => $encrypted_email]);\n } else {\n // incorrect email\n return redirect('forgot_password');\n }\n }\n }", "private function _requestHasParam(string $key, array $request)\n {\n return array_key_exists($key, $request);\n }", "public function socialEmail()\n {\n if (!$this->request->session()->check(Configure::read('Users.Key.Session.social'))) {\n throw new NotFoundException();\n }\n }", "private function verify_parameters(){\n if( empty( $_GET['email'] ) || empty( $_GET['pms_key'] ) || empty( $_GET['subscription_id'] ) )\n return false;\n\n return true;\n }", "public function has_email() {\r\n $options = get_option( 'myhome_redux' );\r\n if ( array_key_exists( 'mh-agent-email_show', $options ) && empty( $options['mh-agent-email_show'] ) ) {\r\n return false;\r\n }\r\n return ! empty( $this->email );\r\n }", "protected function has_request( $key = '' ) {\n\t\treturn $this->has( $key, 'REQUEST' );\n\t}", "public function validUniqueMail() {\n $em = $this->getDoctrine()->getManager();\n $Person = $em->getRepository('UNOEvaluacionesBundle:Person')->findOneBy(array('email' => $this->_datPerson[email]));\n if ($Person) {\n #si existe el mail, por lo que hay q pedirle q ingrece otro\n return false;\n }else{\n return true;\n }\n\n }", "public function verifyemail($key){\n $data = array('confirmed' => 1);\n $this->db->where('md5(email)', $key);\n return $this->db->update('BusinessOwner', $data);\n }", "private function emailExists( $email ) {\n global $wpdb;\n $query = \"select author_email from \" . $wpdb->prefix . \"roni_images where author_name='\" . $email . \"';\";\n if( empty($wpdb->query( $query ) ) ) {\n return true;\n } else {\n return false;\n }\n }", "public static function Has($key)\n {\n return array_key_exists($key, $_REQUEST);\n }", "public function exists($email, $token);", "public function checkEmail($sender,$param)\r\n\t{\r\n\t\t$userRecord=TblUsers::finder()->findBy_email($this->Email->Text);\r\n\r\n\t\tif($userRecord != null)\r\n\t\t\t$param->IsValid = false;\r\n\t}", "public function CheckEmail($email, $userId);", "private function email ($param)\n {\n if(!filter_var($this->value, FILTER_VALIDATE_EMAIL))\n {\n $this->SetError('email', 'The '.$this->SpacedKey.' field must be a valid email address');\n return false;\n }\n return true;\n }", "#[Route('/check-email', name: 'app_check_email')]\n function checkEmail(): Response\n {\n // Generate a fake token if the user does not exist or someone hit this page directly.\n // This prevents exposing whether or not a user was found with the given email address or not\n if (null === ($resetToken = $this->getTokenObjectFromSession())) {\n $resetToken = $this->resetPasswordHelper->generateFakeResetToken();\n }\n\n return $this->render('security/reset_password/check_email.html.twig', [\n 'resetToken' => $resetToken,\n ]);\n }", "public static function has($key, $request_method = ''){\n \n if($request_method == '')\n $request_method = strtolower(self::method());\n else \n $request_method = strtolower ($request_method);\n \n $inputkeys = self::{$request_method}();\n \n if(array_key_exists($key, $inputkeys)){ \n \n if(is_null($inputkeys[$key])){\n return FALSE;\n }\n \n return TRUE;\n }\n else \n return FALSE;\n }", "public function checkEmailExistsAjaxAction()\n {\n if(isset($_POST['Email']) && !empty($_POST['Email'])) {\n header('Content-type: text/plain');\n if(UserModel::emailExists($this->filterString($_POST['Email'])) !== false) {\n echo 1;\n } else {\n echo 2;\n }\n }\n }", "public function check_email_if_exist($email = \"\"){\r\n $query = $this->db->get_where('view_customer_info', array('email' => $email,'is_finish_registration'=>\"1\"));\r\n return $query->row_array();\r\n }", "public function exist_email()\r\n {\r\n $email = $this->input->post('email');\r\n \r\n $this->load->model('frontend/user_model');\r\n \r\n $record = $this->user_model->select('COUNT(id) as total')->find_by(array('email' => $email));\r\n \r\n if ($record->total == 0)\r\n echo false;\r\n else\r\n echo true; \r\n }", "public function email_verify() {\n $return = array();\n $email = $this->input->post('email');\n $user = new User();\n $user->where(\"email\", $email)->get();\n $return = ($user->exists()) ? FALSE : TRUE;\n echo json_encode($return);\n }", "public function verifyContainsEmail(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidEmail($word)) {\n return true;\n }\n }\n \n return false;\n }", "public function verifyEmailAddressByUserId($request)\n {\n return $this->start()->uri(\"/api/user/verify-email\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "private function filterInputValidateEmail() {\n if (!$email = filter_input(INPUT_POST, 'email')) {\n $this->response['errors'][] = [\n 'inputName' => 'email',\n 'message' => $this->language->getText('reset-password', 'error-email-empty')\n ];\n $this->response;\n return false;\n }\n if (!$email = filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->response['errors'][] = [\n 'inputName' => 'email',\n 'message' => $this->language->getText('reset-password', 'error-email-invalid')\n ];\n $this->response;\n return false;\n }\n return $email;\n }", "function isEmail($field_data) \n{ \n\t$fields_ok=preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\" , $field_data); \n\treturn $fields_ok; \n}", "function existsByEmail( $email, $oid=null);", "public function has( $key )\n\t{\n\t\treturn $this->request->has($key);\n\t}", "function checkEmailExists()\n {\n $userId = $this->input->post(\"userid\");\n $email = $this->input->post(\"email\");\n\n if (empty($userId)) {\n $result = $this->user_model->checkEmailExists($email);\n } else {\n $result = $this->user_model->checkEmailExists($email, $userId);\n }\n\n if (empty($result)) {\n echo(\"true\");\n } else {\n echo(\"false\");\n }\n }", "function inputHas($key)\n\t{\n\treturn isset($_REQUEST[$key]);\n\t\n\t}", "function checkEmailExists()\n {\n $userId = $this->input->post(\"userId\");\n $email = $this->input->post(\"email\");\n\n if(empty($userId)){\n $result = $this->user_model->checkEmailExists($email);\n } else {\n $result = $this->user_model->checkEmailExists($email, $userId);\n }\n\n if(empty($result)){ echo(\"true\"); }\n else { echo(\"false\"); }\n }", "public function _unique_email() {\r\n // UNLESS it's the email for the current user\r\n\r\n $id = $this->uri->segment(4);\r\n $this->db->where('email', $this->input->post('email'));\r\n !$id || $this->db->where('id !=', $id);\r\n $account = $this->account_model->get();\r\n\r\n if (count($account)) {\r\n $this->form_validation->set_message('_unique_email', '%s này đã tồn tại');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "public function verifyEmailID($key)\n\t\t{\n\t\t\t$data = array('status' => 1);\n\t\t\t$this->db->where('md5(email)', $key);\n\t\t\treturn $this->db->update('tb_siswa', $data);\n\t\t}", "public function actionCheck_email() {\n if (isset($_POST['email']) != 0) {\n $output = '0';\n $email = $_POST['email'];\n $course = $_POST['course'];\n // if (preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$^\", $email)) {\n $modules = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE email='$email' and course='$course'\")->queryAll();\n if (!empty($modules)) {\n $output = '1';\n }\n // }\n return $output;\n } else {\n return $this->redirect(['dv-registration/index']);\n }\n }", "function inputHas($key){\n\n\treturn isset($_REQUEST[$key]);\n\n}" ]
[ "0.6737034", "0.6660183", "0.6614548", "0.65276796", "0.64959806", "0.64825976", "0.6469953", "0.6434258", "0.64230204", "0.6420706", "0.6395769", "0.6394716", "0.6366026", "0.632835", "0.6165209", "0.61529183", "0.61512333", "0.61341697", "0.61320317", "0.61040586", "0.60866433", "0.6084232", "0.6072526", "0.6062272", "0.6054659", "0.6044657", "0.6023962", "0.6012337", "0.6008249", "0.6003002", "0.5997803", "0.5992594", "0.5980523", "0.5978241", "0.597301", "0.5962382", "0.59575385", "0.59376484", "0.5937328", "0.5910304", "0.5898885", "0.58988255", "0.5897444", "0.58903664", "0.5875458", "0.5837622", "0.5826887", "0.5798804", "0.57972807", "0.57777184", "0.5746865", "0.573933", "0.5733743", "0.5712322", "0.57029754", "0.5702186", "0.5697418", "0.5685275", "0.5680385", "0.5679402", "0.5665186", "0.5657308", "0.56446034", "0.5641589", "0.56404567", "0.5627192", "0.56199896", "0.5601389", "0.55992895", "0.55965286", "0.5591262", "0.55894303", "0.5588434", "0.5585966", "0.55857855", "0.5584947", "0.55838126", "0.5583172", "0.5573444", "0.5573392", "0.5564474", "0.55592376", "0.5558907", "0.5548778", "0.5532748", "0.5530368", "0.55294925", "0.55290234", "0.552283", "0.55220634", "0.5520979", "0.55166215", "0.5512546", "0.5505009", "0.5502651", "0.5502048", "0.5497323", "0.54890287", "0.54859096", "0.54796255" ]
0.5967593
35
Checks $request if it contains a key firstname
private function handleKeyFirstname(UserInterface $user, Request $request) { $data = $request->request->all(); if (array_key_exists('firstname', $data)) { // Check if firstname is empty. At least firstname is required. if (null == $data['firstname']) { $this->logAndThrowError(400, 'Invalid empty firstname', $this->get('translator')->trans('api.show_error_firstname', array(), 'messages', $request->getLocale()), $request->getLocale()); } $user->setFirstname($data['firstname']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestFirstname();", "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 }", "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 getReqFirstName()\n\t{\n\t\treturn $this->req_first_name;\n\t}", "public function hasFirstName() {\n return $this->_has(2);\n }", "public function getFirstName_always_returnCorrectly()\n {\n $this->assertEquals($this->user['user_metadata']['firstname'], $this->entity->getFirstName());\n }", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "function nameValidator() {\n\t\tglobal $firstname;\n\t\treturn ctype_alpha($firstname);\n\t}", "public function getFirstname() {}", "public function testRegisterBlankFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t' ',\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "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 validateFirstname($firstname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$firstname)){\n return true;\n }else{\n return false;\n }\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n {\n return $this->response['first_name'] ?: null;\n }", "public function first_name_is_required_on_create()\n {\n $this\n ->from('nova/resources/users/new')\n ->post('nova-api/users', [\n 'first_name' => '',\n ])\n ->assertRedirect('nova/resources/users/new')\n ->assertSessionHasErrors('first_name');\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}", "private function handleKeyLastname(UserInterface $user, Request $request) {\n $data = $request->request->all();\n\n if (array_key_exists('lastname', $data)) {\n $user->setLastname($data['lastname']);\n }\n }", "public function testRegisterInvalidFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t'aasd asdf fsd 5', // 31 chars\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstName;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName(){\n \n return $this->first_name;\n \n }", "public function userHasProfileFirstname()\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->firstname, $name[0]);\n }", "public function getFirstName()\n {\n if (isset($this->response['name']) && isset($this->response['name']['givenName']))\n {\n return $this->response['name']['givenName'];\n }\n\n return null;\n }", "protected function first_name() {\n $element = new Text('first_name');\n $element->setLabel('First Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'First Name is required'))\n ));\n $this->add($element);\n }", "public function setFirstName($value){\n $this->first_name = $value;\n }", "private function validateFirstName($first)\n {\n if (strlen($first) > 25 || strlen($first) < 2) {\n array_push($this->errorArray, \"Your first name must be between 25 & 2 characters\");\n return;\n }\n }", "public function setFirstName($first_name) {\n $this->user_first_name = $first_name;\n }", "public function getFirstName()\r\n\t{\r\n\t\treturn $this['firstName'];\r\n\t}", "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 getFirstname() {\n return $this->firstname;\n }", "public function setFirstName($firstname){\n\t\t\t$this->firstname = $firstname;\n\t\t}", "public function setFirstName($first_name)\n\t{\n\t\t$this->first_name = $first_name;\n\t}", "public function getFirstName() {}", "public function getFirstName() {}", "function setFirstName($name)\n {\n $this->addParam('first_name', (string)$name);\n }", "public function getFirstname()\n\t{\n\t\treturn $this->firstname;\n\t}", "public function getFirstName()\n {\n return $this->get('FirstName');\n }", "private function validateFirstName($fn){\n if(strlen($fn)<2 || strlen($fn)>25){\n array_push($this->errorArray, Constants::$firstNameCharecters);\n }\n }", "public function getFirstNameOrUsername() {\n return $this->first_name ? : $this->username;\n }", "public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }", "public function setFirstName($u_fname) {\n\n $this->u_fname = $u_fname;\n\n }", "public function getFirstname() {\n\t\treturn $this->firstname;\n\t}", "public function getFirstName();", "public function diviroids_user_firstname($atts)\n {\n return DiviRoids_Security::get_current_user('user_firstname');\n }", "public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName()\n {\n if(isset($this->facebookData['first_name'])) {\n return $this->facebookData['first_name'];\n } else {\n return $this->getName();\n }\n }", "function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstName()\n {\n return $this->firstname;\n }", "public function set_firstname($firstname) {\n $this->firstname = $firstname;\n }", "public function getFirstName(){\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function GetFirstName()\n {\n return $this->firstname;\n }", "public function getHonoreeFirstName();", "private function validateFirstName($fn)\r\n {\r\n if (strlen($fn) > 25 || strlen($fn) < 2) {\r\n array_push($this->errorArray, Constants::$firstNameCharacters);\r\n return;\r\n }\r\n\r\n }", "public function getFirstName() {\n return $this->firstname;\n }", "function setFirstName($firstName);", "public function requestSurname();", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n }", "public function setFirstName($firstName)\n {\n $this->firstName = $firstName;\n }", "public function setFirstName($newFirstName) {\n //sanitize the string\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->firstName = $newFirstName;\n }", "public function getFirstName(): ?string\n {\n return $this->getParam(self::FIRST_NAME);\n }", "function getFirstName() {\n\t\treturn $this->getInfo('FirstName');\n\t}", "private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}", "public function getRequestUserName() {\n if(isset($_POST[self::$name])){\n return trim($_POST[self::$name]);\n }\n\t}", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "public function getFirstName()\n {\n return $this->first_name;\n }", "function getFirstName()\r\n\t{\r\n\t\treturn $this->FirstName;\r\n\t}", "public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}", "public function getCustomerFirstname();", "public function testRegisterLongFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\tstr_repeat('abcde', 6)+ 'a', // 31 chars\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function getFirstName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['firstName'];\n }\n return null;\n }", "public function getFirstNameAttribute(): string\n {\n if ($this->user !== null) {\n return $this->user->first_name;\n }\n return '';\n }", "public function getFirstName()\n {\n return $this->first_name ?? $this->nickname ?? $this->name;\n }", "function set_first_name($first_name='*')\r\n{\r\n\t$this->first_name = '';\t\t// return\r\n\t\r\n\t// Get Random Name\r\n\tif ( $first_name == '*' )\r\n\t{\r\n\t\tif ( !isset($this->gender) ) $this->set_gender();\r\n\t\t$this->first_name = $this->_get_random_first_name($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->first_name = $first_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->first_name = ucwords($this->first_name);\r\n\t\r\n\t// adjust hyphenates\r\n\tif ( $_pos = strpos($this->first_name, '-') )\r\n\t{\r\n\t\t$this->first_name = substr($this->first_name, 0, $_pos+1) . '-' . ucwords( substr($this->first_name, $_pos+1) );\r\n\t}\r\n\t\r\n\treturn $this->first_name;\r\n}", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }", "public function getFirstName()\n {\n return $this->firstName;\n }" ]
[ "0.74195737", "0.6942196", "0.676981", "0.6685169", "0.6506473", "0.6420983", "0.6261692", "0.62095326", "0.61524653", "0.61272323", "0.6111696", "0.60673445", "0.60331047", "0.5994855", "0.5972798", "0.59704715", "0.5967549", "0.5948522", "0.5933441", "0.5922871", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5914432", "0.5909512", "0.5909249", "0.59083223", "0.59065574", "0.5905837", "0.5895744", "0.58915704", "0.5882996", "0.58808744", "0.5873762", "0.58506185", "0.5849373", "0.5841883", "0.5841883", "0.5841517", "0.5840081", "0.58397806", "0.5839259", "0.5829416", "0.5824578", "0.5816629", "0.5811863", "0.5811709", "0.580934", "0.58039", "0.5802783", "0.5790919", "0.57890975", "0.57877696", "0.577988", "0.57464045", "0.5734485", "0.5733695", "0.5727646", "0.57182103", "0.57142514", "0.57038987", "0.57036245", "0.57036245", "0.56987715", "0.56932306", "0.5686822", "0.56816995", "0.56804794", "0.5679281", "0.5679281", "0.5679281", "0.5679281", "0.5679281", "0.5679199", "0.56557184", "0.56491405", "0.56444985", "0.56359965", "0.5634625", "0.56303936", "0.56291306", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397", "0.5622397" ]
0.69370884
2
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 }", "function set_last_name($last_name='*')\r\n{\r\n\t$this->last_name = '';\t\t// return\r\n\t\r\n\t// get random name\r\n\tif ( $last_name == '*' )\r\n\t{\r\n\t\t$this->last_name = $this->_get_random_last_name();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->last_name = $last_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->last_name = ucwords($this->last_name);\r\n\t\r\n\t// tweaks\r\n\tif ( substr($this->last_name, 0, 2) == 'Mc' ) $this->last_name = 'Mc' . ucwords( substr($this->last_name, 2) );\r\n\t\r\n\treturn $this->last_name;\r\n}", "public function setLastname($lastname) {\n $this->lastname = $lastname;\n }", "private function validateLastName($ln)\r\n {\r\n if (strlen($ln) > 25 || strlen($ln) < 2) {\r\n array_push($this->errorArray, Constants::$lastNameCharacters);\r\n return;\r\n }\r\n\r\n }", "public function getLastName();", "public function allowedName($firstname,$lastname) {\n\t\t$jopensimsettings = $this->getSettings();\n\n\t\tif(\t\t\tis_array($jopensimsettings) &&\n\t\t\t\t\tarray_key_exists(\"lastnametype\",$jopensimsettings) &&\n\t\t\t\t\tarray_key_exists(\"lastnames\",$jopensimsettings) &&\n\t\t\t\t\t$jopensimsettings['lastnametype'] != 0 &&\n\t\t\t\t\tis_array($jopensimsettings['lastnames']) && \n\t\t\t\t\tcount($jopensimsettings['lastnames']) > 0) {\n\t\t\tif($jopensimsettings['lastnametype'] == \"-1\" && in_array($lastname,$jopensimsettings['lastnames'])) {\n\t\t\t\t$message = JText::_(PLG_JOPENSIMREGISTER_ERROR_MESSAGE_DENIED);\n\t\t\t\t$this->returnError($message);\n\t\t\t\t$retval = FALSE;\n\t\t\t} elseif ($jopensimsettings['lastnametype'] == \"1\" && !in_array($lastname,$jopensimsettings['lastnames'])) {\n\t\t\t\t$message = JText::_(PLG_JOPENSIMREGISTER_ERROR_MESSAGE_ALLOWED);\n\t\t\t\t$this->returnError($message);\n\t\t\t\t$retval = FALSE;\n\t\t\t} else {\n\t\t\t\t$retval = TRUE;\n\t\t\t}\n\t\t} else {\n\t\t\t$retval = TRUE;\n\t\t}\n\t\treturn $retval;\n\t}", "public function getName_always_returnCorrectly()\n {\n $name = $this->user['user_metadata']['firstname'].' '.$this->user['user_metadata']['lastname'];\n $this->assertEquals($name, $this->entity->getName());\n }", "public function getLastName()\n {\n return $this->response['last_name'] ?: null;\n }", "public function last_name($value)\n {\n $this->repository->where('last_name', '=', $value);\n }", "private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}", "public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }", "public function setLastname($lastname) {\n\t\t$this->lastname = $lastname;\n\t}", "public function setLastName(string $last_name);", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public function saveLastName()\n {\n $this->validate(['lastName' => 'sometimes|required']);\n\n $this->updateValue(\n 'last_name',\n $this->lastName,\n 'Customer Last name updated successfully.'\n );\n\n $this->lastNameUpdate = false;\n $this->emit('profileUpdate');\n }", "public function getRequestUserName() {\n if(isset($_POST[self::$name])){\n return trim($_POST[self::$name]);\n }\n\t}", "public function getLastname()\r\n {\r\n return $this->lastname;\r\n }", "public function setLastName($lastname){\n\t\t\t$this->lastname = $lastname;\n\t\t}", "public function setLastname($value)\n {\n $this->_lastname = $value;\n }", "public function getReqFirstName()\n\t{\n\t\treturn $this->req_first_name;\n\t}", "public function setLastName($u_lname) {\n\n $this->u_lname = $u_lname;\n\n }", "public function checkValidName($firstname,$lastname) {\n\t\t$existing = $this->checkUserExists($firstname,$lastname);\n\t\tif($existing == TRUE) return FALSE; // This OpenSim User is already existing\n\t\telse return $this->allowedName($firstname,$lastname);\n\t}", "function addLastName($author, $lname)\n {\n\n if (!$this->setProfileLName($lname)) {\n return false;\n }\n if (!$this->setUserName($author)) {\n return false;\n }\n\n $sql = \"UPDATE blogUsers SET lastname='\" . $this->lname . \"' WHERE username='\" . $this->author . \"'\";\n return $result = $this->db->query($sql);\n }", "function validate_first_last_name(){\n\n global $bp;\n\n $firstName = $_POST['field_11'];\n $lastName = $_POST['field_12'];\n\n if ( (strlen($firstName) <= 2) && (strlen($lastName) <= 2) ){\n\n //$tld_index = strrpos($email,'.');\n //$tld = substr($email,$tld_index);\n\n //if ($tld != '.edu'){\n\t\n\n $bp->signup->errors['field_11'] = $firstName . ', ' . $lastName . ': Sorry, your first and last names cannot both be 2 characters or less';\n //}\n\n }\n\n}", "public function setLastName($last_name)\n\t{\n\t\t$this->last_name = $last_name;\n\t}", "protected function _filterRequestNames($name)\n {\n return '_' !== $name[0];\n }", "function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname(): string;", "public function getLastName(){\n \n return $this->last_name;\n \n }", "public function getLastname()\n {\n return $this->lastname;\n }", "function checkPOST() : bool\n {\n if (!(isset($_POST['firstName']) && isset($_POST['secondName'])))\n {\n return false; // not set\n }\n if (trim($_POST['firstName']) == '' && trim($_POST['secondName']) == '')\n {\n return false; // empty\n }\n return true;\n }", "public function getLastname()\n {\n return $this->lastname;\n\n }", "public function setReqLastName($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->req_last_name !== $v) {\n\t\t\t$this->req_last_name = $v;\n\t\t\t$this->modifiedColumns[] = VpoRequestPeer::REQ_LAST_NAME;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function testRegisterLongFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\tstr_repeat('abcde', 6)+ 'a', // 31 chars\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function setLastName($last_name) {\n $this->user_last_name = $last_name;\n }", "function validateLastName($field)\n\t{\n //Make sure field is not blank\n if ($field == \"\") return \"Please specify your last name.\\\\n\";\n //Return an error if invalid input\n\t\tif (!preg_match(\"/^[a-zA-Z ,.'-]+$/\", $field)) return \"Invalid characters in last name.\\\\n\";\n\t\treturn \"\";\n\t}", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "function setLastName($lastName);", "private static function userExists() {\r\n\t\tif (!isset($_GET) || !isset($_GET['userName']))\r\n\t\t\treturn self::jsonError('User name missing from request.');\r\n\r\n\t\t// make sure user name is not already taken\r\n\t\tif (UsersDB::userExists($_GET['userName']))\r\n\t\t\treturn self::jsonResponse(true, true, null, 'User name already exists.');\r\n\r\n\t\treturn self::jsonResponse(true, false, null, 'User name does not exist.');\r\n\t}", "public function setHonoreeFirstName($lastName);", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname()\n {\n return $this->lastname;\n }", "public function getLastname() {\n return $this->lastname;\n }", "public function getHonoreeLastName();", "protected function foundLongerFirstName($counter, $key, $value)\n {\n return 'first_name' === $key\n && strlen($this->list[$counter][$key]) < strlen($value);\n }", "public function getFirstname() {}", "public function updateFullName(Request $request)\n {\n // Validation.\n $this->validate($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n ]);\n\n // Obtain the authenticated user's id.\n $id = Auth::id();\n\n // Find the user and update the name from the request.\n $user = User::find($id);\n $user->first_name = ucfirst(request('first_name'));\n $user->last_name = ucfirst(request('last_name'));\n\n // Save the changes.\n $user->save();\n\n // Return true upon success.\n return response()->json([], Response::HTTP_OK);\n }", "public function hasName()\n {\n return isset($this->name);\n }", "public function hasSendername(){\n return $this->_has(5);\n }", "public function testRegisterInvalidFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t'aasd asdf fsd 5', // 31 chars\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function getLastname()\r\n\t{\r\n\t\treturn $this->lastname;\r\n\t}", "public function setUser_lname($user_lname)\n {\n if(strlen($user_lname) <= 50 && strlen($user_lname) > 0 && preg_match('#^[a-zA-Z-]*$#', $user_lname)) {\n $this->user_lname = $user_lname;\n }\n }", "function isNameViable(){\n\t$postName = filter_var($_POST['name'], FILTER_SANITIZE_SPECIAL_CHARS);\n\tif(strlen($postName) < 3){\n\t\treturn false;\n\t}\n\n\t$f = $postName[0]; #first letter is predicted class\n\t$s = $postName[1]; #second letter is actual class\n\t#third letter is '_'\n\tif(($f=='B' || $f=='D' || $f=='F' || $f=='L' || $f=='R') && \n\t\t($s=='B' || $s=='D' || $s=='F' || $s=='L' || $s=='R') &&\n\t\t$postName[2]=='_'){\n\t\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n}", "public function hasName()\n {\n return $this->name !== null;\n }", "public function getFirstName_always_returnCorrectly()\n {\n $this->assertEquals($this->user['user_metadata']['firstname'], $this->entity->getFirstName());\n }", "private function getRequestUserName() {\n\t\t//RETURN REQUEST VARIABLE: USERNAME\n if(!empty($_POST[self::$userName])){\n\t\t\treturn $_POST[self::$userName];\n\t\t}\n else{\n return \"\";\n }\n\t}", "public function getLastname()\n {\n return $this->lastname;\n }", "public function beforeSave() {\n\t\tif(isset(Yii::app()->params->admin)) {\n\t\t\t$admin = Yii::app()->params->admin;\n\t\t\tif(!empty($admin->contactNameFormat)) {\n\t\t\t\t$str = $admin->contactNameFormat;\n\t\t\t\t$str = str_replace('firstName',$this->firstName,$str);\n\t\t\t\t$str = str_replace('lastName',$this->lastName,$str);\n\t\t\t} else {\n\t\t\t\t$str = $this->firstName.' '.$this->lastName;\n\t\t\t}\n\t\t\tif($admin->properCaseNames)\n\t\t\t\t$str = $this->ucwords_specific($str,array('-',\"'\",'.'),'UTF-8');\n\t\t\t\n\t\t\t$this->name = $str;\n\t\t}\n\t\t\n\t\treturn parent::beforeSave();\n\t}", "public function testRegistrationNoLastname()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', '')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->assertSee('Save');\n });\n }", "public function postName(Request $request)\n {\n $user = User::where('username', $request->username)->count();\n $exists = $user > 0 ? \"<small class='form-text text-danger'>Sorry, <strong>\" . $request->username . \"</strong> is already registered</small>\" :\n \"\";\n return response($exists);\n }", "public function testRegisterBlankFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t' ',\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function testRegisterBlankSurname() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t' ',\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function getLastname() {\n\t\treturn $this->lastname;\n\t}", "public function setLastName($newLastName) {\n //sanitize the string\n $newLastName = filter_var($newLastName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->lastName = $newLastName;\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.5406977", "0.54053855", "0.53950113", "0.53918344", "0.537893", "0.53740126", "0.5369941", "0.5358338", "0.53559023", "0.5355646", "0.5349898", "0.5346309", "0.5313894", "0.53111494", "0.52979785", "0.5280834", "0.52795744", "0.52780545", "0.5274502", "0.52674186", "0.52442664", "0.5239742", "0.52368116", "0.5227052", "0.522387", "0.5220355", "0.5220049", "0.52155024", "0.5213419", "0.52097094", "0.5205621", "0.5203492", "0.5196497", "0.5189387", "0.51840454", "0.5166268", "0.516467", "0.51589364", "0.51559347", "0.515425", "0.515425", "0.515425", "0.515425", "0.515425", "0.515425", "0.515425", "0.515425", "0.5153811", "0.51521146", "0.51494604", "0.5144898", "0.5140544", "0.5135555", "0.5134888", "0.51313454", "0.512923", "0.5127967", "0.51247835", "0.5115884", "0.51141673", "0.50965726", "0.5093275", "0.50920296", "0.5090919", "0.5085651", "0.50802404", "0.5078999", "0.50741416", "0.50685704", "0.50595266" ]
0.6838159
0
Checks $request if it contains a key dob
private function handleKeyDob(UserInterface $user, Request $request) { $data = $request->request->all(); if (array_key_exists('dob', $data)) { // Check if dob is valid list($mm,$dd,$yyyy) = array_merge( explode('/',$data['dob']), array(0,0,0) ); if (!checkdate($mm,$dd,$yyyy)) { $this->logAndThrowError(400, 'Invalid mm/dd/yyyy DOB: '.$data['dob'], $this->get('translator')->trans('api.show_error_dob', array(), 'messages', $request->getLocale()), $request->getLocale()); } $user->setDob($data['dob']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function has_request( $key = '' ) {\n\t\treturn $this->has( $key, 'REQUEST' );\n\t}", "private function _requestHasParam(string $key, array $request)\n {\n return array_key_exists($key, $request);\n }", "function inputHas($key) {\n\t// check to see if $_REQUEST has a key/value\n\t// return true if the $key is set on $_REQUEST\n\t// else return true if it is not\n\treturn isset($_REQUEST[$key]);\n\n}", "function exist_param($fieldname){\n return array_key_exists($fieldname, $_REQUEST);\n }", "public static function has($key, $request_method = ''){\n \n if($request_method == '')\n $request_method = strtolower(self::method());\n else \n $request_method = strtolower ($request_method);\n \n $inputkeys = self::{$request_method}();\n \n if(array_key_exists($key, $inputkeys)){ \n \n if(is_null($inputkeys[$key])){\n return FALSE;\n }\n \n return TRUE;\n }\n else \n return FALSE;\n }", "function post_has($key)\n{\n\treturn System::request()->postHas($key);\n}", "function inputHas($key)\n\t{\n\treturn isset($_REQUEST[$key]);\n\t\n\t}", "function inputHas($key){\n\n\treturn isset($_REQUEST[$key]);\n\n}", "function requestRequires($fields, $request){\n \treturn !array_diff_key(array_flip($fields), $request);\n }", "public function has( $key )\n\t{\n\t\treturn $this->request->has($key);\n\t}", "public static function Has($key)\n {\n return array_key_exists($key, $_REQUEST);\n }", "function validateRequest(){\n // if ($_GET['key'] != getenv(\"LAB_NODE_KEY\")){\n // exit;\n // }\n if ($_GET['key'] != ''){\n exit;\n }\n }", "protected function isPostRequestExists($key)\n {\n $post = $this->getPostRequest();\n\n return isset($post[$key]);\n }", "public static function has($key)\n {\n return isset(self::$__request[$key]);\n }", "public static function has($key) {\n return isset($_REQUEST[$key]);\n }", "public static function has($key)\n {\n return isset($_REQUEST[$key]);\n }", "protected function isAvailable(Request $request)\n {\n $data = [];\n $map = $this->getMap($this->getName($request));\n\n return !data_get($map,'except',false);\n }", "private function checkrequest()\n {\n // This method checks if there is user input, and returns the request_method if evaluated to be true\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->request = \"post\";\n return true;\n } elseif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n $this->request = \"get\";\n return true;\n } else {\n $this->request = false;\n }\n }", "public function supports(Request $request) : bool\n {\n return $request->headers->has(Constants::APP_KEY_HEADER_NAME);\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n return !is_null(key($this->requests));\n }", "function request($key){\n if (array_key_exists($key, $_REQUEST)){\n return $_REQUEST[$key];\n }\n return null;\n}", "function get_has($key)\n{\n\treturn System::request()->getHas($key);\n}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "private function verify_store_request(Request $request): bool\n\t{\n\t\tif (\n\t\t\tisset($request->document_id) &&\n\t\t\tisset($request->state) &&\n\n\t\t\tisset($request->field_hierarchy) &&\n\t\t\tcount($request->field_hierarchy) > 0 &&\n\n\t\t\tisset($request->document_template) &&\n\t\t\tisset($request->signatories)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function requestIsValid() : bool\n {\n $queryParams = $this->request->getQueryParams();\n\n return array_has($queryParams,self::OPENID_ASSOC_HANDLE)\n && array_has($queryParams,self::OPENID_SIGNED)\n && array_has($queryParams,self::OPENID_SIG);\n }", "private function checkLookupRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'effBegin' => 'required|date',\n 'effEnd' => 'required|date|after_or_equal:effBegin',\n 'lovLtyp' => 'required|max:10',\n 'lovLook1' => 'required|max:20',\n 'lovLook2' => 'nullable|max:20',\n 'lovLook3' => 'nullable|max:20',\n 'lovLook4' => 'nullable|max:20',\n 'lovLook5' => 'nullable|max:20',\n 'description' => 'nullable|max:255',\n 'name' => 'required|max:50',\n 'code' => 'required|max:20|alpha_dash'\n ]);\n }", "public function isLogedInOrHasKey(){\n if (isset($_GET['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_GET['key'], $this->keys) )) ) return true;\n \n if (isset($_POST['key']) && (Yii::app()->user->isGuest) && (\n (in_array($_POST['key'], $this->keys) )) ) return true;\n \n return false;\n }", "function req($key) {\r\n\treturn val(Request::$data, $key);\r\n}", "private function validate_query_key()\n {\n if (!isset($this->arrSearch['query'])) {\n throw new DocumentSearchMissingSearch('Missing request \"query\" key!');\n }\n }", "protected function _is_valid_request($request) {\n if ( empty($request) ) {\n return true;\n }\n return Auth::is_token_valid($request, $this->classname());\n }", "protected function is_valid_key($key)\n {\n }", "function hasPost($p_sKey) {\n\t\treturn array_key_exists($p_sKey, $_POST);\n\t}", "function check($key) {\n\t\tswitch ($key) {\n\t\t\tcase 'name':\n\t\t\tcase 'email':\n\t\t\tcase 'type_demande':\n\t\t\t\t// field(s) is(are) compulsory\n\t\t\t\treturn $this->checkEmpty($key);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// any other field is fine as it is\n\t\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}", "public function hasRequest(): bool;", "public function hasRequest(): bool;", "public function hasRequest(string $name): bool {}", "protected function checkCronjobKey() {\n return (!isset($_REQUEST['key']) || ($_REQUEST['key'] != $this->cronjob_key)) ? false : true;\n }", "public function postExists($key) {\n return isset($_POST[$key]);\n }", "public function issetPost($key){\n if(isset($this->post[$key])){\n return true;\n }\n \n return false;\n }", "function is_request(): bool\n{\n return isset($_REQUEST);\n}", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function hasKey(){\n return $this->_has(1);\n }", "public function canProcessRequest(Request $request)\n {\n $hasEventKey = $request->has($this->eventKey);\n if ($hasEventKey === false) {\n return false;\n }\n\n $isCorrectEvent = $request->get($this->eventKey) == $this->eventValue;\n\n return $isCorrectEvent;\n }", "public function hasRequestBeenHandled() : bool\n {\n return $this->requestHandled;\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "private function isValidRequest(Request $request) :bool\n {\n return $request->getContentType() === 'json';\n }", "public function isRequestAllowed(Request $request);", "private function check_api_key() {\n return true;\n $post_token = $this->input->post('App-Request-Token');\n $post_datetime = $this->input->post('App-Request-Timestamp');\n if ($post_token && $post_datetime) {\n $date = gmdate('Y-m-d H:i:s');\n if (strtotime($post_datetime) >= (strtotime($date) - 300) && strtotime($post_datetime) <= strtotime($date)) {\n $token = sha1(config_item('api_request_key') . $post_datetime);\n if ($post_token === $token) {\n return true;\n }\n }\n } else {\n $this->send_error('ERROR');\n exit;\n }\n }", "public function isRequest();", "public function validateApiKey()\n {\n $request = $this->call('GET', 'helper/ping');\n return !empty($request);\n }", "function checkrequest($name)\n {\n\t if($this->is_post()||$this->updatemode==true){\n\t\t return $_REQUEST[$name];\n/*\t\t if(isset($_REQUEST[$name])) {\n\t\t\t return $_REQUEST[$name];\n\t\t }\n\t\t elseif($_REQUEST[$name]==\"\") {\n\t\t return \"\";\n\t\t}*/\n }\n\telse\n\t return \"\";\n }", "private function urlIsExcluded(Request $request): bool\n {\n return $request->is(config('depictr.excluded', []));\n }", "function verifyKey($msg){\n\n // TODO: check if this key is in the database!\n if(isset($_GET['key'])){\n $apiKey = $_GET['key'];\n $userid = $_GET['userid'];\n\n if($apiKey == getApiKey($userid)){\n // Fillter on datatype\n filterRequest($msg);\n }else{\n $msg->message = 'Invalid key!';\n $msg->toJson();\n }\n }else{\n $msg->message = 'Key not set!';\n $msg->toJson();\n }\n}", "public static function isset_REQUEST($key) {\n return isset($_REQUEST[$key]) ? $_REQUEST[$key] : null;\n }", "function allow_in_array_key_exists_before_noncecheck() {\n\tif (array_key_exists('foo', $_POST) === false) { // OK.\n\t\treturn;\n\t}\n\n\twp_verify_nonce( 'some_action' );\n}", "public function existsRequestToken()\n {\n // load token\n $store = $this->getStore();\n $type = $store->loadToken($this);\n\n // get consumer\n $this->_consumer = call_user_func($this->_get_consumer_handler, $store->getConsumerKey());\n\n // return result\n if ($type=='request') {\n return true;\n }\n return false;\n }", "public function hasRequestParameter($name)\n {\n return $this->request_parameter_holder->has($name);\n }", "function validateRequest($requestParams){\n\t\t$ok = true;\n\t\tforeach($this->requiredParmams as $rparam){\n\t\t\tif(!array_key_exists($rparam, $requestParams)){\n\t\t\t\t$ok = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($ok){\n\t\t\tif(!array_key_exists(\"sub\", $requestParams)){\n\t\t\t\t$requestParams[\"sub\"] = false;\n\t\t\t}\n\t\t\t$this->requestParams = $requestParams;\n\t\t}\n\t\treturn $ok;\n\t}", "public function isRequest(): bool\n {\n return $this->form->getMethod() == $this->request->getMethod();\n }", "public function search(Request $request)\n {\n // if($request->get(\"\"))\n }", "public function isValidRequest() {\n }", "public function checkAuthentication(\\WP_Rest_Request $request)\n {\n if ($request->get_param('key') != $this->key) {\n $this->responseJson(['message' => 'Key invalid'], 422);\n }\n\n return $this->handle($request);\n }", "private function dontPerformAction($request)\n {\n return is_null(self::getSecurityToken()) || !$request->getVar('id') || !$request->getVar('type') ||\n !$request->getVar('s') || $request->getVar('s') != self::getSecurityToken();\n }", "public function hasKey()\n\t{\n\t\treturn !empty($this->key);\n\t}", "protected function isDebugbarRequest()\r\n {\r\n return request::segment(1) == config::get('debugbar.route_prefix');\r\n }", "public function apikey_validate(Request $request)\r\n {\r\n $validator = Validator::make($request->all(), [\r\n 'domain' => 'required',\r\n 'key' => 'required',\r\n 'secret_key' => 'required',\r\n ]);\r\n \r\n if ($validator->fails()) {\r\n $response = api_create_response($validator->errors(), $this->failureText, 'Please enter valid input.');\r\n return response()->json($response, $this->statusCodes->bad_request);\r\n }\r\n \r\n\t\t$validateKeys = array(\r\n\t\t\t'key' => $request->key,\r\n\t\t\t'secret_key' => $request->secret_key,\r\n\t\t\t'domain' => $request->domain,\r\n\t\t);\r\n $data = ApikeyModel::where($validateKeys)->first();\r\n\r\n if(isset($data)) {\r\n \r\n // Update used_at\r\n $data->used_at = date('Y-m-d H:i:s');\r\n $data->save();\r\n\r\n $this->responseStatusCode = $this->statusCodes->success;\r\n $response = api_create_response($data, $this->successText, 'Api Key Details.');\r\n \r\n }else{\r\n\r\n $this->responseStatusCode = $this->statusCodes->not_found;\r\n $response = api_create_response(2, $this->failureText, 'No Api Key Found.');\r\n }\r\n \r\n return response()->json($response, $this->responseStatusCode);\r\n }", "public function isMultipleObjectsInRequest(Request $request)\n {\n $keys = array_keys($request->request->all());\n if (is_array($keys) && count($keys) >= 1 && $keys[0] === 0) {\n return true;\n }\n return false;\n }", "public function hasData($key = '');", "private function _api_key_exists()\n {\n $apikey = Apikey::where('secret', '=', $this->_key)->first();\n if (!$apikey) {\n return false;\n }\n return true;\n }", "private function isValidRequest( $request )\n\t{\n\n\t\treturn\n\n\t\t\t$request->input( 'ref' ) == 'refs/heads/' . $this->app['config']->get( 'deployer.repository.branch' ) and\n\t\t\t$request->input( 'project_id' ) == $this->app['config']->get( 'deployer.repository.project_id' ) and\n\t\t\t$request->input( 'repository.url' ) == $this->app['config']->get( 'deployer.repository.repository' );\n\n\t}", "public function hasRequest()\n {\n return $this->request ? true : false;\n }", "public function has(Request $request)\n {\n return !is_null($this->get($request));\n }", "public function existsField($key){ return array_key_exists($key,$this->field_map); }", "public function has_post( $key ) \n\t{\n\t\treturn array_key_exists( $key, $this->POST );\n\t}", "public function add(Request $request)\n {\n // 1. check the key is existed\n if ($request->has('keyname') && $request->has('database')) {\n $redis = Redis::connection($request->get('database'));\n $existingContent = $redis->get($request->get('keyname'));\n if (empty($existingContent)) {\n $redis->set($request->get('keyname'), $request->get('content'));\n return Response::json([\n 'success' => true\n ]);\n } else {\n return Response::json([\n 'success' => false,\n 'message' => 'Key already existed, please use update or create a different key.'\n ]);\n }\n } else {\n return Response::json([\n 'success' => false,\n 'message' => 'Missing mandatory key name and target database.'\n ]);\n }\n }", "private static function isKeyDateField($key){\n\t\t$dateFields = array('EXPIRATION_DATE', \n\t\t\t\t\t\t\t'operationDate',\n\t\t\t\t\t\t\t'currentPeriodStart', \n\t\t\t\t\t\t\t'currentPeriodEnd',\n\t\t\t\t\t\t\t'dateCharge');\n\n\t\tforeach($dateFields as $field){\n\t\t\tif($field === $key){\n\t\t\t\treturn true;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function post_exists($parameter){\n return key_exists($parameter, $_POST) && strlen(trim($_POST[$parameter])) > 0;\n}", "protected function _checkIsForcedFormKeyAction()\n {\n return in_array($this->getRequest()->getActionName(), $this->_forcedFormKeyActions);\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "private function _hasKey() {\n return is_array($this->_keys) && count($this->_keys) > 0;\n }", "public function validateJWKSetRequest(RequestInterface $request, ResponseInterface $response)\n {\n return true;\n }", "protected function validateRequest($request)\n\t{\n\t\t$error = [];\n\t\tforeach($request as $key => $value){\n\t\t\tif(is_array($value) || is_object($value)){\n\t\t\t\tforeach($value as $subKey => $subValue){\n\t\t\t\t\tif($subValue === false){\n\t\t\t\t\t\t$error[$subKey] = \"Invalid value in {$subKey} param in this request\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($value == false){\n\t\t\t\t\t$error = \"Invalid empty value in {$key} param in this request\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(count($error) > 0){\n\t\t\t$this->route = RequestRoute::ExpRouteError;\n\t\t\t$this->request[GlobalSystem::ExpRouteError] = $error;\n\n\t\t\t$errorCode = ErrorCodes::HttpParamsExc;\n\t\t\t$errorCode[GlobalSystem::ExpErrorDesc] = json_encode($error);\n\n\t\t\tErrorManager::throwException($errorCode);\n\t\t}\n\n\t\t$this->request = $request;\n\n\t\treturn true;\n\t}", "protected function requestShouldBeRecorded($request)\n {\n return\n // If the request doesn't contain any cookies, it means device is visiting us for the first time\n empty($request->cookie()) &&\n\n // We avoid requests with prefixes like /api, /admin, etc.\n ! empty(Route::current()) &&\n empty(Route::current()->getPrefix()) &&\n\n // Developer may not have run the migrations\n Schema::hasTable('visitor_user_agents') &&\n\n // Some requests like webhook/ipn do not contain user agents\n ! empty($request->header('user-agent'))\n ;\n }", "private function value_exists( $key ) {\n\t\treturn ! empty( $_POST[ $key ] );\n\t}", "private static function checkRequest(): void\n {\n if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {\n Core::fatalError(__('GLOBALS overwrite attempt'));\n }\n\n /**\n * protect against possible exploits - there is no need to have so much variables\n */\n if (count($_REQUEST) <= 1000) {\n return;\n }\n\n Core::fatalError(__('possible exploit'));\n }", "protected function is_base_request()\n {\n }", "function canHandleRequest() ;", "public function canHandleRequest(\\Eeno\\Http\\Request $request)\n {\n if( strcasecmp($request->method() , $this->method() ) == 0 &&\n strcasecmp($this->url() , $request->url() ) == 0)\n return true;\n return false; \n }", "function checkRequest($req){\n\t//Variables that should be defined for checkRequest. Ideally this would be defined in a abstact/general form.\n\t$methods_supported = array(\"GET\", \"POST\", \"HEAD\", \"DELETE\", \"PUT\");\n\t$request_vars = array(\"start\", \"count\", );\n\n\tif (array_search($req->getMethod(), $methods_supported ) === FALSE){\n\t\tRestUtils::sendResponse(405, array('allow' => $methods_supported));\n\t}\n\tif($req->getMethod() == \"GET\") {\n\t\t//check the request variables that are not understood by this resource\n\t\t$dif = array_diff(array_keys($req->getRequestVars()), $request_vars);\n\t\t//If they are differences then we do not understand the request.\n\t\tif ( count($dif) != 0 ){\n\t\t\tRestUtils::sendResponse(400, array('unrecognized_req_vars' => $dif));\n\t\t\texit;\n\t\t}\n\t}\n\t//TODO - check that path parameters are correct through regulares expressions that validate input types and formats.\n\t//could respond BadRequest also.\n}", "public function exists($request)\n {\n $request_hash = $this->hash_request($request);\n $result = $this->_db->find('first', array('conditions' => array('request_hash' => $request_hash), 'fields' => array('id')));\n\n if (!empty($result)) {\n return true;\n } else {\n return false;\n }\n }", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "public function hasKey() {\n return $this->_has(1);\n }", "private function has_the_key($key){\n $object_properties = get_object_vars($this);\n\n // if the key exist in the array, its going to return true \n return array_key_exists($key,$object_properties);\n\n }" ]
[ "0.6526556", "0.6399009", "0.6350673", "0.63215864", "0.6282226", "0.6263174", "0.62313104", "0.61848956", "0.6155496", "0.6085376", "0.6072185", "0.60458225", "0.58731747", "0.5868312", "0.5866773", "0.58251905", "0.5800377", "0.57985306", "0.57936066", "0.5766436", "0.5750501", "0.5713534", "0.56988394", "0.5692603", "0.5670215", "0.56538856", "0.56137353", "0.5609881", "0.5608462", "0.5606133", "0.5605063", "0.55959123", "0.55886453", "0.55782425", "0.55414003", "0.55414003", "0.5527979", "0.5517937", "0.55158955", "0.5509971", "0.55094296", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.5495774", "0.54852754", "0.5485199", "0.54819727", "0.54759157", "0.54640794", "0.54389536", "0.5438216", "0.5438084", "0.5424955", "0.5419256", "0.5412295", "0.54033387", "0.5400419", "0.5398907", "0.5398117", "0.53834784", "0.5382139", "0.5375396", "0.5374659", "0.5374546", "0.5373253", "0.5366254", "0.53658086", "0.53472483", "0.5345572", "0.5337359", "0.5333862", "0.5322908", "0.532076", "0.53176343", "0.53165615", "0.5302015", "0.5297141", "0.52917564", "0.5278077", "0.52760065", "0.5274457", "0.52690566", "0.5257222", "0.5256288", "0.5252126", "0.5244998", "0.52447283", "0.5224436", "0.5211584", "0.5209699", "0.5203398", "0.5198246", "0.5198147", "0.5197856", "0.5193376" ]
0.0
-1
Get the truncated email displayed when requesting the resetting.
protected function getObfuscatedEmail(UserInterface $user) { $email = $user->getEmail(); if (false !== $pos = strpos($email, '@')) { $email = '...'.substr($email, $pos); } $this->logMessage(200, $email); return $email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}", "public function truncated()\n {\n return $this->truncated;\n }", "public function getPlainMail()\n {\n return $this->get(self::_PLAIN_MAIL);\n }", "public function getShowEmail()\n\t{\n\t\treturn $this->show_email;\n\t}", "public function getEmail()\r\n\t{\r\n\t\t$errors = [];\r\n\t\treturn view('core::users.reset-password', compact('errors'));\r\n\t}", "public function getAutoResponderEmailContent() { return $this->_autoResponderEmailContent; }", "function showEmail($id) {\n\t\t$email = $this->getConfig ( 'email', $id );\n\t\t$emailsize = strlen ( $email );\n\t\t$partialemail = substr ( $email, 0, 1 );\n\t\t$temp = strrpos ( $email, \"@\" );\n\t\t$endemail = substr ( $email, $temp - 1, $emailsize );\n\t\tfor($i = 1; $i < $temp; $i ++) {\n\t\t\t$partialemail = $partialemail . 'x';\n\t\t}\n\t\t$showemail = $partialemail . $endemail;\n\t\t\n\t\treturn $showemail;\n\t}", "public function printEmail() {\n\t\t$value = $this->value();\n\n\t\tif ($value['added']) {\n\t\t\tif(! function_exists('get_name')) { function get_name($file) { return $file['name']; } }\n\t\t\t$names = array_map('get_name', $value['added']);\n\t\t\treturn '<em>'.join('</em><br/><em>', $names).'</em>';\n\t\t} else {\n\t\t\treturn '<em>None</em>';\n\t\t}\n\t}", "protected function getOnepageNormalizeMessage()\n {\n return $this->config->getOnepageNormalizeMessage($this->store);\n }", "abstract public function get_first_line_support_email();", "public function getMail():string\n {\n return $this->mail;\n }", "public function getMail(): string\n {\n return $this->_mail;\n }", "public function getOptoutEmail()\n {\n return $this->optoutEmail;\n }", "public function getReqAltEmail()\n\t{\n\t\treturn $this->req_alt_email;\n\t}", "public function getPasswordEmail()\n {\n $this->nav('navbar.logged.out.login');\n $this->title('auth.reset.title');\n\n return $this->view('auth.password.email');\n }", "public function getMail():string\n { \n return $this->mail;\n }", "public function feide_email() {\n\t\t\t$this->feide_email = mb_strtolower($this->attributes['mail'][0]);\n\n\t\t\treturn $this->feide_email;\n\t\t}", "public function getOriginalEmail(): ?string;", "private function retrieveSender() : string {\n\n // Get min & max length of the whole sender information\n $senderInformationLength = $this->getSenderInformationLength();\n\n // Retrieve the sender information from email with regex\n $sender = $this->retrieveInformation($this->currentEmail, [\n self::REGEX_NEEDLE_START_SENDER,\n \".{\" . $senderInformationLength[\"min\"] . \",\" . $senderInformationLength[\"max\"] . \"}\"\n ], true,\"Sender information\",\n self::ATTRIBUTE_RETRIEVAL_SOURCE_NAME, true, 0);\n\n // Return sender information without whitespaces at end and beginning\n return trim($sender);\n }", "public function getEtblMail() {\n return $this->etblMail;\n }", "public function getEmailForPasswordReset()\n {\n return $this->email;\n }", "public function getEmailForPasswordReset()\n {\n return $this->getAttribute('email');\n }", "public function message()\n {\n return 'Endereço de email já cadastrado para essa lista.';\n }", "public function getEmailForPasswordReset()\n {\n return $this->attributes['cu_email'];\n }", "protected function getFailedResetPasswordMessage()\r\n {\r\n return 'We can\\'t find a user with that e-mail address.';\r\n }", "private function autoResponderEmailStr(){\n\t\t$NL=\"\\r\\n\";\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t\n\t\t$s_emailContentRaw = $this->_autoResponderEmailContent;\n\t\t$s_emailContent = str_replace('{{tableContent}}', $this->getFormTableContent(), $s_emailContentRaw);\n\t\t\n\t\t$s_ret='<div style=\"'.$s_style.'\">'.$NL.$s_emailContent.$NL.'</div>';\n\t\treturn $s_ret;\n\t}", "public function getReturnPathEmail()\n\t{\n\t\treturn $this->return_path_email;\n\t}", "public function calculateEmail() {\n\t\t// ToDo: possibly add some email validation\n\t\t$output = $email = $this->data['email'];\n\t\t$remote_email = $this->data['remote.email'];\n\t\tif (!$output) $output = $remote_email;\n\t\treturn $output;\n\t}", "public function getUnreadVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], false);\n\t}", "public function getNoteExcerptAttribute()\n {\n return $this->note ? (\n strlen($this->note) >= 30 ? substr($this->note,0, 30) . '...' : $this->note\n ): '';\n }", "public function getReminderEmail() {\r\n return $this -> email;\r\n }", "public function getNotificationEmail() {}", "public function getEmailFootHtml() { return $this->_emailFootHtml; }", "public function getEmailForPasswordReset()\n {\n return $this->user_email;\n }", "public function getMail();", "public function getPasswordResetEmail(){\n return $this->email;\n }", "public function message()\n {\n return 'The full limit is maximum '.request('fullLimit');\n }", "public function FormattedMessage() {\n\t\treturn $this->FormattedText($this->Message);\n\t}", "public function getEmailSent();", "function _osc_from_email_aux() {\n $tmp = osc_mailserver_mail_from();\n return !empty($tmp)?$tmp:osc_contact_email();\n }", "function acf_get_truncated($text, $length = 64)\n{\n}", "public function getReminderEmail() {\n\t\treturn $this -> email;\n\t}", "public function getSentFromEmail(): ?string\n {\n return $this->sentFromEmail;\n }", "public function getSentByEmail(): ?string\n {\n return $this->sentByEmail;\n }", "public function getMessage()\n {\n if ($this->EmailMessage) {\n return sprintf('%s %s', rtrim($this->EmailMessage), $this->getCurrentPageLink());\n }\n \n return $this->getCurrentPageLink();\n }", "public function getMail()\n {\n return $this->_session->getMail();\n }", "public function fromEmail()\n\t{\n\t\treturn get_option('social_curator_notification_from_email');\n\t}", "public function getEmailForPasswordReset()\n\t{\n\t\treturn $this->email;\n\t}", "public function getOptOutOfCustomerEmail()\n {\n if (array_key_exists(\"optOutOfCustomerEmail\", $this->_propDict)) {\n return $this->_propDict[\"optOutOfCustomerEmail\"];\n } else {\n return null;\n }\n }", "function eddc_get_email_default_body() {\n\t$from_name = edd_get_option( 'from_name', get_bloginfo( 'name' ) );\n\t$message = __( 'Hello {name},', 'eddc' ) . \"\\n\\n\" . sprintf( __( 'You have made a new sale on %s!', 'eddc' ), stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) ) . \"\\n\\n\";\n\t$message .= __( 'Item sold: ', 'eddc' ) . \"{download}\\n\\n\";\n\t$message .= __( 'Amount: ', 'eddc' ) . \"{amount}\\n\\n\";\n\t$message .= __( 'Commission Rate: ', 'eddc' ) . \"{rate}\\n\\n\";\n\t$message .= __( 'Thank you', 'eddc' );\n\n\treturn apply_filters( 'eddc_email_default_body', $message );\n}", "public function getIncomingMailServerEmail() {\n\t\treturn $this->ic_mail_server_email;\n\t}", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "protected function getEmailSubject()\n {\n return 'Your Password Reset Link';\n }", "public function getEmail(): string\n\t{\n\t\treturn $this->email->getEmail();\n\t}", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->user_email;\n\t}", "public function getLongMessage()\n {\n return $this->longMessage;\n }", "public static function getExceptionMonitorMail(): ?string\n {\n /**\n * Expect a string or null\n * depending if the user specified an email address.\n * You will not receive an empty string.\n */\n $exceptionMonitorMail = self::getOption('exceptionMonitorMail');\n\n return $exceptionMonitorMail;\n }", "protected function getTargetEmailAddress() {\n\t\tif (isset($this->settings['emailAddress']) && GeneralUtility::validEmail(trim($this->settings['emailAddress']))) {\n\t\t\treturn trim($this->settings['emailAddress']);\n\t\t}\n\t\treturn '';\n\t}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getReminderEmail()\n\t{\n\t return $this->email;\n\t}", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getResetSubUserPasswordEmailTemplate()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_RESET_SUBUSER_PASSWORD_EMAIL_TEMPLATE,\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getMailMIME()\n {\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->username;\n }", "public function getReminderEmail() {\n return $this->email;\n }", "public function getReminderEmail() {\n return $this->email;\n }", "public function getEmail():string\n {\n return $this->email;\n }", "function getDataMail($data, $maxlen){\n if(strlen($data) < $maxlen){\n $data = filter_var($data, FILTER_SANITIZE_EMAIL);\n if(filter_var($data, FILTER_VALIDATE_EMAIL)){\n return $data;\n }\n }\n return null;\n }", "function MaskUserEMail($email){\n\n\t\t$maskedEMail = '';\n\t\t$positionOfAt = strpos($email, '@');\n\t\t$maskedEMail .= substr($email, 0,1);\n\t\tfor($i=1; $i < strlen($email); $i++) {\n\t\t\tif($i < $positionOfAt-1 || $i > $positionOfAt + 1)\n\t\t\t\t$maskedEMail .= '*';\n\t\t\telse\n\t\t\t\t$maskedEMail .= substr($email, $i,1);\n\t\t}\n\t\t$maskedEMail .= substr($email, $i-1,1);\n\t\treturn $maskedEMail;\n\t}", "public function email()\n {\n return $this->emails && isset($this->emails[0])\n ? $this->emails[0] : null;\n }" ]
[ "0.62151855", "0.59940463", "0.598448", "0.5977034", "0.59119844", "0.5873606", "0.58677894", "0.5857438", "0.5787881", "0.5781386", "0.578032", "0.57716125", "0.57606804", "0.5740637", "0.5738527", "0.5720125", "0.57069385", "0.5669697", "0.56673753", "0.5660789", "0.5653182", "0.565095", "0.5645483", "0.56332326", "0.56198436", "0.5614237", "0.5607163", "0.5604278", "0.5603923", "0.559555", "0.55955243", "0.5595445", "0.5578314", "0.55746394", "0.556827", "0.5566077", "0.5560036", "0.5555253", "0.55529654", "0.5548837", "0.5547433", "0.5543996", "0.5530719", "0.5524087", "0.5510019", "0.55095166", "0.550933", "0.55093116", "0.55057484", "0.5502895", "0.54987824", "0.5483145", "0.5483145", "0.5483145", "0.5483145", "0.5483145", "0.5483145", "0.5483145", "0.5483145", "0.54822314", "0.5476749", "0.54653966", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5465148", "0.5463543", "0.5457685", "0.5456807", "0.545164", "0.54453015", "0.54453015", "0.54453015", "0.5442294", "0.5442294", "0.5441158", "0.5436224", "0.54254174", "0.5424738", "0.5424525", "0.54197574", "0.5410164", "0.5408766", "0.54073924", "0.54046845", "0.5404488" ]
0.0
-1
Fetch oAuth Access Token from oAuth engine.
private function fetchAccessToken(Request $request, $grantType) { $request = $this->container->get('request'); $data = $request->request->all(); $clientId = $data['client_id']; $clientSecret = $data['client_secret']; $refreshToken = array_key_exists('refresh_token', $data) ? $data['refresh_token'] : null; $username = array_key_exists('username', $data) ? $data['username'] : null; $password = array_key_exists('password', $data) ? $data['password'] : null; $client = new OAuth2\Client($clientId, $clientSecret); // This is a common function for both getAccessTokenAction() and getRefreshTokenAction(). // Hence, we need to distinguish between parameters passed. if (null != $refreshToken) { $params = array('refresh_token' => $refreshToken); } else { $params = array('username' => $username, 'password' => $password ); } $response = $client->getAccessToken($this->container->getParameter('oauth2_token_endpoint'), $grantType, $params); $accessToken = 'Total Garbage'; if (isset($response['result'])) { if (isset($response['result']['access_token'])) { $accessToken = $response['result']['access_token']; } elseif (isset($response['result']['error'])) { // If error occurred, then throw an exception, else return the result $this->logAndThrowError(400, $response['result']['error'].' - '.$response['result']['error_description'], $response['result']['error_description'] ); } } return $response['result']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAccessToken($oauth_token) {\n\n\t}", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function get_access_token($oauth_token, $oauth_addon);", "protected function getAccessToken()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$params = $this->getParams();\n\t\t$consumerKey = $params->get('oauth_consumer_key');\n\t\t$session = JFactory::getSession();\n\t\t$oauthToken = $app->input->get('oauth_token', '', 'string');\n\t\ttry\n\t\t{\n\t\t\t//$_GET['http_error_codes'] = array(200, 201, 301, 302);\n\n\t\t\t$curlOpts = $this->getOAuthCurlOpts();\n\t\t\t$result = XingOAuthRequester::requestAccessToken($consumerKey, $oauthToken, 0, 'POST', $_GET, $curlOpts);\n\t\t\t//$result = OAuthRequester::requestAccessToken($consumerKey, $oauthToken, 0, 'POST', $_GET, $curlOpts);\n\t\t}\n\t\tcatch (OAuthException2 $e)\n\t\t{\n\t\t\techo \"<h1>get access token error</h1>\";\n\t\t\techo \"<pre>restult...\";print_r($result);echo \"</pre>\";\n\t\t\tprint_r($e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t\treturn $result;\n\t}", "public function fetchAccessToken() {\n if (!isset($_SESSION['ACCESS_TOKEN'])) {\n if (!empty($_GET) && isset($_SESSION['REQUEST_TOKEN'])) {\n return parent::getAccessToken(\n $_GET, unserialize($_SESSION['REQUEST_TOKEN']));\n }\n }\n return null;\n }", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function loadAccessToken()\n {\n $this->setHeader(self::HEADER_TYPE_BASIC, self::TOKEN_HEADER);\n\n $curl = new Curl;\n\n $opt = [\n 'grant_type' => $this->grant,\n 'username' => $this->username,\n 'password' => $this->password,\n 'scope' => $this->scope\n ];\n\n $token = $curl->post(self::BASE_API_URL.self::TOKEN_END_POINT, $opt, $this->getHeader());\n\n $this->saveAccessToken($token);\n }", "public function getAccessToken($access_token);", "protected function get_access_token()\n\t{\n $result = array();\n\n try\n {\n $oauth_verifier = \\Session::get('evernote_oauthVerifier');\n\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token = $this->get_request_token();\n $request_token_secret = $this->get_request_secret();\n\n $oauth->setToken($request_token, $request_token_secret);\n $access_token_info = $oauth->getAccessToken($this->access_token_url, null, $oauth_verifier);\n\n echo '$access_token_info<pre>'.print_r($access_token_info, 1).'</pre>';\n\n if ( $access_token_info ){\n $this->set_access_key( $access_token_info['oauth_token'] );\n $this->set_access_secret( $access_token_info['oauth_token_secret'] );\n\n $this->tokens['oauth_token'] = $access_token_info['oauth_token'];\n $this->tokens['oauth_token_secret'] = $access_token_info['oauth_token_secret'];\n $this->tokens['shard_id'] = $access_token_info['edam_shard'];\n $this->tokens['evernote_user_id'] = $access_token_info['edam_userId'];\n $this->tokens['expires'] = $access_token_info['edam_expires'];\n\n return $this->tokens;\n }\n return false;\n }catch ( \\Exception $e ){\n return false;\n }\n\n\t}", "public function getAccessToken()\n\t{\n\t\tif(!$this->hasAccessToken()){\n\t\t\t//reset all the parameters\n\t\t\t$this->resetParams();\n\t\t\t\n\t\t\t//set the returned token\n\t\t\t$this->setParam('token', $this->getRequestToken()->getToken());\n\t\t\t\n\t\t\t//build the signiture\n\t\t\t$this->setSecret($this->getRequestToken()->getTokenSecret());\n\t\t\t$this->setRequestUrl($this->_accessTokenUrl);\n\t\t\t$this->_buildSignature();\n\t\t\t\n\t\t\t//get the response\n\t\t\t$response = $this->_send($this->_accessTokenUrl)->getBody();\n\t\t\t\n\t\t\t//format the response\n\t\t\t$responseVars = array();\n\t\t\tparse_str($response, $responseVars);\n\t\t\t$response = new BaseOAuthResponse($responseVars);\n\t\t\t$this->setAccessToken($response);\n\t\t}\n\t\treturn $this->getData('access_token');\n\t}", "public static function get_oauth_token($auth) {\n\n\t\t$arraytoreturn = array();\n\n\t\t$output = \"\";\n\n\t\ttry {\n\n\t\t\t$ch = curl_init();\n\n\t\t\tcurl_setopt($ch, CURLOPT_URL, \"https://login.live.com/oauth20_token.srf\");\n\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\t\n\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\n\t\t\t\t'Content-Type: application/x-www-form-urlencoded',\n\n\t\t\t\t));\n\n\t\t\tcurl_setopt($ch, CURLOPT_POST, TRUE);\n\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\t\t\n\n\t\t\t$data = \"client_id=\".client_id.\"&redirect_uri=\".urlencode(callback_uri).\"&client_secret=\".urlencode(client_secret).\"&code=\".$auth.\"&grant_type=authorization_code\";\t\n\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n\t\t\t$output = curl_exec($ch);\n\n\t\t} catch (Exception $e) {\n\n\t\t}\n\n\t\n\n\t\t$out2 = json_decode($output, true);\n\n\t\t$arraytoreturn = Array('access_token' => $out2['access_token'], 'refresh_token' => $out2['refresh_token'], 'expires_in' => $out2['expires_in']);\n\n\t\treturn $arraytoreturn;\n\n\t}", "function getAccessToken($token = NULL) {\n\t\t$r = $this->oAuthRequest ( $this->accessTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "public function getAuthorizationCode()\n {\n $oauth_param = array(\n 'grant_type' => $this->grant_type, \n 'client_id' => config::$clientId,\n 'client_secret' => config::$secretKey,\n 'scope' => implode(',', $this->scope));\n\n $url = config::$apiUrl . 'oauth/access_token';\n $response = $this->curl->request('post', $url, $oauth_param);\n\n if( $response )\n {\n $res = json_decode($response);\n if( isset($res->access_token) )\n {\n $this->setExpiresAtFromTimeStamp($res->expires);\n $this->session->write('access_token',$res->access_token);\n $this->session->write('expires', $this->expiresAt);\n\n $read = $this->session->read('access_token');\n session_write_close();\n }\n elseif( isset($res->error) )\n {\n die($response);\n }\n }\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "private function GetAccessToken()\n\t{\n\t\tif(IsSet($_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url]))\n\t\t{\n\t\t\t$access_token = $_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$access_token = array();\n\t\t}\n\t\treturn($access_token);\n\t}", "public function getAccessToken()\n {\n if ($this->_accessToken == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n\n $this->_accessToken = json_decode($this->_oauthToken)->access_token;\n }\n\n return $this->_accessToken;\n }", "private function getAccessToken() {\n\n // set the request token and secret we have stored\n $this->tmhOAuth->config['user_token'] = $_SESSION['authtoken'];\n $this->tmhOAuth->config['user_secret'] = $_SESSION['authsecret'];\n\n\n // send request for an access token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/access_token', ''), array(\n\n // pass the oauth_verifier received from Twitter\n 'oauth_verifier' => $_GET['oauth_verifier']\n ));\n\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get the access token and store it in a cookie\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n setcookie('access_token', $response['oauth_token'], time()+3600*24*30);\n setcookie('access_token_secret', $response['oauth_token_secret'], time()+3600*24*30);\n\n // state is now 2\n $_SESSION['authstate'] = 2;\n\n // redirect user to clear leftover GET variables\n header('Location: ' . $this->tmhOAuth->php_self());\n\n exit;\n }\n\n return false;\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "public function getAccessToken()\n {\n return $this->get(self::_ACCESS_TOKEN);\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function fetch_access_token(&$request) {\n $this->get_version($request);\n\n $consumer = $this->get_consumer($request);\n\n // requires authorized request token\n $token = $this->get_token($request, $consumer, \"request\");\n\n $this->check_signature($request, $consumer, $token);\n\n // Rev A change\n $verifier = $request->get_parameter('oauth_verifier');\n $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);\n\n return $new_token;\n }", "public function getBearerToken()\n\t{\n\t\t$ch = curl_init($this->oauthURI);\n\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this->generateHeader());\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->oauthBody);\n\n\t\t$results = curl_exec($ch);\n\t\t\n\t\t$this->lastCurlInfo = curl_getinfo($ch);\n\n\t\tif($this->lastCurlInfo['http_code'] != 200)\n\t\t\tthrow new OAuthException('Token request failed', \n\t\t\t\t\t\t\t\t\t $this->lastCurlInfo);\n\n\t\t$token = json_decode($results);\n\t\t$this->bearerToken = $token->access_token;\n\n\t\treturn $this->bearerToken;\n\t}", "protected function get_token()\n\t{\n\t\t$args = func_get_args();\n\t\t$url = \"\";\n\t\t$auto_load_response = false;\n\n\t\tforeach ($args as $v)\n\t\t{\n\t\t\tif (is_string($v))\n\t\t\t{\n\t\t\t\t$url = $v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_bool($v))\n\t\t\t{\n\t\t\t\t$auto_load_response = $v;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (!$url)\n\t\t{\n\t\t\ttrigger_error(\"Method get_token expects a url.\");\n\t\t}\n\n\t\t$this->execute_request($this->auth_http_method == SPOAuthClient::HTTP_AUTH_HEADER ? SPOAuthClient::HTTP_AUTH_GET : $this->auth_http_method, $url);\n\n\t\t//! remove oauth_token and oauth_secret, they will be loaded (if any returned) in the next lines of code)\n\t\t$this->oauth_token = null;\n\t\t$this->oauth_token_secret = null;\n\t\t$this->__oauth_access_token = null;\n\n\t\tif ($auto_load_response && $this->http_response_code == SPConstants::HTTP_OK)\n\t\t{\n\t\t\t$response_data = SPUtils::parse_query($this->http_response_body);\n\n\t\t\tif (is_array($response_data))\n\t\t\t{\n\t\t\t\tforeach ($response_data as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$this->__oauth[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($this->http_response_code == SPConstants::HTTP_OK)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "abstract public function url_access_token();", "public function getAccessToken() {\n return $this->authenticate();\n }", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "protected function getAccessToken()\n {\n return $this->access_token->getToken();\n }", "public function getAccessToken()\n\t{\n\t\tif ($this->makeRequest())\n\t\t{\n\t\t\tif ($token = isset($this->getJson()->access_token) ? $this->getJson()->access_token : null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "function GetAccessToken()\r\n {\r\n return $this->Rest->GetAccessToken();\r\n }", "public function getTokenFromServer()\n {\n $params = [\n 'component_appid' => $this->component_token->getAppId(),\n 'authorizer_appid' => $this->appId,\n 'authorizer_refresh_token' => $this->refresh_token,\n ];\n\n $http = $this->getHttp();\n $url = sprintf(self::API_AUTHORIZER_TOKEN, $this->component_token->getToken());\n $token = $http->parseJSON($http->json($url, $params));\n\n if (empty($token['authorizer_access_token'])) {\n throw new HttpException('Request AccessToken fail. response: '.json_encode($token, JSON_UNESCAPED_UNICODE));\n }\n\n return $token;\n }", "private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }", "public function getAccessTokenByCredentials()\n {\n $data = [\n 'client_id' => $this->oauth_client_id,\n 'client_secret' => $this->oauth_client_secret,\n 'grant_type' => 'client_credentials',\n ];\n return $this->sendRequest($this->oauth_access_token_url, $data);\n }", "public function get_access_token()\n\t{\n\t\t$this->auth_user_authorized = false;\n\t\t$url = $this->auth_url_access;\n\t\t$this->oauth_callback = null; //!< not needed for access\n\n\n\t\tif (!$this->oauth_token)\n\t\t{\n\t\t\treturn false; //!< don't have a token to exchange with an access one\n\t\t}\n\n\t\t$this->get_token($url, true);\n\n\t\tif ($this->http_response_code == SPConstants::HTTP_OK && $this->oauth_token)\n\t\t{\n\t\t\t$this->oauth_verifier = null; //!< don't need it any more if it has been provided\n\t\t\t$this->auth_user_authorized = true;\n\t\t\t$this->__oauth_access_token = \"true\";\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getOauthAccessToken()\n {\n return null;\n }", "public function gettoken()\n{\n if (isset($_GET['code'])) {\n // Check that state matches\n if (isset($_GET['state']) && isset($_SESSION['oauth_state'])) {\n if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth_state'])) {\n exit('State provided in redirect does not match expected value.');\n } \n // Clear saved state\n unset($_SESSION['oauth_state']); \n }\n\n // Initialize the OAuth client\n $oauthClient = new \\League\\OAuth2\\Client\\Provider\\GenericProvider([\n 'clientId' => $this->config->item('OAUTH_APP_ID'),\n 'clientSecret' => $this->config->item('OAUTH_APP_PASSWORD'),\n 'redirectUri' => $this->config->item('OAUTH_REDIRECT_URI'),\n 'urlAuthorize' => $this->config->item('OAUTH_AUTHORITY').$this->config->item('OAUTH_AUTHORIZE_ENDPOINT'),\n 'urlAccessToken' => $this->config->item('OAUTH_AUTHORITY').$this->config->item('OAUTH_TOKEN_ENDPOINT'),\n 'urlResourceOwnerDetails' => '',\n 'scopes' => $this->config->item('OAUTH_SCOPES')\n ]);\n\n try {\n\n // Make the token request\n $accessToken = $oauthClient->getAccessToken('authorization_code', [\n 'code' => $_GET['code']\n ]);\n\n //echo 'Access token: '.$accessToken->getToken();\n return $accessToken->getToken();\n }\n catch (League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n exit('ERROR getting tokens: '.$e->getMessage());\n }\n exit();\n }\n elseif (isset($_GET['error'])) {\n exit('ERROR: '.$_GET['error'].' - '.$_GET['error_description']);\n }\n}", "public function request_token() {\n $this->sign_secret = $this->consumer_secret.'&';\n\n if (empty($this->oauth_callback)) {\n $params = [];\n } else {\n $params = ['oauth_callback' => $this->oauth_callback->out(false)];\n }\n\n $params = $this->prepare_oauth_parameters($this->request_token_api, $params, 'GET');\n $content = $this->http->get($this->request_token_api, $params, $this->http_options);\n // Including:\n // oauth_token\n // oauth_token_secret\n $result = $this->parse_result($content);\n if (empty($result['oauth_token'])) {\n throw new moodle_exception('oauth1requesttoken', 'core_error', '', null, $content);\n }\n // Build oauth authorize url.\n $result['authorize_url'] = $this->authorize_url . '?oauth_token='.$result['oauth_token'];\n\n return $result;\n }", "public function getBaseAccessToken() {\n\t\t\n// \t\tif ($result == null) {\n\t\t\treturn $token = $this->get_access_token ();\n// \t\t} else {\n// \t\t\treturn $result;\n// \t\t}\n\t}", "public function auth() {\n \n // state 1 requires a GET variable to exist\n if($this->state == 1 && !isset($_GET['oauth_verifier'])) {\n $this->state = 0;\n }\n\n // Step 1: Get a request token\n if($this->state == 0) {\n return $this->getRequestToken();\n }\n\n // Step 2: Get an access token\n elseif($this->state == 1) {\n return $this->getAccessToken();\n }\n\n // Step 3: Verify the access token\n return $this->verifyAccessToken();\n }", "public function getOAuthToken()\n {\n return $this->oauthToken->getToken();\n }", "private function get_token() {\n $uri = $this->settings->hostname.\"oauth/token\";\n //echo \"POST $uri\\n\";\n\n $data = array(\n \"grant_type\" => \"password\",\n \"client_id\" => $this->settings->client_id,\n \"client_secret\" => $this->settings->client_secret,\n \"username\" => $this->settings->username,\n \"password\" => $this->settings->password\n );\n $postdata = http_build_query($data);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/x-www-form-urlencoded'));\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n //echo $http_code.\"\\n\"; // output http status code\n\n curl_close($ch);\n $token = NULL;\n if ($http_code == 200) {\n $token = json_decode($curl_response);\n //var_dump($token); // print entire token object\n }\n return $token;\n }", "public function access_token(array $results) {\n\t\tif(!array_key_exists(\"oauth_token\", $results) ||\n\t\t !array_key_exists(\"oauth_token_secret\", $results) ||\n\t\t !array_key_exists(\"oauth_verifier\", $results) )\n\t\t {\n\t\t \tthrow new Kanedo_Readability_Exception('wrong parameter');\n\t\t }\n\t\t \n\t\t$token = new OAuthToken($results['oauth_token'], $results['oauth_token_secret']);\n\t\t$req = OAuthRequest::from_consumer_and_token(\n\t\t\t\t\t$this->oauth_consumer, \n\t\t\t\t\t$token, \n\t\t\t\t\t'GET',\n\t\t\t\t\t$this->e_access, \n\t\t\t\t\tarray('oauth_verifier' => $results['oauth_verifier'])\n\t\t\t\t);\n\t\t$req->sign_request(new OAuthSignatureMethod_HMAC_SHA1(), $this->oauth_consumer, $token);\n\t\ttry{\n\t\t\t$result = $this->makeHTTPRequest($req->to_url());\n\t\t}catch (Kanedo_Readability_Exception $e) {\n\t\t\t$this->error = $e->getMessage();\n\t\t\t$this->errnr = $e->getCode();\n\t\t\treturn false;\n\t\t}\n\t\t$token_credencials = ($this->parseUrlQuery($result));\n\t\treturn $this->access_token = new OAuthToken($token_credencials['oauth_token'], $token_credencials['oauth_token_secret']);\n\t}", "protected function getOAuthRequestToken()\n\t{\n\t\t$params = $this->getParams();\n\t\t$consumerKey = $params->get('oauth_consumer_key');\n\t\t$app = JFactory::getApplication();\n\t\t$tokenParams = array(\n\t\t\t'oauth_callback' => OAUTH_CALLBACK_URL,\n\t\t\t'oauth_consumer_key' => $consumerKey\n\t\t);\n\n\t\t$curlOpts = $this->getOAuthCurlOpts();\n\n\t\t$tokenResult = XingOAuthRequester::requestRequestToken($consumerKey, 0, $tokenParams, 'POST', array(), $curlOpts);\n\t\t$requestOpts = array('http_error_codes' => array(200, 201));\n\t\t//$tokenResult = OAuthRequester::requestRequestToken($consumerKey, 0, $tokenParams, 'POST', $requestOpts, $curlOpts);\n\t\t$uri = OAUTH_AUTHORIZE_URL . \"?btmpl=mobile&oauth_token=\" . $tokenResult['token'];\n\t\t$app->redirect($uri);\n\t}", "public function getAccessTokenFromClientCredentials(): AccessToken;", "public function get_access_token() {\n $access_token = get_transient( 'yith-wcbk-gcal-access-token' );\n if ( !$access_token ) {\n $refresh_token = $this->get_option( 'refresh-token' );\n if ( $refresh_token ) {\n $data = array(\n 'client_id' => $this->get_client_id(),\n 'client_secret' => $this->get_client_secret(),\n 'refresh_token' => $refresh_token,\n 'grant_type' => 'refresh_token',\n );\n\n $params = array(\n 'body' => http_build_query( $data ),\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ),\n );\n\n $response = wp_remote_post( $this->oauth_url . 'token', $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $access_token = sanitize_text_field( $body->access_token );\n $expires_in = isset( $body->expires_in ) ? absint( $body->expires_in ) : HOUR_IN_SECONDS;\n $expires_in -= 100;\n\n set_transient( 'yith-wcbk-gcal-access-token', $access_token, $expires_in );\n\n $this->debug( 'Access Token refreshed successfully', compact( 'access_token', 'expires_in', 'body' ) );\n } else {\n $this->error( 'Error while refreshing Access Token: ', $response );\n }\n }\n }\n\n return $access_token;\n }", "public function getAccessToken() {\n if (is_null($this->tokenID) || empty($this->tokenID)) return FALSE;\n if (!empty($this->access_token) && ($this->access_token_expire > time())) {\n return $this->access_token;\n } else {\n //first, obtain auth token using saved refresh_token\n $token = get_access_token($this->getRefreshToken());\n //check if we've got a valid Bearer token\n if ($this->DEBUG) var_dump($token);\n if (!(isset($token->access_token) && isset($token->token_type) && isset($token->expires_in) && $token->token_type=='Bearer' && $token->expires_in>0)) {\n //problem with token, bail!\n warning(\"ESI\",\"EVE SSO: Invalid Bearer token received from SSO login site.\");\n return FALSE;\n }\n //we've got a valid token\n $this->access_token = $token->access_token;\n $this->access_token_expire = time() + $token->expires_in;\n //let's fetch the characterID\n $verify=verify_token($token);\n //check if required fileds are set\n if (!(isset($verify->CharacterID) && isset($verify->CharacterName) && isset($verify->TokenType))) {\n //problem with verify, bail!\n warning(\"ESI\",\"EVE SSO: Invalid Verify response received from SSO login site.\");\n return FALSE;\n }\n if ($this->DEBUG) var_dump($verify);\n //we have characterID\n $this->characterID = $verify->CharacterID;\n }\n return $this->access_token;\n }", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public function getAccessToken()\n {\n return $this->getQuery('accesstoken');\n }", "public function getAccessToken()\n {\n // maybe the token will expire in next 10 seconds\n $expiryCutoff = new \\DateTime('+10 seconds');\n\n // if the token expires try to reauthenticate\n if (!$this->accessToken or $this->getExpires() < $expiryCutoff->getTimestamp()) {\n $this->authenticate();\n }\n\n return $this->accessToken->getToken();\n }", "public function getAccessToken($access_token_url, $auth_session_handle = null, $verifier_token = null) {}", "function getAccessToken($oauth_verifier = null)\n\t{\n\t\t$access_token = $this->oauth('oauth/access_token', ['oauth_verifier' => $oauth_verifier]);\n\t\t$_SESSION[self::$token_name] = $access_token;\n\t\t$this->setOauthToken($access_token['oauth_token'], $access_token['oauth_token_secret']);\n\n\t\treturn $access_token;\n\t}", "public function getAccessToken($auth)\n {\n\n // Define URL for the request\n $post_url = self::$OAUTH.\"/accessToken\";\n\n // Prepare the POST data\n $data = [\n \"grant_type\" => \"authorization_code\",\n \"code\" => $auth,\n \"redirect_uri\" => $this->callback,\n \"client_id\" => $this->clientId,\n \"client_secret\" => $this->clientSecret\n ];\n\n // Build the complete request URL\n $data = http_build_query($data);\n\n // Initialize cURL\n $curl = curl_init();\n\n // Set the options\n curl_setopt($curl,CURLOPT_URL, $post_url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl,CURLOPT_POST, sizeof($data));\n curl_setopt($curl,CURLOPT_POSTFIELDS, $data);\n\n // Execute the request\n $result = curl_exec($curl);\n curl_close($curl);\n\n $codes = json_decode($result);\n if(!isset($codes->access_token) || isset($codes->error))\n {\n Throw new AccessTokenExchangeFailureException();\n }\n\n else {\n $this->accessToken = $codes->access_token;\n return $this->accessToken;\n }\n }", "private function getAccessToken($access_token_uri, $session) {\n $client = new Client($access_token_uri);\n $oauth = new OauthPlugin(array(\n 'consumer_key' => $this->consumer_key,\n 'consumer_secret' => $this->consumer_secret,\n 'token' => $session->get('oauth_token'),\n 'token_secret' => $session->get('request_token_secret'),\n ));\n $client->addSubscriber($oauth);\n\n $request = $client->get();\n $response = $request->send()->getBody(TRUE);\n $data = $this->parseResponse($response);\n return $data;\n }", "function getAccessToken($token) {\n $this->getToken(\"grant_type=authorization_code&code=$token&redirect_uri=\" . urlencode($this->redirectUri));\n }", "private function getAccessToken()\n {\n if (time() < $this->get_option('paypal_access_token_expires_at')) {\n return $this->get_option('paypal_access_token');\n }\n\n $response = wp_remote_retrieve_body(wp_remote_post('https://api.sandbox.paypal.com/v1/oauth2/token', [\n 'method' => 'POST',\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'Authorization' => 'Basic ' . base64_encode($this->get_option('client_id') . ':' . $this->get_option('client_secret'))\n ],\n 'body' => [\n 'client_id' => $this->get_option('client_id'),\n 'client_secret' => $this->get_option('client_secret'),\n 'grant_type' => 'client_credentials'\n ]\n ]));\n\n $response = json_decode($response, true);\n\n add_option('paypal_access_token', $response['access_token']);\n add_option('paypal_access_token_expires_at', time() + $response['expires_in']);\n\n return $response['access_token'];\n }", "function getAccessToken($uid = FALSE, $oauth_token = NULL) {\n\t\t$parameters = array();\n\t\t//if (!empty($uid)) {\n\t\t\t//$parameters['uid'] = $uid;\n\t\t//}\n\t\tif (!empty($oauth_token)) {\n\t\t\t$parameters['oauth_token'] = $oauth_token;\n\t\t\t//$this->token = $oauth_token;\n\t\t}\n\t\t$request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);\n\t\t$token = OAuthUtil::parse_parameters($request);\n\t\t$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);\n\t\treturn $token;\n\t}", "protected function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->access_token;\n }", "private function getBearerToken() {\n\n // Encoding the consumer key and secret\n $bearer_auth = $this->encodeBearerAuth();\n\n // The POST request has to have\n // a specific grant_type in the body\n $request_body = ['grant_type' => 'client_credentials'];\n $request_body = http_build_query($request_body);\n\n // Setting the required headers\n $headers = [\n 'Authorization: Basic ' . $bearer_auth,\n 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8',\n 'Content-Length: ' . strlen($request_body)\n ];\n\n // Requesting the bearer token\n $result = $this->makePostRequest(\n 'oauth2/token',\n $headers,\n $request_body,\n true\n );\n\n if (isset($result['token_type']) &&\n strlen($result['token_type']) &&\n $result['token_type'] === 'bearer' &&\n isset($result['access_token']) &&\n strlen($result['access_token'])) {\n\n $this->bearer_token = $result['access_token'];\n }\n }", "private function fetchAccessToken(): void\n {\n $url = 'https://accounts.spotify.com/api/token';\n\n $token = Cache::remember('spotify-token', 60 * 60, function () use ($url) {\n $client = new Client;\n $response = $client->request('POST', $url, [\n 'form_params' => [\n 'grant_type' => 'client_credentials',\n ],\n 'headers' => [\n 'Authorization' => 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret),\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n ]);\n\n $responseBody = json_decode((string) $response->getBody());\n\n return $responseBody->access_token;\n });\n\n $this->accessToken = $token;\n }", "function curl_getToken($login, $password)\n{\n $url = set_url('auth');\n $postRequest = \"grant_type=password&username={$login}&password={$password}\";\n\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $postRequest);\n curl_setopt($cURLConnection, CURLOPT_USERPWD, otomoto_api());\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n\n $apiResponse = json_decode(curl_exec($cURLConnection));\n\n curl_close($cURLConnection);\n\n $_SESSION['token'] = $apiResponse->access_token;\n}", "private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }", "public function getAccessToken()\n {\n return $this->_access_token;\n }", "public function getAccessToken()\n\t{\n\t\treturn $this->client->getAccessToken();\n\t}", "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "private function fetchAccessToken()\n\t{\n\t\tif (file_exists($this->refreshToken))\n\t\t{\n\t\t\t$parameters = array(\n\t\t\t\t'refresh_token' => file_get_contents($this->refreshToken),\n\t\t\t\t'client_id' => $this->googleClientId,\n\t\t\t\t'client_secret' => $this->googleClientSecret,\n\t\t\t\t'grant_type' => 'refresh_token'\n\t\t\t);\n\n\t\t\t$response = $this->makeRequest($parameters);\n\n\t\t\tif (isset($response->access_token))\n\t\t\t{\n\n\t\t\t\tfile_put_contents($this->accessToken, $response->access_token);\n\t\t\t}\n\t\t}\n\t}", "public function get_request_token($accid) {\n // Get a request token from the appliance\n $url = $this->appliance_url . \"/api/request_token.php\";\n $result = $this->call($url, array());\n // dbg(\"Received request token $result\");\n $req_token = array();\n parse_str($result,$req_token);\n\n if(!isset($req_token['oauth_token'])) {\n //error_log(\"Failed to retrieve request token from \".$url.\" result = \".$result);\n throw new Exception(\"Unable to retrieve request token\");\n }\n $token = new OAuthToken($req_token['oauth_token'], $req_token['oauth_token_secret']);\n return $token;\n }", "public function fetch_access_token($options){\n\n if (!isset($options['redirect_uri'])) {\n throw new GoCardless_ArgumentsException('redirect_uri required');\n }\n\n $path = '/oauth/access_token';\n\n $options['http_authorization'] = $this->account_details['app_id'] . ':' . $this->account_details['app_secret'];\n\n $response = $this->request('post', $path, $options);\n\n $merchant = explode(':', $response['scope']);\n $merchant_id = $merchant[1];\n $access_token = $response['access_token'];\n\n $return = array(\n 'merchant_id' => $merchant_id,\n 'access_token' => $access_token\n );\n\n return $return;\n\n }", "public function getAccessToken() {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->get('AccessToken');\n }", "public function getAccessToken()\n {\n return $this->_accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return $this->accessToken;\n }", "public function getAccessToken($oauth_verifier = false) {\n\t\t$parameters = array();\n\t\tif (!empty($oauth_verifier)) {\n\t\t $parameters['oauth_verifier'] = $oauth_verifier;\n\t\t}\t \n\t\t$request = $this->fetch(self::URI_ACCESS_TOKEN, $parameters);\n\t\t$token = DropBox_OAuthUtil::parse_parameters($request['body']);\n\t\t$this->setToken($token['oauth_token'], $token['oauth_token_secret']);\n\t\treturn $token;\n\t}", "protected function requestAnOAuthAccessToken($oauth, &$accessToken) {\n\t\t$url = $this->getTokenEndpoint();\n\t\t$options = [\n\t\t\t'resource' => 'OAuth access token',\n\t\t];\n\t\t$method = strtoupper($this->strategy->getTokenRequestMethod());\n\t\tswitch ($method) {\n\t\t\tcase 'GET':\n\t\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\t$options['post_data_in_uri'] = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new OAuthClientException($method . ' is not a supported method to request tokens');\n\t\t}\n\t\tif (($response = $this->sendOAuthRequest($url, $method, [], $options, $oauth)) === false) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!isset($response['oauth_token']) || !isset($response['oauth_token_secret'])) {\n\t\t\tthrow new OAuthClientAuthorizationException('it was not returned the access token and secret');\n\t\t}\n\t\t$accessToken = [\n\t\t\t'value' => $response['oauth_token'],\n\t\t\t'secret' => $response['oauth_token_secret'],\n\t\t\t'authorized' => true\n\t\t];\n\t\tif (isset($response['oauth_expires_in']) && $response['oauth_expires_in'] == 0) {\n\t\t\t$this->trace('Ignoring access token expiry set to 0');\n\t\t\t$this->setAccessTokenExpiry('');\n\t\t} elseif (isset($response['oauth_expires_in'])) {\n\t\t\t$expires = $response['oauth_expires_in'];\n\t\t\tif (strval($expires) !== strval(intval($expires)) || $expires <= 0) {\n\t\t\t\tthrow new OAuthClientException('OAuth provider did not return a supported type of access token expiry time');\n\t\t\t}\n\t\t\t$this->setAccessTokenExpiry(gmstrftime('%Y-%m-%d %H:%M:%S', $this->getResponseTime() + $expires));\n\t\t\t$this->trace('Access token expiry: ' . $this->getAccessTokenExpiry() . ' UTC');\n\t\t\t$accessToken['expiry'] = $this->getAccessTokenExpiry();\n\t\t} else {\n\t\t\t$this->setAccessTokenExpiry('');\n\t\t}\n\t\tif (isset($response['oauth_session_handle'])) {\n\t\t\t$accessToken['refresh'] = $response['oauth_session_handle'];\n\t\t\t$this->trace('Refresh token: ' . $accessToken['refresh']);\n\t\t}\n\t\treturn $this->storage->storeAccessToken($accessToken);\n\t}", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "protected function getAccessTokenClient()\n {\n $grantType = \"client_credentials\";\n return $this->getAccessToken($grantType);\n }" ]
[ "0.7369777", "0.7346858", "0.7318164", "0.7109133", "0.7104074", "0.70772237", "0.70772237", "0.70772237", "0.70772237", "0.70772237", "0.7027913", "0.70111966", "0.6989268", "0.69647336", "0.69121563", "0.689256", "0.686822", "0.685164", "0.6838357", "0.6830064", "0.68045056", "0.6783185", "0.6764165", "0.6755074", "0.673362", "0.6714866", "0.67106026", "0.66761357", "0.6674529", "0.6668877", "0.6664665", "0.6655985", "0.66553456", "0.66305774", "0.6592158", "0.6590555", "0.65867627", "0.6568019", "0.6567506", "0.6567099", "0.65363026", "0.653628", "0.65273005", "0.6502068", "0.6491959", "0.6491624", "0.64875406", "0.648528", "0.64786386", "0.6477926", "0.64680856", "0.64618313", "0.6454079", "0.6453549", "0.6450572", "0.6442676", "0.6436443", "0.6427871", "0.64190894", "0.64177144", "0.6416342", "0.64152825", "0.6400547", "0.6392379", "0.63748586", "0.6374543", "0.63636076", "0.63579917", "0.6357093", "0.6353029", "0.63460153", "0.6343196", "0.6340412", "0.632478", "0.6314387", "0.630663", "0.63035566", "0.63035566", "0.63035566", "0.63035566", "0.6303378", "0.6303378", "0.6303378", "0.6303378", "0.6303378", "0.6303378", "0.6297106", "0.6294024", "0.6294024", "0.6294024", "0.6294024", "0.6294024", "0.6294024", "0.6294024", "0.6294024", "0.62887806", "0.6282916", "0.62685144", "0.6253749", "0.6252793", "0.6252693" ]
0.0
-1
Display a listing of the resource.
public function index() { $data = DB::select('SELECT books.title, users.name, transactions.created_at, transactions.status, transactions.id FROM transactions join books on transactions.book_id=books.id JOIN users on transactions.user_id=users.id '); return view('transactions.home',compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
========== ========== Add ========== ==========
public function getAdd() { return view('manage.content.help.action.add'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add();", "public function add();", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "protected function add() {\n\t}", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "function add() {\n }", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "function add($item);", "public function add($data)\n {\n }", "abstract public function add_item();", "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "public function mass_add()\n {\n }", "public function add(){\n $this->edit();\n }", "function add()\n {\n return true;\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function add($value);", "public function add($value);", "public function add($item);", "public function add($item);", "public function add()\n {\n for ($i = 0 ; $i < func_num_args(); $i++) {\n $this->addSingle(func_get_arg($i));\n }\n }", "public function add($name);", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function add($obj) {\n\t}", "public function add($id)\n {\n \n }", "public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "public function add(...$items);", "public function create() //添加\n {\n\t\t//\n }", "public function addAction() {\n \t$dataType = $this->getInput('dataType');\n \tif (!in_array($dataType,$this->DATATYPE)) {\n \t exit(\"参数错误\");\n \t}\n \t$this->assign('dataType', $dataType);\n $this->assign('dataTypes', $this->DATATYPE);\n }", "public function add(array $parameters);", "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "public function add($content);", "public function add($vector)\n {\n }", "public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}", "public function add ($obj) {\n\t\treturn $this->append($obj);\t\n\t}", "public function Add(&$entity)\n {\n \n }", "public function Add($entity) {\n }", "public function add() {\n $fields_definition = '';\n $fields_values = '';\n foreach ($this->fields as $name => $value) {\n $fields_definition .= '`' . $name . '`, ';\n $fields_values .= '\\''. $value . '\\', ';\n }\n\n $fields_definition = chop($fields_definition, ', ');\n $fields_values = chop($fields_values, ', ');\n\n $query = 'INSERT INTO `' . $this->table . '`'\n . ' (' . $fields_definition\n . ' ) VALUES ( ' . $fields_values . ' )';\n\n return $this->connection->query($query);\n }", "public function __add($other) {\n return $this->add($other);\n }", "public function add(Post $post);", "public function add(Post $post);", "public function add($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function Add(){\n $insert =[\n 'RankNo'=>32132,\n 'UserName'=>$UserName,\n 'NickName'=>123,\n 'MoneyNum'=>32131,\n 'Signature'=>32132131,\n 'WeChatID'=>3213123,\n 'Status'=>$Status,\n 'head_img'=>$head_img\n ];\n return $this->insert($insert);\n }", "public function add($object): void;", "public function add($entity);", "public function addField();", "function add() {\n\n\t\t// assign values from $_POST to class variables\n\t\t$this -> personal_id = $this -> input -> post('personal_id', TRUE);\n\n\t\t$this -> movable_number = $this -> input -> post('movable_number', TRUE);\n\n\t\t$this -> series_number = $this -> input -> post('series_number', TRUE);\n\n\t\t$this -> unit = $this -> input -> post('unit', TRUE);\n\n\t\t$this -> comment = $this -> input -> post('comment', TRUE);\n\t\t//tr_date_add\n\n\t\t$this -> give_date = tr_date_add($this -> input -> post('give_date', TRUE));\n\n\t\t$this -> take_date = tr_date_add($this -> input -> post('take_date', TRUE));\n\n\t\t$ok = $this -> db -> insert('movable', $this);\n\n\t\tif ($ok) {\n\n\t\t\t$this -> res = $this -> db -> insert_id();\n\t\t\t//$data['lastid'] = $this->db->insert_id() ;\n\n\t\t}\n\n\t\treturn $this -> res;\n\n\t}", "public function add(){\n $outData['script']= CONTROLLER_NAME.\"/add\";\n $this->assign('output',$outData);\n $this->display();\n }", "function add($a, $b);", "public function add($element);", "public function add($element);", "public function add($element);", "function add($message) { return; }", "function addPOSEntry()\n{\n\n}", "public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function add_data($data)\n {\n }", "function add ($other) {\n $this->getTool();\n return ($this->tool->add(&$this, $other));\n }", "public function add()\n {\n echo '客户需求添加一个新需求' . PHP_EOL;\n }", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "public function add_information() \r\n {}", "public function add_information() \r\n {}", "public function add() {\n if ($this->id == 0) {\n $reponse = $this->bdd->prepare('INSERT INTO chapitres SET title = :title, body = :body');\n $reponse->execute([\n 'body'=>$this->body, \n 'title'=>$this->title\n ]);\n }\n }", "public function add() {\r\n if(isset($this->data) && isset($this->data['Product'])) {\r\n $product = $this->Product->save($this->data);\r\n $this->set('response', array('Products' => $this->Product->findByProductid($product['Product']['ProductID'])));\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'view', $product['Product']['ProductID']), true);\r\n } else {\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'index'), true);\r\n }\r\n }", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "function add( $obj )\r\n\t{\r\n\t\tif ( $this->signUseID == true) {\r\n\t\t\t$pos = $obj->primary_key_value();\r\n\t\t\t$this->data[ $pos ] = $obj;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->data[] = $obj;\r\n\t\t}\r\n\t}", "public function addAction() {\r\n\t\t$channel_id = intval($this->getInput('channel_id'));\r\n\t\t$this->assign('ad_types', $this->ad_types[$channel_id]);\r\n\t\t$this->assign('channel_id', $channel_id);\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t$this->assign('ad_type', $ad_type);\r\n\t\t\r\n\t\tif($channel_id == 2 || $channel_id == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t\tif($channel_id == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\t\t\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "function add($object){if(is_array($this->arrayObj))\n \n {$tmp = count($this->arrayObj);$this->arrayObj[$tmp]=$object;\n\n }else{$this->arrayObj[0]=$object;}\n }", "function add($object){if(is_array($this->arrayObj))\n \n {$tmp = count($this->arrayObj);$this->arrayObj[$tmp]=$object;\n\n }else{$this->arrayObj[0]=$object;}\n }", "function Add($name, $value)\r\n\t{\r\n\t\tif (is_array($this->Data))\r\n\t\t{\r\n\t\t\t$this->Data[$name] = $value;\t\r\n\t\t}\t\r\n\t\telse if (is_object($this->Data))\r\n\t\t{\r\n\t\t\t$this->Data->$name = $value;\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error(\"A DataRow of base type, cannot have fields added.\",E_USER_ERROR);\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function actionAdd(){\r\n \r\n }", "public function can_do_add() {\n return false;\n }", "public function willGenerateAdd(): bool;", "public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}", "function add($v)\n\t{\n\t\t$this->liste[] = $v;\n\t}", "public function add($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function add_entry($entry);", "public function add($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function testAddActionAdds()\n {\n // another time perhaps\n }", "public function add()\n {\n //renderView('add');\n }", "public function add($item, $id = null);", "public function addAction()\n\t{\n\n\t}", "public function getAddInput();", "public function testAddOperation()\n\t{\n\t\t$this->adder->setA(42);\n\t\t$this->adder->add();\n\t\t$this->assertEquals(42, $this->adder->getSum(), 'dont added correctly');\n\t}", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "public function p_add() {\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\t\t\n\t\t# Unix timestamp of when this post was created / modified\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t$_POST['created_by'] = $this->user['email'];\n\t\t$_POST['modified_by'] = $this->user['email'];\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\n\t\t# Insert\n\t\t# Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n\t\tDB::instance(DB_NAME)->insert('teachers', $_POST);\n\n\t\t\n\t\t# Send them to the main page\n\t\tRouter::redirect(\"/\");\n\n\n\t}", "public function annimalAddAction()\n {\n }", "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Permission Modify\");\t\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\t## for check admin or not\t##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"permission_modify\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"permission_modify_add\", $data, true, \"permission_modify\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add(Operation $operation);", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public static function add() {\n return call_user_func_array( array( get_class(), 'factory' ), func_get_args() );\n }" ]
[ "0.8832246", "0.8832246", "0.8502424", "0.8502424", "0.83639914", "0.83517", "0.83517", "0.83517", "0.780352", "0.76057625", "0.7446904", "0.7431286", "0.73978317", "0.7289647", "0.726008", "0.71996987", "0.719899", "0.718201", "0.71811295", "0.71811295", "0.703739", "0.703739", "0.7033678", "0.6968146", "0.69464713", "0.69266933", "0.6895424", "0.68647605", "0.68175167", "0.68115616", "0.6807627", "0.6772492", "0.67545897", "0.6725815", "0.66924477", "0.6677754", "0.66443324", "0.6640592", "0.66221035", "0.6612338", "0.6602357", "0.65905076", "0.65905076", "0.65844434", "0.65772736", "0.6574583", "0.65463406", "0.65384716", "0.6535143", "0.6529911", "0.651988", "0.64996874", "0.649748", "0.64942414", "0.64942414", "0.64942414", "0.6474779", "0.6459281", "0.6453961", "0.64135414", "0.64014745", "0.6365717", "0.63636094", "0.63490903", "0.6340837", "0.63361937", "0.63325703", "0.6319414", "0.6319414", "0.63176024", "0.6312654", "0.6303935", "0.6298555", "0.62850994", "0.62840444", "0.62840444", "0.6283481", "0.6272122", "0.6265103", "0.6261079", "0.62505907", "0.6246356", "0.62445205", "0.62429416", "0.6239512", "0.6237768", "0.6233044", "0.6232598", "0.6227692", "0.62274456", "0.6226142", "0.62081397", "0.62067187", "0.61995953", "0.61883825", "0.61792475", "0.6174458", "0.61711615", "0.61711615", "0.61711615", "0.6169679" ]
0.0
-1
========== ========== View ========== ==========
public function getView($actionId){ $dataHelpAction = TfHelpAction::find($actionId); $accessObject = 'action'; if(count($dataHelpAction) > 0){ return view('manage.content.help.action.view', compact('dataHelpAction', 'accessObject')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getView() {}", "public function getView() {}", "public function view()\n\t{\n\t\t// TODO Implement\t\n\t}", "public function getView(){ }", "public function view() {\r\n\r\n\t}", "public function getView()\n {\n }", "public function getView();", "abstract protected function getView();", "public function view() {\n }", "public function view()\n {\n //\n }", "public function view() {\n\t\treturn;\n\t}", "public function singleView();", "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "protected function getViewData() {\n\n }", "public function view(): mixed;", "public function views()\n {\n }", "public function views()\n {\n }", "public function views()\n {\n }", "abstract protected function renderView();", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function createView();", "public function index()\n {\n\t\t//return $view->fetch();\n }", "public function actionView() {}", "public function actionView() {}", "public function ViewAction()\r\n\t{\r\n\t\t$this->View->author = $this->Author->select();\r\n\t}", "public function actionView()\n {\n \n }", "public function getView()\r\n {\r\n return parent::getView();\r\n }", "public function getViewState() {}", "public function loadForView();", "function action_view()\n {\n $this->addStatusFields();\n return parent::action_view();\n }", "function view() {\n\t\treturn '';\n\t}", "public function view(){\n return 123;\n }", "protected function viewAction()\n {\n }", "function getView() {\r\n return $this->view;\r\n }", "public function getView() {\n return $this->setView();\n }", "function viewInfo() {\n\t$view = new viewModel();\n\t$view->showInfo();\t\n}", "public function getViewComponent();", "public function updateView()\n {\n \n }", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}", "protected static function getView()\n {\n return null;\n }", "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "public function index()\n {\n\n\n $this->view->render();\n }", "public function getView(){\n\t\treturn $this->view;\n\t}", "function getView() {\n\t\treturn $this->View;\n\t}", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "protected function loadView()\n {\n }", "protected function loadView()\n {\n }", "public function personHistoryView(){\n $this->view('auditor/personHistoryView');\n \n $this->view->render(); // This is how load the view\n }", "public function viewAny()\n {\n //\n }", "public function getView() {\n\t\treturn $this -> st_view;\n\t}", "function index() {\n\n $this->view->render();\n\n }", "public function view(){\n return $this->db->get('articles')->result();\n }", "public function getViewTemplate();", "public function render()\n {\n //\n }", "function index()\n {\n $this->_view_edit('view');\n }", "abstract protected function renderFirstView();", "public function create(): View\n {\n //\n }", "public function index()\n\t{\n\t\treturn $this->getView()->render();\n\t}", "public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}", "public function render(){\n\t\t\n\t}", "abstract protected function getDefaultView();", "public function officerHistoryView(){\n $this->view('auditor/officerHistoryView');\n \n $this->view->render(); // This is how load the view\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function index()\n\t{\n $this->view->render();\n\t}", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function getView()\n {\n return $this->cntView;\n }", "public function index()\n {\n $this->view();\n }", "public function index()\n {\n $this->view();\n }", "public function render(){\n\n }", "public function show()\n { \n \n }", "public function getOverview() {\n \n }", "public function actionView()\n\t{\n\t\t$this->render('view');\n\t}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}" ]
[ "0.7848998", "0.7848998", "0.7729135", "0.7719871", "0.7666695", "0.7653342", "0.7533955", "0.75137216", "0.7403517", "0.731911", "0.72504705", "0.7171853", "0.71609455", "0.7159511", "0.7120142", "0.70251733", "0.7024106", "0.7024106", "0.69670874", "0.6962228", "0.6942319", "0.67573655", "0.6754569", "0.6754569", "0.67040074", "0.66750646", "0.66712445", "0.6665141", "0.6657996", "0.665432", "0.6653843", "0.6616909", "0.6594689", "0.6584747", "0.6582493", "0.65774345", "0.65297127", "0.6495999", "0.6492704", "0.6492704", "0.6483779", "0.64830256", "0.6472773", "0.6458932", "0.64486706", "0.6447155", "0.6447155", "0.6447155", "0.6447155", "0.6445024", "0.6445024", "0.6433231", "0.64156127", "0.6411498", "0.64112777", "0.6408976", "0.6408871", "0.63907355", "0.63891524", "0.6379752", "0.63534224", "0.63511217", "0.6324328", "0.6322073", "0.6313717", "0.6305323", "0.6298893", "0.62987965", "0.6290586", "0.6286336", "0.6281047", "0.6281047", "0.6278653", "0.62652975", "0.6263384", "0.626221", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302", "0.6261302" ]
0.0
-1
========== ========== Edit ========== ==========
public function getEdit($actionId = '') { $modelHelpAction = new TfHelpAction(); $dataHelpAction = $modelHelpAction->getInfo($actionId); $accessObject = 'action'; return view('manage.content.help.action.edit', compact('dataHelpAction', 'accessObject')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n {\n \n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit() {\n }", "protected function editar()\n {\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\n {\n \n \n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n { \n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "abstract protected function renderEdit();", "public function edit_toko(){\n\t}", "public function edit() {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n { }", "public function editar()\n {\n }", "public function edit()\n {\n //\n }", "public function edit(Python $python)\n {\n //\n }", "public function editAction() {}", "public function getEdit()\n\t{\n\t}", "public function showEdit()\n {\n\n }", "public function inline_edit()\n {\n }", "public function inline_edit()\n {\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function edit()\n {\n return \"Ini Halaman Edit\";\n }", "public function edit($obj) {\n\t}", "public function edit($id)\t{\n\t\t//\n\t}", "function OnBeforeEdit(){\n }", "function editItem() {\n\t\tglobal $HTML;\n\t\t$HTML->details(1);\n\t\t$name = stringOr($this->vars[\"name\"], $this->getQueryResult(0, \"name\"));\n\n\t\t$_ = '';\n\t\t$_ .= $HTML->head($this->translate(\"Edit point name\"));\n\t\t$_ .= $HTML->block($this->translate(\"Point\").\":\", $this->getQueryResult(0, \"file\"));\n\t\t$_ .= $HTML->input($this->varnames[\"name\"], \"name\", $name);\n\n\t\treturn $_;\n\t}", "public function edit($id)\n\t{\t\t\n\n\t}", "public function annimalEditAction()\n {\n }", "public function edit( $id ) {\n\t\t//\n\t}", "public function edit( $id ) {\n\t\t//\n\t}", "function OnAfterEdit(){\n }", "public function edit() {\r\n\t\treturn $this->_edit(false);\r\n\t}", "public function edit()\r\n {\r\n return null;\r\n }", "public function editAction()\r\n {\r\n }", "public function getEditRaw();", "public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) //Hämta redan bokad boking\n\t{\n\t\t//\n\t}", "public function edit(File $file)\n {\n //\n }", "public function getEditInput();", "public function edit($id) {\n\t\t\n\t}", "public function editRegularContentFromId() {}", "public function edit($id)\n\t{\n\t\t\n\t}", "public function edit($id)\n\t{\n\t\t\n\t}", "public function edit($id)\n\t {\n\t //\n\t }", "public function edit(Run $run)\n {\n //\n }", "public function edit(Run $run)\n {\n //\n }", "public function edit($id)\n {\n\t\t\n \n }", "public function edit( $id ) {\n\n\t}", "public function edit($id){\n\t\t//\n\t}", "public function edit($id){\n\t\t//\n\t}", "protected function canEdit() {}", "function procEdit($ar=NULL){\n $this->getComposedFullnam($ar);\n return parent::procEdit($ar);\n }", "public function edit($id)\n {\n throw new NotImplementedException();\n }", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\t\t//\n\t}" ]
[ "0.80653745", "0.7988233", "0.7942489", "0.78812987", "0.76994014", "0.75946134", "0.7561528", "0.75569594", "0.7541516", "0.7541516", "0.7541516", "0.7533244", "0.7533244", "0.7511633", "0.7482816", "0.7482816", "0.7482816", "0.7370197", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7333015", "0.7332833", "0.73286545", "0.7321679", "0.7310768", "0.7310768", "0.7310768", "0.7310768", "0.7302803", "0.7289079", "0.72741777", "0.70004845", "0.69727814", "0.6955163", "0.6910281", "0.68908733", "0.6890125", "0.6844091", "0.68180585", "0.6781732", "0.675399", "0.6680891", "0.6667292", "0.66589934", "0.66448414", "0.66420543", "0.6640543", "0.6640543", "0.66373134", "0.66309386", "0.66309", "0.66202116", "0.6604266", "0.65967697", "0.6595693", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65892136", "0.65858495", "0.65784204", "0.65695775", "0.6566496", "0.6554638", "0.6550737", "0.6550737", "0.65230036", "0.65216017", "0.65216017", "0.6514642", "0.65041745", "0.6503424", "0.6503424", "0.6501576", "0.6500095", "0.64978737", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483", "0.64945483" ]
0.0
-1
========== ========== Delete ========== ==========
public function getDelete($actionId = '') { if (!empty($actionId)) { $dataHelpAction = new TfHelpAction(); $dataHelpAction->getDelete($actionId); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public abstract function delete();", "protected function delete() {\n\t}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public static function delete() {\n\n\n\t\t}", "function delete()\n {\n }", "public function delete()\r\n\t{\r\n\t}", "public static function delete() {\r\n\t\t\r\n\t}", "function delete() ;", "function delete() ;", "public function delete() {\r\n }", "public function delete()\n\t{\n\t}", "public final function delete() {\n }", "public function DELETE() {\n #\n }", "abstract function delete();", "protected function _delete()\n\t{\n\t}", "public function delete()\n {\n \n }", "public function delete()\n {\n \n }", "public function deleting()\n {\n # code...\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "function delete()\r\n {\r\n\r\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n //\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "function delete()\n {\n }", "public static function delete(){\r\n }", "abstract protected function delete ();", "public function forceDelete();", "function delete() {\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete()\n {\n\n }", "public function delete() {\n\n }", "public static function Delete(){\r\n }", "function delete() \n {\n \n }", "function delete() {\n\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function delete(): void;", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function delete(): void\n {\n }", "public function index_delete(){\n\t\t\n\t\t}", "public function del()\n {\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete()\n {\n return;\n }", "public function Do_delete_Example1(){\n\n\t}", "function Delete();", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function delete(){\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "protected function _preDelete() {}", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function delete ()\n {\n\n try {\n \n } catch (Exception $e) {\n\n throw $e;\n }\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "public function preDelete() { }", "public function deleteAction() {\n \n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }", "function delete($id);", "public function testDelete()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function forceDelete()\n {\n //\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }" ]
[ "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.84841895", "0.82929915", "0.82929915", "0.82929915", "0.82929915", "0.82580566", "0.82567716", "0.82265955", "0.82262367", "0.82262367", "0.8225895", "0.8193053", "0.8146029", "0.81142795", "0.80468345", "0.8013798", "0.8013798", "0.7996891", "0.7996727", "0.7965059", "0.79349387", "0.7927465", "0.79252726", "0.7924283", "0.7894344", "0.7888955", "0.78841037", "0.7857413", "0.7857368", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7815049", "0.7796994", "0.77611274", "0.77482545", "0.7739843", "0.77398187", "0.77109367", "0.77009064", "0.76929677", "0.7677402", "0.76716524", "0.76572025", "0.7632518", "0.76315534", "0.7622668", "0.7622668", "0.761643", "0.76046145", "0.76014066", "0.7590649", "0.7585722", "0.7571521", "0.75588393", "0.7533165", "0.75186145", "0.75054485", "0.75036055", "0.74921423", "0.7476618", "0.7419", "0.74184394", "0.741817", "0.7418157", "0.74001604", "0.7395704", "0.73723686", "0.7356947", "0.7352243", "0.73442817", "0.7331461", "0.7330226", "0.7325365", "0.7313587", "0.72924906", "0.7285419", "0.72307026", "0.7229804", "0.7229804", "0.7187104" ]
0.0
-1
Run the database seeds.
public function run() { $data = [ 'Telkomsel', 'Indosat', 'PT. TOWER BERSAMA/ TBG', 'PT. SOLU SINDO KREASI PRATAMA/ TBG', 'PT. SOLUSI MENARA INDONESIA/ TBG', 'Protelindo', 'Komet Infra Nusantara (KIN)', 'IBS', 'STP', 'XL/ Axis', 'Mitratel', 'XL', 'PT. PRIMA MEDIA SELARAS/ TBG', 'Retower/Centratama Menara Indonesia', 'PT. TELENET INTERNUSA/ TBG', ]; for ($i = 0; $i < count($data); $i++) { $name[] = [ 'name' => $data[$i] ]; } Pemilik::insert($name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Extract configuration data of videos from the DOM structure
public function process(\DOMElement $mediaNode, $mediaParentTag) { $result = []; $moduleNameVideo = $mediaNode->getAttribute('module'); foreach ($mediaNode->getElementsByTagName(self::MEDIA_TYPE_CODE) as $node) { $videoId = $node->getAttribute('id'); $result[$mediaParentTag][$moduleNameVideo][Media::MEDIA_TYPE_CONFIG_NODE][$videoId]['type'] = $node->getAttribute('type'); foreach ($node->childNodes as $attribute) { if ($attribute->nodeType != XML_ELEMENT_NODE) { continue; } $nodeValue = $attribute->nodeValue; $result[$mediaParentTag][$moduleNameVideo][Media::MEDIA_TYPE_CONFIG_NODE][$videoId][$attribute->tagName] = $nodeValue; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVideoConfigXml($videoUrl)\r\n\t{\r\n\t\t$xml = curlGet($videoUrl);\r\n\t\t$xml = '<?xml version=\"1.0\"?>'.\"\\n\".$xml;\r\n\r\n\t\t$dom = new DOMDocument();\r\n\t\t$dom->loadXML($xml);\r\n\r\n\t\t$result = array();\r\n\r\n\t\t//$dom->documentElement->getElementsByTagName('tracklist')\r\n\t\t$playlist = $dom->getElementsByTagName('playlist')->item(0);\r\n\r\n\t\t$xml = $playlist->ownerDocument->saveXML($playlist);\r\n\r\n\r\n\t\t$tracklist = $playlist->getElementsByTagName('trackList')->item(0);\r\n\r\n\t\t$location = $tracklist->getElementsByTagName('location')->item(0);\r\n\r\n\t\t$result['location'] = $location->childNodes->item(0)->nodeValue;\r\n\r\n\t\t$image = $tracklist->getElementsByTagName('image')->item(0);\r\n if($image != null && $image->childNodes->length > 0)\r\n {\r\n $result['image'] = trim($image->childNodes->item(0)->nodeValue);\r\n }\r\n\r\n\t\treturn $result;\r\n\t}", "function get_src_from_param4($videoEmbed) {\n //$videoEmbed_ = serialize($videoEmbed);\n $doc = new DOMDocument();\n $doc->loadHTML($videoEmbed);\n\n $src = $doc->getElementsByTagName('param')->item(4)->getAttribute('value');\n return $src;\n}", "protected function getVideoInfo($html = '')\n\t{\n\t\t$maxWeight = -1;\n\t\t$result = array();\n\t\t$uri = new Uri('/');\n\t\t$document = new HtmlDocument($html, $uri);\n\t\t$videoElements = $document->extractElementAttributes('video');\n\t\tforeach($videoElements as $videoElement)\n\t\t{\n\t\t\tif(!isset($videoElement['src']))\n\t\t\t{\n\t\t\t\t$sourceElements = $document->extractElementAttributes('source');\n\t\t\t\tforeach($sourceElements as $sourceElement)\n\t\t\t\t{\n\t\t\t\t\tif(\n\t\t\t\t\t\t(isset($sourceElement['type']) &&\n\t\t\t\t\t\t$this->isValidVideoMimeType($sourceElement['type'])) ||\n\t\t\t\t\t\t!isset($videoElement['src']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$videoElement['src'] = $sourceElement['src'];\n\t\t\t\t\t\t$videoElement['type'] = $sourceElement['type'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($videoElement['src']))\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t(isset($videoElement['width']) &&\n\t\t\t\t\tisset($videoElement['height']) &&\n\t\t\t\t\t(int)$videoElement['width'] * (int)$videoElement['height'] > $maxWeight) ||\n\t\t\t\t\t(empty($result))\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$result = $videoElement;\n\t\t\t\t\t$maxWeight = 0;\n\t\t\t\t\tif(isset($videoElement['width']) && isset($videoElement['height']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$maxWeight = (int)$videoElement['width'] * (int)$videoElement['height'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function get_src_from_param0($videoEmbed) {\n // $videoEmbed_ = serialize($videoEmbed);\n $doc = new DOMDocument();\n $doc->loadHTML($videoEmbed);\n\n $src = $doc->getElementsByTagName('param')->item(0)->getAttribute('value');\n return $src;\n}", "function get_header_video_settings()\n {\n }", "function parseVideoEntry($entry) {\n $obj= new stdClass;\n\n // get nodes in media: namespace for media information\n $media = $entry->children('http://search.yahoo.com/mrss/');\n $obj->title = $media->group->title;\n $obj->description = $media->group->description;\n\n // get video player URL\n $attrs = $media->group->player->attributes();\n $obj->watchURL = $attrs['url'];\n\n // get video thumbnail\n $attrs = $media->group->thumbnail[0]->attributes();\n $obj->thumbnailURL = $attrs['url'];\n\n // get <yt:duration> node for video length\n $yt = $media->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->duration->attributes();\n $obj->length = $attrs['seconds'];\n\n // get <yt:stats> node for viewer statistics\n $yt = $entry->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->statistics->attributes();\n $obj->viewCount = $attrs['viewCount'];\n\n // get <gd:rating> node for video ratings\n $gd = $entry->children('http://schemas.google.com/g/2005');\n if ($gd->rating) {\n $attrs = $gd->rating->attributes();\n $obj->rating = $attrs['average'];\n } else {\n $obj->rating = 0;\n }\n\n // get <gd:comments> node for video comments\n $gd = $entry->children('http://schemas.google.com/g/2005');\n if ($gd->comments->feedLink) {\n $attrs = $gd->comments->feedLink->attributes();\n $obj->commentsURL = $attrs['href'];\n $obj->commentsCount = $attrs['countHint'];\n }\n\n //Get the author\n $obj->author = $entry->author->name;\n $obj->authorURL = $entry->author->uri;\n\n // get feed URL for video responses\n $entry->registerXPathNamespace('feed', 'http://www.w3.org/2005/Atom');\n $nodeset = $entry->xpath(\"feed:link[@rel='http://gdata.youtube.com/schemas/\n 2007#video.responses']\");\n if (count($nodeset) > 0) {\n $obj->responsesURL = $nodeset[0]['href'];\n }\n\n // get feed URL for related videos\n $entry->registerXPathNamespace('feed', 'http://www.w3.org/2005/Atom');\n $nodeset = $entry->xpath(\"feed:link[@rel='http://gdata.youtube.com/schemas/\n 2007#video.related']\");\n if (count($nodeset) > 0) {\n $obj->relatedURL = $nodeset[0]['href'];\n }\n\n // return object to caller\n return $obj;\n}", "public function buildVideoAttrs($params)\n {\n parent::buildVideoAttrs($params);\n $this->videoAttrs['frameborder'] = '0';\n\n return $this->element->_buildAttrs($this->videoAttrs);\n }", "function timeless_video_attributes_body() {\n\t$attributes['class'] = join( ' ', get_body_class() );\n\t$attributes['itemscope'] = 'itemscope';\n\t$attributes['itemtype'] = 'http://schema.org/WebPage';\n\t$attributes['data-vide-bg'] = 'mp4: ' . get_theme_mod( 'homepage_background_video', get_stylesheet_directory_uri() . '/images/video-default.mp4' ) . ', poster: ' . get_theme_mod( 'default_background_image', get_stylesheet_directory_uri() . '/images/bkg-default.jpg' );\n\t$attributes['data-vide-options'] = 'className: bg-video, posterType: jpg';\n\n\treturn $attributes;\n}", "function grab_video_youtube_single($url) {\n\n $url = parse_url($url);\n $vid = parse_str($url['query'], $output);\n $video_id = $output['v'];\n $data['video_type'] = 'youtube';\n $data['video_id'] = $video_id;\n //$xml = simplexml_load_file(\"https://gdata.youtube.com/feeds/api/videos/{$video_id}?v=2\");\n $xml = simplexml_load_file(\"http://gdata.youtube.com/feeds/api/videos?q={$video_id}&start-index=1&max-results=1&v=2\");\n foreach ($xml->entry as $entry) {\n // get nodes in media: namespace\n $media = $entry->children('http://search.yahoo.com/mrss/');\n // get video player URL\n $attrs = $media->group->player->attributes();\n $watch = $attrs['url'];\n // get video thumbnail\n $data['thumb_1'] = $media->group->thumbnail[0]->attributes(); // Thumbnail 1\n $data['thumb_2'] = $media->group->thumbnail[1]->attributes(); // Thumbnail 2\n $data['thumb_3'] = $media->group->thumbnail[2]->attributes(); // Thumbnail 3\n $data['thumb_large'] = $media->group->thumbnail[3]->attributes(); // Large thumbnail\n $data['tags'] = $media->group->keywords; // Video Tags\n $data['cat'] = $media->group->category; // Video category\n $attrs = $media->group->thumbnail[0]->attributes();\n $thumbnail = $attrs['url'];\n // get <yt:duration> node for video length\n $yt = $media->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->duration->attributes();\n $data['duration'] = $attrs['seconds'];\n // get <yt:stats> node for viewer statistics\n $yt = $entry->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->statistics->attributes();\n $data['views'] = $viewCount = $attrs['viewCount'];\n $data['title'] = $entry->title;\n $data['info'] = $entry->content;\n // get <gd:rating> node for video ratings\n $gd = $entry->children('http://schemas.google.com/g/2005');\n if ($gd->rating) {\n $attrs = $gd->rating->attributes();\n $data['rating'] = $attrs['average'];\n } else {\n $data['rating'] = 0;\n }\n } // End foreach\n\n $video = array();\n $video[0]['index'] = 1;\n $video[0]['video_id'] = $data['video_id'];\n $video[0]['title'] = (string) $data['title'];\n $duration = number_format($data['duration'] / 60, 2, ':', '');\n $video[0]['duration'] = $duration;\n $video[0]['video_source'] = 'Youtube';\n return $video;\n}", "function parseVideoEntry($entry) { \n \t$obj\t\t\t\t= new \\stdClass;\n\t\t$media\t\t\t\t= $entry->children('http://search.yahoo.com/mrss/');\n $obj->title\t\t\t= $media->group->title;\n $obj->description\t= $media->group->description;\n\t\t\n\t\t$yt = $media->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->duration->attributes();\n $obj->length = $attrs['seconds']; \n return $obj; \n\t}", "function getVideoEmebed($url, $config, $width, $height) {\r\n\t\t$uniqueUid = ' rgmi'.$this->getUniqueID().' '; \r\n\t\t$video = '<span class=\"rgmediaimages-player'.$uniqueUid.'\">\r\n <embed src=\"'.t3lib_extMgm::siteRelpath('rgmediaimages').'res/mediaplayer.swf\" width=\"'.$width.'\" height=\"'.$height.'\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"&file='.$url.'&'.$config.'\" />\r\n </span>';\r\n\t\treturn $video;\t\r\n\t}", "function get_video_attributes($video) {\n\n $command = 'ffmpeg -i ' . $video . ' -vstats 2>&1';\n\n Log::info(\"Path \".$video);\n\n $output = shell_exec($command);\n\n Log::info(\"Shell Exec : \".$output);\n\n\n $codec = null; $width = null; $height = null;\n\n $regex_sizes = \"/Video: ([^,]*), ([^,]*), ([0-9]{1,4})x([0-9]{1,4})/\";\n\n Log::info(\"Preg Match :\" .preg_match($regex_sizes, $output, $regs));\n if (preg_match($regex_sizes, $output, $regs)) {\n $codec = $regs [1] ? $regs [1] : null;\n $width = $regs [3] ? $regs [3] : null;\n $height = $regs [4] ? $regs [4] : null;\n }\n\n $hours = $mins = $secs = $ms = null;\n \n $regex_duration = \"/Duration: ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}).([0-9]{1,2})/\";\n if (preg_match($regex_duration, $output, $regs)) {\n $hours = $regs [1] ? $regs [1] : null;\n $mins = $regs [2] ? $regs [2] : null;\n $secs = $regs [3] ? $regs [3] : null;\n $ms = $regs [4] ? $regs [4] : null;\n }\n\n Log::info(\"Width of the video : \".$width);\n Log::info(\"Height of the video : \".$height);\n\n return array('codec' => $codec,\n 'width' => $width,\n 'height' => $height,\n 'hours' => $hours,\n 'mins' => $mins,\n 'secs' => $secs,\n 'ms' => $ms\n );\n}", "function getVideos($url, $width, $height, $config) {\r\n \t$video = '';\r\n\r\n\t\t$url = trim($url);\r\n\t\t$url = str_replace('http://', '', $url);\r\n\r\n // youtube\r\n if (strpos($url,'outube.com')) {\r\n $found = 1;\r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://www.youtube.com/v/'.$split[1].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");';\r\n // Dailymotion\r\n } elseif (strpos($url,'ailymotion.co')) {\r\n $found = 1;\r\n $video = 'new SWFObject(\"http://'.$url.'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");';\r\n // video.google.com/.de\r\n } elseif (strpos($url,'ideo.google.')) {\r\n $found = 1; \r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://video.google.com/googleplayer.swf?docId='.$split[1].'&hl='.$GLOBALS['TSFE']->lang.'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // Metacafe\r\n } elseif (strpos($url,'metacafe.')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://www.metacafe.com/fplayer/'.$split[2].'/.swf\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // MyVideo.de\r\n } elseif (strpos($url,'yvideo.de')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://www.myvideo.de/movie/'.$split[2].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n // clipfish.de\r\n\t\t} elseif (strpos($url,'lipfish.de')) {\r\n $found = 1;\r\n $split = explode('=',$url);\r\n $video = 'new SWFObject(\"http://www.clipfish.de/videoplayer.swf?as=0&videoid='.$split[1].'\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n\t\t// sevenload\r\n\t\t} elseif (strpos($url,'sevenload.com')) {\r\n $found = 1;\r\n $split = explode('/',$url);\r\n $video = 'new SWFObject(\"http://de.sevenload.com/pl/'.$split[2].'/'.$width.'x'.$height.'/swf\", \"sfwvideo\", \"'.$width.'\",\"'.$height.'\", \"9\", \"#'.$config['backgroundColor'].'\", \"wmode\", \"transparent\");'; \r\n } \r\n\r\n\t\treturn $video;\r\n\t}", "function get_src_from_embed($videoEmbed) {\n //$videoEmbed_ = serialize($videoEmbed);\n $doc = new DOMDocument();\n $doc->loadHTML($videoEmbed);\n\n $src = $doc->getElementsByTagName('embed')->item(0)->getAttribute('src');\n return $src;\n}", "public function prepare_getVillaVideo($params)\n\t{\n\t\t$xml_string = \"strVillaURL=\".$params['strVillaURL'].\"\";\n\t\treturn $xml_string;\n\t}", "public function getHTML5Video() {\r\n if (empty($this->mime) && file_exists(RP_DOWNLOAD_DIR . $this->filepath)) {\r\n $this->getThumbnail(); \r\n }\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n if ($mime[0] != \"video\") {\r\n return false;\r\n }\r\n \r\n $avlib = self::getAVLib();\r\n \r\n $videos = array();\r\n \r\n set_time_limit(1200);\r\n \r\n /**\r\n * Mp4\r\n */\r\n \r\n $dstfile = sprintf(\"%s/%s.v3.mp4\", pathinfo($this->filepath, PATHINFO_DIRNAME), pathinfo($this->filepath, PATHINFO_FILENAME));\r\n \r\n if (!file_exists(RP_DOWNLOAD_DIR . $dstfile)) {\r\n exec(sprintf(\"%s -i %s%s -vcodec h264 -acodec aac -strict -2 -ar 64k %s%s\", $avlib, RP_DOWNLOAD_DIR, $this->filepath, RP_DOWNLOAD_DIR, $dstfile), $return);\r\n }\r\n \r\n $finfo = finfo_open(FILEINFO_MIME_TYPE); \r\n $mime = finfo_file($finfo, RP_DOWNLOAD_DIR . $dstfile);\r\n \r\n $videos['mp4'] = array(\r\n \"absolute\" => RP_DOWNLOAD_DIR . $dstfile,\r\n \"file\" => $dstfile,\r\n \"size\" => filesize(RP_DOWNLOAD_DIR . $dstfile),\r\n \"mime\" => $mime\r\n );\r\n \r\n /**\r\n * WebM\r\n */\r\n \r\n $dstfile = sprintf(\"%s/%s.v3.webm\", pathinfo($this->filepath, PATHINFO_DIRNAME), pathinfo($this->filepath, PATHINFO_FILENAME));\r\n \r\n if (!file_exists(RP_DOWNLOAD_DIR . $dstfile)) {\r\n exec(sprintf(\"%s -i %s%s -acodec libvorbis -ac 2 -ab 96k -ar 44100 %s%s\", $avlib, RP_DOWNLOAD_DIR, $this->filepath, RP_DOWNLOAD_DIR, $dstfile), $return);\r\n }\r\n \r\n $finfo = finfo_open(FILEINFO_MIME_TYPE); \r\n $mime = finfo_file($finfo, RP_DOWNLOAD_DIR . $dstfile);\r\n \r\n $videos['webm'] = array(\r\n \"absolute\" => RP_DOWNLOAD_DIR . $dstfile,\r\n \"file\" => $dstfile,\r\n \"size\" => filesize(RP_DOWNLOAD_DIR . $dstfile),\r\n \"mime\" => $mime\r\n );\r\n \r\n return $videos;\r\n }", "function videosLoad(){\n\n if ($handle = opendir('videos')) {\nglobal $dom, $id, $n;\n /* This is the correct way to loop over the directory. */\n while (false !== ($entry = readdir($handle))) {\n /*Video tag*/\n$video = $dom->createElement('video');\n$vattr = $dom->createAttribute('id');\n$vattr->value = $entry.$n;\n$video->appendChild($vattr);\n$vattr= $dom->createAttribute('class');\n$vattr->value = 'video-js vjs-default-skin';\n$video->appendChild($vattr);\n$vattr = $dom->createAttribute('controls');\n$video->appendChild($vattr);\n$vattr = $dom->createAttribute('preload');\n$vattr->value = 'auto';\n$video->appendChild($vattr);\n$vattr = $dom->createAttribute('width');\n$vattr->value='640';\n$video->appendChild($vattr);\n$vattr = $dom->createAttribute('height');\n$vattr->value='264';\n$video->appendChild($vattr);\n$vattr = $dom->createAttribute('data-setup');\n$vattr->value = \"{ 'controls': true, 'autoplay':false, 'prelaod': 'auto'}\";\n$video->appendChild($vattr);\n/*source tags*/\n$source = $dom->createElement('source');\n$sattr = $dom->createAttribute('src');\n$sattr->value= $entry;\n$source->appendChild($sattr);\n$sattr = $dom->createAttribute('type');\n$sattr->value= 'video/mp4';\n$source->appendChild($sattr);\n/*script tags:: May not need it\n$script = $dom->createElement('script');\n$script->createAtrribute('type');\n$script->value = \"text/javascript\";\n$script->appendChild(\"var vObj =\ndocument.getElementById(\"example_video_\"'.$n');\ndocument.getElementById(\"vidoes\").appenedChild(vObj);\");\n*/\n$video->appendChild($source);\n$id->appendChild($video);\n$dom->saveHTML();\n//echo '<script> document.appendChild($id);</script>';\n\n\n\n \n\n /* echo $entry;*/\n/*echo '<video id=\"example_video_\" class=\"video-js vjs-default-skin\" controls preload=\"auto\" width=\"640\" height=\"264\" data-setup=\"{}\"> <source src=\"$entry\" type=\"video/mp4\"/> </video>';\n <script type=\"text/javascript\">\n var vObj = document.getElementById(\"example_video_\".$n);\n document.getElementById(\"vidoes\").appenedChild(vObj);\n </script>';\n */\n }\n\n /* This is the WRONG way to loop over the directory.\n while ($entry = readdir($handle)) {\n echo \"$entry\\n\";\n }\n */\n closedir($handle);\n }\n}", "function parseVideos($videoString = null)\n\t{\n\t // return data\n\t $videos = array();\n\n\t if (!empty($videoString)) {\n\n\t // split on line breaks\n\t $videoString = stripslashes(trim($videoString));\n\t $videoString = explode(\"\\n\", $videoString);\n\t $videoString = array_filter($videoString, 'trim');\n\n\t // check each video for proper formatting\n\t foreach ($videoString as $video) {\n\n\t // check for iframe to get the video url\n\t if (strpos($video, 'iframe') !== FALSE) {\n\t // retrieve the video url\n\t $anchorRegex = '/src=\"(.*)?\"/isU';\n\t $results = array();\n\t if (preg_match($anchorRegex, $video, $results)) {\n\t $link = trim($results[1]);\n\t }\n\t } else {\n\t // we already have a url\n\t $link = $video;\n\t }\n\n\t // if we have a URL, parse it down\n\t if (!empty($link)) {\n\n\t // initial values\n\t $video_id = NULL;\n\t $videoIdRegex = NULL;\n\t $results = array();\n\n\t // check for type of youtube link\n\t if (strpos($link, 'youtu') !== FALSE) {\n\t // works on:\n\t // http://www.youtube.com/watch?v=VIDEOID\n\t\t\t\t\t\tif(strpos($link, 'youtube.com/watch') !== FALSE){\n\t\t\t\t\t\t\t$videoIdRegex = '/http:\\/\\/(?:www\\.)?youtube.*watch\\?v=([a-zA-Z0-9\\-_]+)/';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (strpos($link, 'youtube.com') !== FALSE) {\n\t // works on:\n\t // http://www.youtube.com/embed/VIDEOID\n\t // http://www.youtube.com/embed/VIDEOID?modestbranding=1&amp;rel=0\n\t // http://www.youtube.com/v/VIDEO-ID?fs=1&amp;hl=en_US\n\t $videoIdRegex = '/youtube.com\\/(?:embed|v){1}\\/([a-zA-Z0-9_]+)\\??/i';\n\t } else if (strpos($link, 'youtu.be') !== FALSE) {\n\t // works on:\n\t // http://youtu.be/daro6K6mym8\n\t $videoIdRegex = '/youtu.be\\/([a-zA-Z0-9_]+)\\??/i';\n\t }\n\n\t if ($videoIdRegex !== NULL) {\n\t if (preg_match($videoIdRegex, $link, $results)) {\n\t $video_str = 'http://www.youtube.com/v/%s?fs=1&amp;autoplay=1';\n\t $thumbnail_str = 'http://img.youtube.com/vi/%s/2.jpg';\n\t $fullsize_str = 'http://img.youtube.com/vi/%s/0.jpg';\n\t $video_id = $results[1];\n\t }\n\t }\n\t }\n\n\t // handle vimeo videos\n\t else if (strpos($video, 'vimeo') !== FALSE) {\n\t if (strpos($video, 'player.vimeo.com') !== FALSE) {\n\t // works on:\n\t // http://player.vimeo.com/video/37985580?title=0&amp;byline=0&amp;portrait=0\n\t $videoIdRegex = '/player.vimeo.com\\/video\\/([0-9]+)\\??/i';\n\t } else {\n\t // works on:\n\t // http://vimeo.com/37985580\n\t $videoIdRegex = '/vimeo.com\\/([0-9]+)\\??/i';\n\t }\n\n\t if ($videoIdRegex !== NULL) {\n\t if (preg_match($videoIdRegex, $link, $results)) {\n\t $video_id = $results[1];\n\n\t // get the thumbnail\n\t try {\n\t $hash = unserialize(file_get_contents(\"http://vimeo.com/api/v2/video/$video_id.php\"));\n\t if (!empty($hash) && is_array($hash)) {\n\t $video_str = 'http://vimeo.com/moogaloop.swf?clip_id=%s';\n\t $thumbnail_str = $hash[0]['thumbnail_small'];\n\t $fullsize_str = $hash[0]['thumbnail_large'];\n\t } else {\n\t // don't use, couldn't find what we need\n\t unset($video_id);\n\t }\n\t } catch (Exception $e) {\n\t unset($video_id);\n\t }\n\t }\n\t }\n\t }\n\n\t // check if we have a video id, if so, add the video metadata\n\t if (!empty($video_id)) {\n\t // add to return\n\t $videos[] = array(\n\t 'url' => sprintf($video_str, $video_id),\n\t 'thumbnail' => sprintf($thumbnail_str, $video_id),\n\t 'fullsize' => sprintf($fullsize_str, $video_id)\n\t );\n\t }\n\t }\n\n\t }\n\n\t }\n\n\t // return array of parsed videos\n\t return $videos;\n\t}", "function initialize() {\n $this->set_openingtag(\"<VIDEO[attributes]>\");\n $this->set_closingtag(\"</VIDEO>\");\n }", "function grab_video_vine($url) {\n $vId = explode('/', $url);\n $vTitle = get_vine_title($url);\n $video = array();\n $video[0]['index'] = 1;\n $video[0]['video_id'] = $vId[4];\n $video[0]['title'] = (string) $vTitle;\n $video[0]['duration'] = 'Unknown';\n $video[0]['video_source'] = 'Vine';\n\n return $video;\n}", "function signage_panes_video_admin_info($subtype, $conf, $contexts) {\n if (!empty($conf)) {\n $block = new stdClass();\n $block->title = $conf['override_title'] ? $conf['override_title_text'] : '';\n $block->content = t('Showing embedded video from @video_provider provider.', array(\n '@video_provider' => $conf['video_provider'],\n ));\n return $block;\n }\n}", "function wp_embed_handler_video($matches, $attr, $url, $rawattr)\n {\n }", "public function process() {\n // Add oembed streams to video file types.\n $video = file_type_load('video');\n $video->mimetypes[] = 'video/oembed';\n $video->streams[] = 'oembed';\n file_type_save($video);\n\n // Oembed specific display settings for videos.\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '560',\n 'height' => '340',\n 'wmode' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__default__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '180',\n 'height' => '',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__preview__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n $file_display = new \\stdClass();\n $file_display->api_version = 1;\n $file_display->name = 'video__teaser__oembed_thumbnail';\n $file_display->weight = -10;\n $file_display->status = TRUE;\n $file_display->settings = array(\n 'width' => '100',\n 'height' => '75',\n );\n file_display_save($file_display);\n\n }", "public function hydrate_additional_video_form()\n {\n $additional_video_info = [];\n\n $em = EntityManagerSingleton::getInstance();\n\n $product_video_relationships = $em->getRepository('Library\\Model\\Relationship\\ProductVideo')->findBy(['product' => $this->product], ['sort_order' => 'DESC']);\n if (count($product_video_relationships) > 0)\n {\n foreach ($product_video_relationships as $product_video_relationship)\n {\n $additional_video_info[] =\n [\n 'rel_id' => $product_video_relationship->getId(),\n 'embed_code' => $product_video_relationship->getVideo()->getEmbedCode(100, 80)\n ];\n }\n }\n\n return $additional_video_info;\n }", "function vcex_get_post_video_html() {\n\tif ( function_exists( 'wpex_get_post_video_html' ) ) {\n\t\treturn wpex_get_post_video_html();\n\t}\n}", "function video() {\n echo json_encode(array('element' => '<video controls autoplay> <source src=\"skysignagelight.1564484463.mp4\" type=\"video/mp4\"></video>'));\n exit;\n }", "function mars_video_meta() {}", "function emvideo_dotsub_extract($parse = '') {\n // Here we assume that a URL will be passed in the form of\n // http://dotsub.com/view/730d7b48-532a-4ec2-a0c6-ba0ac47d611\n // or embed code in the form of <embed src=\"http://dotsub.com/static/players/portalplayer.swf?plugins=dotsub&uuid=730d7b48-532a-4ec2-a0c6-ba0ac47d6116&type=video&lang=eng\"\n\n return array(\n '@dotsub\\.com/view/([^\"]+)@i', \n '@dotsub\\.com/static/players/portalplayer.swf?plugins=dotsub&uuid=([^\\?]+)@i',\n );\n}", "public function get_content_file_video(){\r\n\t\t$path = storage_path().'/data_video/';\r\n\t\t$dir = scandir($path);\r\n\t\tforeach ($dir as $key => $value) {\r\n\t\t\tif(preg_match(\"/\\.json$/\",$value)){\r\n\t\t\t\t$data = (json_decode(file_get_contents($path.$value)));\r\n\t\t\t\tforeach ($data as $key2 => $value2) {\r\n\t\t\t\t\tforeach ($value2->items as $key3 => $value3) {\r\n\t\t\t\t\t\t$params[$key3][\"videoId\"] = $value3->snippet->resourceId->videoId;\r\n\t\t\t\t\t\t$params[$key3][\"title\"] = $value3->snippet->title;\r\n\t\t\t\t\t\t$params[$key3][\"description\"] = $value3->snippet->description;\r\n\t\t\t\t\t\t$params[\"keywords\"] = str_replace(\".json\", \"\", $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->save_video_by_array($params);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function checkvideocontent($html) {\n\t\t$title='';\n\t\t$description='';\n\n\t\t$type='';\n\t\t$videotype='';\n\t\t$videotype='';\n\t\t$site_name='';\n\n\t\t$videoUrl='';\n\t\t$thumbnailUrl='';\n\t\t$embedUrl='';\n\t\t$return= '';\n\t\t$metasplits = array();\n\t\t$metasplits['og:url'] ='og:url\" content=\"';//http://www.youtube.com/watch?v=a6Yqa23LS9c\">\n\t\t$metasplits['og:title'] ='og:title\" content=\"'; //Argon Sphere vs Shogan - Space Traveler\">\n\t\t$metasplits['og:description'] ='og:description\" content=\"'; //Album: VA - 2 Sides Of Moon Subscribe for more psytrance music.\">\n\t\t$metasplits['og:type'] ='og:type\" content=\"'; //video\">\n\t\t$metasplits['og:image'] ='og:image\" content=\"'; //http://i2.ytimg.com/vi/a6Yqa23LS9c/mqdefault.jpg\">\n\t\t$metasplits['og:video'] ='og:video\" content=\"'; //http://www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['og:video:url'] ='og:video:url\" content=\"https'; //www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['og:video:type'] ='og:video:type\" content=\"'; //application/x-shockwave-flash\">\n\t\t$metasplits['og:video:width'] ='og:video:width\" content=\"'; //640\">\n\t\t$metasplits['og:video:height'] ='og:video:height\" content=\"'; //480\">\n\t\t$metasplits['og:site_name'] ='og:site_name\" content=\"'; //YouTube\">\n\t\t$metasplits['itemprop.url'] ='itemprop=\"url\" href=\"'; //http://www.youtube.com/watch?v=a6Yqa23LS9c\">\n\t\t$metasplits['itemprop.name'] ='itemprop=\"name\" content=\"'; //Argon Sphere vs Shogan - Space Traveler\">\n\t\t$metasplits['itemprop.description'] ='itemprop=\"description\" content=\"'; //Album: VA - 2 Sides Of Moon Subscribe for more psytrance music.\">\n\t\t$metasplits['itemprop.thumbnailUrl'] ='itemprop=\"thumbnailUrl\" href=\"'; //http://i2.ytimg.com/vi/a6Yqa23LS9c/hqdefault.jpg\">\n\t\t$metasplits['itemprop.embedURL'] ='itemprop=\"embedURL\" href=\"'; //http://www.youtube.com/v/a6Yqa23LS9c?autohide=1&amp;version=3\">\n\t\t$metasplits['itemprop.playerType'] ='itemprop=\"playerType\" content=\"'; //Flash\">\n\t\t$metasplits['itemprop.playpageUrl'] ='itemprop=\"playpageUrl\" content=\"'; //http://vimeo.com/15556391\">\n\t\t$metasplits['itemprop.video'] ='itemprop=\"video\" itemscope itemtype=\"'; //\n\n\t\t//check HTML5\n\t\t$html5vidogg='';\n\t\t$html5vidmp4='';\n\t\t$html5vidwebm='';\n\t\tif ($this->conf['attachments.']['useFlowPlayer']= 1) {\n\t\t\t$htmlvidarr = explode('<video', $html);\n\t\t\tif (count($htmlvidarr)>1) {\n\t\t\t\t$htmlvidarrvid = explode('.ogg', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidogg = $htmlvidarrvid[0] . '.ogg';\n\t\t\t\t}\n\n\t\t\t\t$htmlvidarrvid = explode('.mp4', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidmp4 = $htmlvidarrvid[0] . '.mp4';\n\t\t\t\t}\n\n\t\t\t\t$htmlvidarrvid = explode('.webm', $htmlvidarr[1]);\n\t\t\t\tif (count($htmlvidarrvid)>1) {\n\t\t\t\t\t$html5vidwebm = $htmlvidarrvid[0]. '.webm';\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidogg!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidogg);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidogg = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidmp4!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidmp4);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidmp4 = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidwebm!='') {\n\t\t\t\t\t$html5vidarr = explode('src=', $html5vidwebm);\n\t\t\t\t\tif (count($html5vidarr)>1) {\n\t\t\t\t\t\t$html5vidwebm = $html5vidarr[count($html5vidarr)-1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($html5vidogg!='') {\n\t\t\t\t\tif (strpos($html5vidogg, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidogg), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $this->urlsubpath . $html5vidogg;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $html5vidogg;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidogg=$this->urlhomearrstr . $html5vidogg;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidogg=str_replace('\"', '', $html5vidogg);\n\t\t\t\tif ($html5vidmp4!='') {\n\t\t\t\t\tif (strpos($html5vidmp4, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidmp4), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $this->urlsubpath . $html5vidmp4;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $html5vidmp4;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidmp4=$this->urlhomearrstr . $html5vidmp4;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidmp4=str_replace('\"', '', $html5vidmp4);\n\t\t\t\tif ($html5vidwebm!='') {\n\t\t\t\t\tif (strpos($html5vidwebm, 'http')===FALSE) {\n\t\t\t\t\t\t//add base dir\n\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $html5vidwebm), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $this->urlsubpath . $html5vidwebm;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $html5vidwebm;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$html5vidwebm=$this->urlhomearrstr . $html5vidwebm;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$html5vidwebm=str_replace('\"', '', $html5vidwebm);\n\n\t\t\t\t$thumbnailUrl=$html5vidogg . '@@@' . $html5vidmp4 . '@@@' .$html5vidwebm . '@@@';\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['embedUrl'] = $thumbnailUrl;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videotype'] = $videotype;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 1;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['logo'] = $thumbnailUrl;\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videosite'] = '';\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = $_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urltext'] = $_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t$return = 'found';\n\t\t\t}\n\t\t}\n\n\t\tif (($html5vidogg=='') && ($html5vidmp4=='') && ($html5vidwebm=='')) {\n\t\t\t$metakeys=array();\n\t\t\t$j=0;\n\t\t\tforeach ($metasplits as $metasplit) {\n\t\t\t\t$tagcontent='';\n\t\t\t\t$htmlvidarr = explode($metasplit, $html);\n\t\t\t\tif (count($htmlvidarr)>1) {\n\t\t\t\t\t$tagcontentarr = explode('\">', $htmlvidarr[1]);\n\t\t\t\t\t$tagcontent=$tagcontentarr[0];\n\t\t\t\t\t$propertyval= $metasplit;\n\t\t\t\t\t$propertyval = str_replace ('\" content=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('\" itemscope itemtype=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('\" href=\"', '', $propertyval);\n\t\t\t\t\t$propertyval = str_replace ('=\"', '.', $propertyval);\n\t\t\t\t}\n\n\t\t\t\tif ($tagcontent!=''){\n\t\t\t\t\t$metakeys[$propertyval]=$tagcontent;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (count($metakeys)>0) {\n\t\t\t\t//$type\n\t\t\t\tif (array_key_exists('og:type', $metakeys)) {\n\t\t\t\t\tif($metakeys['og:type'] =='video') {\n\t\t\t\t\t\t$type='video';\n\t\t\t\t\t}\n\n\t\t\t\t} elseif (array_key_exists('itemprop.video', $metakeys)) {\n\t\t\t\t\tif($metakeys['itemprop.video'] =='http://schema.org/VideoObject') {\n\t\t\t\t\t\t$type='video';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($type=='video') {\n\t\t\t\t\t//$description\n\t\t\t\t\tif (array_key_exists('og:description', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:description'] !='') {\n\t\t\t\t\t\t\t$description=$metakeys['og:description'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.description', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.description'] !='') {\n\t\t\t\t\t\t\t$description=$metakeys['itemprop.description'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$title\n\t\t\t\t\tif (array_key_exists('og:title', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:title'] !='') {\n\t\t\t\t\t\t\t$title=$metakeys['og:title'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.name', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.name'] !='') {\n\t\t\t\t\t\t\t$title=$metakeys['itemprop.name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$videotype\n\t\t\t\t\tif (array_key_exists('og:video:type', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:video:type']!='') {\n\t\t\t\t\t\t\t$videotype=$metakeys['og:video:type'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//site_name\n\t\t\t\t\tif (array_key_exists('og:site_name', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:site_name'] !='') {\n\t\t\t\t\t\t\t$site_name=$metakeys['og:site_name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.name', $metakeys)) {\n\t\t\t\t\t\tif (strlen($metakeys['itemprop.name']) <10) { //Vimeo\n\t\t\t\t\t\t\t$site_name=$metakeys['itemprop.name'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//thumbnailUrl\n\t\t\t\t\tif (array_key_exists('itemprop.thumbnailUrl', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.thumbnailUrl'] !='') {\n\t\t\t\t\t\t\t$thumbnailUrl=$metakeys['itemprop.thumbnailUrl'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('og:image', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:image'] !='') {\n\t\t\t\t\t\t\t$thumbnailUrl=$metakeys['og:image'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//embedUrl\n\t\t\t\t\tif (array_key_exists('og:video', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['og:video'] !='') {\n\t\t\t\t\t\t\t$embedUrl=$metakeys['og:video'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.embedURL', $metakeys)) {\n\t\t\t\t\t\tif ($metakeys['itemprop.embedURL'] !='') {\n\t\t\t\t\t\t\t$embedUrl=$metakeys['itemprop.embedURL'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$videoUrl\n\t\t\t\t\tif (array_key_exists('og:url', $metakeys)) {\n\t\t\t\t\t\tif(strpos($metakeys['og:url'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['og:url'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.url', $metakeys)) {\n\t\t\t\t\t\tif (strpos($metakeys['itemprop.url'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['itemprop.url'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('itemprop.playpageUrl', $metakeys)) {\n\t\t\t\t\t\tif (strpos($metakeys['itemprop.playpageUrl'], 'ttp:') > 0) {\n\t\t\t\t\t\t\t$videoUrl=$metakeys['itemprop.playpageUrl'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} elseif (array_key_exists('og:video:url', $metakeys)) {\n\t\t\t\t\t\t\t$videoUrl= 'https' . $metakeys['og:video:url'];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($_SESSION[$this->cid][$this->commentid]['title'] =='') {\n\t\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = $title;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($videoUrl=='') {\n\t\t\t\t\t\t$videoUrl =$_SESSION[$this->cid][$this->commentid]['url'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = $videoUrl;\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urltext'] = $videoUrl;\n\n\t\t\t\t\t$description= $this->croptitleordesc($description);\n\n\t\t\t\t\tif ($description=='') {\n\t\t\t\t\t\t$description=' ';\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = $description;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 0;\n\t\t\t\t\tif ($thumbnailUrl !='') {\n\t\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['totalcounter'] = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['logo'] = $thumbnailUrl;\n\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['videosite'] = $site_name;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['embedUrl'] = $embedUrl;\n\t\t\t\t\t$return ='found';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ($return == 'found') {\n\t\t\t// cleansing\n\t\t\t$description = $_SESSION[$this->cid][$this->commentid]['description'];\n\n\t\t\t$description = $this->cleanouttitleordesc($description);\n\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = $description;\n\n\t\t\t$title = $_SESSION[$this->cid][$this->commentid]['title'];\n\t\t\t$title = $this->cleanouttitleordesc($title);\n\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = $title;\n\t\t\treturn 'found';\n\t\t}\n\n\t\treturn '';\n\t}", "function thb_portfolio_video() {\n\t$id = get_the_ID();\n\t$portfolio_header_video = get_post_meta($id, 'portfolio_header_video', true);\n\t$portfolio_header_video_url = wp_get_attachment_url($portfolio_header_video);\n\tif ($portfolio_header_video_url) {\n\t\t$portfolio_header_video_poster = get_post_meta($id, 'portfolio_header_video_poster', true);\n\t\t$portfolio_header_video_poster_url = wp_get_attachment_url($portfolio_header_video_poster);\n\t\t$video_type = wp_check_filetype( $portfolio_header_video_url, wp_get_mime_types() );\n\t\t$poster_type = wp_check_filetype( $portfolio_header_video_poster_url, wp_get_mime_types() );\n\t\t$portfolio_header_video_loop = get_post_meta($id, 'portfolio_header_video_loop', true) !== 'off' ? 'true' : 'false';\n\n\t\t$attributes[] = 'data-vide-bg=\"'.$video_type['ext'].': '. esc_attr($portfolio_header_video_url) . ($portfolio_header_video_poster_url ? ', poster: '.esc_attr($portfolio_header_video_poster_url) : '').'\"';\n\n\t\t$attributes[] = 'data-vide-options=\"posterType: ' . ( $poster_type['ext'] ? esc_attr($poster_type['ext']) : 'none' ) . ', loop: '.$portfolio_header_video_loop.', muted: true, position: 50% 50%, resizing: true\"';\n\t} else {\n\t\t$attributes[] = '';\n\t}\n\treturn $attributes;\n}", "function video_cck_tudou_extract($embed = '') {\n // http://www.tudou.com/programs/view/uprLNXyEGpc/\n // <object width=\"400\" height=\"300\"><param name=\"movie\" value=\"http://www.tudou.com/v/uprLNXyEGpc\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.tudou.com/v/uprLNXyEGpc\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"300\" allowFullScreen=\"true\" wmode=\"transparent\" allowScriptAccess=\"always\"></embed></object>\n return array(\n '@tudou\\.com/programs/view/([^\"\\&/]+)@i',\n '@value=\"http\\://www\\.tudou\\.com/v/([^\"\\&/]+)@i'\n );\n}", "function getVideo()\n {\n return $this->video;\n }", "protected function _getElements() {\n // Get avatar\n $avatar = null;\n $this->_getAvatar($this->id)->then(function($url) use(&$avatar) {\n $avatar = $url;\n })->wait();\n // Get data\n return $this->_paginate('/search', [\n 'maxResults' => $this->per_page,\n 'channelId' => $this->id,\n 'part' => 'snippet',\n 'type' => 'video',\n 'order' => 'date',\n 'safeSearch' => $this->config['nsfw'] ? 'none' : 'strict'\n ], $avatar);\n }", "public function create()\n\t{\n\t\t// DOMElement at the other end.\n\t\t$document = new DOMDocument;\n\n\t\t// Video element\n\t\t$video = $document->createElement('video:video');\n\n\t\t$document->appendChild($video);\n\t\t\n\t\t/**\n\t\t * Small recursive function to add attributes to the document.\n\t\t */\n\t\t$append_attributes = function($attributes) use ($video, $document)\n\t\t{\n\t\t\tforeach($attributes as $name => $value)\n\t\t\t{\n\t\t\t\tif (NULL !== $value)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$append_attributes($value);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$video->appendChild($document->createElement('video:'.$name, $value));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t$append_attributes($this->_attributes);\n\t\t\n\t\t// @todo append: uploader, restriction and player_loc.\n\n\t\treturn $video;\n\t}", "function wp_get_video_extensions()\n {\n }", "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Embeds a video into the Page';\n\t\t$txt['html'] = '<p>Embeds a video into the Page. Accepts either full video URL (YouTube, Vimeo, Kaltura, Blip TV) or a file name or path.</p>\n\t\t\t\t\t\t<p><strong>Youtube URL:</strong> https://www.youtube.com/watch?v=<span class=\"highlight\">FgfGOEpZEOw</span></p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692)]]</code></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p>Size attributes may be given as single numeric values or with units (%, em, px). When an attribute name is given (e.g., width=600, height=338), order does not matter. Attribute values may be quoted but are not required to be. When a name attribute is not give (e.g., 600, 338), the first value will be set as width and the second value as height.</p>\n\t\t\t\t\t\t<p>Examples:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><code>[[Video(MyVideo.m4v, width=\"600\", height=\"338\")]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://www.youtube.com/watch?v=FgfGOEpZEOw, width=600px, height=338px)]]</code></li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://blip.tv/play/hNNNg4uIDAI.x?p=1, 640, 380)]]</code> - width 640px, height 380px</li>\n\t\t\t\t\t\t\t<li><code>[[Video(https://player.vimeo.com/video/67115692, 100%)]]</code> - width of 100%</li>\n\t\t\t\t\t\t</ul>';\n\n\t\treturn $txt['html'];\n\t}", "function wpc_2016_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2016',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}", "function video_embed_filter( $html, $data ) {\n if ( ! is_object( $data ) || empty( $data->type ) )\n return $html;\n\n // Verify that it is a video\n if ( !($data->type == 'video') )\n return $html;\n\n // Calculate aspect ratio\n $ar = $data->width / $data->height;\n\n // Set the aspect ratio modifier\n $ar_mod = ( abs($ar-(4/3)) < abs($ar-(16/9)) ? 'embed-responsive-4by3' : 'embed-responsive-16by9');\n\n // Strip width and height from html\n $html = preg_replace( '/(width|height)=\"\\d*\"\\s/', \"\", $html );\n\n // Return code\n return '<div class=\"video-container '.$ar_mod.'\" data-aspectratio=\"'.number_format($ar, 5, '.').'\">'.$html.'</div>';\n\n}", "public function getVideoInfo($url)\n {\n $this->getSourceCode($this->generateUrl($url));\n\n $title = $this->getTitle();\n\n if (strtolower($title) === \"sorry, this content isn't available at the moment\") {\n throw new VideoDownloaderException('Video not available!');\n }\n\n $description = $this->getDescription();\n $owner = $this->getValueByKey('ownerName');\n $created_time = $this->getCreatedTime();\n var_dump($this->body);\n $hd_link = $this->getValueByKey('hd_src_no_ratelimit');\n $sd_link = $this->getValueByKey('sd_src_no_ratelimit');\n\n return compact('title', 'description', 'owner', 'created_time', 'hd_link', 'sd_link');\n }", "function ParseStreams() {\n $URL = \"https://live.rbg.tum.de/cgi-bin/streams\";\n $html = file_get_html($URL);\n\n // Initialize basic data structure\n $data = [];\n $data[\"livestreams\"] = [];\n $data[\"vod\"] = [];\n $data[\"vod_archive\"] = [];\n // First index is normally current live events (first ul)\n // Second index is normally VOD - current semester (second ul)\n // Last index is normally VOD - archive (last ul)\n $index = 0;\n $indexToType = [0 => \"live\", 1 => \"vod\"];\n // If there are currently no active livestreams, the types shift (as 0 is now vod, because there is no ul with livestream-events existing)\n if (strpos($html->find(\"main\", 0), \"Derzeit gibt es keine aktiven Livestreams\")) {\n // If first is empty -> leave index of ul, if does not exist at all skip index\n if (sizeof($html->find(\"ul\", 0)->find(\"li\")) == 0) {\n $indexToType[0] = null;\n $indexToType[1] = \"vod\";\n } else {\n $indexToType[0] = \"vod\";\n $indexToType[1] = null;\n }\n }\n // Find the amount of all uls on the whole html page (to identify last one)\n $totalLists = sizeof($html->find(\"ul\"));\n // If the archive (last ul) was found already\n $archiveFound = false;\n for ($index; !$archiveFound; $index++) {\n\n // Check if we are in a sub ul of an VOD-Entry (then skip as this was already read in) or if we are at the last list entry\n if (!array_key_exists($index, $indexToType) && $index != $totalLists - 1) {\n continue;\n }\n\n // Find all lists to go through them\n $lists = $html->find(\"ul\", $index);\n\n // Check if we are in the archive ul\n if ($index == $totalLists - 1) {\n $archiveFound = true;\n $indexToType[$index] = \"vod_archive\";\n }\n\n // Got through each list entry and parse data\n foreach ($lists->find('li') as $entry) {\n $element = [];\n // If this is a live entry, get name and links\n if ($indexToType[$index] == \"live\") {\n $link = $entry->find('a');\n if (sizeof($link) > 1) {\n // Got a Livestream-Entry\n $element[\"info\"] = [];\n $element[\"links\"] = [];\n $element[\"info\"][\"name\"] = FormatText($link[0]->innertext);\n $element[\"links\"][\"overall\"] = FormatAndShortenLink($link[0]->attr[\"href\"]);\n if (sizeof($link) > 1) {\n $element[\"links\"][\"comb\"] = FormatAndShortenLink($link[1]->attr[\"href\"]);\n }\n if (sizeof($link) > 2) {\n $element[\"links\"][\"pres\"] = FormatAndShortenLink($link[2]->attr[\"href\"]);\n }\n if (sizeof($link) > 3) {\n $element[\"links\"][\"cam\"] = FormatAndShortenLink($link[3]->attr[\"href\"]);\n }\n }\n $data[\"livestreams\"][] = $element;\n } else if ($indexToType[$index] == \"vod\") {\n // If this is a VOD Entry it contains a header (in bold)\n if ($entry->find(\"b\") != null) {\n // Got a VOD Entry\n $element[\"info\"] = [];\n $element[\"videos\"] = [];\n $element[\"info\"][\"name\"] = FormatText($entry->find(\".vodlistth\", 0)->innertext);\n foreach ($entry->find(\"li\") as $videoEntry) {\n $retEntry = [];\n $link = $videoEntry->find('a');\n $retEntry[\"info\"][\"name\"] = FormatText($link[0]->innertext);\n $retEntry[\"links\"][\"overall\"] = FormatAndShortenLink($link[0]->attr[\"href\"]);\n if (sizeof($link) > 1) {\n $retEntry[\"links\"][\"comb\"] = FormatAndShortenLink($link[1]->attr[\"href\"]);\n }\n if (sizeof($link) > 2) {\n $retEntry[\"links\"][\"pres\"] = FormatAndShortenLink($link[2]->attr[\"href\"]);\n }\n if (sizeof($link) > 3) {\n $retEntry[\"links\"][\"cam\"] = FormatAndShortenLink($link[3]->attr[\"href\"]);\n }\n $element[\"videos\"][] = $retEntry;\n }\n $data[\"vod\"][] = $element;\n }\n } else if ($indexToType[$index] == \"vod_archive\") {\n // Got a VOD - Archive Entry\n $element[\"info\"] = [];\n $element[\"info\"][\"name\"] = FormatText($entry->find(\"a\", 0)->innertext);\n $element[\"info\"][\"link\"] = FormatLink($entry->find(\"a\", 0)->attr[\"href\"]);\n $data[\"vod_archive\"][] = $element;\n } else {\n break;\n }\n }\n }\n return $data;\n}", "protected function _extract_videos($src=null)\n {\n $this->log('Extracting video clips');\n\n if (null === $src) {\n $src = &$this->_response;\n }\n\n if (!preg_match_all(\n '#<div class=\"cat-cnt-item-th\">(.+?)</div>#',\n $src,\n $m\n )) {\n return false;\n }\n\n $videos = array();\n foreach ($m[1] as &$s) {\n if (!preg_match(\n '#href=\"(?P<url>[^\"]+)\" title=\"(?P<desc>[^\"]+)#',\n $s,\n $a\n )) {\n continue;\n }\n\n preg_match('#<span>(?P<title>[^<]+)</span>#', $s, $b);\n if (!preg_match(\n '#src=\"[^\"]+/media/(?P<filename>[^\"]+)_\\d{4}_thumb\\.jpg#',\n $s,\n $c\n )) {\n $resp = $this->_connection->get($a['url']);\n if (preg_match(\n '#sGlobalFileName=\\'([^\\']+)\\'#',\n $resp,\n $c1\n ) && preg_match(\n '#sGlobalContentFilePath=\\'([^\\']+)\\'#',\n $resp,\n $c2\n )) {\n $c = array('filename' => \"{$c2[1]}/{$c1[1]}\");\n } else {\n $c = null;\n }\n }\n\n if (!empty($c['filename'])) {\n $c['url'] = sprintf(self::FLV_FILE_URL, $c['filename']);\n $videos[] = array_combine(\n array('url', 'filename', 'title', 'description'),\n array_map('trim', array_map(\n 'html_entity_decode',\n array($c['url'], $c['filename'], $b['title'], $a['desc'])\n ))\n );\n }\n }\n return $videos;\n }", "public function getVideo()\n {\n return $this->Video;\n }", "function signage_panes_video_render($subtype, $conf, $panel_args, $context = NULL) {\n $block = new stdClass();\n\n // Set default value of video_playlist in case we have existing\n // video panes.\n if (!isset($conf['video_playlist'])) {\n $conf['video_playlist'] = 0;\n }\n\n // Determine which provider to build for.\n switch ($conf['video_provider']) {\n case 0:\n if ($conf['video_playlist']) {\n // Extract the playlistID from the video embed code.\n preg_match(YOUTUBE_PLAYLIST_REGEX_PATTERN, $conf['video_embed_code'], $matches);\n $vid = $matches[1];\n } else {\n // Extract the videoID from the video embed code.\n preg_match(YOUTUBE_REGEX_PATTERN, $conf['video_embed_code'], $matches);\n $vid = $matches[1];\n }\n\n // Rebuild the URL according to newest standard using admin settings for parameters.\n if ($conf['video_playlist']) {\n $url = '//www.youtube.com/embed?listType=playlist&list=' . $vid . '&';\n } else {\n $url = '//www.youtube.com/embed/' . $vid . '?';\n }\n\n $params = '';\n $params .= 'theme=' . variable_get('signage_panes_video_youtube_theme') . '&';\n $params .= 'autoplay=' . variable_get('signage_panes_video_youtube_autoplay') . '&';\n $params .= 'loop=' . variable_get('signage_panes_video_youtube_loop') . '&';\n $params .= 'vq=' . variable_get('signage_panes_video_youtube_vq') . '&';\n $params .= 'rel=' . variable_get('signage_panes_video_youtube_rel') . '&';\n $params .= 'showinfo=' . variable_get('signage_panes_video_youtube_showinfo') . '&';\n $params .= 'modestbranding=' . variable_get('signage_panes_video_youtube_modestbranding') . '&';\n $params .= 'cc_load_policy=' . variable_get('signage_panes_video_youtube_cc_load_policy') . '&';\n $params .= 'iv_load_policy=' . variable_get('signage_panes_video_youtube_iv_load_policy') . '&';\n $params .= 'controls=' . variable_get('signage_panes_video_youtube_controls') . '&';\n $params .= 'autohide=' . variable_get('signage_panes_video_youtube_autohide');\n\n if (!$conf['video_playlist']) {\n $params .= '&playlist=' . $vid;\n }\n\n // Recreate embed code based on most recent IFrame version of the HTML5 player from YouTube provider.\n $embed_code = 'width=' . variable_get('signage_panes_video_youtube_width') .\n ' height=' . variable_get('signage_panes_video_youtube_height') .\n ' src=' . $url . '' . $params .\n ' frameborder=0 allowfullscreen=false';\n\n break;\n\n case 1:\n // Extract the videoID from the video embed code.\n preg_match(VIMEO_REGEX_PATTERN, $conf['video_embed_code'], $matches);\n $vid = $matches[1];\n\n // Rebuild the URL according to newest standard using admin settings for\n // parameters.\n $url = '//player.vimeo.com/video/' . $vid;\n $params = '';\n $params .= 'autoplay=' . variable_get('signage_panes_video_vimeo_autoplay') . '&';\n $params .= 'loop=' . variable_get('signage_panes_video_vimeo_loop') . '&';\n $params .= 'color=' . variable_get('signage_panes_video_vimeo_color') . '&';\n $params .= 'portrait=' . variable_get('signage_panes_video_vimeo_portrait') . '&';\n $params .= 'title=' . variable_get('signage_panes_video_vimeo_title') . '&';\n $params .= 'byline=' . variable_get('signage_panes_video_vimeo_byline');\n\n // Recreate embed code based on most recent IFrame version of the HTML5\n // player from Vimeo provider.\n $embed_code = 'src=' . $url . '?' . $params .\n ' width=' . variable_get('signage_panes_video_vimeo_width') .\n ' height=' . variable_get('signage_panes_video_vimeo_height') .\n ' frameborder=0 webkitallowfullscreen mozallowfullscreen allowfullscreen';\n\n break;\n }\n\n // Create the block settings.\n $block->title = '';\n $block->content = '\n <div class=\"flexible-container\">\n\t <iframe ' . $embed_code . '></iframe>\n\t</div>\n ';\n\n return $block;\n}", "static function getArregloVideos($text) {\n $videoArray = explode('http://www.youtube.com/watch?v=', $text);\n\n //Se realiza este proceso para descartar posiciones del arreglo sin contenido\n foreach ($videoArray as $video) {\n if ($video) {\n $video = explode('&', $video); //Elimina cualquier parametro adicional en la URL\n $videos[] = '<iframe width=\"560\" height=\"349\" src=\"http://www.youtube.com/embed/' . $video[0] . '?rel=0\" frameborder=\"0\" allowfullscreen></iframe>';\n }\n }\n return $videos;\n }", "public function videos()\n {\n $this->videos->videosAttrs = ['title', 'url', ['thumb', 'medium']];\n $this->videos->limit = 2;\n $records = $this->videos->all();\n\n return ['videos' => $records];\n }", "function wpc_2018_print_watch_videos_content( $content ) {\n\tif ( function_exists( 'wpcampus_print_watch_videos' ) ) {\n\t\twpcampus_print_watch_videos( 'wpc-videos', array(\n\t\t\t'playlist' => 'wpcampus-2018',\n\t\t\t'show_event' => false,\n\t\t\t'show_filters' => false,\n\t\t));\n\t}\n}", "function video_cck_dailymotion_extract($embed = '') {\n // http://www.dailymotion.com/us/cluster/news/featured/video/x3xk8v_primary-smackdown-obama-girl-return_fun\n // http://www.dailymotion.com/barelypolitical/video/x3xk8v_primary-smackdown-obama-girl-return_fun\n // http://www.dailymotion.com/barelypolitical/video/x3xk8v\n // <div><object width=\"420\" height=\"252\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/x3xk8v\" /></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.dailymotion.com/swf/x3xk8v\" type=\"application/x-shockwave-flash\" width=\"420\" height=\"252\" allowFullScreen=\"true\" allowScriptAccess=\"always\"></embed></object><br /><b><a href=\"http://www.dailymotion.com/video/x3xk8v_primary-smackdown-obama-girl-return_fun\">Primary Smackdown: Obama Girl Returns</a></b><br /><i>Uploaded by <a href=\"http://www.dailymotion.com/BarelyPolitical\">BarelyPolitical</a></i></div>\n // <div><object width=\"420\" height=\"252\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/x3xk8v\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.dailymotion.com/swf/x3xk8v\" type=\"application/x-shockwave-flash\" width=\"420\" height=\"252\" allowFullScreen=\"true\" allowScriptAccess=\"always\"></embed></object><br /><b><a href=\"http://www.dailymotion.com/video/x3xk8v_primary-smackdown-obama-girl-return_fun\">Primary Smackdown: Obama Girl Returns</a></b><br /><i>Uploaded by <a href=\"http://www.dailymotion.com/BarelyPolitical\">BarelyPolitical</a></i></div>\n// if (preg_match('@dailymotion\\.com@i', $embed, $matches)) {\n// if (preg_match('@/([^/_]+)_@i', $embed, $matches)) {\n// return $matches[0];\n// }\n// }\n if (preg_match('@dailymotion\\.com/swf/([^\"\\&]+)@i', $embed, $matches)) {\n return $matches[1];\n }\n if (preg_match('@dailymotion\\.com@i', $embed, $matches)) {\n if (preg_match('@/([^/_]+)_@i', $embed, $matches)) {\n return $matches[1];\n }\n }\n return array();\n}", "protected function render() {\n $settings = $this->get_settings_for_display();\n if(!empty($settings['rh_canvas_type']) && $settings['rh_canvas_type'] == 'video') {\n wp_enqueue_script('rhvideocanvas');\n if ( ! empty( $settings['rh_vid_mp4'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-mp4', $settings['rh_vid_mp4'] );\n }else if(!empty($settings['rh_vid_mp4_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-mp4', $settings['rh_vid_mp4_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_webm'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-webm', $settings['rh_vid_webm'] );\n }else if(!empty($settings['rh_vid_webm_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-webm', $settings['rh_vid_webm_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_ogv'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-ogv', $settings['rh_vid_ogv'] );\n }else if(!empty($settings['rh_vid_ogv_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-ogv', $settings['rh_vid_ogv_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_poster'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'poster', $settings['rh_vid_poster']['url'] );\n }\n if ( ! empty( $settings['rh_vid_breakpoint'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-breakpoint', $settings['rh_vid_breakpoint'] );\n }\n if ( ! empty( $settings['rh_vid_fallback'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback', $settings['rh_vid_fallback']['url'] );\n }\n if ( ! empty( $settings['rh_vid_fallback_tablet'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback-tablet', $settings['rh_vid_fallback_tablet']['url'] );\n }\n if ( ! empty( $settings['rh_vid_fallback_mobile'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback-mobile', $settings['rh_vid_fallback_mobile']['url'] );\n }\n if ( ! empty( $settings['rh_load_iter'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-loaditer', 'true' );\n }\n $loop = (empty( $settings['disableloop'] )) ? ' loop' : '';\n $autoplay = (empty( $settings['disableautoplay'] )) ? ' autoplay' : '';\n echo '<video'.$loop.$autoplay.' playsinline muted class=\"rh-video-canvas rh_and_canvas\" '.$this->get_render_attribute_string( 'rh_vid_data' ).'></video>';\n }else if(!empty($settings['rh_canvas_type']) && $settings['rh_canvas_type'] == 'masksvg') {\n wp_enqueue_script('rhblobcanvas');\n $widgetId = $this->get_id();\n \n if(!empty($settings['svg_image']['id'])){\n $image_url = Group_Control_Image_Size::get_attachment_image_src($settings['svg_image']['id'], 'image', $settings);\n $imageData = wp_get_attachment_image_src($settings['svg_image']['id'],'full');\n $h = $imageData[2];\n $w = $imageData[1];\n $imageProportion = $h/$w;\n $realHeight = $settings['svg_size']['size'] * $imageProportion;\n $this->add_render_attribute('_svgrapper', 'data-resize', $realHeight);\n }\n $this->add_render_attribute('_svgrapper', 'data-numpoints', $settings['numPoints']['size']);\n $this->add_render_attribute('_svgrapper', 'data-minradius', $settings['minmaxRadius']['sizes']['start']);\n $this->add_render_attribute('_svgrapper', 'data-maxradius', $settings['minmaxRadius']['sizes']['end']);\n $this->add_render_attribute('_svgrapper', 'data-minduration', $settings['minmaxDuration']['sizes']['start']);\n $this->add_render_attribute('_svgrapper', 'data-maxduration', $settings['minmaxDuration']['sizes']['end']);\n $this->add_render_attribute('_svgrapper', 'data-tensionpoints', $settings['tensionPoints']['size']);\n\n if(empty($settings['svgimage_x']['size'])){\n $posX = 0;\n }else{\n $posX = $settings['svgimage_x']['size'];\n }\n if(empty($settings['svgimage_y']['size'])){\n $posY = 0;\n }else{\n $posY = $settings['svgimage_y']['size'];\n }\n ?>\n <div data-id=\"<?php echo esc_attr($widgetId); ?>\" class=\"rh-svgblob-wrapper rh_and_canvas\" <?php echo ''.$this->get_render_attribute_string( '_svgrapper' )?>>\n <svg class=\"rh-svg-blob\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 600 600\" preserveAspectRatio=\"xMidYMid meet\" xml:space=\"preserve\">\n \n <?php if(!empty($settings['svg_image']['id']) && $settings['svgfilltype'] == 'image'){ ?>\n <defs>\n <pattern id=\"pattern-<?php echo esc_attr($widgetId); ?>\" patternUnits=\"userSpaceOnUse\" patternContentUnits=\"userSpaceOnUse\" width=\"<?php echo ''.$settings['svg_size']['size'].$settings['svg_size']['unit']; ?>\" height=\"<?php echo ''.$realHeight.$settings['svg_size']['unit']; ?>\" x=\"<?php echo ''.$posX.$settings['svgimage_x']['unit']; ?>\" y=\"<?php echo ''.$posY.$settings['svgimage_y']['unit']; ?>\">\n \n <image id=\"img-pattern\" xlink:href=\"<?php echo ''.$image_url; ?>\" width=\"<?php echo ''.$settings['svg_size']['size'].$settings['svg_size']['unit']; ?>\" height=\"<?php echo ''.$realHeight.$settings['svg_size']['unit']; ?>\"> </image>\n </pattern>\n </defs>\n <?php } ?>\n <?php if($settings['svgfilltype'] == 'gradient'){ ?>\n <defs>\n <linearGradient id=\"pattern-<?php echo esc_attr($widgetId); ?>\" x1=\"<?php echo ''.$settings['gradientx1']['size'].$settings['gradientx1']['unit']; ?>\" x2=\"<?php echo ''.$settings['gradientx2']['size'].$settings['gradientx2']['unit']; ?>\" y1=\"<?php echo ''.$settings['gradienty1']['size'].$settings['gradienty1']['unit']; ?>\" y2=\"<?php echo ''.$settings['gradienty2']['size'].$settings['gradienty2']['unit']; ?>\">\n <stop style=\"stop-color: <?php echo ''.$settings['gradientcolor1'];?>\" offset=\"0\"/>\n <stop style=\"stop-color: <?php echo ''.$settings['gradientcolor2'];?>\" offset=\"1\"/>\n </linearGradient>\n </defs>\n <?php } ?>\n\n\n <path id=\"rhblobpath-<?php echo esc_attr($widgetId); ?>\"></path>\n \n <?php if(!empty($settings['svg_image']['id']) || $settings['gradientcolor1'] != ''):?>\n <style>\n #rhblobpath-<?php echo esc_attr($widgetId); ?>{\n fill: url(#pattern-<?php echo ''.$this->get_id(); ?>);\n }\n </style>\n <?php else:?>\n <style>\n #rhblobpath-<?php echo esc_attr($widgetId); ?>{\n fill: <?php echo ''.$settings['fill_color'];?>;\n }\n </style> \n <?php endif;?>\n\n\n </svg>\n </div>\n <?php\n wp_enqueue_script('gsap');\n } \n }", "public function getVideoSettingsJson()\n {\n $videoSettingData = parent::getVideoSettingsJson();\n $videoSettingData = $this->jsonDecoder->decode($videoSettingData);\n $mtConfig = [\n 'enabled' => false,\n ];\n\n $block = $this->getProductMediaBlock();\n if ($block) {\n $mtConfig = [\n 'enabled' => $block->toolObj->params->checkValue('enable-effect', 'Yes', 'product'),\n ];\n }\n\n $videoSettingData[] = [\n 'mtConfig' => $mtConfig\n ];\n\n return $this->jsonEncoder->encode($videoSettingData);\n }", "function get_media_info( $video ){\n $media_infos = array( ); $content = shell_exec( 'mediainfo \"' . $video . '\"' ); $xx = explode( \"\\n\\n\", $content );\n\n foreach ( $xx as $data ){$infos = explode( \"\\n\", $data ); $media_type = '';\n foreach ( $infos as $key => $val ){@list($k, $v, $e) = explode( \":\", $val );\n if ( empty( $v ) ){$media_type = $k;}\n else{\n $media_key = str_replace( array( ' ' ), '_', trim( strtolower( $k ) ) );\n $media_value = trim( $v );\n if ( !empty( $e ) )$media_value .= \":$e\"; $media_infos[$media_type][$media_key] = $media_value;\n }\n }\n }return $media_infos;\n}", "public function get_videos()\r\n\t\t{\r\n\t\t\t$videos = $this->obj->result;\r\n\t\t\treturn $videos;\r\n\t\t}", "protected function composeVideo(array $video)\n {\n $xmlCode = '<video:video>';\n\n if (isset($video['thumbnailUrl'])) {\n $xmlCode .= '<video:thumbnail_loc>' . $video['thumbnailUrl'] . '</video:thumbnail_loc>';\n }\n if (isset($video['title'])) {\n $xmlCode .= '<video:title><![CDATA[' . $video['title'] . ']]></video:title>';\n }\n if (isset($video['description'])) {\n $xmlCode .= '<video:description><![CDATA[' . $video['description'] . ']]></video:description>';\n }\n if (isset($video['contentUrl'])) {\n $xmlCode .= '<video:content_loc>' . $video['contentUrl'] . '</video:content_loc>';\n }\n if (isset($video['duration'])) {\n $xmlCode .= '<video:duration>' . $video['duration'] . '</video:duration>';\n }\n if (isset($video['expirationDate'])) {\n $xmlCode .= '<video:expiration_date>' . $this->normalizeDateValue($video['expirationDate']) . '</video:expiration_date>';\n }\n if (isset($video['rating'])) {\n $xmlCode .= '<video:rating>' . $video['rating'] . '</video:rating>';\n }\n if (isset($video['viewCount'])) {\n $xmlCode .= '<video:view_count>' . $video['viewCount'] . '</video:view_count>';\n }\n if (isset($video['publicationDate'])) {\n $xmlCode .= '<video:publication_date>' . $this->normalizeDateValue($video['publicationDate']) . '</video:publication_date>';\n }\n if (isset($video['familyFriendly'])) {\n $xmlCode .= '<video:family_friendly>' . $video['familyFriendly'] . '</video:family_friendly>';\n }\n if (isset($video['requiresSubscription'])) {\n $xmlCode .= '<video:requires_subscription>' . $video['requiresSubscription'] . '</video:requires_subscription>';\n }\n if (isset($video['live'])) {\n $xmlCode .= '<video:live>' . $video['live'] . '</video:live>';\n }\n if (isset($video['player'])) {\n $xmlCode .= '<video:player_loc allow_embed=\"' . $this->normalizeBooleanValue($video['player']['allowEmbed']) . '\" autoplay=\"' . $this->normalizeBooleanValue($video['player']['autoplay']) . '\">'\n . $video['player']['url']\n . '</video:player_loc>';\n }\n if (isset($video['restriction'])) {\n $xmlCode .= '<video:restriction relationship=\"' . $video['restriction']['relationship'] . '\">' . $video['restriction']['restriction'] . '</video:restriction>';\n }\n if (isset($video['gallery'])) {\n $xmlCode .= '<video:gallery_loc title=\"' . $video['gallery']['title'] . '\">' . $video['gallery']['url'] . '</video:gallery_loc>';\n }\n if (isset($video['price'])) {\n $xmlCode .= '<video:price currency=\"' . $video['price']['currency'] . '\">' . $video['price']['price'] . '</video:price>';\n }\n if (isset($video['uploader'])) {\n $xmlCode .= '<video:uploader info=\"' . $video['uploader']['info'] . '\">' . $video['uploader']['uploader'] . '</video:uploader>';\n }\n\n $xmlCode .= '</video:video>';\n\n return $xmlCode;\n }", "public function video_meta_information( $post ) {\n wp_nonce_field( 'video_meta_save', 'video_meta_box' );\n\n $provider = get_post_meta($post->ID, 'provider', true);\n $videoid = get_post_meta($post->ID, 'videoid', true);\n $season = get_post_meta($post->ID, 'season', true);\n $episode = get_post_meta($post->ID, 'episode', true);\n\n require_once(PLUGIN_ROOT. 'includes/tpl/video-meta.tpl.php');\n }", "function acadp_parse_videos( $url ) {\n\n\t$embeddable_url = '';\n\n\t// Check for YouTube\n\t$is_youtube = preg_match( '/youtu\\.be/i', $url ) || preg_match( '/youtube\\.com\\/watch/i', $url );\n\n\tif( $is_youtube ) {\n \t$pattern = '/^.*((youtu.be\\/)|(v\\/)|(\\/u\\/\\w\\/)|(embed\\/)|(watch\\?))\\??v?=?([^#\\&\\?]*).*/';\n \tpreg_match( $pattern, $url, $matches );\n \tif( count( $matches ) && strlen( $matches[7] ) == 11 ) {\n \t\t$embeddable_url = 'https://www.youtube.com/embed/'.$matches[7];\n \t}\n \t}\n\n\t// Check for Vimeo\n\t$is_vimeo = preg_match( '/vimeo\\.com/i', $url );\n\n\tif( $is_vimeo ) {\n \t$pattern = '/\\/\\/(www\\.)?vimeo.com\\/(\\d+)($|\\/)/';\n \tpreg_match( $pattern, $url, $matches );\n \tif( count( $matches ) ) {\n \t\t$embeddable_url = 'https://player.vimeo.com/video/'.$matches[2];\n \t}\n \t}\n\n\t// Return\n\treturn $embeddable_url;\n\n}", "function emvideo_dotsub_settings() {\n // We'll add a field set of player options here. You may add other options\n // to this element, or remove the field set entirely if there are no\n // user-configurable options allowed by the example provider.\n $form['dotsub']['player_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Embedded video player options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n // This is an option to set the video to full screen. You should remove this\n // option if it is not provided by the example provider.\n $form['dotsub']['player_options']['emvideo_dotsub_full_screen'] = array(\n '#type' => 'checkbox',\n '#title' => t('Allow fullscreen'),\n '#default_value' => variable_get('emvideo_dotsub_full_screen', 1),\n '#description' => t('Allow users to view video using the entire computer screen.'),\n );\n\n return $form;\n}", "public function get_video_url_list() {\n\n\t\treturn $this->video_url_list;\n\t}", "function showxml($rs_video, $playlistautoplay) {\n ## xml file header displaying here\n ob_clean();\n header(\"content-type: text/xml\");\n echo '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n echo '<playlist autoplay=\"' . $playlistautoplay . '\" random=\"false\">';\n $current_path = 'components/com_hdflvplayer/videos/';\n $hdvideo = $video = '';\n\n $db = JFactory::getDBO();\n\n $query_ads = \"SELECT count(id) FROM #__hdflvplayerads WHERE published=1 AND typeofadd='mid' \"; ## and home=1\";## and id=11;\";\n $db->setQuery($query_ads);\n $midadsCount = $db->loadResult();\n\n\n ## Check whether or not, video available\n if (count($rs_video) > 0) {\n\n foreach ($rs_video as $rows) {\n $timage = '';\n $streamername = '';\n\n ## fetch Video, thumb, Preview,HD URL for upload method videos\n if ($rows->filepath == 'File' || $rows->filepath == 'FFmpeg') {\n\n ## Get Video URL\n if ($rows->videourl != '') {\n $video = JURI::base() . $current_path . $rows->videourl;\n } else {\n $video = '';\n }\n \n ## Get Video HD URL\n if ($rows->hdurl != '') {\n $hdvideo = JURI::base() . $current_path . $rows->hdurl ;\n } else {\n $hdvideo = '';\n }\n \n ## Get Preview image URL\n $previewimage = JURI::base() . $current_path . $rows->previewurl;\n \n ## Get Thumb Image URL\n $timage = JURI::base() . $current_path . $rows->thumburl;\n }\n\n ## fetch Video, thumb, Preview,HD URL for URL method videos\n elseif ($rows->filepath == 'Url') {\n $video = $rows->videourl;\n $previewimage = $rows->previewurl;\n $timage = $rows->thumburl;\n $hdvideo = $rows->hdurl;\n }\n\n ## fetch Video, thumb, Preview,HD URL for YouTube method videos\n elseif ($rows->filepath == 'Youtube') {\n $video = $rows->videourl;\n $previewimage = $rows->previewurl;\n $timage = $rows->thumburl;\n if ($rows->hdurl != '') {\n $hdvideo = $rows->hdurl;\n }\n }\n\n ## Checks for streamer option\n if ($rows->streameroption == 'lighttpd') { ## If it lighttpd\n $streamername = $rows->streameroption;\n } else {\n $streamername = $rows->streamerpath;\n }\n if ($rows->streameroption == 'rtmp') { ## If it RTMP\n $streamername = $rows->streamerpath;\n } else {\n $streamername = '';\n }\n\n ## Checks for postroll ads enabled\n if ($rows->postrollid != '') {\n if ($rows->postrollads == 0) {\n $postrollads = 'false';\n } else {\n $postrollads = 'true';\n }\n } else {\n $postrollads = 'false';\n }\n\n ## Checks for preroll ads enabled\n if ($rows->prerollid != '') {\n if ($rows->prerollads == 0) {\n $prerollads = \"false\";\n } else {\n $prerollads = \"true\";\n }\n } else {\n $prerollads = \"false\";\n }\n\n ## Checks for Mid-roll ad\n if ($midadsCount > 0) {\n if ($rows->midrollads == 0) {\n $midrollads = 'false'; \n } else {\n $midrollads = 'true';\n }\n } else {\n $midrollads = 'false';\n }\n \n ## Checks for IMA ad\n $imaads = $rows->imaads;\n if ($imaads == 0) {\n $imaad = 'false'; \n } else {\n $imaad = 'true';\n }\n\n ## Fetche Download, target URL, Post-roll, Pre-roll Ad Ids\n if ($rows->download == 0) {\n $download = 'false';\n } else {\n $download = 'true';\n }\n if ($rows->targeturl == '') {\n $targeturl = '';\n } else {\n $targeturl = $rows->targeturl;\n }\n if ($rows->postrollads == '1') {\n $postrollid = $rows->postrollid;\n } else {\n $postrollid = 0;\n }\n if ($rows->prerollads == '1') {\n $prerollid = $rows->prerollid;\n } else {\n $prerollid = 0;\n }\n\n $user = JFactory::getUser();\n $memberid = $user->get('id');\n \n ## Checks for member Access\n if (version_compare(JVERSION, '1.6.0', 'ge')) {\n $uid = $user->get('id');\n if ($uid) {\n $query = $db->getQuery(true);\n $query->select('g.id AS group_id')\n ->from('#__usergroups AS g')\n ->leftJoin('#__user_usergroup_map AS map ON map.group_id = g.id')\n ->where('map.user_id = ' . (int) $uid);\n $db->setQuery($query);\n $message = $db->loadObjectList();\n foreach ($message as $mess) {\n $accessid[] = $mess->group_id;\n }\n } else {\n $accessid[] = 1;\n }\n } else {\n $accessid = $user->get('aid');\n }\n\n if (version_compare(JVERSION, '1.6.0', 'ge')) {\n $query = $db->getQuery(true);\n if ($rows->access == 0)\n $rows->access = 1;\n $query->select('rules as rule')\n ->from('#__viewlevels AS view')\n ->where('id = ' . (int) $rows->access);\n $db->setQuery($query);\n $message = $db->loadResult();\n $accessLevel = json_decode($message);\n }\n\n $member = \"true\";\n\n if (version_compare(JVERSION, '1.6.0', 'ge')) {\n $member = \"false\";\n foreach ($accessLevel as $useracess) {\n if (in_array(\"$useracess\", $accessid) || $useracess == 1) {\n $member = \"true\";\n break;\n }\n }\n } else {\n if ($rows->access != 0) {\n if ($accessid != $rows->access && $accessid != 2) {\n $member = \"false\";\n }\n }\n }\n\n ## Checks for Islive\n $islive = 'false';\n if ($streamername != '') {\n ($rows->islive == 1) ? $islive = 'true' : $islive = 'false';\n }\n if (!preg_match('/vimeo/', $video)) {\n\n echo '<mainvideo member=\"' . $member . '\" uid=\"'.$memberid.'\" \n views=\"' . $rows->times_viewed . '\"\n streamer_path=\"' . $streamername . '\"\n video_isLive=\"' . $islive . '\"\n video_id = \"' . htmlspecialchars($rows->id) . '\"\n video_url = \"' . htmlspecialchars($video) . '\"\n thumb_image = \"' . htmlspecialchars($timage) . '\"\n preview_image = \"' . htmlspecialchars($previewimage) . '\"\n allow_midroll = \"' . $midrollads . '\"\n allow_ima = \"' . $imaad . '\"\n allow_postroll = \"' . $postrollads . '\"\n allow_preroll = \"' . $prerollads . '\"\n postroll_id = \"' . $postrollid . '\"\n preroll_id = \"' . $prerollid . '\"\n allow_download = \"' . $download . '\"\n video_hdpath = \"' . $hdvideo . '\"\n copylink = \"\">\n <title><![CDATA[' . htmlspecialchars($rows->title) . ']]></title>\n <tagline targeturl=\"\"><![CDATA[' . htmlspecialchars(strip_tags($rows->description)) . ']]></tagline>\n </mainvideo>';\n }\n }\n }\n echo '</playlist>';\n exit();\n }", "function pavi_shortcode_video($atts = array()){\n \n return pavi_get_display_video($atts);\n}", "function wp_embed_handler_googlevideo($matches, $attr, $url, $rawattr)\n {\n }", "function emvideo_dotsub_video($embed, $width, $height, $field, $item, $node, $autoplay) {\n $output = theme('emvideo_dotsub_flash', $item, $width, $height, $autoplay);\n return $output;\n}", "function findMatches($content){\n\n\t\t$videos = array();\n\t\t$data = \"\";\n\t\t$cdata = \"\";\n\t\t$xdata = \"\";\n\t\t$sig = \"\";\n\t\t$url = \"\";\n\t\t$type = \"\";\n\n\t\t// Break page into pieces and run regex's to find and build download links.\n\t\t// Note: $results is an array.\n\t\tif(preg_match('/url_encoded_fmt_stream_map(.*?);/', $content, $results)){\n\n\t\t\t$data = \"\";\n\n\t\t\t// $results[0]=the text that matched the full pattern\n\t\t\t// $results[1]=the text matching the first subpattern\n\t\t\t// $results[2]=the text matching the second subpattern (n/a)\n\t\t\t$data = $results[1];\n\n\t\t\t// Literally replace the characters '\\u0026' with an '&'.\n\t\t\t$data = str_replace('\\u0026', '&', $data);\n\t\t\t\n\t\t\t// Convert $data to an array by splitting on ','.\n\t\t\t$data = explode(',', $data);\n\n\t\t\tforeach($data As $cdata){\n\n\t\t\t\t// Break each element in the $data array into an array.\n\t\t\t\t$cdata = explode('&', $cdata);\n\n\t\t\t\t// The $cdata array should have exactly 5 elements if it is an applicable URL.\n\t\t\t\tif (sizeof($cdata) === 5) {\n\n\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\techo \"<b>\";\n\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\techo \"CDATA\" . \"<br>\";\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($cdata);\n\t\t\t\t\t\techo \"</pre>\";\n\t\t\t\t\t\techo \"</b>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// For each element in the $cdata array...\n\t\t\t\t\tforeach($cdata As $xdata){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Sometimes this is found as the first three characters of an element: \":\"\n\t\t\t\t\t\t// Check for it by seeing if first character is '\"'.\n\t\t\t\t\t\t// If so, remove those three characters.\n\t\t\t\t\t\tif ($xdata[0] === '\"') {\n\t\t\t\t\t\t\t$xdata = substr($xdata, 3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for signature.\n\t\t\t\t\t\tif(preg_match('/^sig/', $xdata)){\n\t\t\t\t\t\t\t$sig = substr($xdata, 4);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for URL.\n\t\t\t\t\t\tif(preg_match('/^url/', $xdata)){\n\t\t\t\t\t\t\t$url = substr($xdata, 4);\n\t\t\t\t\t\t\t$url = urldecode($url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"URL: \" . $url . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for video type.\n\t\t\t\t\t\tif(preg_match('/^itag/', $xdata)){\n\t\t\t\t\t\t\t$type = substr($xdata, 5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If $type is not a known video type, change it to type '0' (unknown)\n\t\t\t\t\t\t\tif (!array_key_exists($type, $this->videoMap)) {\n\t\t\t\t\t\t\t\t$type = \"0\";\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"<br>\" . \"TYPE: \" . $type . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\t\t\t//echo \"<hr>\";\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//$url = $url . '&signature=' . $sig;\n\t\t\t\t\t$videos[$this->videoMap[$type][0]][$this->videoMap[$type][1]] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $videos;\n\t}", "static function get_video_info_data ($array_param){\r\n\r\n $list_to_parse = $array_param[0];\r\n\r\n $data_from_db = $array_param[1];\r\n\r\n $video_provider = $array_param[2];\r\n\r\n $buffy = array();\r\n\r\n //get the info data for videos\r\n //foreach($list_to_parse as $array_id_video) {\r\n\r\n foreach($list_to_parse as $id_video) {\r\n\r\n $id_video = trim($id_video);//possible to have spaces\r\n\r\n if(!empty($data_from_db[$video_provider][$id_video])) {\r\n $buffy[$id_video] = $data_from_db[$video_provider][$id_video];\r\n\r\n } else {\r\n\r\n //get the info data for video\r\n switch ($video_provider) {\r\n case 'youtube_ids':\r\n $response = file_get_contents('http://gdata.youtube.com/feeds/api/videos/' . $id_video . '?format=5&alt=json');\r\n $obj = json_decode($response, true);\r\n\r\n $buffy[$id_video]['thumb'] = 'http://img.youtube.com/vi/' . $id_video . '/default.jpg';\r\n $buffy[$id_video]['title'] = htmlentities($obj['entry']['media$group']['media$title']['$t'], ENT_QUOTES);\r\n $buffy[$id_video]['time'] = gmdate(\"H:i:s\", intval($obj['entry']['media$group']['yt$duration']['seconds']));\r\n break;\r\n\r\n case 'vimeo_ids':\r\n $html_returned = unserialize(file_get_contents('http://vimeo.com/api/v2/video/' . $id_video . '.php'));\r\n\r\n $buffy[$id_video]['thumb'] = $html_returned[0]['thumbnail_small'];\r\n $buffy[$id_video]['title'] = htmlentities($html_returned[0]['title'], ENT_QUOTES);\r\n $buffy[$id_video]['time'] = gmdate(\"H:i:s\", intval($html_returned[0]['duration']));\r\n break;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n //}\r\n\r\n\r\n if(!empty($buffy)) {\r\n return $buffy;\r\n } else {\r\n return;\r\n }\r\n }", "function getVideoDetails($operator_id, $video_id) {\n\t\treturn $this->getResponse ( $this->getXmlApi (), 'getVideoDetails', array ('operator_id' => $operator_id, 'video_id' => $video_id ) );\n\t}", "public function getVideos()\n {\n return $this->videos;\n }", "function bb_video($arguments = array()) {\n\t\t$content = $this->parseArray(array('[/video]'), array());\n\n\t\t$params['width'] = 570;\n\t\t$params['height'] = 360;\n\t\t$params['iframe'] = true;\n\t\t$previewthumb = '';\n\n\t\t$type = null;\n\t\t$id = null;\n\t\t$matches = array();\n\n\t\t//match type and id\n\t\tif (strstr($content, 'youtube.com') OR strstr($content, 'youtu.be')) {\n\t\t\t$type = 'youtube';\n\t\t\tif (preg_match('#(?:youtube\\.com/watch\\?v=|youtu.be/)([0-9a-zA-Z\\-_]{11})#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.youtube.com/embed/' . $id . '?autoplay=1';\n\t\t\t$previewthumb = 'https://img.youtube.com/vi/' . $id . '/0.jpg';\n\t\t} elseif (strstr($content, 'vimeo')) {\n\t\t\t$type = 'vimeo';\n\t\t\tif (preg_match('#vimeo\\.com/(?:clip\\:)?(\\d+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//player.vimeo.com/video/' . $id . '?autoplay=1';\n\n\t\t\t$videodataurl = 'http://vimeo.com/api/v2/video/' . $id . '.php';\n\t\t\t$data = '';\n\t\t\t$downloader = new UrlDownloader;\n\t\t\tif ($downloader->isAvailable()) {\n\t\t\t\t$data = $downloader->file_get_contents($videodataurl);\n\t\t\t}\n\t\t\tif ($data) {\n\t\t\t\t$data = unserialize($data);\n\t\t\t\t$previewthumb = $data[0]['thumbnail_medium'];\n\t\t\t}\n\t\t} elseif (strstr($content, 'dailymotion')) {\n\t\t\t$type = 'dailymotion';\n\t\t\tif (preg_match('#dailymotion\\.com/video/([a-z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['src'] = '//www.dailymotion.com/embed/video/' . $id . '?autoPlay=1';\n\t\t\t$previewthumb = 'http://www.dailymotion.com/thumbnail/video/' . $id;\n\t\t} elseif (strstr($content, 'godtube')) {\n\t\t\t$type = 'godtube';\n\t\t\tif (preg_match('#godtube\\.com/watch/\\?v=([a-zA-Z0-9]+)#', $content, $matches) > 0) {\n\t\t\t\t$id = $matches[1];\n\t\t\t}\n\t\t\t$params['id'] = $id;\n\t\t\t$params['iframe'] = false;\n\n\t\t\t$previewthumb = 'http://www.godtube.com/resource/mediaplayer/' . $id . '.jpg';\n\t\t}\n\n\t\tif (empty($type) OR empty($id)) {\n\t\t\treturn '[video] Niet-ondersteunde video-website (' . htmlspecialchars($content) . ')';\n\t\t}\n\t\treturn $this->video_preview($params, $previewthumb);\n\t}", "function get_header_video_url()\n {\n }", "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}", "public function getFrameVideo(){\n return $this->frameVideo; \n }", "private function get_settings()\r\n\t{\r\n\t\tlist ($this->path, $this->webpath, $this->maxwidth, $this->maxheight, $this->type, $this->size, $this->preview_width, $this->preview_cols, $this->tablestyle, $this->picstyle) = $this->elements->get_element(0, \"show\", 0, 0);\r\n\t}", "protected function sourceParsedownElement(array $attributes, $reset = true)\n {\n $location = $this->url($reset);\n\n return [\n 'name' => 'video',\n 'text' => '<source src=\"' . $location . '\">Your browser does not support the video tag.',\n 'attributes' => $attributes\n ];\n }", "function sp_video_sc( $atts ) {\n\n\textract( shortcode_atts( array(\n\t\t'mp4' => '',\n\t\t'webm' => '',\n\t\t'ogg' => '',\n\t\t'track' => '',\n\t\t'poster' => '',\n\t\t'aspect_ratio' => '1.7',\n\t\t'preload' => false,\n\t\t'autoplay' => false,\n\t), $atts ) );\n\n\tglobal $post;\n\n\tif ( $mp4 )\n\t\t$mp4 = '<source src=\"' . $mp4 . '\" type=\"video/mp4\" />';\n\n\tif ( $webm )\n\t\t$webm = '<source src=\"' . $webm . '\" type=\"video/webm\" />';\n\n\tif ( $ogg )\n\t\t$ogg = '<source src=\"' . $ogg . '\" type=\"video/ogg\" />';\n\n\tif ( $track)\n\t\t$track = '<track kind=\"subtitles\" src=\"' . $track . '\" srclang=\"en\" label=\"English\">';\n\n\tif ( $poster)\n\t\t$poster = ' poster=\"' . $poster . '\"';\n\n\tif ( $preload )\n\t\t$preload = 'preload=\"' . $preload . '\"';\n\n\tif ( $autoplay )\n\t\t$autoplay = 'autoplay';\n\t\t\n\t$output = \"<video id='video-js-id-$post->ID' class='video-js vjs-default-skin' width='700' height='405' controls {$preload} {$autoplay} {$poster} data-setup='{}' data-aspect-ratio='{$aspect_ratio}'>\n\t\t\t{$mp4}\n\t\t\t{$webm}\n\t\t\t{$ogg}\n\t\t\t{$track}\n\t\t</video>\";\n\treturn $output;\t\n\n}", "function wp_read_video_metadata($file)\n {\n }", "public function getIdVideoInfo()\n {\n return $this->idVideoInfo;\n }", "function get_src_from_iframe($videoEmbed) {\n $doc = new DOMDocument();\n $doc->loadHTML($videoEmbed);\n\n $src = $doc->getElementsByTagName('iframe')->item(0)->getAttribute('src');\n return $src;\n}", "public function getHasVideo()\n {\n return $this->data['fields']['has_video'];\n }", "function wp_underscore_video_template() {\n\t$video_types = wp_get_video_extensions();\n\t?>\n<# var w_rule = '', classes = [],\n\t\tw, h, settings = wp.media.view.settings,\n\t\tisYouTube = isVimeo = false;\n\n\tif ( ! _.isEmpty( data.model.src ) ) {\n\t\tisYouTube = data.model.src.match(/youtube|youtu\\.be/);\n\t\tisVimeo = -1 !== data.model.src.indexOf('vimeo');\n\t}\n\n\tif ( settings.contentWidth && data.model.width >= settings.contentWidth ) {\n\t\tw = settings.contentWidth;\n\t} else {\n\t\tw = data.model.width;\n\t}\n\n\tif ( w !== data.model.width ) {\n\t\th = Math.ceil( ( data.model.height * w ) / data.model.width );\n\t} else {\n\t\th = data.model.height;\n\t}\n\n\tif ( w ) {\n\t\tw_rule = 'width: ' + w + 'px; ';\n\t}\n\n\tif ( isYouTube ) {\n\t\tclasses.push( 'youtube-video' );\n\t}\n\n\tif ( isVimeo ) {\n\t\tclasses.push( 'vimeo-video' );\n\t}\n\n#>\n<div style=\"{{ w_rule }}\" class=\"wp-video\">\n<video controls\n\tclass=\"wp-video-shortcode {{ classes.join( ' ' ) }}\"\n\t<# if ( w ) { #>width=\"{{ w }}\"<# } #>\n\t<# if ( h ) { #>height=\"{{ h }}\"<# } #>\n\t<?php\n\t$props = array(\n\t\t'poster' => '',\n\t\t'preload' => 'metadata',\n\t);\n\tforeach ( $props as $key => $value ) :\n\t\tif ( empty( $value ) ) {\n\t\t\t?>\n\t\t<#\n\t\tif ( ! _.isUndefined( data.model.<?php echo $key; ?> ) && data.model.<?php echo $key; ?> ) {\n\t\t\t#> <?php echo $key; ?>=\"{{ data.model.<?php echo $key; ?> }}\"<#\n\t\t} #>\n\t\t\t<?php\n\t\t} else {\n\t\t\techo $key\n\t\t\t?>\n\t\t\t=\"{{ _.isUndefined( data.model.<?php echo $key; ?> ) ? '<?php echo $value; ?>' : data.model.<?php echo $key; ?> }}\"\n\t\t\t<?php\n\t\t}\n\tendforeach;\n\t?>\n\t<#\n\t<?php\n\tforeach ( array( 'autoplay', 'loop' ) as $attr ) :\n\t\t?>\n\tif ( ! _.isUndefined( data.model.<?php echo $attr; ?> ) && data.model.<?php echo $attr; ?> ) {\n\t\t#> <?php echo $attr; ?><#\n\t}\n\t<?php endforeach ?>#>\n>\n\t<# if ( ! _.isEmpty( data.model.src ) ) {\n\t\tif ( isYouTube ) { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"video/youtube\" />\n\t\t<# } else if ( isVimeo ) { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"video/vimeo\" />\n\t\t<# } else { #>\n\t\t<source src=\"{{ data.model.src }}\" type=\"{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}\" />\n\t\t<# }\n\t} #>\n\n\t<?php\n\tforeach ( $video_types as $type ) :\n\t\t?>\n\t<# if ( data.model.<?php echo $type; ?> ) { #>\n\t<source src=\"{{ data.model.<?php echo $type; ?> }}\" type=\"{{ settings.embedMimes[ '<?php echo $type; ?>' ] }}\" />\n\t<# } #>\n\t<?php endforeach; ?>\n\t{{{ data.model.content }}}\n</video>\n</div>\n\t<?php\n}", "function fusion_element_youtube() {\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionSC_Youtube',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Youtube', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_youtube',\n\t\t\t\t'icon' => 'fusiona-youtube',\n\t\t\t\t'preview' => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-youtube-preview.php',\n\t\t\t\t'preview_id' => 'fusion-builder-block-module-youtube-preview-template',\n\t\t\t\t'help_url' => 'https://theme-fusion.com/documentation/fusion-builder/elements/youtube-element/',\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Video ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'For example the Video ID for https://www.youtube.com/watch?v=569TlvRLn90 is 569TlvRLn90.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Alignment', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( \"Select the video's alignment.\", 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'alignment',\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'Text Flow', 'fusion-builder' ),\n\t\t\t\t\t\t\t'left' => esc_attr__( 'Left', 'fusion-builder' ),\n\t\t\t\t\t\t\t'center' => esc_attr__( 'Center', 'fusion-builder' ),\n\t\t\t\t\t\t\t'right' => esc_attr__( 'Right', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'dimension',\n\t\t\t\t\t\t'remove_from_atts' => true,\n\t\t\t\t\t\t'heading' => esc_attr__( 'Dimensions', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'In pixels but only enter a number, ex: 600.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'dimensions',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'width' => '600',\n\t\t\t\t\t\t\t'height' => '350',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Autoplay Video', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Set to yes to make video autoplaying.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'autoplay',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'false' => esc_attr__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t\t'true' => esc_attr__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'false',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Additional API Parameter', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Use an additional API parameter, for example, &rel=0 to only display related videos from the same channel.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'api_params',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'checkbox_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hide_on_mobile',\n\t\t\t\t\t\t'value' => fusion_builder_visibility_options( 'full' ),\n\t\t\t\t\t\t'default' => fusion_builder_default_visibility( 'array' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'css_id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t)\n\t);\n}", "function wpex_get_portfolio_post_video() {\n\n\t// Get video URl\n\t$video = wpex_get_post_video_html();\n\n\t// Return if no video\n\tif ( empty( $video ) ) {\n\t\treturn;\n\t}\n\n\t// Return video\n\treturn '<div class=\"portfolio-featured-video clr\">'. $video .'</div>';\n\n}", "private function parseVideoId($url) { \n\t\n //e.g. http://www.youtube.com/watch?v=UF6wdrRAZug&feature=relmfu \n\n $urlQuery = parse_url($url, PHP_URL_QUERY); \n\t\t\n if(!empty($urlQuery)) { \n $parseArray = explode('&',$urlQuery); \n foreach($parseArray as $key => $value) { \n $explodeArray = explode('=',$value); \n if($explodeArray[0] == 'v' && isset($explodeArray[1])) { \n return (string)$explodeArray[1]; \n } \n } \n } \n\t\t\n\t\treturn null;\n }", "public function getSourceVideo()\n {\n return $this->source_video;\n }", "function emvideo_dotsub_data($field, $item) {\n // Initialize the data array.\n $data = array();\n $data['emvideo_dotsub_version'] = EMVIDEO_DOTSUB_DATA_VERSION;\n\n // We are using oEmbed to retrieve a standard set of data from the provider.\n // You should change the URL as specified by the example provider.\n // If the example provider does not support oEmbed, you must remove this\n // section entirely, or rewrite it to use their API.\n // See http://oembed.com/ for for information.\n// $xml = emfield_request_xml('example', 'http://www.example.com/api/oembed.xml?url=http%3A//www.example.com/video/'. $item['value'], array(), TRUE, FALSE, $item['value']);\n // This stores a URL to the video's thumbnail.\n// $data['thumbnail'] = $xml['OEMBED']['THUMBNAIL_URL'][0];\n\n // Gather info about the item's raw flash video.\n // RSS / MRSS feeds with the item would have enough info.\n // Alternatively try getting the minimum from an HTTP get.\n $url = 'http://dotsub.com/static/players/portalplayer.swf?plugins=dotsub&uuid='. $item['value'];\n \n $response = emfield_request_header('dotsub', $url);\n \n if ($response->code == 200) {\n // Don't give the 303 path.\n $data['flash']['url'] = $url;\n $data['flash']['size'] = $response->headers['Content-Length'];\n $data['flash']['mime'] = $response->headers['Content-Type'];\n }\n\n return $data;\n}", "function spiegeltv_getvideo_url($id,$type=4) {\n\t$t_html = cacheurl('http://video.spiegel.de/flash/'.$id.'.xml');\n\tpreg_match_all('|<filename>(.*?)</filename>|i',$t_html,$row);\n\treturn 'http://video.spiegel.de/flash/'.$row[1][$type];\n\t\n\t/*\n\thttp://video.spiegel.de/flash/1036941.xml\n\thttp://video.spiegel.de/flash/1036941_480x360_H264_1400.mp4\n [1] => Array\n (\n [0] => 1032099_180x100_VP6_388.flv\n [1] => 1032099_560x315_VP6_576.flv\n [2] => 1032099_180x100_VP6_64.flv\n [3] => 1032099_996x560_VP6_928.flv\n [4] => 1032099_996x560_H264_1400.mp4\n [5] => 1032099.3gp\n [6] => 1032099_small.3gp\n [7] => 1032099_iphone.mp4\n [8] => 1032099_podcast.mp4\n )\n\n\t*/\t\n}", "function vxml_get_config($engine) {\n\twriteVxmlConf();\t\n\t\n\t//Call to the function to change the TTS engine\n\tchangeTTSEngine();\n\t\n\t//Call to the function to change the ASR engine\n\tchangeMRCPEngine();\n\t\n\t//We write the dialplan\n\tglobal $ext;\n\t\n\tswitch($engine) {\n\t\tcase \"asterisk\": \n\t\t\t$vxmllist = getVxmlList(\"*\");\n\t\t\tforeach ($vxmllist as $vxml) {\n\t\t\t\t$ename = \"app-vxml-\".$vxml['id'];\n\t\t\t\t$ext->addSectionComment($ename, $vxml['name']);\n\t\t\t\t$ext->add($ename,'s','',new ext_vxml($vxml['name']));\n\t\t\t\t$ext->add($ename,'s','',new ext_goto($vxml['goto']));\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t}\n\treturn;\n\t\n}", "public function getVideoID1() {\n \n $url = parse_url($this->getVideo1());\n parse_str($url['query'], $query);\n \n if(isset($query[\"v\"])) {\n return $query[\"v\"];\n } else {\n return null;\n }\n }", "function emc_video() {\r\n\r\n\t// get the URL field\r\n\t$url = get_field( 'url' );\r\n\tif ( empty( $url ) ) {\r\n\t\t_e( '<em>URL field is empty.</em>', 'emc' );\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( strpos( $url, 'rackcdn.com' ) ) {\r\n\r\n\t\t// get the URL for the medium featured image, to serve as video poster\r\n\t\t$thumb_id = get_post_thumbnail_id( get_the_ID() );\r\n\t\t$thumb_src = wp_get_attachment_image_src( $thumb_id, 'large' );\r\n\r\n\t\t// assemble our EMC RackSpace HTML5 video embed with Flash fallback\r\n\t\t$shortcode = sprintf( '[video mp4=\"%1$s\" poster=\"%2$s\" width=\"%3$s\" height=\"%4$s\"]',\r\n\t\t\tesc_url( $url ),\r\n\t\t\tesc_attr( $thumb_src[0] ),\r\n\t\t\t'100%',\r\n\t\t\t'auto'\r\n\t\t);\r\n\r\n\t\t$video = do_shortcode( $shortcode );\r\n\r\n\t} else {\r\n\r\n\t\t// we have something other than RackSpace for a video link\r\n\t\t$video = wp_oembed_get( esc_url( get_field( 'url' ) ) );\r\n\r\n\t}\r\n\r\n\t// Determine the duration\r\n\t$duration = ( get_field( 'duration' ) ) ? get_field( 'duration' ) : __( 'Not specified', 'emc' );\r\n\t$duration = sprintf( __( 'Duration: %s', 'emc' ), esc_html( $duration ) );\r\n\r\n\t// Get help text\r\n\t$help = get_page_by_path( 'video-problems-text', OBJECT, 'post' );\r\n\r\n\t// Assemble our final HTML\r\n\t$html = '<div class=\"emc-video\">';\r\n\t$html .= $video;\r\n\t$html .= '<div class=\"emc-toggle-section emc-video-meta\">';\r\n\t$html .= '<span class=\"emc-video-duration\">' . esc_html( $duration ) . '</span>';\r\n\t$html .= '<a class=\"emc-toggle-link\">' . esc_html__( 'Having video problems?', 'emc' ) . '</a>';\r\n\t$html .= '<div class=\"emc-toggle-content\">';\r\n\t$html .= apply_filters( 'the_content', $help->post_content );\r\n\t$html .= '</div><!-- .emc-toggle-content -->';\r\n\t$html .= '</div><!-- .emc-video-meta -->';\r\n\t$html .= '</div><!-- .emc-video -->';\r\n\r\n\techo $html;\r\n\r\n}", "public function get_dimensions($video) {\n $ffmpeg_output = $this->get_video_info($video);\n $res = array('width' => 0, 'height' => 0);\n // Get dimensions\n $regex = ereg('[0-9]?[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]?', $ffmpeg_output, $regs);\n if (isset($regs[0])) {\n $dimensions = explode(\"x\", $regs[0]);\n $res['width'] = $dimensions[0] ? $dimensions[0] : NULL;\n $res['height'] = $dimensions[1] ? $dimensions[1] : NULL;\n }\n return $res;\n }", "public function getVideoID2() {\n \n $url = parse_url($this->getVideo2());\n parse_str($url['query'], $query);\n \n if(isset($query[\"v\"])) {\n return $query[\"v\"];\n } else {\n return null;\n }\n }", "function medialist(){\n//overwrite youtube feed (youtube.xml) on server; on error, use existing youtube.xml\nlibxml_use_internal_errors(true);\n$ytxml = @simplexml_load_file(\"http://www.youtube.com/rss/tag/uct.rss\");\nif($ytxml){ $ytxml->asXML('youtube.xml'); }\n\n/* echo friendly error message\nif($ytxml === false) {\n echo \"<p> Sorry, the current Youtube XML contains some errors </p>\";\n foreach(libxml_get_errors() as $error) {\n echo \"\\t\", $error->message;\n }\n echo \"<p>You can hit the refresh button to try again </p>\";\n echo \"<p>Or continue with the old Youtube XML by clicking <a href='http://ngportal.com/opencast/index.php'>here</a></p>\";\n}\n*/\n\n\n$feedurls = Array('http://media.uct.ac.za/feeds/atom/0.3/latest/index.xml', 'youtube.xml');\n\nforeach($feedurls as $feedurl){\n$xml = @simplexml_load_file($feedurl);\n if($feedurl == $feedurls[0]){\n $xml->registerXPathNamespace('atom', 'http://purl.org/atom/ns#');\n $this->urls = $xml->xpath(\"/atom:feed/atom:entry/atom:link[attribute::rel='enclosure' and attribute::type='video/avi']/@href\");\n\n //A tweak to display only presentation.mp4\n $newurl = array();\n $v = 0;\n for($y = 0; $y<=count($this->urls); $y++){\n\tif(substr($this->urls[$y], -16, 16) == \"Presentation.mp4\"){\n\t $newurl[$v] = $this->urls[$y];\n\t $v++;\n\t}\n }//close of for loop\n //overwrite the array urls[] \n\t $this->urls = &$newurl;\n //end of tweak\n\n }\n else{\n $this->urls = $xml->xpath(\"/rss/channel/item/link\");\n }\n\n }//end of foreach - feedurls\n//store urls array in $this->mediaurls\n$this->mediaurls = &$this->urls;\n\n//session begins\nrequire_once(\"database/session.php\");\nif(!isset($this->clipinfo)){$this->clipinfo = new Session();}\n//$this->currentclipurl = $this->clipinfo->get('currentclipurl');\n// if(!isset($this->currentclipurl)){$this->clipinfo->set(\"currentclipurl\", $this->urls[0]);}\n\n\n//database connection begins\n\n// Include the MySQL class\nrequire_once('database/MySQL.php');\n\n//set the next and previous links\nif(isset($_GET['vid'])){\n$this->clipinfo->set('currentclipurl', $_GET['vid']);\n$this->currentclipurl = $this->clipinfo->get('currentclipurl');\n\nmedialist::getclips($this->currentclipurl);}\n\n/*\n//set the next and previous links\n//if(isset($_GET['vid'])){echo $_GET['vid'];}\nif(isset($_GET['vid'])){\n //$this->clipinfo->destroy();\nmedialist::getclips($_GET['vid']);\n}\n*/\n\n }", "public static function videoTag( $parser, &$text, $strip_state ) {\n\t\t$contLang = MediaWikiServices::getInstance()->getContentLanguage();\n\t\t$localizedVideoName = $contLang->getNsText( NS_VIDEO );\n\t\t// Fallback code...is this needed?\n\t\tif ( $localizedVideoName === false ) {\n\t\t\t$localizedVideoName = 'Video';\n\t\t}\n\t\t$pattern = '@(\\[\\[' . $localizedVideoName . ':)([^\\]]*?)].*?\\]@si';\n\t\t$text = preg_replace_callback( $pattern, 'VideoHooks::renderVideo', $text );\n\t}", "function getVideoSwfObj($url, $config, $width, $height, $mootools, $overrideSwfObj='') {\r\n\t\t$uniqueUid = ' rgmi'.$this->getUniqueID().' ';\r\n\t\t$uniqueKey = md5($url);\r\n\t\t\r\n\t\t$url = trim($url);\r\n\t\t$url = str_replace('http://', '', $url);\r\n\t\t\r\n\t\t$videoObject = '';\r\n\t\tif ($overrideSwfObj=='') {\r\n\t\t\t$videoObject = 'var so = new SWFObject(\"'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelpath('rgmediaimages').'res/mediaplayer.swf\",\"mpl\",\"'.$width.'\",\"'.$height.'\",\"8\");';\r\n\t\t} else {\r\n\t\t\t$videoObject = 'var so = '.$overrideSwfObj;\r\n\t\t}\r\n\t\t\r\n\t\t$video = '<span class=\"rgmediaimages-player'.$uniqueUid.'\" id=\"player'.$uniqueKey.'\"></span>\r\n\t\t <script type=\"text/javascript\">\r\n\t\t '.$mootools['begin'].'\r\n\t\t\t\t\t\t\t\t'.$videoObject.'\r\n\t\t so.addParam(\"allowscriptaccess\",\"always\");\r\n\t\t so.addParam(\"allowfullscreen\",\"true\");\r\n\t\t so.addVariable(\"file\",\"http://'.$url.'\");\r\n\t\t '.$config.'\r\n\t\t so.write(\"player'.$uniqueKey.'\");\r\n\t\t '.$mootools['end'].'\r\n\t\t </script>';\t\r\n\t\treturn $video;\r\n\t}", "function jma_yt_video_wrap_html($atts, $video_id){\n global $api_code;\n $atts = jmayt_sanitize_array($atts);\n $yt_video = new JMAYtVideo(sanitize_text_field($video_id), $api_code);\n $style = $yt_video->process_display_atts($atts);\n $attributes = array(\n 'id' => $atts['id'],\n 'class' => $atts['class'] . ' jmayt-outer jmayt-single-item clearfix',\n 'style' => $style['display'] . $atts['style']\n );\n echo '<div ';\n foreach($attributes as $name => $attribute){\n echo $name . '=\"' . $attribute . '\" ';\n\n }\n echo '>';\n echo $yt_video->markup();\n echo '</div><!--jmayt-item-wrap-->';\n}", "function youtubeMeta()\n{\n return array('name' => 'YouTube', 'stable' => 1, 'php' => '5.0', 'capabilities' => array('trailer'));\n}", "function get_metaext_videodropdown($currid = '') {\r\n\t\treturn metaext_wt::get_wordtube_videodropdown($currid);\r\n\t}", "protected function getVideo()\n {\n $names = $this->generateVideoName();\n $command = implode(' ', [\n $this->getVideoServiceConfig('video_app'),\n '-i ' . $this->getVideoServiceConfig('video_source'),\n '-c copy',\n '-f mp4',\n '-t ' . $this->getVideoServiceConfig('video_length'),\n $names['file'],\n '1> ' . $names['log'],\n '2>&1',\n ]);\n\n if (0 === stripos(PHP_OS, 'WIN')) {\n pclose(popen('start /B ' . $command, 'r'));\n } else {\n pclose(popen($command . ' &', 'r'));\n }\n\n $this->createNewRecording($names['file']);\n if ($this->checkLog($names['log'])) {\n $this->getVideo();\n }\n }", "public function getInfoVideo($videoID){\n $url = \"https://www.youtube.com/get_video_info?&video_id={$videoID}&asv=3&el=datailpage&hl=en_US\";\n if($videoID != FALSE){\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\n $vidoedata = curl_exec($ch);\n curl_close($ch);\n parse_str($vidoedata,$vidoe_info);\n $vidoe_info = json_decode(json_encode($vidoe_info));\n $quality = explode(\",\",$vidoe_info->url_encoded_fmt_stream_map);\n $qualitys = array();\n $number = 0;\n foreach($quality as $value){\n parse_str($value);\n $qualityType = $quality.$type;\n switch($qualityType){\n case 'hd720video/mp4; codecs=\"avc1.64001F, mp4a.40.2\"':\n $quality = \"750p HD mp4\";\n break;\n case 'mediumvideo/webm; codecs=\"vp8.0, vorbis\"':\n $quality = \"480p webm\";\n break;\n case 'mediumvideo/mp4; codecs=\"avc1.42001E, mp4a.40.2\"':\n $quality = \"360p mp4\";\n break;\n case 'smallvideo/3gpp; codecs=\"mp4v.20.3, mp4a.40.2\"':\n $quality = \"240p 3gpp\";\n break;\n }\n $qualitys[$number]['url'] = $url;\n $qualitys[$number]['quality'] = $quality;\n $number+=1;\n }\n \n $qualitys[count($qualitys)-1]['quality'] = \"144p 3gpp\";\n $vidoe_info = array(\n 'author' => $vidoe_info->author,\n 'title' => $vidoe_info->title,\n 'viewCount' => $vidoe_info->view_count,\n 'video' => $qualitys,\n );\n return $vidoe_info;\n }\n return FALSE;\n\n }", "public function getTracksVideo () {\n $tracks = collect(Storage::disk('video')->allFiles());\n return $tracks->all();\n }", "public function parse_request($data)\n {\n $arr = explode(\"watch?v=\", $data);\n $video_id = $arr[1];\n return \"id=\".$video_id.\"&part=snippet%2CcontentDetails%2Cstatistics&key=\";\n }", "public function getVideo()\n {\n return $this->forgeVideo();\n }", "public function forgeVideo()\n {\n // Check if we have a video creation array.\n if ($this->provider && isset($this->provider['render']['video'])) {\n // Start iframe tag.\n $video = '<video';\n\n foreach ($this->provider['render']['video'] as $attribute => $val) {\n if (! is_array($val)) {\n $video .= sprintf(' %s=\"%s\"', $attribute, $val);\n }\n }\n // Close start of video tag.\n $video .='>';\n\n // Add inner elements.\n $video .= $this->forgeInnerElements($this->provider['render']['video'], true);\n\n // Wrap video tag.\n $video .= '</video>';\n\n $video .= $this->forgeScript();\n\n return $video;\n }\n }", "function emvideo_dotsub_info() {\n $features = array(\n array(t('Autoplay'), t('Yes'), ''),\n array(t('RSS Attachment'), t('Yes'), ''),\n array(t('Thumbnails'), t('Yes'), t('')),\n array(t('Full screen mode'), t('Yes'), t('You may customize the player to enable or disable full screen playback. Full screen mode is enabled by default.')),\n );\n return array(\n 'provider' => 'dotsub',\n 'name' => t('dotSUB'),\n 'url' => EMVIDEO_DOTSUB_MAIN_URL,\n 'settings_description' => t('These settings specifically affect videos displayed from !provider. You can also read more about its !api.', array('!provider' => l(t('dotSUB.com'), EMVIDEO_DOTSUB_MAIN_URL), '!api' => l(t(\"developer's API\"), EMVIDEO_DOTSUB_API_URL))),\n 'supported_features' => $features,\n );\n}" ]
[ "0.6647664", "0.6276344", "0.60806245", "0.59963554", "0.5918467", "0.58600336", "0.5839703", "0.58276784", "0.5811184", "0.57546467", "0.57281154", "0.5683497", "0.5679592", "0.5653047", "0.56201124", "0.55730635", "0.55589265", "0.5528477", "0.5502508", "0.54925156", "0.54829746", "0.5477598", "0.54042196", "0.53879184", "0.5377107", "0.5376809", "0.5354578", "0.53462255", "0.5337319", "0.5301231", "0.52988786", "0.5280539", "0.5266333", "0.5264457", "0.52529514", "0.52310014", "0.52304983", "0.51674086", "0.5167124", "0.5167024", "0.51662046", "0.5162986", "0.51550263", "0.51517636", "0.51247394", "0.51242036", "0.50943005", "0.5064822", "0.50646025", "0.50615245", "0.50547206", "0.50491565", "0.5048729", "0.5038612", "0.5018101", "0.50134254", "0.49942145", "0.49911106", "0.49848077", "0.4980806", "0.49788144", "0.49770445", "0.49653926", "0.49629447", "0.49617293", "0.49468723", "0.49429452", "0.4939935", "0.4935634", "0.49355125", "0.49127945", "0.49049136", "0.4903061", "0.48989663", "0.48978376", "0.48949707", "0.4872191", "0.4869963", "0.48694965", "0.48641235", "0.48622203", "0.4860338", "0.48557544", "0.48424584", "0.48356983", "0.48328465", "0.4808747", "0.480756", "0.48068213", "0.48024753", "0.48015055", "0.47969687", "0.47899118", "0.47885454", "0.47850606", "0.47800687", "0.4772945", "0.47722188", "0.47717437", "0.47558382", "0.4750891" ]
0.0
-1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { //return view('crontest.index'); $userdate = strtotime(User::all()->first()->created_at); $checkdate = strtotime('-1 minute'); if ($userdate <= $checkdate){ echo User::all(); } else{ echo "niks is kleiner dan een minuut"; } echo "\n". strtotime(User::all()->first()->created_at); //echo "\n". strtotime('now'); echo "\n". strtotime('-1 minute'); echo "\n". date('r', strtotime(User::all()->first()->created_at)); echo "\n". date('r', strtotime('now')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Send request to add unsorted
public function add(array $elements);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_to_top_page(){\r\n\t\t$rslt = array('suc'=>true, 'msg'=>'');\r\n\r\n\t\t$id = $_POST['id'];\r\n\t\t$top_reports = get_option('iemop_top_reports', array());\r\n\t\t$total = count($top_reports);\r\n\r\n\t\tif(in_array($id, array_keys($top_reports))){ // remove frop top\r\n\t\t\tunset($top_reports[$id]);\r\n\t\t\t$rslt['msg'] = \"Removed\";\r\n\t\t\tupdate_option('iemop_top_reports', $top_reports);\r\n\t\t}else{\r\n\t\t\tif($total < 4){\r\n\t\t\t\t$top_reports[$id] = $id;\r\n\t\t\t\t$rslt['msg'] = \"Added\";\r\n\t\t\t\tupdate_option('iemop_top_reports', $top_reports);\r\n\t\t\t}else{\r\n\t\t\t\t$rslt['suc'] = false;\r\n\t\t\t\t$rslt['msg'] = \"Top page downloads already reached the maximum of 4 files.\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo json_encode($rslt);\r\n\t\twp_die();\r\n\t}", "function statuses_saveData() {\n\n\t// Get array with new data\n\t$fields = statuses_getData();\n\t$count = sizeof($fields); // count items\n\n\t// Construct URL\n\t$url = BASEURL . \"v1/statuses?count=\" . $count . \"&token=\" . getToken(1);\n\n\t// Get existing data\n\t$response = array_reverse(doGetRequest($url));\n\n\t// Iterate through all new items and if their ID isn't found in the request with the latest data, add them\n\tfor ($i=0; $i < 50; $i++) { \n\n\t\t$newId = $fields[$i]['org_id']; // original ID of a new item\n\t\t\n\t\tif($response['code'] == 404) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\telseif(!in_array_r($newId, $response)) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\n\t}\n\n}", "function add($input = array(), $rID){\n $this->delete_by('OrderId', $rID);\n \n //now cycle through and add all new records\n if (count($input))\n {\n //submit query\n foreach ($input as $k => $array)\n {\n if ($array['Qty'] >= 1)\n {\n $array['OrderId'] = $rID;\n $r[$k] = $this->save($array);\n }\n \n }\n \n }\n \n return $r;\n }", "public function actionSortable()\n\t{\n\t\t// We only allow sorting via POST request\n\t\tif( Yii::app()->request->isPostRequest===true )\n\t\t{\n\t\t\t$this->_authorizer->authManager->updateItemWeight($_POST['result']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(400, Rights::t('core', 'Invalid request. Please do not repeat this request again.'));\n\t\t}\n\t}", "function addOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$order = json_decode ( $request->getBody () );\n\t//\t$sql = \"INSERT INTO wine (name, grapes, country, region, year, description) VALUES (:name, :grapes, :country, :region, :year, :description)\";\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$orderId = $db->addOrder ( $order );\n\t\t//\t\t$stmt = $db->prepare ( $sql );\n\t\t//\t\t$stmt->bindParam ( \"name\", $order->name );\n\t\t//\t\t$stmt->bindParam ( \"grapes\", $order->grapes );\n\t\t//\t\t$stmt->bindParam ( \"country\", $order->country );\n\t\t//\t\t$stmt->bindParam ( \"region\", $order->region );\n\t\t//\t\t$stmt->bindParam ( \"year\", $order->year );\n\t\t//\t\t$stmt->bindParam ( \"description\", $order->description );\n\t\t//\t\t$stmt->execute ();\n\t\t//\t\t$order->id = $db->lastInsertId ();\n\t\t//\t\t$db = null;\n\t\t// print_f($order);\n\t\t// $order.push(\"orderId\", $orderId);\n\t\t// print_f($order);\n\t\t$order->orderId = $orderId;\n\t\techo '{\"addedOrder\":' . json_encode ( $order ) . '}';\n\t\t// echo $orderId;\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\t//\t\techo '{\"error\":{\"text\":' . $e->getMessage () . $e.'}}';\n\t\techo '{\"errorText\":\"Add order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}", "public function add_request($request='') {\n $request = JsonParser::decode($request);\n if (is_array($request) === false) {\n $request = array($request);\n }\n $this->__requests[] = $request;\n return (true);\n }", "public static function remove_from_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n\n if ( ! empty( $compare ) && is_array( $compare ) ) {\n foreach ( $compare as $key => $listing_id ) {\n if ( $listing_id == $_GET['id'] ) {\n unset( $compare[ $key ] );\n }\n }\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $count = count($compare);\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n } else {\n $data = array(\n 'success' => true\n );\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "public static function add_to_comparison() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n if ( ! empty( $_GET['id'] ) ) {\n $compare = Inventor_Visitor::get_data('compare');\n $compare = ! is_array( $compare ) || empty( $compare ) ? array() : $compare;\n\n $post = get_post( $_GET['id'] );\n $post_type = get_post_type( $post->ID );\n\n if ( ! in_array( $post_type, Inventor_Post_Types::get_listing_post_types() ) ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'This is not listing ID.', 'inventor-compare' ),\n );\n } else {\n $found = false;\n\n foreach ( $compare as $listing_id ) {\n if ( $listing_id == $_GET['id']) {\n $found = true;\n break;\n }\n }\n\n if ( ! $found ) {\n $max_compare = 5;\n\n if ( count( $compare ) >= $max_compare ) {\n $data = array(\n 'success' => false,\n 'message' => sprintf( __( 'You can compare at most %d listings', 'inventor-compare' ), $max_compare )\n );\n } else {\n $compare[] = $post->ID;\n $count = count( $compare );\n\n $timeout_in_seconds = apply_filters( 'inventor_compare_timeout', 60*60 );\n Inventor_Visitor::save_data( 'compare', $compare, time() + $timeout_in_seconds );\n\n $data = array(\n 'success' => true,\n 'count' => $count,\n 'text' => sprintf( _n( 'Compare %d item', 'Compare %d items', $count, 'inventor-compare' ), $count )\n );\n }\n\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing is already in list', 'inventor-compare' ),\n );\n }\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __( 'Listing ID is missing.', 'inventor-compare' ),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "public function addItems(Request $request)\n {\n if ($this->user !== null)\n {\n if ($this->validateOrderRequestProperties($request))\n {\n if ($request['order'] && $request['order_item'] &&\n $this->checkOrderValues($request['order']) &&\n $this->checkItemsValues($request['order_item']))\n {\n if (!$order = Order::where('status', 0)->where('user_id', $this->user->id)->first())\n {\n $order = $this->createOrderEntity($request['order']);\n }\n if ($this->addItemsToOrder($order, $request['order_item']))\n {\n return response()->json(['message' => 'Success'], 200);\n }\n }\n else if (!$request['order'] && $request['order_item'] && \n $this->checkItemsValues($request['order_item']))\n {\n if (!$order = Order::where('status', 0)->where('user_id', $this->user->id)->first())\n {\n return response()->json(['error' => 'Bad request content'], 400);\n }\n if ($this->addItemsToOrder($order, $request['order_item']))\n {\n return response()->json(['message' => 'Success'], 200);\n }\n }\n }\n return response()->json(['error' => 'Bad request content'], 400);\n }\n return response()->json(['error' => 'Unauthorized'], 401);\n }", "public function add(BaseRequest $request)\n {\n $id = $request->only('id');\n\n return $this->service()->addToOrder($id);;\n }", "public function addAll($_request)\n\t{\n\t\t$_request[\"id_taller\"] = $_SESSION['user_info']['id_taller'];\n\t\t$_request[\"id_user\"] = $_SESSION['user_id'];\n\t\t$_request[\"total\"] = $_request['total-globalgasto'];\n\t\t$data=fromArray($_request,'gastos',$this->db,\"add\");\n\t\t$sql= \"INSERT INTO gastos (\".$data[0].\") VALUES(\".$data[1].\"); \";\n\t\t$res=$this->db->query($sql);\n\t\t$sql= \"SELECT LAST_INSERT_ID();\";//. $num ;\n\t\t$res=$this->db->query($sql);\n\t\t$set=array();\n\t\t$id=\"\";\n\t\tif(!$res){ die(\"Error getting result\"); }\n\t\telse{\n\t\t\twhile ($row = $res->fetch_assoc())\n\t\t\t\t$id= $row;\n\t\t}\n\t\t$id = $id[\"LAST_INSERT_ID()\"];\n\t\t$gastostipo\t= $_request[\"id_gastostiporegistros\"];\n\t\t$total\t\t= $_request[\"totalesregistros\"];\n\t\t$cantidad\t= $_request[\"cantidad\"];\n\t\t$detalles\t= $_request[\"detalles\"];\n\t\t\n\t\tforeach ($gastostipo as $key => $value) {\n\t\t\t$total = ($total[$key]) ? $total[$key] : 0 ;\n\t\t\t$cant = $cantidad[$key];\n\t\t\t$detalle = $detalles[$key];\n\t\t\t$id_gastostipo = $value;\n\t\t\t$_requestgastos[\"id_gastos\"] = $id;\n\t\t\t$_requestgastos[\"id_gastostipo\"] = $id_gastostipo;\n\t\t\t$_requestgastos[\"detalles\"] \t = $detalle;\n\t\t\t$_requestgastos[\"cantidad\"] = $cant;\n\t\t\t$_requestgastos[\"total\"] = $total;\n\t\t\t$objGastosRegistros = new GastosRegistros();\n\t\t\tif(!$objGastosRegistros->addAll($_requestgastos)){\n\t\t\t\techo \"Falla en insert pedido refaccion\";\n\t\t\t\texit;\n\t\t\t}\n\t\t\tif($id_gastostipo==7){//nomina\n\t\t\t\t$objNomina = new Nomina();\n\t\t\t\t$_requestnomina[\"available\"] = 0;\n\t\t\t\tif(!$objNomina->updateAll($detalle,$_requestnomina)){\n\t\t\t\t\techo \"Falla en update de nomina available\";\n\t\t\t\t\texit;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn $id;\n\t}", "function sort_requests_by_total($a, $b)\n{\n if($a->total == $b->total) return 0;\n return ($a->total > $b->total) ? -1 : 1;\n}", "function insert_order_minimax($token,$minimax_token,$id_db,$mysqli,$org){\r\n\r\n $api_endpoint = 'https://moj.minimax.si/SI/API/api/orgs/'.$org.'/orders';\r\n\r\n\r\n foreach($id_db as $m2_id){\r\n\r\n $headers = array('Content-Type:application/json','Authorization:Bearer '.$minimax_token->access_token);\r\n $ch = curl_init();\r\n\r\n try{\r\n $generated = generate_order(get_order_data_by_id($token,$m2_id),$mysqli);\r\n \r\n $product_string = json_encode($generated, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\r\n \r\n $ch = curl_init();\r\n curl_setopt($ch,CURLOPT_URL, $api_endpoint);\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $product_string);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\n $response = curl_exec($ch);\r\n \r\n $response = json_decode($response, TRUE);\r\n curl_close($ch);\r\n \r\n\r\n echo \"<br>Order from db Database-name with ID: 60\". $m2_id . \" inserted into minimax!<br>\"; //test\r\n \r\n\r\n }\r\n catch(Exception $e){\r\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\r\n }\r\n }\r\n\r\n\r\n}", "public function executeSort(sfWebRequest $request)\n {\n $this->objects = $this->getTableForSorting()->queryOrdered()->execute();\n }", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function searchWorkOrders()\n {\n //Put\n }", "public function ajaxSort() {\n $question_ids = $this->request->data['question_ids'];\n $max_weight = count($question_ids);\n foreach ($question_ids as $key => $id) {\n $question = $this->Questions->get($id);\n $question->weight = $max_weight--;\n $this->Questions->save($question);\n }\n echo json_encode(array('success' => true));\n }", "function wp_idolondemand_add_to_text_index($post_ids, $sync_or_async){\n\t$response = \"\";\n\t$msg = \"\";\n\t\n\t$input_type = wp_idolondemand_get_add_to_text_index_input_type();\n\tif($input_type=='json'){\n\t\t\n\t\t// use POST for 'json'\n\t\t$index1 = wp_idolondemand_get_index();\n\t\t$apikey = wp_idolondemand_get_setting('apikey');\n\t\t$json1 = wp_idolondemand_get_posts_as_json($post_ids);\n\t\t\n\t\t$response = send_multipart_post_message_with_json_via_file_get_contents($sync_or_async, $json1);\n\t\t\n\t} else {\t\n\t\t// currently only json is allowed\t\n\t\t// use GET for url\n\t\t// if(input-type != 'json') { default=url; }\n\t\t$addtoindexUrl = wp_idolondemand_get_add_to_text_index_get_url();\n\t\t$response = file_get_contents($addtoindexUrl);\n\t}\n\t\n\t// response processing\n\tif ($response) {\n\t\t$msg .= process_response($response, $sync_or_async);\n\t}else{\n\t\t// TODO proper error handling \n\t\t$msg .= \"Error: No response. HTTP statuscode: \";\t\t\n\t}\n\t\n\tif($msg){\n\t\tif($response){\n\t\t\techo \"response: \".$response.\"<br><br>\";\n\t\t}\n\t\techo \"message: \".$msg;\n\t}\n}", "function add_unsorted_form($data)\n{\n $prepared_data = [\n 'source_uid' => time() . rand(1, 100),\n 'created_at' => time(),\n 'source_name' => 'form',\n 'incoming_entities' => array(),\n 'incoming_lead_info' => array(\n 'form_id' => 'template form_id',\n 'form_page' => !empty($data['lead']['name']) ? $data['lead']['name'] : 'Без названия',\n 'ip' => 'template ip',\n 'service_code' => 'template code',\n ),\n ];\n\n if (isset($data['lead'])) {\n $lead = prepare_data('lead', $data['lead'], false);\n if ($lead) {\n if (!empty($data['lead']['notes'])) {\n $lead['notes'] = $data['lead']['notes'];\n }\n\n $prepared_data['incoming_entities']['leads'][] = $lead;\n }\n }\n\n if (isset($data['contact'])) {\n $contact = prepare_data('contact', $data['contact'], false);\n\n if ($contact) {\n if (!empty($data['contact']['notes'])) {\n $contact['notes'] = $data['contact']['notes'];\n }\n\n $prepared_data['incoming_entities']['contacts'][] = $contact;\n }\n }\n\n if (isset($data['lead_info'])) {\n foreach ($data['lead_info'] as $key => $value) {\n $prepared_data['incoming_lead_info'][$key] = $value;\n }\n }\n\n if (isset($data['pipeline_id']) || $data['lead']['pipeline_id']) {\n $prepared_data['pipeline_id'] = isset($data['pipeline_id']) ? $data['pipeline_id'] : $data['lead']['pipeline_id'];\n }\n\n $data = array(\n 'add' => [$prepared_data],\n );\n\n $api = unserialize(API);\n $link = 'incoming_leads/form?login=' . $api['login'] . '&api_key=' . $api['api_key'];\n // debug($data);\n $output = run_curl($link, $data);\n\n return $output;\n}", "public function addToComparisonList(Request $request, $id){\n\n $product = Product::findOrFail($id);\n $oldList = Session::has('compare_list') ? Session::get('compare_list') : null;\n\n //tao $list = $oldList (List() = __construct())\n $list = new Compare($oldList);\n if(empty($list->items) || count($list->items) < 3){\n //them san pham vao list\n $list->add($product, $product->id);\n Session::put('compare_list',$list);\n $this->ajaxReloadComparionList($list->items);\n }elseif(count($list->items) == 3 ){\n echo '<div class=\"alert alert-danger\">List is full, please delete 1 item</div>';\n $this->ajaxReloadComparionList($list->items);\n }\n }", "function getAddsAction(){\n\t\t$for = $_REQUEST['for'];\n\t\t$limit = (isset($_REQUEST['limit']) && $_REQUEST['limit'] < 51) ? $_REQUEST['limit'] : 10;\n\t\t\n\t\t$sql = \"SELECT `content`, `top`, `right`, `bottom`, `left` FROM content_history \n\t\t\t\tWHERE `userid` = '$for'\n\t\t\t\tORDER BY `stamp` DESC \n\t\t\t\tLIMIT $limit\";\n\t\t$result = $this->db->exec($sql);\n\t\t\n\t\tif(count($result) < 1){\n\t\t\t$this->json['success'] = false;\n\t\t\treturn;\n\t\t} \n\t\t\n\t\t$this->json['additions'] = $result;\n\t\t\n\t\t$this->json['success'] = true;\n\t}", "public function externalAdd(Request $request) {\n \n if($request->has('bookid')) {\n \n $user = $request->user();\n $bookid = $request->bookid;\n \n if($user) {\n \n // Search the collection\n $search = new Library\\RemoteSearch;\n \n // Create the edition string\n $editionsStr = '';\n $comma = '';\n $titleMatch = false;\n if($request->has('single')) {\n $editionsStr = 'OLID:'.$request->bookid;\n } else {\n $books = $search->openLibSearch($bookid,'olid');\n $titleMatch = $books['docs'][0]['title_suggest'];\n foreach($books['docs'] as $book) {\n foreach($book['edition_key'] as $edition) {\n $editionsStr .= $comma.'OLID:'.$edition;\n $comma = ',';\n }\n }\n }\n \n // Get the individual editions\n $bookData = $search->openLibBooks($editionsStr);\n //dd($bookData);\n \n // Remove any books that don't have isbn\n $returnBooks = array();\n foreach ($bookData as $book) {\n if(isset($book['identifiers']['isbn_10']) || isset($book['identifiers']['isbn_13'])) {\n if(!$titleMatch || (stripos($book['title'],$titleMatch) !== false)) {\n \n // Create our own simplified array\n $bookData = [];\n $bookData['title'] = $book['title'];\n $bookData['year'] = isset($book['publish_date']) ? $book['publish_date'] : NULL;\n $bookData['author'] = isset($book['authors']) ? $book['authors'][0]['name'] : NULL;\n $bookData['authorolid'] = isset($book['authors']) ? Library\\Helpers::getAuthorIdFromUrl($book['authors'][0]['url']) : NULL;\n $bookData['isbn10'] = isset($book['identifiers']['isbn_10']) ? $book['identifiers']['isbn_10'][0] : Library\\Helpers::isbn13_to_10($book['identifiers']['isbn_13'][0]);\n $bookData['isbn13'] = isset($book['identifiers']['isbn_13']) ? $book['identifiers']['isbn_13'][0] : Library\\Helpers::isbn10_to_13($book['identifiers']['isbn_10'][0]);\n $bookData['olid'] = $book['identifiers']['openlibrary'][0];\n $bookData['image'] = isset($book['cover']) ? $book['cover']['medium'] : NULL;\n\n // Get the genres\n $bookData['subjects'] = [];\n if(isset($book['subjects'])) {\n foreach ($book['subjects'] as $subject) {\n $bookData['subjects'][] = $subject['name'];\n }\n }\n\n //$returnBooks[] = $book;\n $returnBooks[] = $bookData;\n \n }\n }\n }\n \n //dd($returnBooks);\n //\n // Now we narrow down more, if only 1 book now, we add, otherwise show editions\n if(count($returnBooks) === 1) {\n \n $addBook = $returnBooks[0];\n \n // first add author to get the id\n $authorID = !is_null($addBook['author']) ? $this->addAuthor($addBook['author'],$addBook['authorolid']) : NULL;\n $addBook['authorid'] = $authorID;\n \n // Add the genres and collect the ids\n $genreIDs = $this->addGenres($addBook['subjects']);\n \n // Add the book\n $bookid = $this->addBook($addBook);\n \n // Connect the cats to the book\n $bookCats = $this->addBookCategories($bookid, $genreIDs);\n \n // Add the users bookshelf\n $bookshelf = new Library\\BookshelfFunctions;\n $shelfID = $bookshelf->newBookshelf($user->id, $bookid);\n \n return redirect('dashboard');\n } else {\n return view('add-book',['results' => $returnBooks]);\n }\n } else {\n return redirect('search');\n }\n \n } else {\n return redirect('search');\n }\n \n }", "public function jsonUpdateSort()\n {\n $this->request->allowMethod(['post']);\n $data = $this->request->data;\n $itemCounter = 1;\n foreach($data['view'] as $key => $value){\n $slide = $this->Slides->get($value);\n $slide->sorting = $itemCounter; \n $this->Slides->save($slide);\n $itemCounter++; \n } \n exit; \n }", "public function add_only() {\n $this -> viewClass = 'Json';\n $res = array();\n $data = $this -> request -> data;\n if (isset($data['token'], $data['user_id'], $data['fields_in'], $data['value'], $data['model'], $data['fields_out'])) {\n\n //================\n $new_data = $this -> Format -> formatSaveData($data['model'], $data['fields_in'], $data['value']);\n $list_goods_id = $this -> Goods -> getCode($new_data[0]['Spec']['goods_id']);\n $conditions_max = array('Spec.customer_id' => $new_data[0]['Spec']['customer_id'], 'Spec.goods_id' => $list_goods_id);\n $fields_MAX = array('MAX(Spec.order_num)');\n $max_oder_num = $this -> Spec -> find('first', array('fields' => $fields_MAX, 'conditions' => $conditions_max, 'recursive' => 0));\n $new_data[0]['Spec']['order_num'] = $max_oder_num[0]['max'] + 1;\n $model = ClassRegistry::init($data['model']);\n if (!empty($new_data)) {\n if ($model -> saveAll($new_data)) {\n $res['status'] = STS_SUCCESS;\n $res['id'] = $model -> id;\n } else {\n $error = $model -> validationErrors;\n $this->log($error, LOG_DEBUG);\n $res['status'] = STS_DB_UPDATE_ERROR;\n }\n } else {\n $res['status'] = STS_ERROR_AUTH;\n }\n //=============================\n } else {\n $res['status'] = STS_ERROR_MISSINGDATA;\n }\n $this -> set(compact('res'));\n $this -> set('_serialize', array('res'));\n\n }", "function storeOrdering() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$model = $this->getDefaultModel();\n\n\t\t$json = KRequest::getVar('updates');\n\t\t$updates = json_decode($json, true);\n\n\t\t$ordering = array();\n\t\tforeach ($updates as $recordId=>$position) {\n\t\t\t$ordering[(int)$recordId] = (int)$position;\n\t\t}\n\n\t\t$success = $model->storeOrdering($ordering);\n\n\t\tif ($success) {\n\t\t\t$this->purgeCache();\n\t\t}\n\t\telse {\n\t\t\tKLog::log('Storing record ordering failed. Error messages were '.var_export($model->getErrors(), true), 'error');\n\t\t}\n\n\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\n\t\techo ConfigboxJsonResponse::makeOne()\n\t\t\t->setSuccess($success)\n\t\t\t->toJson();\n\n\t}", "function amo_update($entity, $data, $search_similiar = false, $need_prepare = true)\n{\n if (substr($entity, -1) == 's') {\n $link = $entity;\n $many_items = true;\n } else {\n if ($entity == 'company') {\n $link = 'companies';\n } else {\n $link = $entity . 's';\n }\n }\n\n if (isset($data['search']) && !empty($data['search'])) {\n $search_similiar = true;\n }\n\n if ($need_prepare) {\n $item = prepare_data($entity, $data, $search_similiar);\n } else {\n $item = $data;\n }\n\n if ($item) {\n if (!$many_items) {\n $items = [$item];\n } else {\n $items = $item;\n }\n\n foreach ($items as $key => $item) {\n if (isset($item['id'])) {\n\n // no_update ставится в случае когда данные контакта совпадают с данными в амо.\n if ($item['no_update']) {\n return $item['id'];\n }\n\n $action_msg = 'Обновлён ';\n $ids_to_update[] = $item['id'];\n $item['updated_at'] = time(); // + 1000\n $sorted_data['update'][] = $item;\n\n } else {\n $ids_to_add[] = $item['id'];\n $action_msg = 'Добавлен ';\n $sorted_data['add'][] = $item;\n }\n }\n\n/* if (!empty($ids_to_update)) {\nlogw('Обновляем ' . $entity . ' id ' . implode(', ', $ids_to_update));\n}\n\nif (!empty($ids_to_add)) {\nlogw('Добавляем ' . $entity);\n}*/\n\n $output = run_curl($link, $sorted_data);\n\n if (!empty($output['_embedded']['items'])) {\n foreach ($output['_embedded']['items'] as $key => $value) {\n $updated_id[] = $value['id'];\n }\n } else {\n logw('Ошибка обновления');\n logw($output);\n return false;\n }\n\n if (!empty($updated_id)) {\n $updated_id_msg = implode(', ', $updated_id);\n } else {\n logw('Ошибка обновления ' . $entity);\n logw($output);\n return false;\n }\n\n if ($many_items) {\n logw('Обновлены ' . $entity . ' id ' . $updated_id_msg);\n return $updated_id;\n } else {\n logw($action_msg . $entity . ' id ' . $updated_id_msg);\n return $updated_id[0];\n }\n\n } else {\n logw('Ошибка: не получены данные от prepare_data');\n return false;\n }\n}", "public function order(Request $request)\n {\n $input=[];\n $data = $request->input('asset_samples_type');\n $newOrder=1;\n foreach($data as $d)\n {\n $input['order'] = $newOrder;\n $asset_samples_type = AssetSamplesType::findOrFail($d);\n $asset_samples_type->update($input);\n $newOrder++;\n }\n\n $response = [\n 'notifTitle'=>'AssetSamplesType order updated.',\n ];\n return response()->json($response);\n }", "public function add()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare')?$this->View()->getSession('compare'):array();\n\n if (!in_array($product_id, $compareProducts)) {\n $compareProducts[] = $product_id;\n }\n // set products to session\n $this->View()->setSession('compare', $compareProducts);\n\n // for ajax request\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_set'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }", "public function actionSort()\n {\n $model = new Position;\n\n $sortedIds = Yii::$app->request->post('sortedList');\n $success = !empty($sortedIds) ? $model->updateSorting($sortedIds) : false;\n\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n return ['success' => $success];\n }", "public function update_sort(){\n\n \tforeach ($_GET['listItem'] as $position => $item)\n {\n\n $this->model->findOrFail($item)->UPDATE([\n\n 'position' => $position\n\n ]);\n\n }\n\n return Lang::get($this->modName.'.Order_Update');\n\n \t}", "public function ajaxOrdering() {\n $app = $this->getApplication();\n $text = $this->getContainer()->get('language')->getText();\n $result = new \\stdClass();\n\n // Bad request par défaut.\n $result->status = 400;\n $result->error = true;\n\n // On contrôle le jeton de la requête.\n if (!$app->checkToken()) {\n $result->status = 403;\n $result->message = $text->translate('APP_ERROR_INVALID_TOKEN');\n\n return $result;\n }\n\n $model = $this->getModel();\n $input = $this->getInput();\n\n $pks = $input->get('pks', [], 'array');\n $ordering = $input->get('ordering', [], 'array');\n\n if (empty($pks) || empty($ordering) || count($pks) != count($ordering)) {\n $result->message = $text->translate('APP_ERROR_BAD_REQUEST');\n return $result;\n }\n\n if (!$model->setOrdering($pks, $ordering)) {\n $result->status = 500;\n $error = $model->getError();\n if ($error instanceof \\Exception) {\n $error = $error->getMessage();\n }\n $result->message = $error;\n\n return $result;\n }\n\n // Si on est ici c'est OK.\n $result->status = 200;\n $result->error = false;\n\n return $result;\n\n }", "public function searchToAddAction()\n {\n $request = $this->get('request');\n $pendingFriendshipsIDs = [];\n $users = null;\n $searchValue = $request->get('search');\n if (trim($searchValue) !== '') {\n $currentUser = $this->getUser();\n $userRepository = $this->getDoctrine()->getRepository('KibokoSocialNetworkBundle:User');\n $friendshipRepository = $this->getDoctrine()->getRepository('KibokoSocialNetworkBundle:UserFriendship');\n $excludeIDs = [$currentUser->getId()];\n $friendships = $friendshipRepository->findAcceptedAndRefusedFriends($currentUser);\n foreach ($friendships as $friendship) {\n $excludeIDs[] = $friendship['id'];\n }\n $users = $userRepository->findOnlyInEnabledSubscribers($searchValue, $excludeIDs);\n $pendingFriendships = $friendshipRepository->findPendingFriends($currentUser);\n foreach ($pendingFriendships as $pendingFriendship) {\n $id = $pendingFriendship['id'];\n $pendingFriendshipsIDs[$id] = $id;\n }\n }\n\n return $this->render('KibokoSocialNetworkBundle:Friendship:add.html.twig',\n [\n 'searchValue' => $searchValue,\n 'users' => $users,\n 'pendingFriendshipsIDs' => $pendingFriendshipsIDs,\n ]\n );\n }", "public static function sort()\n {\n $todo_order = isset($_POST['todo_order']) ? $_POST['todo_order'] : false;\n \n if ( ! $todo_order ) {\n return json(\"Fail\");\n }\n \n parse_str($todo_order, $output);\n \n foreach ($output['todo_order'] as $k=>$v) {\n $todo = ORM::for_table('todo')->find_one($v);\n \n if ( ! $todo ) {\n continue;\n }\n \n $todo->order = $k;\n $todo->save();\n }\n\n return json(\"OK\");\n }", "public function send_order($data){\n \treturn $this->db->add_row( $data, $this->order );\n }", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\n }", "public function actionBulkTrashSent() {\n\n if (Yii::$app->request->post('selection')) {\n\n $where = ['id' => Yii::$app->request->post('selection', [])];\n $this->modelClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_TRASH, 'deleted_at' => time()], $where);\n }\n }", "function CreateNewReqest($data) {\n if ($data['keyword'] == \"CC\" || $data['keyword'] == \"CR\") {\n $this->CheckEmailRecord($data);\n }\n $res_array = array();\n $smpprequest = $this->Choices->find('all', array('conditions' => array('smpp_request' => $data['keyword'])))->toArray();\n $res_array['request_id'] = $this->RecordRequest($data, $smpprequest);\n if ($smpprequest[0]['is_chargable'] == \"Yes\") {\n $res_array['tid'] = $this->RecordTransaction($data, $smpprequest, $res_array['request_id']);\n $res_array['amount'] = $smpprequest[0]['amount'];\n }\n\n return $res_array;\n }", "function add($data){\r\n\t\t$post_string = '<add><doc>';\r\n\t\tforeach ($data as $key => $value){\r\n\t\t\t$post_string = '<field name=\"$key\">$value</field>';\r\n\t\t}\r\n\t\t$post_string = ' </doc></add>';\r\n\t\t$header = array(\"Content-type:text/xml; charset=utf-8\");\r\n\r\n\t\t$ch = curl_init();\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_URL, SOLR_UPDATE_URL);\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $header);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);\r\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\r\n\t\tcurl_setopt($ch, CURLINFO_HEADER_OUT, 1);\r\n\r\n\t\t$data = curl_exec($ch);\r\n\r\n\t\tif (curl_errno($ch)) {\r\n\t\t //print \"curl_error:\" . curl_error($ch);\r\n\t\t} else {\r\n\t\t curl_close($ch);\r\n\t\t //print \"curl exited okay\\n\";\r\n\t\t // echo \"Data returned...\\n\";\r\n\t\t //echo \"------------------------------------\\n\";\r\n\t\t //echo $data;\r\n\t\t //echo \"------------------------------------\\n\";\r\n\t\t}\r\n\t}", "function updateShares(array $add, array $remove);", "public function actionAjaxsort() {\n if (isset(\\Yii::$app->request->post()['cat'])) {\n $number = 1;\n foreach(\\Yii::$app->request->post()['cat'] as $id) {\n $model = BbiiForum::find($id);\n $model->sort = $number++;\n $model->save();\n }\n $json = array('succes' => 'yes');\n } elseif (isset(\\Yii::$app->request->post()['frm'])) {\n $number = 1;\n foreach(\\Yii::$app->request->post()['frm'] as $id) {\n $model = BbiiForum::find($id);\n $model->sort = $number++;\n $model->save();\n }\n $json = array('succes' => 'yes');\n } else { \n $json = array('succes' => 'no');\n }\n echo json_encode($json);\n \\Yii::$app->end();\n }", "public function TraerTodos($request, $response, $args) {\n\n if($_SERVER['REQUEST_METHOD']=='GET'){\n //si contiene un id es a un solo registro\n if(isset($_GET['id'])){\n $query=\"select * from pedido where idAuth=\".$_GET['idAuth'];\n $resultado=metodoGet($query);\n echo json_encode($resultado->fetch(PDO::FETCH_ASSOC));\n }else{ //sino a todos\n $query=\"select * from pedido\";\n $resultado=metodoGet($query);\n $JsonRta = json_encode($resultado->fetchAll());\n $array = json_decode($JsonRta,true);\n $auxArray = array();\n\n for($i= 0; $i<count($array);$i++){\n \n if($array[$i][\"estado\"] == \"POSTEADO\"){\n \n // echo count($array);\n $DireccionOrigen = json_decode(Direcciones::TraerDireccionById($array[$i][\"DireccionOrigen\"]),true);\n $DireccionDestino = json_decode(Direcciones::TraerDireccionById($array[$i][\"DireccionLlegada\"]),true);\n $array[$i][\"DireccionOrigen\"] = $DireccionOrigen ;\n $array[$i][\"DireccionLlegada\"] = $DireccionDestino;\n $clienteInfo = json_decode(ClienteApi::TraerClientePorId($array[$i][\"idCliente\"]),true);\n $array[$i][\"clienteInfo\"] = $clienteInfo;\n array_push($auxArray,$array[$i]);\n // echo \"clienteInfo\";\n // var_dump($clienteInfo);\n }\n \n }\n echo json_encode($auxArray);\n \n // echo json_encode($array);\n }\n header(\"HTTP/1.1 200 OK\");\n exit();\n }\n }", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "static public function add2Order($goods_list)\n {\n $params = [\n 'user_data_id' => (int) getenv('AMTEL_USER_DATA_ID'), // (int) * – Идентификатор клиента для которого делается заказ (отличается от user_id для доступа к API, выдается вместе с остальными учетными данными при подключении)\n 'basket_num' => (int) getenv('AMTEL_BASKET_NUM', 1), // Номер корзины клиента, указанный реселлером при добавлении товара в корзину.\n 'delivery_city_id' => getenv('AMTEL_DELIVERY_CITY_ID', 1), // Идентификатор города доставки.\n 'delivery_address' => getenv('AMTEL_DELIVERY_ADDRESS', ''), // Адрес доставки.\n 'delivery_contact' => getenv('AMTEL_DELIVERY_CONTACT', ''), // Телефон получателя заказа.\n 'delivery_tel' => getenv('AMTEL_DELIVERY_TEL', ''), // Телефон получателя заказа.\n 'delivery_comment' => getenv('AMTEL_DELIVERY_COMMENT', ''), // Комментарий к заказу.\n 'allow_supplier_offer_sim' => getenv('AMTEL_ALLOW_REPLACE', false), // Разрешить поставщику предлагать замену.\n 'to_split' => false, // Разбивать заказ при наличии разных поставщиков товаров в корзине.\n 'basket_goods_list' => json_decode($goods_list), // Список basket_goods_id для заказа, остальные останутся в корзине, если не указан - закажутся все товары.\n //'shipping_company_id => ' – Идентификатор транспортной компании.\n //payment_method_id – Идентификатор способа оплаты.\n //tags – Список тегов, по которым после создания заказа будет возможна фильтрация, задаются в виде массива строк, например: [\"tag1\", \"tag2\"]. Например можно указать номер заказа, идентификатор клиента в системе реселлера.\n //order_list_url – Адрес на стороне реселлера, по которому доступен лист заказа (будет приложен поставщиком к заказу).\n ];\n\n try {\n $res = json_decode(self::post('/order', $params), true);\n Log::info('add to order=' . print_r($res, 1));\n\n return $res;\n } catch (\\Exception $e) {\n Log::error($e);\n throw new HttpException(500, $e->getMessage());\n }\n }", "public function addEntry(Request $request) {\n\n $response = [ 'status' => false];\n\n for ($i = 1; $i < 80; $i++) {\n PaperSubject::create(['paper_id' => 2, 'subject_id' => $i]);\n }\n return response($response)->header('Content-Type', 'application/json');\n }", "function updateUlrsList($newUrl) {\n $urlFile = env('PBS_KIOSK_DIR').'/urls.list';\n $contents = file_get_contents($urlFile);\n $parsedLines = preg_split(\"/\\r?\\n|\\r/\", $contents);\n // Check if exists already\n $found = false;\n $rVal = 'notadded';\n foreach( $parsedLines as $rurl ) {\n if( trim($newUrl) == trim($rurl) ) $found = true;\n }\n if(!$found) {\n $contents .= \"\\r\\n\".$newUrl;\n if (file_put_contents($urlFile, $contents)) $rVal = 'added';\n }\n return response()->json($rVal);\n }", "public function add(Request $request){\n // dd('d');\n $user1 = DB::table('users')->where('id',$request->userid)->get();\n $user2 = DB::table('users')->where('id',auth()->user()->id)->get();\n $requestt = DB::table('requests')->where('to_id',$request->userid)->where('from_id',auth()->user()->id)->get();\n\n if (count($requestt)==0){\n DB::table('requests')->insert([\n ['to_id' => $request->userid, 'from_id' => auth()->user()->id],\n ]);\n }\n \n \n return redirect()->back();\n\n }", "public function actionAdd()\n {\n if (Yii::$app->getRequest()->Post('gid') && Yii::$app->getRequest()->Post('iid')) {\n $landingPageId = (int)Yii::$app->getRequest()->Post('gid');\n $groupingId = (int)Yii::$app->getRequest()->Post('iid');\n $model = LandingPageGrouping::find()->andWhere(['landing_page_id' => $landingPageId])->\n andWhere(['grouping_id' => $groupingId])->one();\n if (!$model) {\n $model = new LandingPageGrouping();\n $model->landing_page_id = $landingPageId;\n $model->grouping_id = $groupingId;\n if ($model->validate()) {\n $model->save();\n }\n }\n\n $groupings = Grouping::find()->onLandingPage($landingPageId)->active()->\n asArray()->all();\n } else {\n $groupings = false;\n }\n \n \\Yii::$app->response->format = 'json';\n return $groupings;\n }", "public function sendAdminListUserInfo($adminID){\n $model = new model($this->config);\n $clientArray = $model->getListUser();\n\n $dbUsers = array();\n foreach ($clientArray as $index=>$user) {\n $dbUsers[$index] = $user['token'];\n }\n foreach ($this->tokenIdMap as $token=>$IdArray) {\n if(count($IdArray) > 0){\n // echo \"0\\r\\n\";\n $id = $IdArray[0];\n $user = $this->users[$id];\n $serviceUserArray = $user->toArray();\n \n if($user->type === 'client'){\n $inDbUser = array_search($token, $dbUsers);\n // echo $inDbUser;\n if(!$inDbUser){\n array_push($clientArray, $serviceUserArray);\n }else{\n // echo \"3\\r\\n\";\n // echo \"exist \\r\\n\";\n $clientArray[$inDbUser]['status'] = 'on';\n if(intval($clientArray[$inDbUser]['updateAt']) < $user->updateAt){\n $clientArray[$inDbUser]['messages'] = array_merge($clientArray[$inDbUser]['messages'], $serviceUserArray['messages']);\n }\n }\n }\n }\n }\n\n\n // sort\n for($i = 0; $i <= count($clientArray) - 2; $i++){\n for($j = $i + 1; $j <= count($clientArray) - 1; $j++){\n // echo intval($clientArray[$i]['updateAt']) - intval($clientArray[$j]['updateAt']);\n if(intval($clientArray[$i]['updateAt']) < intval($clientArray[$j]['updateAt'])){\n // echo \"swap\";\n $temp = $clientArray[$i];\n $clientArray[$i] = $clientArray[$j];\n $clientArray[$j] = $temp;\n }\n }\n }\n\n // echo \"\\r\\n\";\n // foreach($clientArray as $i=>$v){\n // echo($v['updateAt']);\n // }\n\n \n $this->sendMessageToUser(array(0=>$adminID), $clientArray, 100);\n }", "public function add_to_store(Request $request)\n {\n Log::info(\"TransactionController->add_to_store :- Inside \");\n return $this->store_transaction($request, \"remote\");\n }", "public function actionSyncorderinfo()\n {\n $details = [];\n $session = Yii::$app->session;\n $sql = \"SELECT `id`,`fruugo_password`,`fruugo_username`,`last_synced`,`total_revenue` FROM `magento_fruugo_info` WHERE `fruugo_username`!='' \";\n $details = Data::sqlRecords($sql,'all','select');\n $chunkStatusArray=array_chunk($details, 1);\n foreach ($chunkStatusArray as $ind=> $value)\n {\n $session->set('orderinfo-'.$ind, $value); \n }\n return $this->render('ajaxbulkupdate', [\n 'totalcount' => count($chunkStatusArray),\n 'pages' => count($chunkStatusArray),\n 'action' => \"OrderApi\",\n ]); \n \n /*Yii::$app->session->setFlash('success',$count.\" rows updated successfully\");\n return $this->redirect(Yii::$app->getUrlManager()->getBaseUrl().'/magento-fruugo-info/index');*/\n }", "public function addItems($params){\r\n\t \r\n\t foreach($params as $key=>$values)\r\n\t if(!$this->_isDublicatedData($values))\r\n\t $this->addItem($values);\r\n\t \r\n\t return $this;\r\n\t}", "public function executeGlobelOrdering(sfWebRequest $request)\n {\n $anOrdering = $request->getParameter('recordsArray');\n $oForums = new Forums();\n foreach($anOrdering as $key => $snOrderning)\n {\n $oForums->updateForumOrdering($snOrderning,$key);\n }\n return sfView::NONE;\n }", "public function postCreate() {\n if ($this->enabled) {\n $this->queueItems();\n }\n $server = $this->server();\n if ($server) {\n // Tell the server about the new index.\n if ($server->enabled) {\n $server->addIndex($this);\n }\n else {\n $tasks = variable_get('search_api_tasks', array());\n // When we add or remove an index, we can ignore all other tasks.\n $tasks[$server->machine_name][$this->machine_name] = array('add');\n variable_set('search_api_tasks', $tasks);\n }\n }\n }", "protected function processRequest()\n\t{\n\t\t$this->request[\"COPY_ORDER\"] = $_REQUEST[\"COPY_ORDER\"] == \"Y\";\n\t\t$this->request[\"ID\"] = urldecode(urldecode($this->arParams[\"ID\"]));\n\n\t\tif (strlen($_REQUEST[\"del_filter\"]))\n\t\t{\n\t\t\tunset($_REQUEST[\"filter_id\"]);\n\t\t\tunset($_REQUEST[\"filter_date_from\"]);\n\t\t\tunset($_REQUEST[\"filter_date_to\"]);\n\t\t\tunset($_REQUEST[\"filter_status\"]);\n\t\t\tunset($_REQUEST[\"filter_payed\"]);\n\t\t\tunset($_REQUEST[\"filter_canceled\"]);\n\t\t\t$_REQUEST[\"filter_history\"] = \"Y\";\n\t\t\tif ($this->arParams[\"SAVE_IN_SESSION\"] == \"Y\")\n\t\t\t{\n\t\t\t\tunset($_SESSION[\"spo_filter_id\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_date_from\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_date_to\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_status\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_payed\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_canceled\"]);\n\t\t\t\t$_SESSION[\"spo_filter_history\"] = \"Y\";\n\t\t\t}\n\t\t}\n\n\t\t$this->filterRestore();\n\t\t$this->filterStore();\n\n\t\t$this->sortBy = (strlen($_REQUEST[\"by\"]) ? $_REQUEST[\"by\"]: \"ID\");\n\t\t$this->sortOrder = (strlen($_REQUEST[\"order\"]) ? $_REQUEST[\"order\"]: \"DESC\");\n\n\t\t$this->prepareFilter();\n\t}", "public function getAll($request)\n\t{\n\n\t\t $r = $request;\n\n\t\t if (isset($r[\"sort\"])){\n\t $sort = explode(\"|\",$r[\"sort\"]);\n\t }\n\n\t if (isset($r[\"filter\"])) {\n\t $add_ons = $this->model->where('name', 'like', '%' . $r[\"filter\"] . '%')->orderBy( $sort[0] ,$sort[1])->paginate(5);\n\t }else if(!isset($r[\"sort\"])){\n\t $add_ons = $this->model->all();\n\t return response()->json(compact('add_ons'));\n\t }else{\n\t\t\t$add_ons = $this->model->where('store_id', Auth::user()->store_id)\n\t\t\t->orderBy( $sort[0] ,$sort[1])->paginate(5);\n\t }\n\n\t\treturn $add_ons;\n\t}", "public function additems(Request $request, $id)\n {\n $requestData= array_except($request->all(),['_token']);\n $page = $this->pageservice->find($id);\n\n $type = isset($requestData['type']) ? $requestData['type'] : '';\n\n if($type) {\n switch ($type) {\n case 'artist':\n $pagedata = array_except($page, array('artists'));\n uasort($requestData['artists'], 'sort_by_order');\n if($requestData['artists']) {\n foreach ($requestData['artists'] as $key => $artist) {\n $requestData['artists'][$key]['order'] = (int) $requestData['artists'][$key]['order'];\n if(isset($artist['artist_id']) && $artist['artist_id']) {\n\n }\n else {\n $response['error_messages'] = 'Please select Artist';\n return Redirect::back()->withErrors(['', $response['error_messages']]);\n }\n }\n }\n break;\n\n case 'banner':\n $pagedata = array_except($page, array('banners'));\n uasort($requestData['banners'], 'sort_by_order');\n foreach ($requestData['banners'] as $key => $banner) {\n\t\t\t $requestData['banners'][$key]['order'] = (int) $requestData['banners'][$key]['order'];\n\t\t\t $requestData['banners'][$key]['platforms'] = isset($requestData['banners'][$key]['platforms']) ? $requestData['banners'][$key]['platforms'] :[\"android\"];\n if(isset($banner['name']) && $banner['name']) {\n\n }\n else {\n $response['error_messages'] = $key. ' Banner Name is required';\n return Redirect::back()->withErrors(['', $response['error_messages']]);\n }\n }\n break;\n\n case 'content':\n $pagedata = array_except($page, array('contents'));\n uasort($requestData['contents'], 'sort_by_order');\n foreach ($requestData['contents'] as $key => $content) {\n\t\t\t $requestData['contents'][$key]['order'] = (int) $requestData['contents'][$key]['order'];\n\t\t\t $requestData['contents'][$key]['platforms'] = isset($requestData['contents'][$key]['platforms']) ? $requestData['contents'][$key]['platforms'] :[\"android\"];\n if(isset($content['content_id']) && $content['content_id']) {\n\n }\n else {\n $response['error_messages'] = $key. ' Content is required';\n return Redirect::back()->withErrors(['', $response['error_messages']]);\n }\n }\n break;\n default:\n # code...\n break;\n }\n }\n\n $response = $this->pageservice->updateItems($requestData, $id);\n\n if(!empty($response['error_messages'])) {\n return Redirect::back()->withInput();\n }\n\n Session::flash('message','Page Section updated succesfully');\n return Redirect::route('admin.pages.manage', $page->_id);\n }", "public function sort(Request $request)\n {\n $result = [];\n $orderPrefix = 101; // make 101, for new sensors stay first\n $sensorsOrder = $request->input('sensors');\n\n foreach ($sensorsOrder as $order => $sensorId) {\n $sensor = Sensor::find($sensorId);\n $newPriority = $orderPrefix + $order;\n $sensor->priority = $newPriority;\n $sensor->save();\n $result[] = ['id' => $sensor->id, 'order' => $newPriority, ];\n }\n\n return response()->json(['status' => 'Ok', 'sensors' => $sensorsOrder, 'order' => $result, ]);\n }", "public function postOrder(Request $request)\n {\n // This should only be accessible via AJAX you know...\n if( ! $request->ajax()) response()->json('error', 400);\n\n $id_value = $request->input('id_value');\n $sort_value = $request->input('sort_value');\n \n foreach($id_value as $key => $id)\n {\n if($id)\n {\n try\n {\n $sort = $sort_value[$key];\n $this->repo->edit($id, array('sort' => $sort));\n }\n catch (\\Sharenjoy\\Cmsharenjoy\\Exception\\EntityNotFoundException $e)\n {\n error(pick_trans('exception.not_found', ['id' => $id]));\n return redirect($this->objectUrl);\n }\n }\n }\n\n $message = pick_trans('success_ordered');\n $data = ['success' => pick_trans('success')];\n \n return message()->json(200, $message, $data);\n }", "function add() {\n if($this->request->isAsyncCall() || ($this->request->isApiCall() && $this->request->isSubmitted()) || true) {\n if(Invoices::canAdd($this->logged_user)) {\n $default_currency = Currencies::getDefault();\n \n if(!($default_currency instanceof Currency)) {\n $this->response->notFound();\n } // if\n\n $invoice_data = $this->request->post('invoice');\n \n if(!is_array($invoice_data)) {\n $duplicate_invoice_id = $this->request->getId('duplicate_invoice_id');\n \n // Duplicate an existing invoice\n if($duplicate_invoice_id) {\n $duplicate_invoice = Invoices::findById($duplicate_invoice_id);\n if($duplicate_invoice instanceof Invoice) {\n $invoice_data = array(\n 'company_id' => $duplicate_invoice->getCompanyId(),\n 'company_address' => $duplicate_invoice->getCompanyAddress(),\n 'private_note' => $duplicate_invoice->getPrivateNote(),\n 'status' => INVOICE_STATUS_DRAFT,\n 'project_id' => $duplicate_invoice->getProjectId(),\n 'note' => $duplicate_invoice->getNote(),\n 'currency_id' => $duplicate_invoice->getCurrencyId(),\n 'payment_type' => $duplicate_invoice->getAllowPayments(),\n 'second_tax_is_compound' => $duplicate_invoice->getSecondTaxIsCompound(),\n 'language_id' => $duplicate_invoice->getLanguageId()\n );\n \n if(is_foreachable($duplicate_invoice->getItems())) {\n $invoice_data['items'] = array();\n foreach($duplicate_invoice->getItems() as $item) {\n $invoice_data['items'][] = array(\n 'description' => $item->getDescription(),\n 'unit_cost' => $item->getUnitCost(),\n 'quantity' => $item->getQuantity(),\n 'first_tax_rate_id' => $item->getFirstTaxRateId(),\n 'second_tax_rate_id' => $item->getSecondTaxRateId(),\n 'total' => $item->getTotal(),\n 'subtotal' => $item->getSubtotal(),\n );\n } // foreach\n } // if\n } // if\n } // if\n \n // Blank invoice\n if(!is_array($invoice_data)) {\n $invoice_data = array(\n 'due_on' => null,\n 'currency_id' => $default_currency->getId(),\n 'time_record_ids' => null,\n 'payment_type' => -1,\n 'second_tax_is_compound' => $this->active_invoice->getSecondTaxIsCompound()\n );\n } // if\n } // if\n\n $this->response->assign('invoice_data', $invoice_data);\n $this->response->assign(Invoices::getSettingsForInvoiceForm($this->active_invoice));\n \n if($this->request->isSubmitted()) {\n \ttry {\n \tDB::beginWork('Creating a new invoice @ ' . __CLASS__);\n\n if (!is_foreachable($invoice_data['items'])) {\n throw new Error(lang('Invoice items data is not valid. All descriptions are required and there need to be at least one unit with cost set per item!'));\n } // if\n\n \t$this->active_invoice->setAttributes($invoice_data);\n \t $this->active_invoice->setCreatedBy($this->logged_user);\n\n if ($this->active_invoice->getSecondTaxIsEnabled()) {\n $this->active_invoice->setSecondTaxIsCompound(array_var($invoice_data, 'second_tax_is_compound', false));\n } // if\n\n $this->active_invoice->setItems($invoice_data['items']);\n $this->active_invoice->setState(STATE_VISIBLE);\n $this->active_invoice->save();\n\n \t DB::commit('Invoice created @ ' . __CLASS__);\n \t \n $this->response->respondWithData($this->active_invoice, array(\n \t'as' => 'invoice', \n 'detailed' => true,\n ));\n \t \n \t} catch (Exception $e) {\n \t DB::rollback('Failed to create invoice @ ' . __CLASS__);\n \t\t$this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "public function addAction(){\n $parameters = array(\n 'token' =>'a959a5e68551f6f5d0b8c4bcdd17c0e4',\n 'name'=>'推广数据4',\n 'intro'=>'额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒14762596987033.jpg娇国际大厦定时机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境额定功耗计算都是的撒哥冬瓜撒蛋糕萨哈帝国和价格的撒娇国际大厦定时关机的撒哥环境',\n 'cover'=>'14697788503687.jpg',\n 'type'=>1,\n 'num'=>20,\n 'origin'=>4,\n //'version'=>'3.5',\n 'start_time'=>'2017-04-13 00:00:00',\n 'end_time'=>'2017-09-13 00:00:00',\n 'price'=>'110',\n //'score'=>'50',\n 'sid'=>204,\n 'cate_id'=>'10',\n 'city_id'=>820488,\n 'intro_img'=>'14762596987033.jpg'\n\n );\n Common::verify($parameters, '/stagegoods/add');\n }", "function manual_list_add(){\n\t\t\n\t\tif($this->CI->input->post('status_check')){\n\t\t\t//check to see if job complete\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->CI->load->helper('check_gearman_job_complete');\n\t\t\tcheck_gearman_job_complete('gearman_promoter_manual_add');\t\n\t\t\t\n\t\t\t/*\n\t\t\t\n\t\t\t\n\t\t\tif(!$gearman_promoter_manual_add = $this->CI->session->userdata('gearman_promoter_manual_add'))\n\t\t\t\tdie(json_encode(array('success' => false,\n\t\t\t\t\t\t\t\t\t\t'message' => 'No request found')));\t\n\t\t\t\n\t\t\t$gearman_promoter_manual_add = json_decode($gearman_promoter_manual_add);\n\t\t\t\n\t\t\t//check job status to see if it's completed\n\t\t\t$this->CI->load->library('library_memcached', '', 'memcached');\n\t\t\tif($result = $this->CI->memcached->get($gearman_promoter_manual_add->handle)){\n\t\t\t\t//free memory from memcached\n\t\t\t\t$this->CI->memcached->delete($gearman_promoter_manual_add->handle);\n\t\t\t\t$this->CI->session->unset_userdata('gearman_promoter_manual_add');\n\t\t\t\treturn json_decode($result); //<-- already json in memcache (slight inefficiency here...)\n\t\t\t}else{\n\t\t\t\treturn array('success' => false);\n\t\t\t}\n\t\t\t\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t//create new job\n\t\t\t\n\t\t\tif($vc_user = $this->CI->session->userdata('vc_user')){\n\t\t\t\t\n\t\t\t\t//head user uid is required\n\t\t\t\tif(!$oauth_uids = $this->CI->input->post('oauth_uids'))\n\t\t\t\t\treturn array('success' => false);\n\t\t\t\t\n\t\t\t\t//pgla id is required\n\t\t\t\tif(!$pgla_id = $this->CI->input->post('pgla_id'))\n\t\t\t\t\treturn array('success' => false);\n\t\t\t\t\n\t\t\t\t$vc_user = json_decode($vc_user);\n\t\t\t\t//start gearman job for retrieving guest lists\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t$this->CI->load->library('pearloader');\n\t\t\t\t$gearman_client = $this->CI->pearloader->load('Net', 'Gearman', 'Client');\n\t\t\t\t\n\t\t\t\t# ------------------------------------------------------------- #\n\t\t\t\t#\tSend guest list request to gearman as a background job\t\t#\n\t\t\t\t# ------------------------------------------------------------- #\t\t\t\t\n\t\t\t\t//add job to a task\n\t\t\t\t$gearman_task = $this->CI->pearloader->load('Net', 'Gearman', 'Task', array('func' => 'gearman_promoter_manual_add',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'arg' => array('user_oauth_uid' \t=> $vc_user->oauth_uid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'promoter_id'\t\t=> $this->promoter->up_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'access_token' \t\t=> $vc_user->access_token,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'pgla_id'\t\t\t=> $pgla_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'oauth_uids' \t\t=> json_encode($oauth_uids))));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$gearman_task->type = Net_Gearman_Task::JOB_BACKGROUND;\n\t\t\t\t\n\t\t\t\t//add test to a set\n\t\t\t\t$gearman_set = $this->CI->pearloader->load('Net', 'Gearman', 'Set');\n\t\t\t\t$gearman_set->addTask($gearman_task);\n\t\t\t\t \n\t\t\t\t//launch that shit\n\t\t\t\t$gearman_client->runSet($gearman_set);\n\t\t\t\t# ------------------------------------------------------------- #\n\t\t\t\t#\tEND Send guest list request to gearman as a background job\t#\n\t\t\t\t# ------------------------------------------------------------- #\n\t\t\t\n\t\t\t\t//Save background handle and server to user's session\n\t\t\t\t$gearman_promoter_manual_add = new stdClass;\n\t\t\t\t$gearman_promoter_manual_add->handle = $gearman_task->handle;\n\t\t\t\t$gearman_promoter_manual_add->server = $gearman_task->server;\n\t\t\t\t$this->CI->session->set_userdata('gearman_promoter_manual_add', json_encode($gearman_promoter_manual_add));\n\t\t\t\t\n\t\t\t\treturn array('success' => true);\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$this->CI->load->library('run_gearman_job');\n\t\t\t\trun_gearman_job('gearman_promoter_manual_add', array('user_oauth_uid' \t=> $vc_user->oauth_uid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'promoter_id'\t\t=> $this->promoter->up_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'access_token' \t\t=> $vc_user->access_token,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'pgla_id'\t\t\t=> $pgla_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'oauth_uids' \t\t=> json_encode($oauth_uids)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\treturn array('success' => false, 'message' => 'User not authenticated.');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}", "public function queueAddRecommendationsToSupportAccount(){\n \t\n \t$main_qry = DB::connection('bk')->table('revenue_organizations as ro')\n \t\t\t\t\t\t\t\t\t->join('organization_portals as op', 'ro.id', '=', 'op.ro_id')\n \t\t\t\t\t\t\t\t ->select('ro.id as ro_id', 'ro.name as ro_name', 'ro.num_of_rec', 'op.id as portal_id')\n \t\t\t\t\t\t\t\t ->groupBy('ro_name')\n \t\t\t\t\t\t\t\t ->where(function($q){\n \t\t\t\t\t\t\t\t \t$q->orWhere('ro.active', '=', DB::raw(1));\n \t\t\t\t\t\t\t\t \t$q->orWhere('ro.id', '=', DB::raw(10));\n \t\t\t\t\t\t\t\t \t$q->orWhere('ro.id', '=', DB::raw(31));\n \t\t\t\t\t\t\t\t })\n \t\t\t\t\t\t\t\t ->where('ro.id', '!=', 1)\n \t\t\t\t\t\t\t\t ->where('ro.id', '!=', 6)\n \t\t\t\t\t\t\t\t ->get();\n\n \t\n \t$cnt = 0;\n\n \tforeach ($main_qry as $key) {\n \t\t\n \t\t$qry = DB::connection('bk')->table('users as u')\n \t\t\t\t\t\t\t\t ->select('u.id as user_id')\n \t\t\t\t\t\t\t\t ->whereNotNull('u.phone')\n ->where('u.phone', '!=', ' ');\n\n \t\t$res = $this->addCustomFiltersForRevenueOrgs($qry, $key->ro_name);\n \t\tif (isset($res['status']) && $res['status'] == \"success\") {\n \t\t\t$qry = $res['qry'];\n \t\t}else{\n \t\t\tcontinue;\n \t\t}\n\n \t\t// Keypath orderby\n \t\tif ($key->ro_id == 10) {\n \t\t\t$qry = $qry->orderByRaw(\"case when (u.country_id = 5 OR u.country_id= 63 OR u.country_id= 68 OR u.country_id= 102 OR u.country_id= 123 OR u.country_id= 147 OR u.country_id= 158 OR u.country_id= 159 OR u.country_id= 218) then 1 else 2 end\");\n \t\t}else{\n \t\t\t$qry = $qry->orderBy(DB::raw(\"RAND()\")); \n \t\t}\n\n \t\t$qry = $qry->leftjoin('recruitment as r', function($q) use($key){\n\t\t\t\t\t\t\t \t\t$q->on('r.user_id', '=', 'u.id');\n\t\t\t\t\t\t\t \t\t$q->on('r.college_id', '=', DB::raw(7916));\n\t\t\t\t\t\t\t \t\t$q->on('r.ro_id', '=', DB::raw($key->ro_id));\n\t\t\t\t\t\t\t })\n \t\t\t ->leftjoin('recruitment_revenue_org_relations as rror', function($q) use($key){\n\t\t\t\t\t\t\t \t\t$q->on('rror.rec_id', '=', 'r.id');\n\t\t\t\t\t\t\t \t\t$q->on('rror.ro_id', '=', DB::raw($key->ro_id));\n\t\t\t\t\t\t\t })\n\t\t\t\t ->WhereNull('rror.id')\n \t\t\t ->whereNull('r.id')\n \t ->where('u.email', '!=', 'none')\n\t\t\t\t ->where('u.is_organization', 0)\n\t\t\t\t ->where('u.is_university_rep', 0)\n\t\t\t\t \n\t\t\t\t ->where('u.is_counselor', 0)\n\t\t\t\t ->where('u.is_aor', 0)\n\t\t\t\t ->where('u.email', 'NOT LIKE', '%els.edu%')\n\t\t\t\t ->where('u.email', 'NOT LIKE', '%shorelight%')\n\t\t\t\t ->where('u.email', 'NOT LIKE', '%test%')\n\t\t\t\t ->where('u.id', '!=', 1024184)\n\t\t\t\t ->where('u.is_ldy', 0)\n\t\t\t\t \n \t ->take($key->num_of_rec)\n \t\t\t ->get();\n\n \t\tforeach ($qry as $k) {\n\t \t\t$rec_qry = Recruitment::on('bk')->where('user_id', $k->user_id)\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('college_id', 7916)\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('ro_id', $key->ro_id)\n\t\t\t\t\t\t\t\t\t\t\t\t ->first();\n\t\t\t\tif (!isset($rec_qry)) {\n\t\t\t\t\t$attr = array('user_id' => $k->user_id, 'college_id' => 7916, 'ro_id' => $key->ro_id);\n\t\t\t\t\t\n\t\t\t\t\t$val = array('user_id' => $k->user_id, 'college_id' => 7916, 'user_recruit' => 1, 'college_recruit' => 0, \n\t\t\t\t\t\t\t\t 'status' => 1, 'type' => 'manual_recommendations', 'email_sent' => 1, 'ro_id' => $key->ro_id);\n\t\t\t\t\t\n\t\t\t\t\t$rec = Recruitment::updateOrCreate($attr, $val);\n\t\t\t\t\t$rec_id = $rec->id;\n\t\t\t\t}else{\n\t\t\t\t\t$arr = array('email_sent' => 1, 'user_recruit' => 0, 'college_recruit' => 0, \n\t\t\t\t \t\t\t\t 'ro_id' => $key->ro_id, 'status' => 1);\n\t\t\t\t\tif (!(strpos($rec_qry->type, 'manual_recommendations') !== true)) {\n\t\t\t\t\t\t$arr['type'] = DB::raw(\"CONCAT(type, ' manual_recommendations')\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tRecruitment::where('id', $rec_qry->id)\n\t \t\t\t\t\t\t\t\t\t ->update($arr);\n\t \t\t\t\t$rec_id = $rec_qry->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$attr = array('user_id' => $k->user_id, 'college_id' => 7916, 'org_portal_id' => $key->portal_id);\n\t\t\t\t$val = array('user_id' => $k->user_id, 'college_id' => 7916, 'org_portal_id' => $key->portal_id);\n\t\t\t\tRecruitmentTag::updateOrCreate($attr, $val);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$attr = array('rec_id' => $rec_id, 'ro_id' => $key->ro_id);\n\t\t\t\t$val = array('rec_id' => $rec_id, 'ro_id' => $key->ro_id);\n\n\t\t\t\tRecruitmentRevenueOrgRelation::updateOrCreate($attr, $val);\n\t\t\t\t\n\t\t\t\t$pu_qry = PrescreenedUser::where('user_id', $k->user_id)\n\t\t\t\t\t\t\t\t\t\t ->where('college_id', 7916)\n\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_id')\n\t\t\t\t\t\t\t\t\t\t ->whereNull('org_portal_id')\n\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_portal_id')\n\t\t\t\t\t\t\t\t\t\t ->delete();\n\t\t\t\t\n\t\t\t\t$rva_qry = RecruitmentVerifiedApp::where('user_id', $k->user_id)\n\t\t\t\t\t\t\t\t\t\t ->where('college_id', 7916)\n\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_id')\n\t\t\t\t\t\t\t\t\t\t ->whereNull('org_portal_id')\n\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_portal_id')\n\t\t\t\t\t\t\t\t\t\t ->delete();\n\n\t\t\t\t$rvh_qry = RecruitmentVerifiedHS::where('user_id', $k->user_id)\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('college_id', 7916)\n\t\t\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_id')\n\t\t\t\t\t\t\t\t\t\t\t\t ->whereNull('org_portal_id')\n\t\t\t\t\t\t\t\t\t\t\t\t ->whereNull('aor_portal_id')\n\t\t\t\t\t\t\t\t\t\t\t\t ->delete();\n\t\t\t}\n\n\t\t\t$cnt++;\n \t}\n \n \treturn \"Number of revenue_organizations recommendation added: \". $cnt;\n }", "public function postAdditem(Request $req){\n if($req->ajax()):\n $item = data_barang::find($req->id);\n $new = [\n [\n 'kode' => $item->kode,\n 'id_barang' => $item->id_barang,\n 'nm_barang' => $item->nm_barang,\n 'sisa' => ($item->in - $item->out),\n 'tipe' => $item->tipe\n ]\n ];\n $items = [];\n $find = false;\n if(!empty($req->session()->get($this->MySession))){\n foreach($req->session()->get($this->MySession) as $val){\n if($val['id_barang'] == $req->id){\n $items[] = [\n 'kode' => $val['kode'],\n 'id_barang' => $val['id_barang'],\n 'nm_barang' => $val['nm_barang'],\n 'sisa' => $val['sisa'],\n 'tipe' => $val['tipe']\n ];\n $find = true;\n }else{\n $items[] = [\n 'kode' => $val['kode'],\n 'id_barang' => $val['id_barang'],\n 'nm_barang' => $val['nm_barang'],\n 'sisa' => $val['sisa'],\n 'tipe' => $val['tipe']\n ];\n }\n }\n }\n if($find)\n $value = $items;\n else\n $value = array_merge($new, $items);\n\n $req->session()->put($this->MySession, $value);\n\n return json_encode([\n 'id' => $req->id\n ]);\n endif;\n }", "public function addToMineList(Request $request)\n {\n //TODO if we add supervisor created by psychology need add check in mine_supervision_list_psychology !\n $result = DB::table('mine_supervision_list')->where('userId', '=', \\Auth::user()->id)->where('supervision_id', '=', $request->supervisionsId)->get();\n if ($result->isEmpty()) {\n DB::table('mine_supervision_list')->insert(['userId' => \\Auth::user()->id, 'supervision_id' => $request->supervisionsId, 'created_at' => \\Carbon\\Carbon::now()]);\n return (new \\Illuminate\\Http\\Response)->setStatusCode(200, 'Supervison successfuly added.');\n }\n return (new \\Illuminate\\Http\\Response)->setStatusCode(409, 'Supervison already in list.');\n }", "public function loadftvchrequestsAction()\n {\n // $broadcast_array=$this->_arrayDb->loadArrayv2(\"EP_BROADCASTS\", $this->_lang);\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcomments_obj = new Ep_Ftv_FtvComments();\n $ftvdocuments_obj = new Ep_Ftv_FtvDocuments();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n $loginuser = $this->adminLogin->userId;\n $contacts = $ftvcontacts_obj->getRequestCreatedContacts(); // print_r($contacts); exit;\n $this->_view->contacts_array = $contacts;\n if($loginuser != '110823103540627')\n $aColumns = array( 'first_name', 'created_at', 'request_object','download','duration','modify_contains','modify_broadcast','demand','status','comments','time_spent','identifier');\n else\n $aColumns = array( 'first_name', 'created_at', 'request_object','download','duration','modify_contains','modify_broadcast','demand','assingnation','status','comments','time_spent','identifier');\n /* * Paging\t */\n $sLimit = \"\";\n $broadcast_sort_flag = true;\n $broadcast_sort = \"\";\n $to_sort = \"\";\n if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n {\n $sLimit = \"LIMIT \".intval( $_GET['iDisplayStart'] ).\", \".\n intval( $_GET['iDisplayLength'] );\n }\n /* \t * Ordering \t */\n $col_array = array('request_object','download','duration','modify_contains', 'modify_broadcast','demand','assingnation','status','comments','time_spent');\n $sOrder = \"\";\n // echo $_GET['iSortCol_0']. \"----\".intval( $_GET['iSortingCols'] );\n if ( isset( $_GET['iSortCol_0'] ) )\n {\n $sOrder = \"ORDER BY \";\n for ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n {\n if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n {\n $sOrder .= $aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n if($aColumns[ intval( $_GET['iSortCol_'.$i] ) ] === 'modify_broadcast'){\n $to_sort = 'modify_broadcast';\n $broadcast_sort_flag = true;\n $broadcast_sort = ($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc');\n }\n else if($aColumns[ intval( $_GET['iSortCol_'.$i] ) ] === 'duration'){\n $to_sort = 'duration';\n $broadcast_sort_flag = true;\n $broadcast_sort = ($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc');\n }\n else if($aColumns[ intval( $_GET['iSortCol_'.$i] ) ] === 'modify_contains'){\n $to_sort = 'modify_contains';\n $broadcast_sort_flag = true;\n $broadcast_sort = ($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc');\n }\n }\n }\n $sOrder = substr_replace( $sOrder, \"\", -2 );\n if ( $sOrder == \"ORDER BY\" )\n {\n $sOrder = \"\";\n }\n }\n $sWhere = \"\";\n if ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n {\n $sWhere = \" HAVING (\";\n for ( $i=0 ; $i<3 ; $i++ )//only first 3 fields will return proper values rest will return xml saved values\n {\n $keyword=addslashes($_GET['sSearch']);\n $keyword = preg_replace('/\\s*$/','',$keyword);\n $keyword=preg_replace('/\\(|\\)/','',$keyword);\n $words=explode(\" \",$keyword);\n $sWhere.=$aColumns[$i].\" like '%\".utf8_decode($keyword).\"%' OR \";\n }\n $sWhere = substr_replace( $sWhere, \"\", -3 );\n $sWhere .= ')';\n }\n /* Individual column filtering */\n for ( $i=0 ; $i<count($aColumns) ; $i++ )\n {\n if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n {\n if ( $sWhere == \"\" )\n {\n $sWhere = \" WHERE \";\n }\n else\n {\n $sWhere .= \" AND \";\n }\n $sWhere .= \"`\".$aColumns[$i].\"` LIKE '%\".$_GET['sSearch_'.$i].\"%' \";\n }\n }\n if($loginuser != \"\")\n {\n $ftv_params=$this->_request->getParams();\n if($ftv_params['search'] == 'search')\n { //echo \"mash\"; exit;\n $condition['search'] = $ftv_params['search'];\n $condition['contactId'] = $ftv_params['contactId'];\n $condition['containsId'] = $ftv_params['containsId'];\n $condition['broadcastId'] = $ftv_params['broadcastId'];\n $condition['quandId'] = $ftv_params['quandId'];\n $condition['startdate'] = $ftv_params['startdate'];\n $condition['enddate'] = $ftv_params['enddate'];\n $condition['dayrange'] = $ftv_params['dayrange'];\n }\n\n $requestsdetail=$ftvrequest_obj->getAllChaineRequestsDetails($sWhere, $sOrder, $sLimit, $condition);\n //contains to modify\n\n $contains_array = array(1=>\"Unes tournantes\", 2=>\"Voir et Revoir\", 3=>\"Les &eacute;missions\", 4=>\"A d&eacute;couvrir\",5=>\"Les jeux\",\n 6=>\"Une\", 7=>\"Top 3\", 8=>\"Forums\", 9=>\"PAGE VIDEOS\", 10=>\"PAGES DOCUMENTAIRES\", 11=>\"PAGES FRANCE 5 & VOUS\", 12=>\"PAGES INFOS\");\n $duraiton_array = array(\"h\"=>\"Dans l'heure\", \"d\"=>\"Dans la journ&eacute;e\",\"nd\"=>\"Le lendemain\", \"w\"=>\"Dans la semaine\",\"nw\"=>\"La semaine prochaine\");\n $this->_view->contains_array = $contains_array;\n $this->_view->quands_array = $duraiton_array;\n $broadcast_array = array(\"1\"=>'France 2', \"2\"=>'France 3', \"3\"=>'France 4',\"4\"=>'France 5',\"5\"=>'France &Ocirc;' ,\"6\"=>'France TV');\n $demand_array = array(\"1\"=>'Int&eacute;gration', \"2\"=>'Modification demand&eacute;e par FTV', \"3\"=>'Correction erreur EP', \"4\"=>'Retours');\n $this->_view->broadcast_array = $broadcast_array;\n $this->_view->demand_array = $demand_array;\n // print_r($requestsdetail); exit;\n if($requestsdetail != 'NO')\n {\n $gtdays = '';$gthours = ''; $gtminutes = '';$gtdiff='';\n foreach ($requestsdetail as $key => $value)\n {\n\n $inpause = $ftvpausetime_obj->inPause($requestsdetail[$key]['identifier']);\n $requestsdetail[$key]['inpause'] = $inpause;\n\n $durationvalue = $duraiton_array[$requestsdetail[$key]['duration']];\n $requestsdetail[$key]['duration'] = $durationvalue;\n $requestsdetail[$key]['demand'] = $demand_array[$requestsdetail[$key]['demand']];\n /////getting modify contains display format///\n $contains = explode(\",\",$requestsdetail[$key]['modify_contains']);\n $finalcontains = array();\n foreach($contains as $code1 => $abb1)\n {\n $finalcontains[$code1] = $contains_array[$abb1];\n }\n $containvalue = implode(\" / \",$finalcontains);\n $requestsdetail[$key]['modify_contains'] = $containvalue;\n ////getting modify broadcast display format//\n $braodcast = explode(\",\",$requestsdetail[$key]['modify_broadcast']);\n $finalbroadcast = array();\n foreach($braodcast as $broadkey => $broadval)\n {\n $finalbroadcast[$broadkey] = $broadcast_array[$broadval];\n }\n $broadvalue = implode(\" / \",$finalbroadcast);\n $requestsdetail[$key]['modify_broadcast'] = $broadvalue;\n\n ////gettting recent comments ny BO user ////\n $commentDetails=$ftvcomments_obj->getRecentCommentsByBoUser($requestsdetail[$key]['identifier']);\n if($commentDetails != 'NO')\n $requestsdetail[$key]['comments'] = $commentDetails[0]['comments'];\n else\n $requestsdetail[$key]['comments'] = \"NILL\";\n ////gettting recent document BO user ////\n $documentDetails=$ftvdocuments_obj->getRecentDocument($requestsdetail[$key]['identifier']);\n if($documentDetails != 'NO')\n $requestsdetail[$key]['recent_document'] = $documentDetails[0]['document'];\n else\n $requestsdetail[$key]['recent_document'] = \"NILL\";\n //////color differentiation//////\n $requestsdetail[$key]['created_at'];\n $t=date('d-m-Y H:i', strtotime($requestsdetail[$key]['created_at']));\n $dayandtime = explode(\"-\", date(\"N-G-i\",strtotime($t)));//echo $requestsdetail[$key]['request_object'];print_r($dayandtime);\n $day = $dayandtime[0];\n $hour = $dayandtime[1];\n $minute = $dayandtime[2];\n $reddays = array(1,2,3,4); ///monday to thursday\n $bluedays = array(5,6,7); //friday to sunday\n\n if($hour >= 19 || $hour < 9)\n {\n if(in_array($day, $reddays))\n $requestsdetail[$key]['dayrange']=\"red\";\n else\n $requestsdetail[$key]['dayrange']=\"green\";\n }\n $ptimes = $ftvpausetime_obj->getPauseDuration($requestsdetail[$key]['identifier']);\n $assigntime = $requestsdetail[$key]['assigned_at'];\n\n if(($requestsdetail[$key]['status'] == 'done' || $inpause == 'yes') && ($requestsdetail[$key]['assigned_at'] != null && $requestsdetail[$key]['assigned_to'] != null))\n {\n if($requestsdetail[$key]['assigned_at'] != NULL)\n {\n if($requestsdetail[$key]['status'] == \"closed\")\n $time1 = ($requestsdetail[$key]['cancelled_at']); /// created time\n elseif ($requestsdetail[$key]['status'] == \"done\")\n $time1 = ($requestsdetail[$key]['closed_at']); /// created time\n else{\n if($inpause == 'yes') {\n $time1 = ($requestsdetail[$key]['pause_at']);\n }else {\n $time1 = (date('Y-m-d H:i:s'));///curent time\n }\n }\n\n // $totaltime2 = strtotime($requestsdetail[$key]['assigned_at']);\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestsdetail[$key]['identifier']);\n if($pausedrequests == 'yes')\n {\n $time2 = $this->subDiffFromDate($requestsdetail[$key]['identifier'], $requestsdetail[$key]['assigned_at']);\n }else{\n $time2 = $requestsdetail[$key]['assigned_at'];\n }\n $totaldiff = strtotime($time1) - strtotime($time2);\n\n $timestamp = new DateTime($time1);\n $diff = $timestamp->diff(new DateTime($time2));\n $days = $diff->format('%d');\n $hours = $diff->format('%h');\n $minutes = $diff->format('%i');\n $seconds = $diff->format('%s');\n $gtdiff+=$totaldiff;\n $difference = '';\n\n if($days != '')\n $difference.= \"<span class='label label-info' >\".$days.\"J </span> \";\n if($hours != '')\n $difference.= \"<span class='label label-info' >\".$hours.\"H </span> \";\n if($minutes != '')\n $difference.= \"<span class='label label-info' >\".$minutes.\"M </span> \";\n if($seconds != '')\n $difference.= \"<span class='label label-info' >\".$seconds.\"S </span> \";\n\n $requestsdetail[$key]['time_spent'] = $difference;\n }\n else\n $requestsdetail[$key]['time_spent'] = \"-NA-\";\n }\n else\n $requestsdetail[$key]['time_spent'] = \"-NA-\";\n $pausedrequests = $ftvpausetime_obj->pausedRequest($requestsdetail[$key]['identifier']);\n if($pausedrequests == 'yes')\n {\n $requestsdetail[$key]['assigned_at'] = $this->subDiffFromDate($requestsdetail[$key]['identifier'], $requestsdetail[$key]['assigned_at']);\n\n }else{\n $requestsdetail[$key]['assigned_at'] = $requestsdetail[$key]['assigned_at'];\n }\n ////subtracting 30 sec because adding 30 secs added by javascipt ///\n $minus30sec=new DateTime($requestsdetail[$key]['assigned_at']);\n $minus30sec->add(new DateInterval(\"PT35S\"));\n $requestsdetail[$key]['assigned_at'] = $minus30sec->format('Y-m-d H:i:s');\n }\n // print_r($ptimes);\n $d = floor($gtdiff/86400);\n $gtdays = ($d < 10 ? '0' : '').$d;\n\n $h = floor(($gtdiff-$d*86400)/3600);\n $gthours = ($h < 10 ? '0' : '').$h;\n\n $m = floor(($gtdiff-($d*86400+$h*3600))/60);\n $gtminutes = ($m < 10 ? '0' : '').$m;\n\n $gtdifference = '';\n if($gtdays != '')\n $gtdifference.= \"\".$gtdays.\"J \";\n if($gthours != '')\n $gtdifference.= \"\".$gthours.\"H \";\n if($gtminutes != '')\n $gtdifference.= \"\".$gtminutes.\"M \";\n $this->_view->globaltime = $gtdifference;\n }\n $rResultcount = count($requestsdetail);\n /////total count\n $sLimit = \"\";\n $countaos = $ftvrequest_obj->getAllChaineRequestsDetails($sWhere, $sOrder, $sLimit, $condition);\n // print_r($countaos);exit;\n $iTotal = count($countaos);\n\n $output = array(\n \"sEcho\" => intval($_GET['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iTotal,\n \"aaData\" => array()\n );\n $assguser_arr = array(141027195819796=>'Fanny',141027200051263=>'Djawed',130122131303109=>'Jgimenez',111017113015710=>'editor1',140655136475464=>'prashanth',110823103540627=>'Farid');\n $statrow_arr = array('pending'=>'En attente','done'=>'Trait&eacute;e','closed'=>'Annul&eacute;e');\n $count = 1;\n if($broadcast_sort_flag && $broadcast_sort === 'asc')//only if falg is set to true call this sorting function (only for broadcast array)\n usort($requestsdetail, $this->build_sorter_asc($to_sort));\n else if($broadcast_sort_flag && $broadcast_sort === 'desc')\n usort($requestsdetail, $this->build_sorter_desc($to_sort));\n //for($i = 0; $i<count($requestsdetail) ; $i++)\n // echo $requestsdetail[$i]['modify_broadcast'].\"<br />\";\n //exit;\n if($requestsdetail != 'NO')\n {\n for( $i=0 ; $i<$rResultcount; $i++)\n {\n $row = array();\n for ( $j=0 ; $j<count($aColumns) ; $j++ )\n {\n //if($j == 0)\n // $row[] = $count;\n //else\n {\n if($aColumns[$j] == 'first_name')\n $row[] = $requestsdetail[$i]['first_name'];\n elseif($aColumns[$j] == 'created_at')\n $row[] = date(\"Y-m-d\", strtotime($requestsdetail[$i]['created_at']));\n elseif($aColumns[$j] == 'request_object')\n $row[] = '<a data-target=\"#chaineeditrequest\" data-refresh=\"true\" data-toggle=\"modal\" href=\"/ftvchaine/duplicaterequest?request_id='.$requestsdetail[$i][\"identifier\"].'&edit=yes\" class=\"hint--bottom hint--info\" data-placement=\"right\" data-original-title=\"Object\" data-html=\"true\"\n data-hint=\"'.utf8_encode($requestsdetail[$i]['request_object']).'\">'.utf8_encode($requestsdetail[$i]['request_object']).'</a>';\n elseif($aColumns[$j] == 'download'){\n $download = '<a class=\"hint--bottom hint--info\" data-target=\"#fileupload\" data-refresh=\"true\" data-toggle=\"modal\" data-hint=\"upload file\" role=\"button\" href=\"/ftvchaine/uploadfiles?request_id='.$requestsdetail[$i][\"identifier\"].'&view=yes\">\n <i class=\"splashy-document_small_upload\"></i></a>';\n $checkRecentDocument = $ftvdocuments_obj->checkRecentDocument($requestsdetail[$i][\"identifier\"]);\n $serverpath = '/home/sites/site5/web/FO/ftv_documents/';\n if($requestsdetail[$i][\"recent_document\"] != '' && file_exists($serverpath.$checkRecentDocument[0]['document']))\n $download .= '<a class=\"hint--bottom hint--info\" data-hint=\"download latest file\" role=\"button\" href=\"/ftvchaine/downloadftv?request_id='.$requestsdetail[$i][\"identifier\"].'&filename='.$requestsdetail[$i][\"recent_document\"].'\">\n <i class=\"splashy-document_small_download\"></i></a>';\n $row[] = $download;\n }\n elseif($aColumns[$j] == 'duration')\n $row[] = $requestsdetail[$i]['duration'];\n elseif($aColumns[$j] == 'modify_contains')\n $row[] = $requestsdetail[$i]['modify_contains'];\n elseif($aColumns[$j] == 'modify_broadcast')\n $row[] = $requestsdetail[$i]['modify_broadcast'];\n elseif($aColumns[$j] == 'demand')\n $row[] = $requestsdetail[$i]['demand'];\n\n elseif($aColumns[$j] == 'assingnation') {\n $assrow = '<select class=\"bouserasgn span12\" data-placeholder=\"Assignation\" name=\"bouserasgn_' . $requestsdetail[$i]['identifier'] . '\" id=\"bouserasgn_' . $requestsdetail[$i]['identifier'] . '\" onchange=\"assignUser(' . $requestsdetail[$i]['identifier'] . ');\">\n <option value=\"\" >Assign </option>';\n foreach ($assguser_arr as $ky => $vl) {\n if ($requestsdetail[$i][\"assigned_to\"] == $ky)\n $assrow .= '<option value=\"'.$ky.'\" selected>'.$vl.'</option>';\n else\n $assrow .= '<option value=\"'.$ky.'\" >'.$vl.'</option>';\n }\n $assrow .= '</select>';\n $row[] = $assrow;\n }\n elseif($aColumns[$j] == 'status') {\n $statrow = '<select class=\"status\" style=\"width: 130px;\" data-placeholder=\"status\" name=\"status_{$requestsitem.identifier}\" id=\"status_' . $requestsdetail[$i]['identifier'] . '\" onchange=\"changeStatus(' . $requestsdetail[$i]['identifier'] . ');\">\n <option value=\"0\" >select</option>';\n foreach ($statrow_arr as $sky => $svl) {\n if ($requestsdetail[$i][\"status\"] == $sky)\n $statrow .= '<option value=\"'.$sky.'\" selected >'.$svl.'</option>';\n else\n $statrow .= '<option value=\"'.$sky.'\" >'.$svl.'</option>';\n }\n $statrow .= '</select>';\n $row[] = $statrow;\n }\n elseif($aColumns[$j] == 'comments') {\n $row[] = '<a class=\"hint--bottom hint--info\" data-hint=\"Add Comment\" data-target=\"#addcomment\" data-refresh=\"true\" data-toggle=\"modal\" role=\"button\" href=\"/ftvchaine/showcomments?request_id=' . $requestsdetail[$i]['identifier'] . '\">\n <i class=\"splashy-comments_reply\"></i></a>';\n if ($this->loginuserId == '110823103540627')\n $row[] .= '<a type=\"button\" class=\"hint--bottom hint--info\" data-hint=\"Delete request\" id=\"deleterequest\" name=\"deleterequest\" onClick=\"deleteRequest('.$requestsdetail[$i]['identifier'].');\"><i class=\"splashy-calendar_week_remove\"></i></a>';\n }elseif($aColumns[$j] == 'time_spent')\n {\n $rowdetail = '<input type=\"hidden\" id=\"time' . $requestsdetail[$i]['identifier'] . '\" value=\"' . $requestsdetail[$i]['assigned_to'] . '\"/>';\n if ($requestsdetail[$i]['assigned_to'] != '' && $requestsdetail[$i]['status'] != 'closed') {\n if ($requestsdetail[$i]['status'] == 'pending' && $requestsdetail[$i]['inpause'] == 'no') {\n $rowdetail.= '<div class=\"timer\" id=\"time_'.$requestsdetail[$i][\"identifier\"].'_'.$requestsdetail[$i][\"assigned_at\"].'\" onClick=\"extendTime('.$requestsdetail[$i][\"identifier\"].')\">\n <span class=\"label label-info\" id=\"days_'.$requestsdetail[$i]['identifier'].'\"></span>\n <span class=\"label label-info\" id=\"hours_'.$requestsdetail[$i]['identifier'].'\"></span>\n <span class=\"label label-info\" id=\"minutes_'.$requestsdetail[$i]['identifier'].'\"></span>\n <span class=\"label label-info\" id=\"seconds_'.$requestsdetail[$i]['identifier'].'\"></span>\n </div>\n <button class=\"btn btn-warning\" type=\"button\" id=\"pausetime' . $requestsdetail[$i]['identifier'] . '\" name=\"pausetime\" onClick=\"pauseTime(\\'pause\\',' . $requestsdetail[$i]['identifier'] . ');\" >Pause</button>';\n } elseif ($requestsdetail[$i]['status'] == 'pending' && $requestsdetail[$i]['inpause'] == 'yes') {\n $rowdetail.= '\"' . $requestsdetail[$i]['time_spent'] . '\n <button class=\"btn btn-warning\" type=\"button\" id=\"resumetime' . $requestsdetail[$i]['identifier'] . '\" name=\"resumetime\" onClick=\"pauseTime(\\'resume\\',' . $requestsdetail[$i]['identifier'] . ');\" >Resume</button>';\n } else\n $rowdetail.= '\"' . $requestsdetail[$i]['time_spent'] . '\"';\n if ($requestsdetail[$i]['status'] != 'closed') {\n $rowdetail.= '<a class=\"hint--bottom hint--waring\" data-hint=\"edit time\" data-toggle=\"modal\" data-target=\"#editassigntime\" href=\"/ftvchaine/editassigntime?requestId=' . $requestsdetail[$i]['identifier'] . '\"><i class=\"icon-time\"></i> </a>';\n }\n\n } else\n $rowdetail .= '-NA-';\n\n $row[] = $rowdetail;\n }\n else\n $row[] = $requestsdetail[$i][ $aColumns[$j] ];\n\n }\n }\n $output['aaData'][] = $row;\n $count++;\n }\n }\n // print_r($output);\n echo json_encode( $output );\n }\n }", "public function testPostAuthorizationSubjectBulkadd()\n {\n }", "public function Add(){\n $insert =[\n 'RankNo'=>32132,\n 'UserName'=>$UserName,\n 'NickName'=>123,\n 'MoneyNum'=>32131,\n 'Signature'=>32132131,\n 'WeChatID'=>3213123,\n 'Status'=>$Status,\n 'head_img'=>$head_img\n ];\n return $this->insert($insert);\n }", "public function postAddItems()\n\t{\n\t\tif (!$this->request->ajax()) { return $this->ajaxErrorResponse(); }\n\n\t\t// Get the properties that will be applied to the items.\n\t\t$properties = [\n\t\t\t'buyRaw' => $this->request->input('buyRaw' ) ? true : false,\n\t\t\t'buyRecycled' => $this->request->input('buyRecycled' ) ? true : false,\n\t\t\t'buyRefined' => $this->request->input('buyRefined' ) ? true : false,\n\t\t\t'buyModifier' => $this->request->input('buyModifier' ) ? : 0.00,\n\t\t\t'sell' => $this->request->input('sell' ) ? true : false,\n\t\t\t'sellModifier' => $this->request->input('sellModifier') ? : 0.00,\n\t\t\t'lockPrices' => $this->request->input('lockPrices' ) ? true : false,\n\t\t\t'source' => $this->request->input('source' ) ? : \"Jita\",\n\t\t\t'buyPrice' => 0.00,\n\t\t\t'sellPrice' => 0.00,\n\t\t];\n\n\t\t$properties['buyModifier'] = is_numeric($properties['buyModifier'])\n\t\t\t? (double)$properties['buyModifier' ] : 0.00;\n\n\t\t$properties['sellModifier'] = is_numeric($properties['sellModifier'])\n\t\t\t? (double)$properties['sellModifier'] : 0.00;\n\n\t\t// Get the types being added.\n\t\t$ids = $this->request->input('types') ?: [];\n\t\t$types = $this->type_model->whereIn('typeID', $ids)->get();\n\n\t\t// Get the types being added from a group.\n\t\t$ids = $this->request->input('groups') ?: [];\n\t\t$groups = $this->group_model->with('types')->whereIn('groupID', $ids)->get();\n\t\t$groups->each(function ($group) use (&$types) {\n\t\t\t$group->types->each(function ($type) use (&$types) {\n\t\t\t\t$types->push($type);\n\t\t\t});\n\t\t});\n\n\t\t// Get the types being added from a category.\n\t\t$ids = $this->request->input('categories') ?: [];\n\t\t$categories = $this->category_model->with('types')->whereIn('categoryID', $ids)->get();\n\t\t$categories->each(function ($category) use (&$types) {\n\t\t\t$category->types->each(function ($type) use (&$types) {\n\t\t\t\t$types->push($type);\n\t\t\t});\n\t\t});\n\n\t\t// Remove any duplicate types.\n\t\t$types = $types->unique('typeID');\n\n\t\ttry {\n\t\t\tif ($types->count() == 0) {\n\t\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\t\ttrans('buyback.messages.add_items_nothing', $items->count()));\n\t\t\t}\n\n\t\t\tDB::transaction(function () use ($types, $properties) {\n\t\t\t\t$types->each(function ($type) use($properties) {\n\t\t\t\t\t// Ignore items that already exist.\n\t\t\t\t\tif (($item = $this->item_model->find($type->typeID))) { return; };\n\n\t\t\t\t\t// Add the type to the database as an item.\n\t\t\t\t\t$this->item_model->create([\n\t\t\t\t\t\t'typeID' => $type->typeID,\n\t\t\t\t\t\t'typeName' => $type->typeName,\n\t\t\t\t\t\t'buyRaw' => $properties['buyRaw' ],\n\t\t\t\t\t\t'buyRecycled' => $properties['buyRecycled' ],\n\t\t\t\t\t\t'buyRefined' => $properties['buyRefined' ],\n\t\t\t\t\t\t'buyModifier' => $properties['buyModifier' ],\n\t\t\t\t\t\t'buyPrice' => $properties['buyPrice' ],\n\t\t\t\t\t\t'sell' => $properties['sell' ],\n\t\t\t\t\t\t'sellModifier' => $properties['sellModifier'],\n\t\t\t\t\t\t'lockPrices' => $properties['lockPrices' ],\n\t\t\t\t\t\t'sellPrice' => $properties['sellPrice' ],\n\t\t\t\t\t\t'source' => $properties['source' ],\n\t\t\t\t\t]);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn $this->ajaxSuccessResponse(\n\t\t\t\ttrans_choice('buyback.messages.add_items_success', $types->count() == 1 ? 1 : 2));\n\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\ttrans_choice('buyback.messages.add_items_failure', $types->count() == 1 ? 1 : 2));\n\t\t}\n\t}", "public function mass_add()\n {\n }", "public function ajaxorderlistAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n \t\t$params = $this->getRequest()->getQuery()->toArray();\n\t\t\t$pagenum = $params['pagenum'];\n\t\t\t$limit = $params['pagesize'];\n\t\t\t$keyword = $params['keyword'];\n\t\t\t$cust_id = $params['cust_id'];\n\t\t\t\n\t\t\t$sortdatafield = $params['sortdatafield'];\n\t\t\t$sortorder = $params['sortorder'];\n\t\t\t\n\t\t\tsettype($limit, 'int');\n\t\t\t$offset = $pagenum * $limit;\n\t\t\t$orderTable = $this->getServiceLocator()->get('Order\\Model\\OrderTable');\n\t\t\tif(!empty($keyword)){\n\t\t\t\t$offset = 0;\n\t\t\t}\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\n\t\t\t//$xero = new \\Invoice\\Model\\Xero($sm);\n\t\t\t//$object = $xero->getAllInvoicesFromWebSerice();\n\t\t\t\n\t\t\t$ordersArr = $orderTable->fetchAll($limit, $offset, $keyword, $cust_id, $sortdatafield, $sortorder);\n\t\t\tforeach($ordersArr['Rows'] as $key => $value){\n\t\t\t\tforeach($value as $field => $fieldValue){\n\t\t\t\t\tif($field == 'created_date'){\n\t\t\t\t\t\t$ordersArr['Rows'][$key][$field] = date($config['phpDateFormat'], strtotime($ordersArr['Rows'][$key]['created_date']));\n\t\t\t\t\t}\n\t\t\t\t\tif(empty($fieldValue)){\n\t\t\t\t\t\t$ordersArr['Rows'][$key][$field] = '-';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($field == 'invoice_number'){\n\t\t\t\t\t\t$ordersArr['Rows'][$key]['invoice_number'] = $value['invoice_number'];\n\t\t\t\t\t\t$ordersArr['Rows'][$key]['xero_tax_rate'] = $value['xero_tax_rate'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($value['xero_date_due']!='0000-00-00 00:00:00')\n\t\t\t\t\t\t\t$ordersArr['Rows'][$key]['xero_date_due'] = date($config['phpDateFormat'], strtotime($value['xero_date_due']));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\t$ordersArr['Rows'][$key]['xero_date_due'] ='';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$ordersArr['Rows'][$key]['payment_made'] = $value['xero_payment_made'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$ordersArr['Rows'][$key]['value'] = $value['xero_total'];\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\tforeach($object->Invoices->Invoice as $invoice){\n\t\t\t\t\t\t\t$invoice = (array)$invoice;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($invoice['InvoiceNumber'] == $fieldValue){\n\t\t\t\t\t\t\t\t$ordersArr['Rows'][$key]['value'] = $invoice['Total'];\n\t\t\t\t\t\t\t\t$payment_made = !empty($invoice['AmountPaid']) ? number_format($invoice['AmountPaid'] * 100 / $invoice['Total'], 2) : $invoice['AmountPaid'];\n\t\t\t\t\t\t\t\t$ordersArr['Rows'][$key]['payment_made'] = $payment_made.'%';\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\techo json_encode($ordersArr);\n\t\t\texit;\t\t\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t} \n\t}", "public function addOrder(){\r\n $order = $_REQUEST['order']; \r\n $form = M(\"logininfo\"); \r\n $condition['ssid'] = $_COOKIE['iPlanetDirectoryPro'];\r\n $data_user = $form->where($condition)->find();\r\n $username = $data_user['name'];\r\n $dep = $data_user['dep'];\r\n $stuid = $data_user['username'];\r\n $form_user = M('userinfo');\r\n $condition_user['stuid'] = $stuid;\r\n $data_final = $form_user->where($condition_user)->find();\r\n if ($data_final) $dep = $data_final['dep'];\r\n $trade = \"\";\r\n for ($ii = 0;$ii < count($order);$ii++)\r\n {\r\n date_default_timezone_set(\"Asia/Shanghai\"); \r\n\t \t$ordertime = date('Y-m-d H:i:s');\r\n $checktime = date('Hi');\r\n // if (!(($checktime >= '0830' && $checktime<= '1030')||($checktime>='1400' && $checktime<='1630')))\r\n // {\r\n // //echo $checktime;\r\n // $data_error['error'] = \"对不起,现在不是订餐时间\";\r\n // $data_error = json_encode($data_error);\r\n // echo $data_error;\r\n // return;\r\n // } \r\n $new['trade_date'] = date('YmdHis');\r\n $search = date('Ymd'); \r\n //var_dump($search);\r\n $form_order = M(\"orderinfo\"); \r\n $condition = array(); \r\n $condition['number'] = array('like','%'.$search.'%'); \r\n\r\n $data_order = $form_order->where($condition)->select(); \r\n $jnl = (String)count($data_order)+1;\r\n $zero = '';\r\n for ($i = 0; $i < 6-strlen($jnl); $i++) $zero = $zero.'0';\r\n $jnl = $zero.$jnl;\r\n //var_dump($jnl); 计算订单号jnl\r\n $number[$ii] = $search.$jnl; \r\n\t \t$address = $order[$ii]['address'];\r\n\t \t$phone = $order[$ii]['phone'];\r\n\t \t$remark = $order[$ii]['remark'];\r\n\t \t$amount = $order[$ii]['amount'];\r\n $pay = $order[$ii]['pay'];\r\n $area = $order[$ii]['area'];\r\n\t \t$status = \"下单成功\";\r\n $id = $order[$ii]['id'];//食品的ID\r\n // var_dump($id);\r\n $condition = array(); \r\n $condition['id'] = $id;\r\n $form = M(\"foodinfo\");\r\n $data = array();\r\n $data = $form->where($condition)->find();\r\n // var_dump($data);\r\n if ($data['amount'] - $amount >=0)\r\n\t\t\t{\r\n\t\t\t\tif ($pay == '签单') $data['amount'] = $data['amount'] - $amount;\r\n\t\t\t}\r\n else \r\n {\r\n $data_error['error'] = \"对不起,套餐已经卖光啦,下次早点来吧!\";\r\n $data_error = json_encode($data_error);\r\n echo $data_error;\r\n return;\r\n }\r\n $form -> save($data); \r\n $addnew = array();\r\n $form = array();\r\n $addnew['food'] = $data['name'];\r\n //var_dump($data['name']);\r\n $addnew['price'] = $data['price']*$amount; \r\n\t\t\t$form = M('orderinfo'); \r\n $addnew['number'] = $number[$ii];\r\n\t\t\t$addnew['username'] = $username;\r\n $addnew['dep'] = $dep;\r\n $addnew['stuid'] = $stuid;\r\n\t\t\t$addnew['ordertime'] = $ordertime;\r\n\t\t\t$addnew['address'] = $address;\r\n\t\t\t$addnew['phone'] = $phone;\r\n\t\t\t$addnew['remark'] = \"\";//所有数据都不能留空!!!\r\n $addnew['pay'] = $pay;\r\n if ($addnew['pay'] == '签单') $addnew['pay_status'] = 1;\r\n else $addnew['pay_status'] = 0;\r\n\t\t\t$addnew['area'] = $area;\r\n\t\t\t$addnew['amount'] = $amount;\r\n\t\t\t$addnew['status'] = $status;\r\n // $trade = $trade.\"<trade><user_id>\".$stuid.\"</user_id><user_name>\".$username.\"</user_name><jnl>\".$number.\"</jnl><rec_acc>\".\"zjgkc\".\"</rec_acc><amt>\".$addnew['price'].\"</amt><trade_code></trade_code><comment>浙江大学订餐系统</comment><resv_col1></resv_col1><resv_col2></resv_col2><resv_col3></resv_col3><Msg></Msg></trade>\";\r\n //var_dump($addnew);\r\n\t\t\t$form->add($addnew); \r\n }\r\n if ($addnew['pay_status'] == 0)\r\n {\r\n $jnl = $number[0];\r\n $new['app_id'] = 'ZDYS';\r\n $new['user_name'] = $username;\r\n $new['user_id'] = $stuid;\r\n $new['trade_jnl'] = 'ys'.$jnl;\r\n $new['trade_mode'] = \"\";\r\n $total_amt = 0;$total_num = 0;\r\n $total_jnl = $number[0];\r\n for ($i = 0;$i<count($order);$i++)\r\n {\r\n $total_num = $total_num + 1;\r\n $id = $order[$i]['id'];//食品的ID\r\n $condition = array(); \r\n $condition['id'] = $id;\r\n $form_food = M(\"foodinfo\");\r\n $data_food = array();\r\n $data_food = $form_food->where($condition)->find();\r\n $total_amt = $total_amt + $order[$i]['amount']*$data_food['price'];\r\n if ($i != 0) $total_jnl = $total_jnl.','.(string)$number[$i]; \r\n }\r\n $form_jnl = M('jnlinfo');//添加订单对应关系\r\n $new_jnl['first'] = $number[0];\r\n $new_jnl['total'] = $total_jnl;\r\n $form_jnl -> add($new_jnl);\r\n $trade = \"<trade><user_id>\".$stuid.\"</user_id><user_name>\".$username.\"</user_name><jnl>\".$number[0].\"</jnl><rec_acc>\".\"zjgkc\".\"</rec_acc><amt>\".$total_amt.\"</amt><trade_code></trade_code><comment>浙江大学订餐系统</comment><resv_col1></resv_col1><resv_col2></resv_col2><resv_col3></resv_col3><Msg></Msg></trade>\";\r\n $new['trade_req'] = \"<trade_req><pay_acc></pay_acc><pay_acc_name></pay_acc_name><total_num>\".'1'.\"</total_num><total_amt>\".$total_amt.\"</total_amt><resv_col1></resv_col1><resv_col2></resv_col2><resv_col3></resv_col3><trades>\".$trade.\"</trades></trade_req>\";\r\n $new['res_mode'] = 'res_notify';\r\n $new['trade_chars'] = 'utf-8';\r\n $new['trade_type'] = 'pay';\r\n $new['sign_type']=\"md5\";\r\n $new['iPlanetDirectoryPro'] = urlencode($_COOKIE['iPlanetDirectoryPro']);\r\n $new['notify_url'] = \"http://10.203.2.68/fastfood/index.php/Pay/request\";\r\n $salt = \"synZDYS\";\r\n $sign = \"app_id=\".$new['app_id'].\"&user_id=\".$new['user_id'].\"&trade_jnl=\".$new['trade_jnl'].\"&trade_req=\".$new['trade_req'].\"&salt=\".$salt;\r\n $new['sign'] = strtoupper(md5($sign));\r\n $new = json_encode($new);\r\n echo $new;\r\n\r\n }\r\n }", "protected function start_bulk_operation(){\n\t\twpcom_vip_start_bulk_operation();\n\n\t}", "private function sendRequest($url,$total){\n $client = new Client();\n $requests = function ($total) use ($url){\n $uri = $url;\n for ($i = 0; $i < $total; $i++) {\n yield new Request('POST', $uri);\n }\n };\n $pool = new Pool($client, $requests($total), [\n 'concurrency' => 6,\n 'fulfilled' => function (Response $response, $index) {\n $this->info('Request number '.($index+1).' - Response: Successful request');\n },\n 'rejected' => function (RequestException $e, $index) {\n $this->comment('Request number '.($index+1).' - Response: The API:\"https://atomic.incfile.com/fakepost\" is not available now');\n },\n ]);\n $promise = $pool->promise();\n $promise->wait();\n }", "public function add(Request $request){\n foreach($request as $item) {\n\n try {\n\n $this->validate($item, UserTransactions::$rules);\n\n $usertransaction= new UserTransactions;\n $usertransaction->articles=$item->articles;\n $usertransaction->sales=$item->sales;\n $usertransaction->mcmid=$item->mcmid;\n $usertransaction->created_at=$item->created_at;\n $usertransaction->updated_at=$item->updated_at;\n\n $usertransaction->save();\n\n }catch(Exception $e){\n //log error??\n continue;\n }\n }\n\n }", "public function bhadd(){\n $this->autoRender = false;\n $this->BullhornConnection->BHConnect();\n $params = $this->request->data; \n if(!isset($params['candidate_id'])){\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Candidate id is required!\"\n ]\n );\n exit;\n }\n if(isset($params['skill_ids']) && is_array($params['skill_ids'])){\n //pr($params);\n $skills = implode(',', $params['skill_ids']);\n $skillSetUpdate = \"\";\n list($categories,$skillsL,$catSkills) = $this->split_cat_skill($params['existingSkillSet']);\n $isDuplicated = array_count_values($skillsL);\n if(isset($params['existingSkillSet']) && isset($params['skillSet'])){\n $skillArr = array_filter(explode(',',$params['existingSkillSet']));\n $getIndex = array_search($params['skillSet'],$skillArr);\n //pr($skillArr);\n //echo $params['skillSet'];\n if($getIndex == false){\n $skillArr[] = $params['skillSet'];\n }\n\n $skillSetUpdate = implode(',',$skillArr);\n if(!isset($isDuplicated[$params['skill_ids'][0]])){\n $url = $_SESSION['BH']['restURL'] . '/entity/Candidate/'.$params['candidate_id'].'/primarySkills/'.$skills.'?BhRestToken=' . $_SESSION['BH']['restToken'];\n\n $post_params = json_encode([]);\n $req_method = 'PUT';\n $response = $this->BullhornCurl->curlFunction($url, $post_params, $req_method);\n }\n }\n /* if(isset($response['errors'])){ // if adding skill returns any errors\n echo json_encode([\n 'status' => 0,\n 'message' => $response \n ]); \n exit; \n }else{ */\n // $skillIds = []; \n $url = $_SESSION['BH']['restURL'] . '/entity/Candidate/' . $params['candidate_id'] . '?BhRestToken=' . $_SESSION['BH']['restToken'];\n\n $post_params = json_encode([\n 'id' => $params['candidate_id'],\n 'skillSet' => $skillSetUpdate\n ]);\n $req_method = 'POST';\n $response = $this->BullhornCurl->curlFunction($url, $post_params, $req_method);\n if(isset($response['data'])){\n list($categories,$skills,$catSkills) = $this->split_cat_skill($response['data']['skillSet']);\n /* foreach($response['data']['primarySkills']['data'] as $skill){\n $skillIds[] = $skill['id'];\n }*/\n if(empty($catSkills)){\n $result = $this->getSkills($skills); // returns duplicate skills with different category\n }else{\n $result = $this->getSkills($skills,'skill_id',$catSkills);\n }\n echo json_encode(\n [\n 'status' => 1,\n 'data' => isset($result['data'])?$result['data']:[],\n 'existingSkillSet' => $response['data']['skillSet'],\n ]\n );\n exit;\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'data' => $response\n ]\n );\n exit;\n }\n //}\n\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"skill ids are required and also it need to be in array format!\"\n ]\n );\n exit;\n }\n }", "public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_at<INTERVAL -' . $day . ' DAY + \\'' . $now . '\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }", "public function add(...$items);", "public function actionAddtoplaylist() {\n // Response format data\n $result_array = array(\n 'result' => self::BadRequest,\n 'msg' => Yii::t('user', 'Request method illegal!'),\n );\n if (self::RETURN_CURRENT_PLAYING_AFTER_UPDATE) {\n $result_array['playing'] = array();\n }\n if (self::RETURN_LIST_AFTER_UPDATE) {\n $result_array['total'] = 0;\n $result_array['list'] = array();\n }\n // Check request type\n $request_type = Yii::app()->request->getRequestType();\n if ('POST' != $request_type) {\n $this->sendResults($result_array, self::BadRequest);\n }\n // Get post data\n $post_data = Yii::app()->request->getPost('PlayListAddRequest');\n if (empty($post_data)) {\n $post_data = file_get_contents(\"php://input\");\n }\n // log\n self::log('Playlist Add data: ' . print_r($post_data, TRUE), 'trace', $this->id);\n //Yii::trace(print_r($post_data, TRUE));\n // Decode post data\n $post_array = json_decode($post_data, true);\n $_songid = isset($post_array['songid']) ? $post_array['songid'] : '';\n $_offset = isset($post_array['offset']) ? intval($post_array['offset']) : 0;\n $_limit = isset($post_array['limit']) ? intval($post_array['limit']) : $this->playlist_maximum;\n $_offset = empty($_offset) ? 0 : intval($_offset);\n $_limit = empty($_limit) ? $this->playlist_maximum : intval($_limit);\n $_limit = ($_limit > $this->playlist_maximum) ? $this->playlist_maximum : $_limit;\n\n // Get room device\n //$_device = DeviceState::model()->findByAttributes(array('room_id' => $this->_roomID, 'status' => 0));\n $_device = Yii::app()->db->createCommand()\n ->select('ds.device_id')\n ->from('{{device_state}} ds')\n ->join('{{room}} r', 'ds.room_id = r.id')\n ->join('{{device}} d', 'ds.device_id = d.id')\n ->where('r.id=:id AND d.type=:type', array(':id' => $this->_roomID, ':type' => 1))\n ->queryRow();\n\n if (!is_null($_device) && !empty($_device)) {\n $_deviceid = $_device['device_id'];\n\n // Get media info\n $_media = Media::model()->findByAttributes(array('songid' => $_songid));\n // check uploaded list and update\n if (!is_null($_media) && !empty($_media)) {\n $insert_list = array();\n $_index_num = 101;\n // Get the max index number\n $_max_index_num = DevicePlaylist::model()->findBySql('select max(index_num) as index_num from {{device_playlist}} where device_id = :deviceid and status = :status', array(':deviceid' => $_deviceid, ':status' => 0));\n if (!is_null($_max_index_num) && !empty($_max_index_num)) {\n $_index_num = intval($_max_index_num->index_num) + 1;\n }\n $_status = 0;\n // Get user id\n if (isset(Yii::app()->user) && null !== Yii::app()->user) {\n $_user_id = Yii::app()->user->id;\n } else {\n $_user_id = 0;\n }\n $insert_list[] = array(\n 'device_id' => $_deviceid, 'media_id' => $_media->id, 'index_num' => $_index_num, 'status' => 0,\n 'create_time' => new CDbExpression('NOW()'),\n 'update_time' => new CDbExpression('NOW()'),\n 'create_user_id' => $_user_id,\n 'update_user_id' => $_user_id,\n );\n\n // TODO: batch import to device play list\n if (!empty($insert_list)) {\n $transaction = Yii::app()->db->beginTransaction();\n try {\n // then batch insert new list\n $result_num = DevicePlaylist::model()->insertSeveral($insert_list);\n\n $transaction->commit();\n\n // TODO: get the updated device play list\n $criteria = new CDbCriteria();\n $criteria->condition = 'status = :status and device_id = :deviceid';\n\n // get current playing song\n $has_playing = false;\n $criteria->params = array(':deviceid' => $_deviceid, ':status' => 1);\n $_playing = DevicePlaylist::model()->find($criteria);\n if (!is_null($_playing) && !empty($_playing)) {\n // get songid from media_id\n if (self::RETURN_CURRENT_PLAYING_AFTER_UPDATE) {\n $_media = $_playing->media;\n\n $_post_time = $_playing->play_posttime;\n $_timestamp = $_playing->play_timestamp;\n $_play_status = $_playing->play_status;\n $_play_status = empty($_play_status) ? 'PLAY' : $_play_status;\n $_media_duration = $_media->duration;\n\n // caculate the play time stamp\n $_play_timestamp = (time() - $_post_time) + $_timestamp;\n $_play_timestamp = ($_play_timestamp < 0) ? 0 : $_play_timestamp;\n $_play_timestamp = ($_play_timestamp > $_media_duration) ? $_media_duration : $_play_timestamp;\n\n // get user avatar information of song adder\n $_userinfo = $this->getUserInfo($_playing->create_user_id);\n\n $result_array['playing'] = array(\n 'songid' => $_media->songid,\n 'index_num' => intval($_playing->index_num),\n 'songname' => $_media->name,\n 'singername' => $_media->artist->name,\n 'duration' => intval($_media->duration),\n 'smallpicurl' => $this->getMediaPicUrl($_media, $_media->spic_url, 0),\n 'bigpicurl' => $this->getMediaPicUrl($_media, $_media->bpic_url),\n 'userid' => $_userinfo['uid'],\n 'nickname' => $_userinfo['nickname'],\n 'avatarurl' => $_userinfo['avatarurl'],\n 'status' => $_play_status,\n 'timestamp' => $_play_timestamp\n );\n }\n $has_playing = true;\n }\n\n // get play list\n $criteria->params = array(':deviceid' => $_deviceid, ':status' => 0);\n\n $_count = intval(DevicePlaylist::model()->count($criteria));\n\n $criteria->offset = $_offset;\n $criteria->limit = $_limit;\n $criteria->order = 'index_num asc';\n\n $play_list = DevicePlaylist::model()->findAll($criteria);\n if (!empty($play_list)) {\n // Get list success\n $result_array['result'] = self::Success;\n $result_array['msg'] = Yii::t('user', 'Add song to play list success and get the new list!');\n foreach ($play_list as $key => $_list) {\n $_media = $_list->media;\n // get user avatar information of song adder\n $_userinfo = $this->getUserInfo($_list->create_user_id);\n\n // set the first list as current playing list if needed\n if (!$has_playing && self::NEED_SETUP_CURRENT_PLAYING_WHEN_UPDATE) {\n if (self::RETURN_CURRENT_PLAYING_AFTER_UPDATE) {\n $result_array['playing'] = array(\n 'songid' => $_media->songid,\n 'index_num' => 0,\n 'songname' => $_media->name,\n 'singername' => $_media->artist->name,\n 'duration' => intval($_media->duration),\n 'smallpicurl' => $this->getMediaPicUrl($_media, $_media->spic_url, 0),\n 'bigpicurl' => $this->getMediaPicUrl($_media, $_media->bpic_url),\n 'userid' => $_userinfo['uid'],\n 'nickname' => $_userinfo['nickname'],\n 'avatarurl' => $_userinfo['avatarurl'],\n 'status' => 'PLAY',\n 'timestamp' => 0\n );\n }\n $has_playing = true;\n // update current playing list to status 1\n $_playing = DevicePlaylist::model()->findByAttributes(array('device_id' => $_deviceid, 'media_id' => $_media->id, 'index_num' => $_list->index_num));\n if (!is_null($_playing) && !empty($_playing)) {\n $_playing->index_num = 0;\n $_playing->status = 1;\n $_playing->save();\n }\n $_count--;\n\n continue;\n } else {\n if (!$has_playing && self::RETURN_CURRENT_PLAYING_AFTER_UPDATE) {\n $result_array['playing'] = array();\n }\n }\n\n if (self::RETURN_LIST_AFTER_UPDATE) {\n $result_array['list'][] = array(\n 'songid' => $_media->songid,\n 'index_num' => intval($_list->index_num),\n 'songname' => $_media->name,\n 'singername' => $_media->artist->name,\n 'duration' => intval($_media->duration),\n 'smallpicurl' => $this->getMediaPicUrl($_media, $_media->spic_url, 0),\n 'bigpicurl' => $this->getMediaPicUrl($_media, $_media->bpic_url),\n 'userid' => $_userinfo['uid'],\n 'nickname' => $_userinfo['nickname'],\n 'avatarurl' => $_userinfo['avatarurl'],\n );\n }\n }\n if (self::RETURN_LIST_AFTER_UPDATE) {\n $result_array['total'] = $_count;\n }\n\n $result_array['result'] = self::Success;\n $result_array['msg'] = Yii::t('user', 'Add song to play list success and get the new list!');\n } else {\n $result_array['result'] = self::Success;\n $result_array['msg'] = Yii::t('user', 'Add song to play list success, but can not get the new list!');\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n self::log($e->getMessage(), CLogger::LEVEL_ERROR, $this->id);\n $result_array['msg'] = Yii::t('user', 'Add song to play list failed!');\n }\n } else {\n $result_array['msg'] = Yii::t('user', 'No added song!');\n }\n } else {\n $result_array['msg'] = Yii::t('user', 'Added song does not exists!');\n }\n } else {\n $result_array['msg'] = Yii::t('user', 'Room STB invalid!');\n }\n\n // Set response information\n $this->sendResults($result_array);\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','ishot', 'title', 'img', 'price', 'hk_price', 'start_time', 'end_time', \n\t\t\t\t'stock_num', 'limit_num', 'sale_num', 'comment_num', 'status','descrip'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fj_Service_Goods::addGoods($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function addRequest(SQLRequest $req) {\n\t\t$this->_requests[] = $req;\n\t}", "public function createCustomCollection() {\n ini_set('max_execution_time', 0);\n\n return new JsonResponse(['status' => 'finish']);\n\n }", "public function sort()\n\t{\n\t\tif (app::is_ajax())\n\t\t{\n\t\t\tforeach($_POST as $key=>$val)\n\t\t\t{\n\t\t\t\tforeach($val as $position=>$id)\n\t\t\t\t{\n\t\t\t\t\t$this->rownd->update_position($id, $position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "abstract protected function pushList($userId);", "public function addTrackIntoQueue($request, $reponse) {\n $params = (array)json_decode($request->getBody());\n if(isset($params['tokenJukebox'])) {\n $jukebox = $this->jc->returnJukebox($params[\"tokenJukebox\"]);\n if ($jukebox != null) {\n $queue = $this->qc->returnActiveQueue($jukebox->idJukebox);\n if ($queue != null) {\n if (isset($params['idTrack']) && $this->tc->trackExist($params['idTrack'])) {\n if (isset($params['userTrack'])) {\n if($this->trackIsAlreadyInQueue($queue->idQueue,$params['idTrack'])) {\n $newTrackIntoQueue = new QueueContent();\n $newTrackIntoQueue->idQueue = $queue->idQueue;\n $newTrackIntoQueue->idTrack = $params[\"idTrack\"];\n $newTrackIntoQueue->positionTrack = $this->returnLengthQueue($queue->idQueue);\n $newTrackIntoQueue->userTrack = $params[\"userTrack\"];\n $newTrackIntoQueue->score = 0;\n $newTrackIntoQueue->status = \"not read\";\n $newTrackIntoQueue->save();\n return json_encode(array('success' => 'track insert into queue'));\n }else return json_encode(array('error' => 'track is already in queue'));\n } else return json_encode(array('error' => 'user unknown'));\n } else return json_encode(array('error' => 'track unknown'));\n } else return json_encode(array('error' => 'no queue'));\n } else return json_encode(array('error' => 'Jukebox unknown'));\n }else return json_encode(array('error' => 'Token Jukebox unknown'));\n }", "function getListupload($id){\r\n $page = Input::has('page') ? (int)Input::get('page') : 1;\r\n $itemPage = Input::has('item_page') ? (int)Input::get('item_page') : 20;\r\n $tab = Input::has('tab') ? trim(strtoupper(Input::get('tab'))) : 'ALL';\r\n $Type = Input::has('type') ? trim(strtoupper(Input::get('type'))) : 'journey';\r\n $CountryId = Input::has('country_id') ? (int)Input::get('country_id') : 237;\r\n $cmd = Input::has('cmd') ? trim(strtoupper(Input::get('cmd'))) : '';\r\n\r\n $ListModel = \\LMongo::collection('log_upload_change')->where('partner', $id)->where('country_id',$CountryId);\r\n\r\n if($tab != 'ALL'){\r\n if($tab == 'MISMATCH'){\r\n $ListModel = $ListModel->where('active',2);\r\n }else{\r\n $ListModel = $ListModel->where('status',$tab);\r\n }\r\n }\r\n\r\n if(!empty($cmd)){\r\n $Data = $ListModel->where('partner', $id)->get()->toArray();\r\n if($cmd == 'JOURNEY'){\r\n return $this->ExJourney($Data);\r\n }elseif($cmd == 'PROCESS'){\r\n return $this->ExProcess($Data);\r\n }elseif($cmd == 'WEIGHT'){\r\n return $this->ExWeight($Data);\r\n }elseif($cmd == 'STATUS'){\r\n return $this->ExStatus($Data);\r\n }elseif($cmd == 'ESTIMATE'){\r\n return $this->ExEstimate($Data);\r\n }elseif($cmd == 'ESTIMATE_PLUS'){\r\n return $this->ExEstimate($Data);\r\n }\r\n\r\n }\r\n\r\n $MotalNewTotal = clone $ListModel;\r\n $Total = $ListModel->count();\r\n $NewTotal = $MotalNewTotal->where('active',0)->count();\r\n\r\n if($itemPage != 'all'){\r\n $itemPage = (int)$itemPage;\r\n $offset = ($page - 1)*$itemPage;\r\n $ListModel = $ListModel->skip($offset)->take($itemPage);\r\n }\r\n\r\n $Data = $ListModel->orderBy('time_create','desc')->where('partner', $id)->get()->toArray();\r\n\r\n $contents = array(\r\n 'error' => false,\r\n 'data' => $Data,\r\n 'total' => $Total,\r\n 'new_total' => $NewTotal,\r\n 'message' => 'success'\r\n );\r\n\r\n return Response::json($contents);\r\n }", "public function addRecepientsToList(Request $request)\n\t{\n\t\t# code...\n\t\t$mgClient = new Mailgun(env('MAILGUN_SECRET'));\n\t\t$address = $request['address'];\n\t\t$member = $request['member'];\n//\t\t$member = substr($member, 1);\n\n\t\ttry {\n\t\t\t$mgClient->post(\"lists/$address/members\", array(\n\t\t\t\t'address' => $member,\n\t\t\t\t'suscribed' => true\n\t\t\t));\n\t\t\treturn ['status' => 'OK'];\n\t\t} catch (Exception $e) {\n\t\t\treturn ['status' => 'ERROR'];\n\t\t}\n\t}", "function requestToRecord() {\n global $admin;\n global $wb;\n if ($this->is_Frontend) {\n $worker = $wb; }\n else {\n $worker = $admin; }\n $this->record = array();\n for ($i=0;$i < count($this->dirListArray);$i++) {\n switch ($this->dirListArray[$i]):\n case 'last_modified':\n $this->record[$this->dirListArray[$i]] = time();\n break;\n case 'blank':\n if (isset($_REQUEST['blank'])) {\n $this->record[$this->dirListArray[$i]] = 1; }\n else {\n $this->record[$this->dirListArray[$i]] = 0; }\n break;\n default:\n $this->record[$this->dirListArray[$i]] = $worker->add_slashes(strip_tags($_REQUEST[$this->dirListArray[$i]]));\n endswitch;\n }\n }", "function basel_add_to_compare() {\n\n\t\t$id = sanitize_text_field( $_GET['id'] );\n\n\t\tif ( defined( 'ICL_SITEPRESS_VERSION' ) && function_exists( 'wpml_object_id_filter' ) ) {\n\t\t\tglobal $sitepress;\n\t\t\t$id = wpml_object_id_filter( $id, 'product', true, $sitepress->get_default_language() );\n\t\t}\n\n\t\t$cookie_name = basel_compare_cookie_name();\n\n\t\tif ( basel_is_product_in_compare( $id ) ) {\n\t\t\tbasel_compare_json_response();\n\t\t}\n\n\t\t$products = basel_get_compared_products();\n\n\t\t$products[] = $id;\n\n\t\tsetcookie( $cookie_name, json_encode( $products ), 0, COOKIEPATH, COOKIE_DOMAIN, false, false );\n\n\t\t$_COOKIE[ $cookie_name ] = json_encode( $products );\n\n\t\tbasel_compare_json_response();\n\t}", "function sendUList($uList) {\n $out = array();\n foreach ($uList as $uID => $uValue) {\n\t$out [$uID] = $uValue['info'];\n\t$out [$uID]['id'] = $uID;\n\tif (isset($uValue['params']))\n\t $out [$uID]['params'] = $uValue['params'];\n }\n return serialize($out);\n}", "function process_add()\r\n {\r\n include_once($this->_eqdkp->root_path.'plugins/'.$this->_pm->get_data('ctrt','path').'/admin/ctrt_common.php');\r\n\r\n $ignore_item = getWoWHeadItem ($_POST['item']);\r\n\r\n if (!$this->daoIgnoreItem->insert(array('items_wowid' => $ignore_item['wowid'],\r\n 'items_name' => $ignore_item['name'],\r\n 'items_quality' => $ignore_item['quality']\r\n ))) {\r\n // Error out if the item is a duplicate\r\n $failure_message = sprintf($this->_user->lang[\"ctrt_item_duplicate\"],$ignore_item['name']);\r\n $link_list = array(\r\n $this->_user->lang['ctrt_adminmenu_list'] => $this->getControllerLink($this->getMyParam(),'list'),\r\n $this->_user->lang['ctrt_adminmenu_add'] => $this->getControllerLink($this->getMyParam(),'add'),\r\n $this->_user->lang['ctrt_adminmenu_export'] => $this->getControllerLink($this->getMyParam(),'export'),\r\n $this->_user->lang['ctrt_adminmenu_import'] => $this->getControllerLink($this->getMyParam(),'import'));\r\n\r\n $this->admin_die($failure_message, $link_list);\r\n } else {\r\n\r\n /**\r\n * Logging\r\n */\r\n\r\n /**\r\n * Get the member name for this alias\r\n */\r\n $log_action = array(\r\n 'header' => '{L_ACTION_CTRT_IGNORE_ITEM_ADDED}',\r\n '{L_CTRT_LABEL_IGNORE_ITEM}' => $ignore_item['name'],\r\n\r\n '{L_ADDED_BY}' => $this->admin_user);\r\n\r\n $this->log_insert(array(\r\n 'log_type' => $log_action['header'],\r\n 'log_action' => $log_action)\r\n );\r\n\r\n /**\r\n * Success message\r\n */\r\n $success_message = sprintf($this->_user->lang['ctrt_item_success_add'], $ignore_item['name']);\r\n $link_list = array(\r\n $this->_user->lang['ctrt_adminmenu_list'] => $this->getControllerLink($this->getMyParam(),'list'),\r\n $this->_user->lang['ctrt_adminmenu_add'] => $this->getControllerLink($this->getMyParam(),'add'),\r\n $this->_user->lang['ctrt_adminmenu_export'] => $this->getControllerLink($this->getMyParam(),'export'),\r\n $this->_user->lang['ctrt_adminmenu_import'] => $this->getControllerLink($this->getMyParam(),'import'));\r\n $this->admin_die($success_message, $link_list);\r\n }\r\n\r\n return;\r\n }", "public function lists(){\n\n $raw = $this->RxData;\n $head = C('PREURL');\n $ret = ['total' => 0, 'page_start' => 0, 'page_n' => 0, 'data' => []];\n\n $page = $raw['page_start']?$raw['page_start']:1;\n $num = $raw['page_limit']? $raw['page_limit']:10;\n $limit = $num*($page-1).','.$num;\n\n\n if(!$this->out['teacher_uid'])\n goto END;\n $time = time();\n\n $where['a.check']= PASS;\n $where['a.submit']= 1;\n\n $where['a.uid'] = $this->out['teacher_uid'];\n $where['a.suid'] = ['like','%,'.$this->out['uid'].',%'];\n\n\n if($raw['level_id'])\n $where['a.level_id']= $raw['level_id'];\n if(isset($raw['title']))\n $where['a.title']= ['like','%'.$raw['title'].'%'];\n\n if($raw['status_all'])\n $where['a.atime']= ['lt',$time];\n\n $raw['status'] = $raw['status_all']?$raw['status_all']:$raw['status_mine'];\n\n if(isset($raw['status'])){\n switch($raw['status']){\n case 1:\n $where['b.status']= HWK_DID;\n break;\n case 2:\n $where['b.status']= HWK_UNDO;\n break;\n case 3:\n $where['b.status']= HWK_UNCOT;\n break;\n case 4:\n $where['b.uid']= ['eq',$this->out['uid']];\n break;\n case 5:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n case 6:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n default:\n break;\n }\n }\n\n if($raw['time_start'] && $raw['time_end']){\n $where['a.atime'] = [\n ['egt',$raw['time_start']],\n ['lt',$raw['time_end']]\n ];\n }elseif($raw['time_start'] ) {\n $where['a.atime'] = ['egt', $raw['time_start']];\n }elseif($raw['time_end'] ){\n $where['a.atime'] = ['lt',$raw['time_end']];\n }\n\n $column = 'a.id,a.hwk_id,a.title,b.status as stu_status,c.name as level,a.mtime as atime';\n\n $order = 'a.mtime desc,id desc';\n\n\n if(isset($raw['status_mine'])){\n $join = 'RIGHT JOIN';\n $where['b.uid']= $this->out['uid'];\n\n $total = $this->model->selectHomeworkByRec('count(*) total',$where,'','');\n $res = $this->model->selectHomeworkByRec(\n $column,\n $where,\n $limit,\n $order\n\n );\n }else {\n //默认为作业池\n if ($raw['status_all'] == 5) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } elseif ($raw['status_all'] == 4) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } else {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n }\n }\n\n if(!$res)\n goto END;\n\n $result = [] ;\n $chk_sub = false;\n foreach($res as $k=>&$v){\n\n\n if($v['level_id'] > $this->out['level_id']){\n unset($res[$k]);\n continue;\n }\n $v['etime'] = $v['atime'] + C('EXPIRE_HWK');\n if($raw['status_all'] == 5){\n if($v['stu_status']){\n continue;\n }\n }\n $v['status'] = $v['stu_status']?$v['stu_status']:HWK_REV;\n if(isset($raw['status_all']) && $v['stu_status']){\n $v['status'] = HWK_NOT_REV;\n }\n//过期\n if(!$v['stu_status'] && time() > ($v['atime']+C('EXPIRE_HWK')))\n $v['status'] = HWK_EXIPRE;\n//逾期\n if($v['stu_status'] == HWK_UNDO && (time()>($v['atime']+C('EXPIRE_SUB'))))\n $chk_sub = true;\n\n $result[] = $v;\n }\n\n $ret['total'] = $total[0]['total'];\n $ret['page_n'] = count($result);\n $ret['page_start'] = $page;\n $ret['data'] = $result;\n $ret['expire'] = $chk_sub?HWK_EXPIRE:HWK_OK;\n\n //已完成列表 不提示\n if($raw['status'] == 1 )\n $ret['expire'] = HWK_OK;\n\n\nEND:\n\n $this->retReturn($ret);\n\n }", "public function pushallurlAction(Request $request){\n $json = $this->get('json_parser')->parse($request);\n $title = $json->get('title','');\n $id = $json->get('id','');\n $url = \"http://eie.ren/app_dev.php/api/order/showArticle?id=\".$id;\n $this->get('jpush')->push_url_all($title,$url,1);\n //$this->get('push')->push_all_android($title,$content);\n //$this->get('push')->push_all_ios($title,$content);\n $this->get('my_datebase')->connection();\n $current = time();\n\n $result = mysql_query(\"select id from user where registration !=''\");\n mysql_query(\"insert into message set status=1,title = '$title',content = '$title',creation_date = $current,type=1,data='$url'\");\n while($row = mysql_fetch_array($result,MYSQL_ASSOC)){\n mysql_query(\"insert into message set uid=$row[id],status=0,title = '$title',content = '$title',creation_date = $current,type=1,data='$url'\");\n }\n return new Response\t('',200);\n }", "public function sortupdate( Request $request ) {\n //current user\n $user_id = auth()->user()->id;\n $inputs = $request->all();\n\n \n\n //for each new sort order - find the project and update it to the new sort order.\n if( $inputs ) {\n foreach( $inputs as $key=>$value ) {\n //make sure numbers are being sent\n if( is_numeric($key) && is_numeric($value) ) {\n $project = Project::where('id', $key)->where( 'user_id', $user_id )->firstOrFail();\n $project->order = $value;\n $project->save();\n }\n }\n }//end if \n\n\n }", "function aggregate_request($level,$status,$priority=NULL,$classification=NULL) {\r\n $elements=array();\r\n $richieste=0;\r\n $gruppi=0;\r\n $goon=TRUE;\r\n $p='';\r\n\r\n if ($priority!==NULL) if (is_array($priority)) {\r\n\r\n foreach ($priority as $key => $val) $p.=$val?($p<>''?', ':'').($key-1):'';\r\n $p=$p<>''?'('.$p.')':'';\r\n }\r\n\r\n $filter.=($p!='')?' r.priority IN'.$p:'';\r\n $filter.=($filter<>''?' AND ':'').($classification!==NULL?'r.classification='.$classification:'');\r\n $filter.=($filter<>''?' AND ':'').\"r.nid NOT IN \".query_aggregation('a.nid2','gare').\" \"; // esclusione di quelle gi� inserite\r\n $filter=($filter<>''?' WHERE ':'').$filter;\r\n\r\n if (is_array($status)) foreach($status as $key =>$val) $goon=$goon && ($val<>0);\r\n //\tif (!$goon) return array('#value'=>'Nessuna elaborazione');\r\n\r\n\r\n $query='SELECT c.id AS idCND, r.value as value, r.qta as qta, r.cud as cud, r.struct as struct, n.nid as nid, n.title as title\r\n\t\t\tFROM '._REQUESTS_TABLE.' r\r\n\t\t\tLEFT JOIN '._CUD_TABLE.' c ON LEFT(r.cud,'.($level*2-1).')=c.id\r\n\t\t\tINNER JOIN {node} n ON n.nid=r.nid AND n.vid=r.vid\r\n\t\t\tINNER JOIN '.query_status($status).' st ON st.nid=r.nid '.$filter;\r\n $count_rcq='SELECT count(*) as sum FROM ('.$query.') q'; // conteggio del totale delle richieste\r\n\r\n $main_query=\"SELECT SUM(q.qta) AS elements, COUNT(*) AS count, SUM(q.value) AS value , idCND\r\n\t FROM (\".$query.\") q GROUP BY idCND ORDER BY count desc, value desc \";\r\n $count_sql='SELECT count(*) as count FROM ('.$main_query.' ) q'; // conteggio dei raggruppamenti\r\n //\tprint_r($main_query);\r\n\r\n $qy=pager_query($main_query,40,0,$count_sql);\r\n $richieste=0;\r\n $idCND='';\r\n while ($fields=db_fetch_object($qy)) {\r\n if ($fields->idCND===NULL)$fields->idCND='Z99';\r\n $idCND=$fields->idCND;\r\n $elements['selection'][$idCND]=array(\r\n '#type'=>'checkbox',\r\n '#default_value'=>0,\r\n '#parents'=>array('selection',$idCND),\r\n );\r\n $elements['description'][$idCND]=array(\r\n '#type'=>'fieldset',\r\n '#collapsible'=>TRUE,\r\n '#collapsed'=>TRUE,\r\n '#description'=>check_plain(get_cud_description($idCND)),\r\n '#title'=>strtolower(truncate_string(get_cud_description($idCND))).($idCND!==NULL?' ('.$idCND.')':''),\r\n );\r\n // conteggi\r\n $elements['count'][$idCND]=array('#value'=>$fields->count,);\r\n $elements['elements'][$idCND]=array('#value'=>$fields->elements,);\r\n $elements['value'][$idCND]=array('#value'=>currencyFormat($fields->value),);\r\n $elements['description'][$idCND]['group']=get_group($idCND, $query);\r\n $richieste+=$fields->count;\r\n $gruppi++;\r\n }\r\n $elements['count_requst']=array('#type'=>'hidden','#value'=>$richieste.'/'.db_result(db_query($count_rcq)));\r\n $elements['groups']=array('#type'=>'hidden','#value'=>$gruppi.'/'.db_result(db_query($count_sql)));\r\n\r\n return $elements;\r\n\r\n}", "function multi_curl(&$tasks){\n\n $header = array();\n $header[] = 'Authorization: '.TOKEN;\n\n // страны, содержимое которых надо получить\n $urls = array(\"https://api.ittour.com.ua/module/params/338?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/318?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/320?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/372?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/434?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/39?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/16?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/332?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/376?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/378?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/334?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/23?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/60?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/321?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/75?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/69?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/330?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/323?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/76?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/1082?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/9?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/90?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/324?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/91?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/442?entity=hotel\",\n //поиск регионов\n \"https://api.ittour.com.ua/module/params\"\n );\n\n// инициализируем \"контейнер\" для отдельных соединений (мультикурл)\n $cmh = curl_multi_init();\n\n// массив заданий для мультикурла\n $tasks = array();\n// перебираем наши урлы\n foreach ($urls as $url) {\n // инициализируем отдельное соединение (поток)\n $ch = curl_init($url);\n // если будет редирект - перейти по нему\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n // возвращать результат\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // возвращать http-заголовок\n curl_setopt($ch, CURLOPT_HTTPHEADER , $header);\n // таймаут соединения\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n // таймаут ожидания\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n // добавляем дескриптор потока в массив заданий\n $tasks[$url] = $ch;\n // добавляем дескриптор потока в мультикурл\n curl_multi_add_handle($cmh, $ch);\n }\n\n// количество активных потоков\n $active = null;\n// запускаем выполнение потоков\n do {\n $mrc = curl_multi_exec($cmh, $active);\n }\n while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n// выполняем, пока есть активные потоки\n while ($active && ($mrc == CURLM_OK)) {\n // если какой-либо поток готов к действиям\n if (curl_multi_select($cmh) != -1) {\n // ждем, пока что-нибудь изменится\n do {\n $mrc = curl_multi_exec($cmh, $active);\n // получаем информацию о потоке\n $info = curl_multi_info_read($cmh);\n // если поток завершился\n if ($info['msg'] == CURLMSG_DONE) {\n $ch = $info['handle'];\n // ищем урл страницы по дескриптору потока в массиве заданий\n $url = array_search($ch, $tasks);\n // забираем содержимое\n $tasks[$url] = json_decode(curl_multi_getcontent($ch), true);\n // удаляем поток из мультикурла\n curl_multi_remove_handle($cmh, $ch);\n // закрываем отдельное соединение (поток)\n curl_close($ch);\n }\n }\n while ($mrc == CURLM_CALL_MULTI_PERFORM);\n }\n }\n\n // закрываем мультикурл\n\n curl_multi_close($cmh);\n\n return $tasks;\n}", "public function indexRequests()\n\t{\n\t\n\t\t$requests = BookRequest::All();\n\t\t\t$data['requests']=$requests;\n\t\tforeach($requests as $request){\n\t\t\t$sum = $request->rent*2;\n\t\t\t$data[$request->id.\"cart\"] = RequestCart::where('request_id',$request->id)->get();\n\t\t\tif($data[$request->id.\"cart\"] != NULL){\n\t\t\t\tforeach ($data[$request->id.\"cart\"] as $items) {\n\t\t\t\t\t$sum=$sum+($items->item_price*$items->quantity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function actionAdd()\n {\n $userId = Yii::$app->user->identity->getId();\n\n $blockedNodeId = Yii::$app->request->post('blocked_node');\n\n\n if(Blacklist::add($userId, $blockedNodeId)){\n return [\n 'status' => 'success',\n 'access_token' => Yii::$app->user->identity->getAuthKey()\n ];\n } else {\n return [\n 'status' => 'fail',\n 'error' => 'No such node',\n 'access_token' => Yii::$app->user->identity->getAuthKey()\n ];\n }\n\n\n }", "function addGroup(&$args, &$request) {\n\t\t// Calling editMasthead with an empty row id will add\n\t\t// a new masthead.\n\t\t$this->editGroup($args, $request);\n\t}", "public function update_requests() {\n\t\tif (!isset($_POST['time']) || !isset($_POST['hash'])) exit('0');\n\n\t\t// If the response is invalid return a zero response\n\t\t$received = $_POST['time'] . '|' . $_POST['hash'];\n\t\t$expected = $this->time_marker(hash('crc32', $this->required_delay), $_POST['time']);\n\t\tif ($received !== $expected) exit('0');\n\n\t\t// If response if premature return a zero response\n\t\t$now = time();\n\t\t$earliest = absint($_POST['time']) + $this->required_delay;\n\t\tif ($now < $earliest) exit('0');\n\n\t\t// Seems ok ... respond with new hash\n\t\t$response = hash('md5', $_POST['hash'] . $this->base_key);\n\t\texit($response);\n\t}", "public function add(){\n if ($_POST) {\n if ($_POST[\"operation\"] == 'egreso'){\n $_POST[\"amount\"] = $_POST[\"amount\"]*(-1);\n }\n if ($this->transactions->save(\"transactions\", $_POST)) {\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }else{\n $this->redirect(array(\"controller\"=>\"transactions\", \"method\"=>\"add\"));\n }\n }\n \n $this->set(\"accounts\", $this->transactions->find(\"accounts\"));\n $this->set(\"categories\", $this->transactions->find(\"categories\"));\n $this->_view->setView(\"add\");\n /* }else{\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }*/\n }" ]
[ "0.5540178", "0.55094814", "0.5460602", "0.53744185", "0.52074367", "0.5108507", "0.5059316", "0.5049457", "0.5019025", "0.501576", "0.49989995", "0.49814647", "0.49748263", "0.49744132", "0.49387768", "0.4931795", "0.4929889", "0.4922641", "0.48991978", "0.48786256", "0.48518407", "0.48510274", "0.48442024", "0.48432854", "0.48293304", "0.48133144", "0.4807542", "0.4780551", "0.47787493", "0.47753957", "0.47675008", "0.4750619", "0.47434643", "0.47311822", "0.4713856", "0.47071555", "0.47024465", "0.4691856", "0.46768388", "0.4674375", "0.46667603", "0.46430212", "0.46427953", "0.46321082", "0.46202794", "0.46115246", "0.46059558", "0.4605826", "0.45968255", "0.4595458", "0.4577632", "0.45741603", "0.45680112", "0.45647684", "0.45644522", "0.45634007", "0.45622832", "0.45590812", "0.4559045", "0.45497546", "0.4545218", "0.45444041", "0.45438", "0.45420995", "0.45348638", "0.4534554", "0.45334882", "0.453151", "0.4530376", "0.45293522", "0.45223972", "0.45167872", "0.45135626", "0.45110556", "0.4510753", "0.45033684", "0.45014864", "0.45000985", "0.45000744", "0.44901732", "0.448897", "0.44883484", "0.4488077", "0.44870573", "0.44793856", "0.44786876", "0.44751486", "0.44647187", "0.4464332", "0.44635507", "0.44632486", "0.44632083", "0.44620332", "0.44614565", "0.4461021", "0.4457261", "0.4455298", "0.44487", "0.44303763", "0.44156316", "0.44083714" ]
0.0
-1
This case is simple enough: it just grows to the maximum size.
public function testAppendToMaxSizeWithoutAccess() { $array = new \ComplexPie\CacheArray(); $max = \ComplexPie\CacheArray::MAX_CACHE_SIZE; for ($i = 0; $i < $max; $i++) { $array[] = $i; } $this->assertSame($max, count($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function increaseCapacity();", "protected function increaseCapacity()\n {\n $size = count($this);\n\n if ($size > $this->capacity) {\n $this->capacity = max(intval($this->capacity * 1.5), $size);\n }\n }", "public function GetMaxSize ();", "public function getMaxSize(): int;", "public function testAppendToOverMaxSizeWithoutAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $this->assertSame(1, count($array));\n }", "public function capacity(): int;", "public function capacity(): int;", "public function testAppendToOverMaxSizeWithAccessToSpecific()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $array[1];\n $array[2];\n $array[3];\n $array[] = $i;\n $this->assertSame(4, count($array));\n }", "public function testAppendToOverMaxSizeWithAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n $array[$i];\n }\n $this->assertSame(1, count($array));\n }", "protected function adjustCapacity(): void\n {\n $size = count($this);\n\n // Automatically truncate the allocated buffer when the size of the\n // structure drops low enough.\n if ($size < $this->capacity / 4) {\n $this->capacity = max(CapacityInterface::MIN_CAPACITY, $this->capacity / 2);\n } elseif ($size >= $this->capacity) { // Also check if we should increase capacity when the size changes.\n $this->increaseCapacity();\n }\n }", "public function testAppendToMaxSizeWithAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n $array[$i];\n }\n $this->assertSame($max, count($array));\n }", "public function getMaxSize(){\n return $this->maxSize;\n }", "public function getOptimizedSize(): int;", "function setSize($size)\n\t{\n\t\t$this->size = 0+$size;\n\t}", "public function GetMinSize ();", "public function getMaxSize() : int {\n\t\treturn $this->generator->getMaxSize();\n\t}", "abstract protected function getSize(): int;", "public function __construct($maxCapacity=2147483647) \r\n {\r\n $this->maxCapacity = $maxCapacity;\r\n }", "function limitToSize($size) {\r\n $this->sizeLimit = $size;\r\n }", "public function getMaxSize() : int{\n return $this->maxSize;\n }", "function maxListLen() {\n\t\treturn 0;\n\t}", "function calc_size()\n\t{\n\t}", "private function populateSizes() {\n\n $allocatedSize = $this->LONG_SIZE;\n $hashNextSize = $this->LONG_SIZE;\n $valueSize = $this->LONG_SIZE;\n $flagsSize = $this->CHAR_SIZE;\n $this->CHUNK_META_SIZE = self::MAX_KEY_LENGTH + $hashNextSize + $allocatedSize + $valueSize + $flagsSize;\n\n $this->ZONE_META_SIZE = $this->LONG_SIZE;\n\n $this->MAX_CHUNK_SIZE = self::ZONE_SIZE - $this->ZONE_META_SIZE;\n $this->MIN_CHUNK_SIZE = $this->CHUNK_META_SIZE + self::MIN_VALUE_ALLOC_SIZE;\n $this->MAX_VALUE_SIZE = $this->MAX_CHUNK_SIZE - $this->CHUNK_META_SIZE;\n\n // Note: we cast to (int) so that this is not a float value. Otherwise\n // PHP's === doesn't work when comparing with ints, because 42 !== 42.0.\n $this->ZONE_COUNT = (int) floor( $this->zonesArea->size / self::ZONE_SIZE );\n\n $this->MAX_CHUNKS_PER_ZONE = (int) floor( ( self::ZONE_SIZE - $this->ZONE_META_SIZE ) / $this->MIN_CHUNK_SIZE );\n $this->MAX_CHUNKS = (int) ( $this->MAX_CHUNKS_PER_ZONE * $this->ZONE_COUNT );\n\n $this->MAX_TOTAL_VALUE_SIZE = (int) ( $this->ZONE_COUNT * $this->MAX_VALUE_SIZE );\n\n $this->SHM_SIZE = (int) shmop_size( $this->shm );\n }", "public function setMaxSize($max){\n $this->maxSize = $max;\n return $this;\n }", "function getSize() { return $this->_size; }", "public function setMaxSizeOfInstructions($value) {}", "public function setSize($size)\n {\n if ($size > $this->size) {\n $actualInts = (int)ceil($this->size / $this->intSize);\n $newInts = (int)ceil($size / $this->intSize) - $actualInts;\n for ($i = 0; $i < $newInts; $i++) {\n $this->data[] = (int)0;\n }\n } else {\n $newInts = (int)ceil($size / $this->intSize);\n $this->data = array_slice($this->data, 0, $newInts);\n }\n\n $this->size = $size;\n }", "public function getMaxFrameSize(): int\n {\n }", "public function setSize($size): self;", "public function SetMaxSize ($maxSize);", "public function chunk(int $size): self;", "public function resize(int $size, $value = 0): void {}", "public function getMaxSizeOfInstructions() {}", "public function getOriginalSize(): int;", "public function getMaxSize(): int\n {\n return $this->maxSize;\n }", "public function getBufferSize(): int;", "protected function setMemoryLimit() {}", "public function getSize(): int;", "public function getSize(): int;", "public function getSize(): int;", "public function getSize(): int;", "function getSize() ;", "function raise_memory_limit ($newlimit) {\n\n if (empty($newlimit)) {\n return false;\n }\n\n $cur = @ini_get('memory_limit');\n if (empty($cur)) {\n // if php is compiled without --enable-memory-limits\n // apparently memory_limit is set to ''\n $cur=0;\n } else {\n if ($cur == -1){\n return true; // unlimited mem!\n }\n $cur = get_real_size($cur);\n }\n\n $new = get_real_size($newlimit);\n if ($new > $cur) {\n ini_set('memory_limit', $newlimit);\n return true;\n }\n return false;\n}", "public function setMaxSize(int $size = 50)\n {\n // Set max size\n $this->max_size = $size * 1048576;\n // Return this object\n return $this;\n }", "public function setMaxSize(int $size) : Group {\n\t\t$this->generator->setMaxSize($size);\n\t\treturn $this;\n\t}", "function LayoutSize() {\n\treturn 1;\n }", "public function __construct($max_size = 2000000)\n {\n $this->max_size = $max_size; \n }", "public function setSize($size);", "public static function getMaximumIndexSize()\n {\n throw new DNotImplementedException(array(get_called_class(), __FUNCTION__));\n }", "public function getMaxSize()\r\n {\r\n return $this->max_size;\r\n }", "public function getMaxInToOrConversionChunkSize()\r\n {\r\n return 150;\r\n }", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function maxCapacity() \r\n {\r\n return $this->maxCapacity;\r\n }", "public function getCurrentSize() : int{\n return $this->currentSize;\n }", "public function testSize()\n\t{\n\t\t$this->linkedList->clear();\n\n\t\tforeach ($this->newRandomElements() as $index => $element)\n\t\t{\n\t\t\t$this->assertTrue($this->linkedList->add($element));\n\t\t\t$this->assertEquals($index + 1, $this->linkedList->size());\n\t\t\t$this->assertEquals($index + 1, $this->linkedList->count());\n\t\t}\n\t}", "public function resizeToMaxDiskSize()\n\t{\n\t\t$this->intern_resizeToDiscSize();\n\t}", "public function getTotalSize(): int;", "public function __construct($size = 50)\n {\n $this->size = $size;\n }", "public function getLastSize()\n {\n $count = count($this->sizeList);\n if ($count === 0) {\n return;\n }\n \n return $this->sizeList[$count - 1];\n }", "public function getMaxSize() {\n\t\t\treturn $this->maxSize >= 0 ? $this->maxSize : $this->getTotalMaxSize();\n\t\t}", "public function getMaxSize()\n {\n return self::PREVIEW_SIZE;\n }", "public function addSize() { return $this->_m_addSize; }", "public static function resize(){\n\n}", "public function setMaxBodySize(int $value): void {}", "public function getSize()\n {\n return 0;\n }", "public function getAdvanceWidthMax() {}", "public function getMinSize()\r\n {\r\n return $this->min_size;\r\n }", "public function getSize()\n {\n }", "public function expand()\n {\n $oldTable = clone $this;\n\n if ($this->cap < 1024) $this->cap *= 2;\n else $this->cap += ($this->cap >> 2);\n\n $this->reset();\n\n foreach ($oldTable as $key => $value) {\n $this->set($key, $value);\n }\n }", "public function setDefaultSize() {\n return $this->setSize('medium');\n }", "function strshrink($string, $default_size, $max)\n{\n\t$strlen = strlen($string);\n\t\n\tif (strlen($string) >= $max) {\n\t\t$size = $default_size;\n\t\t\n\t\tfor ($i=0; ($strlen - $max) >= $i; $i += 6) {\n\t\t\t$size -= 1;\n\t\t}\n\t\t\n\t\treturn '<div style=\"display:inline;font-size:' .$size. 'px\">' .$string. '</div>';\n\t}\n\t\n\treturn $string;\n}", "public function limit(int $size = 10000)\n {\n $this->size = $size;\n return $this;\n }", "public function getMaxStorage() {}", "function getMaxKeySize()\n {\n return $this->_key_size;\n }", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function setMinSize(int $size = 0)\n {\n // Set min size\n $this->min_size = $size * 1048576;\n // Return this object\n return $this;\n }", "public function setSize($value) {\r\n $this->iSize = $this->setIntegerProperty($this->iSize, $value);\r\n }", "public function getAbsoluteSize();", "public function expand(int $len): bool {}", "function change_size($size, $save_mode)\n\t{\n\t//change the size of the actual object.\n\treturn NOT_SUPPORTED;\n\t}", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }", "public function setSize($value = false) {\n $this->_size = $value;\n return $this;\n }", "public function setSize($value = false) {\n $this->_size = $value;\n return $this;\n }", "public function __construct($size = 0) // [\\SplFixedArray]\n\t{\n\t\t$this->start = ($size instanceof \\SplFixedArray) ? 0\n\t\t : $size / 2;\n\t\tparent::__construct($size);\n\t}", "public function pullup(int $size): ?string {}", "function round_up_bytes($size) {\n if($size < 1024) {\n return array('size'=>round($size,2),'label'=>'B');\n } elseif($size >= 1024 AND $size < 1048576) {\n return array('size'=>round(($size / 1024),2),'label'=>'KB');\n } elseif($size >= 1048576 AND $size < 1073741824) {\n return array('size'=>round(($size / 1048576),2),'label'=>'MB');\n } else {\n return array('size'=>round(($size / 1073741824),2),'label'=>'GB');\n }\n}", "public function getMaxStackElements() {}" ]
[ "0.7092969", "0.6559906", "0.6540119", "0.6491448", "0.6288279", "0.6262019", "0.6262019", "0.6261677", "0.62073284", "0.6192205", "0.61842996", "0.61245584", "0.6048895", "0.6017522", "0.598997", "0.59672356", "0.5915472", "0.5816677", "0.58068436", "0.57660407", "0.5765297", "0.57331026", "0.57266873", "0.5723723", "0.57128215", "0.57055634", "0.56997013", "0.5680724", "0.5664433", "0.5663544", "0.5650983", "0.5643167", "0.56412476", "0.56161696", "0.56146276", "0.55848056", "0.55745304", "0.5560264", "0.5560264", "0.5560264", "0.5560264", "0.5558521", "0.55545443", "0.55172515", "0.55127966", "0.5502097", "0.5492766", "0.5484655", "0.5435826", "0.54311895", "0.5424412", "0.5423743", "0.5423038", "0.5422143", "0.5422143", "0.5422143", "0.5422143", "0.54213345", "0.54003555", "0.5387707", "0.5382233", "0.5380379", "0.5358524", "0.5350337", "0.5337912", "0.532282", "0.53221214", "0.53196365", "0.531713", "0.53138036", "0.5303714", "0.52935123", "0.52729934", "0.5255952", "0.52534777", "0.5248757", "0.524801", "0.5244975", "0.5233635", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.52282584", "0.5224974", "0.5222509", "0.5219691", "0.5215751", "0.52147925", "0.5209365", "0.5198293", "0.5198293", "0.5197841", "0.5193602", "0.51844645", "0.5184444" ]
0.6242693
8
Access here makes no difference, as this just makes everything stay when it hits 100 accesses.
public function testAppendToMaxSizeWithAccess() { $array = new \ComplexPie\CacheArray(); $max = \ComplexPie\CacheArray::MAX_CACHE_SIZE; for ($i = 0; $i < $max; $i++) { $array[] = $i; $array[$i]; } $this->assertSame($max, count($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAppendToOverMaxSizeWithAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n $array[$i];\n }\n $this->assertSame(1, count($array));\n }", "public function cache_gc() {\n // TO DO!!!!!\n }", "public function refresh_nonces()\n {\n }", "public function testAppendToOverMaxSizeWithAccessToSpecific()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $array[1];\n $array[2];\n $array[3];\n $array[] = $i;\n $this->assertSame(4, count($array));\n }", "public function test_get_many_does_not_return_exceeded_entries()\n {\n // be checked for expiration...\n $con = $this->newConnection();\n\n $mainStorage = $this->newMainStorage($con);\n\n\n $storage = $this->newStorage($mainStorage);\n\n $until = (new \\DateTime());\n $storage->put('foo', 'bar', [], $until);\n $storage->put('baz', 'boing', [], $until);\n\n $storage2 = $this->newTestStorage($mainStorage);\n\n $storage2->now = time() + 100;\n\n $this->assertEquals([], $storage2->several(['foo', 'baz']));\n }", "function access() {\n\t\treturn true;\n\t}", "public function testAppendToOverMaxSizeWithoutAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $this->assertSame(1, count($array));\n }", "function garbageCollect() {\n\t\tif ( !mt_rand( 0, 100 ) ) {\n\t\t\t$nowtime = time();\n\t\t\t/* Avoid repeating the delete within a few seconds */\n\t\t\tif ( $nowtime > ($this->lastexpireall + 1) ) {\n\t\t\t\t$this->lastexpireall = $nowtime;\n\t\t\t\t$this->expireall();\n\t\t\t}\n\t\t}\n\t}", "function apc_cache_lock_click_index() {\n\t$n = 1;\n\t// we always unlock as soon as possilbe, so a TTL of 1 should be fine\n\twhile(!apc_add(APC_CACHE_CLICK_INDEX_LOCK, 1, 1)) {\n\t\t$n++;\n\t\tusleep(500);\n\t} \n\tif($n > 1) apc_cache_debug(\"lock_click_index: Locked click index in $n tries\");\n\treturn true;\n}", "public function memCached() { return true; }", "public function performRewind() {\n $this->data = array();\n $this->currentPage = 0;\n $this->currentCount = 0;\n }", "function apc_cache_write_clicks() {\n\tglobal $ydb;\n\tapc_cache_debug(\"write_clicks: Writing clicks to database\");\n\t$updates = 0;\n\t// set up a lock so that another hit doesn't start writing too\n\tif(!apc_add(APC_CACHE_CLICK_UPDATE_LOCK, 1, APC_CACHE_LOCK_TIMEOUT)) {\n\t\tapc_cache_debug(\"write_clicks: Could not lock the click index. Abandoning write\", true);\n\t\treturn $updates;\n\t}\n\t\n\tif(apc_exists(APC_CACHE_CLICK_INDEX)) {\n\t\tapc_cache_lock_click_index();\n\t\t$clickindex = apc_fetch(APC_CACHE_CLICK_INDEX);\n\t\tif($clickindex === false || !apc_delete(APC_CACHE_CLICK_INDEX)) {\n\t\t\t// if apc_delete fails it's because the key went away. We probably have a race condition\n\t\t\tapc_cache_unlock_click_index();\n\t\t\tapc_cache_debug(\"write_clicks: Index key disappeared. Abandoning write\", true);\n\t\t\treturn $updates; \n\t\t}\n\t\tapc_cache_unlock_click_index();\n\n\t\t/* as long as the tables support transactions, it's much faster to wrap all the updates\n\t\t* up into a single transaction. Reduces the overhead of starting a transaction for each\n\t\t* query. The down side is that if one query errors we'll loose the log\n\t\t*/\n\t\t$ydb->query(\"START TRANSACTION\");\n\t\tforeach ($clickindex as $keyword => $z) {\n\t\t\t$key = APC_CACHE_CLICK_KEY_PREFIX . $keyword;\n\t\t\t$value = 0;\n\t\t\tif(!apc_exists($key)) {\n\t\t\t\tapc_cache_debug(\"write_clicks: Click key $key dissappeared. Possible data loss!\", true);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$value += apc_cache_key_zero($key);\n\t\t\tapc_cache_debug(\"write_clicks: Adding $value clicks for $keyword\");\n\t\t\t// Write value to DB\n\t\t\t$ydb->query(\"UPDATE `\" . \n\t\t\t\t\t\t\tYOURLS_DB_TABLE_URL. \n\t\t\t\t\t\t\"` SET `clicks` = clicks + \" . $value . \n\t\t\t\t\t\t\" WHERE `keyword` = '\" . $keyword . \"'\");\n\t\t\t$updates++;\n\t\t}\n\t\tapc_cache_debug(\"write_clicks: Committing changes\");\n\t\t$ydb->query(\"COMMIT\");\n\t\tapc_store(APC_CACHE_CLICK_TIMER, time());\n\t}\n\tapc_delete(APC_CACHE_CLICK_UPDATE_LOCK);\n\tapc_cache_debug(\"write_clicks: Updated click records for $updates URLs\");\n\treturn $updates;\n}", "function isExpensive() {\n\t\treturn true;\n\t}", "public function benchLpopInternal()\n {\n $messageList = $this->queue->consume(self::CONSUME_SIZE);\n }", "function doGarbageCollection()\n {\n if(rand()%100 < 1)\n {\n $this->db->gc();\n }\n }", "public function incActualCalls() {\n $this->actualCalls+= 1;\n }", "public function test_get_does_not_return_exceeded_entry()\n {\n // be checked for expiration...\n $con = $this->newConnection();\n\n $mainStorage = $this->newMainStorage($con);\n\n\n $storage = $this->newStorage($mainStorage);\n\n $until = (new \\DateTime());\n $storage->put('foo', 'bar', [], $until);\n\n $storage2 = $this->newTestStorage($mainStorage);\n\n $storage2->now = time() + 100;\n\n $this->assertNull($storage2->get('foo'));\n }", "public function testAppendToMaxSizeWithoutAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $this->assertSame($max, count($array));\n }", "public function countUsed()\n {\n }", "public function quash_unused() {\n\t\t// Don't put any code in here.\n\t}", "public function lock_read() {}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "private function load_buffered()\n {\n }", "function cache_gc()\n {\n // because this gc function is called before storage is initialized,\n // we just set a flag to expunge storage cache on shutdown.\n $this->expunge_cache = true;\n }", "abstract protected function increaseCapacity();", "public function __clone()\n {\n // memory foot print as low as possible, even though this is trivial.\n $this->cache = array();\n }", "abstract protected function yieldWhitelistAccess(): Generator;", "public function accelerate()\n {\n }", "private function validateModificationCount()\n {\n if (count($this) >= self::ITEM_LIMIT) {\n throw new \\OverflowException(\n sprintf('You must not do more than %d modifications per request', self::ITEM_LIMIT)\n );\n }\n }", "public function benchThisWillBeSkipped()\n {\n }", "private function warmUp()\r\n\t{\r\n\t\t$this->loadPage( 1 );\r\n }", "public function testGetHit()\n {\n $key = \"unique\";\n $item = $this->cache->getItem($key);\n $item->set(\"content\");\n\n $res = $item->get();\n $this->assertNull($res, \"Should not be able to find a value\");\n\n $this->cache->save($item);\n $res = $item->get();\n $this->assertTrue(!is_null($res), \"Should have a value\");\n }", "public function test_page_cache()\n {\n }", "public function I_can_not_create_more_than_hundred_of_percents()\n {\n }", "public function realPageCacheContent() {}", "function updateLimitEnabled()\r\n\t{\r\n\t\treturn true;\r\n\t}", "protected function _after_read(): void\n {\n //it is not supposed to be readable is the object is not readable\n //$this->get_object();//will trigger the permission denied if there is no permission to read the target object\n //TODO - add permission check\n //instantiating the object here may trigger a recursion as the object itself may be creating the alias in its _after_read\n }", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function cacheGet() {\n }", "function apc_cache_write_log() {\n\tglobal $ydb;\n\t$updates = 0;\n\t// set up a lock so that another hit doesn't start writing too\n\tif(!apc_add(APC_CACHE_LOG_UPDATE_LOCK, 1, APC_CACHE_LOCK_TIMEOUT)) {\n\t\tapc_cache_debug(\"write_log: Could not lock the log index. Abandoning write\", true);\n\t\treturn $updates;\n\t}\n\tapc_cache_debug(\"write_log: Writing log to database\");\n\n\t$key = APC_CACHE_LOG_INDEX;\n\t$index = apc_fetch($key);\n\tif($index === false) {\n\t\tapc_cache_debug(\"write_log: key $key has disappeared. Abandoning write.\");\n\t\tapc_store(APC_CACHE_LOG_TIMER, time());\n\t\tapc_delete(APC_CACHE_LOG_UPDATE_LOCK);\n\t\treturn $updates;\n\t}\n\t$fetched = 0;\n\t$n = 0;\n\t$loop = true;\n\t$values = array();\n\t\n\t// Retrieve all items and reset the counter\n\twhile($loop) {\n\t\tfor($i = $fetched+1; $i <= $index; $i++) {\n\t\t\t$row = apc_fetch(apc_cache_get_logindex($i));\n\t\t\tif($row === false) {\n\t\t\t\tapc_cache_debug(\"write_log: log entry \" . apc_cache_get_logindex($i) . \" disappeared. Possible data loss!!\", true);\n\t\t\t} else {\n\t\t\t\t$values[] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$fetched = $index;\n\t\t$n++;\n\t\t\n\t\tif(apc_cas($key, $index, 0)) {\n\t\t\t$loop = false;\n\t\t} else {\n\t\t\tusleep(500);\n\t\t\t$index = apc_fetch($key);\n\t\t}\n\t}\n\tapc_cache_debug(\"write_log: $fetched log entries retrieved; index reset after $n tries\");\n\t// Insert all log message - we're assuming input filtering happened earlier\n\t$query = \"\";\n\n\tforeach($values as $value) {\n\t\tif(!is_array($value)) {\n\t\t apc_cache_debug(\"write_log: log row is not an array. Skipping\");\n\t\t continue;\n\t\t}\n\t\tif(strlen($query)) {\n\t\t\t$query .= \",\";\n\t\t}\n\t\t$row = \"('\" . \n\t\t\t$value[0] . \"', '\" . \n\t\t\t$value[1] . \"', '\" . \n\t\t\t$value[2] . \"', '\" . \n\t\t\t$value[3] . \"', '\" . \n\t\t\t$value[4] . \"', '\" . \n\t\t\t$value[5] . \"')\";\n\t\tapc_cache_debug(\"write_log: row: $row\");\n\t\t$query .= $row;\n\t\t$updates++;\n\t}\n\t$ydb->query( \"INSERT INTO `\" . YOURLS_DB_TABLE_LOG . \"` \n\t\t\t\t(click_time, shorturl, referrer, user_agent, ip_address, country_code)\n\t\t\t\tVALUES \" . $query);\n\tapc_store(APC_CACHE_LOG_TIMER, time());\n\tapc_delete(APC_CACHE_LOG_UPDATE_LOCK);\n\tapc_cache_debug(\"write_log: Added $updates entries to log\");\n\treturn $updates;\n\n}", "private function _optimize() {}", "abstract public function require_access();", "abstract protected function needRefresh();", "protected function _reset_write()\r\n\t{\r\n\t\t$this->_reset_run(array(\r\n\t\t\t'qb_set'\t=> array(),\r\n\t\t\t'qb_from'\t=> array(),\r\n\t\t\t'qb_join'\t=> array(),\r\n\t\t\t'qb_where'\t=> array(),\r\n\t\t\t'qb_orderby'\t=> array(),\r\n\t\t\t'qb_keys'\t=> array(),\r\n\t\t\t'qb_limit'\t=> FALSE,\r\n 'qb_lock_in_share_mode' => FALSE,\r\n 'qb_for_update' => FALSE\r\n\t\t));\r\n\t}", "public function incrementDirectEntriesCount()\n\t{\n\t\t$this->setDirectEntriesCount($this->getDirectEntriesCount() + 1); \n\t}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function _cache_refresh_all()\n {\n }", "function _data_seek($n = 0)\n\t{\n\t\treturn;\n\t}", "function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }", "public function baseloop() {\n\n $limit = $this->limit;\n\n $r = $this->range();\n\n for($i = $r[0]; $i < $r[1]; $i = $i + $limit) {\n\n $ptn = $i + $limit;\n\n $set = $this->userdata($i, $ptn);\n\n $this->dataloop($set); \n\n }\n\n return;\n\n }", "final public static function referenceAlreadyInUse()\n {\n return self::get(51);\n }", "function apc_cache_key_zero($key) {\n\t$old = 0;\n\t$n = 1;\n\t$old = apc_fetch($key);\n\tif($old == 0) {\n\t\treturn $old;\n\t}\n\twhile(!apc_cas($key, $old, 0)) {\n\t\tusleep(500);\n\t\t$n++;\n\t\t$old = apc_fetch($key);\n\t\tif($old == 0) {\n\t\t\tapc_cache_debug(\"key_zero: Key zeroed by someone else. Try $n. Key $key\");\n\t\t\treturn $old;\n\t\t}\n\t}\n\tif($n > 1) apc_cache_debug(\"key_zero: Key $key zeroed from $old after $n tries\");\n\treturn $old;\n}", "public static function reassign() {\n\n\t\t}", "public function needsIncrementOffset();", "function get_space_used()\n {\n }", "private function refreshNbPages()\n {\n $this->_nbPages = $this->_limit ? ceil($this->_count/$this->_limit) : 0;\n }", "abstract protected function cacheData();", "protected function dispense(){\r\n\t\t$this->dispensed++;\r\n\t}", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "function test_write_once()\n {\n if (get_class($this) != 'Test_ActiveSupport_Cache_FileStore')\n {\n $this->assert_true($this->cache->write_once('uniq_token', 'foo'));\n $this->assert_false($this->cache->write_once('uniq_token', 'bar'));\n $this->assert_equal($this->cache->read('uniq_token'), 'foo');\n }\n }", "public function sweep(): int\n {\n $pruning = 0;\n foreach ($this->items as $key => $item) {\n if (null === $item) {\n // Item was removed from memory, delete from cache\n $this->delete($key);\n $pruning++;\n } elseif ($item instanceof Part) {\n // Skip ID related to Bot\n if ($key != $this->discord->id) {\n // Item is no longer used other than in the repository, weaken so it can be garbage collected\n $this->items[$key] = WeakReference::create($item);\n }\n }\n }\n if ($pruning) {\n $this->discord->getLogger()->debug('Pruning repository cache', ['count' => $pruning, 'class' => $this->class]);\n }\n\n return $pruning;\n }", "function gc()\n {\n /* A 1% chance we will run garbage collection during a call. */\n if (rand(0, 99) != 0) {\n return;\n }\n\n return $this->_gc();\n }", "public function runBare()\n {\n Activity::disable();\n if (SHADOW_CHECK && empty($this->file_map)) {\n $this->file_map = static::getFiles();\n }\n //track the original max execution time limit\n $originalMaxTime = ini_get('max_execution_time');\n\n parent::runBare();\n\n //sometimes individual tests change the max time execution limit, reset back to original\n set_time_limit($originalMaxTime);\n\n if (SHADOW_CHECK) {\n $oldfiles = $this->file_map;\n $this->file_map = static::getFiles();\n $this->assertEquals($oldfiles, $this->file_map);\n }\n }", "public function beforeSave(){\n // Clean out old requests:\n Yii::app()->db->createCommand('DELETE FROM `'.$this->tableName().'`'\n . ' WHERE requested < '.(time()-self::EXPIRE_S))\n ->execute();\n $user = $this->resolveUser();\n if($user instanceof User){\n $this->userId = $user->id;\n }\n return !$this->limitReached && parent::beforeSave();\n }", "public function before_optimize() {\n\t\t$this->processed_trash_count = 0;\n\t\t$this->processed_akismet_count = 0;\n\t}", "function freeze() ;", "public function keepItemsInArrayCanUseClosure() {}", "public function tempPageCacheContent() {}", "function apc_cache_unlock_click_index() {\n\tapc_delete(APC_CACHE_CLICK_INDEX_LOCK);\n}", "public function __invoke(): void\n {\n ++$this->counter;\n }", "public function seek()\r\n\t{\r\n\t}", "function used()\n {\n return $this->used;\n }", "protected function printCachedInfo() {}", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "private function collectGarbage() {\n\t\t$query = 'DELETE FROM ' .//'DELETE LOW_PRIORITY FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE time < NOW() - ' . ShelveIt::$query_cache[ 'expire' ];\n \n\t\tif( !mysql_unbuffered_query( $query, $this->mysql ) ) {\n die( \"Garbage collect query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n\t}", "function tidy_access_count(tidy $object) {}", "function training_performance_callback() {\n global $user;\n $obj = new stdClass();\n $obj->some_var = rand(1, 500);\n $cid = 'cache_for_user_' . $user->uid;\n cache_set($cid, $obj, 'cache_training_performance', CACHE_PERMANENT);\n //cache_clear_all($cid, 'cache_training_performance');\n dpm(cache_get($cid, 'cache_training_performance'));\n $output = 'Test cache!' . rand(1, 500);\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n );\n}", "function enableHitsOnly(){\n\t\t$this->hitsonly = true;\n\t}", "protected function _reset_write()\n\t{\n\t\t$this->_reset_run(array(\n\t\t\t'qb_set'\t=> array(),\n\t\t\t'qb_set_ub'\t=> array(),\n\t\t\t'qb_from'\t=> array(),\n\t\t\t'qb_join'\t=> array(),\n\t\t\t'qb_where'\t=> array(),\n\t\t\t'qb_orderby'\t=> array(),\n\t\t\t'qb_keys'\t=> array(),\n\t\t\t'qb_limit'\t=> FALSE\n\t\t));\n\t}", "public function lockToNormal() {}", "public function clearInternalCache() {\n\t\t$this->_internalCache = array();\n\t\treturn true;\n\t}", "public function Action_foo()\n\t{\n\t if (Kohana::$profiling === TRUE)\n\t {\n\t // Start a new benchmark\n\t $benchmark = Profiler::start('my_group', __FUNCTION__);\n\t }\n\t for($i=0;$i<1000000;$i++){\n\t \techo $i;\n\t }\n\t // Do some stuff\n\t if (isset($benchmark))\n\t {\n\t // Stop the benchmark\n\t Profiler::stop($benchmark);\n\t }\n\t echo View::factory('profiler/stats');\n\t}", "public function testMemoryConsumption() \n {\n $className = $this->getBufferClass();\n\n $afterMemory = memory_get_usage(true);\n $finalMemory = memory_get_usage(true);\n $initalMemory = memory_get_usage(true);\n\n $buffer = new $className();\n $buffer->reserve(10000000);\n\n $afterMemory = memory_get_usage(true);\n\n unset($buffer);\n\n $finalMemory = memory_get_usage(true);\n\n $this->assertTrue($afterMemory > $initalMemory);\n $this->assertEquals($initalMemory, $finalMemory);\n }", "public function access();", "public function postExecute() {\n\t\t// someone retrieves a bench value from \n\t\t// Benchmark class.\n\t}", "protected function getMemoryCache() {}", "public static function flushInternalRuntimeCaches() {}", "public function generateInternalCache()\n\t{\n\t\t// Purge\n\t\t$this->purgeInternalCache();\n\n\t\t// Rebuild\n\t\t$this->generateConfigCache();\n\t\t$this->generateDcaCache();\n\t\t$this->generateLanguageCache();\n\t\t$this->generateDcaExtracts();\n\t}", "function updatebases()\n {\n\n $tot_data = 0;\n $tot_idx = 0;\n $tot_all = 0;\n $total_gain = 0;\n $local_query = \"SHOW TABLE STATUS\";\n $result = db_query($local_query);\n if (db_num_rows($result[\"resource\"])) {\n while ($row = db_fetch_row($result)) {\n $local_query = 'OPTIMIZE TABLE '.$row[0];\n $resultat = db_query($local_query);\n }\n return true;\n }\n }", "public function unsetLimit() {}", "public function testSetCacheLifeAsVeryVeryLargeInteger(): void\n {\n $key = \"Cache Life As Huge Integer\";\n $value = \"Size Matters\";\n $ttl = time() - 7;\n $this->testNotStrict->set($key, $value, $ttl);\n $realKey = $this->testNotStrict->getRealKey($key);\n $cacheTTL = $this->redis->ttl($realKey);\n $race = abs($cacheTTL - $ttl);\n $this->assertLessThan(3, $race);\n }", "public function testRateLimit()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }" ]
[ "0.5631449", "0.55800486", "0.5463701", "0.54411274", "0.5400752", "0.53834504", "0.53747493", "0.5347652", "0.53394085", "0.532921", "0.5289664", "0.52665114", "0.5247412", "0.52307355", "0.52284706", "0.5209652", "0.5200519", "0.5177874", "0.5164256", "0.5146453", "0.51183915", "0.5116971", "0.50985885", "0.5089669", "0.507938", "0.5065141", "0.5059393", "0.5036896", "0.5033213", "0.50140744", "0.5008487", "0.49772424", "0.497629", "0.49759385", "0.49572754", "0.49539083", "0.4943048", "0.4937448", "0.4937448", "0.49372268", "0.49372268", "0.49362785", "0.49353674", "0.49308142", "0.4924956", "0.49105147", "0.48936027", "0.4893198", "0.48865628", "0.48865628", "0.48865628", "0.48865628", "0.48865628", "0.48865628", "0.48859066", "0.48854798", "0.48852438", "0.48478425", "0.4841396", "0.4838109", "0.48375046", "0.48362204", "0.4827054", "0.4823896", "0.48201516", "0.48146182", "0.4814437", "0.4802348", "0.48019215", "0.47995925", "0.4795069", "0.4792822", "0.47916615", "0.47845992", "0.47837758", "0.47801095", "0.47747442", "0.477302", "0.4760573", "0.47586322", "0.47531772", "0.47495934", "0.47477138", "0.47451654", "0.47426313", "0.4740079", "0.47366172", "0.47362748", "0.47218502", "0.47209132", "0.47201467", "0.47124016", "0.47101542", "0.4709936", "0.4709741", "0.47063556", "0.4703947", "0.47038957", "0.47032148", "0.47024006" ]
0.53155667
10
This is slightly more complex, and relies upon (our) GC behaviour: it assumes that array values that are never accessed are removed.
public function testAppendToOverMaxSizeWithoutAccess() { $array = new \ComplexPie\CacheArray(); $max = \ComplexPie\CacheArray::MAX_CACHE_SIZE + 1; for ($i = 0; $i < $max; $i++) { $array[] = $i; } $this->assertSame(1, count($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cleanExecutionArrays() {}", "function purge($arr){\n\treturn array_map(function($r){ return array_map(function($c){ return is_array($c)?false:$c;}, $r);}, $arr);\n}", "public abstract function retain_array(Array $array);", "function destroyer($arr, $valsToRemove) {\n\n $ret = array();\n foreach($arr as $v) {\n if(array_search($v, $valsToRemove) === false)\n $ret[] = $v;\n }\n return $ret;\n}", "function array_remove(array &$arr, $key) {\n if (isset($arr[$key])) {\n $val = $arr[$key];\n unset($arr[$key]);\n return $val;\n }\n\n return NULL;\n}", "public function array_forget()\n {\n throw new Exception('Not implemented');\n }", "function array_suck($array){\n\treturn array_map(\"reset\", $array);\n}", "static public function arrRmByVal($arr,$value=''){\n $arr = is_array($arr)?$arr:array();\n foreach ($arr as $k=>$v)\n {\n if ($v == $value)\n unset($arr[$k]);\n }\n return $arr;\n }", "function offsetUnset(/*. mixed .*/ $object_){}", "public /*void*/ function offsetUnset(/*scalar*/ $offset){}", "function array_forget(&$array, $keys)\n {\n Arr::forget($array, $keys);\n }", "function array_forget(&$array, $keys)\n {\n Arr::forget($array, $keys);\n }", "public function keepItemsInArrayCanUseClosure() {}", "protected function _cleanupArray(&$array)\n\t{\n\t\tif( !$array ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach( $array as $key => $value ) {\n\t\t\tif( is_object( $value ) ) {\n\t\t\t\tunset( $array[ $key ] );\n\t\t\t}\n\t\t\telseif( is_array( $value ) ) {\n\t\t\t\t$this->_cleanupArray( $array[ $key ] );\n\t\t\t}\n\t\t}\n\t}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function cleanIntArrayDataProvider() {}", "static function remove(&$array,$value = false,$strict = false){\n\t\tif(!is_array($array)){\n\t\t\tthrow new \\Exception('Parameter must be an array');\n\t\t}\n\t\t$existingKey = array_search($value,$array);\n\t\twhile($existingKey !== false){\n\t\t\tunset($array[$existingKey]);\n\t\t\t$existingKey = array_search($value,$array,$strict);\n\t\t}\n\t\treturn $array;\n\t}", "function unsetByValue(array $array, $value):array\n{\n if (($key = array_search($value, $array)) !== false) {\n unset($array[$key]);\n }\n\n return $array;\n}", "function ArrayRemoveEmpty($arr)\r\n{\r\n $arr = array_filter($arr);\r\n return $arr;\r\n}", "function array_pop(&$array)\n{\n}", "function array_remove(array &$arr, $key) {\n if (array_key_exists($key, $arr)) {\n $val = $arr[$key];\n unset($arr[$key]);\n\n return $val;\n }\n\n return null;\n}", "function array_remove(array &$array, callable $pred)\n{\n $i = array_index_of($array, $pred);\n if (null === $i) {\n return null;\n }\n\n $v = $array[$i];\n if (is_numeric_array($array)) {\n array_splice($array, $i, 1);\n } else {\n unset($array[$i]);\n }\n\n return $v;\n}", "function arrayClean(&$array) {\n\tif (!is_array($array)) return null;\n\treturn array_filter($array, create_function('$o', 'return !empty($o);'));\n}", "protected function clearArray($value)\n\t{\n\t\treturn array_values(array_unique(array_map('intval', $value)));\n\t}", "function array_forget(&$array, $keys)\n {\n return Arr::forget($array, $keys);\n }", "public function scrubArray(array $data) : array;", "public static function clearEmptyValues($array) {\r\n\r\n/*\tThis function unsets any empty values in an associate array\r\n\tand returns the array back. This is useful, perhaps, if we \r\n\texpect some $_POST values are unset and we need to clear \r\n\tthose empty values out of the array. */\r\n\r\n foreach ($array as $key => $value) {\r\n \tif ($value == \"\") { unset($array[$key]); }\r\n }\r\n \r\n return $array;\r\n \r\n}", "function cleanArray($array)\r\n\t{\r\n\t\tif (is_array($array))\r\n\t\t{\r\n\t\t\tforeach ($array as $key => $sub_array)\r\n\t\t\t{\r\n\t\t\t\t$result = $this->cleanArray($sub_array);\r\n\t\t\t\tif ($result === false)\r\n\t\t\t\t{\r\n\t\t\t\t\tunset($array[$key]);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$array[$key] = $result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif (empty($array))\r\n\t\t{\r\n\t\t\t//return false;\r\n\t\t}\r\n\t\r\n\t\treturn $array;\r\n\t\r\n\t}", "function unsetArrays()\n{\n\t//clear popular features global array\n\tif (isset($_SESSION[\"popular-type\"][0]) == true)\n\t{\n\t\t$upperBound = sizeof($_POST[\"popular-type\"]);\n\n\t\tfor ($i = 1; $i <= $upperBound; $i++)\n\t\t{\n\t\t\tunset($_SESSION[\"popular-type\"][$i]);\n\t\t}\n\t}\n\t\n\t//clear other features global array\n\tif (isset($_SESSION[\"other-type\"][0]) == true)\n\t{\n\t\t$upperBound = sizeof($_POST[\"other\"]);\n\n\t\tfor ($i = 1; $i <= $upperBound; $i++)\n\t\t{\n\t\t\tunset($_SESSION[\"other-type\"][$i]);\n\t\t}\n\t}\n}", "private function arrayClean($array)\n {\n foreach ($array as $key=>$value) {\n if(is_array($value))\n $this->arrayClean($value);\n else if($value!==null)\n unset($value);\n }\n }", "function clean(&$a, $k = null)\n {\n if (isArrayAccess($a)) {\n $a->offsetUnset($k);\n\n return $a;\n }\n if (is_null($k)) {\n //clean all\n $a = [];\n\n return $a;\n } else {\n if (isArray($k)) {\n foreach ($k as $delKey) {\n unset($a[$delKey]); //clean by key\n }\n\n return $a;\n } else {\n unset($a[$k]); //clean by key\n\n return $a;\n }\n }\n }", "public static function array_cleanup( $array, $toDelete )\n {\n foreach($toDelete as $del){\n $cloneArray = $array;\n foreach( $cloneArray as $key => $value )\n {\n if($del === $key)\n unset( $array[ $key ] );\n }\n }\n return $array;\n }", "function cleanArray($array) {\n\t foreach ($array as $index => $value) {\n\t if(is_array($array[$index])) $array[$index] = $this->cleanArray($array[$index]);\n\t if (empty($value)) unset($array[$index]);\n\t\t if (count($array[$index]) == 0) unset($array[$index]);\n\t }\n\t return $array;\n\t}", "public /*void*/ function offsetUnset(/*scalar*/ $offset)\n\t{\n\t\tif(isset($this->_data[$offset]))\n\t\t\tunset($this->_data[$offset]);\n\t}", "function _del_p(&$ary)\n{\n foreach ($ary as $k => $v) {\n if ($k === '_p') {\n unset($ary[$k]);\n } elseif (is_array($ary[$k])) {\n _del_p($ary[$k]);\n }\n }\n}", "public function offsetUnset($offset);", "public function offsetUnset($offset);", "function clear_array ( $a ) {\n if ($a !== array()) {\n $b = array();\n foreach ( $a as $key => $value ) {\n if (is_array($value)) {\n if (clear_array($value) !== false) {\n $b[$key] = clear_array ( $value );\n }\n } elseif ($value !== '') {\n $b[$key] = $value;\n }\n }\n if ($b !== array()) {\n return $b;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "function arrayRemove($array, $values, $reorder=false) {\n $values = (array)$values;\n foreach($values as $value) {\n while(false !== ($loc = array_search($value, $array))) unset($array[$loc]);\n }\n return ($reorder ? array_values($array) : $array);\n}", "public function clear() {\n\t\t$this->array = array();\n\t}", "public function offsetUnset($offset)\n\t{\n\t\tif(isset(self::$arrayMap[$offset])) {\n\t\t\t$this->{self::$arrayMap[$offset]} = null;\n\t\t}\n\t}", "public static function __clearSetArray(){\r\n self::$_units = array();\r\n self::$_totalGrade = array();\r\n self::$_totalUnitsFail = array();\r\n self::$_totalUnitsPass = array();\r\n self::$_remarks = array();\r\n }", "function elimina($array,$valore){\n\t\t// verifico che il valore sia compreso nell'array\n\t\tif(in_array($valore,$array)){\n\t\t\t$chiave=array_search($valore,$array);\n\t\t\t// rimuovo il valore passando ad unset la chiave recuperata usando array_search\n\t\t\tunset($array[$chiave]); \n\t\t\t\n\t\t\t// restituisco l'array dopo averlo re-indicizzato\n\t\t\treturn array_values($array);\n\t\t}else{\n\t\t\t// se non trovo corrispondenze restituisco l'array così com'è\n\t\t\treturn $array;\n\t }\n\t}", "function clean_global_array($arr)\n\t{\n\t\t$clean_arr = array();\n\t\tforeach($arr as $key => $value)\n\t\t{\n\t\t\t$clean_arr[] = \n\t\t\t\tfilter_input_array(\n\t\t\t\t\tINPUT_POST,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"$key\" => array(\n\t\t\t\t\t\t\t'filter' => FILTER_CALLBACK,\n\t\t\t\t\t\t\t'options' => 'clean_input'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t}\n\t\t$clean_array = array();\n\t\t// this loop to make this array n instead of n^2\n\t\tforeach($clean_arr as $key => $value)\n\t\t{\n\t\t\tforeach($value as $k => $val)\n\t\t\t$clean_array[$k] = $val;\n\t\t}\n\t\treturn $clean_array;\n\t}", "function remove_empty_arrays($array)\n{\n foreach ($array as $key => &$value) {\n if (is_array($value)) {\n if (isEmpty($value)) {\n unset($array[$key]);\n } //isEmpty($value)\n } //is_array($value)\n } //$array as $key => &$value\n unset($value);\n return $array;\n}", "function delete_array($array)\n{\n\t// get arguments\n\t$args = func_get_args();\n\t// unset first arg, b/c it is the array\n\tunset($args[0]);\n\t// if args = array in array, turn into just array\n\tif(isset($args[1]) && is_array($args[1]))\n\t{\n\t\t$args = $args[1];\n\t}\n\t// remove specified fields from array\n\t$array = _delete_array($array, $args);\n\t// remove empty elements from array\n\t$array = empty_array($array);\n\t// return array\n\treturn $array;\n}", "public function testOffsetUnset()\n\t{\n\t\tunset($this->instance[2]);\n\n\t\t$this->assertNull($this->instance[2]);\n\t}", "public function testArrayAccessUnsetBadOffset()\r\n\t{\r\n\t\t$this->setExpectedException( 'OutOfBoundsException' );\r\n\t\tunset( $this->list['foo'] );\r\n\t}", "function array_remove($array, $val){\n $vals = func_get_args(); $vals = array_shift($vals);\n return array_diff($array, array($val));\n}", "function del_empty($arr)\n{\n\tforeach ($arr as $key => $value)\n\t{\n\t\tif (trim(strval($value))!='')\n\t\t\t$rzygi[$key] = $value;\n\t}\n\treturn $rzygi;\n}", "private function removeFromArray(array &$array, array $path): void\n {\n $previous = null;\n $tmp = &$array;\n\n foreach ($path as $node) {\n $previous = &$tmp;\n $tmp = &$tmp[$node];\n }\n\n if (null !== $previous && true === isset($node)) {\n unset($previous[$node]);\n }\n }", "public function offsetUnset(mixed $offset): void\n {\n if (Arr::accessible($this->value)) {\n unset($this->value[$offset]);\n }\n }", "function clear()\n \t{\n \t\tforeach ($this as &$value) \n \t\t $value = null;\n \t}", "public function offsetUnset($offset)\n {\n\n // unset gibt es nicht, nur set null\n if (isset($this->data[$offset])) {\n $this->synchronized = false;\n $this->data[$offset] = null;\n }\n\n }", "function removeItemsByValue(&$array,$itemsToRemove) {\r\n\t\tforeach($array as $key => $value) {\r\n\t\t\tif(in_array($value,$itemsToRemove)) unset($array[$key]);\r\n\t\t}\r\n\t}", "function array_remove($element, $array) {\n $index = array_search($element, $array);\n array_splice($array, $index, 1);\n return $array;\n }", "function acf_unarray($val)\n{\n}", "public function offsetUnset($offset)\n {\n }", "public function getInternalArray() {}", "public function removeUnusedObjects()\n {\n // Setze ein Array mit used-Einträgen auf false\n $entries = $this->crossReferenceTable->getAll();\n $used = [];\n foreach ($entries as $objectNumber => $value) {\n $used[$objectNumber] = false;\n }\n $used[0] = true; // Eintrag Nummer 0 muss existieren.\n\n // Laufe alle Referenzen durch\n $this->findIndirectReferences($this->trailerDictionary, $used);\n\n // Entferne nicht genutzte Objekte\n foreach ($used as $objectNumber => $objectUsed) {\n if (!$objectUsed) {\n $this->crossReferenceTable->removeEntry($objectNumber);\n //echo \"Removed Object $objectNumber\\n\";\n }\n }\n }", "public function removeValuesFromOutputArray(){\n\t\ttry{\n\t\t\t$this->filteredOutput = array();\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage(),3,\"/var/tmp/error.log\");\n\t\t\terror_log(\"\\n\");\n\t\t}\n\t}", "protected function array_remove($arr, $value) {\n\t\treturn array_values(array_diff($arr, array($value)));\n\t}", "function _del_p(&$ary) {\n\t foreach ($ary as $k=>$v) {\n\t if ($k==='_p') unset($ary[$k]);\n\t elseif (is_array($ary[$k])) $this->_del_p($ary[$k]);\n\t }\n\t}", "public function testArrayAccessUnsetBadOffset()\r\n\t{\r\n\t\t$this->setExpectedException( 'InvalidArgumentException' );\r\n\t\tunset( $this->list['foo'] );\r\n\t}", "function AlertsArrayRemoveEmpty($arr)\r\n{\r\n if (isset($arr)):\r\n if (!is_array($arr)) {\r\n echo \"Make sure the parameter is an array \";\r\n } else {\r\n $arr = array_filter($arr);\r\n }\r\n\r\n return $arr;\r\n endif;\r\n}", "function remove_array($array_name){\n $removed = 0;\n $ret = array();\n $set = $this->get_settings();\n\n //get line numbers of current settings\n if( strpos($array_name, '[') === false ){\n //only the array name was passed, without []\n $config_value = $array_name;\n }else{\n $config_value = substr($array_name, 0, strpos($array_name, '[') ); //this is the value of $key without [n]. this is used for the array name when writing it back\n }\n exec( $set['CMD_GREP'].' -n \"'.$config_value.'\" '.$this->_settings_file.' | '.$set['CMD_CUT'].' -d: -f1', $ret); // $ret[] will contain line number with current settings\n\n //loop over returned values and remove the lines\n for( $x = count($ret)-1 ; $x >= 0 ; --$x ){ //go backwards or line numbers need to be adjusted\n exec( $set['CMD_SED'].' \"'.$ret[$x].'d\" '.$this->_settings_file.' > '.$this->_settings_file.'.back');\n// exec('sed -e :a -e \\'/^\\n*$/{$d;N;};/\\n$/ba\\' '.$this->_settings_file.'.back');\n exec('mv '.$this->_settings_file.'.back '.$this->_settings_file.'');\n ++$removed;\n }\n\n return $removed;\n}", "public function removeAll () {\n\t\t$this->exchangeArray(array());\n\t}", "function array_forget(&$array, $key)\n\t{\n\t\t$keys = explode('.', $key);\n\n\t\twhile (count($keys) > 1)\n\t\t{\n\t\t\t$key = array_shift($keys);\n\n\t\t\tif ( ! isset($array[$key]) || ! is_array($array[$key]))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$array =& $array[$key];\n\t\t}\n\n\t\tunset($array[array_shift($keys)]);\n\t}", "public function array_remove(&$array, $value)\n {\n return array_filter($array, function($a) use($value) {\n return $a !== $value;\n });\n }", "public function offsetUnset($offset): void\n {\n unset($this->array[$offset]);\n }", "public function cleanupPointers();", "public function offsetUnset($offset) {\n return;\n }", "function arrayShift($array) {\n\n unset($array[0]);\n return $array;\n}", "private static function removeFromArray($value, array $array): array {\n\t\t$tmpNew = [];\n\t\t$i = 0;\n\n\t\t// Process for each array item. Construct new array without the searched value\n\t\tforeach($array as $itemValue) {\n\t\t\tif($value != $itemValue) {\n\t\t\t\t$tmpNew[$i] = $itemValue;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\treturn $tmpNew;\n\t}", "public static function removedFromArray($old_array, $new_array) {\r\n\r\n/*\tThis function returns those values that exist in the old \r\n\tarray, but are no longer found in the new one. Those \r\n\tvalues have essentially been \"removed\" to the old array. */\r\n\r\n $removed = array_diff($old_array, $new_array);\r\n return $removed;\r\n \r\n}", "public function offsetUnset($offset): void;", "function trim_array(&$arr) \n {\n foreach ($arr as $k => $v) {\n if (is_array($v))\n App::trim_array($arr[$k]);\n else\n $arr[$k] = trim($v);\n }\n }", "function empty_array($array)\n{\n\t// loop through array\n\tforeach($array as $key => $element)\n\t{\n\t\t// if element is empty delete it\n\t\tif( empty($element) )\n\t\t{\n\t\t\tunset($array[$key]);\n\t\t}\n\t\t// if element is array\n\t\telseif( is_array($array[$key]) )\n\t\t{\n\t\t\t// loop through children\n\t\t\t$array[$key] = empty_array($array[$key]);\n\t\t}\n\t}\n\t// return clean array\n\treturn $array;\n}", "function clearXss(array &$array, AntiXSS $antiXSS)\n{\n foreach ($array as &$value) {\n if (\\is_array($value)) {\n clearXss($value, $antiXSS);\n } else {\n $value = $antiXSS->xss_clean($value);\n }\n }\n}", "function offsetUnset(/*. mixed .*/ $offset)\n\t\t/*. throws BadMethodCallException .*/ {}", "function sanitizeArray( &$data, $whatToKeep )\n{\n $data = array_intersect_key( $data, $whatToKeep ); \n \n foreach ($data as $key => $value) {\n\n $data[$key] = sanitizeOne( $data[$key] , $whatToKeep[$key] );\n\n }\n}", "public function testOffsetUnset()\n {\n $bag = new ArrayAttributeBag('foobar_storageKey');\n $bag->set('foo', 'bar');\n\n unset($bag['foo']);\n\n $this->assertFalse($bag->has('foo'));\n }", "public function testRemoveValue()\n {\n $value = new \\stdClass();\n $this->generator->registerValue($value);\n $this->generator->removeValue($value);\n\n $registeredValues = iterator_to_array($this->generator->getWeightedValues());\n $this->assertEquals(0, count($registeredValues));\n }", "private function desabilitaPoolIdsObjetosManipulados()\n {\n \t// setando para null o atributo _arrayObjetosManipulados\n \t$this->_arrayObjetosManipulados = null;\n }", "public function removerFinal(array &$array)\n\t{\n\t\treturn array_pop($array);\n\t}", "function __return_empty_array()\n {\n }", "public function offsetUnset( $offset ) {\n\t\t// ...\n\t}", "function filterOutArrayIndexed($array)\r\n{\r\n $filtered_array = array();\r\n if (is_array($array)) {\r\n foreach ($array as $arr => $value) {\r\n if (!is_int($arr)) {\r\n $filtered_array[$arr] = $value;\r\n }\r\n }\r\n return $filtered_array;\r\n } else {\r\n return false;\r\n }\r\n\r\n}", "function unsetArray($array){\n\n foreach($array as $subKey => $subArray ){\n if($subArray['item_id'] == $_GET['delete']){\n //echo $subKey['item_id'];\n //echo $_GET['delete'];\n unset($array[$subKey]);\n }\n }\n return $array;\n }", "function nonBlacklistedDistunguishednameArray($array,$refused=\"\"){\n $cleanArray = array();\n foreach ($array as $dn) {\n if(blacklistedDistinguishedname($dn,$refused)==FALSE){\n array_push($cleanArray,$dn);\n }\n }\n return $cleanArray;\n}", "function remove_values(array $hand, string $val):array {\n return array_values(array_filter($hand, function ($el) use ($val) {return $el[0] !== $val;}));\n}", "function ArrayRemoveEmptyOrder($arr)\r\n{\r\n\r\n $arr = array_filter($arr);\r\n\r\n $newMy = array();\r\n $i = 0;\r\n\r\n foreach ($arr as $key => $value) {\r\n if (!is_null($value)) {\r\n $newMy[$i] = $value;\r\n $i++;\r\n }\r\n }\r\n return $newMy;\r\n}", "function array_remove(array &$array, $keys) {\n $original = &$array;\n\n if ( ! is_array($keys)) {\n $keys = array($keys);\n }\n\n foreach ((array) $keys as $key) {\n $parts = explode('.', $key);\n\n while (count($parts) > 1) {\n $part = array_shift($parts);\n\n if (isset($array[$part]) && is_array($array[$part])) {\n $array = &$array[$part];\n }\n }\n\n unset($array[array_shift($parts)]);\n\n $array = &$original;\n }\n }", "function array_delete($array, $element) {\n return array_diff($array, [$element]);\n}", "public static function delAll () {\n\t\tself::$timeArray = Array ();\n\t}", "public static function remove_nondbkeys($array) {\n unset($array['fieldaliases']);\n\t\t\treturn $array;\n\t\t}", "public function offsetUnset($offset)\n {\n unset($this->getValue()[$offset]);\n }" ]
[ "0.64107144", "0.6385838", "0.63625085", "0.63030386", "0.618334", "0.6123956", "0.6058442", "0.60106206", "0.5993708", "0.5973204", "0.5956171", "0.5956171", "0.59279144", "0.59057975", "0.5904087", "0.5904087", "0.5903962", "0.5903962", "0.5903962", "0.58981085", "0.5897071", "0.58887714", "0.58685625", "0.58680576", "0.5856569", "0.58504254", "0.5840384", "0.5761541", "0.5724596", "0.5694503", "0.5692601", "0.5641959", "0.5641136", "0.56356454", "0.5635034", "0.5627391", "0.5610784", "0.55971813", "0.55868465", "0.5583411", "0.5583411", "0.55772364", "0.55750495", "0.55516034", "0.55477285", "0.5546532", "0.55386835", "0.55352646", "0.55176556", "0.550233", "0.54983497", "0.54845923", "0.5480283", "0.5470762", "0.54706705", "0.54631424", "0.5457147", "0.5450914", "0.54421556", "0.5423182", "0.5410905", "0.54059416", "0.5397657", "0.5393475", "0.537377", "0.53660274", "0.53598106", "0.53548086", "0.5349776", "0.53397775", "0.5336947", "0.53347063", "0.5330699", "0.53305143", "0.5323774", "0.5306246", "0.5304205", "0.53030056", "0.52879256", "0.52841866", "0.5271609", "0.5267161", "0.5266092", "0.5257345", "0.52472687", "0.52464724", "0.5245415", "0.5242555", "0.52408206", "0.5232488", "0.5228075", "0.52272063", "0.5226922", "0.52214783", "0.5213955", "0.52012205", "0.519091", "0.518344", "0.51723623", "0.5171931", "0.5168582" ]
0.0
-1
The act of reading the 100th item after reaching 100 items means we clean up here.
public function testAppendToOverMaxSizeWithAccess() { $array = new \ComplexPie\CacheArray(); $max = \ComplexPie\CacheArray::MAX_CACHE_SIZE + 1; for ($i = 0; $i < $max; $i++) { $array[] = $i; $array[$i]; } $this->assertSame(1, count($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}", "public function test_get_many_does_not_return_exceeded_entries()\n {\n // be checked for expiration...\n $con = $this->newConnection();\n\n $mainStorage = $this->newMainStorage($con);\n\n\n $storage = $this->newStorage($mainStorage);\n\n $until = (new \\DateTime());\n $storage->put('foo', 'bar', [], $until);\n $storage->put('baz', 'boing', [], $until);\n\n $storage2 = $this->newTestStorage($mainStorage);\n\n $storage2->now = time() + 100;\n\n $this->assertEquals([], $storage2->several(['foo', 'baz']));\n }", "protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }", "private function fetchMore(): void\n {\n $url = $this->client->urlTo($this->cql, $this->position, $this->count, $this->extraParams);\n $body = $this->client->request('GET', $url);\n $this->lastResponse = new SearchRetrieveResponse($body);\n $this->data = $this->lastResponse->records;\n\n if (count($this->data) != 0 && $this->data[0]->position != $this->position) {\n throw new Exceptions\\InvalidResponseException(\n 'Wrong index of first record in result set. '\n . 'Expected: ' .$this->position . ', got: ' . $this->data[0]->position\n );\n }\n }", "public function performRewind() {\n $this->data = array();\n $this->currentPage = 0;\n $this->currentCount = 0;\n }", "protected function checkForMorePages()\n {\n $this->hasMore = $this->items->count() > $this->limit;\n\n $this->items = $this->items->slice(0, $this->limit);\n }", "protected function _scanAndReap()\n {\n while ($info = $this->_multi->infoRead()) {\n $handle = $info['handle'];\n $result = $info['result'];\n $request = $this->_requests[(int)$handle];\n\n if ($result !== CURLE_OK) {\n $message = $request->getHandle()->error();\n $request->error(new \\Bronto\\Transfer\\Exception($message, $result, $request));\n } else {\n $content = $this->_multi->getcontent($handle);\n $info = $request->getHandle()->getinfo();\n $request->complete(new Response($content, $info));\n }\n $this->remove($request);\n }\n }", "public function rewind(): void {\n reset($this->items);\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function getAndRemoveFirstItem ();", "public function dequeueItems() {\n $this->datasource()->stopTracking(array($this));\n _search_api_empty_cron_queue($this);\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "protected function _afterLoad()\n {\n foreach ($this->_items as $key => $item) {\n $message = $this->_messageList->getMessageByIdentity($item->getIdentity());\n if ($message) {\n $item->setText($message->getText());\n if (array_key_exists($message->getSeverity(), $this->_countBySeverity)) {\n $this->_countBySeverity[$message->getSeverity()]++;\n } else {\n $this->_countBySeverity[$message->getSeverity()] = 1;\n }\n } else {\n unset($this->_items[$key]);\n }\n }\n }", "public function benchLpopInternal()\n {\n $messageList = $this->queue->consume(self::CONSUME_SIZE);\n }", "public function consumeItemFromQueue(){\n $record = $this->storageEngine->getNextQueueItemToProcess();\n if($record){\n return $record;\n }\n return -1; //will cause the worker to sleep\n }", "protected function end_bulk_operation() {\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}", "public function rewind()\n {\n reset($this->_items);\n }", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "function wprss_delete_oldest_feed_items( $n, $source ) {\n // If the source does not exist, do nothing\n if ( get_post( $source ) == NULL ) return;\n\n // Make sure $n is an integer\n $n = intval($n);\n\n // Do nothing if n is zero or negative\n if ( $n <= 0 ) return;\n\n // Get the feed items, as an array, not WP_Query.\n // We will need to perform some array operations\n $feed_items = wprss_get_feed_items_for_source( $source );\n $feed_items = $feed_items->get_posts();\n // Get number of feed items\n $count = count( $feed_items );\n\n // Index of first feed item to delete\n $start = $count - $n;\n // Cut the array of feed items to get the items to delete\n $to_delete = array_slice( $feed_items, $start );\n // log -- for now\n foreach( $to_delete as $fi ) {\n //wprss_log_obj( \"To delete\" , $fi->ID );\n }\n }", "public function testBurnCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "function readItems() {return $this->_items;}", "protected function end_bulk_operation() {\n\t\t\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}", "protected function getItemsNumber() {\n\t\treturn 20;\n\t}", "protected function dispense(){\r\n\t\t$this->dispensed++;\r\n\t}", "public function clearItems()\n {\n $this->collItems = null; // important to set this to NULL since that means it is uninitialized\n }", "function readCount()\r\n {\r\n return count($this->_items);\r\n }", "public function tickerPear()\n {\n $limit = $this->max;\n // remove anything over 20\n while($this->length() > $limit){\n $this->shift();\n }\n\n }", "function _data_seek($n = 0)\n\t{\n\t\treturn;\n\t}", "public function rewind(): void\n {\n \\reset($this->responseData->_embedded->items);\n }", "public function __destruct() {\n // scope of a foreach) but it has not reached its end, we must sync\n // the client with the queued elements that have not been read from\n // the connection with the server.\n $this->sync();\n }", "public function getAndRemoveLastItem();", "public function clear(): void\n {\n $this->items = [];\n $this->length = 0;\n $this->cursor = 0;\n }", "public function reset()\n\t{\n\t\t$this->get(1);\n\t}", "public function clear()\n {\n $this->items = array();\n $this->itemsCount = 0;\n }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "function FetchNextObj() {}", "function readItemIndex() {return $this->_itemindex;}", "function garbageCollect() {\n\t\tif ( !mt_rand( 0, 100 ) ) {\n\t\t\t$nowtime = time();\n\t\t\t/* Avoid repeating the delete within a few seconds */\n\t\t\tif ( $nowtime > ($this->lastexpireall + 1) ) {\n\t\t\t\t$this->lastexpireall = $nowtime;\n\t\t\t\t$this->expireall();\n\t\t\t}\n\t\t}\n\t}", "public function clear() {\n try{\n unset($this->Items);\n $this->Items = array();\n }catch(Exception $e){\n throw $e;\n }\n }", "public function rewind_items() {\n\n\t\t$this->{$this->loop_vars['current_item']} = -1;\n\n\t\tif ( $this->{$this->loop_vars['item_count']} > 0 ) {\n\t\t\t$this->{$this->loop_vars['item_name']} = $this->{$this->loop_vars['item_name_plural']}[0];\n\t\t}\n\t}", "public function sweep(): int\n {\n $pruning = 0;\n foreach ($this->items as $key => $item) {\n if (null === $item) {\n // Item was removed from memory, delete from cache\n $this->delete($key);\n $pruning++;\n } elseif ($item instanceof Part) {\n // Skip ID related to Bot\n if ($key != $this->discord->id) {\n // Item is no longer used other than in the repository, weaken so it can be garbage collected\n $this->items[$key] = WeakReference::create($item);\n }\n }\n }\n if ($pruning) {\n $this->discord->getLogger()->debug('Pruning repository cache', ['count' => $pruning, 'class' => $this->class]);\n }\n\n return $pruning;\n }", "public function testDestroyData()\n {\n $store = new Storage(TESTING_STORE);\n\n // get id from our first item\n $id = $store->read()[0]['_id'];\n\n // destroy the data by id\n $store->destroy($id);\n\n // get the rest of data after destroy\n $rest_of_items = $store->read();\n\n // since our data is only one (no data left) the results must be === 0\n $this->assertEquals(0, count($rest_of_items));\n }", "public function getLastItem() {}", "public function getLastItem() {}", "protected function tearDown()\n {\n unset($this->item);\n }", "public function testPurgeWholeData()\n {\n $store = new Storage(TESTING_STORE);\n\n // do purging data\n $store->purge();\n\n // the results must be === 0\n $this->assertEquals(0, count($store->read()));\n }", "function read_all_items() {\n $db = GetGlobal('db');\n\t $lan = GetReq('lan')>=0?GetReq('lan'):getlocal();\t//in case of post sitemap set lan param uri \n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\t \n\t $start = GetReq('start');\n\t //$headcat = GetReq('headcat')?GetReq('headcat'):\"\";\t \n\t //$meter = $start?$start-1:0; \t \n\t \n\t \t\n $sSQL = \"select id,itmname,itmfname,cat0,cat1,cat2,cat3,cat4,itmdescr,itmfdescr,itmremark,\".$this->getmapf('code').\" from products \";\n\t $sSQL .= \" WHERE \";\n\t $sSQL .= \"itmactive>0 and active>0 \";\t\n\t //$sSQL .= \" GROUP BY cat0,$itmname\";\n\t $sSQL .= \" ORDER BY cat0,cat1,cat2,cat3,cat4,$itmname asc \";\n\t $sSQL .= $start ? \" LIMIT $start,10000\" : \" LIMIT 10000\";\t\t\t\n\t //echo $sSQL;\n\t\t\n\t $resultset = $db->Execute($sSQL,2);\t\n\t // $result = $resultset;\n\t $this->result = $resultset; \n \t $this->max_items = $db->Affected_Rows();//count($this->result);\t \n return (null);//$this->max_items);\t\t \n\t}", "public function next(): void {\n next($this->items);\n }", "public function testBufferPartial(): void\n {\n $items = new ArrayObject([1, 2, 3]);\n $iterator = new BufferedIterator($items);\n foreach ($iterator as $key => $value) {\n if ($key == 1) {\n break;\n }\n }\n $result = [];\n foreach ($iterator as $value) {\n $result[] = $value;\n }\n $this->assertEquals([1, 2, 3], $result);\n }", "function ujExif_db_delete_item_listener($_data,$_user,$_conf,$_args,$event)\n{\n if ($_args['module'] == 'ujExif') {\n // We don't anything for this module \n return $_data;\n }\n while (true) {\n // Do a thousand at a time - lower memory usage\n $_sp = array(\n \"limit\" => 1000,\n \"search\" => array(\n \"exif_module = {$_args['module']}\",\n \"exif_item_id = {$_args['_item_id']}\"\n ),\n \"exclude_jrProfile_keys\" => true,\n \"exclude_jrUser_keys\" => true,\n 'return_keys' => array('_item_id')\n );\n $_rt = jrCore_db_search_items('ujExif',$_sp);\n if (isset($_rt) && isset($_rt['_items']) && is_array($_rt['_items'])) {\n $_id = array();\n foreach ($_rt['_items'] as $_item) {\n $_id[] = (int) $_item['_item_id'];\n }\n // NOTE: Since exif entries have no media, we set the 3rd param to \"false\" - this\n // let's the delete function skip checking for associated item media.\n jrCore_db_delete_multiple_items('ujExif',$_id,false);\n }\n else {\n break;\n }\n }\n return $_data;\n}", "public function testBatchMintCollectionItems()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function readAll() {\n while ($info = curl_multi_info_read($this->mh)) {\n $ch = $info['handle'];\n $uid = (int)$ch;\n $request = $this->requests[$uid];\n $this->detach($request);\n $this->eventManager->notify('complete', array($this, $request));\n }\n }", "public function rewind(){\n \t$this->load();\n reset($this->bookings);\n }", "public function loadPreviousItems()\n {\n //first get it out of db.\n if ($orderId = $this->_order->check_cart($this->_auth->id)) {\n $order = $this->_order->get_order($orderId);\n $this->_items = unserialize($order['items']); \n $this->_shipping = array();\n $this->_shippingCost = array();\n $this->_salesTax = array();\n $this->_total = 0;\n $this->persist();\n }\n }", "function minimize_collection_data($raw_collections, $how_many = 0, $offset = 0)\n{\n if ($how_many > 0) {\n $limited_collections = array_slice($raw_collections, $offset, $how_many);\n }\n\n return $limited_collections;\n}", "protected function _afterLoad()\n {\n foreach ($this->_items as $item) {\n $this->getResource()->unserializeFields($item);\n }\n return parent::_afterLoad();\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "public function clear()\n {\n $this->items = array();\n }", "public function processItem($data)\n {\n $this->unpublishExpiredContents();\n }", "public function rewind(): void\n {\n if ($this->position != 1) {\n $this->position = 1;\n $this->data = [];\n $this->fetchMore();\n }\n }", "public function clearItems();", "function rewind (){ $this->key = -1; }", "private function resetCurrentItem()\n {\n $this->current_item = 0;\n }", "private static function fini(){\n\t\t\treturn self::$items;\n\t\t}", "protected function resetOldBeingIndexedEntries()\n {\n $timeLimit = $this->getMinutesToKeepBeingIndexedEntries();\n $resetCount = $this->resetItemsBeingIndexed($timeLimit);\n if ($resetCount > 0) {\n tx_rnbase_util_Logger::warn(\n 'Items in queue are resetted because they are in state \"being_indexed\" '.\n 'longer than the configured amount of time. Check that, if it occurs multiple times.',\n 'mksearch',\n [\n 'itemResetCount' => $resetCount,\n 'configuredTimeLimitInMin' => $timeLimit,\n ]\n );\n }\n\n return $resetCount;\n }", "function read10k($dir)\r\n{\r\n $listTemp = array();\r\n\r\n $file = fopen($dir, \"r\");\r\n\r\n $arr = array();\r\n while (!feof($file)) {\r\n\r\n $arr[] = fgets($file);\r\n\r\n if (count($arr) == 10000) {\r\n // write to temp file\r\n $temp = tempnam(\"/tmp/\", \"tmpfile\");\r\n $listTemp[] = $temp;\r\n\r\n $handle = fopen($temp, \"w\");\r\n fwrite($handle, join(\"\", soryArray($arr)));\r\n fclose($handle);\r\n \r\n $arr = array();\r\n }\r\n }\r\n fclose($file);\r\n\r\n return $listTemp;\r\n}", "public function emptyItems()\r\n\t{\r\n\t\t$this->_items = array();\r\n\t}", "protected function execute() \n {\n /** @var float */\n static $lastCleanUpTime = -999999999;\n\n $incCount = $this->_redis->getIncomingSize();\n if ($incCount > 0) {\n $this->log(\"$incCount elements in queue.\");\n $this->_redis->processMultiple($this->_redis->getIncoming(2000));\n }\n\n if ($this->_upTime() - $lastCleanUpTime > $this->ini['ttl']) {\n $this->_redis->cleanIndexes();\n $lastCleanUpTime = $this->_upTime();\n }\n }", "protected function get__futureItems()\n\t{\n\t\treturn NULL;\n\t}", "public function testIteratorDoesNotChangeNumberOfEntries()\n {\n $iterator = $this->createIterator(array(1, 2, 3));\n\n $this->assertCount(3, $iterator);\n }", "public function test_delete_item(): void\n {\n // Arrange\n $user = UserFactory::createOne()->object();\n $collectionLevel1 = CollectionFactory::createOne(['owner' => $user]);\n $collectionLevel2 = CollectionFactory::createOne(['parent' => $collectionLevel1, 'owner' => $user]);\n $collectionLevel3 = CollectionFactory::createOne(['parent' => $collectionLevel2, 'owner' => $user]);\n $item = ItemFactory::createOne(['collection' => $collectionLevel3, 'owner' => $user]);\n\n // Act\n $item->remove();\n\n $this->refreshCachedValuesQueue->process();\n\n // Assert\n $this->assertSame(0, $collectionLevel1->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel2->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel3->getCachedValues()['counters']['items']);\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "protected function _cleanClaimedPushes()\n {\n $readAdapter = $this->_getReadAdapter();\n $writeAdapter = $this->_getWriteAdapter();\n\n while (true) {\n $select = $readAdapter->select()\n ->from(\n array('push_queue' => $this->getTable('klarna_kcokred/push_queue'))\n )\n ->joinLeft(\n array('kco_order' => $this->getTable('klarna_kco/order')),\n 'push_queue.klarna_checkout_id = kco_order.klarna_checkout_id'\n )\n ->where('kco_order.is_acknowledged = ?', 1)\n ->limit(100);\n\n $pushQueueIds = $readAdapter->fetchCol($select);\n\n if (!$pushQueueIds) {\n break;\n }\n\n $condition = array('push_queue_id IN (?)' => $pushQueueIds);\n\n $writeAdapter->delete($this->getTable('klarna_kcokred/push_queue'), $condition);\n }\n\n return $this;\n }", "public function unsetLimit() {}", "public function clear()\n\t{\n\t\t$this->items = [];\n\t}", "function clear()\r\n {\r\n $this->items=array();\r\n }", "public function rewind(){\n $this->index = 0;\n }", "function Clear()\r\n {\r\n $this->_items = array();\r\n }", "public function reclaim();", "public function trim()\n\t{\n\t\twhile ($this->process_count() > 1)\n\t\t\tsleep(5);\n\n\t\t$this->trim_index_content();\n\t\t$this->trim_index_companies();\n\t}", "function testNormalItem() {\n $items = array(new Item('Elixir of the Mongoose', 2, 5));\n $gildedRose = new GildedRose($items);\n \n // check that normal item degrades as expected\n $gildedRose->update_quality();\n $this->assertEquals(1, $items[0]->sell_in);\n $this->assertEquals(4, $items[0]->quality);\n\n // second iteration for assurance \n $gildedRose->update_quality();\n $this->assertEquals(0, $items[0]->sell_in);\n $this->assertEquals(3, $items[0]->quality);\n\n // now that item is expired, it should degrade twice as fast \n $gildedRose->update_quality();\n $this->assertEquals(0, $items[0]->sell_in);\n $this->assertEquals(1, $items[0]->quality);\n\n // ensure item does not degrade below a quality of 0\n $gildedRose->update_quality();\n $this->assertEquals(0, $items[0]->sell_in);\n $this->assertEquals(0, $items[0]->quality);\n }", "function clear() {\n\t\t\t$this->items = [];\n\t\t}", "protected function getNextItems() {\n\t\ttry {\n\t\t\t$criteria = array(\n\t\t\t\t'next_attempt_time' => array('$lt' => new \\MongoDate()),\n\t\t\t\t'is_processing' => false,\n\t\t\t\t'is_catch_all' => false,\n\t\t\t\t'disposition' => \\Flux\\LeadSplit::DISPOSITION_UNFULFILLED,\n\t\t\t\t'attempt_count' => array('$lte' => 5),\n\t\t\t\t'__pid_fulfill' => array('$exists' => false)\n\t\t\t);\n\t\t\t/* @var $_queue \\Flux\\LeadSplit */\n\t\t\tself::$_queue->setIgnorePagination(false);\n\t\t\tself::$_queue->setItemsPerPage(self::WINDOW_SIZE);\n\t\t\t$queue_documents = self::$_queue->queryAll($criteria, array('_id' => true), false);\n\t\t\t$id_array = array();\n\t\t\tforeach ($queue_documents as $queue_document) {\n\t\t\t\t$id_array[] = $queue_document['_id'];\n\t\t\t}\n\t\t\t// Flag the items with the current pid, so we can pull the out later\n\t\t\tself::$_queue->updateMultiple(array('_id' => array('$in' => $id_array)),\n\t\t\t\tarray('$set' => array(\n\t\t\t\t\t'__pid_fulfill' => $this->pid,\n\t\t\t\t\t'__pid_fulfill_time' => new \\MongoDate(),\n\t\t\t\t\t'last_process_time' => new \\MongoDate(),\n\t\t\t\t\t'expire_at' => new \\MongoDate(strtotime('now + 1 hour')),\n\t\t\t\t\t'is_processed' => true\n\t\t\t\t)),\n\t\t\t\tarray('multiple' => true, 'upsert' => false)\n\t\t\t);\n\n\t\t\t// Now requery the rows that have the correct pid set\n\t\t\tself::$_queue->setIgnorePagination(true);\n\t\t\t$queue_documents = self::$_queue->queryAll(array('__pid_fulfill' => $this->pid));\n\t\t\treturn $queue_documents;\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->log($e->getMessage(), array($this->pid));\n\t\t\treturn array();\n\t\t}\n\t\treturn array();\n\t}", "function readItems($a_oldest_first = false)\n\t{\t\t\n\t\t//\n\t\tinclude_once(\"./Services/News/classes/class.ilNewsItem.php\");\n\t\t$it = new ilNewsItem();\n\t\t$it->setContextObjId($this->getId());\n\t\t$it->setContextObjType($this->getType());\n\t\t$this->itemsarray = $it->queryNewsForContext(false, 0, \"\", false, $a_oldest_first);\n\t\t\n\t\treturn $this->itemsarray;\n\t}", "private function validateModificationCount()\n {\n if (count($this) >= self::ITEM_LIMIT) {\n throw new \\OverflowException(\n sprintf('You must not do more than %d modifications per request', self::ITEM_LIMIT)\n );\n }\n }", "public function shift() { \n $item = $this->offsetGet(0);\n \n $this->itemsCollection()->update(array(), array('$pop' => array(\n self::ITEMS_OBJECT_NAME => -1\n )));\n \n $this->decrementLength();\n \n return $item;\n }", "public function dequeue()\n {\n return array_shift($this->items);\n }", "protected function cleanupChunks(){\n\t\tforeach (scandir($this->chunksFolder) as $item){\n\t\t\tif ($item == \".\" || $item == \"..\")\n\t\t\t\tcontinue;\n\n\t\t\t$path = $this->chunksFolder.DIRECTORY_SEPARATOR.$item;\n\n\t\t\tif (!is_dir($path))\n\t\t\t\tcontinue;\n\n\t\t\tif (time() - filemtime($path) > $this->chunksExpireIn){\n\t\t\t\t$this->removeDir($path);\n\t\t\t}\n\t\t}\n\t}", "public function dispense()\n {\n $this->sequence = 0;\n }", "protected function iterationComplete() { if(!$this->resultFreed) {\n try {\n $this->db->free_result($this->result);\n $this->resultFreed = true;\n } catch(Exception $ex) {}\n }\n }", "public function rewind()\n {\n $this->_counter = 0;\n }", "public function onItemRestock(array &$item)\r\n\t{\r\n\t\treturn;\r\n\t}", "public function readItems() {\r\n include('connect.php');\r\n\r\n $query = \"SELECT *\r\n FROM Items\r\n WHERE CharItem_id = ?\";\r\n $myquery = $db->prepare($query);\r\n $myquery->bindValue(1, $this->charStats->Char_id);\r\n $myquery->execute();\r\n while ($result = $myquery->fetchObject()) {\r\n $this->items[] = new Item($result->Item_id, $result->ItemName, $result->ItemWeight, $result->ItemValue, $result->ItemType);\r\n }\r\n }", "public function autoPostOpenQueueItems()\n\t{\n\t\t$helper = Mage::helper('fw_queue');\n\t\tif($helper->isQueueEnabled())\n\t\t{\n\t\t\t$start = -microtime(true);\n\t\t\t$collection = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$collection->addFieldToSelect('*');\n\t\t\t$collection->addFieldToFilter('status', array(array('eq' => '1'),array('eq' => '4')));\n\t\t\tforeach($collection as $queue_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t$queue->process();\n\t\t\t}\n\t\t\t//CLEAN-UP AND STOP ERROR QUEUE ITEMS\n\t\t\t$expired = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$expired->addFieldToSelect('*');\n\t\t\t$expired->addFieldToFilter('status', array(array('eq' => '4')));\n\t\t\t$expired->addFieldToFilter('number_attempts', array(array('gteq' => '75')));\n\t\t\tforeach($expired as $expire_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t//STATUS_ABORTED_NOTIFIED = 5\n\t\t\t\t$queue->changeStatus('5');\n\t\t\t}\n\n\t\t\t//CLEAN-UP OLD ITEMS\n\t\t\t$date = date('Y-m-d H:i:s', time());\n\t\t\t$queueLastAttemptDate = strtotime ( '-90 day' , strtotime ( $date ) ) ;\n\t\t\t$queueLastAttemptDate = date ( 'Y-m-d H:i:s' , $queueLastAttemptDate );\n\n\t\t\ttry {\n\t\t\t\t$queueItems = Mage::getModel('fw_queue/queue')\n\t\t\t\t->getCollection()\n\t\t\t\t->addFieldToSelect('*')\n\t\t\t\t->addFieldToFilter('last_attempt', array('to' => $queueLastAttemptDate));\n\n\t\t\t\t$queueItems->getSelect()->limit(10000);\n\n\t\t\t\tforeach ($queueItems as $queueItem)\n\t\t\t\t{\n\t\t\t\t\t$queueItem->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\tMage::logException($e->getMessage());\n\t\t\t}\n\t\t\t$totalTime = microtime(true) + $start;\n\t\t\t$span = gmdate(\"H:i:s\",$totalTime);\n\t\t\t$micro = substr($totalTime - floor($totalTime),2);\n\t\t\t$logLine = \"Queue executed in {$span}.{$micro}\\r\\n\";\n\t\t\tMage::Log($logLine,null,'fw_queue.log');\n\n\t\t\t//Dispatch Event to let fw_orderpublish know when queue is done running\n\t\t\t$eventData = array('queue_complete' => 'true');\n\t\t\tMage::dispatchEvent('fw_queue_run_complete');\n\t\t}\n\n\t}", "protected function getNextChunk(DataExportJob $job)\n {\n $firstItem = $job->getExportedItems();\n $items = $this->exportableHandler->getNextChunk($firstItem);\n \n return $items;\n }", "public function removeAll() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach ($items['items'] as $key => $item) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->delete( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "public function next()\n {\n next($this->_items);\n }", "public function clear()\n {\n $this->items = [];\n $this->saveItems();\n }" ]
[ "0.5592316", "0.55519426", "0.54810303", "0.5360313", "0.5282318", "0.52376854", "0.52289677", "0.5202418", "0.5190127", "0.5155725", "0.51357967", "0.513187", "0.51103723", "0.5107141", "0.51045936", "0.50891477", "0.50680745", "0.5064575", "0.5054794", "0.50439286", "0.50426966", "0.503073", "0.503073", "0.5017508", "0.49930185", "0.49718764", "0.49656555", "0.4960413", "0.49603647", "0.49516106", "0.49432337", "0.49375162", "0.49362105", "0.49344733", "0.49261147", "0.4925591", "0.4904848", "0.48615423", "0.48574182", "0.4853938", "0.48446676", "0.48426324", "0.48374534", "0.4830875", "0.48253196", "0.4822424", "0.4822424", "0.48099202", "0.4807241", "0.48042056", "0.48023316", "0.4793253", "0.47877553", "0.47848126", "0.47845638", "0.47823837", "0.47791526", "0.4768219", "0.47477183", "0.47364306", "0.47350743", "0.47314775", "0.47295517", "0.47279117", "0.47274694", "0.47248468", "0.47144204", "0.47135615", "0.46983168", "0.46974227", "0.46949556", "0.4693591", "0.46838918", "0.46815065", "0.4680576", "0.46644744", "0.46639875", "0.46636522", "0.46577427", "0.4653466", "0.46441847", "0.46405625", "0.46399012", "0.4638452", "0.46233878", "0.46210238", "0.46180362", "0.46160278", "0.4614742", "0.46091756", "0.4608463", "0.46021777", "0.459963", "0.4598337", "0.45952162", "0.45882472", "0.458678", "0.45826986", "0.45806417", "0.45729825", "0.45662755" ]
0.0
-1
When we set the 101st item we clear out all the items not new and not read.
public function testAppendToOverMaxSizeWithAccessToSpecific() { $array = new \ComplexPie\CacheArray(); $max = \ComplexPie\CacheArray::MAX_CACHE_SIZE; for ($i = 0; $i < $max; $i++) { $array[] = $i; } $array[1]; $array[2]; $array[3]; $array[] = $i; $this->assertSame(4, count($array)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::_ITEMS] = array();\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_APPLY_ITEM_ID] = null;\n $this->values[self::_RANK] = null;\n }", "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_NUM] = null;\n $this->values[self::_STATE] = null;\n $this->values[self::_APPLY_NUM] = null;\n $this->values[self::_ABLE_APP_COUNT] = null;\n }", "public function reset()\n {\n $this->values[self::_PER] = null;\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_ITEM_IDS] = array();\n $this->values[self::_NEW_HEROES] = array();\n $this->values[self::_SMASH_IDX] = array();\n }", "public function reset()\n\t{\n\t\t$this->get(1);\n\t}", "public function emptyItems()\r\n\t{\r\n\t\t$this->_items = array();\r\n\t}", "private function resetCurrentItem()\n {\n $this->current_item = 0;\n }", "public function clearItems();", "public function reset()\n {\n $this->values[self::_ITEMS] = array();\n $this->values[self::_GOLD] = null;\n $this->values[self::_SKILL_POINT] = null;\n }", "public function reset()\n {\n $this->values[self::ITEM] = null;\n $this->values[self::COUNT] = null;\n $this->values[self::USE_TYPE] = null;\n $this->values[self::TARGET] = null;\n $this->values[self::NAME] = null;\n $this->values[self::PARAMS_INT] = array();\n }", "public function reset()\n {\n $this->values[self::_ITEM_HISTORYS] = array();\n }", "function clear()\r\n {\r\n $this->items=array();\r\n }", "function Clear()\r\n {\r\n $this->_items = array();\r\n }", "public function reset()\n {\n $this->values[self::EQUIPMENTING_ITEM] = array();\n $this->values[self::HAVING_ITEM] = array();\n }", "public function reset()\n {\n $this->values[self::_MONEY] = null;\n $this->values[self::_RMB] = null;\n $this->values[self::_HEROES] = array();\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_INDEX] = null;\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_EXP] = null;\n }", "public function clear()\n {\n $this->items = array();\n $this->itemsCount = 0;\n }", "public function clear()\n {\n $this->items = array();\n }", "public function rewind(): void {\n reset($this->items);\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_TIMEOUT] = null;\n $this->values[self::_ITEM_COUNT] = null;\n $this->values[self::_RANK] = null;\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_JUMP_TIMES] = null;\n $this->values[self::_COST_MONEY] = null;\n }", "public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}", "public function clearItems()\n {\n $this->collItems = null; // important to set this to NULL since that means it is uninitialized\n }", "public function Clear()\n {\n $this->items = array();\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "function clear() {\n\t\t\t$this->items = [];\n\t\t}", "public function reset()\n {\n $this->values[self::_SYSTEM_SETTING_ITEM] = array();\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function clear()\n\t{\n\t\t$this->items = [];\n\t}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n $this->values[self::_ITEMS] = array();\n }", "public function clear(): void\n {\n $this->items = [];\n $this->length = 0;\n $this->cursor = 0;\n }", "public function reset()\n {\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_DPS_LIST] = array();\n $this->values[self::_ITEM_INFO] = array();\n }", "public function reset()\n {\n $this->values[self::_MEMBERS] = array();\n $this->values[self::_ITEMS] = array();\n }", "public function clear()\n {\n $this->items = [];\n $this->saveItems();\n }", "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_RECEIVER_NAME] = null;\n $this->values[self::_SEND_TIME] = null;\n $this->values[self::_SENDER_NAME] = null;\n }", "public function reset()\n {\n $this->values[self::_EXP] = null;\n $this->values[self::_MONEY] = null;\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HERO] = array();\n $this->values[self::_DIAMOND] = null;\n }", "public function reset()\n {\n foreach (self::AvailableCoins as $aCoin) {\n \t $sProperty = $aCoin['name'];\n $this->$sProperty = 0;\n }\n }", "public function reset()\n {\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HEROES] = array();\n $this->values[self::_MONTH_CARD] = null;\n }", "public function clear() {\n try{\n unset($this->Items);\n $this->Items = array();\n }catch(Exception $e){\n throw $e;\n }\n }", "public function rewind()\n {\n reset($this->_items);\n }", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_STATUS] = null;\n $this->values[self::_MAIL_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_CONTENT] = null;\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMONDS] = null;\n $this->values[self::_SKILL_POINT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_POINTS] = array();\n }", "public function reset()\n {\n $this->values[self::_RANK] = null;\n $this->values[self::_LEFT_COUNT] = null;\n $this->values[self::_LAST_BT_TIME] = null;\n $this->values[self::_BUY_TIMES] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n $this->values[self::_OPPOS] = array();\n }", "public function reset()\n {\n $this->values[self::_RANK_LIST] = array();\n }", "public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "public function clear() {\r\n\t\tif($this->current > 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->current = self::NONE;\r\n\t}", "public function reset() {\n\t\t\t$this->arList = NULL; \t\n\t\t}", "protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }", "public function clear(): void\n {\n $this->items = collect();\n\n $this->save();\n }", "public function reset()\n {\n $this->values[self::_LOOT] = array();\n $this->values[self::_ITEMS] = array();\n $this->values[self::_SHOP] = null;\n $this->values[self::_SSHOP] = null;\n }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "function reset() {\n\t\tparent::_resetSet();\n\t}", "public function reset()\n {\n $this->values[self::_TID] = null;\n $this->values[self::_RANK] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_STARS] = null;\n $this->values[self::_EXP] = null;\n $this->values[self::_GS] = null;\n $this->values[self::_STATE] = null;\n $this->values[self::_SKILL_LEVELS] = array();\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_TIME_OUT_END] = null;\n $this->values[self::_USER_ID] = array();\n }", "public function getAndRemoveFirstItem ();", "public function reset()\n {\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_SELF_RANKING] = null;\n $this->values[self::_SELF_SUMMARY] = null;\n }", "public function reset()\n {\n $this->values[self::_ID] = array();\n }", "public function rewind_items() {\n\n\t\t$this->{$this->loop_vars['current_item']} = -1;\n\n\t\tif ( $this->{$this->loop_vars['item_count']} > 0 ) {\n\t\t\t$this->{$this->loop_vars['item_name']} = $this->{$this->loop_vars['item_name_plural']}[0];\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::_CURRENT] = null;\n $this->values[self::_LASTCHANGE] = null;\n $this->values[self::_TODAYBUY] = null;\n $this->values[self::_LASTBUY] = null;\n }", "protected function _reset_write()\n\t{\n\t\t$this->_reset_run(array(\n\t\t\t'qb_set'\t=> array(),\n\t\t\t'qb_set_ub'\t=> array(),\n\t\t\t'qb_from'\t=> array(),\n\t\t\t'qb_join'\t=> array(),\n\t\t\t'qb_where'\t=> array(),\n\t\t\t'qb_orderby'\t=> array(),\n\t\t\t'qb_keys'\t=> array(),\n\t\t\t'qb_limit'\t=> FALSE\n\t\t));\n\t}", "function rewind (){ $this->key = -1; }", "public function reset()\n {\n $this->values[self::_IDX] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_VALUE] = null;\n }", "public function rewind(): void\n {\n \\reset($this->responseData->_embedded->items);\n }", "public function reset() {\n $this->values[self::TOTAL] = null;\n $this->values[self::COUNT] = null;\n $this->values[self::TOTAL_BUSLINE_NUM] = null;\n $this->values[self::AREAID] = null;\n }", "protected function _reset_write()\r\n\t{\r\n\t\t$this->_reset_run(array(\r\n\t\t\t'qb_set'\t=> array(),\r\n\t\t\t'qb_from'\t=> array(),\r\n\t\t\t'qb_join'\t=> array(),\r\n\t\t\t'qb_where'\t=> array(),\r\n\t\t\t'qb_orderby'\t=> array(),\r\n\t\t\t'qb_keys'\t=> array(),\r\n\t\t\t'qb_limit'\t=> FALSE,\r\n 'qb_lock_in_share_mode' => FALSE,\r\n 'qb_for_update' => FALSE\r\n\t\t));\r\n\t}", "public function reset()\n {\n $this->values[self::_RECORDS] = array();\n }", "function carrinho(){\n\t\t\t$this->items = array();\n\t\t}", "public function reset()\n {\n $this->values[self::_BATTLES] = array();\n }", "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function reset()\n {\n $this->values[self::_ACQUIRE] = array();\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_MEMBERS] = array();\n $this->values[self::_APPLIERS] = array();\n $this->values[self::_VITALITY] = null;\n $this->values[self::_SELF_VITALITY] = null;\n $this->values[self::_LEFT_DISTRIBUTE_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_FREQUENCY] = null;\n $this->values[self::_LAST_CHANGE] = null;\n }", "public function clearItemRatings()\n\t{\n\t\t$this->collItemRatings = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function rewind(){\n \t$this->load();\n reset($this->bookings);\n }", "public function reset()\n {\n $this->values[self::sku_arr] = array();\n $this->values[self::pagination] = null;\n }", "public function reset()\n {\n $this->values[self::_OPPOS] = array();\n }", "public function rewind() {\n $this->_key = 0;\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }", "public function reset()\n {\n $this->values[self::_COMP] = array();\n }", "abstract public function makeBlankItem();", "public function reset()\n {\n $this->values[self::_HP_PERC] = null;\n $this->values[self::_MP_PERC] = null;\n $this->values[self::_CUSTOM_DATA] = null;\n }", "public function clearItems()\n\t{\n\t\t$this->_items = array();\n\t\treturn $this;\n\t}", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_STAR_GOODS] = array();\n }", "public function reset()\n {\n $this->values[self::_SAY] = null;\n $this->values[self::_FRESH] = null;\n $this->values[self::_FETCH] = null;\n $this->values[self::_CHAT_ADD_BL] = null;\n $this->values[self::_CHAT_DEL_BL] = null;\n $this->values[self::_CHAT_BLACKLIST] = null;\n $this->values[self::_CHAT_BORAD_SAY] = null;\n }", "public function reset()\n {\n $this->values[self::INIT_BU] = null;\n $this->values[self::BU] = null;\n $this->values[self::GOLD] = null;\n $this->values[self::VIGOUR] = null;\n }", "public function reset()\n {\n $this->values[self::_CURRENT_RAID_ID] = null;\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_STAGE_PASS] = null;\n $this->values[self::_IS_CAN_JUMP] = null;\n }", "private function cObjData_reset()\n {\n $this->pObj->cObj->data = $this->cObjDataBak;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = implode( ', ', array_keys( $this->pObj->cObj->data ) );\n $prompt = 'Reset - cObj-data became this elements: ' . $prompt;\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }", "public function reset()\n {\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_STAGE_INDEX] = null;\n $this->values[self::_WAVE_INDEX] = null;\n $this->values[self::_HP_INFO] = array();\n }", "public function reset()\n {\n $this->values[self::RMB] = null;\n $this->values[self::CHARGE_SUM] = null;\n $this->values[self::HEROES] = array();\n $this->values[self::RECHARGE_LIMIT] = array();\n $this->values[self::_MONTH_CARD] = array();\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_MONEY] = null;\n }", "public function unsetInStockStockItems()\n {\n $this->_inStockStockItems = null;\n }", "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }", "protected function reset() {\n\t\t$this->data = array();\n\t}", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_LAST_AUTO_REFRESH_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_LAST_MANUAL_REFRESH_TIME] = null;\n $this->values[self::_TODAY_TIMES] = null;\n $this->values[self::_CURRENT_GOODS] = array();\n }", "public function __construct() {\n $this->item = array_fill(0, count($this->getMachinNames()) - 1, '');\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_BUY_TIMES] = null;\n }", "abstract protected function reset_values();", "public function resetData();", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }" ]
[ "0.64345783", "0.63590914", "0.62876505", "0.6282003", "0.62644154", "0.6234074", "0.62150097", "0.6171256", "0.61606157", "0.61222434", "0.61065227", "0.60917443", "0.608415", "0.6081429", "0.60432327", "0.603344", "0.6028012", "0.6021899", "0.5977743", "0.59549254", "0.5929805", "0.59209436", "0.59173125", "0.59095484", "0.59053326", "0.5889099", "0.58861923", "0.5865566", "0.58528507", "0.584805", "0.58399624", "0.58325255", "0.5812039", "0.5809555", "0.5753052", "0.5741361", "0.5738391", "0.57272243", "0.5706253", "0.56945056", "0.5690499", "0.5688334", "0.5661645", "0.56414896", "0.56397414", "0.5627928", "0.56235117", "0.5618877", "0.55967623", "0.55906534", "0.5566658", "0.5545701", "0.5544275", "0.554296", "0.5542931", "0.5539301", "0.55229634", "0.5519039", "0.5515628", "0.55072373", "0.5500419", "0.5484336", "0.54583174", "0.5448681", "0.5437175", "0.5430051", "0.5416325", "0.541048", "0.5409939", "0.54037434", "0.5401204", "0.5393264", "0.53887016", "0.53838253", "0.5378159", "0.5376417", "0.5374834", "0.53706425", "0.536687", "0.5364096", "0.5356642", "0.53434396", "0.5335671", "0.5333091", "0.53325975", "0.5325255", "0.5323143", "0.5318718", "0.5317192", "0.53038067", "0.5298523", "0.52938277", "0.52903", "0.5288776", "0.5277484", "0.5275082", "0.52738124", "0.52726614", "0.52604854", "0.52596635", "0.52596635" ]
0.0
-1
/ Just key for user access to other servers
public function actionKPT() { //$sid = CUser::model()->findByPk($this->user_id)->sess_id; //$kpt = md5($this->user_id . $sid . "I am robot"); echo CUser::kpt($this->user_id); exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_option_server_key() {\n $server_key = $this->options['server_key'];\n $this->display_input_text_field('server_key', $server_key);\n?>\nThe secret key that clients must use to clear the cache on this blog, passed in the <code><?php esc_attr_e($this->plugin->query_var()); ?></code> parameter.\n<?php\n }", "function auth_apikey($key){\n\t\n}", "public function getServerHostKey() {\n return @$this->attributes['server_host_key'];\n }", "public static function adminKey(){\n \n // Cache ID\n $cid = 'senior_systems_authkey';\n\n $expired = TRUE;\n\n if($cache = \\Drupal::cache()->get($cid)){\n // Was this cached within the last two hours?\n $expired = time() - $cache->created > 7200;\n }\n\n if (!$expired) {\n $key = $cache->data;\n } else {\n // Request a new authorization key\n $config = \\Drupal::config('senior_systems_api.settings');\n $params = array(\n 'username' => $config->get('username'),\n 'password' => $config->get('password'),\n );\n $service = self::service('UserManagementService');\n $result = $service->loginExt($params);\n $key = $result->AuthKey;\n\n // Don't cache a bad key\n $pattern = '/^\\w{8}(-\\w{4}){3}-\\w{12}$/';\n if(preg_match($pattern,$key)){\n \\Drupal::cache()->set($cid, $key);\n } else {\n // Don't return a bad key either\n return;\n }\n }\n\n return $key;\n\n }", "abstract protected function driverKey();", "function get_user_info( $user, $key )\n {\n //Unimplemented\n }", "public function display_option_client_key() {\n $client_key = $this->options['client_key'];\n $this->display_input_text_field('client_key', $client_key);\n?>\nThe key that the server requires for authentication, passed in the <code><?php esc_attr_e($this->plugin->query_var()); ?></code> parameter.\n<?php\n }", "private function get_server()\n {\n }", "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "function staticGet($k,$v=null)\n { return Memcached_DataObject::staticGet('User_yubikey',$k,$v); }", "function create_server_key($server_name, $config_dir){\r\n\t if (! (isset($_SESSION['password']))){\r\n\t\t start_session('certs.php?action=create_server&cert_name=$server_name');\r\n\t }\r\n\t $password = stripslashes(trim($_SESSION['password']));\r\n\t\t $username = stripslashes(trim($_SESSION['username']));\r\n\t\t if ($username == \"\"){\r\n\t\t\t\t $username = \"root\";\r\n\t\t\t }\r\n\t $ssh = new Net_SSH2('localhost');\r\n\t if (!$ssh->login($username, $password)) {\r\n\t\t exit('Login Failed');\r\n\t }\r\n\t$var_dir = $config_dir . \"easy-rsa/\";\r\n\t//first, source vars\r\n\techo \"<pre>Running . ./vars</pre>\";\r\n\techo str_repeat(' ',1024*64);//purge buffer\r\n\t$ssh->write(\"cd \".$var_dir.\";source ./vars\\n\");\r\n\t$ssh->setTimeout(10);\r\n\t$output = $ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>$output</pre>\";\r\n\techo str_repeat(' ',1024*64);\r\n\t\r\n\t//building server key\r\n\t$ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>Running Server Key Command... ./pkitool --server $server_name</pre>\";\r\n\t$ssh->write(\"cd \".$var_dir.\";./pkitool --server \".$server_name.\"\\n\");\r\n\t$ssh->setTimeout(10);\r\n\t$result = $ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>$result</pre>\";\t\r\n}", "public function key() : string\n {\n return 'local';\n }", "public function crack_ssh2john($privkey_path){\n\t}", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function access();", "protected function _getKeyInstanceName() {}", "protected function _getKeyInstanceName() {}", "function api_key() {\n\tif(check_value(chevereto_config('api_key'))) return chevereto_config('api_key');\n}", "public function registerClient() {\n // todo generate client key\n $serverKey = $server->registerClient($clientKey);\n // todo save server and client key\n }", "function authGet() { }", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "function cambiarClaveServSoc()\n {\n }", "function KeyExist () { // verifie l'existence des cles pour connexions ssh\n\treturn file_exists('/var/remote_adm/.ssh/id_rsa.pub');\n}", "public static function getServerCoreAccess() {\n return [ HOST => self::$__server_CORE_Host,\n PORT => self::$__server_CORE_Port,\n NAME => self::$__server_CORE_Name,\n USER => self::$__server_CORE_User,\n PASS => self::$__server_CORE_Pass ];\n }", "function secret_key_1(){\n return \"secret_key_1_password\";\n}", "function CreeKey () { // Creation de la cle pour ssh\n\tif (!file_exists('/var/remote_adm/.ssh')) {\n\t\tmkdir(\"/var/remote_adm/.ssh\",0744);\n\t}\n\tif (!file_exists('/var/remote_adm/.ssh/id_rsa.pub')) {\n\t\texec(\"/usr/bin/ssh-keygen -t rsa -N '' -f /var/remote_adm/.ssh/id_rsa\");\n\t}\n}", "function serverInfo() {\n\t}", "function set_key($key)\n\t{\n\t\tif(empty($key) || !isset($GLOBALS['ACCESS_KEYS'][$key])) return;\n\t\tif(ACCESS_MODEL === \"roles\") {\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $k) {\n\t\t\t\tif(substr($k, 0, 1) == '@') {\n\t\t\t\t\t// This key references another role - pull in all keys from that role\n\t\t\t\t\t$this->set_key(substr($k, 1));\n\t\t\t\t} else {\n\t\t\t\t\t$this->access_keys[] = $k;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL === \"discrete\") {\n\t\t\t$this->access_keys[] = $key;\n\t\t}\n\n\t\t$_SESSION['_ACCESS']['keys'] = $this->access_keys;\n\t}", "function get_key() {\n\t\t// get_cert() also fetches key\n\t\tif (!isset($_SESSION['user_key']))\n\t\t\t$this->get_cert();\n\t\treturn $_SESSION['user_key'];\n\t}", "public function sendAccess() {\n $request = \\Drupal::request();\n $acquia_key = Storage::getKey();\n if (!empty($acquia_key) && $request->get('key')) {\n $key = sha1(\\Drupal::service('private_key')->get());\n if ($key === $request->get('key')) {\n return AccessResultAllowed::allowed();\n }\n }\n return AccessResultForbidden::forbidden();\n }", "function cacheKey( $key )\n\t{\n\t\treturn $key.\"_\".MANUFACTURER_ID.getFirstSubDomain();\n\t}", "public function getSessionKeyServer() {\n\t\tlog_message('error', 'library getSessionKeyServer');\n\t\t$this->processing_code = \"1030\";\n\t\t$data = new stdClass();\n\t\t$data->p_id = $this->partner_id;\n\t\t$data->p_username = $this->partner_username;\n\t\t$data->p_pass = $this->partner_pass;\n\t\tlog_message('error', 'data request getSessionKeyServer: ' . print_r($data, true));\n\t\t$encryptData = $this->RSAencrypt(json_encode($data));\n\t\t$requestMegaV = $this->requestMegaVCore($encryptData);\n\t\tlog_message('error', 'data respone getSessionKeyServer: ' . print_r($requestMegaV, true));\n\t\t$respone = json_decode($requestMegaV, true);\n\t\tif(isset($respone['data']))\n\t\t{\n\t\t\t$sessionKey = $this->RSAdecrypt($respone['data']);\n\t\t\t\n\t\t\t$sessionKey = json_decode($sessionKey, true);\n\t\t\tif(isset($sessionKey['status']) && $sessionKey['status'] == \"00\")\n\t\t\t{\n\t\t\t\tif($sessionKey['status'] == \"00\")\n\t\t\t\t{\n\t\t\t\t\t$redis = new CI_Redis();\n\t\t\t\t\t$redis->set('SESSION_KEY', $sessionKey['session_key']);\n\t\t\t\t\t$redis->expire('SESSION_KEY', SESSION_KEY_TTL);\n\t\t\t\t\treturn $sessionKey['session_key'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// log $sessionKey['status']\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function getApiKey()\n\t{\n\t\treturn Mage::helper('core')->decrypt(Mage::getStoreConfig('whitePages_configuration/options/api_key'));\n\t}", "public function getPrivateMasterKey();", "public function mikrotik_access() {\n\t\treturn true;\n\t}", "function getLocalKey() {\n\t\t\t$localKey = $this->settings[\"localkey\"];\n\t\t\t\n\t\t\t\n\t\t\tif ( (trim($localKey[0]) == \"\") || (!$this->isLocalKeyCurrent() ) ){\n\t\t\t\tif ($this->debug) echo \"<BR>Local Key has expired\"; // Get a new local key from the remote server\n\t\t\t\t$localKey = $this->refreshLocalKey();\n\t\t\t\t$localKeySplit = explode(\"|\", $localKey);\n\t\t\t\t$this->localKeySplit = $localKeySplit;\n\t\t\t\t$this->localKey = $localKey;\n\t\t\t\t$this->updateSetting(\"localkeysplit\", $localKeySplit);\n\t\t\t\t$this->updateSetting(\"localkey\", $localKey);\n\t\t\t\tif ($this->debug) echo \"<BR>Got new local key: $localKey\";\n\t\t\t\tif ($this->debug) echo \"<BR>Expires on \" . date(\"d-m-y H:i:s\", $localKeySplit[3]);\n\t\t\t} else {\n\t\t\t\tif ($this->debug) echo \"<BR>Got saved local key: $localKey\";\n\t\t\t\t$this->updateSetting(\"lastLocalValidate\", time());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $localKey;\n\t\t\t\n\t\t}", "public function SetKey($key = ''){\n \tself::$userKey = $key;\n }", "function check_originator($clean_data = false)\n{\n $timenow = date(\"U\");\n if (($timenow - $clean_data[\"appheader\"][\"transmissiondatetime\"]) > 3600) {\n return false;\n }\n \n \n \n $conn = conn();\n $clean_data[\"privatekeypair\"] = false;\n \n if ($clean_data[\"appheader\"][\"key\"] == \"newlatcherinstallation\") {\n return $clean_data;\n }\n \n if ($result = mysqli_query($conn, \"SELECT * FROM session WHERE key='\" . $clean_data[\"appheader\"][\"key\"] . \"' LIMIT 1\")) {\n while ($row = mysqli_fetch_array($result)) {\n $clean_data[\"privatekeypair\"] = $row[\"key\"];\n }\n mysqli_free_result($result);\n }\n \n mysqli_close($conn);\n \n if ($clean_data[\"privatekeypair\"] === false) {\n return false;\n }\n \n return $clean_data;\n}", "public function getSessionKey();", "private function _getUserKey ($username, $key)\n\t{\n\t\t$realKey = $username . '_' . $key;\n\t\treturn $this->cache->get($realKey);\n\t}", "public function getPublicMasterKey();", "public function getSharedKey(): string;", "function rest_get_server()\n {\n }", "function userAccess() \n {\n //setup database connector\n $this->dbConn = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);\n if(!$this->dbConn) die(mysql_error($this->dbConn));\n mysql_select_db($this->dbName, $this->dbConn) or die(mysql_error($this->dbConn)); \n \n if(isset($_COOKIE[$this->cookieName]) && !$this->is_logged_in()){ // retrieve cookie if any\n $cookieInfo = unserialize(base64_decode($_COOKIE[$this->cookieName])); // unserialize cookie \n $this->login($cookieInfo['uname'],$cookieInfo['password']); // call login function\n } \n\n }", "function server($element){\r\n if(@isset($_SERVER[$element])) return $_SERVER[$element];\r\n else return FALSE;\r\n}", "function key(){\n\t\t$api_key = '42b85431eba6a84d17266021e817d2a6';\n\t\treturn $api_key;\n\t}", "function cms_srv($key)\n{\n if (isset($_SERVER[$key])) {\n return /*stripslashes*/\n ($_SERVER[$key]);\n }\n if ((isset($_ENV)) && (isset($_ENV[$key]))) {\n return /*stripslashes*/\n ($_ENV[$key]);\n }\n\n if ($key == 'HTTP_HOST') {\n if (!empty($_SERVER['HTTP_HOST'])) {\n return $_SERVER['HTTP_HOST'];\n }\n if (!empty($_ENV['HTTP_HOST'])) {\n return $_ENV['HTTP_HOST'];\n }\n if (function_exists('gethostname')) {\n return gethostname();\n }\n if (!empty($_SERVER['SERVER_ADDR'])) {\n return $_SERVER['SERVER_ADDR'];\n }\n if (!empty($_ENV['SERVER_ADDR'])) {\n return $_ENV['SERVER_ADDR'];\n }\n if (!empty($_SERVER['LOCAL_ADDR'])) {\n return $_SERVER['LOCAL_ADDR'];\n }\n if (!empty($_ENV['LOCAL_ADDR'])) {\n return $_ENV['LOCAL_ADDR'];\n }\n return 'localhost';\n }\n\n if ($key == 'SERVER_ADDR') { // IIS issue\n return cms_srv('LOCAL_ADDR');\n }\n\n return '';\n}", "function mswProdKeyGen() {\n $_SERVER['HTTP_HOST'] = (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : uniqid(rand(),1));\n $_SERVER['REMOTE_ADDR'] = (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] ? $_SERVER['REMOTE_ADDR'] : uniqid(rand(),1));\n if (function_exists('sha1')) {\n $c1 = sha1($_SERVER['HTTP_HOST'].date('YmdHis').$_SERVER['REMOTE_ADDR'].time());\n $c2 = sha1(uniqid(rand(),1).time());\n $prodKey = substr($c1.$c2,0,60);\n } elseif (function_exists('md5')) {\n $c1 = md5($_SERVER['HTTP_POST'].date('YmdHis').$_SERVER['REMOTE_ADDR'].time());\n $c2 = md5(uniqid(rand(),1),time());\n $prodKey = substr($c1.$c2,0,60);\n } else {\n $c1 = str_replace('.','',uniqid(rand(),1));\n $c2 = str_replace('.','',uniqid(rand(),1));\n $c3 = str_replace('.','',uniqid(rand(),1));\n $prodKey = substr($c1.$c2.$c3,0,60);\n }\n return strtoupper($prodKey);\n}", "function control_access($sKey, $id){ \r\n\t$permiso=false;\r\n\t$permisosAdmin=$_SESSION[\"R0l3sp3rM1s0s\"];\r\n\tif($permisosAdmin[$sKey][$id]==\"SI\"){\r\n\t\t$permiso=true;\r\n\t}\r\n\treturn $permiso;\r\n}", "private function setRateLimiterKey()\n {\n $this->rateLimiterKey = sha1($this->formRequestClass . request()->ip());\n }", "public function hash_cliente(){\n return md5($_SERVER['REMOTE_ADDR'].gethostbyaddr($_SERVER['REMOTE_ADDR']).$_SERVER['HTTP_USER_AGENT']);\n }", "public function info($key) {\n\t\t$cacheInfo = apc_cache_info('user');\n\t\tDebug::dump($cacheInfo);\t\t\n\t\t//return $dataInfo;\n\t}", "function HookResourceConnectAllGenerate_collection_access_key($collection,$k,$userref,$feedback,$email,$access,$expires)\n\t{\n\t$c=sql_value(\"select count(*) value from collection_resource where collection='$collection'\",0);\n\tif ($c>0) {return false;} # Contains resources, key already present\n\t\n\tsql_query(\"insert into external_access_keys(resource,access_key,collection,user,request_feedback,email,date,access,expires) values (-1,'$k','$collection','$userref','$feedback','\" . escape_check($email) . \"',now(),$access,\" . (($expires==\"\")?\"null\":\"'\" . $expires . \"'\"). \");\");\n\t\n\t}", "function input_server(string $key): ?string\n{\n return $_SERVER[$key];\n}", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function server( $key, $default = null ) {\n\t\tif ( !isset( $this->SERVER[strtoupper( $key )] ) ) \n\t\t{\n\t\t\treturn $default;\n\t\t}\n\t\treturn $this->SERVER[strtoupper( $key )];\n\t}", "public function OnInvalidKey()\n {\n $this->response(403, 'Access denied ' . $_SERVER['REMOTE_ADDR'], 'Unauthorized', null);\n }", "function create_client_key($client_name, $config_dir){\r\n\t if (! (isset($_SESSION['password']))){\r\n\t\t start_session('certs.php?action=create_client&cert_name=$client_name');\r\n\t }\r\n\t $password = stripslashes(trim($_SESSION['password']));\r\n\t\t $username = stripslashes(trim($_SESSION['username']));\r\n\t\t if ($username == \"\"){\r\n\t\t\t\t $username = \"root\";\r\n\t\t\t }\r\n\t $ssh = new Net_SSH2('localhost');\r\n\t if (!$ssh->login($username, $password)) {\r\n\t\t exit('Login Failed');\r\n\t }\r\n\t$var_dir = $config_dir . \"easy-rsa/\";\r\n\t//first, source vars\r\n\techo \"<pre>Running . ./vars</pre>\";\r\n\techo \"<pre>VAR DIR: \".$var_dir.\"</pre>\";\r\n\techo str_repeat(' ',1024*64);//purge buffer\r\n\t$ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\t$ssh->write(\"cd \".$var_dir.\";. ./vars\\n\");\r\n\t//$ssh->write(\"touch test.txt\\n\");\r\n\t$ssh->setTimeout(10);\r\n\t$output = $ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>$output</pre>\";\r\n\techo str_repeat(' ',1024*64);\r\n\t\r\n\t//building client key\r\n\t//$ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>Running Client Key Command... ./pkitool $client_name</pre>\";\r\n\t$ssh->write(\"cd \".$var_dir.\";./pkitool \".$client_name.\"\\n\");\r\n\t$ssh->setTimeout(10);\r\n\t$result = $ssh->read('/.*@.*[$|#]/', NET_SSH2_READ_REGEX);\r\n\techo \"<pre>$result</pre>\";\t\r\n}", "function ServerInfo() {}", "function GetKey() { return( $this->key ); }", "public function hasServerKey()\n {\n return $this->server_key !== null;\n }", "public function getServer();", "public function getServer();", "function getServerInfo();", "function __construct(){\n $s= gethostbyaddr ( $_SERVER['REMOTE_ADDR']);\n if ($s == 'apch-PC'){$this->server='local';}\n else {$this->server='gamisio';}\n }", "function _get_additional_user_keys($user)\n {\n }", "function get_user_api_key() {\n $currentUser = current_user();\n if ($currentUser) {\n $db = get_db();\n $res = $db->getTable('Key')->findBy(array('user_id' => $currentUser->id));\n if (sizeof($res) > 0) {\n return $res[0]->key;\n }\n }\n}", "public function getServiceKey() {}", "abstract public function credentials();", "function _mn_slingshot_keyauth_key_default() {\n $export = array();\n $keyauth_keys = new stdClass;\n $keyauth_keys->disabled = FALSE; /* Edit this to true to make a default keyauth_keys disabled initially */\n $keyauth_keys->api_version = 1;\n $keyauth_keys->title = 'Slingshot';\n $keyauth_keys->public_key = 'acf8b2bb295ccb58c1ad4e3a376a81cb';\n $keyauth_keys->private_key = 'cdb9381bfde2d9a14acf62c42345da5907b7aa14';\n\n $export['acf8b2bb295ccb58c1ad4e3a376a81cb'] = $keyauth_keys;\n return $export;\n}", "function _getUser()\n\t{\n\t\treturn 'root';\n\t}", "function indexAction() {\n \t$server = implode('.', explode('.', $_SERVER['SERVER_ADDR'], -1));\n \t$remote = implode('.', explode('.', $_SERVER['REMOTE_ADDR'], -1));\n \t\n try {\n \t$this->authenticateAction('add');\n \tif ($this->auth->getIdentity()->role == 'bidder') {\n \t\t\t$this->_helper->layout->setlayout('bid');\n \t}\n } catch (Metis_Auth_Exception $e) {\n \t$e->failed();\n \treturn;\n }\n }", "protected function getKey()\n {\n\treturn 'ip:' . $this->ip;\n }", "public function getDeveloperKey();", "public function host();", "function getAllAccess() {\n return ['download', 'remoteAccess', 'remoteService', 'enclave','notAvailable'];\n}", "public function getSharedKey(): string\n {\n return $this->sharedKey;\n }", "function init_site_secret()\n {\n \t$secret = md5(rand().microtime());\n \tif (datalist_set('__site_secret__', $secret))\n \t\treturn $secret;\n \t\t\n \treturn false;\n }", "public function getExtkey() {}", "public function setAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "private function metodo_privado() {\n }", "function get_api_key()\n{\n return get_global_value('api-key');\n}", "function access() {\n\t\treturn true;\n\t}" ]
[ "0.6051755", "0.603635", "0.59319615", "0.5930907", "0.5917902", "0.5827446", "0.5816584", "0.5803472", "0.5760974", "0.57557845", "0.5731684", "0.5728786", "0.57219845", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.57115257", "0.56715345", "0.566732", "0.566732", "0.5659624", "0.56587553", "0.5644083", "0.55800426", "0.55800426", "0.55800426", "0.55800426", "0.55800426", "0.55800426", "0.55792445", "0.55792445", "0.5574511", "0.55706626", "0.55428064", "0.55416197", "0.55258244", "0.5499047", "0.5498805", "0.5493036", "0.5475002", "0.5472076", "0.54589903", "0.54535055", "0.5445661", "0.5444024", "0.54429495", "0.54324764", "0.5417865", "0.5413267", "0.54066694", "0.5404115", "0.53843087", "0.5376603", "0.53747404", "0.5372331", "0.5363611", "0.5360534", "0.53547245", "0.5351068", "0.53493094", "0.53355825", "0.5326132", "0.5320885", "0.5320882", "0.5314528", "0.5314528", "0.5314528", "0.5314528", "0.53136367", "0.5311507", "0.53082496", "0.5295027", "0.52927965", "0.5290266", "0.5287252", "0.5287252", "0.5284041", "0.52820307", "0.5279807", "0.5273614", "0.5258768", "0.5255887", "0.5253633", "0.52381027", "0.5238032", "0.52315617", "0.52314913", "0.5230682", "0.5229536", "0.5228837", "0.5227324", "0.52260476", "0.5225832", "0.5214654", "0.5212553", "0.5203716" ]
0.0
-1
TO DO:delete all files
public function actionCancelconvert() { if (!empty($_POST['id'])) { CConvertQueue::model()->deleteUserQueue($this->user_id, $_POST['id']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteFiles() : void{\n $files = glob(self::DIRECTORY . '/*');\n foreach($files as $file){\n if(is_file($file))\n unlink($file);\n }\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "public function deleteUnusedFiles(){\n \n }", "public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }", "protected function removeFiles() {}", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }", "private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "public function cleanupFiles()\n {\n\n echo 'Cleaning ' . $this->accountID . ' - ' . $this->accountName . ' File Directories' . PHP_EOL;\n\n foreach (glob(\"{$this->commissionsOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->dailyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->monthlyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('2 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->metaFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(self::EXPORT_TMP_DIR . \"/*.txt\") as $filename) {\n unlink($filename);\n }\n\n echo 'Finished cleaning ' . $this->accountName . ' File Directories' . PHP_EOL;\n }", "public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }", "function deleteAllFiles($dir){\n\t$files = glob($dir); // get all file names\n foreach($files as $file){ // iterate files\n\t\t#echo $file;\n if(is_file($file)){\n unlink($file); // delete file\n\t\t\t#echo \"unlink \".$file.\"\\n\";\n\t\t}\n }\n #echo \"delete all files in \".$dir.\" \\n\";\n}", "function files_delete()\n{\n // remove module vars and masks\n xarModDelAllVars('files');\n xarRemoveMasks('files');\n\n // Deletion successful\n return true;\n}", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function removeRegisteredFiles() {}", "public function deleteFiles($del){\n\t\tforeach ($del as $file) {\n\t\t\techo \" : deleting : \" .$file. \" <br/>\";\n\t\t\tunlink($file);\n\t\t}\n\t}", "public function maybe_delete_files() {\n\n\t\t// If there are files to delete, delete them.\n\t\tif ( ! empty( gf_dropbox()->files_to_delete ) ) {\n\n\t\t\t// Log files being deleted.\n\t\t\t$this->log_debug( __METHOD__ . '(): Deleting local files => ' . print_r( gf_dropbox()->files_to_delete, 1 ) );\n\n\t\t\t// Delete files.\n\t\t\tarray_map( 'unlink', gf_dropbox()->files_to_delete );\n\n\t\t}\n\n\t}", "public function deleteAllFiles()\n {\n\t\t$data = $this->call(array(), \"DELETE\", \"sensors/files.json\");\n\t\treturn $data;\n }", "public function clean()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n\n $files = $dir->scanRecursive(\"*.css\");\n echo \"\\nDeleting Minified Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n\n unset($sourceFile);\n }\n\n $files = $dir->scanRecursive(\"*.js\");\n echo \"\\nDeleting Minified Js Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n unset($sourceFile);\n }\n }", "protected function clearFiles()\n {\n $dir = __DIR__ . '/../lang/i18n';\n FileSystem::clearDirectory($dir);\n }", "private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "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 }", "protected function cleanup() {\n $h = opendir($this->tmpdir);\n while (false !== ($e = readdir($h))) {\n if ($e!='.'&&$e!='..'&&is_file($this->tmpdir.'/'.$e)) unlink ($this->tmpdir.'/'.$e);\n }\n if (is_object($this->history)) $this->history->cleanup();\n closedir($h);\n rmdir($this->tmpdir);\n }", "private function purgefiles()\n\t{\n\t\t$params=JComponentHelper::getParams('com_jbolo');\n\t\t$uploaddir=JPATH_COMPONENT.DS.'uploads';\n\t\t$exp_file_time=3600*24*$params->get('purge_days');\n\t\t$currts=time();\n\t\techo \"<div class='alert alert-success'>\".\n\t\tJText::_('COM_JBOLO_PURGE_OLD_FILES');\n\t\t/*\n\t\t * JFolder::files($path,$filter,$recurse=false,$full=false,$exclude=array('.svn'),$excludefilter=array('^\\..*'))\n\t\t*/\n\t\t$current_files=JFolder::files($uploaddir,'',1,true,array('index.html'));\n\t\t//print_r($current_files);die;\n\t\tforeach($current_files as $file)\n\t\t{\n\t\t\tif( $file != \"..\" && $file != \".\" )\n\t\t\t{\n\t\t\t\t$diffts=$currts-filemtime($file);\n\t\t\t\tif($diffts > $exp_file_time )\n\t\t\t\t{\n\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_DELETING_FILE').$file;\n\t\t\t\t\tif(!JFile::delete($file)){\n\t\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_ERROR_DELETING_FILE').'-'.$file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</div>\";\n\t}", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }", "public function cleanCompilationFolder($files_to_delete)\n {\n foreach ($files_to_delete as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "protected function doCleanup() {\n $base = $this->tempPath();\n $dirs = array($base);\n\n if (is_dir($base)) {\n foreach ($this->recurse($base) as $file) {\n if (is_dir($file)) {\n $dirs[] = $file;\n } else {\n unlink($file);\n }\n }\n\n foreach (array_reverse($dirs) as $path) {\n rmdir($path);\n }\n }\n\n foreach (array(self::LOGFILE_STUB, self::STATEFILE_STUB, self::ZIPTEMP_STUB, self::ZIPCOMP_STUB) as $extra_file) {\n if (is_file($base.$extra_file)) {\n unlink($base.$extra_file);\n }\n }\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }", "public function delall()\n {\n }", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "private function deleteUnexistingFiles() {\n\t\t$files = array (\n\t\t\t\t// Release 2.0\n\t\t\t\t'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',\n\t\t\t\t'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-j4.php',\n\t\t\t\t'/components/com_clm_turnier/helpers/html/clm_turnier.php',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/media/com_clm_turnier/js/sonderranglisten-j4.php'\n\t\t);\n\n\t\t$folders = array (\n\t\t\t\t// Release 3.0\n\t\t\t\t'/components/com_clm_turnier/includes',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers/html',\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/components/com_clm_turnier/classes/'\n\t\t);\n\n\t\tjimport('joomla.filesystem.file');\n\t\tforeach ($files as $file) {\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) &&\n\t\t\t\t\t! JFile::delete(JPATH_ROOT . $file)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file), 'warning');\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\t\tforeach ($folders as $folder) {\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) &&\n\t\t\t\t\t! JFolder::delete(JPATH_ROOT . $folder)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder), 'warning');\n\t\t\t}\n\t\t}\n\t}", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "public function clear() {\n\t\t$files = $this->_getFiles();\n\t\t$this->out(count($files) . ' files found');\n\t\t$this->out('Aborting');\n\t\treturn;\n\t\t$looksGood = $this->in(__d('cake_console', 'Sure?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\t\tforeach ($files as $file) {\n\t\t\tunlink(BACKUPS . $file);\n\t\t}\n\t\t$this->out('Done: ' . __('%s deleted', count($files)));\n\t}", "public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "public function delete($files);", "public function deleteAllFiles(): bool {\n return $this->fileService->deleteDirectory('public/products');\n }", "protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "protected function utilPurgeOrphans()\n {\n if (!$this->confirmToProceed('This will PERMANENTLY DELETE files in \"system_files\" that do not belong to any other model.')) {\n return;\n }\n\n $orphanedFiles = 0;\n\n // Locate orphans\n $files = FileModel::whereNull('attachment_id')->get();\n\n foreach ($files as $file) {\n $file->delete();\n $orphanedFiles += 1;\n }\n\n if ($orphanedFiles > 0) {\n $this->comment(sprintf('Successfully deleted %d orphaned record(s).', $orphanedFiles));\n }\n else {\n $this->comment('No records to purge.');\n }\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete_all_files($user){\n $data['acc_yr'] = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n $acc_yr = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n \n $files = glob('./sProMAS_documents/'. $acc_yr.'/registration_files/'.$user.'/*'); // get all file names\n foreach($files as $file){ // iterate files\n if(is_file($file)){\n if(unlink($file)){\n $file_del=TRUE;\n } // delete file\n }\n }\n $data['user']=$user;\n if($file_del==TRUE){\n $data['message'] = 'File deleted successfully';\n } else {\n $data['message'] = 'File not deleted, Try again';\n } \n //$data['views']= array('manage_users/add_group_view');\n //page_load($data);\n \n }", "static function deleteFiles($pool) {\n $path = JPATH_COMPONENT.DS.\"data\".DS.$pool;\n system(\"rm -rf \".$path);\n $path = JPATH_COMPONENT.DS.\"private\".DS.$pool;\n system(\"rm -rf \".$path);\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public static function cleanupTempFolder(){\r\n\t\t$files = glob($_SERVER[\"DOCUMENT_ROOT\"] . \"/tmp/*\");\r\n\t\t$now = time();\r\n\r\n\t\tforeach($files as $file){\r\n\t\t\tif(is_file($file) && basename($file) != \".keep\"){\r\n\t\t\t\tif($now - filemtime($file) >= 60*60*24){\r\n\t\t\t\t\tunlink($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function flushCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\tunlink(UploadManager::UPLOAD_FOLDER . DIRECTORY_SEPARATOR . $file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine(sprintf('I have removed %s file(s).', $counter));\n\t}", "public function deleteUnexistingFiles()\n\t{\n\t\tinclude JPATH_ADMINISTRATOR . '/components/com_hierarchy/deletelist.php';\n\n\t\tjimport('joomla.filesystem.file');\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) && !JFile::delete(JPATH_ROOT . $file))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file));\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\n\t\tforeach ($folders as $folder)\n\t\t{\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) && !JFolder::delete(JPATH_ROOT . $folder))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder));\n\t\t\t}\n\t\t}\n\t}", "public function removeTemporaryFiles()\n {\n foreach ($this->temporaryFiles as $file) {\n $this->unlink($file);\n }\n }", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }", "public function delete_all()\n {\n }", "public function deleteAll(): void;", "public function cleanZipFolder()\r\n {\r\n foreach(glob(\"{$this->destination_dir}/*\") as $file)\r\n {\r\n if (is_file($file)) {\r\n unlink($file);\r\n }\r\n }\r\n }", "function delete_files($target) {\r\n\t\t\t\tif(is_dir($target)){\r\n\t\t\t\t\t//GLOB_MARK adds a slash to directories returned\r\n\t\t\t\t\t$files = glob( $target . '*', GLOB_MARK ); \r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $files as $file )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdelete_files( $file ); \r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\trmdir( $target );\r\n\t\t\t\t} elseif(is_file($target)) {\r\n\t\t\t\t\tunlink( $target ); \r\n\t\t\t\t}\r\n\t\t\t}", "public function clearAll()\n {\n $this->clearDir($this->file_path . '/sb_Cache');\n }", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "public function remove_files() {\n\t\t$rm = escapeshellarg( self::RM );\n\t\t$files = escapeshellarg( $this->tmp_dir );\n\n\t\t$this->exec_with_notify( escapeshellcmd( \"{$rm} -rf {$files}\" ) );\n\t}", "private function clearOldFiles()\r\n {\r\n // Buscando itens na pasta\r\n $files = new \\DirectoryIterator( $this->backupFolder );\r\n\r\n // Passando pelos itens\r\n $sortedFiles = array();\r\n foreach ($files as $file) {\r\n // Se for um arquivo\r\n if ($file->isFile()) {\r\n // Adicionando em um vetor, sendo o índice a data de modificação\r\n // do arquivo, para assim ordenarmos posteriormente\r\n $sortedFiles[$file->getMTime()] = $file->getPathName();\r\n }\r\n }\r\n\r\n // Ordena o vetor em ordem decrescente\r\n arsort( $sortedFiles );\r\n\r\n // Passando pelos arquivos\r\n $numberFiles = 0;\r\n foreach ($sortedFiles as $file) {\r\n $numberFiles++;\r\n // Se a quantidade de arquivo for maior que a quantidade\r\n // máxima definida\r\n if ($numberFiles > $this->maxNumberFiles) {\r\n // Removemos o arquivo da pasta\r\n unlink( $file );\r\n echo \"Apagado backup '{$file}'\" . PHP_EOL;\r\n }\r\n }\r\n\r\n }", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public static function _removeTmpFiles()\n {\n if (count($GLOBALS['_System_temp_files'])) {\n $delete = $GLOBALS['_System_temp_files'];\n array_unshift($delete, '-r');\n System::rm($delete);\n $GLOBALS['_System_temp_files'] = array();\n }\n }", "public function deleteQueuedSourceFiles()\n\t{\n\t\tforeach ($this->_sourcesToBeDeleted as $source)\n\t\t{\n\t\t\tIOHelper::deleteFile($source, true);\n\t\t}\n\t}", "public function cleanTempFiles()\n\t{\n\t\t$manifestData = $this->_getManifestData();\n\n\t\tforeach ($manifestData as $row)\n\t\t{\n\t\t\tif (UpdateHelper::isManifestVersionInfoLine($row))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rowData = explode(';', $row);\n\n\t\t\t// Delete any files we backed up.\n\t\t\t$backupFilePath = IOHelper::normalizePathSeparators(blx()->path->getAppPath().$rowData[0].'.bak');\n\n\t\t\tif (($file = IOHelper::getFile($backupFilePath)) !== false)\n\t\t\t{\n\t\t\t\tBlocks::log('Deleting backup file: '.$file->getRealPath(), \\CLogger::LEVEL_INFO);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Delete the temp patch folder\n\t\tIOHelper::deleteFolder($this->_unzipFolder);\n\n\t\t// Delete the downloaded patch file.\n\t\tIOHelper::deleteFile($this->_downloadFilePath);\n\t}", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function clearEditorTempFilesCommand()\n {\n /** @var EditorTempfile $editorTempFile */\n foreach ($this->editorTempfileRepository->findAll() as $editorTempFile) {\n $this->outputLine(\"Removing \" . $editorTempFile->getResource()->getFilename());\n $this->editorTempfileRepository->remove($editorTempFile);\n }\n $this->outputLine(\"Done.\");\n }", "function removePermanentlyDeletedFiles() {\n try {\n DB::beginWork('Start removing permanently deleted files');\n $files_to_delete = array();\n\n defined('STATE_DELETED') or define('STATE_DELETED', 0); // Make sure that we have STATE_DELETED constant defined\n\n if ($this->isModuleInstalled('files')) {\n // find file ids which are deleted\n $file_ids = DB::executeFirstColumn('SELECT id FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND state = ?', 'File', STATE_DELETED);\n // add their locations to cumulative list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT varchar_field_2 FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND id IN (?)', 'File', $file_ids));\n // add file versions locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids));\n // delete file versions\n DB::execute('DELETE FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids);\n } // if\n\n // add attachment locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'attachments WHERE state = ?', STATE_DELETED));\n\n // delete all files related to previously deleted objects\n if (is_foreachable($files_to_delete)) {\n foreach ($files_to_delete as $file_to_delete) {\n $full_path_to_delete = UPLOAD_PATH . '/' . $file_to_delete;\n if (is_file($full_path_to_delete)) {\n @unlink($full_path_to_delete);\n } // if\n } // foreach\n } // if\n\n DB::commit('Successfully removed permanently deleted files');\n } catch (Exception $e) {\n DB::rollback('Failed to remove permanently deleted files');\n return $e->getMessage();\n } // if\n\n return true;\n }", "public function clearCache()\n {\n $files = $this->ls('/', 'cache');\n foreach ($files as $file)\n {\n if (is_dir($this->cachePath . '/' . $file))\n {\n $this->$this->recurciveDelete($this->cachePath . '/' . $file);\n } else\n {\n unlink($this->cachePath . '/' . $file);\n }\n }\n }", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "function fileDelete(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteFile($GLOBALS['fileId']));\n\t\t\tdie();\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"filesURL\")));\n\t}", "public function file_delete($filename);", "abstract public function deleteAll();", "public function on_delete() {\n $this->remove_dir();\n }", "function imageAllDelete();", "function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }", "public function purge() {\r\n\t\t\t$sDefaultFile = 'errors.log';\r\n\t\t\t$sFileTime = @date('Ymd');\r\n\t\t\t$sPath = $sFileTime . '_' . $sDefaultFile;\r\n\t\t\tunlink($sPath);\r\n\t\t}", "public function cleanup() {\n foreach ($this->_cookies as $cookiefile) {\n unlink($cookiefile);\n }\n }", "public function deleteFiles()\r\n {\r\n $fileId = Input::get('FILE');\r\n $file = UploadedFiles::find($fileId);\r\n $path = public_path().'/';\r\n if($file!=null){\r\n $path.=$file->url;\r\n File::delete($path);\r\n $file->delete();\r\n Transaction::createTransaction('','',$file->fileName,'DELETE_FILE','FILE ID: '.$fileId,$file->project_id,'','','','','');\r\n return json_encode($fileId);\r\n }\r\n return \"-1\";\r\n }" ]
[ "0.8366082", "0.8031866", "0.7982506", "0.7955873", "0.77811146", "0.7763387", "0.7617359", "0.7597527", "0.75652146", "0.7562641", "0.75381976", "0.7446817", "0.7434486", "0.7404502", "0.73800445", "0.7359796", "0.7344691", "0.73439187", "0.73206186", "0.73157865", "0.7305992", "0.7272516", "0.7253236", "0.72299063", "0.7219083", "0.7195092", "0.7184797", "0.71769387", "0.71730727", "0.7167941", "0.71660876", "0.7139814", "0.712918", "0.7123819", "0.711237", "0.7107418", "0.70944804", "0.7087353", "0.7084216", "0.70800257", "0.70658314", "0.7054879", "0.7053286", "0.70494765", "0.7037616", "0.70335793", "0.7009755", "0.7006405", "0.6984707", "0.6972613", "0.69702077", "0.6957453", "0.6952303", "0.69342726", "0.69090956", "0.69057703", "0.68826175", "0.6876468", "0.6866747", "0.68603903", "0.6855459", "0.6844068", "0.6840075", "0.6836428", "0.6825986", "0.6807968", "0.68073046", "0.6801895", "0.67927843", "0.6788407", "0.6786104", "0.67859775", "0.6772011", "0.6767567", "0.67488337", "0.6744826", "0.6744497", "0.674448", "0.67438996", "0.6738714", "0.67268974", "0.67179203", "0.67084605", "0.66912764", "0.6691256", "0.6685797", "0.66783285", "0.66620374", "0.66463876", "0.66411597", "0.66411597", "0.66411597", "0.6636433", "0.66303325", "0.6618951", "0.6611148", "0.6605701", "0.6592328", "0.6590061", "0.65816486", "0.6576758" ]
0.0
-1
TO DO:delete all files
public function actionRestartqueue() { if (!empty($_POST['id'])) { CConvertQueue::model()->restartUserQueue($this->user_id, $_POST['id']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteFiles() : void{\n $files = glob(self::DIRECTORY . '/*');\n foreach($files as $file){\n if(is_file($file))\n unlink($file);\n }\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "public function deleteUnusedFiles(){\n \n }", "public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }", "protected function removeFiles() {}", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }", "private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "public function cleanupFiles()\n {\n\n echo 'Cleaning ' . $this->accountID . ' - ' . $this->accountName . ' File Directories' . PHP_EOL;\n\n foreach (glob(\"{$this->commissionsOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->dailyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->monthlyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('2 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->metaFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(self::EXPORT_TMP_DIR . \"/*.txt\") as $filename) {\n unlink($filename);\n }\n\n echo 'Finished cleaning ' . $this->accountName . ' File Directories' . PHP_EOL;\n }", "public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }", "function deleteAllFiles($dir){\n\t$files = glob($dir); // get all file names\n foreach($files as $file){ // iterate files\n\t\t#echo $file;\n if(is_file($file)){\n unlink($file); // delete file\n\t\t\t#echo \"unlink \".$file.\"\\n\";\n\t\t}\n }\n #echo \"delete all files in \".$dir.\" \\n\";\n}", "function files_delete()\n{\n // remove module vars and masks\n xarModDelAllVars('files');\n xarRemoveMasks('files');\n\n // Deletion successful\n return true;\n}", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function removeRegisteredFiles() {}", "public function deleteFiles($del){\n\t\tforeach ($del as $file) {\n\t\t\techo \" : deleting : \" .$file. \" <br/>\";\n\t\t\tunlink($file);\n\t\t}\n\t}", "public function maybe_delete_files() {\n\n\t\t// If there are files to delete, delete them.\n\t\tif ( ! empty( gf_dropbox()->files_to_delete ) ) {\n\n\t\t\t// Log files being deleted.\n\t\t\t$this->log_debug( __METHOD__ . '(): Deleting local files => ' . print_r( gf_dropbox()->files_to_delete, 1 ) );\n\n\t\t\t// Delete files.\n\t\t\tarray_map( 'unlink', gf_dropbox()->files_to_delete );\n\n\t\t}\n\n\t}", "public function deleteAllFiles()\n {\n\t\t$data = $this->call(array(), \"DELETE\", \"sensors/files.json\");\n\t\treturn $data;\n }", "public function clean()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n\n $files = $dir->scanRecursive(\"*.css\");\n echo \"\\nDeleting Minified Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n\n unset($sourceFile);\n }\n\n $files = $dir->scanRecursive(\"*.js\");\n echo \"\\nDeleting Minified Js Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n unset($sourceFile);\n }\n }", "protected function clearFiles()\n {\n $dir = __DIR__ . '/../lang/i18n';\n FileSystem::clearDirectory($dir);\n }", "private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "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 }", "protected function cleanup() {\n $h = opendir($this->tmpdir);\n while (false !== ($e = readdir($h))) {\n if ($e!='.'&&$e!='..'&&is_file($this->tmpdir.'/'.$e)) unlink ($this->tmpdir.'/'.$e);\n }\n if (is_object($this->history)) $this->history->cleanup();\n closedir($h);\n rmdir($this->tmpdir);\n }", "private function purgefiles()\n\t{\n\t\t$params=JComponentHelper::getParams('com_jbolo');\n\t\t$uploaddir=JPATH_COMPONENT.DS.'uploads';\n\t\t$exp_file_time=3600*24*$params->get('purge_days');\n\t\t$currts=time();\n\t\techo \"<div class='alert alert-success'>\".\n\t\tJText::_('COM_JBOLO_PURGE_OLD_FILES');\n\t\t/*\n\t\t * JFolder::files($path,$filter,$recurse=false,$full=false,$exclude=array('.svn'),$excludefilter=array('^\\..*'))\n\t\t*/\n\t\t$current_files=JFolder::files($uploaddir,'',1,true,array('index.html'));\n\t\t//print_r($current_files);die;\n\t\tforeach($current_files as $file)\n\t\t{\n\t\t\tif( $file != \"..\" && $file != \".\" )\n\t\t\t{\n\t\t\t\t$diffts=$currts-filemtime($file);\n\t\t\t\tif($diffts > $exp_file_time )\n\t\t\t\t{\n\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_DELETING_FILE').$file;\n\t\t\t\t\tif(!JFile::delete($file)){\n\t\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_ERROR_DELETING_FILE').'-'.$file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</div>\";\n\t}", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }", "public function cleanCompilationFolder($files_to_delete)\n {\n foreach ($files_to_delete as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "protected function doCleanup() {\n $base = $this->tempPath();\n $dirs = array($base);\n\n if (is_dir($base)) {\n foreach ($this->recurse($base) as $file) {\n if (is_dir($file)) {\n $dirs[] = $file;\n } else {\n unlink($file);\n }\n }\n\n foreach (array_reverse($dirs) as $path) {\n rmdir($path);\n }\n }\n\n foreach (array(self::LOGFILE_STUB, self::STATEFILE_STUB, self::ZIPTEMP_STUB, self::ZIPCOMP_STUB) as $extra_file) {\n if (is_file($base.$extra_file)) {\n unlink($base.$extra_file);\n }\n }\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }", "public function delall()\n {\n }", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "private function deleteUnexistingFiles() {\n\t\t$files = array (\n\t\t\t\t// Release 2.0\n\t\t\t\t'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',\n\t\t\t\t'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-j4.php',\n\t\t\t\t'/components/com_clm_turnier/helpers/html/clm_turnier.php',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/media/com_clm_turnier/js/sonderranglisten-j4.php'\n\t\t);\n\n\t\t$folders = array (\n\t\t\t\t// Release 3.0\n\t\t\t\t'/components/com_clm_turnier/includes',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers/html',\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/components/com_clm_turnier/classes/'\n\t\t);\n\n\t\tjimport('joomla.filesystem.file');\n\t\tforeach ($files as $file) {\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) &&\n\t\t\t\t\t! JFile::delete(JPATH_ROOT . $file)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file), 'warning');\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\t\tforeach ($folders as $folder) {\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) &&\n\t\t\t\t\t! JFolder::delete(JPATH_ROOT . $folder)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder), 'warning');\n\t\t\t}\n\t\t}\n\t}", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "public function clear() {\n\t\t$files = $this->_getFiles();\n\t\t$this->out(count($files) . ' files found');\n\t\t$this->out('Aborting');\n\t\treturn;\n\t\t$looksGood = $this->in(__d('cake_console', 'Sure?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\t\tforeach ($files as $file) {\n\t\t\tunlink(BACKUPS . $file);\n\t\t}\n\t\t$this->out('Done: ' . __('%s deleted', count($files)));\n\t}", "public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "public function delete($files);", "public function deleteAllFiles(): bool {\n return $this->fileService->deleteDirectory('public/products');\n }", "protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "protected function utilPurgeOrphans()\n {\n if (!$this->confirmToProceed('This will PERMANENTLY DELETE files in \"system_files\" that do not belong to any other model.')) {\n return;\n }\n\n $orphanedFiles = 0;\n\n // Locate orphans\n $files = FileModel::whereNull('attachment_id')->get();\n\n foreach ($files as $file) {\n $file->delete();\n $orphanedFiles += 1;\n }\n\n if ($orphanedFiles > 0) {\n $this->comment(sprintf('Successfully deleted %d orphaned record(s).', $orphanedFiles));\n }\n else {\n $this->comment('No records to purge.');\n }\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete_all_files($user){\n $data['acc_yr'] = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n $acc_yr = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n \n $files = glob('./sProMAS_documents/'. $acc_yr.'/registration_files/'.$user.'/*'); // get all file names\n foreach($files as $file){ // iterate files\n if(is_file($file)){\n if(unlink($file)){\n $file_del=TRUE;\n } // delete file\n }\n }\n $data['user']=$user;\n if($file_del==TRUE){\n $data['message'] = 'File deleted successfully';\n } else {\n $data['message'] = 'File not deleted, Try again';\n } \n //$data['views']= array('manage_users/add_group_view');\n //page_load($data);\n \n }", "static function deleteFiles($pool) {\n $path = JPATH_COMPONENT.DS.\"data\".DS.$pool;\n system(\"rm -rf \".$path);\n $path = JPATH_COMPONENT.DS.\"private\".DS.$pool;\n system(\"rm -rf \".$path);\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public static function cleanupTempFolder(){\r\n\t\t$files = glob($_SERVER[\"DOCUMENT_ROOT\"] . \"/tmp/*\");\r\n\t\t$now = time();\r\n\r\n\t\tforeach($files as $file){\r\n\t\t\tif(is_file($file) && basename($file) != \".keep\"){\r\n\t\t\t\tif($now - filemtime($file) >= 60*60*24){\r\n\t\t\t\t\tunlink($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function flushCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\tunlink(UploadManager::UPLOAD_FOLDER . DIRECTORY_SEPARATOR . $file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine(sprintf('I have removed %s file(s).', $counter));\n\t}", "public function deleteUnexistingFiles()\n\t{\n\t\tinclude JPATH_ADMINISTRATOR . '/components/com_hierarchy/deletelist.php';\n\n\t\tjimport('joomla.filesystem.file');\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) && !JFile::delete(JPATH_ROOT . $file))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file));\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\n\t\tforeach ($folders as $folder)\n\t\t{\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) && !JFolder::delete(JPATH_ROOT . $folder))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder));\n\t\t\t}\n\t\t}\n\t}", "public function removeTemporaryFiles()\n {\n foreach ($this->temporaryFiles as $file) {\n $this->unlink($file);\n }\n }", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }", "public function delete_all()\n {\n }", "public function deleteAll(): void;", "public function cleanZipFolder()\r\n {\r\n foreach(glob(\"{$this->destination_dir}/*\") as $file)\r\n {\r\n if (is_file($file)) {\r\n unlink($file);\r\n }\r\n }\r\n }", "function delete_files($target) {\r\n\t\t\t\tif(is_dir($target)){\r\n\t\t\t\t\t//GLOB_MARK adds a slash to directories returned\r\n\t\t\t\t\t$files = glob( $target . '*', GLOB_MARK ); \r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $files as $file )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdelete_files( $file ); \r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\trmdir( $target );\r\n\t\t\t\t} elseif(is_file($target)) {\r\n\t\t\t\t\tunlink( $target ); \r\n\t\t\t\t}\r\n\t\t\t}", "public function clearAll()\n {\n $this->clearDir($this->file_path . '/sb_Cache');\n }", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "public function remove_files() {\n\t\t$rm = escapeshellarg( self::RM );\n\t\t$files = escapeshellarg( $this->tmp_dir );\n\n\t\t$this->exec_with_notify( escapeshellcmd( \"{$rm} -rf {$files}\" ) );\n\t}", "private function clearOldFiles()\r\n {\r\n // Buscando itens na pasta\r\n $files = new \\DirectoryIterator( $this->backupFolder );\r\n\r\n // Passando pelos itens\r\n $sortedFiles = array();\r\n foreach ($files as $file) {\r\n // Se for um arquivo\r\n if ($file->isFile()) {\r\n // Adicionando em um vetor, sendo o índice a data de modificação\r\n // do arquivo, para assim ordenarmos posteriormente\r\n $sortedFiles[$file->getMTime()] = $file->getPathName();\r\n }\r\n }\r\n\r\n // Ordena o vetor em ordem decrescente\r\n arsort( $sortedFiles );\r\n\r\n // Passando pelos arquivos\r\n $numberFiles = 0;\r\n foreach ($sortedFiles as $file) {\r\n $numberFiles++;\r\n // Se a quantidade de arquivo for maior que a quantidade\r\n // máxima definida\r\n if ($numberFiles > $this->maxNumberFiles) {\r\n // Removemos o arquivo da pasta\r\n unlink( $file );\r\n echo \"Apagado backup '{$file}'\" . PHP_EOL;\r\n }\r\n }\r\n\r\n }", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public static function _removeTmpFiles()\n {\n if (count($GLOBALS['_System_temp_files'])) {\n $delete = $GLOBALS['_System_temp_files'];\n array_unshift($delete, '-r');\n System::rm($delete);\n $GLOBALS['_System_temp_files'] = array();\n }\n }", "public function deleteQueuedSourceFiles()\n\t{\n\t\tforeach ($this->_sourcesToBeDeleted as $source)\n\t\t{\n\t\t\tIOHelper::deleteFile($source, true);\n\t\t}\n\t}", "public function cleanTempFiles()\n\t{\n\t\t$manifestData = $this->_getManifestData();\n\n\t\tforeach ($manifestData as $row)\n\t\t{\n\t\t\tif (UpdateHelper::isManifestVersionInfoLine($row))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rowData = explode(';', $row);\n\n\t\t\t// Delete any files we backed up.\n\t\t\t$backupFilePath = IOHelper::normalizePathSeparators(blx()->path->getAppPath().$rowData[0].'.bak');\n\n\t\t\tif (($file = IOHelper::getFile($backupFilePath)) !== false)\n\t\t\t{\n\t\t\t\tBlocks::log('Deleting backup file: '.$file->getRealPath(), \\CLogger::LEVEL_INFO);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Delete the temp patch folder\n\t\tIOHelper::deleteFolder($this->_unzipFolder);\n\n\t\t// Delete the downloaded patch file.\n\t\tIOHelper::deleteFile($this->_downloadFilePath);\n\t}", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function clearEditorTempFilesCommand()\n {\n /** @var EditorTempfile $editorTempFile */\n foreach ($this->editorTempfileRepository->findAll() as $editorTempFile) {\n $this->outputLine(\"Removing \" . $editorTempFile->getResource()->getFilename());\n $this->editorTempfileRepository->remove($editorTempFile);\n }\n $this->outputLine(\"Done.\");\n }", "function removePermanentlyDeletedFiles() {\n try {\n DB::beginWork('Start removing permanently deleted files');\n $files_to_delete = array();\n\n defined('STATE_DELETED') or define('STATE_DELETED', 0); // Make sure that we have STATE_DELETED constant defined\n\n if ($this->isModuleInstalled('files')) {\n // find file ids which are deleted\n $file_ids = DB::executeFirstColumn('SELECT id FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND state = ?', 'File', STATE_DELETED);\n // add their locations to cumulative list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT varchar_field_2 FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND id IN (?)', 'File', $file_ids));\n // add file versions locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids));\n // delete file versions\n DB::execute('DELETE FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids);\n } // if\n\n // add attachment locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'attachments WHERE state = ?', STATE_DELETED));\n\n // delete all files related to previously deleted objects\n if (is_foreachable($files_to_delete)) {\n foreach ($files_to_delete as $file_to_delete) {\n $full_path_to_delete = UPLOAD_PATH . '/' . $file_to_delete;\n if (is_file($full_path_to_delete)) {\n @unlink($full_path_to_delete);\n } // if\n } // foreach\n } // if\n\n DB::commit('Successfully removed permanently deleted files');\n } catch (Exception $e) {\n DB::rollback('Failed to remove permanently deleted files');\n return $e->getMessage();\n } // if\n\n return true;\n }", "public function clearCache()\n {\n $files = $this->ls('/', 'cache');\n foreach ($files as $file)\n {\n if (is_dir($this->cachePath . '/' . $file))\n {\n $this->$this->recurciveDelete($this->cachePath . '/' . $file);\n } else\n {\n unlink($this->cachePath . '/' . $file);\n }\n }\n }", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "function fileDelete(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteFile($GLOBALS['fileId']));\n\t\t\tdie();\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"filesURL\")));\n\t}", "public function file_delete($filename);", "abstract public function deleteAll();", "public function on_delete() {\n $this->remove_dir();\n }", "function imageAllDelete();", "function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }", "public function purge() {\r\n\t\t\t$sDefaultFile = 'errors.log';\r\n\t\t\t$sFileTime = @date('Ymd');\r\n\t\t\t$sPath = $sFileTime . '_' . $sDefaultFile;\r\n\t\t\tunlink($sPath);\r\n\t\t}", "public function cleanup() {\n foreach ($this->_cookies as $cookiefile) {\n unlink($cookiefile);\n }\n }", "public function deleteFiles()\r\n {\r\n $fileId = Input::get('FILE');\r\n $file = UploadedFiles::find($fileId);\r\n $path = public_path().'/';\r\n if($file!=null){\r\n $path.=$file->url;\r\n File::delete($path);\r\n $file->delete();\r\n Transaction::createTransaction('','',$file->fileName,'DELETE_FILE','FILE ID: '.$fileId,$file->project_id,'','','','','');\r\n return json_encode($fileId);\r\n }\r\n return \"-1\";\r\n }" ]
[ "0.8366082", "0.8031866", "0.7982506", "0.7955873", "0.77811146", "0.7763387", "0.7617359", "0.7597527", "0.75652146", "0.7562641", "0.75381976", "0.7446817", "0.7434486", "0.7404502", "0.73800445", "0.7359796", "0.7344691", "0.73439187", "0.73206186", "0.73157865", "0.7305992", "0.7272516", "0.7253236", "0.72299063", "0.7219083", "0.7195092", "0.7184797", "0.71769387", "0.71730727", "0.7167941", "0.71660876", "0.7139814", "0.712918", "0.7123819", "0.711237", "0.7107418", "0.70944804", "0.7087353", "0.7084216", "0.70800257", "0.70658314", "0.7054879", "0.7053286", "0.70494765", "0.7037616", "0.70335793", "0.7009755", "0.7006405", "0.6984707", "0.6972613", "0.69702077", "0.6957453", "0.6952303", "0.69342726", "0.69090956", "0.69057703", "0.68826175", "0.6876468", "0.6866747", "0.68603903", "0.6855459", "0.6844068", "0.6840075", "0.6836428", "0.6825986", "0.6807968", "0.68073046", "0.6801895", "0.67927843", "0.6788407", "0.6786104", "0.67859775", "0.6772011", "0.6767567", "0.67488337", "0.6744826", "0.6744497", "0.674448", "0.67438996", "0.6738714", "0.67268974", "0.67179203", "0.67084605", "0.66912764", "0.6691256", "0.6685797", "0.66783285", "0.66620374", "0.66463876", "0.66411597", "0.66411597", "0.66411597", "0.6636433", "0.66303325", "0.6618951", "0.6611148", "0.6605701", "0.6592328", "0.6590061", "0.65816486", "0.6576758" ]
0.0
-1
TO DO:delete all files
public function actionRemove() { if (!isset($_POST['id'])) die("what?"); $id = (int) $_POST['id']; if ($id < 1) die("unknown file"); CUserfiles::model()->RemoveFile($this->user_id, $id); echo "OK"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteFiles() : void{\n $files = glob(self::DIRECTORY . '/*');\n foreach($files as $file){\n if(is_file($file))\n unlink($file);\n }\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "public function deleteUnusedFiles(){\n \n }", "public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }", "protected function removeFiles() {}", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }", "private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function cleanupFiles()\n {\n\n echo 'Cleaning ' . $this->accountID . ' - ' . $this->accountName . ' File Directories' . PHP_EOL;\n\n foreach (glob(\"{$this->commissionsOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->dailyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->monthlyFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('2 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(\"{$this->metaFileOutPath}/*.txt\") as $filename) {\n if (filemtime($filename) < strtotime('1 months ago')) {\n unlink($filename);\n }\n }\n\n foreach (glob(self::EXPORT_TMP_DIR . \"/*.txt\") as $filename) {\n unlink($filename);\n }\n\n echo 'Finished cleaning ' . $this->accountName . ' File Directories' . PHP_EOL;\n }", "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }", "function deleteAllFiles($dir){\n\t$files = glob($dir); // get all file names\n foreach($files as $file){ // iterate files\n\t\t#echo $file;\n if(is_file($file)){\n unlink($file); // delete file\n\t\t\t#echo \"unlink \".$file.\"\\n\";\n\t\t}\n }\n #echo \"delete all files in \".$dir.\" \\n\";\n}", "function files_delete()\n{\n // remove module vars and masks\n xarModDelAllVars('files');\n xarRemoveMasks('files');\n\n // Deletion successful\n return true;\n}", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function removeRegisteredFiles() {}", "public function deleteFiles($del){\n\t\tforeach ($del as $file) {\n\t\t\techo \" : deleting : \" .$file. \" <br/>\";\n\t\t\tunlink($file);\n\t\t}\n\t}", "public function maybe_delete_files() {\n\n\t\t// If there are files to delete, delete them.\n\t\tif ( ! empty( gf_dropbox()->files_to_delete ) ) {\n\n\t\t\t// Log files being deleted.\n\t\t\t$this->log_debug( __METHOD__ . '(): Deleting local files => ' . print_r( gf_dropbox()->files_to_delete, 1 ) );\n\n\t\t\t// Delete files.\n\t\t\tarray_map( 'unlink', gf_dropbox()->files_to_delete );\n\n\t\t}\n\n\t}", "public function deleteAllFiles()\n {\n\t\t$data = $this->call(array(), \"DELETE\", \"sensors/files.json\");\n\t\treturn $data;\n }", "public function clean()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n\n $files = $dir->scanRecursive(\"*.css\");\n echo \"\\nDeleting Minified Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n\n unset($sourceFile);\n }\n\n $files = $dir->scanRecursive(\"*.js\");\n echo \"\\nDeleting Minified Js Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n unset($sourceFile);\n }\n }", "protected function clearFiles()\n {\n $dir = __DIR__ . '/../lang/i18n';\n FileSystem::clearDirectory($dir);\n }", "private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "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 }", "protected function cleanup() {\n $h = opendir($this->tmpdir);\n while (false !== ($e = readdir($h))) {\n if ($e!='.'&&$e!='..'&&is_file($this->tmpdir.'/'.$e)) unlink ($this->tmpdir.'/'.$e);\n }\n if (is_object($this->history)) $this->history->cleanup();\n closedir($h);\n rmdir($this->tmpdir);\n }", "private function purgefiles()\n\t{\n\t\t$params=JComponentHelper::getParams('com_jbolo');\n\t\t$uploaddir=JPATH_COMPONENT.DS.'uploads';\n\t\t$exp_file_time=3600*24*$params->get('purge_days');\n\t\t$currts=time();\n\t\techo \"<div class='alert alert-success'>\".\n\t\tJText::_('COM_JBOLO_PURGE_OLD_FILES');\n\t\t/*\n\t\t * JFolder::files($path,$filter,$recurse=false,$full=false,$exclude=array('.svn'),$excludefilter=array('^\\..*'))\n\t\t*/\n\t\t$current_files=JFolder::files($uploaddir,'',1,true,array('index.html'));\n\t\t//print_r($current_files);die;\n\t\tforeach($current_files as $file)\n\t\t{\n\t\t\tif( $file != \"..\" && $file != \".\" )\n\t\t\t{\n\t\t\t\t$diffts=$currts-filemtime($file);\n\t\t\t\tif($diffts > $exp_file_time )\n\t\t\t\t{\n\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_DELETING_FILE').$file;\n\t\t\t\t\tif(!JFile::delete($file)){\n\t\t\t\t\t\techo '<br/>'.JText::_('COM_JBOLO_PURGE_ERROR_DELETING_FILE').'-'.$file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</div>\";\n\t}", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }", "public function cleanCompilationFolder($files_to_delete)\n {\n foreach ($files_to_delete as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "protected function doCleanup() {\n $base = $this->tempPath();\n $dirs = array($base);\n\n if (is_dir($base)) {\n foreach ($this->recurse($base) as $file) {\n if (is_dir($file)) {\n $dirs[] = $file;\n } else {\n unlink($file);\n }\n }\n\n foreach (array_reverse($dirs) as $path) {\n rmdir($path);\n }\n }\n\n foreach (array(self::LOGFILE_STUB, self::STATEFILE_STUB, self::ZIPTEMP_STUB, self::ZIPCOMP_STUB) as $extra_file) {\n if (is_file($base.$extra_file)) {\n unlink($base.$extra_file);\n }\n }\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }", "public function delall()\n {\n }", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "private function deleteUnexistingFiles() {\n\t\t$files = array (\n\t\t\t\t// Release 2.0\n\t\t\t\t'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',\n\t\t\t\t'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-j4.php',\n\t\t\t\t'/components/com_clm_turnier/helpers/html/clm_turnier.php',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/media/com_clm_turnier/js/sonderranglisten-j4.php'\n\t\t);\n\n\t\t$folders = array (\n\t\t\t\t// Release 3.0\n\t\t\t\t'/components/com_clm_turnier/includes',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers/html',\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/components/com_clm_turnier/classes/'\n\t\t);\n\n\t\tjimport('joomla.filesystem.file');\n\t\tforeach ($files as $file) {\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) &&\n\t\t\t\t\t! JFile::delete(JPATH_ROOT . $file)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file), 'warning');\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\t\tforeach ($folders as $folder) {\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) &&\n\t\t\t\t\t! JFolder::delete(JPATH_ROOT . $folder)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder), 'warning');\n\t\t\t}\n\t\t}\n\t}", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "public function clear() {\n\t\t$files = $this->_getFiles();\n\t\t$this->out(count($files) . ' files found');\n\t\t$this->out('Aborting');\n\t\treturn;\n\t\t$looksGood = $this->in(__d('cake_console', 'Sure?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\t\tforeach ($files as $file) {\n\t\t\tunlink(BACKUPS . $file);\n\t\t}\n\t\t$this->out('Done: ' . __('%s deleted', count($files)));\n\t}", "public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "public function delete($files);", "public function deleteAllFiles(): bool {\n return $this->fileService->deleteDirectory('public/products');\n }", "protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }", "public function purgeAll() {\n\t\tset_time_limit(300);\n\t\t$this->load->model(\"filehandlerbase\");\n\t\t$fileList = $this->filehandlerbase->findDeletedItems();\n\t\t$mfa = $this->input->post(\"mfa\");\n\t\t$serial = $this->input->post(\"arn\");\n\n\t\t/**\n\t\t * we need to cache this because MFA is only good once\n\t\t */\n\t\t$lastUsedToken = null;\n\t\tforeach($fileList as $fileEntry) {\n\t\t\t$fileHandler = $this->filehandler_router->getHandlerForObject($fileEntry->getFileObjectId());\n\t\t\tif(!$fileHandler) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(!$fileHandler->loadFromObject($fileEntry)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($lastUsedToken)) {\n\t\t\t\t$fileHandler->s3model->sessionToken = $lastUsedToken;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(!$fileHandler->deleteSource($serial,$mfa)) {\n\t\t\t\t\t$this->logging->logError(\"purgeAll\",\"Could not delete asset with key\" . $fileEntry->getFileObjectId());\n\t\t\t\t}\n\t\t\t\t$lastUsedToken = $fileHandler->s3model->sessionToken;\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo $e;\n\t\t\t\techo \"Deletion fail\";\n\t\t\t}\n\n\t\t}\n\n\t\tinstance_redirect(\"/admin\");\n\t}", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "protected function utilPurgeOrphans()\n {\n if (!$this->confirmToProceed('This will PERMANENTLY DELETE files in \"system_files\" that do not belong to any other model.')) {\n return;\n }\n\n $orphanedFiles = 0;\n\n // Locate orphans\n $files = FileModel::whereNull('attachment_id')->get();\n\n foreach ($files as $file) {\n $file->delete();\n $orphanedFiles += 1;\n }\n\n if ($orphanedFiles > 0) {\n $this->comment(sprintf('Successfully deleted %d orphaned record(s).', $orphanedFiles));\n }\n else {\n $this->comment('No records to purge.');\n }\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete_all_files($user){\n $data['acc_yr'] = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n $acc_yr = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n \n $files = glob('./sProMAS_documents/'. $acc_yr.'/registration_files/'.$user.'/*'); // get all file names\n foreach($files as $file){ // iterate files\n if(is_file($file)){\n if(unlink($file)){\n $file_del=TRUE;\n } // delete file\n }\n }\n $data['user']=$user;\n if($file_del==TRUE){\n $data['message'] = 'File deleted successfully';\n } else {\n $data['message'] = 'File not deleted, Try again';\n } \n //$data['views']= array('manage_users/add_group_view');\n //page_load($data);\n \n }", "static function deleteFiles($pool) {\n $path = JPATH_COMPONENT.DS.\"data\".DS.$pool;\n system(\"rm -rf \".$path);\n $path = JPATH_COMPONENT.DS.\"private\".DS.$pool;\n system(\"rm -rf \".$path);\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public static function cleanupTempFolder(){\r\n\t\t$files = glob($_SERVER[\"DOCUMENT_ROOT\"] . \"/tmp/*\");\r\n\t\t$now = time();\r\n\r\n\t\tforeach($files as $file){\r\n\t\t\tif(is_file($file) && basename($file) != \".keep\"){\r\n\t\t\t\tif($now - filemtime($file) >= 60*60*24){\r\n\t\t\t\t\tunlink($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function flushCommand() {\n\t\t$iterator = new DirectoryIterator(UploadManager::UPLOAD_FOLDER);\n\n\t\t$counter = 0;\n\t\tforeach ($iterator as $file) {\n\t\t\tif ($file->isFile()) {\n\t\t\t\t$counter++;\n\t\t\t\tunlink(UploadManager::UPLOAD_FOLDER . DIRECTORY_SEPARATOR . $file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine(sprintf('I have removed %s file(s).', $counter));\n\t}", "public function deleteUnexistingFiles()\n\t{\n\t\tinclude JPATH_ADMINISTRATOR . '/components/com_hierarchy/deletelist.php';\n\n\t\tjimport('joomla.filesystem.file');\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) && !JFile::delete(JPATH_ROOT . $file))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file));\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\n\t\tforeach ($folders as $folder)\n\t\t{\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) && !JFolder::delete(JPATH_ROOT . $folder))\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder));\n\t\t\t}\n\t\t}\n\t}", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function removeTemporaryFiles()\n {\n foreach ($this->temporaryFiles as $file) {\n $this->unlink($file);\n }\n }", "public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }", "public function delete_all()\n {\n }", "public function deleteAll(): void;", "public function cleanZipFolder()\r\n {\r\n foreach(glob(\"{$this->destination_dir}/*\") as $file)\r\n {\r\n if (is_file($file)) {\r\n unlink($file);\r\n }\r\n }\r\n }", "function delete_files($target) {\r\n\t\t\t\tif(is_dir($target)){\r\n\t\t\t\t\t//GLOB_MARK adds a slash to directories returned\r\n\t\t\t\t\t$files = glob( $target . '*', GLOB_MARK ); \r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $files as $file )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdelete_files( $file ); \r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\trmdir( $target );\r\n\t\t\t\t} elseif(is_file($target)) {\r\n\t\t\t\t\tunlink( $target ); \r\n\t\t\t\t}\r\n\t\t\t}", "public function clearAll()\n {\n $this->clearDir($this->file_path . '/sb_Cache');\n }", "private function clearOldFiles()\r\n {\r\n // Buscando itens na pasta\r\n $files = new \\DirectoryIterator( $this->backupFolder );\r\n\r\n // Passando pelos itens\r\n $sortedFiles = array();\r\n foreach ($files as $file) {\r\n // Se for um arquivo\r\n if ($file->isFile()) {\r\n // Adicionando em um vetor, sendo o índice a data de modificação\r\n // do arquivo, para assim ordenarmos posteriormente\r\n $sortedFiles[$file->getMTime()] = $file->getPathName();\r\n }\r\n }\r\n\r\n // Ordena o vetor em ordem decrescente\r\n arsort( $sortedFiles );\r\n\r\n // Passando pelos arquivos\r\n $numberFiles = 0;\r\n foreach ($sortedFiles as $file) {\r\n $numberFiles++;\r\n // Se a quantidade de arquivo for maior que a quantidade\r\n // máxima definida\r\n if ($numberFiles > $this->maxNumberFiles) {\r\n // Removemos o arquivo da pasta\r\n unlink( $file );\r\n echo \"Apagado backup '{$file}'\" . PHP_EOL;\r\n }\r\n }\r\n\r\n }", "public function remove_files() {\n\t\t$rm = escapeshellarg( self::RM );\n\t\t$files = escapeshellarg( $this->tmp_dir );\n\n\t\t$this->exec_with_notify( escapeshellcmd( \"{$rm} -rf {$files}\" ) );\n\t}", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public static function _removeTmpFiles()\n {\n if (count($GLOBALS['_System_temp_files'])) {\n $delete = $GLOBALS['_System_temp_files'];\n array_unshift($delete, '-r');\n System::rm($delete);\n $GLOBALS['_System_temp_files'] = array();\n }\n }", "public function deleteQueuedSourceFiles()\n\t{\n\t\tforeach ($this->_sourcesToBeDeleted as $source)\n\t\t{\n\t\t\tIOHelper::deleteFile($source, true);\n\t\t}\n\t}", "public function cleanTempFiles()\n\t{\n\t\t$manifestData = $this->_getManifestData();\n\n\t\tforeach ($manifestData as $row)\n\t\t{\n\t\t\tif (UpdateHelper::isManifestVersionInfoLine($row))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rowData = explode(';', $row);\n\n\t\t\t// Delete any files we backed up.\n\t\t\t$backupFilePath = IOHelper::normalizePathSeparators(blx()->path->getAppPath().$rowData[0].'.bak');\n\n\t\t\tif (($file = IOHelper::getFile($backupFilePath)) !== false)\n\t\t\t{\n\t\t\t\tBlocks::log('Deleting backup file: '.$file->getRealPath(), \\CLogger::LEVEL_INFO);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Delete the temp patch folder\n\t\tIOHelper::deleteFolder($this->_unzipFolder);\n\n\t\t// Delete the downloaded patch file.\n\t\tIOHelper::deleteFile($this->_downloadFilePath);\n\t}", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function clearEditorTempFilesCommand()\n {\n /** @var EditorTempfile $editorTempFile */\n foreach ($this->editorTempfileRepository->findAll() as $editorTempFile) {\n $this->outputLine(\"Removing \" . $editorTempFile->getResource()->getFilename());\n $this->editorTempfileRepository->remove($editorTempFile);\n }\n $this->outputLine(\"Done.\");\n }", "function removePermanentlyDeletedFiles() {\n try {\n DB::beginWork('Start removing permanently deleted files');\n $files_to_delete = array();\n\n defined('STATE_DELETED') or define('STATE_DELETED', 0); // Make sure that we have STATE_DELETED constant defined\n\n if ($this->isModuleInstalled('files')) {\n // find file ids which are deleted\n $file_ids = DB::executeFirstColumn('SELECT id FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND state = ?', 'File', STATE_DELETED);\n // add their locations to cumulative list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT varchar_field_2 FROM ' . TABLE_PREFIX . 'project_objects WHERE type = ? AND id IN (?)', 'File', $file_ids));\n // add file versions locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids));\n // delete file versions\n DB::execute('DELETE FROM ' . TABLE_PREFIX . 'file_versions WHERE file_id IN (?)', $file_ids);\n } // if\n\n // add attachment locations to the list\n $files_to_delete = array_merge($files_to_delete, (array) DB::executeFirstColumn('SELECT location FROM ' . TABLE_PREFIX . 'attachments WHERE state = ?', STATE_DELETED));\n\n // delete all files related to previously deleted objects\n if (is_foreachable($files_to_delete)) {\n foreach ($files_to_delete as $file_to_delete) {\n $full_path_to_delete = UPLOAD_PATH . '/' . $file_to_delete;\n if (is_file($full_path_to_delete)) {\n @unlink($full_path_to_delete);\n } // if\n } // foreach\n } // if\n\n DB::commit('Successfully removed permanently deleted files');\n } catch (Exception $e) {\n DB::rollback('Failed to remove permanently deleted files');\n return $e->getMessage();\n } // if\n\n return true;\n }", "public function clearCache()\n {\n $files = $this->ls('/', 'cache');\n foreach ($files as $file)\n {\n if (is_dir($this->cachePath . '/' . $file))\n {\n $this->$this->recurciveDelete($this->cachePath . '/' . $file);\n } else\n {\n unlink($this->cachePath . '/' . $file);\n }\n }\n }", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "function fileDelete(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteFile($GLOBALS['fileId']));\n\t\t\tdie();\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"filesURL\")));\n\t}", "public function file_delete($filename);", "abstract public function deleteAll();", "public function on_delete() {\n $this->remove_dir();\n }", "function imageAllDelete();", "function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }", "public function purge() {\r\n\t\t\t$sDefaultFile = 'errors.log';\r\n\t\t\t$sFileTime = @date('Ymd');\r\n\t\t\t$sPath = $sFileTime . '_' . $sDefaultFile;\r\n\t\t\tunlink($sPath);\r\n\t\t}", "public function cleanup() {\n foreach ($this->_cookies as $cookiefile) {\n unlink($cookiefile);\n }\n }", "public function deleteFiles()\r\n {\r\n $fileId = Input::get('FILE');\r\n $file = UploadedFiles::find($fileId);\r\n $path = public_path().'/';\r\n if($file!=null){\r\n $path.=$file->url;\r\n File::delete($path);\r\n $file->delete();\r\n Transaction::createTransaction('','',$file->fileName,'DELETE_FILE','FILE ID: '.$fileId,$file->project_id,'','','','','');\r\n return json_encode($fileId);\r\n }\r\n return \"-1\";\r\n }" ]
[ "0.8366771", "0.80332875", "0.7984204", "0.79566497", "0.77805793", "0.77648276", "0.7618143", "0.75971586", "0.7565527", "0.75613517", "0.7538428", "0.7449401", "0.7434713", "0.74044645", "0.7381687", "0.7360416", "0.73453623", "0.73451596", "0.7321756", "0.73158133", "0.7305042", "0.7272622", "0.7254683", "0.722994", "0.7219302", "0.719595", "0.71857584", "0.7179441", "0.71733594", "0.7166782", "0.7165111", "0.7139873", "0.7128966", "0.71242917", "0.7113064", "0.71065444", "0.70950437", "0.7088219", "0.7085029", "0.7080618", "0.7064225", "0.70539683", "0.7052374", "0.704989", "0.7037877", "0.7034686", "0.7009526", "0.7005188", "0.69838846", "0.6973207", "0.6969995", "0.69566506", "0.69512904", "0.69355357", "0.6908946", "0.6905552", "0.6882932", "0.6874883", "0.68665653", "0.68593454", "0.68558633", "0.6844066", "0.68388975", "0.6837179", "0.68258923", "0.68075377", "0.6807261", "0.6802761", "0.6794255", "0.67893946", "0.6787027", "0.6786121", "0.67721003", "0.6766928", "0.67506015", "0.6746946", "0.6744027", "0.6743907", "0.6743906", "0.6738016", "0.672578", "0.6718426", "0.6708597", "0.6693921", "0.6689176", "0.66877085", "0.66787744", "0.66616607", "0.66466975", "0.66410965", "0.66410965", "0.66410965", "0.6635607", "0.66287047", "0.66184795", "0.66106707", "0.6605893", "0.65917164", "0.6589089", "0.6582104", "0.65763766" ]
0.0
-1
remove All untyped files
public function actionRemoveAll() { if (!isset($_POST['removeAll'])) die('what?'); CUserfiles::model()->RemoveAllFiles($this->user_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function clean() {\n\t\t$types = ['.aux', '.fdb_latexmk', '.fls', '.log', '.out', '.tex', '.toc'];\n\t\t$s = '';\n\t\tforeach (scandir($this -> directory) as $file) {\n\t\t\tif ($file === '.' || $file === '..') continue;\n\t\t\tforeach ($types as $t) {\n\t\t\t\t$extension = substr($file, 0-strlen($t));\n\t\t\t\tif (in_array($extension, $types) && file_exists($this -> directory . '/' . $file)) {\n\t\t\t\t\tunlink($this -> directory . '/' . basename($file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function removeRegisteredFiles() {}", "function cleanup_files() {\n\t$files = glob(\"./*.{mp4,mp3,zip}\", GLOB_BRACE);\n\tforeach ($files as $file) {\n\t\tunlink($file);\n\t}\n}", "protected function removeFiles() {}", "public function deleteUnusedFiles(){\n \n }", "public function clean()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n\n $files = $dir->scanRecursive(\"*.css\");\n echo \"\\nDeleting Minified Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n\n unset($sourceFile);\n }\n\n $files = $dir->scanRecursive(\"*.js\");\n echo \"\\nDeleting Minified Js Files...\\n\";\n foreach($files as $sourceFile)\n {\n // if does not have a numeric pre-extension-suffix foo.#.js (e.g foo.52.js) which are files from a previous build\n if ( ! is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)) )\n continue;\n\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n $sourceFile->delete();\n unset($sourceFile);\n }\n }", "function clear_files()\n\t{\n\t\t$this->files = array();\n\t\t$this->files_cache = array();\n\t\t$this->files_cache2 = array();\n\t\t$this->compiled_code = array();\n\t\t$this->uncompiled_code = array();\n\t}", "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "protected function clearFiles()\n {\n $dir = __DIR__ . '/../lang/i18n';\n FileSystem::clearDirectory($dir);\n }", "public function cleanUploadedFiles(): void\n {\n foreach ($this->uploadedFiles as $file) {\n @unlink($file['tmp_name']);\n }\n }", "public function unsetFileAndFolderNameFilters() {}", "private function cleanupFiles() {\n\t\t$this -> loadModel('Archivo');\n\t\t$items = $this -> Archivo -> find('all');\n\t\t$db_files = array();\n\t\tforeach ($items as $key => $item) {\n\t\t\t$db_files[] = $item['Archivo']['ruta'];\n\t\t}\n\t\t$dir_files = array();\n\t\t$dir_path = APP . 'webroot/files/uploads/solicitudesTitulacion';\n\t\tif ($handle = opendir($dir_path)) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ($entry != 'empty' && is_file($dir_path . DS . $entry))\n\t\t\t\t\t$dir_files[] = 'files/uploads/solicitudesTitulacion/' . $entry;\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tforeach ($dir_files as $file) {\n\t\t\tif (!in_array($file, $db_files)) {\n\t\t\t\t$file = explode('/', $file);\n\t\t\t\t$file = $file[count($file) - 1];\n\t\t\t\t$tmp_file_path = $dir_path . DS . $file;\n\t\t\t\tunlink($tmp_file_path);\n\t\t\t}\n\t\t}\n\t}", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "function purge_files(){\n\t//echo \"<pre>purge_files: To limit disk space, everytime you create an effect all previous files are removed</pre>\\n\";\n\t//echo \"<pre>purge_files: Removing *.png, *.dat,*.vir,*.txt,*.hls,*.gp,*.srt,.*.lms</pre>\\n\";\n\t$directory=getcwd();\n}", "function unset_tiff($mime_types){\n unset($mime_types['tif|tiff']); //Removing the tif extension\n return $mime_types;\n}", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "function remove_temp_files() {\n\t\n\tif(!class_exists(FilterIterator) && !class_exists(RecursiveDirectoryIterator)) return;\n\tclass TempFilesFilterIterator extends FilterIterator {\n\t\tpublic function accept() {\n\t\t\t$fileinfo = $this->getInnerIterator()->current();\n\t\t\tif(preg_match('/temp_.*/', $fileinfo)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\t$iterator = new RecursiveDirectoryIterator(__CHV_FOLDER_IMAGES__); // PHP > 5.3 flag: FilesystemIterator::SKIP_DOTS\n\t$iterator = new TempFilesFilterIterator($iterator);\n\tforeach ($iterator as $file) {\n\t\tunlink($file->getPathname());\n\t}\n}", "private static function remove_types() {\n\n\t\treturn [\n\t\t\t'attachment',\n\t\t\t'revision',\n\t\t\t'nav_menu_item'\n\t\t];\n\n\t}", "public static function deleteFiles() : void{\n $files = glob(self::DIRECTORY . '/*');\n foreach($files as $file){\n if(is_file($file))\n unlink($file);\n }\n }", "public static function _removeTmpFiles()\n {\n if (count($GLOBALS['_System_temp_files'])) {\n $delete = $GLOBALS['_System_temp_files'];\n array_unshift($delete, '-r');\n System::rm($delete);\n $GLOBALS['_System_temp_files'] = array();\n }\n }", "public function deleteCompiledTemplates() {\n\t\t// templates\n\t\t$filenames = glob(WCF_DIR.'templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t\t\n\t\t// acp templates\n\t\t$filenames = glob(WCF_DIR.'acp/templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t}", "public function remove_added_files() {\r\n\t\t\t$this->Files_ready = array();\r\n\t\t\t$this->Files_valid = array();\r\n\t\t\t$this->Files_invalid = array();\r\n\t\t\t$this->Files_ready_count = 0;\r\n\t\t\t$this->Files_valid_count = 0;\r\n\t\t\t$this->Files_invalid_count = 0;\r\n\t\t}", "function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public static function invalidate() {\n if (is_dir(self::$fileBased))\n {\n $dir = opendir(self::$fileBased);\n while ($file = readdir($dir)) {\n @unlink(YPFramework::getFileName(self::$fileBased, $file));\n }\n }\n }", "public function removeTemporaryFiles()\n {\n foreach ($this->temporaryFiles as $file) {\n $this->unlink($file);\n }\n }", "function clean_old_files(){\n\t$files = scandir(OUTPUT_FOLDER);\n\tforeach($files as $file){\n\t\tif($file != '.' && $file != '..'){\n\t\t\t$ext = substr($file,-4,4);\n\t\t\tif($ext == 'json'){\n\t\t\t\t$filemtime = filemtime(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t$diff = time() - $filemtime;\n\t\t\t\tif($diff >= FILE_LIFETIME){\n\t\t\t\t\t@unlink(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "protected function tidyUpFiles() {\n\t\t/* load valid ids */\n\t\t$validIds = array();\n\t\t$result = $this->db->query('SELECT id FROM image');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$validIds[] = $entry[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* remove entries with missing file */\n\t\tforeach ($validIds as $id) {\n\t\t\tif (!is_file(self::getPath($id))) {\n\t\t\t\t$this->delete($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* delete from list what is not in the database */\n\t\tif ($dh = opendir(self::FILES_DIR)) {\n\t\t\twhile (($id = readdir($dh)) !== false) {\n\t\t\t\tif (preg_match('#^[0-9a-zA-Z]+$#', $id) && !in_array($id, $validIds) && $id != self::DATABASE_FILE) {\n\t\t\t\t\t$this->delete($id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "public function remove_all_fonts(){\n\t\t$this->_fonts = array();\n\t}", "public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }", "public function removeAll() {\r\n for ($i = 0; $i < $this->zip->numFiles; $i++) {\r\n $this->zip->deleteIndex($i);\r\n }\r\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "public function removeAllTemplateFiles()\n {\n $config = $this->getAlertingConfigs();\n $config['template_files'] = null;\n\n $this->op->request('POST', '/api/prom/configs/alertmanager', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ],\n 'json' => $config,\n ]);\n }", "private function cleanFiles($files) {\n foreach ($files as $v) {\n $file = $this->tmpFolder . '/' . $v;\n if(file_exists($file)) {\n unlink($file);\n }\n }\n }", "function delete_class_files($dir) {\n global $verbose;\n \n $all_files = scandir($dir);\n foreach ( $all_files as $f ) {\n if ( preg_match('#\\.class\\.php$#i', $f) || preg_match('#\\.map\\.inc\\.php$#i', $f)) {\n if ( unlink(\"$dir/$f\") ) {\n if ($verbose) {\n print_msg( sprintf('<br/>Deleted file: <code>%s/%s</code>',$dir,$f) );\n }\n }\n else {\n print_msg( sprintf('<br/>Failed to delete file: <code>%s/%s</code>',$dir,$f) );\n }\n }\n }\n}", "private function removeConfigFiles()\n {\n $files = scandir(_PS_MODULE_LENGOW_DIR_);\n foreach ($files as $file) {\n if (preg_match('/^config[_a-zA-Z]*\\.xml$/', $file)) {\n self::removeFile($file);\n }\n }\n }", "public function clearRtfPlugins()\n {\n $this->collRtfPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "public function remove_files() {\n\t\t$rm = escapeshellarg( self::RM );\n\t\t$files = escapeshellarg( $this->tmp_dir );\n\n\t\t$this->exec_with_notify( escapeshellcmd( \"{$rm} -rf {$files}\" ) );\n\t}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }", "function removeUnusedFiles( )\r\n{\r\n // select all files that aren't referenced anymore\r\n $sql = \"SELECT DISTINCT f.id, f.filename\r\n\t\t\tFROM \" . dropbox_cnf(\"tbl_file\") . \" f\r\n\t\t\tLEFT JOIN \" . dropbox_cnf(\"tbl_person\") . \" p ON f.id = p.file_id\r\n\t\t\tWHERE p.user_id IS NULL\";\r\n $result = api_sql_query($sql,__FILE__,__LINE__);\r\n while ( $res = mysql_fetch_array( $result))\r\n {\r\n\t\t//delete the selected files from the post and file tables\r\n $sql = \"DELETE FROM \" . dropbox_cnf(\"tbl_post\") . \" WHERE file_id='\" . $res['id'] . \"'\";\r\n $result1 = api_sql_query($sql,__FILE__,__LINE__);\r\n $sql = \"DELETE FROM \" . dropbox_cnf(\"tbl_file\") . \" WHERE id='\" . $res['id'] . \"'\";\r\n $result1 = api_sql_query($sql,__FILE__,__LINE__);\r\n\r\n\t\t//delete file from server\r\n @unlink( dropbox_cnf(\"sysPath\") . \"/\" . $res[\"filename\"]);\r\n }\r\n}", "public function wp_clean_files()\n\t{\n\n\t\tforeach ($this->_fileswp as $key => $file) {\n\t\t\tif(is_dir($file)) {\n\t\t\t\t$this->rrmdir($file);\n\t\t\t} else {\n\t\t\t\t@unlink($file);\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }", "public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\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 }", "public static function cleanupTempFolder(){\r\n\t\t$files = glob($_SERVER[\"DOCUMENT_ROOT\"] . \"/tmp/*\");\r\n\t\t$now = time();\r\n\r\n\t\tforeach($files as $file){\r\n\t\t\tif(is_file($file) && basename($file) != \".keep\"){\r\n\t\t\t\tif($now - filemtime($file) >= 60*60*24){\r\n\t\t\t\t\tunlink($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function deleteUnexistingFiles() {\n\t\t$files = array (\n\t\t\t\t// Release 2.0\n\t\t\t\t'/administrator/language/de-DE/de-DE.com_clm_turnier.sys.ini',\n\t\t\t\t'/administrator/language/en-GB/en-GB.com_clm_turnier.sys.ini',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/layouts/form/fields/sonderranglisten-j4.php',\n\t\t\t\t'/components/com_clm_turnier/helpers/html/clm_turnier.php',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/media/com_clm_turnier/js/sonderranglisten-j4.php'\n\t\t);\n\n\t\t$folders = array (\n\t\t\t\t// Release 3.0\n\t\t\t\t'/components/com_clm_turnier/includes',\n\t\t\t\t// Release 3.2.0\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers/html',\n\t\t\t\t'/administrator/components/com_clm_turnier/helpers',\n\t\t\t\t// Release 3.2.1\n\t\t\t\t'/components/com_clm_turnier/classes/'\n\t\t);\n\n\t\tjimport('joomla.filesystem.file');\n\t\tforeach ($files as $file) {\n\t\t\tif (JFile::exists(JPATH_ROOT . $file) &&\n\t\t\t\t\t! JFile::delete(JPATH_ROOT . $file)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file), 'warning');\n\t\t\t}\n\t\t}\n\n\t\tjimport('joomla.filesystem.folder');\n\t\tforeach ($folders as $folder) {\n\t\t\tif (JFolder::exists(JPATH_ROOT . $folder) &&\n\t\t\t\t\t! JFolder::delete(JPATH_ROOT . $folder)) {\n\t\t\t\t$this->enqueueMessage(JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder), 'warning');\n\t\t\t}\n\t\t}\n\t}", "private function cleanExtensions(array &$files) {\n foreach ($files as $file) {\n $extpos = stripos($file, USER_FILE_EXT);\n $file = substr($file, 0, $extpos);\n }\n return $files;\n }", "public function clearEditorTempFilesCommand()\n {\n /** @var EditorTempfile $editorTempFile */\n foreach ($this->editorTempfileRepository->findAll() as $editorTempFile) {\n $this->outputLine(\"Removing \" . $editorTempFile->getResource()->getFilename());\n $this->editorTempfileRepository->remove($editorTempFile);\n }\n $this->outputLine(\"Done.\");\n }", "public static function remove(string ...$names)\n {\n foreach ($names as $name) {\n $type = pathinfo($name, PATHINFO_EXTENSION);\n if (array_key_exists($type, self::$toLoad) && array_key_exists($name, self::$toLoad[$type]))\n unset(self::$toLoad[$type][$name]);\n }\n }", "private function removeAopFiles($dir)\n {\n foreach (glob($dir . '/*Aop.php') as $file) {\n unlink($file);\n }\n }", "function files_delete()\n{\n // remove module vars and masks\n xarModDelAllVars('files');\n xarRemoveMasks('files');\n\n // Deletion successful\n return true;\n}", "function deleteAllFiles($dir){\n\t$files = glob($dir); // get all file names\n foreach($files as $file){ // iterate files\n\t\t#echo $file;\n if(is_file($file)){\n unlink($file); // delete file\n\t\t\t#echo \"unlink \".$file.\"\\n\";\n\t\t}\n }\n #echo \"delete all files in \".$dir.\" \\n\";\n}", "protected function uninstall_templates()\n {\n // initialize the Finder\n $finder = new Finder();\n // we need only the top level\n $finder->depth('== 0');\n // get all directories in the /Examples\n $finder->directories()->in(MANUFAKTUR_PATH.'/TemplateTools/Examples');\n \n foreach ($finder as $directory) {\n $template_name = $directory->getFilename();\n $target_directory = CMS_PATH.'/templates/'.$template_name;\n \n if ($this->app['filesystem']->exists($target_directory)) {\n // the template exists - remove it\n $this->app['filesystem']->remove($target_directory);\n }\n \n $this->app['db']->delete(CMS_TABLE_PREFIX.'addons', \n array('type' => 'template', 'directory' => $template_name));\n }\n }", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function removeDesignFiles()\n {\n $this->designFiles()->detach();\n if ('scheduled' == $this->status) {\n $this->update([\n 'status' => 'incomplete'\n ]);\n }\n }", "function ag_clean_wm_cache() {\n\trequire_once(AG_DIR . '/functions.php');\n\t\n\t$wp_dirs = wp_upload_dir();\n\t$cache_dir = trailingslashit($wp_dirs['basedir']) . 'ag_watermarked';\n\t\n\t// folder exists?\n\tif(!@file_exists($cache_dir)) {\n\t\tdie('success');\t\n\t}\n\t\n\t// clean\n\tforeach(scandir($cache_dir) as $file) {\n\t\t$ext = ag_stringToExt($file);\n\t\t$accepted = array('.jpg', '.jpeg', '.gif', '.png');\n\t\t\n\t\tif(in_array($ext, $accepted) && file_exists($cache_dir.'/'.$file)) {\n\t\t\tunlink($cache_dir.'/'.$file);\n\t\t}\t\n\t}\n\n\tdie('success');\n}", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "private function clean() {\n foreach (glob($this->dir . '/*') as $file) {\n $name = basename($file);\n if (!preg_match('/^\\d{10}/', $name))\n throw new \\Exception('Unexpected filename. Make sure \"' . $this->dir . '\" contains only build artefacts (and is thus safe to clean) and try again.');\n $deleted = unlink($file);\n if (!$deleted)\n throw new \\Exception('Failed to delete \"' . $file . '\". Make sure target directory is writable to allow delete of other users files.');\n }\n }", "public function removeTempFiles()\n {\n $this->removeDir($this->context['temp_dir']);\n }", "public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }", "function clear()\n {\n # files\n $this->file_objs = array(); # list of file objects\n # params\n $this->name = null;\n $this->meta_updated = null;\n $this->yt_id = null;\n $this->tags = array(); # list of tag strings\n $this->meta_objs = array(); # list of meta objects\n # file_params\n $this->thumb_used = \"\";\n $this->update_files = 0;\n # chapters & comments\n $this->chapters = array();\n $this->comments = array();\n }", "public function dropAllTypes()\n {\n $types = [];\n\n foreach ($this->getAllTypes() as $row) {\n $row = (array) $row;\n\n $types[] = reset($row);\n }\n\n if (empty($types)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTypes($types)\n );\n }", "public function dropAllTypes()\n {\n $types = [];\n\n foreach ($this->getAllTypes() as $row) {\n $row = (array) $row;\n\n $types[] = reset($row);\n }\n\n if (empty($types)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllTypes($types)\n );\n }", "private function _prune()\n {\n if (empty($this->_files) && empty($this->_subdirectories)) {\n $this->_element->delete();\n if ($this->_parent instanceOf Horde_Pear_Package_Xml_Directory) {\n $this->_parent->_deleteSubdirectory($this->_element->getName());\n }\n }\n }", "public function removeObsolete()\n {\n // Remove files\n if (isset($this->obsolete['files']) && !empty($this->obsolete['files']))\n foreach ($this->obsolete['files'] as $file) {\n $f = JPATH_ROOT . '/' . $file;\n if (!$this->container->filesystem->has($f)) continue;\n $this->container->filesystem->delete($f);\n }\n\n // Remove folders\n if (isset($this->obsolete['folders']) && !empty($this->obsolete['folders']))\n foreach ($this->obsolete['folders'] as $folder) {\n $f = JPATH_ROOT . '/' . $folder;\n if (!$this->container->filesystem->has($f)) continue;\n $this->container->filesystem->delete($f);\n }\n }", "public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }", "public function clearframes()\n {\n foreach ($this->parsedfiles as $temp_frame) {\n unlink($temp_frame);\n }\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "protected static function cleanup($path) {\n $pattern = \"#_[\\\\d]+\\\\.css|js$#\";\n $globReq = preg_replace($pattern,'*',$path);\n //Debug::log($globReq,'glob req');\n $files = glob($globReq);\n //Debug::log($files,'old files');\n foreach ($files as $file){\n if ($file != $path && $file != $path.'.gz'){\n unlink($file);\n }\n }\n }", "public function maybe_delete_files() {\n\n\t\t// If there are files to delete, delete them.\n\t\tif ( ! empty( gf_dropbox()->files_to_delete ) ) {\n\n\t\t\t// Log files being deleted.\n\t\t\t$this->log_debug( __METHOD__ . '(): Deleting local files => ' . print_r( gf_dropbox()->files_to_delete, 1 ) );\n\n\t\t\t// Delete files.\n\t\t\tarray_map( 'unlink', gf_dropbox()->files_to_delete );\n\n\t\t}\n\n\t}", "public function reset() {\n\t\t$this->mimetypes = [];\n\t\t$this->mimetypeIds = [];\n\t}", "public function clean($in, $out)\n {\n $files = sfFinder::type('file')->discard('_*')->relative()->in($in);\n\n $fs = new sfFilesystem($this->dispatcher);\n\n foreach ($files as $file)\n {\n $target = rtrim($out, '/\\\\') . '/' . $file;\n $target = preg_replace('/\\.s[ac]ss$/i', '.css', $target);\n if (is_file($target) && is_writable($target))\n {\n @unlink($target);\n } \n }\n }", "protected function purge_all_definitions() {\n // Warning: limit the deletion to what file store is actually able\n // to create using the internal {@link purge()} providing the\n // {@link $path} with a wildcard to perform a purge action over all the definitions.\n $currpath = $this->path;\n $this->path = $this->filestorepath.'/*';\n $result = $this->purge();\n $this->path = $currpath;\n return $result;\n }", "protected function doCleanup() {\n $base = $this->tempPath();\n $dirs = array($base);\n\n if (is_dir($base)) {\n foreach ($this->recurse($base) as $file) {\n if (is_dir($file)) {\n $dirs[] = $file;\n } else {\n unlink($file);\n }\n }\n\n foreach (array_reverse($dirs) as $path) {\n rmdir($path);\n }\n }\n\n foreach (array(self::LOGFILE_STUB, self::STATEFILE_STUB, self::ZIPTEMP_STUB, self::ZIPCOMP_STUB) as $extra_file) {\n if (is_file($base.$extra_file)) {\n unlink($base.$extra_file);\n }\n }\n }", "public static function remove ($type, Array $files) {\n if (in_array($type, array_keys(self::$_assets))) {\n foreach ($files as $file) {\n unset(self::$_assets[$type][array_search($file, self::$_assets[$type])]);\n }\n }\n }", "function cleanUpTmpFiles($target){\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n cleanUpTmpFiles($file);\n }\n\n // Checks if dir is empty\n if (!(new FilesystemIterator($target))->valid()) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "public function clearRIssuesRtfplugins()\n {\n $this->collRIssuesRtfplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clean($file)\n {\n }", "public function detachFiles() {\r\n\t\t$this->_attachedFiles = null;\r\n\t}", "public static function clean_all_files_in($path=\"\",$safe=\"\"){\n\t\tif(empty($safe)){\n\t\t\t$safe = array();\n\t\t}\n\t\t\n\t\t\n\t\tif(!empty($path)){\n\t\t\t$prevpath = getcwd();\n\t\t\tif(is_dir($path)){\n\t\t\t\tchdir($path);\n\t\t\t\t\n\t\t\t\tforeach(glob(\"*\") as $filename){\n\t\t\t\t\tif(is_file($filename)){\n\t\t\t\t\t\tif(in_array($filename,$safe)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tunlink($filename);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tchdir($prevpath);\n\t\t\t}\n\t\t}\n\t}", "protected function cleanup($path)\n {\n $pattern = \"#_[\\\\d]+\\\\.css|js$#\";\n $globReq = preg_replace($pattern, '*', $path);\n $files = glob($globReq);\n foreach ($files as $file) {\n if ($file != $path && $file != $path . '.gz') {\n unlink($file);\n }\n }\n }", "public function removeAssets()\n {\n // Base implementation does only know about log file.\n if ($this->logFile) {\n if (file_exists($this->logFile)) {\n unlink($this->logFile);\n }\n $this->logFile = null;\n $this->file->remove('log');\n }\n }", "function DateTimeclearThumbCache () {\n\n if ($fd = opendir ($this->thumbDir)) {\n while ($current_file = readdir ($fd)) {\n if ($current_file[0] != '.'\n && !is_dir ($this->thumbDir.$current_file) \n && eregi ('^.*(' . $this->file . ')$', $current_file)){\n files::deleteFile ($this->thumbDir.$current_file);\n }\n }\n closedir ($fd);\n }\n }", "public function clear () {\n array_map('unlink', glob(CACHE.\"*.cache\"));\n /*\n $files = scandir(CACHE);\n foreach ($files as $file){\n if (pathinfo($file, PATHINFO_EXTENSION) == 'cache') @unlink(CACHE.$file);\n }\n */\n }", "function clear($dir,$mode='all',$filter=null) {\n\t\t$handle = opendir($dir);\n\t\twhile (false!==($item = readdir($handle))) {\n\t\t\tif($item != '.' && $item != '..') {\n\t\t\t\t$delete=false;\n\t\t\t\tif(is_dir($dir.'/'.$item)) {\n\t\t\t\t\tcmfcDirectory::clear($dir.'/'.$item,$mode,$filter);\n\t\t\t\t\tif ($mode=='all') {\n\t\t\t\t\t\t$delete=true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$delete=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_null($filter)) {\n\t\t\t\t\tif ($delete) {\n\t\t\t\t\t\tif (isset($filter['path'])) {\n\t\t\t\t\t\t\t$r=preg_match($filter['path'],$dir.'/'.$item);\n\t\t\t\t\t\t\tif ($filter['path'][0]=='!') {\n\t\t\t\t\t\t\t\tunset($filter['path'][0]);\n\t\t\t\t\t\t\t\t$r=($r==true)?false:true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$r) {\n\t\t\t\t\t\t\t\t$delete=false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($delete and is_dir($dir.'/'.$item)) {\n\t\t\t\t\t\tif (isset($filter['directory'])) {\n\t\t\t\t\t\t\t$r=preg_match($filter['directory'],$item);\n\t\t\t\t\t\t\tif ($filter['directory'][0]=='!') {\n\t\t\t\t\t\t\t\tunset($filter['directory'][0]);\n\t\t\t\t\t\t\t\t$r=($r==true)?false:true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$r) {\n\t\t\t\t\t\t\t\t$delete=false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isset($filter['file'])) {\n\t\t\t\t\t\t\t$r=preg_match($filter['file'],$item);\n\t\t\t\t\t\t\tif ($filter['file'][0]=='!') {\n\t\t\t\t\t\t\t\tunset($filter['file'][0]);\n\t\t\t\t\t\t\t\t$r=($r==true)?false:true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$r) {\n\t\t\t\t\t\t\t\t$delete=false;\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\n\t\t\t\tif ($delete==true) {\n\t\t\t\t\tunlink($dir.'/'.$item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\t$success = true;\n\t\treturn $success;\n\t}", "public function remove($files)\r\n {\r\n if (is_array($files)) {\r\n /* percorre o array escluindo os arquivos */\r\n foreach ($files as $file) {\r\n @unlink($this->_destination . $file);\r\n }\r\n } else if (is_string($files)) {\r\n /* excluir o arquivo passado */\r\n @unlink($this->_destination . $files);\r\n }\r\n }", "function remove_note_types() {\r\n\t\t$this->code = str_replace('<type', '<type stripme=\"y\"', $this->code, $count);\r\n\t\t$this->logMsgIf('note types removed', $count);\r\n\t}", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "function uninstall(bool $deleteimages = false)\n{\n $meta = file_exists(DEFAULT_METAFILE) ? textFileToArray(DEFAULT_METAFILE) : null;\n $files = glob(VAR_FOLDER . DS . '{,.}[!.,!..]*', GLOB_MARK|GLOB_BRACE);\n foreach ($files as $file) {\n unlink($file);\n }\n\n if (true === $deleteimages) {\n $imagesdir = $meta && count($meta) && array_key_exists('imagesfolder', $meta) ? ROOT_FOLDER . DS . $meta['imagesfolder'] : DEFAULT_IMAGEFOLDER;\n\n $files = glob($imagesdir . DS . '{,.}[!.,!..]*', GLOB_MARK|GLOB_BRACE);\n foreach ($files as $file) {\n unlink($file);\n }\n }\n\n if ($meta) {\n unlink(DEFAULT_METAFILE);\n }\n}", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "public function cleanup()\n {\n // Remove old parts without binaries \n $this->removePartsWithoutBinary();\n \n // Remove parts where the binary is missing\n $this->removePartsWithMissingBinary();\n \n // Remove binaries without parts\n $this->removeBinariesWithoutParts();\n }", "public function delete_all_files($user){\n $data['acc_yr'] = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n $acc_yr = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n \n $files = glob('./sProMAS_documents/'. $acc_yr.'/registration_files/'.$user.'/*'); // get all file names\n foreach($files as $file){ // iterate files\n if(is_file($file)){\n if(unlink($file)){\n $file_del=TRUE;\n } // delete file\n }\n }\n $data['user']=$user;\n if($file_del==TRUE){\n $data['message'] = 'File deleted successfully';\n } else {\n $data['message'] = 'File not deleted, Try again';\n } \n //$data['views']= array('manage_users/add_group_view');\n //page_load($data);\n \n }" ]
[ "0.749898", "0.72871673", "0.71437776", "0.7068363", "0.70107996", "0.6640639", "0.6588004", "0.655018", "0.6536964", "0.65352595", "0.6517671", "0.65104836", "0.6494262", "0.64738375", "0.6423328", "0.64179075", "0.6370674", "0.6348064", "0.6323481", "0.63179535", "0.62949556", "0.626912", "0.6214355", "0.6152508", "0.6123271", "0.6111995", "0.60783356", "0.6050066", "0.60332006", "0.6018743", "0.6007336", "0.60009265", "0.5977489", "0.5971763", "0.597037", "0.59685326", "0.5957892", "0.5950427", "0.5936548", "0.5920438", "0.59144974", "0.5905999", "0.5883246", "0.58623403", "0.58604544", "0.5852752", "0.585218", "0.58339596", "0.5831482", "0.58103096", "0.5799185", "0.5779391", "0.57786727", "0.5767484", "0.5758253", "0.5756989", "0.5737965", "0.5730711", "0.57305187", "0.5719569", "0.5716536", "0.57114553", "0.56976354", "0.56872743", "0.56856537", "0.5674294", "0.56626534", "0.5648132", "0.56454134", "0.56454134", "0.5642959", "0.5639209", "0.5636409", "0.56355274", "0.5634625", "0.5634387", "0.56303823", "0.5622072", "0.56218195", "0.56206626", "0.56189054", "0.56113464", "0.5606246", "0.55991983", "0.55962795", "0.55961335", "0.5590399", "0.55816907", "0.55772465", "0.5562138", "0.55563325", "0.5550977", "0.55500126", "0.5549882", "0.55416566", "0.55411255", "0.5537434", "0.5535322", "0.5524282", "0.5524256" ]
0.6096311
26
TODO Work out what I should include in the chat dasboard
public function run() { parent::run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_chtrm_name($chatid){\r\n\r\n}", "public static function chatbot()\n {\n // no code needed.\n }", "public function messages();", "public function messages();", "public function messages();", "function get_chtrm($chatid){\r\n\r\n}", "function view_chat($demand_id)\n {\n }", "function fechar_janela_conversa_chat(){\n\n// seta usuario de chat de sessao\n$_SESSION[CONFIG_MD5_IDUSUARIO_CHAT] = null;\n\n}", "private function _whereAreYou()\n {\n $channels = '';\n foreach($this->_currentChannels AS $channel)\n {\n $channels .= $channel .\", \";\n }\n\n $this->_message($this->_data->nick .\": I am in \". $channels);\n }", "function warquest_home_messages() {\r\n \r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $offset;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\tglobal $player;\r\n\tglobal $output;\r\n\t\r\n\t/* Clear new flag */\r\n\t$player->comment_notification=0;\r\n\t\t\r\n\t$output->title = t('HOME_MESSAGES_TITLE');\r\n\t\r\n\t$limit=30;\r\n\t\r\n\t$query = 'select pid1 from comment where pid2='.$player->pid.' and deleted=0';\r\n\t$result = warquest_db_query($query); \r\n\t$total = warquest_db_num_rows($result);\r\n\t\r\n\t$query = 'select a.id, a.pid1, a.pid2, a.date, a.comment, a.cid, b.name, b.country from comment a, player b ';\r\n $query .= 'where ((a.pid1=b.pid and pid2='.$player->pid.') or (a.pid2=b.pid and pid1='.$player->pid.')) ';\r\n\t$query .= 'and deleted=0 order by a.date desc ';\r\n\t$query .= 'limit '.$offset.','.$limit;\r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\t\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('HOME_MESSAGES_TITLE').'</div>';\r\n\t\r\n\tif ($count==0) {\r\n\t\t\r\n\t\t$page .= warquest_box_icon(\"info\",t('HOME_NO_MESSAGES'));\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\t$page .= '<div class=\"box rows\">';\r\n\t\r\n\t\t$count=0;\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 1);\r\n\t\t\r\n\t\t$page .= '<table>';\r\n\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t$page .= '<th width=\"75\" >'.t('GENERAL_AGO').'</th>';\r\n\t\t$page .= '<th width=\"390\">'.t('GENERAL_MESSAGE').'</th>';\r\n\t\t$page .= '<th width=\"55\" align=\"right\">'.t('GENERAL_ACTION').'</th>';\r\n\t\t$page .= '</tr>';\r\n\t\t\r\n\t\twhile ($data=warquest_db_fetch_object($result)) {\r\n\t\r\n\t\t\t$count++;\r\n\t\t\r\n\t\t\t$page .= '<tr valign=\"top\">';\r\n\t\t\t$page .= '<td>';\r\n\t\t\t$page .= warquest_ui_ago($data->date);\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td>';\r\n\t\t\t\r\n\t\t\t$page .= '<span class=\"subparagraph2\">';\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= player_format($data->pid1, $data->name, $data->country);\r\n\t\t\t\t$page .= ' -> '.player_format($player->pid, $player->name, $player->country);\r\n\t\t\t} else {\r\n\t\t\t\t$page .= player_format($player->pid, $player->name, $player->country);\r\n\t\t\t\t$page .= ' -> ';\r\n\t\t\t\t\r\n\t\t\t\tif ($data->cid > 0) {\r\n\t\t\t\t\t$clan = warquest_db_clan($data->cid);\r\n\t\t\t\t\t$page .= clan_format($clan).' clan';\r\n\t\t\t\t\t\r\n\t\t\t\t} else if ($data->pid2==0) {\r\n\t\t\t\t\t$page .= t('GENERAL_ALL');\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$page .= player_format($data->pid2, $data->name, $data->country);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$page .= '</span>';\r\n\t\t\t$page .= '<br/>';\r\n\t\t\t$page .= warquest_parse_smilies(wordwrap($data->comment, 40, \"\\n\\r\", true));\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td align=\"right\">';\r\n\t\t\t\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid1, t('LINK_REPLY'), \"reply\".$count);\t\r\n\t\t\t} else if ($player->pid==$data->pid1) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid2.'&uid='.$data->id, t('LINK_EDIT'), 'edit'.$count);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 0);\r\n\t\t$page .= '</div>';\n\t\r\n\t} \r\n}", "public function chat()\n {\n $errors = [];\n $formValid = false;\n $params = [\n // dans la vue, les clés deviennent des variables\n 'formValid' => $formValid,\n 'errors' => $errors,\n ];\n\n // Affichage du chat seulement si connecté\n if(!empty($this->getUser())){\n $this->show('chat/chat', $params);\n }\n else{{\n $this->showNotFound(); // sinon page 404\n }}\n\n }", "public function messages()\n {\n }", "protected abstract function _message();", "function api_chat_me_info() {\n\tif (session_check()) {\n\t\t$db = new db;\n\t\t$info = $db->getRow(\"SELECT CONCAT(fname, ' ', lname) as fio, avatar,id FROM users WHERE id = ?i\", $_SESSION[\"user_id\"]);\n\t\taok($info);\n\t} else {\n\t\taerr(array(\"Пожалуйста войдите.\"));\n\t}\n\t\n}", "public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}", "function buildr_messages_script()\n{\n require_lang('buildr');\n require_lang('chat');\n require_css('buildr');\n\n $member_id = get_member();\n $rows = $GLOBALS['SITE_DB']->query_select('w_members', array('location_realm', 'location_x', 'location_y'), array('id' => $member_id), '', 1);\n if (!array_key_exists(0, $rows)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n }\n list($realm, $x, $y) = array($rows[0]['location_realm'], $rows[0]['location_x'], $rows[0]['location_y']);\n\n $rows = $GLOBALS['SITE_DB']->query('SELECT * FROM ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'w_messages WHERE location_x=' . strval($x) . ' AND location_y=' . strval($y) . ' AND location_realm=' . strval($realm) . ' AND (destination=' . strval($member_id) . ' OR destination IS NULL OR originator_id=' . strval($member_id) . ') ORDER BY m_datetime DESC');\n $messages = new Tempcode();\n foreach ($rows as $myrow) {\n $message_sender = $GLOBALS['FORUM_DRIVER']->get_username($myrow['originator_id']);\n if (is_null($message_sender)) {\n $message_sender = do_lang('UNKNOWN');\n }\n $messages->attach(do_template('W_MESSAGE_' . (is_null($myrow['destination']) ? 'ALL' : 'TO'), array('MESSAGESENDER' => $message_sender, 'MESSAGE' => comcode_to_tempcode($myrow['m_message'], $myrow['originator_id']), 'DATETIME' => get_timezoned_date($myrow['m_datetime']))));\n }\n\n $tpl = do_template('W_MESSAGES_HTML_WRAP', array('_GUID' => '05b40c794578d3221e2775895ecf8dbb', 'MESSAGES' => $messages));\n $tpl->evaluate_echo();\n}", "public function user_conversation_fun(){\n require_once REALTEO_PLUGIN_DIR . '/includes/user_conversation.php';\n }", "public function hasChat(){\n return $this->_has(19);\n }", "function playerChat($chat) {\n\n\t\t// check for chat command ...\n\t\t$command = $chat[2];\n\t\tif (substr($command, 0, 1) == '/') {\n\n\t\t\t// remove the '/' prefix ...\n\t\t\t$command = substr($command, 1);\n\t\t\t// split strings at spaces and add them into an array ...\n\t\t\t$params = explode(' ', $command, 2);\n\n\t\t\t$translated_name = str_replace('+', 'plus', $params[0]);\n\t\t\t$translated_name = str_replace('-', 'dash', $translated_name);\n\n\t\t\t// if the function and the command were registered ...\n\t\t\tif (function_exists('chat_' . $translated_name)) {\n\n\t\t\t\t// show message in console ...\n\t\t\t\t$this->console('{1} used chat command \"{2} {3}\"',\n\t\t\t\t\t$chat[1],\n\t\t\t\t\t$params[0],\n\t\t\t\t\t$params[1]);\n\n\t\t\t\t// save curricumstances in array ...\n\t\t\t\t$chat_command['author'] = $this->server->players->getPlayer($chat[1]);\n\t\t\t\t$chat_command['params'] = $params[1];\n\n\t\t\t\t// call the function which belongs to the command ...\n\t\t\t\tcall_user_func('chat_' . $translated_name, $this, $chat_command);\n\t\t\t}\n\t\t}\n\t}", "function ShowOnlineChat()\n{\n\n\t$str0=\"select value1 from options where name='chat'\";\n\t$result0=mysql_query($str0) or\n\t\tdie(mysql_error());\n\t$row0=mysql_fetch_array($result0);\n\tif ($row0['value1']==1)\n\t{\n\t\techo(\"<tr><td height='58' valign='top' style=\\\"border:1px solid #22496c;\\\">\");\n\t\techo(\"<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>\");\n\t\techo(\"<tr><td colspan='2' valign='middle' bgcolor='\");\n\t\techo(background()); \n\t\techo(\"' class='leftmenumainitem'><img src='image/point.jpg' />&nbsp;&nbsp;\");\n\t\techo(getPara('chat','value2'));\n\t\techo(\"</td></tr>\");\n\t\t$str2=\"select * from chat\";\n\t\t$result2=mysql_query($str2) or\n\t\t\tdie(mysql_error());\n\t\twhile ($row2=mysql_fetch_array($result2))\n\t\t{\n\t\t\techo(\"<tr><td width='106' height='30' align='center' valign='middle'>\");\n\t\t\techo(\"&nbsp;&nbsp;\".$row2['name'].\":</td>\");\n\t\t\techo(\"<td width='87' align='center' valign='middle'><div align='center'>\");\n\t\t\techo('<a href=\"ymsgr:sendim?'.$row2['yahooid']);\n\t\t\techo('&m=Xin chào\"><img border=0 src=\"http://opi.yahoo.com/online?u=');\n\t\t\techo($row2['yahooid'].'&m=g&t=2&l=us\" alt=\"\" title=\"\"></a></div></td></tr>');\n\t\t}\n\t\tmysql_free_result($result2);\n\t\techo(\"</table></td></tr>\");\n\t}\n\tmysql_free_result($result0);\n}", "function initChat(User $user){\n \n}", "function customGetChat($cid){\n return _custom_chat_get_room($cid);\n}", "function render_chat_messages($sql, $chatlength, $show_elipsis=null){\n // Eventually there might be a reason to abstract out get_chats();\n $sql->Query(\"SELECT send_from, message FROM chat ORDER BY id DESC LIMIT $chatlength\");// Pull messages\n $chats = $sql->fetchAll();\n $message_rows = '';\n $messageCount = $sql->QueryItem(\"select count(*) from chat\");\n if (!isset($show_elipsis) && $messageCount>$chatlength){\n\t$show_elipsis = true;\n }\n $res = \"<div class='chatMessages'>\";\n foreach($chats AS $messageData) {\n\t// *** PROBABLY ALSO A SPEED PROBLEM AREA.\n\t$message_rows .= \"[<a href='player.php?player={$messageData['send_from']}'\n\t target='main'>{$messageData['send_from']}</a>]: \".out($messageData['message']).\"<br>\\n\";\n }\n $res .= $message_rows;\n if ($show_elipsis){ // to indicate there are more chats available\n\t$res .= \".<br>.<br>.<br>\";\n }\n $res .= \"</div>\";\n return $res;\n}", "function chat_view($guid = NULL) {\n\t$return = array();\n\n\telgg_require_js('chat/messaging');\n\n\t$chat = get_entity($guid);\n\n\t// no header or tabs for viewing an individual chat\n\t$return['filter'] = '';\n\n\tif (!elgg_instanceof($chat, 'object', 'chat') || !$chat->isMember() ) {\n\t\t$return['content'] = elgg_echo('noaccess');\n\t\treturn $return;\n\t}\n\n\tif ($chat->canEdit()) {\n\t\t// Delete chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_delete',\n\t\t\t'href' => \"action/chat/delete?guid=$guid\",\n\t\t\t'text' => elgg_echo('delete'),\n\t\t\t'link_class' => 'elgg-button elgg-button-delete',\n\t\t\t'confirm' => elgg_echo('chat:delete:confirm'),\n\t\t\t'is_action' => true,\n\t\t));\n\t\t// Edit chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_edit',\n\t\t\t'href' => \"chat/edit/$guid\",\n\t\t\t'text' => elgg_echo('chat:edit'),\n\t\t\t'link_class' => 'elgg-button elgg-button-action',\n\t\t));\n\t} else {\n\t\t// Leave chat button\n\t\telgg_register_menu_item('title', array(\n\t\t\t'name' => 'chat_leave',\n\t\t\t'href' => \"action/chat/leave?guid=$guid\",\n\t\t\t'text' => elgg_echo('chat:leave'),\n\t\t\t'link_class' => 'elgg-button elgg-button-delete',\n\t\t\t'confirm' => elgg_echo('chat:leave:confirm'),\n\t\t\t'is_action' => true,\n\t\t));\n\t}\n\t// Add users button\n\tchat_register_addusers_button($chat);\n\n\t$return['title'] = htmlspecialchars($chat->title);\n\n\telgg_push_breadcrumb($chat->title);\n\t$return['content'] = elgg_view_entity($chat, array('full_view' => true));\n\t$return['content'] .= elgg_view('chat/messages', array('entity' => $chat));\n\n\treturn $return;\n}", "function playerChat($chat) {\n\n\t\t// verify login\n\t\tif ($chat[1] == '' || $chat[1] == '???') {\n\t\t\ttrigger_error('playerUid ' . $chat[0] . 'has login [' . $chat[1] . ']!', E_USER_WARNING);\n\t\t\t$this->console('playerUid {1} attempted to use chat command \"{2}\"',\n\t\t\t $chat[0], $chat[2]);\n\t\t\treturn;\n\t\t}\n\n\t\t// ignore master server messages on relay\n\t\tif ($this->server->isrelay && $chat[1] == $this->server->relaymaster['Login'])\n\t\t\treturn;\n\n\t\t// check for chat command '/' prefix\n\t\t$command = $chat[2];\n\t\tif ($command != '' && $command[0] == '/') {\n\t\t\t// remove '/' prefix\n\t\t\t$command = substr($command, 1);\n\n\t\t\t// split strings at spaces and add them into an array\n\t\t\t$params = explode(' ', $command, 2);\n\t\t\t$translated_name = str_replace('+', 'plus', $params[0]);\n\t\t\t$translated_name = str_replace('-', 'dash', $translated_name);\n\n\t\t\t// check if the function and the command exist\n\t\t\tif (function_exists('chat_' . $translated_name)) {\n\t\t\t\t// insure parameter exists & is trimmed\n\t\t\t\tif (isset($params[1]))\n\t\t\t\t\t$params[1] = trim($params[1]);\n\t\t\t\telse\n\t\t\t\t\t$params[1] = '';\n\n\t\t\t\t// get & verify player object\n\t\t\t\tif (($author = $this->server->players->getPlayer($chat[1])) &&\n\t\t\t\t $author->login != '') {\n\n\t\t\t\t\t// log console message\n\t\t\t\t\t$this->console('player {1} used chat command \"/{2} {3}\"',\n\t\t\t\t\t $chat[1], $params[0], $params[1]);\n\n\t\t\t\t\t// save circumstances in array\n\t\t\t\t\t$chat_command = array();\n\t\t\t\t\t$chat_command['author'] = $author;\n\t\t\t\t\t$chat_command['params'] = $params[1];\n\t\n\t\t\t\t\t// call the function which belongs to the command\n\t\t\t\t\tcall_user_func('chat_' . $translated_name, $this, $chat_command);\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error('Player object for \\'' . $chat[1] . '\\' not found!', E_USER_WARNING);\n\t\t\t\t\t$this->console('player {1} attempted to use chat command \"/{2} {3}\"',\n\t\t\t\t\t $chat[1], $params[0], $params[1]);\n\t\t\t\t}\n\t\t\t} elseif ($params[0] == 'version' || $params[0] == 'serverlogin') {\n\t\t\t\t// log built-in commands\n\t\t\t\t$this->console('player {1} used built-in command \"/{2}\"',\n\t\t\t\t $chat[1], $command);\n\t\t\t} else {\n\t\t\t\t// optionally log bogus chat commands too\n\t\t\t\tif ($this->settings['log_all_chat']) {\n\t\t\t\t\tif ($chat[0] != $this->server->id) {\n\t\t\t\t\t\t$this->console('({1}) {2}', $chat[1], stripColors($chat[2], false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// optionally log all normal chat too\n\t\t\tif ($this->settings['log_all_chat']) {\n\t\t\t\tif ($chat[0] != $this->server->id && $chat[2] != '') {\n\t\t\t\t\t$this->console('({1}) {2}', $chat[1], stripColors($chat[2], false));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "abstract public function get_message();", "function board_list(){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\t\t$head = \"\";\n\t\t$body='';\n\t\t\n\t\t$indice = indice_board();\n\n\n\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardunread WHERE user='{$x7s->username}'\");\n\t\t$new_msg = $db->Do_Fetch_Assoc($q_new);\n\n\t\t$body=\"<b>Ci sono $new_msg[cnt] messaggi nuovi</b>\";\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "function registerChatCommands() {\n\t\tif ($this->debug) {\n\t\t\tif (isset($this->chat_commands)) {\n\t\t\t\tforeach ($this->chat_commands as $command) {\n\t\t\t\t\t// display message if debug mode is set to true ...\n\t\t\t\t\t$this->console_text('register chat command: ' . $command->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "public function message ();", "public function chat_exec()\r\n {\r\n if(isset($_POST['method']) === true && empty($_POST['method']) === false){\r\n $method = trim($_POST['method']);\r\n if($method === 'fetch'){\r\n $messages = $this->Ajax->fetchMessages();\r\n if(empty($messages) === true){\r\n echo 'There are currently no messages in the chat';\r\n } else {\r\n foreach ($messages as $message){?>\r\n <div class=\"message\"><?php\r\n if(strlen($message['user_id']) === 10){?>\r\n <a href=\"#\"><?=Sessions::get('user')?></a> says:<?php\r\n }else{ ?>\r\n <a href=\"#\"><?=$message['username']?></a> says:<?php\r\n }?>\r\n <p><?=nl2br($message['message'])?></p>\r\n </div><?php \r\n }\r\n }\r\n }else if($method === 'throw' && isset($_POST['message']) === true){\r\n $message = trim($_POST['message']);\r\n if(empty($message) === false){\r\n $arrData = array('user' => $_SESSION['user_id'], 'message' => $message);\r\n $this->Ajax->throwMessage($arrData);\r\n }\r\n }\r\n }\r\n }", "public function chat( $charac = Hello) {\n }", "function member_message($type='',$new=''){\r\n //type: in / out => tin da nhan / tin da gui\r\n global $mysql,$lang,$tpl,$table_prefix,$htm,$t;\r\n $userid = $_SESSION['userid'];\r\n if($new){\r\n $n = \"and readed=0\";\r\n }\r\n if($type=='out'){\r\n $q = $mysql->query(\"select * from \".$table_prefix.\"message where mfrom=\".$userid.\" \".$n.\" and fromdel=0 order by id DESC\");\r\n }else{\r\n $q = $mysql->query(\"select * from \".$table_prefix.\"message where mto=\".$userid.\" \".$n.\" and todel=0 order by id DESC\");\r\n }\r\n // $q = $mysql->query(\"select * from \".$table_prefix.\"message\");\r\n while($r=$mysql->fetch_array($q)){\r\n $date = timezones(0);\r\n $year = substr($date,0,4);\r\n $month = substr($date,4,2);\r\n $day = substr($date,6,2);\r\n if($r['date']==$day.'-'.$month.'-'.$year){\r\n $time = $r['time'];\r\n }else{\r\n $time = $r['date'];\r\n }\r\n if($type=='out'){\r\n $img = \"<img src='images/icon/sended.gif' title='Sended'>\";\r\n $tool = \"<img src='images/icon/delete.gif' height='25' onclick=\\\"del('member=message_del&type=from&abc',\".$r['id'].\",'','','message');\\\" class='folder' style='cursor: pointer;' title='Delete'>\";\r\n $url = \"show_wish(\".$r['id'].\",'member=message_read&type=from','message')\";\r\n }else{\r\n if($r['readed']=='0'){\r\n $img = \"<img src='images/icon/unread.gif' title='Unread'>\";\r\n }else{\r\n $img = \"<img src='images/icon/readed.gif' title'Readed'>\";\r\n }\r\n $tool = \"<img src='images/icon/delete.gif' height='25' onclick=\\\"del('member=message_del&type=to&abc',\".$r['id'].\",'','','message');\\\" class='folder' style='cursor: pointer;' title='Delete'>\";\r\n $url = \"show_wish(\".$r['id'].\",'member=message_read&type=to','message')\";\r\n }\r\n $list .= $tpl->replace_tem($t['message.list'],array(\r\n 'id' => $r['id'],\r\n 'title' => $r['title'],\r\n 'time' => $time,\r\n 'content' => cut_str($r['message'],40),\r\n 'readed' => $readed,\r\n 'img' => $img,\r\n 'tool' => $tool,\r\n 'url' => $url,\r\n )\r\n );\r\n }\r\n $show = $new?'none':'block';\r\n $main = $tpl->replace_tem($t['message.top'],array(\r\n 'skin.link' => $_SESSION['template'],\r\n 'list' => $list,\r\n 'tool.show' => $show,\r\n )\r\n );\r\n $htm = $tpl->replace_block($htm,array(\r\n 'html' => $main,\r\n )\r\n );\r\nreturn $htm;\r\n}", "protected function renderMessage() {}", "public static function display_irc_chat_rules() {\n ?>\n <ol>\n <?= Lang::get('rules', 'chat_forums_irc') ?>\n </ol>\n<?\n }", "public function InsertChatMessage(){\n include \"conn.php\";\n\n $req=$bdd->prepare('INSERT INTO chats(ChatUserId,ChatText) VALUES(:ChatUserId,:ChatText)');\n $req->execute(array(\n 'ChatUserId'=>$this->getChatUserId(),\n 'ChatText'=>$this->getChatText()\n ));\n }", "function conversation()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie','tinyMCE' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n \n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if($_SESSION['dataUser'] == null)\n {\n redirect($this->dir_login);\n }\n else\n {\n //Permet de récupérer l'id de l'utilisateur de session\n $data['userId']=$_SESSION['dataUser'][0]->user_id;\n //Permet de créer les boutons dans le menu en header\n $data['boutons'] = array(\n array(\"Rafraichir\", \"fas fa-sync\", $this->dir_controlleur, null),\n array(\"Déconnexion\", \"fas fa-sign-out-alt\", $this->dir_login, null),\n array(\"Retour\", \"fa fa-arrow-left\", $this->dir_retour, null),\n );\n }\n\n //permet de savoir si une conversation est en cours\n $data['ActiveConv'] = true;\n\n //Permet de trier tous les utilisateurs à qui on a parler du plus récent au plus ancien\n $data['profils_envoyeur'] = $this->m_messagerie->get_id_profil_envoyeur($data['userId']);\n $x = 0;\n foreach ( $data['profils_envoyeur'] as $value) \n {\n $data['last_message'][$x] = $this->m_messagerie->get_last_message_profil($data['userId'],$data['profils_envoyeur'][$x]->message_id_envoyeur);\n $data['profils_envoyeur_name'][$x] = $this->m_messagerie->get_name_user($data['profils_envoyeur'][$x]->message_id_envoyeur);\n $x = $x + 1;\n }\n\n //on récupère l'id de la personne qui recoit\n $data['personne'] = $this->input->post('id_personne');\n\n \n if($data['personne'] == NULL )\n {\n $data['personne'] = $_SESSION['personne'];\n } else{\n $_SESSION['personne'] = $data['personne'];\n }\n \n //permet de récupérer tout les messages entre deux personnes et de les ajouter dans un tableau\n $data['conv'] = $this->m_messagerie->get_message_profil_envoyeur($data['userId'],$data['personne']);\n\n //Permet de récupérer les noms prénoms des deux utilisateurs\n $data['conv_name'] = $this->m_messagerie->get_name_user($data['userId']) ;\n $data['conv_name'] = $data['conv_name']->user_nom . \" \" . $data['conv_name']->user_prenom;\n if($data['conv'][0]->message_id_receveur == $data['userId'])\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_envoyeur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n } else\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_receveur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n }\n\n \n \n // On charge les differents modules neccessaires a l'affichage d'une page\n //$this->load->view('template/header_html_base', $data);\n $this->load->view('template/header_scripts', $data); \n $this->load->view('template/bandeau', $data);\n $this->load->view('template/footer_scripts', $data);\n $this->load->view('template/footer_html_base');\n $this->load->view('messagerie/editeur',$data);\n }", "function runGroup(Chat $chat, TelegramMessage $message)\n {\n }", "function show_single_message($id, $board){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\t\t$body=\"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n function do_delete(url){\n if(!confirm('Vuoi davvero cancellare il messaggio?'))\n return;\n\n window.location.href=url;\n }\n </script>\n\t\t\";\n\t\t$indice=indice_board();\n\t\t$maxmsg=10;\n\t\t$navigator='';\n\t\t\n\t\tif(isset($_GET['startfrom'])){\n\t\t\t$limit=$_GET['startfrom'];\n\t\t}\n\t\telse\n\t\t\t$limit=0;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT count(*) AS total FROM {$prefix}boardmsg WHERE id='{$id}' OR father='{$id}'\");\n\t\t$row = $db->Do_Fetch_Assoc($query);\n\t\t$total = $row['total'];\n\n\t\t\n\t\t\n\t\tif($total > $maxmsg){\n\t\t\t$i=0;\n\t\t\twhile($total > 0){\n\t\t\t\tif((isset($_GET['startfrom']) && $_GET['startfrom'] == $i) || (!isset($_GET['startfrom']) && $i == 0))\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&message=$id&startfrom=$i\\\"><b>[\".($i+1).\"]</b></a> \";\n\t\t\t\telse\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&message=$id&startfrom=$i\\\">\".($i+1).\"</a> \";\n\t\t\t\t$i++;\n\t\t\t\t$total -= $maxmsg;\n\t\t\t\t\n\t\t\t}\n\t\t\t$navigator.=\"<br>\";\n\t\t}\n\t\t\n\t\t\t\n\t\t$limit_min = $limit * $maxmsg;\n\t\t$limit_max = $maxmsg;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT \tb.id AS id,\n\t\t\t\t\t\tb.father AS father,\n\t\t\t\t\t\tb.user AS user,\n\t\t\t\t\t\tb.body AS body,\n\t\t\t\t\t\tb.board AS board,\n\t\t\t\t\t\tb.time AS time,\n\t\t\t\t\t\tb.replies AS replies,\n\t\t\t\t\t\tu.avatar AS avatar,\n\t\t\t\t\t\tb.anonymous as anonymous\n\t\t\t\t\tFROM {$prefix}boardmsg b, {$prefix}users u\n\t\t\t\t\tWHERE\tb.user = u.username AND\n\t\t\t\t\t\t(b.id='{$id}' OR father='{$id}')\n\t\t\t\t\t\tORDER BY time DESC LIMIT $limit_min, $maxmsg\");\n\t\t\n\t\t//Head message\n\t\t$unread='';\n\t\t$unreads = get_unread();\n\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<a href=./index.php?act=boards&send=\".$board['id'].\"&reply=\".$id.\">Replica</a><br>\";\n\t\t}\n\t\t$body.=\"<a href=\\\"index.php?act=boards&board=\".$board['id'].\"\\\">Torna alla board</a><br>\";\n\t\t\n\t\t$body .= $navigator;\n\t\t$object = \"\";\n\t\t$url_regexp = \"/http(s)?:\\/\\/[^[:space:]]+/i\";\n\n\t\t$body .=\"<table width=\\\"100%\\\" cellspacing=0>\";\n\n\t\twhile($row = $db->Do_Fetch_Assoc($query)){\n\t\t\t$avatar=\"<br>\".date(\"j/n/Y G:i\", $row['time']);\n\t\t\tif($row['avatar']!=''){\n\t\t\t\t$avatar.=\"<br><img src=\\\"$row[avatar]\\\" width=\\\"100\\\" height=\\\"100\\\">\";\n\t\t\t}\n\t\t\t\n\t\t\t$unread='';\n\t\t\tif(isset($unreads[$row['id']])){\n\t\t\t\t$unread = \"<b>(Nuovo)</b>\";\n\t\t\t\t$db->DoQuery(\"DELETE FROM {$prefix}boardunread WHERE id='{$row['id']}' AND user='{$x7s->username}'\");\n\t\t\t}\n\t\t\t\n\t\t\t$nb = board_msg_split($row['body']);\n\t\t\t$msg = $nb[0];\n\t\t\t$object = $nb[1];\n\n\t\t\t$user = \"<a onClick=\\\"\".\n\t\t\t\tpopup_open(500, 680, \"index.php?act=sheet&pg={$row['user']}\",\n\t\t\t\t\t\t'sheet_other').\"\\\" >\".$row['user'].\"</a>\".$avatar;\n\n\t\t\tif ($row['anonymous']) {\n\t\t\t\tif (checkIfMaster()) {\n\t\t\t\t\t$user = \"<a onClick=\\\"\".\n\t\t\t\t\t\tpopup_open(500, 680, \"index.php?act=sheet&pg={$row['user']}\",\n\t\t\t\t\t\t\t\t'sheet_other').\"\\\" >\".$row['user'].\"</a><br>(anonimo)\".$avatar;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$user = \"Anonimo\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$body.=\"<tr><td class=\\\"msg_row\\\"><b>Utente:</b> $user</td><td class=\\\"msg_row\\\"><b>Oggetto:</b> \".$object.\" \".$unread;\n\t\t\t$msgid=$row['id'];\n\t\t\t$user=$row['user'];\n\t\t\t\n\t\t\tif(($user == $x7s->username && !$board['readonly']) || checkIfMaster()){\n\t\t\t\t$body .=\" <a href=./index.php?act=boards&send=\".$board['id'].\"&modify=\".$msgid.\">[Modify]</a>\";\n\t\t\t}\n\t\t\tif(checkIfMaster()){\n\t\t\t\t$body .=\" <a href=\\\"#\\\" onClick=\\\"javascript: do_delete('./index.php?act=boards&delete=\".$msgid.\"')\\\">[Delete]</a>\";\n\t\t\t}\n\n\t\t\t$msg = preg_replace($url_regexp, '<a href=\"\\\\0\" target=\"_blank\">\\\\0</a>', $msg);\t\n\t\t\t$body.= \"<br><br>\".$msg.\"<br><br><br><br></td></tr>\\n\";\n\t\t}\n\n\t\t$body .= \"</table>\";\n\t\t\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<br><br><a href=./index.php?act=boards&send=\".$board['id'].\"&reply=\".$id.\">Replica</a><br>\";\n\t\t}\n\t\t\n\t\t$body.=\"<a href=\\\"index.php?act=boards&board=\".$board['id'].\"\\\">Torna alla board</a><br>\";\n\t\t\n\t\t$body.=$navigator;\n\t\t$head = \"Board \".$board['name'].\" messaggio: \".$object;\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "function wise_chat_endpoint_messages() {\n\t$wiseChatEndpoints = WiseChatContainer::get('endpoints/WiseChatEndpoints');\n\t$wiseChatEndpoints->messagesEndpoint();\n}", "function getChatMessage($name) {\n\n\t\treturn htmlspecialchars_decode($this->chat_messages[$name][0]);\n\t}", "public function syncChatList()\n\t{\n\t\t$chat = New Chats;\n\n\t\t$data = $chat->getAll(array('id'),'id','ASC',array(array('id_user_1',$this->id),array('id_user_2',$this->id,'OR')));\n\n\t\tforeach ($data as $value) {\n\t\t\t$chats[] = $value['id'];\n\t\t}\n\t\t\n\t\tforeach ($chats as $key => $value) {\n\t\t\t$chat = New Chats;\n\t\t\t$chat->set('id',$value);\n\t\t\t$chat->hydrate();\n\t\t\t$chat->countNewMsg();\n\t\t\n\t\t\t$chat_list[] = $chat;\n\t\t\t\n\t\t}\n\n\t\t$this->chats = $chat_list;\n\n\n\t}", "function messager($m){\r\n\t\tif($m['immediacy']){\r\n\t\t\t$this->boinkIt($m['url']);\r\n\t\t}else {\r\n\t\t\tif($m['goon']){\r\n\t\t\t\tif($m['hl'] == '')$m['hl'] = 'hlRed';\r\n\t\t\t\treturn array($m['title'], $m['text'], $m['hl']);\r\n\t\t\t}else {\r\n\t\t\t\t$w = str_replace(\"<%TITLE%>\", $m['title'], $this->skin->wrapMsg);\r\n\t\t\t\t$w = str_replace(\"<%TEXT%>\", $m['text'], $w);\r\n\t\t\t\t$w = str_replace(\"<%URL%>\", $m['url'], $w);\r\n\t\t\t\t$w = str_replace(\"<%SEC%>\", $m['sec'], $w);\r\n\t\t\t\t$this->export($w);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function chatUpdater($owner, $msg) {\n $path = \"../Tables/TableCreatedBy_\" . $owner . \"/chat.txt\";\n fwrite(fopen($path, 'a'), \"<div class='msgln'>(\" . date(\"g:i A\") . \") <b>\" . $_SESSION['user'] . \"</b>: \" .\n str_replace(\"\\n\", \"\", stripslashes(htmlspecialchars($msg))) . \"</div>\\n\");\n echo \"Done\";\n}", "function uti_chat_callback($args) {\n\n\t\t$settings = get_option('utility_theme_options');\n\n\t\tif(!isset($settings['uti_chat'])) {\n\t\t\t$settings['uti_chat'] = \"\";\n\t\t}\n\n\t\t$output = \"\";\n\n\t\t$output .= '<div id=\"uti_chat\">';\n\t\t\t$output .= '<input type=\"checkbox\" value=\"true\" '.checked( $settings['uti_chat'], 'true', false) . ' id=\"utility_theme_options[uti_chat]\" name=\"utility_theme_options[uti_chat]\" >';\n\t\t\tif (!empty($args[0])) {$output .= '<div></div><p class=\"enovathemes-front-end-panel-info\">'.$args[0].'</p>';}\n\t\t$output .= '</div>';\n\t\techo $output;\n\t \n\t}", "public function __construct($chat)\n {\n //\n $this->chat = $chat;\n }", "function message_everyone($title, $msg)\n{\n $all_users = sql_query(\"SELECT id FROM users WHERE `id`=558\");\n $dt = sqlesc(date(\"Y-m-d H:i:s\"));\n while ($dat = mysql_fetch_assoc($all_users)) {\n sql_query(\"INSERT INTO messages (sender, receiver, added, subject, msg) VALUES (0, $dat[id], $dt, \" . sqlesc(\"系统公告:\" . $title) . \", \" . sqlesc($msg . \"\\r\\n\\r\\n详见首页公告\") . \")\") or sqlerr(__FILE__, __LINE__);\n }\n}", "function onTextmessage(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host)\n{\n global $ts3, $name, $debug; \n $msg = $event[\"msg\"];\n $invoker = $event[\"invokername\"];\n \n if($invoker != $name) {\n \n if($debug) echo($invoker.\": \".$msg.\"\\n\");\n \n if($debug) echo(\"User \".$invoker.\" passed security check\\n\");\n \n $invoker_db = $ts3->clientGetByName($invoker);\n \n if($invoker_db[\"client_unique_identifier\"] == \"DOgQ0YV9+wZ9YMdD3JPfhvlv/xqM=\" OR $invoker_db[\"client_unique_identifier\"] == \"gWszaxdv1W+8KlIHafUe+ZdOaiI=\") {\n\n // preparing the command arguments\n $block = array(11, 26, 2);\n $values[1] = intval( $uid );\n $id_a = $ts3->getId();\n $arguments = explode(\" \", $msg);\n if($debug) echo(\"Arguments:\\n\"); print_r($arguments);echo(\"\\n\"); \n switch ($arguments[0]) {\n\tcase \"!ping\":\n\t\tgizisent(\"Pong!\",$ts3,$id_a);\n\t\tbreak;\n\tcase \"!add\":\n\t\tif (in_array($arguments[1], $block)){\n\t\tgizisent(\"Access denied\",$ts3,$id_a);\n\t\t} else {\n\t\t$ts3->serverGroupClientAdd($arguments[1],$arguments[2]);\t\t\n\t\tgizisent(\"Rank was add\",$ts3,$id_a);\n\t\t}\n\t\tbreak;\t \n\tcase \"!del\":\n\t\tif (in_array($arguments[1], $block)){\n\t\tgizisent(\"Access denied\",$ts3,$id_a);\n\t\t} else {\n\t\t$ts3->serverGroupClientDel($arguments[1],$arguments[2]);\t\t\n\t\tgizisent(\"Rank was remove\",$ts3,$id_a);\n\t\t}\n\t\tbreak;\t\t\t\n\tcase \"!info\":\n\t\tgizisent(\"Project GzPro.net\",$ts3,$id_a);\n\t\tbreak;\t \n\tcase \"!help\":\n\t\tgizisent(\"Commands:\n\t\t!ping - test\n\t\t!add <id ServerGroup> <dbid user> - Giving Rank\n\t\t!del <id ServerGroup> <dbid user> - Remove Rank\n\t\t!info - Information Bot\",$ts3,$id_a);\n }\n \n}\n}\n}", "function chat_lese(\n $o_id,\n $raum,\n $u_id,\n $sysmsg,\n $ignore,\n $back,\n $nur_privat = FALSE,\n $nur_privat_user = \"\")\n{\n // $raum = ID des aktuellen Raums\n // $u_id = ID des aktuellen Users\n \n global $dbase, $user_farbe, $letzte_id, $chat, $system_farbe, $t, $chat_status_klein, $admin;\n global $u_farbe_alle, $u_farbe_noise, $u_farbe_priv, $u_farbe_sys, $u_farbe_bg, $u_nick, $u_level, $u_smilie, $u_systemmeldungen;\n global $show_spruch_owner, $farbe_user_fest, $id, $http_host;\n global $user_nick, $conn;\n \n // Systemfarbe setzen\n if ($u_farbe_sys != \"-\")\n $system_farbe = $u_farbe_sys;\n \n // Workaround, falls User in Community ist\n if (!$raum)\n $raum = \"-1\";\n \n // Voreinstellung\n $text_ausgegeben = FALSE;\n $erste_zeile = TRUE;\n $br = \"<BR>\\n\";\n $qquery = \"\";\n \n // Optional keine Systemnachrichten\n if (!$sysmsg)\n $qquery .= \" AND c_typ!='S'\";\n \n // Optional keine öffentlichen oder versteckten Nachrichten\n if ($nur_privat)\n $qquery .= \" AND c_typ!='H' AND c_typ!='N'\";\n \n if ($nur_privat_user) {\n #echo \"nur_privat_user ist gesetzt! $nur_privat_user | $u_id\";\n $txt = \"<b>$u_nick flüstert an \" . $user_nick . \":</b>\";\n $len = strlen($txt);\n #print $txt;\n $qquery .= \" AND (c_an_user = '$u_id' and c_von_user_id != '0' and ( (c_von_user_id = '$u_id' and left(c_text,$len) = '$txt') or c_von_user_id = '$nur_privat_user') )\";\n #print htmlentities($qquery);\n }\n if ($back == 1) {\n \n // o_chat_id lesen\n $query = \"SELECT HIGH_PRIORITY o_chat_id FROM online WHERE o_id=$o_id\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $o_chat_id = mysql_result($result, 0, \"o_chat_id\");\n } else {\n $o_chat_id = 0;\n }\n ;\n mysql_free_result($result);\n \n // Nachrichten ab o_chat_id (Merker) in Tabelle online ausgeben\n // Nur Nachrichten im aktuellen Raum anzeigen, außer Typ P oder S und an User adressiert\n $query = \"SELECT c_id FROM chat WHERE c_raum='$raum' AND c_id >= $o_chat_id\"\n . $qquery;\n \n unset($rows);\n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n mysql_free_result($result);\n \n $query = \"SELECT c_id FROM chat WHERE c_typ IN ('P','S') AND c_an_user=$u_id AND c_id >= $o_chat_id\"\n . $qquery;\n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n mysql_free_result($result);\n if (isset($rows) && is_array($rows))\n sort($rows);\n \n } elseif ($back > 1) {\n \n // o_chat_id lesen (nicht bei Admins)\n // Admins dürfen alle Nachrichten sehen\n if (!$admin) {\n $query = \"SELECT HIGH_PRIORITY o_chat_id FROM online WHERE o_id=$o_id\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $o_chat_id = mysql_result($result, 0, \"o_chat_id\");\n } else {\n $o_chat_id = 0;\n }\n ;\n mysql_free_result($result);\n } else {\n $o_chat_id = 0;\n }\n \n // $back-Zeilen in Tabelle online ausgeben, höchstens aber ab o_chat_id\n // Nur Nachrichten im aktuellen Raum anzeigen, außer Typ P oder S und an User adressiert\n $query = \"SELECT c_id FROM chat WHERE c_raum='$raum' AND c_id >= $o_chat_id\"\n . $qquery;\n \n unset($rows);\n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n mysql_free_result($result);\n \n $query = \"SELECT c_id FROM chat WHERE c_typ IN ('P','S') AND c_an_user=$u_id AND c_id >= $o_chat_id\"\n . $qquery;\n \n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n mysql_free_result($result);\n if (isset($rows) && is_array($rows))\n sort($rows);\n \n // Erste Zeile ausrechnen, ab der Nachrichten ausgegeben werden\n // Chat-Zeilen vor $o_chat_id löschen\n if (isset($rows)) {\n $zeilen = count($rows);\n } else {\n $zeilen = 0;\n }\n if ($zeilen > $back) {\n $o_chat_id = $rows[($zeilen - intval($back))];\n foreach ($rows as $key => $value) {\n if ($value < $o_chat_id) {\n unset($rows[$key]);\n }\n }\n }\n \n } else {\n \n // Die letzten Nachrichten seit $letzte_id ausgeben\n // Nur Nachrichten im aktuellen Raum anzeigen, außer Typ P oder S und an User adressiert\n $query = \"SELECT c_id FROM chat WHERE c_raum=$raum AND c_id > $letzte_id\"\n . $qquery;\n \n unset($rows);\n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n @mysql_free_result($result);\n \n $query = \"SELECT c_id FROM chat WHERE c_typ IN ('P','S') AND c_an_user=$u_id AND c_id > $letzte_id\"\n . $qquery;\n \n $result = mysql_query($query, $conn);\n if ($result) {\n while ($row = mysql_fetch_row($result)) {\n $rows[] = $row[0];\n }\n }\n @mysql_free_result($result);\n if (isset($rows) && is_array($rows))\n sort($rows);\n \n }\n \n // + für regulären Ausdruck filtern\n $nick = str_replace(\"+\", \"\\\\+\", $u_nick);\n \n // Query aus Array erzeugen und die Chatzeilen lesen\n if (isset($rows) && is_array($rows)) {\n $query = \"SELECT * FROM chat WHERE c_id IN (\" . implode(\",\", $rows)\n . \") ORDER BY c_id\";\n $result = mysql_query($query, $conn);\n } else {\n unset($result);\n }\n \n // Nachrichten zeilenweise ausgeben\n if (isset($result) && $result) {\n \n $text_weitergabe = \"\";\n while ($row = mysql_fetch_object($result)) {\n \n // Falls ID ignoriert werden soll -> Ausgabe überspringen\n // Falls noch kein Text ausgegeben wurde und es eine Zeile in \n // der Mitte oder am Ende einer Serie ist -> Ausgabe überspringen\n \n // Systemnachrichten, die <<< oder >>> an Stelle 4-16 enthalten herausfiltern\n $ausgeben = true;\n if ($u_systemmeldungen == \"N\") {\n if (($row->c_typ == \"S\")\n && (substr($row->c_text, 3, 12) == \"&gt;&gt;&gt;\"\n || substr($row->c_text, 3, 12) == \"&lt;&lt;&lt;\")) {\n $ausgeben = false;\n }\n }\n \n // Die Ignorierten User rausfiltern \n if (isset($ignore[$row->c_von_user_id])\n && $ignore[$row->c_von_user_id]) {\n $ausgeben = false;\n }\n \n if ($ausgeben\n && ($text_ausgegeben || $row->c_br == \"normal\"\n || $row->c_br == \"erste\")) {\n \n // Alter Code \n // if (!$ignore[$row->c_von_user_id] && ($text_ausgegeben || $row->c_br==\"normal\" || $row->c_br==\"erste\")){\n \n // Letzte ID merken\n $letzte_id = $row->c_id;\n \n // Userfarbe setzen\n if (strlen($row->c_farbe) == 0) :\n $row->c_farbe = \"#\" . $user_farbe;\n else :\n $row->c_farbe = \"#\" . $row->c_farbe;\n endif;\n \n // Student: 29.08.07 - Problem ML BGSLH\n // Wenn das 255. Zeichen ein leerzeichen\n // ist, dann wird es in der Datenbank nicht\n // gespeichert, da varchar feld\n // hier wird es reingehängt, wenn es in sequenz am\n // anfang oder in der mitte, und der text nur 254\n // zeichen breit ist\n if ((strlen($row->c_text) == 254)\n && (($row->c_br == \"erste\") || ($row->c_br == \"mitte\"))) {\n $row->c_text .= ' ';\n }\n \n // Text filtern\n $c_text = stripslashes($row->c_text);\n $c_text = $text_weitergabe . $c_text;\n $text_weitergabe = \"\";\n \n // Merken, dass Text ausgegeben wurde\n $text_ausgegeben = TRUE;\n \n // Smilies ausgeben oder unterdrücken\n if ($u_smilie == \"N\") {\n $c_text = str_replace(\"<SMIL\",\n \"<small>&lt;SMILIE&gt;</small><!--\", $c_text);\n $c_text = str_replace(\"SMIL>\", \"-->\", $c_text);\n } else {\n $c_text = str_replace(\"<SMIL\", \"<IMG\", $c_text);\n $c_text = str_replace(\"SMIL>\", \">\", $c_text);\n }\n \n // bugfix: gegen große Is... wg. verwechslung mit kleinen Ls ...\n // $row->c_von_user=str_replace(\"I\",\"i\",$row->c_von_user);\n \n if ($chat_status_klein) {\n $sm1 = \"<small>\";\n $sm2 = \"</small>\";\n } else {\n $sm1 = \"\";\n $sm2 = \"\";\n }\n \n // In Zeilen mit c_br=letzte das Zeilenende/-umbruch ergänzen\n if ($row->c_br == \"erste\" || $row->c_br == \"mitte\") {\n $br = \"\";\n } else {\n $br = \"<BR>\\n\";\n }\n ;\n \n // im Text die Session-IDs in den Platzhalter <ID> einfügen\n if ($id)\n $c_text = str_replace(\"<ID>\", $id, $c_text);\n \n // alternativ, falls am ende der Zeile, und das \"<ID>\" auf 2 Zeilen verteilt wird\n if (($id)\n && (($row->c_br == \"erste\") || ($row->c_br == \"mitte\"))) {\n if (substr($c_text, -3) == '<ID') {\n $text_weitergabe = substr($c_text, -3);\n $c_text = substr($c_text, 0, -3);\n }\n \n if (substr($c_text, -2) == '<I') {\n $text_weitergabe = substr($c_text, -2);\n $c_text = substr($c_text, 0, -2);\n }\n \n if (substr($c_text, -1) == '<') {\n $text_weitergabe = substr($c_text, -1);\n $c_text = substr($c_text, 0, -1);\n }\n }\n \n // im Text die HTTP_HOST in den Platzhalter <HTTP_HOST> einfügen\n $c_text = str_replace(\"<HTTP_HOST>\", $http_host, $c_text);\n \n // Verschienen Nachrichtenarten unterscheiden und Nachricht ausgeben\n switch ($row->c_typ) {\n \n case \"S\":\n if (($admin || $u_level == \"A\")) {\n $c_text = str_replace(\"<!--\", \"\", $c_text);\n $c_text = str_replace(\"-->\", \"\", $c_text);\n }\n // S: Systemnachricht\n if ($row->c_an_user) {\n // an aktuellen User\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $zanfang = $sm1\n . \"<FONT COLOR=\\\"$system_farbe\\\" TITLE=\\\"$row->c_zeit\\\">\";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $sm2 . $br;\n }\n } else {\n // an alle User\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $zanfang = $sm1\n . \"<FONT COLOR=\\\"$system_farbe\\\" TITLE=\\\"$row->c_zeit\\\"><B>$chat:</B>&nbsp;\";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $sm2 . $br;\n }\n }\n break;\n \n case \"P\":\n // P: Privatnachricht an einen User\n \n // Falls dies eine Folgezeile ist, Von-Text unterdrücken\n \n if (strlen($row->c_von_user) != 0) {\n if ($u_farbe_priv != \"-\")\n $row->c_farbe = \"#$u_farbe_priv\";\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $temp_von_user = str_replace(\"<ID>\", $id,\n $row->c_von_user);\n $temp_von_user = str_replace(\"<HTTP_HOST>\",\n $http_host, $temp_von_user);\n $zanfang = \"<FONT COLOR=\\\"\" . $row->c_farbe\n . \"\\\" TITLE=\\\"$row->c_zeit\\\"><B>\"\n . $temp_von_user\n . \"&nbsp;($t[chat_lese1]):</B> \";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $br;\n }\n } else {\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $temp_von_user = str_replace(\"<ID>\", $id,\n $row->c_von_user);\n $temp_von_user = str_replace(\"<HTTP_HOST>\",\n $http_host, $temp_von_user);\n $zanfang = $sm1\n . \"<FONT COLOR=\\\"$system_farbe\\\" TITLE=\\\"$row->c_zeit\\\"><B>\"\n . $temp_von_user\n . \"&nbsp;($t[chat_lese1]):</B> \";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $sm2 . $br;\n }\n }\n break;\n \n case \"H\":\n // H: Versteckte Nachricht an alle ohne Absender\n if ($show_spruch_owner && ($admin || $u_level == \"A\")) {\n $c_text = str_replace(\"<!--\", \"<b>\", $c_text);\n $c_text = str_replace(\"-->\", \"</b>\", $c_text);\n }\n if ($row->c_von_user_id != 0) {\n // eigene Farbe für noise, falls gesetzt.\n if ($u_farbe_noise != \"-\")\n $row->c_farbe = \"#$u_farbe_noise\";\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $zanfang = \"<FONT COLOR=\\\"$row->c_farbe\\\" TITLE=\\\"$row->c_zeit\\\"><I>&lt;\";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"&gt;</I></FONT>\" . $br;\n }\n } else {\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $zanfang = $sm1\n . \"<FONT COLOR=\\\"$system_farbe\\\" TITLE=\\\"$row->c_zeit\\\"><I>&lt;\";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"&gt;</I></FONT>\" . $sm2 . $br;\n }\n }\n break;\n \n default:\n // N: Normal an alle mit Absender\n // eigene Farbe, falls gesetzt\n if ($row->c_von_user_id != $u_id\n && $u_farbe_alle != \"-\")\n $row->c_farbe = $u_farbe_alle;\n \n // eigene Farbe für nachricht an Privat, falls gesetzt.\n if (preg_match(\"/\\[.*&nbsp;$nick\\]/i\", $c_text)\n && $u_farbe_priv != \"-\")\n $row->c_farbe = $u_farbe_priv;\n \n // Nur Nick in Userfarbe oder ganze Zeile\n if ($farbe_user_fest) {\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $temp_von_user = str_replace(\"<ID>\", $id,\n $row->c_von_user);\n $temp_von_user = str_replace(\"<HTTP_HOST>\",\n $http_host, $temp_von_user);\n $zanfang = \"<FONT COLOR=\\\"\" . $row->c_farbe\n . \"\\\" TITLE=\\\"$row->c_zeit\\\"><B>\"\n . $temp_von_user\n . \":</B> </FONT><FONT COLOR=\\\"$system_farbe\\\" TITLE=\\\"$row->c_zeit\\\"> \";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $br;\n }\n } else {\n if (!$erste_zeile) {\n $zanfang = \"\";\n } else {\n $temp_von_user = str_replace(\"<ID>\", $id,\n $row->c_von_user);\n $temp_von_user = str_replace(\"<HTTP_HOST>\",\n $http_host, $temp_von_user);\n $zanfang = \"<FONT COLOR=\\\"\" . $row->c_farbe\n . \"\\\" TITLE=\\\"$row->c_zeit\\\">\" . \"<B>\"\n . $temp_von_user . \":</B> \";\n }\n if ($br == \"\") {\n $zende = \"\";\n } else {\n $zende = \"</FONT>\" . $br;\n }\n }\n }\n // Chatzeile ausgeben\n echo $zanfang . $c_text . $zende;\n \n // Ist aktuelle Zeile die erste Zeile oder eine Folgezeile einer Serie ?\n // Eine Serie steht immer am Stück in der DB (schreiben mit Lock Table)\n // Falls br gesetzt ist, ist nächste Zeile eine neue Zeile (erste zeile einer Serie)\n if ($br) {\n $erste_zeile = TRUE;\n } else {\n $erste_zeile = FALSE;\n }\n \n }\n }\n }\n \n if (isset($result))\n mysql_free_result($result);\n \n flush();\n return ($text_ausgegeben);\n \n}", "public function get_message_strings() {\n foreach($this->messages as $singleMessage) {\n \n }\n }", "function getData($lastID) {\r\n\r\n include(\"include/settings.php\"); # getting table prefix\r\n include(\"include/offset.php\");\r\n\r\n # discard it if we are editing\r\n $sid = isset($_GET[\"sid\"])?$_GET[\"sid\"]:0; # get shout id (sid)and set it to zero for bool\r\n\r\n \r\n $sql = \"SELECT * FROM {$TABLE_PREFIX}chat WHERE id > \".$lastID.\" AND id != \".$sid.\" ORDER BY id DESC\";\r\n $conn = his_getDBConnection(); # establishes the connection to the database\r\n $results = mysqli_query( $conn, $sql);\r\n \r\n # getting the data array\r\n while ($row = mysqli_fetch_array($results)) {\r\n \r\n # creating and naming array\r\n $id = $row[id];\r\n $uid = $row[uid];\r\n $time = $row[time];\r\n $name = $row[name];\r\n $text = $row[text];\r\n \r\n # if no name is present somehow, $name and $text are set to the strings under\r\n # we assume all must be ok, othervise no post will be made by javascript check\r\n # if ($name == '') { $name = 'Anonymous'; $text = 'No message'; }\r\n \r\n # we lego put together our chat using some conditions and css and javascript this time\r\n\r\n print \"<span class='name'>\".date(\"d/m/Y H:i:s\", $time - $offset).\" | <a href=\\\"javascript:windowunder('index.php?page=userdetails&amp;id=\".$uid.\"')\\\">\".$name.\"</a>:</span>\";\r\n\r\n global $CURUSER;\r\n \r\n if ($CURUSER[\"admin_access\"]!=\"yes\" && $CURUSER[\"uid\"]!=\"\".$uid.\"\") {}\r\n \r\n else {\r\n # edit/delete buttons -->\r\n print \"<div style='text-align:right;\r\n margin-top:-13px;\r\n margin-bottom:-3.5px;\r\n '>\r\n <a href='index.php?page=allshout&amp;sid=$id&amp;edit'><img border='0' class='EditSwap' src='images/canvas.gif' alt='' /></a>\r\n <a onclick=\\\"return confirm('\". str_replace(\"'\",\"\\'\",DELETE_CONFIRM).\"')\\\" href='index.php?page=allshout&amp;sid=$id&amp;delete'>\r\n <img border='0' class='DeleteSwap' src='images/canvas.gif' alt='' /></a>\r\n </div>\";\r\n \r\n }\r\n \r\n # chat output -->\r\n print \"<div class='chatoutput'>\".format_shout($text).\"</div>\"; \r\n }\r\n}", "function getChatId()\r\n\t{\r\n\t\t$chatid = \"SELECT chat_id, map_id FROM chat WHERE map_id = '$map_id'\";\r\n\t\t$chatResult = mysql_query($chatid);\r\r\n\t\tif(mysql_affected_rows() == 1)\r\n\t\t{\r\n\t\t\t$row = mysql_fetch_row($chatResult);\r\n\t\t\t$chat_id = $row[0];\r\r\n\t\t\treturn $chat_id;\r\n\t\t}\r\n\t}", "public function getMessage()\n {\n $lastMsg = $this->getUpdates();\n if(count($lastMsg))\n {\n $lastMsg = $lastMsg[count($lastMsg) - 1];\n $this->currentChat = $lastMsg['message']['chat']['id'];\n $this->currentMsg = $lastMsg['message'];\n $this->currentMsgId = $lastMsg['message']['message_id'];\n $this->currentUser = $lastMsg['message']['from']['id'];\n $this->messageType = (isset($lastMsg['message']['contact'])) ? 'register' : 'text';\n $this->setLastUpdate($lastMsg['update_id'] + 1);\n }\n else\n {\n $this->currentMsg = array();\n }\n }", "function ppmess_shortcode_all_messages_view(){\n\n\t$data = ppmess_shortcode_all_messages();\n\t\n\tif(isset($data['errors'])){\n\t\techo ('An error has occurred');\n\t\t// echo $data['errors']\t\t\n\t\treturn;\n\t}\n?>\t\t\n\t<!------------ Post info ------------>\n\t<div class=\"post-info-commun\">\n\t\t<?php echo __('Author of the post', 'ppmess');\n\t\t\tif($data['post_author'] == $data['user_id']):\t?>\n\t\t\t\t<!-- logged user is author of the post -->\n\t\t\t\t<span class=\"span-mark\"><?php echo esc_html($data['user_login']); ?></span>\n\t\t\t\t<a id=\"link-logout\" href=\"<?php echo wp_logout_url(); ?>\"><?php echo __('LogOut ?', 'ppmess'); ?></a>\n\t\t<?php \t\n\t\t\telse:\t?>\t\n\t\t\t\t<!-- user2 is author of the post -->\n\t\t\t\t<span class=\"span-mark\"><?php echo esc_html($data['user2_login']); ?></span>\n\t\t<?php\n\t\t\tendif;\n\t\t\t\n\t\t\techo ' | ';\n\t\t\techo __('Refers to post: ', 'ppmess');\t\t\n\t\t\tif( $data['post_status'] ):\t\t?>\n\t\t\t\t<!-- post is available -->\n\t\t\t\t<a id=\"id-post-ppmess\" href=\"<?php echo esc_url( get_permalink($data['post_id']) ); ?>\" title=\"<?php echo esc_attr( $data['post_title'] ); ?>\">\n\t\t\t\t\t<?php echo esc_html($data['post_title']); ?>\n\t\t\t\t</a>\n\t\t<?php \t\n\t\t\telse: ?>\n\t\t\t\t<!-- is no longer available -->\n\t\t\t\t<span><?php echo esc_html($data['post_title']); ?></span>\n\t\t<?php \t\n\t\t\tendif; ?>\n\t</div>\n\t\t\n\t<!---------- Sender info ---------->\n\t<div class=\"sender-info-commun\">\n\t\t<?php echo __('Talking with', 'ppmess'); // <!-- &#x20;&#x20; --><!-- space -->\n\t\t\tif($data['user_id'] != $data['post_author']):\t?>\n\t\t\t\t<span class=\"span-mark\" title=\"Logged user\"><?php echo esc_html($data['user_login']); ?></span>\n\t\t\t\t<a id=\"link-logout\" href=\"<?php echo wp_logout_url(); /* redirect: wp_logout_url(login-form) */ ?>\"><?php echo __('LogOut ?', 'ppmess'); ?></a>\t\t\t\t\n\t\t<?php \n\t\t\telse: ?>\n\t\t\t\t<span class=\"span-mark\" title=\"\"><?php echo esc_html($data['user2_login']); ?></span>\n\t\t<?php \n\t\t\tendif; ?>\n\t</div>\n\t\n\t<!-- Povratak na listu privatnih poruka -->\n\t<div class=\"ppmess-buck-link\">\n\t\t<a class=\"ppmess-tag-a ppmess-buck-a\" href=\"<?php echo $data['page_url']; ?>\">&#x21d0;&#x20;<?php echo __('Back', 'ppmess'); ?></a>\n\t</div>\n\t\n\t<!---------- All messages of the single communication ---------->\n\t<div class=\"single-commun-frame\">\n\t\t<div id=\"ppmessMessagesFrame\" class=\"single-messages-frame\">\n\t<?php \n\t\t\tif( ! empty($data['messages']) ): \n\t\n\t\t\t\tforeach($data['messages'] as $message):\n\t\t\t\t\tif($message['sender_id'] == $data['user_id']){\n\t\t\t\t\t\t$mess_style = 'background-color:#f0f0f0;text-align:left;';\n\t\t\t\t\t\t$sender = $data['user_login'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$mess_style = 'background-color:#ffffff;text-align:right;';\n\t\t\t\t\t\t$sender = $data['user2_login'];\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\t<div id=\"ppmessage-<?php echo $message['message_id']; ?>\" class=\"single-message-frame\" style=\"<?php echo esc_attr( $mess_style ); ?>\">\t\n\t\t\t\t\t\t<p class=\"p-row1-pmess\">\n\t\t\t\t\t\t\t<?php echo __('from', 'ppmess'); ?>\n\t\t\t\t\t\t\t<span style=\"color:#0073aa;font-style:italic;\"><?php echo esc_html( ' ' . $sender); ?></span>\n\t\t\t\t\t\t\t<?php echo ' | '; ?>\n\t\t\t\t\t\t\t<?php echo __('date', 'ppmess'); ?>\n\t\t\t\t\t\t\t<span style=\"color:#0073aa;font-style:italic;\"><?php echo esc_html( date('d-M-Y ', strtotime($message['date_created'])) ); ?></span>\n\t\t\t\t\t\t\t<?php echo ' | '; ?>\n\t\t\t\t\t\t\t<?php echo __('time', 'ppmess'); ?>\n\t\t\t\t\t\t\t<span style=\"color:#0073aa;font-style:italic;\"><?php echo esc_html( date('G:i ', strtotime($message['date_created'])) ); ?></span>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"p-row2-pmess\"><?php echo $message['message_content']; ?></p>\n\t\t\t\t\t</div>\n\t\t<?php\tendforeach;\n\t\t\tendif;\t?>\n\t\t\t<!-------------- New Comment - AJAX ---------------------------->\n\t\t\t<!---- There is append new <div> element with a new message ---->\n\t\t\t<!-------------------------------------------------------------->\n\t\t</div>\n<?php \tif( $data['messages'] == FALSE ):\t// will never be happen ?>\n\t\t\t<!-- No messages -->\n\t\t\t<div class=\"ppmess-info-dark\">\n\t\t\t\t<?php echo __('No messages exists !', 'ppmess'); ?>\n\t\t\t</div>\n\t<?php \t\n\t\tendif;\n\t\t\n\t\t// post is available\n\t\tif( $data['post_status'] ):\t\t?>\t\t\t\n\t\t\t<h4 class=\"ppmess-h4\">\n\t\t\t\t<?php echo __('Send private message to author of the post', 'ppmess'); ?>\n\t\t\t</h4>\t\t\t\n\t\t\t<!-------------------- Error message -------------------------->\n\t\t\t<!----------- here will be displayed error if occurred -------->\t\n\t\t\t<!------------------------------------------------------------->\n\t\t\t\n\t\t\t<!------------------------ Form za slanje komentara ------------------------>\n\t\t\t<form id=\"ppmessNewMessForm\" method=\"POST\" action=\"\">\n\t\t\t\t<label for=\"ppmessMessageContent\"><?php /* echo __('Message', 'ppmess'); */ ?></label><br/>\n\t\t\t\t<textarea name=\"ppmess_message_content\" type=\"text\" id=\"ppmessMessageContent\" rows=\"10\" autofocus placeholder=\"<?php echo __('Leave the message', 'ppmess'); ?>\"></textarea>\n\t\t\t</form>\n\t\t\t<div class=\"single-commun-submit\">\n\t\t\t\t<?php\n\t\t\t\t\t$link = admin_url('admin-ajax.php?action=ppmess_send_message&post_id=' . $data['post_id'] . '&message_id=' . $data['message_id'] . '&user2_id=' . $data['user2_id'] . '&current_user=' . $data['user_id'] .\n\t\t\t\t\t\t'&message_content_id=ppmessMessageContent'\n\t\t\t\t\t);\n\t\t\t\t\techo '<a class=\"ppmess-tag-a ppmess-send-message ppmess-ajax\" data-post_id=\"' . $data['post_id'] . '\" data-message_id=\"' . $data['message_id'] . '\" \n\t\t\t\t\tdata-user2_id=\"' . $data['user2_id'] . '\" data-current_user=\"'. $data['user_id'] . \n\t\t\t\t\t'\" data-message_content_ID=\"ppmessMessageContent\" href=\"' . $link . '\">Send message</a>';\n\t\t\t\t?>\n\t\t\t</div>\t\n\t<?php \n\t\telse:\t?>\n\t\t\t<!-- post no longer available -->\n\t\t\t<div class=\"ppmess-info-dark\">\n\t\t\t\t<?php printf(__('Post %s no longer available !', 'ppmess'), '<span style=\"color:#1f3d7a;font-style:italic;\">' . $data['post_title'] . '</span>'); ?>\n\t\t\t</div>\n\t<?php \n\t\tendif;\t?>\n\t</div>\n\t\n\t<?php\n}", "function fetch_user_chat_history($from_user_id, $to_channel_id, $link) {\n\n $sql = \"SELECT * FROM chat_message WHERE (from_user_id = '\" . $from_user_id .\"' AND to_channel_id = '\" . $to_channel_id .\"')\n OR (to_channel_id = '\" . $to_channel_id .\"')\n ORDER BY timestamp ASC\";\n\n\n $output = \"\";\n if($stmt = mysqli_prepare($link, $sql)) {\n // Attempt to execute the prepared statement\n if(mysqli_stmt_execute($stmt)) {\n mysqli_stmt_store_result($stmt);\n \n // Bind result variables\n mysqli_stmt_bind_result($stmt, $sql_chat_message_id, $sql_to_channel_id, $sql_from_user_id, $sql_chat_message, $sql_timestamp, $sql_status);\n $output .= '<ul id=\"chat_history_list\" class=\"list-unstyled\">';\n while(mysqli_stmt_fetch($stmt)) {\n if($sql_from_user_id == $from_user_id) {\n $user_name = '<b class=\"text-success\">'.$_SESSION['username'].'</b>';\n } else {\n $user_name = '<b class=\"text-danger\">' . get_user_name($sql_from_user_id, $link) .'</b>'; \n }\n\n $output .= '\n <li style=\"border-bottom:1px dotted #ccc\">\n <p>'.$user_name.' - '.$sql_chat_message.'\n <div align=\"right\">\n - <small><em>'.$sql_timestamp.'</em></small>\n </div>\n </p>\n </li>';\n }\n\n } \n }\n\n $output .= \"</ul>\";\n\n return $output;\n\n}", "public function getChatUrl()\n {\n\t\treturn $this->chat_url ?: $this->channel->getChatUrl($this);\n\t}", "private function send_msg() {\r\n }", "function getChatMessage($name) {\n\t\treturn $this->chat_messages[$name][0];\n\t}", "public function single_user_conversation_fun(){\n require_once REALTEO_PLUGIN_DIR . '/includes/single-user_conversation.php';\n }", "public function show( $chat)\n {\n //\n }", "function displayMessages()\n {\n global $db;\n $query = $db->query(\" SELECT * FROM messages\n WHERE messages.s = 'ilyes ouakouak' AND messages.r = 'IlyBot'\n \");\n\n $results = [];\n while ($result = $query->fetch()) {\n $results[] = $result;\n }\n\n return $results;\n }", "public function action_chat() {\n\t\t$recepient = $this->request->param('id');\n\t\t$sender = $this->_current_user;\n\t\t$avatar = ($sender->personnel_info->personnel_avatar) ? $sender->personnel_info->personnel_avatar : 'default.png';\n\t\t//STEP1: Save the chat message;\n\t\t$message = ORM::factory('Message');\n\t\t$message->values($this->request->post());\n\t\t$message->sender = $sender;\n\t\t$message->recepient = $recepient;\n\t\t$message->time = time();\n\t\ttry {\n\t\t\t$message->save();\n\t\t\t//STEP2: Send Chat Notification to Recepient\n\t\t\t$date = gmdate('m/d/Y H:i:s', $message->time) . \" UTC\";\n\t\t\t$payload = array(\n\t\t\t\t'msg_id' => $message->message_id,\n\t\t\t\t'msg' => $message->message,\n\t\t\t\t'time' => $date,\n\t\t\t\t'id' => $sender->id,\n\t\t\t\t'username' => $sender->username,\n\t\t\t\t'avatar' => 'assets/avatars/' . $avatar,\n\t\t\t\t\"local_time\" => Date::local_time(\"now\", \"m/d/Y H:i:s\", \"UTC\")\n\t\t\t);\n\t\t\t$this->_push('appchat', $payload, array(\n\t\t\t\t'id' => $recepient,\n\t\t\t\t'pushUid'=> Kohana::$config->load(\"pusher.pushUid\")\n\t\t\t));\n\t\t\t$this->_set_msg('Successful sent message', 'success', $payload);\n\t\t} catch(ORM_Validation_Exception $e) {\n\t\t\t$this->_set_msg('Someone slept on the job', 'error', TRUE);\n\t\t}\n\t}", "public function get_description()\n {\n return 'A chat bot for your chatroom named Trickstr who will interact with your members. Simply install the addon and chat away to Trickstr. Note that Trickstr is only active if there are no more than 2 members in a chatroom.';\n }", "function ap_core_chat_content( $content ) {\r\n global $ap_core_post_format_chat_ids;\r\n\r\n /* If this is not a 'chat' post, return the content. */\r\n if ( !has_post_format( 'chat' ) )\r\n return $content;\r\n\r\n /* Set the global variable of speaker IDs to a new, empty array for this chat. */\r\n $ap_core_post_format_chat_ids = array();\r\n\r\n /* Allow the separator (separator for speaker/text) to be filtered. */\r\n $separator = apply_filters( 'ap_core_chat_separator', ':' );\r\n\r\n /* Open the chat transcript div and give it a unique ID based on the post ID. */\r\n $chat_output = \"\\n\\t\\t\\t\" . '<ul id=\"chat-transcript-' . esc_attr( get_the_ID() ) . '\" class=\"chat-transcript list-group\">';\r\n\r\n /* Split the content to get individual chat rows. */\r\n $chat_rows = preg_split( \"/(\\r?\\n)+|(<br\\s*\\/?>\\s*)+/\", $content );\r\n\r\n /* Loop through each row and format the output. */\r\n foreach ( $chat_rows as $chat_row ) {\r\n\r\n /* If a speaker is found, create a new chat row with speaker and text. */\r\n if ( strpos( $chat_row, $separator ) ) {\r\n\r\n /* Split the chat row into author/text. */\r\n $chat_row_split = explode( $separator, trim( $chat_row ), 2 );\r\n\r\n /* Get the chat author and strip tags. */\r\n $chat_author = strip_tags( trim( $chat_row_split[0] ) );\r\n\r\n /* Get the chat text. */\r\n $chat_text = trim( $chat_row_split[1] );\r\n\r\n /* Get the chat row ID (based on chat author) to give a specific class to each row for styling. */\r\n $speaker_id = ap_core_chat_row_id( $chat_author );\r\n\r\n /* Open the chat row. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\" . '<li class=\"list-group-item chat-row ' . sanitize_html_class( \"chat-speaker-{$speaker_id}\" ) . '\">';\r\n\r\n /* Add the chat row author. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\\t\" . '<div class=\"pull-left chat-author ' . sanitize_html_class( strtolower( \"chat-author-{$chat_author}\" ) ) . ' vcard\"><cite class=\"fn\">' . apply_filters( 'ap_core_chat_author', $chat_author, $speaker_id ) . '</cite>' . $separator . '</div>';\r\n\r\n /* Add the chat row text. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\\t\" . '<div class=\"chat-text\">' . str_replace( array( \"\\r\", \"\\n\", \"\\t\" ), '', apply_filters( 'ap_core_chat_text', $chat_text, $chat_author, $speaker_id ) ) . '</div>';\r\n\r\n /* Close the chat row. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\" . '</li><!-- .chat-row -->';\r\n }\r\n\r\n /**\r\n * If no author is found, assume this is a separate paragraph of text that belongs to the\r\n * previous speaker and label it as such, but let's still create a new row.\r\n */\r\n else {\r\n\r\n /* Make sure we have text. */\r\n if ( !empty( $chat_row ) ) {\r\n\r\n /* Open the chat row. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\" . '<li class=\"list-group-item chat-row ' . sanitize_html_class( \"chat-speaker-{$speaker_id}\" ) . '\">';\r\n\r\n /* Don't add a chat row author. The label for the previous row should suffice. */\r\n\r\n /* Add the chat row text. */\r\n $chat_output .= \"\\n\\t\\t\\t\\t\\t\" . '<div class=\"chat-text\">' . str_replace( array( \"\\r\", \"\\n\", \"\\t\" ), '', apply_filters( 'ap_core_chat_text', $chat_row, $chat_author, $speaker_id ) ) . '</div>';\r\n\r\n /* Close the chat row. */\r\n $chat_output .= \"\\n\\t\\t\\t</li><!-- .chat-row -->\";\r\n }\r\n }\r\n }\r\n\r\n /* Close the chat transcript div. */\r\n $chat_output .= \"\\n\\t\\t\\t</ul><!-- .chat-transcript -->\\n\";\r\n\r\n /* Return the chat content and apply filters for developers. */\r\n return apply_filters( 'ap_core_chat_content', $chat_output );\r\n}", "public function initMessage() {}", "public function gettalkmessage()\r\n {\r\n \tif ($this->isPost()) {\r\n \t\t$userloginid = session('userloginid');\r\n \t\t$userStatusRecord = i_ajax_msg($userloginid);\r\n \t\t$MsgAt = M(\"MsgAt\");\r\n \t\t$MsgComment = M(\"MsgComment\");\r\n \t\t//$MsgSystem = M(\"MsgSystem\");\r\n \t\t$messageAtNums = $MsgAt->where(\"touid = $userloginid AND deliver = 0\")->count();\r\n \t\t$messageCommentNums = $MsgComment->where(\"uid = $userloginid AND deliver = 0\")->count();\r\n \t\t//FIXME $messageSystemNums\r\n \t\t//$messageSystemNums = $MsgSystem->where(\"uid = $userloginid AND deliver = 0\")->count();\r\n \t\tif ($userStatusRecord['acquire_seconds'] <= 6000) {\r\n \t\t\t$userStatusRecordAcquireSeconds = $userStatusRecord['acquire_seconds'] / 2;\r\n \t\t} else {\r\n \t\t\t$userStatusRecordAcquireSeconds = $userStatusRecord['acquire_seconds'];\r\n \t\t}\r\n \t\t$returnData = array(\r\n \t\t\t'messageAtNums' => $messageAtNums,\r\n \t\t\t'messageCommentNums' => $messageCommentNums,\r\n \t\t\t'messageSystemNums' => $messageSystemNums,\r\n \t\t\t'acquireTimes' => $userStatusRecord['acquire_times'],\r\n \t\t\t'acquireSeconds' => $userStatusRecordAcquireSeconds,\r\n \t\t\t'newmessage' => '',\r\n \t\t\t'content' => '',\r\n \t\t\t'image' => '',\r\n \t\t);\r\n\r\n \t\t/**\r\n \t\t * talk message\r\n \t\t */\r\n \t\t$postUid = $_POST['uid'];\r\n \t\t$postTouid = $_POST['touid'];\r\n \t\tif (!empty($postUid) && !empty($postTouid)) {\r\n \t\t\t$UserLogin = M(\"UserLogin\");\r\n \t\t\t$recordUserLogin = $UserLogin->where(\"$postUid = uid\")->find();\r\n \t\t\t$toRecordUserLogin = $UserLogin->where(\"$postTouid = uid\")->find();\r\n \t\t\tif (empty($recordUserLogin['uid']) || empty($toRecordUserLogin['uid'])) {\r\n \t\t\t\t$this->ajaxReturn($returnData,'message ajax, talk user is not exist','wrong');\r\n \t\t\t}\r\n\r\n \t\t\t/**\r\n \t\t\t * status_require_message\r\n \t\t\t */\r\n \t\t\t$TalkContent = M(\"TalkContent\");\r\n \t\t\t$TalkInputstatus = M(\"TalkInputstatus\");\r\n \t\t\tif($_POST['way'] == \"status_require_message\") {\r\n \t\t\t\t$freshTalkContent = $TalkContent->where(\"uid = $postUid AND touid = $postTouid AND deliver = 0\")->order(\"time DESC\")->find();\r\n \t\t\t\t$otherNewTalkContent = $TalkContent->where(\"touid = $postTouid AND deliver = 0\")->order(\"time DESC\")->find();\r\n \t\t\t\t$inputStatus = $TalkInputstatus->where(\"uid = $postUid AND touid = $postTouid\")->find();\r\n\r\n \t\t\t\t/**\r\n \t\t\t\t * update input status flag\r\n \t\t\t\t */\r\n \t\t\t\tif ((time() - $inputStatus['time']) > 2) {\r\n\r\n \t\t\t\t\t/**\r\n \t\t\t\t\t * update user input status\r\n \t\t\t\t\t * @param int $uid\r\n \t\t\t\t\t * @param int $touid\r\n \t\t\t\t\t * @param int $status 1 for input now; 0 for default\r\n \t\t\t\t\t */\r\n \t\t\t\t\tfunction updateInputStatus($uid, $touid, $status)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t$TalkInputstatus = M(\"TalkInputstatus\");\r\n \t\t\t\t\t\t$userInputStatus = $TalkInputstatus->where(\"uid = $uid AND touid = $touid\")->find();\r\n \t\t\t\t\t\tif ($userInputStatus) {\r\n \t\t\t\t\t\t\t$data = array(\r\n\t\t\t \t\t\t\t\t'id' => $userInputStatus['id'],\r\n\t\t\t\t\t \t 'status' => $status,\r\n\t\t\t\t\t \t 'time' => time(),\r\n \t\t\t\t\t\t\t);\r\n \t\t\t\t\t\t\t$isOk = $TalkInputstatus->save($data);\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t$data = array(\r\n\t\t\t\t\t \t 'id' => '',\r\n\t\t\t\t\t \t 'uid' => $uid,\r\n\t\t\t\t\t \t 'touid' => $touid,\r\n\t\t\t\t\t \t 'status' => $status,\r\n \t\t\t\t\t\t\t);\r\n \t\t\t\t\t\t\t$isOk = $TalkInputstatus->add($data);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\treturn $isOk;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tupdateInputStatus($postUid, $postTouid, '0');\r\n \t\t\t\t\t$returnData['status_input'] == 'status0';\r\n \t\t\t\t\t//$this->ajaxReturn($returnData,'message ajax, update input status 0','ok');\r\n \t\t\t\t}\r\n\r\n \t\t\t\tif (!empty($freshTalkContent['id'])) {\r\n\r\n \t\t\t\t\t/**\r\n \t\t\t\t\t * update deliver flag\r\n \t\t\t\t\t */\r\n \t\t\t\t\t$dataSend = array(\r\n\t \t'id' => $freshTalkContent['id'],\r\n\t 'deliver' => 1,\r\n \t\t\t\t\t);\r\n \t\t\t\t\t$TalkContent->save($dataSend);\r\n\r\n \t\t\t\t\t/**\r\n \t\t\t\t\t * trans emotion\r\n \t\t\t\t\t */\r\n \t\t\t\t\tVendor('Ihelpoo.Emotion');\r\n \t\t\t\t\t$emotionObj = new Emotion();\r\n \t\t\t\t\t$returnData['nickname'] = $recordUserLogin['nickname'];\r\n \t\t\t\t\t$returnData['time'] = date(\"H:i:s\", $freshTalkContent['time']);\r\n \t\t\t\t\t$returnData['content'] = $emotionObj->transEmotion($freshTalkContent['content']);\r\n \t\t\t\t\t$returnData['image'] = $freshTalkContent['image'];\r\n \t\t\t\t\t$returnData['imagethumb'] = i_image_thumbnail($freshTalkContent['image']);\r\n \t\t\t\t\t$returnData['isinput'] = $inputStatus['status'];\r\n \t\t\t\t\t$returnData['newmessage'] = '';\r\n \t\t\t\t\t$this->ajaxReturn($returnData,'message ajax, return talk data : content','ok');\r\n \t\t\t\t} else if (!empty($otherNewTalkContent['id'])) {\r\n\r\n \t\t\t\t\t/**\r\n \t\t\t\t\t * require other's new message\r\n \t\t\t\t\t */\r\n \t\t\t\t\t$returnData['content'] = '';\r\n \t\t\t\t\t$returnData['newmessage'] = $otherNewTalkContent['uid'];\r\n \t\t\t\t\t$this->ajaxReturn($returnData,'message ajax, return talk data : other new message','ok');\r\n \t\t\t\t} else {\r\n \t\t\t\t\t$returnData['content'] = '';\r\n \t\t\t\t\t$returnData['newmessage'] = '';\r\n \t\t\t\t\t$returnData['isinput'] = $inputStatus['status'];\r\n \t\t\t\t\t$this->ajaxReturn($returnData,'message ajax, return talk data : input_status','ok');\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t$this->ajaxReturn($returnData,'message ajax','ok');\r\n \t}\r\n }", "function sendMessage($vars) {\r\n extract($vars);\r\n\t\r\n\tlist($dbconn) = lnDBGetConn();\r\n\t$lntable = lnDBGetTables();\r\n\r\n\t$privmsgstable = $lntable['privmsgs'];\r\n\t$privmsgscolumn = &$lntable['privmsgs_column'];\r\n\r\n\t$id = getMaxPrivMsgID();\r\n\t$type = _MESSAGESEND; \r\n\t$send_time = time();\r\n\t$ip = getenv(\"REMOTE_ADDR\");\r\n\tif (empty($from_uid)) {\r\n\t\t$from_uid = lnSessionGetVar('uid');\r\n\t}\r\n\tif (empty($to_uid)) {\r\n\t\t$to_uid = lnUserGetUid($nickname);\r\n\t\tmessageHead($vars);\r\n\t}\r\n\t\r\n\tif (empty($to_uid)) {\r\n\t\techo '<P><TABLE CELLPADDING=10 CELLSPACING=1 BGCOLOR=\"#FF0000\" HEIGHT=\"50\"><TR><TD BGCOLOR=\"#FFFFFF\" ALIGN=\"CENTER\">';\r\n\t\techo '<B>Sorry but no such user exists</B>';\r\n\t\techo '<P><< <A HREF=\"javascript:history.go(-1)\">Back</A>';\r\n\t\techo '</TD></TR></TABLE>';\r\n\t}\r\n\telse {\r\n\t\t$query = \"INSERT INTO $privmsgstable (\r\n\t\t\t\t\t\t$privmsgscolumn[id],\r\n\t\t\t\t\t\t$privmsgscolumn[type],\r\n\t\t\t\t\t\t$privmsgscolumn[priority],\r\n\t\t\t\t\t\t$privmsgscolumn[subject],\r\n\t\t\t\t\t\t$privmsgscolumn[message],\r\n\t\t\t\t\t\t$privmsgscolumn[from_uid],\r\n\t\t\t\t\t\t$privmsgscolumn[to_uid],\r\n\t\t\t\t\t\t$privmsgscolumn[date],\r\n\t\t\t\t\t\t$privmsgscolumn[ip],\r\n\t\t\t\t\t\t$privmsgscolumn[enable]\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\tVALUES (\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($id) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($type) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($priority) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($subject) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($message) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($from_uid) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($to_uid) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($send_time) .\"',\r\n\t\t\t\t\t\t'\". lnVarPrepForStore($ip) .\"',\r\n\t\t\t\t\t\t'1'\r\n\t\t\t\t\t\t) \";\r\n\t\t\t$result = $dbconn->Execute($query);\r\n\r\n\t\t\t/*\r\n\t\t\techo '<P><TABLE CELLPADDING=10 CELLSPACING=1 BGCOLOR=\"#0066CC\" HEIGHT=\"50\"><TR><TD BGCOLOR=\"#FFFFFF\" ALIGN=\"CENTER\">';\r\n\t\t\techo '<B>Your message has been sent</B>';\r\n\t\t\techo '<P>Click <A HREF=\"index.php?mod=Private_Messages&amp;op=inbox\">Here</A> to return to your Inbox';\r\n\t\t\techo '</TD></TR></TABLE>';\r\n\t\t\t*/\r\n\r\n\r\n\t}\r\n}", "function schreibe_Telegram($message, $channel_id)\n{\n $send_message = '';\n // prüfe, ob channel_id vorgegeben wurde\n if (!$channel_id) {\n return;\n }\n //\n $telegram_api_token = Config::get('konstanten.telegram.api_token');\n $telegram_bot_username = Config::get('konstanten.telegram.bot_username');\n $telegram_channel_signature = Config::get('konstanten.telegram.channel_signature');\n //\n $message .= $telegram_channel_signature;\n //\n $send_message = implode(\"\\n\", explode('<br />', $message));\n //\n $telegram_apiRUL = 'https://api.telegram.org/bot' . $telegram_api_token . '/';\n //\n $client = new Client(['base_uri' => $telegram_apiRUL]);\n //\n $client->post('sendMessage',\n [\n 'query' =>\n [\n 'chat_id' => $channel_id,\n 'text' => $send_message,\n 'parse_mode' => 'HTML',\n ]\n ]\n );\n}", "private function setMessageToPlayer()\n {\n if ($this->isUserMode()) {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng. Vill du vara med i tävlingen, spara poängen med den gröna knappen!\";\n } else {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng!\";\n }\n }", "function messenger_messages_page($id = NULL)\n{\n\n return '';\n}", "private function _customizeDatabase(){\n\n // Core conversations integration\n $db = ConnectionManager::getDataSource('default');\n if(isset($db->config['prefix'])){\n $userTable = $db->config['prefix'].\"users\";\n $queryGetFirstUser = \"SELECT * FROM $userTable LIMIT 1\";\n $queryAddChatCountField = \"ALTER TABLE $userTable ADD `chat_count` INT NOT NULL DEFAULT '0' \";\n\n try\n {\n\n $result = $db->fetchAll($queryGetFirstUser);\n if($result){\n $user = $result[0][$userTable];\n if(!isset($user[\"chat_count\"])){\n try\n {\n $db->rawQuery($queryAddChatCountField);\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n\n }\n\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n //$db = ConnectionManager::getDataSource('default');\n $roomTable = $db->config['prefix'].\"chat_rooms\";\n $messagesTable = $db->config['prefix'].\"chat_messages\";\n $queryRoomIds = \"SELECT id FROM $roomTable WHERE latest_mesasge_id=0\";\n $queryLastestMessage = \"SELECT MAX(id) AS id FROM $messagesTable WHERE room_id=%s\";\n $queryUpdateRoom = \"UPDATE $roomTable SET latest_mesasge_id=%s WHERE id=%s\";\n try\n {\n\n $result = $db->fetchAll($queryRoomIds);\n if($result){\n\n foreach ($result as $i){\n\n try\n {\n $messageId = $db->fetchAll(sprintf($queryLastestMessage,$i[$roomTable][\"id\"]));\n if($messageId){\n try\n {\n if(!empty($messageId[0][0][\"id\"])){\n $db->rawQuery(sprintf($queryUpdateRoom,$messageId[0][0][\"id\"],$i[$roomTable][\"id\"]));\n }\n\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }", "private function _checkMessageFor()\n {\n return;\n \n $dbh = $this->_connectToDb();\n \n $stmt = $dbh->query(\"SELECT message, when, from FROM messages WHERE LOWER(nick) = '\". strtolower(trim($this->_data->nick)) .\"' AND seen = 0 ORDER BY id DESC LIMIT 1\");\n \n $row = $stmt->fetch(PDO::FETCH_OBJ);\n\n if (isset($row->when)) {\n\n $this->_privmessage(\n 'I have a message for you from '. $row->from,\n $this->_data->nick\n );\n $this->_privmessage(\n 'Message begin: '. $row->message .' :: Message End',\n $this->_data->nick\n );\n $this->_privmessage(\n 'Send: '. $row->when,\n $this->_data->nick\n );\n }\n }", "function bp_nouveau_messages_member_interface() {\n\t/**\n\t * Fires before the member messages content.\n\t *\n\t * @since 1.2.0\n\t */\n\tdo_action( 'bp_before_member_messages_content' );\n\n\t// Load the Private messages UI\n\tbp_get_template_part( '_accessoires/messages/index' );\n\n\t/**\n\t * Fires after the member messages content.\n\t *\n\t * @since 1.2.0\n\t */\n\tdo_action( 'bp_after_member_messages_content' );\n}", "public function MyMessages(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/myMessage';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Messages',\n\t\t\t'londontec' => $this->setting_model->Get_All('londontec_users'),\n\t\t\t'student' => $this->setting_model->Get_All('students'),\n\t\t\t'message' => $this->setting_model->Get_All_DESCENDING('message','message_id'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function chat_project(){\n \t$this->common();\n \t\n \t$project_id = $this->input->get('project_id');\n \t$is_customer = $this->session->userdata('is_customer');\n \t\n \t// now get project related chat\n \t$data['project_name'] = $this->portalmodel->select_name('project', 'title', \"id='\".$project_id.\"'\");\n \t$data['project_id'] = $project_id;\n \t\n \t// get list of current online members\n \t$tmp_online_member_ids = $this->portalmodel->list_select1(\"onlinemembers\");\n \t$online_member_ids = array();\n \tforeach ($tmp_online_member_ids as $eachid){\n \t\t$online_member_ids[]=$eachid->user_id;\n \t}\n \t\n \t\n \t// now get associated members of this project.\n \t$associated_members_ids = $this->portalmodel->list_select(\"project\",\"id\",$project_id);\n \t\n \t$tmpArr = array();\n \tif(isset($associated_members_ids[0]['accountmanager']) && !empty($associated_members_ids[0]['accountmanager'])){\n \t\t$tmpArr[]=$associated_members_ids[0]['accountmanager'];\n \t}\n \tif(isset($associated_members_ids[0]['projectmanager']) && !empty($associated_members_ids[0]['projectmanager'])){\n \t\t$tmpArr[]=$associated_members_ids[0]['projectmanager'];\n \t}\n \tif(isset($associated_members_ids[0]['developer']) && !empty($associated_members_ids[0]['developer'])){\n \t\t$tmpArr[]=$associated_members_ids[0]['developer'];\n \t}\n \t\n \t//$tmp_members_ids = implode(\",\", array($associated_members_ids[0]['accountmanager'],$associated_members_ids[0]['projectmanager'],$associated_members_ids[0]['developer']));\n \t$tmp_members_ids = implode(\",\", $tmpArr);\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$tmp_members_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$associated_member_names = implode(\", \", $associated_member_names);\n \t$data['associated_member_names'] = $associated_member_names;\n \t/* getting associated members list ends */\n \t\n \t// now get the member list for adding new members.\n \t$already_member_ids = $this->portalmodel->list_select(\"chat_project_members\",\"fk_project_id\",$project_id);\n \t$arr_already_member_ids = array();\n \tforeach ($already_member_ids as $eachrecord){\n \t\t$arr_already_member_ids[]=$eachrecord['fk_user_id'];\n \t}\n \t$arr_already_member_ids[]=1001; // here we are adding 1001 for the admin, because he doesn't need to be selected\n \t$in_already_member_ids = implode(\",\", $arr_already_member_ids);\n \t\n \t$combined_ids = $tmp_members_ids.\",\".$in_already_member_ids;\n \t$condition_new_members = \" id NOT IN (\".$combined_ids.\")\";\n \t\n \t$add_new_member_list = $this->portalmodel->get_dropdownuser_list_without_blank(\"user\",\"id\",\"CONCAT(first_name,' ',last_name) AS name\",$condition_new_members);\n \tasort($add_new_member_list);\n \t$data['add_new_member_list']=$add_new_member_list;\n \t//////////////////\n \t\n \t/// now update associated member's list with the project chat members\n \t$arr_member_names = $this->portalmodel->select_where('', '', 'user', \"id IN (\".$in_already_member_ids.\")\");\n \t$associated_member_names = array();\n \tforeach ($arr_member_names as $eachRecordDetail){\n \t\tif(in_array($eachRecordDetail->id, $online_member_ids)){\n \t\t\t$associated_member_names[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$eachRecordDetail->first_name;\n \t\t}else{\n \t\t\t$associated_member_names[] = $eachRecordDetail->first_name;\n \t\t}\n \t}\n \t$associated_member_names = implode(\", \", $associated_member_names);\n \t$data['associated_member_names'] = $data['associated_member_names'].\", \".$associated_member_names;\n \t\n \t// now also add customer name as well\n \t$associated_customer_id = $this->portalmodel->select_name('project', 'customerid', \"id='\".$project_id.\"'\");\n \tif(!empty($associated_customer_id)){\n \t\t$associated_customer_name = $this->portalmodel->select_name('customer', 'companyname', \"customerid='\".$associated_customer_id.\"'\");\n \t\t\n \t\t// also get list of onlinecustomers to highlight\n\t \t$tmp_online_user_ids = $this->portalmodel->list_select1(\"onlinecustomers\");\n\t \t$online_customer_ids = array();\n\t \tforeach ($tmp_online_user_ids as $eachid){\n\t \t\t$online_customer_ids[]=$eachid->customer_id;\n\t \t}\n\t \t\n\t \tif (in_array($associated_customer_id, $online_customer_ids)){\n\t \t\t$associated_customer_name = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$associated_customer_name;\n\t \t}\n\t \t\n\t \t$data['associated_member_names'] = $data['associated_member_names'].\", \".$associated_customer_name;\n \t}\n \t\n \t// now also get the associated customer(member) names with this project\n \t// also get list of online customer users to highlight\n \t$tmp_online_customer_user_ids = $this->portalmodel->list_select1(\"online_customer_users\");\n \t$online_customer_user_ids = array();\n \tforeach ($tmp_online_customer_user_ids as $eachid){\n \t\t$online_customer_user_ids[]=$eachid->customer_user_id;\n \t}\n \t\n \t$associated_users = $this->portalmodel->select_where('', '', 'customer_user_project_chat', \"FIND_IN_SET( $project_id, project_ids )\");\n \t$arr_associated_users = array();\n \tforeach ($associated_users as $each_associated_user){\n \t\tif(in_array($each_associated_user->id, $online_customer_user_ids)){\n \t\t\t$arr_associated_users[] = '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> '.$each_associated_user->first_name;\n \t\t}else{\n \t\t\t$arr_associated_users[] = $each_associated_user->first_name;\n \t\t}\n \t}\n \t$data['associated_member_names'] = $data['associated_member_names'].\", \".implode(\",\", $arr_associated_users);\n \t\n \t//$tmp_associated_members = explode(\", \", strtolower($data['associated_member_names']));\n \t//asort($tmp_associated_members);\n \t//$data['associated_member_names'] = implode(\", \", $tmp_associated_members);\n \t///\n \t\n \t$chat_data = $this->portalmodel->getProjectChat($project_id);\n \t$data['chat_data'] = $chat_data;\n \t\n \t/* storing latest chat id for notification STARTS */\n \t$fk_user_id = $this->session->userdata('id');\n \t$last_chat_id = $this->portalmodel->select_name(\"last_chat_project_customer\",\"id\",\"fk_user_id='\".$fk_user_id.\"' AND fk_project_id='\".$project_id.\"'\");\n \t\n \t// get latest chat id\n \tif($is_customer){\n\t \t$fk_chat_id = $this->portalmodel->select_name(\"chat_projects\",\"MAX(chat_id)\",\"fk_project_id='\".$project_id.\"'\");\n\t \t\n\t \tif((empty($last_chat_id) || $last_chat_id==\"N/A\") && (!empty($fk_chat_id) && $fk_chat_id!=\"N/A\")){\n\t \t\t// insert new\n\t \t\t$datainsert = array(\n\t \t\t\t\"fk_user_id\"=>$fk_user_id,\n\t \t\t\t\"fk_chat_id\"=>$fk_chat_id,\n\t \t\t\t\"fk_project_id\"=>$project_id\n\t \t\t);\n\t \t\t$insert = $this->portalmodel->insert_query_(\"last_chat_project_customer\",$datainsert);\n\t \t}else{\n\t \t\t// update with latest chat id for this project\n\t \t\t$dataupdate = array(\n\t \t\t\t\"fk_chat_id\"=>$fk_chat_id\n\t \t\t);\n\t \t\t$this->portalmodel->update_query(\"last_chat_project_customer\",$dataupdate,$last_chat_id,\"id\");\n\t \t}\n \t}\n \t/* storing latest chat id for notification ENDS */\n \t\n \t$this->load->view('chat_project', $data);\n $this->load->view('templates/footer');\n }", "function show_all_messages($board){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\n\t\t$head=\"Board \".$board['name'];\n\t\t$body=\"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n function do_delete(url){\n if(!confirm('Vuoi davvero cancellare il messaggio?'))\n return;\n\n window.location.href=url;\n }\n </script>\n\t\t\";\n\t\t$indice = indice_board();\n\t\t\n\t\t$maxmsg=10;\n\t\t$navigator='<p style=\"text-align: center;\">';;\n\t\t\n\t\tif(isset($_GET['startfrom'])){\n\t\t\t$limit=$_GET['startfrom'];\n\t\t}\n\t\telse\n\t\t\t$limit=0;\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT count(*) AS total FROM {$prefix}boardmsg WHERE board='{$board['id']}' AND father='0'\");\n\t\t$row = $db->Do_Fetch_Assoc($query);\n\t\t$total = $row['total'];\n\t\t\n\t\tif($total > $maxmsg){\n\t\t\t$i=0;\n\t\t\twhile($total > 0){\n\t\t\t\tif((isset($_GET['startfrom']) && $_GET['startfrom'] == $i) || (!isset($_GET['startfrom']) && $i == 0))\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\"><b>[\".($i+1).\"]</b></a> \";\n\t\t\t\telse\n\t\t\t\t\t$navigator .= \"<a href=\\\"index.php?act=boards&board=$board[id]&startfrom=$i\\\">\".($i+1).\"</a> \";\n\t\t\t\t$i++;\n\t\t\t\t$total -= $maxmsg;\n\t\t\t\t\n\t\t\t}\n\t\t\t$navigator.=\"</p>\";\n\t\t}\n\t\t\n\t\t\t\n\t\t$limit_min = $limit * $maxmsg;\n\t\t$limit_max = $maxmsg;\t\t\n\t\t\n\t\t$query = $db->DoQuery(\"SELECT * FROM {$prefix}boardmsg \n\t\t\t\tWHERE board='{$board['id']}' \n\t\t\t\tAND father='0' ORDER BY last_update DESC LIMIT $limit_min, $limit_max\");\n\n\t\t\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$body.=$navigator;\n\t\t$unreads = get_unread();\n\t\twhile($row = $db->Do_Fetch_Assoc($query)){\n\t\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardmsg msg, {$prefix}boardunread un\n\t\t\t\t\t\tWHERE\tmsg.id=un.id\n\t\t\t\t\t\tAND un.user='{$x7s->username}'\n\t\t\t\t\t\tAND board='{$board['id']}' AND father='$row[id]'\");\n\t\t\t$new_replies = $db->Do_Fetch_Assoc($q_new);\n\t\t\t\n\t\t\t$unread='';\n\t\t\tif(isset($unreads[$row['id']]))\n\t\t\t\t$unread = \"<b>(Nuovo) </b>\";\n\n\t\t\tif($new_replies['cnt']>0){\n\t\t\t\t$unread .= \"<b>(Nuove repliche: $new_replies[cnt])</b>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nb = board_msg_split($row['body']);\n\t\t\t$msg = $nb[0];\n\t\t\t$object = $nb[1];\n\t\t\t$msgid=$row['id'];\n\t\t\t$user=$row['user'];\n\n\t\t\tif ($row['anonymous']) {\n\t\t\t\tif (checkIfMaster()) {\n\t\t\t\t\t$user .= \" (anonimo)\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$user = \"Anonimo\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$body.=\"<p>\".$user.\"<br><a href=./index.php?act=boards&board=\".$board['id'].\"&message=\".$row['id'].\">\n\t\t\t\t <b>\".$object.\"</b> \".$unread.\"</a>\";\n\t\t\t\t\n\t\t\tif(checkIfMaster()){\n\t\t\t\t$startfrom = \"\";\n\t\t\t\tif (isset($_GET['startfrom']))\n\t\t\t\t\t$startfrom = \"&startfrom=\".$_GET['startfrom'];\n\n\t\t\t\t$body.=\" <a href=\\\"#\\\" onClick=\\\"javascript: do_delete('./index.php?act=boards&delete=$msgid$startfrom')\\\">[Delete]</a>\";\n\t\t\t\t$body.=\" <a href=./index.php?act=boards&move=$msgid>[Sposta]</a>\";\n }\n\t\t\t\n\t\t\t$body.=\"</p><hr>\";\n\t\t\n\t\t}\n\t\t$body.=$navigator;\n\t\tif(!$board['readonly'] || checkIfMaster()){\n\t\t\t$body .=\"<br><br><a href=./index.php?act=boards&send=\".$board['id'].\">Nuova comunicazione</a><br>\";\n\t\t}\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}", "function sendMessagetoAll($db,$telegram,$type,$content){\r\n\r\n\t\tdate_default_timezone_set('Europe/Rome');\r\n\t\t$today = date(\"Y-m-d H:i:s\");\r\n\t\t\r\n $statement = \"SELECT * FROM \".DB_TABLE;\r\n $user = $db->query($statement);\r\n $user = $user->fetchAll();\r\n \r\n //remove duplicates \r\n $user_uni=array_unique($user,SORT_REGULAR);\r\n print_r($content);\r\n $i = 0;\r\n foreach ($user_uni as $users) {\r\n \t\t\r\n \t\t//COMMENT TO AVOID BRODCAST\r\n \t\t$telegram->sendMessageAll($type, $users['user_id'], $content);\r\n $i++;\r\n }\r\n \r\n \t$log=$today. \";Sent message \".$content. \" to \".$i.\" subscribers\\n\";\r\n \tfile_put_contents(LOG_FILE, $log, FILE_APPEND | LOCK_EX);\t\r\n}", "public function run()\n {\n //\n $chat = new Message();\n $chat->room_id = 1;\n $chat->send_account_id = 1;\n $chat->receive_account_id = 2;\n $chat->text = \"こんにちは\";\n $chat->is_read = true;\n $chat->save();\n\n //\n $chat2 = new Message();\n $chat2->room_id = 1;\n $chat2->send_account_id = 2;\n $chat2->receive_account_id = 1;\n $chat2->text = \"よろしくお願いします。\";\n $chat2->is_read = true;\n $chat2->save();\n\n }", "function constructMessagesDiv($messageStr)\n{\n $codeSnippLanguagesArr=[\"html\",\"javascript\",\"python\",\"php\"];\n // echo $messageStr;\n $web_service = new WebService();\n $currentChannelMessages = json_decode($messageStr);\n // var_dump($currentChannelMessages);\n\n $msgStr='';\n $prevdate='';\n $prevUser='';\n $prevTime='';\n if ($currentChannelMessages!=null)\n {\n $remainingMessages= $currentChannelMessages->messageCount;\n // echo $remainingMessages;\n\n $lastmessageid= $currentChannelMessages->lastmessageid;\n // echo $lastmessageid;\n if($remainingMessages==0)\n echo '<div>This is the begining of Chat....</div>';\n else if($remainingMessages>0)\n echo '<div class=\"oldMessages\" id='.$lastmessageid.'><a>Loading more Messages...</a></div>';\n $currentChannelMessages=$currentChannelMessages->messages;\n\n date_default_timezone_set('America/New_York');\n $time= time();\n $today = date(\"l, F jS, o\", $time);\n foreach ($currentChannelMessages as $message)\n {\n// echo json_encode($message);\n $currentDate=$web_service->getFormatDate($message->created_at);\n $currentTime=$web_service->getFormatTime($message->created_at);\n $shortName= $message->first_name[0];\n if($message->last_name == '' || $message->last_name== null){\n $shortName.= $message->first_name[1];\n }else{\n $shortName.= $message->last_name[0];\n }\n $defUserPicBGColorArr = ['#3F51B5','#2196F3','#00BCD4','#CDDC39','#FF5722'];\n $defUserPicBGColor = $defUserPicBGColorArr[((int)$message->user_id)%5];\n if($currentDate==$today)\n $currentDate='Today';\n\n\n if($prevUser=='' && $prevTime=='')\n {\n if($prevdate!=$currentDate)\n {\n $msgStr.='<div class=\"row dayDividerWrapper\"><div class=\"daySeperatorLine col-xs-5 pull-left\"> </div><div class=\"dayDividerText col-xs-2\">'.$currentDate.'</div><div class=\"daySeperatorLine col-xs-5 pull-right\"> </div></div>';\n $prevdate=$currentDate;\n }\n// echo'in 1 if';\n\n $msgStr.='<div class=\"row messageSet\"><div class=\"col-xs-1 userPic\">';\n if($message->profile_pic_pref==1)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.get_gravatar($message->email_id) .') !important;background-size: 36px 36px !important;\">';\n }\n else if($message->profile_pic_pref==2)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.$message->github_avatar .') !important;background-size: 36px 36px !important;\">';\n }\n else if($message->profile_pic_pref==0)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.$message->profile_pic .') !important;background-size: 36px 36px !important;\">';\n }\n else\n {\n $msgStr.='<div class=\"defUserPic\" style=\"background:'.$defUserPicBGColor .';\">'. htmlspecialchars(strtoupper($shortName)); \n }\n $msgStr.='</div></div><div class=\"col-xs-11 message\"><div class=\"message_header\" userid=\"'. $message->user_id .'\" ><b>';\n \n $msgStr.=htmlspecialchars($message->first_name);\n $msgStr.=' '.htmlspecialchars($message->last_name).'</b><span class=\"message_time\"> ';\n $msgStr.=$currentTime;\n $msgStr.='</span></div>';\n $dynamicClassNameWithId = \"messagewithid_\".$message->message_id;\n $msgStr.='<div class=\"message_body '.$dynamicClassNameWithId.'\" id=\"'.$message->message_id.'\">';\n $msgStr.= messageContentHelper ($message); // this method construct the message content in the format need\n $msgStr.='<div class=\"msg_reactionsec\">';\n // print_r($message->emojis);\n if($message->emojis!='0')\n foreach ($message->emojis as $emoji)\n {\n $msgStr.='<div class=\"emojireaction\" emojiid=\"'.$emoji->emoji_id.'\"><i class=\"'.$emoji->emoji_pic.'\"></i><span class=\"reactionCount\">'.$emoji->count.'</span></div>';\n }\n if($message->is_threaded==1)\n {\n $thread=$message->threads->threadCount;\n $msgStr.=\"<div class='repliescount' title='view thread'><a href='#'><span>\".$thread.'</span> replies'.\"</a></div>\";\n\n }\n $msgStr.=' </div></div>';\n $prevUser=$message->first_name;\n $prevTime=$currentTime;\n\n }\n else if($prevUser==$message->first_name && $prevTime==$currentTime )\n {\n // echo'in 2 if';\n $dynamicClassNameWithId = \"messagewithid_\".$message->message_id;\n\n $msgStr.='<div class=\"message_body addOnMessages '.$dynamicClassNameWithId.'\" id=\"'.$message->message_id.'\">';\n $msgStr.= messageContentHelper ($message); // this method construct the message content in the format need\n $msgStr.='<div class=\"msg_reactionsec\">';\n if($message->emojis!='0')\n foreach ($message->emojis as $emoji)\n {\n $msgStr.='<div class=\"emojireaction\" emojiid=\"'.$emoji->emoji_id.'\"><i class=\"'.$emoji->emoji_pic.'\"></i><span class=\"reactionCount\">'.$emoji->count.'</span></div>';\n }\n if($message->is_threaded==1)\n {\n $thread=$message->threads->threadCount;\n $msgStr.=\"<div class='repliescount' title='view thread'><a href='#'><span>\".$thread.'</span> replies'.\"</a></div>\";\n\n }\n $msgStr.=' </div></div>';\n $prevUser=$message->first_name;\n $prevTime=$currentTime;\n }\n else if($prevUser!=$message->first_name || $prevTime!=$currentTime)\n {\n // echo'in 3 if';\n $msgStr.='</div></div>';\n if($prevdate!=$currentDate)\n {\n $msgStr.='<div class=\"row dayDividerWrapper\"><div class=\"daySeperatorLine col-xs-5 pull-left\"> </div><div class=\"dayDividerText col-xs-2\">'.$currentDate.'</div><div class=\"daySeperatorLine col-xs-5 pull-right\"> </div></div>';\n $prevdate=$currentDate;\n }\n // $msgStr.= $message->profile_pic;\n $msgStr.='<div class=\"row messageSet\"><div class=\"col-xs-1 userPic\">';\n if($message->profile_pic_pref==1)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.get_gravatar($message->email_id) .') !important;background-size: 36px 36px !important;\">';\n }\n else if($message->profile_pic_pref==2)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.$message->github_avatar .') !important;background-size: 36px 36px !important;\">';\n }\n else if($message->profile_pic_pref==0)\n {\n $msgStr.='<div class=\"defUserPic profilePic\" style=\"background-image:url('.$message->profile_pic .') !important;background-size: 36px 36px !important;\">';\n }\n else\n {\n $msgStr.='<div class=\"defUserPic\" style=\"background:'.$defUserPicBGColor .';\">'. htmlspecialchars(strtoupper($shortName)); \n }\n $msgStr.='</div></div><div class=\"col-xs-11 message\"><div class=\"message_header\" userid=\"'. $message->user_id .'\" ><b>';\n $msgStr.=htmlspecialchars($message->first_name);\n $msgStr.=' '.htmlspecialchars($message->last_name).'</b><span class=\"message_time\"> ';\n $msgStr.=$currentTime;\n $msgStr.='</span></div>';\n $dynamicClassNameWithId = \"messagewithid_\".$message->message_id;\n $msgStr.='<div class=\"message_body '.$dynamicClassNameWithId.'\" id=\"'.$message->message_id.'\">';\n $msgStr.= messageContentHelper ($message); // this method construct the message content in the format need\n $msgStr.='<div class=\"msg_reactionsec\">';\n if($message->emojis!='0')\n foreach ($message->emojis as $emoji)\n {\n $msgStr.='<div class=\"emojireaction\" emojiid=\"'.$emoji->emoji_id.'\"><i class=\"'.$emoji->emoji_pic.'\"></i><span class=\"reactionCount\">'.$emoji->count.'</span></div>';\n }\n if($message->is_threaded==1)\n {\n $thread=$message->threads->threadCount;\n $msgStr.=\"<div class='repliescount' title='view thread'><a href='#'><span>\".$thread.'</span> replies'.\"</a></div>\";\n\n }\n $msgStr.=' </div></div>';\n $prevUser=$message->first_name;\n $prevTime=$currentTime;\n }\n }\n $msgStr.='</div></div>';\n\n }\n else\n {\n $msgStr=\"<div>No messages in this channel..</div>\";\n }\n echo $msgStr;\n}", "public function getChat()\n {\n return $this->get(self::_CHAT);\n }", "function message()\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$this->common_header('domessage', 'Board Message', 'You may change the configuration below. HTML is enabled, and BBCode will be enabled in later versions.');\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>Turn the message system off?</b>\",\r\n\t\t $SKIN->form_yes_no(\"global_message_on\", $INFO['global_message_on'])\r\n\t\t ));\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>The message to display</b>\",\r\n\t\t $SKIN->form_textarea(\"global_message\", $INFO['global_message'])\r\n\t\t ));\r\n\r\n\t\t$this->common_footer();\r\n\r\n\t}", "public function achatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Achat\");//type array\n\t}", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $dbname = \"zhongwei\";\n $host = \"58.215.187.8\";\n $user = \"zhongwei\";\n $pass = \"623610577\";\n \n \n //如果是新关注用户\n if($postObj->Event == 'subscribe'){\n //send_back(MENU);\n $con = mysql_connect(\"$host\",\"$user\",\"$pass\");\n if (!$con)\n {\n die('Could not connect: ' . mysql_error());\n }\n mysql_select_db(\"$dbname\", $con);\n $result = mysql_query(\"SELECT s.*,sf.* FROM uchome_space s LEFT JOIN uchome_spacefield sf ON s.uid=sf.uid WHERE s.wxkey='\".$toUsername.\"' \");\n mysql_query(\"SET NAMES 'utf8'\");\n if($row = mysql_fetch_array($result)){\n \n \n \n $v5 = mysql_query(\"SELECT a.*,m.* FROM uchome_appset a LEFT JOIN uchome_menuset m ON a.num=m.menusetid WHERE a.uid='$row[uid]' and a.appstatus='1'\");\n while($v52= mysql_fetch_array($v5)){\n $a[] = \"$v52[num]\";\n $b[] = \"$v52[subject]\";\n\n }\n \n \n $msgType = \"news\";\n if($row[name]){\n $name=$row[name];\n }else{\n $name=$row[username];\n }\n $appurl = \"http://v5.home3d.cn/home/capi/space.php?do=app&uid=$row[uid]\";\n $app = file_get_contents($appurl,0,null,null);\n $app_output = json_decode($app);\n $count=$app_output->data->count;\n $zhong2 = mysql_query(\"SELECT * FROM uchome_weixinmenutop WHERE uid='$row[uid]' and type='image'\");\n $wei2 = mysql_fetch_array($zhong2);\n if($wei2){\n $name=$wei2[name];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $result1 = mysql_query(\"SELECT * FROM uchome_weixinmenutop WHERE uid='$row[uid]' and type='frist' \");\n $result2 = mysql_query(\"SELECT * FROM uchome_weixinmenutop WHERE uid='$row[uid]' and type='second' \");\n mysql_query(\"SET NAMES 'utf8'\");\n if($weixin = mysql_fetch_array($result1)){\n $wei=explode(\".\",$weixin['number']);\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=$wei[0]&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=\".$wei[0].\"id&type=\".$wei[0].\"&moblieclicknum=$row[moblieclicknum]\";\n if($wei[0]==\"introduce\"){\n $subject=$app_output->data->introduce->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->introduce->image1url;\n }elseif($wei[0]==\"product\"){\n $subject=$app_output->data->product->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->product->image1url;\n }elseif($wei[0]==\"industry\"){\n $subject=$app_output->data->industry->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->industry->image1url;\n }elseif($wei[0]==\"cases\"){\n $subject=$app_output->data->cases->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->cases->image1url;\n }elseif($wei[0]==\"job\"){\n $subject=$app_output->data->job->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->job->image1url;\n }elseif($wei[0]==\"development\"){\n $subject=$app_output->data->development->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->development->image1url;\n }elseif($wei[0]==\"branch\"){\n $subject=$app_output->data->branch->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->branch->image1url;\n }elseif($wei[0]==\"goods\"){\n $subject=$app_output->data->goods->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->goods->image1url;\n }\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n \n if($weixin = mysql_fetch_array($result2)){\n $wei=explode(\".\",$weixin['number']);\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=$wei[0]&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&wxkey=\".$fromUsername.\"&id=\".$wei[1].\"&uid=$row[uid]&idtype=\".$wei[0].\"id&type=\".$wei[0].\"&moblieclicknum=$row[moblieclicknum]\";\n if($wei[0]==\"introduce\"){\n $subject=$app_output->data->introduce->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->introduce->image1url;\n }elseif($wei[0]==\"product\"){\n $subject=$app_output->data->product->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->product->image1url;\n }elseif($wei[0]==\"industry\"){\n $subject=$app_output->data->industry->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->industry->image1url;\n }elseif($wei[0]==\"cases\"){\n $subject=$app_output->data->cases->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->cases->image1url;\n }elseif($wei[0]==\"job\"){\n $subject=$app_output->data->job->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->job->image1url;\n }elseif($wei[0]==\"development\"){\n $subject=$app_output->data->development->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->development->image1url;\n }elseif($wei[0]==\"branch\"){\n $subject=$app_output->data->branch->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->branch->image1url;\n }elseif($wei[0]==\"goods\"){\n $subject=$app_output->data->goods->subject;\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->goods->image1url;\n }\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n \n }\n }else{\n $appurl = \"http://v5.home3d.cn/home/capi/space.php?do=app&uid=$row[uid]\";\n $app = file_get_contents($appurl,0,null,null);\n $app_output = json_decode($app);\n $count=$app_output->data->count;\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2['imageurl'];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n for($i=0;$i<$count;$i++){\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->app[$i]->english;\n if($app_output->data->app[$i]->newname){\n $subject=$app_output->data->app[$i]->newname;\n }else{\n $subject=$app_output->data->app[$i]->subject;\n }\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->app[$i]->image1url;\n\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n } \n \n if($app_output->data->highapp){\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->highapp[0]->english;\n if($app_output->data->highapp[0]->newname){\n $subject=$app_output->data->highapp[0]->newname;\n }else{\n $subject=$app_output->data->highapp[0]->subject;\n }\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->highapp[0]->image1url;\n\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n include_once( 'weibo/config.php' );\n require_once '../common.php';\n require_once 'wx_common.php';\n include_once( CONNECT_ROOT.'/saetv2.ex.class.php' );\n require_once CONNECT_ROOT.\"/common/jtee.inc.php\";\n require_once CONNECT_ROOT.\"/common/siteUserRegister.class.php\";\n require_once('Weixin.class.php');\n $rst = mysql_query(\"SELECT * FROM uchome_wxkey WHERE wxkey='$fromUsername'\");\n $row1 = mysql_fetch_array($rst);\n $rst1 = mysql_query(\"SELECT * FROM uchome_space WHERE wxkey='$fromUsername'\");\n $row2 = mysql_fetch_array($rst1);\n if($row1||$row2){\n loaducenter();\n //showmessage(\"$row[uid]\");\n //include_once(S_ROOT.'./source/function_cp.php');\n //updateuserstat('hot');\n if($row1){\n $user = uc_get_user($row1['uid'], 1); \n uc_user_synlogin($row1['uid']); \n }\n if($row2){\n $user = uc_get_user($row2['uid'], 1); \n uc_user_synlogin($row2['uid']); \n } \n \n $auth = setSession($user[0],$user[1]);\n $weixinuid=$row['uid'];\n $m_auth=rawurlencode($auth);\n $friendurl = \"http://v5.home3d.cn/home/capi/cp.php?ac=friend&op=add&uid=$weixinuid&gid=0&addsubmit=true&note=微信用户关注&m_auth=$m_auth\";\n $friend = file_get_contents($friendurl,0,null,null);\n $friend_output = json_decode($friend);\n \n \n }else{\n //include_once(S_ROOT.'./source/function_cp.php');\n //updateuserstat('hot');\n $nextuid=$row['uid'];\n $d = get_obj_by_xiaoquid($nextuid);\n $info = $d->getNewWXUser(); \n $fakeid=$info['id'];\n $query = mysql_query(\"SELECT * FROM uchome_space WHERE fakeid='$fakeid'\");\n $value = mysql_fetch_array($query);\n if($value){\n loaducenter();\n //include_once(S_ROOT.'./source/function_cp.php');\n //updateuserstat('hot'); \n $user = uc_get_user($value['uid'], 1); \n uc_user_synlogin($value['uid']);\n $auth = setSession($user[0],$user[1]);\n $weixinuid=$row['uid'];\n $m_auth=rawurlencode($auth);\n $friendurl = \"http://v5.home3d.cn/home/capi/cp.php?ac=friend&op=add&uid=$weixinuid&gid=0&addsubmit=true&note=微信用户关注&m_auth=$m_auth\";\n $friend = file_get_contents($friendurl,0,null,null);\n $friend_output = json_decode($friend);\n inserttable(\"wxkey\",array('wxkey'=>$fromUsername,'fakeid'=>$fakeid,'uid'=>$value['uid']));\n\n }else{\n $username =$fromUsername;\n $name = $fromUsername;\n $password = \"weixin\";\n $email = isemail($_REQUEST['email']) ? $_REQUEST['email'] : $username.\"@v5.com.cn\";\n $data = array();\n require_once CONNECT_ROOT.\"/common/siteUserRegister.class.php\";\n $regClass = new siteUserRegister();\n $uid = $regClass->reg($username, $email, $password);\n \n $nextuid=$row['uid'];\n $d = get_obj_by_xiaoquid($nextuid);\n $info = $d->getNewWXUser(); \n $setarr = array(\n 'name' => $info['nick_name'],\n 'fakeid'=>$info['id'],\n 'namestatus' => '1',\n 'wxkey' => $fromUsername,\n 'fatheruid'=>$nextuid\n );\n updatetable('space', $setarr, array('uid'=>$uid ));\n loaducenter();\n $user = uc_get_user($uid, 1); \n uc_user_synlogin($uid);\n $weixinuid=$row['uid'];\n $auth = setSession($user[0],$user[1]);\n $friendurl = \"http://v5.home3d.cn/home/capi/cp.php?ac=friend&op=add&uid=$row[uid]&gid=0&addsubmit=true&note=微信用户关注&m_auth=$m_auth\";\n $friend = file_get_contents($friendurl,0,null,null);\n $friend_output = json_decode($friend);\n }\n }\n \n\n \n \n }else{\n $contentStr.=\"未填写微信id\";\n $msgType = \"text\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }\n }\n\n //extract post data\n if (!empty($postStr)){\n \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $eventkey=$postObj->EventKey;\n\n //判断是否已经有帐号\n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\"; \n\n $con = mysql_connect(\"$host\",\"$user\",\"$pass\");\n if (!$con)\n {\n die('Could not connect: ' . mysql_error());\n }\n mysql_select_db(\"$dbname\", $con);\n $result = mysql_query(\"SELECT s.*,sf.* FROM uchome_space s LEFT JOIN uchome_spacefield sf ON s.uid=sf.uid WHERE s.wxkey='\".$toUsername.\"' \");\n mysql_query(\"SET NAMES 'utf8'\");\n if($row = mysql_fetch_array($result)){\n if($eventkey){\n $msgType = \"news\";\n $wei=explode(\".\",$eventkey);\n if($wei[0]==\"introduce\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_introduce\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=$value[introduceid]&uid=$row[uid]&viewuid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=introduceid&type=introduce&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=$wei[0]&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=\".$wei[1].\"&uid=$row[uid]&viewuid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=\".$wei[0].\"id&type=\".$wei[0].\"&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->introduce->subject;\n $message1=$app_output->data->introduce->message1;\n //$message1=strtolower($message1);\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n /* $pic = $matches[1][0];*/\n /* if($app_output->data->introduce->pic){\n $pic =\"http://v5.home3d.cn/home/attachment/\".$app_output->data->introduce->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/attachment/\",\"http://v5.home3d.cn/home/attachment/\",$pic);\n $pic = str_replace(\"http://v5.home3d.cn/home/attachment/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n $pic = str_replace(\"http://v5.home3d.cn/home/attachment/attachment/\",\"http://v5.home3d.cn/home/attachment/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic=\"http://v5.home3d.cn/home/\".$app_output->data->introduce->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n }elseif($wei[0]==\"branch\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_branch\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[branchid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=branchid&type=branch&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=branch&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&viewuid=$row[uid]&idtype=branchid&type=branch&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->branch->subject;\n $message1=$app_output->data->branch->message1;\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n //$pic = $matches[1][0];\n /*if($app_output->data->branch->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->branch->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->branch->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n /* if($app_output->data->branch->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->branch->pic;\n }else{\n $pic=\"\";\n }*/\n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n } elseif($wei[0]==\"industry\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_industry\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[industryid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=industryid&type=industry&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=industry&wxkey=\".$fromUsername.\"&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=\".$wei[1].\"&uid=$row[uid]&viewuid=$row[uid]&idtype=industryid&type=industry&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->industry->subject;\n $message1=$app_output->data->industry->message1;\n $message1=strtolower($message1);\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n //$pic = $matches[1][0];\n /* if($app_output->data->industry->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->industry->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->industry->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n /* if($app_output->data->industry->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->industry->pic;\n }else{\n $pic=\"\";\n }*/\n $articles[] = makeArticleItem($subject, $message2, $pic, $url);\n } \n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n } elseif($wei[0]==\"job\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_job\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[jobid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=jobid&type=job&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=job&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=jobid&type=job&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->job->subject;\n $message1=$app_output->data->industry->message1;\n $message1=strtolower($message1);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n } elseif($wei[0]==\"product\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_product\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[productid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=productid&type=product&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=product&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=productid&type=product&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->product->subject;\n $message1=$app_output->data->product->message1;\n preg_match_all(\"<src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n //$pic = $matches[1][0];\n /*if($app_output->data->product->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->product->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->product->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n }elseif($wei[0]==\"development\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_development\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[developmentid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=developmentid&type=development&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=development&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=developmentid&type=development&moblieclicknum=$row[moblieclicknum]\";\n $message1=$app_output->data->development->message1;\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n //$pic = $matches[1][0];\n /*if($app_output->data->development->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->development->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->development->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n $subject=$app_output->data->development->subject;\n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n }elseif($wei[0]==\"goods\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_goods\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[goodsid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=goodsid&type=goods&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=goods&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=goodsid&type=goods&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->goods->subject;\n $message1=$app_output->data->goods->message1;\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n /*$pic = $matches[1][0];*/\n /* if($app_output->data->goods->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->goods->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->goods->imageurl;\n $pic = str_replace(\" \",\"%20\",$pic);\n /*if($app_output->data->goods->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->goods->pic;\n }else{\n $pic=\"\";\n }*/\n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n } elseif($wei[0]==\"cases\"){\n if($wei[1]=='0'){\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n $table=\"uchome_cases\";\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid] limit 0,3\");\n while($value = mysql_fetch_array($query)){\n $subject=$value['subject'];\n $pic =\"http://v5.home3d.cn/home/\".$value['image1url'];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$value[casesid]&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=casesid&type=cases&moblieclicknum=$row[moblieclicknum]\"; \n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n }else{\n $url1 = \"http://v5.home3d.cn/home/capi/space.php?do=cases&uid=$row[uid]&id=$wei[1]\";\n $app = file_get_contents($url1,0,null,null);\n $app_output = json_decode($app);\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=\".$wei[1].\"&wxkey=\".$fromUsername.\"&uid=$row[uid]&idtype=casesid&type=cases&moblieclicknum=$row[moblieclicknum]\";\n $subject=$app_output->data->cases->subject;\n $message1=$app_output->data->cases->message1;\n preg_match_all(\"<img src=\\\"(.*)\\\">\",$message1,$matches);\n $message2=strip_tags($message1);\n $message2 = str_replace(\"&nbsp;\",\"\",$message2);\n $arr = explode(\"。\",$message2);\n $arr1 = explode(\".\",$arr[0]);\n $message2 =$arr1[0].\"...\";\n /* $pic = $matches[1][0];*/\n /*if($app_output->data->cases->pic){\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->cases->pic;\n $pic = str_replace(\"http://v5.home3d.cn/home/http://v5.home3d.cn/home/\",\"http://v5.home3d.cn/home/\",$pic);\n }else{\n $pic=\"\";\n }*/\n $pic =\"http://v5.home3d.cn/home/\".$app_output->data->cases->imageurl;\n\n $pic = str_replace(\" \",\"%20\",$pic); \n $articles[] = makeArticleItem($subject, $message2, $pic, $url); \n }\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n } \n \n \n\n \n }\n \n }else{\n $contentStr.=\"$toUsername\";\n $msgType = \"text\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }\n \n \n if(!empty( $keyword ))\n { \n \n if ($keyword=='Hello2BizUser'){ \n \n $contentStr.=\"过期的通知方式\";\n \n \n \n \n \n \n \n \n $msgType = \"text\";\n \n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n \n }elseif($keyword==\"绑定\"){\n $msgType = \"news\";\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=bind&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"\";\n $subject=\"输入帐号密码与微信进行绑定\";\n $pic = \"\";\n $articles[] = makeArticleItem($subject, $subject, $pic, $url);\n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n }elseif($keyword==\"z\"){\n $msgType = \"text\";\n $contentStr.=\"$fromUsername\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }elseif($keyword==\"w\"){\n $msgType = \"text\";\n $contentStr.=\"$toUsername\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else{\n $zhong = mysql_query(\"SELECT a.*,m.* FROM uchome_appset a LEFT JOIN uchome_menuset m ON a.num=m.menusetid WHERE a.uid='$row[uid]'and a.num='$keyword'\");\n $wei = mysql_fetch_array($zhong);\n \n $result = mysql_query(\"SELECT s.*,sf.* FROM uchome_space s LEFT JOIN uchome_spacefield sf ON s.uid=sf.uid WHERE s.wxkey='\".$toUsername.\"' \");\n $row = mysql_fetch_array($result);\n $msgType = \"news\";\n if($row[name]){\n $name=$row[name];\n }else{\n $name=$row[username];\n }\n $appurl = \"http://v5.home3d.cn/home/capi/space.php?do=app&uid=$row[uid]\";\n $app = file_get_contents($appurl,0,null,null);\n $app_output = json_decode($app);\n $count=$app_output->data->count;\n $zhong2 = mysql_query(\"SELECT * FROM uchome_recommend WHERE uid='$row[uid]'\");\n $wei2 = mysql_fetch_array($zhong2);\n $name=$wei2[subject];\n if($wei2['recommendlink']){\n $url = \"$wei2[recommendlink]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=home&uid=\".$row[uid];\n }\n $pic = \"http://v5.home3d.cn/home/\".$wei2[imageurl];\n $articles[] = makeArticleItem($name, $name, $pic, $url);\n if($count>7){\n $count='7';\n $more='1';\n }\n for($i=0;$i<$count;$i++){ \n \n //$url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->app[$i]->english;\n $menusetcount=$app_output->data->app[$i]->count;\n if($menusetcount=='1'){\n $idtype=$app_output->data->app[$i]->english;\n $idtypeid=$idtype.\"id\";\n $table=\"uchome_\".$idtype;\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid]\");\n $value = mysql_fetch_array($query);\n $id=$value[\"$idtypeid\"];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$id&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=$idtypeid&type=$idtype&moblieclicknum=$row[moblieclicknum]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->app[$i]->english; \n }\n /* if($menusetcount=='1'){\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->app[$i]->english;\n }else{\n $id=$app_output->data->app[$i]->id;\n $idtype=$app_output->data->app[$i]->english;\n $idtypeid=$idtype.\"id\";\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&id=$id&uid=$row[uid]&idtype=$idtypeid&type=$idtype&moblieclicknum=$row[moblieclicknum]\"; \n }*/\n if($app_output->data->app[$i]->newname){\n $subject=$app_output->data->app[$i]->newname;\n }else{\n $subject=$app_output->data->app[$i]->subject;\n }\n \n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->app[$i]->image1url;\n\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n } \n \n if($app_output->data->highapp){\n $menusetcount=$app_output->data->highapp[$i]->count;\n if($menusetcount=='1'){\n $idtype=$app_output->data->highapp[$i]->english;\n $idtypeid=$idtype.\"id\";\n $table=\"uchome_\".$idtype;\n $query = mysql_query(\"SELECT * FROM \".$table.\" WHERE uid=$row[uid]\");\n $value = mysql_fetch_array($query);\n $id=$value[\"$idtypeid\"];\n $url = \"http://v5.home3d.cn/home/wx/wx.php?do=detail&viewuid=$row[uid]&id=$id&uid=$row[uid]&wxkey=\".$fromUsername.\"&idtype=$idtypeid&type=$idtype&moblieclicknum=$row[moblieclicknum]\"; \n }else{\n $url = \"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=feed&num=rand()&wxkey=\".$fromUsername.\"&uid=\".$row[uid].\"&idtype=\".$app_output->data->highapp[0]->english;\n }\n \n if($app_output->data->highapp[0]->newname){\n $subject=$app_output->data->highapp[0]->newname;\n }else{\n $subject=$app_output->data->highapp[0]->subject;\n }\n $pic = \"http://v5.home3d.cn/home/\".$app_output->data->highapp[0]->image1url;\n\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n }\n if(!empty($more)){\n $subject=\"更多\";\n $url=\"http://v5.home3d.cn/home/wx/wx.php?uid=$row[uid]&do=home&num=rand()&wxkey=\".$fromUsername;\n $pic=\"http://v5.home3d.cn/home/./upload/menuset/small/menuset1379386329communicate.jpg\";\n $articles[] = makeArticleItem($subject, $subject, $pic, $url); \n } \n \n \n \n \n \n \n \n $resultStr = makeArticles($fromUsername, $toUsername, $time, $msgType, $name,$articles); \n echo $resultStr;\n }\n }else{\n echo \"Input something...\";\n }\n\n }else {\n echo \"\";\n exit;\n }\n }", "function messages_buildContent($data,$db) {\n\tif(!isset($data->user['id'])){\n\t\tcommon_redirect_local($data, 'login');\n\t}else{\n\t\tswitch($data->action[1]){\n\t\t\tcase false:\n\t\t\t\t$statement = $db->prepare('getLatestByUser', 'messages');\n\t\t\t\t$statement->execute(array(':user' => $data->user['id']));\n\t\t\t\t$data->output['messages'] = $statement->fetchAll();\n\t\t\t\t$data->output['icons'] = array();\n\t\t\t\t$otherUserIcons = $db->prepare('getProfilePictures', 'gallery');\n\t\t\t\tforeach($data->output['messages'] as &$message){\n\t\t\t\t\t$otherUserIcons->execute(array(':userId' => $message['otheruser_id']));\n\t\t\t\t\t$icon = $otherUserIcons->fetch();\n\t\t\t\t\tif($icon === false){\n\t\t\t\t\t\t$message['icon'] = false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$message['icon'] = $icon['icon'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\t$statement = $db->prepare('getFriendsByUser', 'friends');\n\t\t\t\t$statement->execute(array(':user' => $data->user['id']));\n\t\t\t\t$data->output['otherusers'] = $statement->fetchAll();\n\t\t\t\tforeach($data->output['otherusers'] as $key => $otheruser){\n\t\t\t\t\tif($otheruser['id'] == $data->user['id']){\n\t\t\t\t\t\tunset($data->output['otherusers'][$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'with':\n\t\t\t\t// Send Message Form\n\t\t\t\trequire_once('libraries/forms.php');\n\t\t\t\t$statement = $db->prepare('getByName', 'users');\n\t\t\t\t$statement->execute(array(':name' => $data->action[2]));\n\t\t\t\t$otherUser = $statement->fetch();\n\t\t\t\tif($otherUser === false){\n\t\t\t\t\tcommon_redirect_local($data, 'messages');\n\t\t\t\t}\n\t\t\t\t$data->output['sendForm'] = new formHandler('send', $data);\n\t\t\t\t// Has the form been sent?\n\t\t\t\tif (isset($_POST['fromForm']) && ($_POST['fromForm']==$data->output['sendForm']->fromForm)){\n\t\t\t\t\t$data->output['sendForm']->populateFromPostData();\n\t\t\t\t\tif ($data->output['sendForm']->validateFromPost()){\n\t\t\t\t\t\t$statement = $db->prepare('sendMessage', 'messages');\n\t\t\t\t\t\t$statement->execute(array(':from' => $data->user['id'], ':to' => $otherUser['id'], ':message' => $data->output['sendForm']->sendArray[':message']));\n\t\t\t\t\t\t$data->output['sendForm']->fields['message']['value'] = '';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(strlen(strip_tags($data->output['sendForm']->sendArray[':message'])) == 0){\n\t\t\t\t\t\t\t$data->output['sendForm']->fields['message']['error'] = true;\n\t\t\t\t\t\t\t$data->output['sendForm']->fields['message']['errorList'][] = 'No message given';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Have any messages been deleted?\n\t\t\t\tif($data->action[3] == 'delete'){\n\t\t\t\t\t$statement = $db->prepare('deleteMessage', 'messages');\n\t\t\t\t\t$statement->execute(array(':id' => $data->action[4], ':user' => $data->user['id']));\n\t\t\t\t}\n\t\t\t\t// Current Messages\n\t\t\t\t$statement = $db->prepare('getMessagesBetweenUsers', 'messages');\n\t\t\t\t$statement->execute(array(':firstuser' => $data->user['id'], ':seconduser' => $otherUser['id']));\n\t\t\t\t$data->output['messages'] = $statement->fetchAll();\n\t\t\t\t$statement = $db->prepare('setMessagesAsRead', 'messages');\n\t\t\t\t$statement->execute(array(':firstuser' => $data->user['id'], ':seconduser' => $otherUser['id']));\n\t\t}\n\t\t\n\t}\n}", "function tn_prepare_messages() {\n\n\t$_messages = TN_Messages::get_instance();\n\n\t$messages = $_messages->get_messages();\n\n\tif( $messages ) :\n\n\t\tadd_action( 'tn_messages', function() use ( $messages ) { \n\n\t\t\tforeach( $messages as $key => $message ) {\n\t\t\t\t// we add data-message - useful if element is eg cloned to pull it downscreen\n\t\t\t\tif( isset( $message['success'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message success\"><?php echo $message['success']; ?></div>\n\t\t\t\t<?php elseif ( isset( $message['error'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message error\"><?php echo $message['error']; ?></div>\t\n\t\t\t\t<?php endif; \n\t\t\t}\n\n\t\t});\n\n\tendif;\n}", "function runPrivate(Chat $chat, TelegramMessage $message)\n {\n }", "function getUrlForSend($type)\n{\n return \"https://api.telegram.org/bot\".CHAT_BOT.\"/\".$type;\n}", "public function sendMessage(){\n\n\n }", "public function renderChatView() {\n\n $messages = $this->loadMessages();\n require 'public/views/front/chatView.phtml';\n\n }", "function cis_login_get_messages() {\n\n\tglobal $cis_login_message;\n\t$html = \"<div id=\\\"message-1\\\" class=\\\"updated\\\"><ul>\\n\";\n\n\tif (!count($cis_login_message))\n\t\treturn false;\n\tforeach ($cis_login_message as $msg)\n\t\t$html .= \"<li>{$msg}</li>\\n\";\n\n\twp_enqueue_style('colors');\n\treturn $html .= \"</ul>\\n</div>\\n\";\n}", "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data\n\t\tif (!empty($postStr))\n { \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $msgType = $postObj->MsgType;\n \n $time = time();\n \n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\";\n \n if($msgType == \"text\")\n {\n \t/*\n $keyword = trim($postObj->Content);\n\t\t\t\t\n\t\t\t\t\n $msgType = \"text\";\n \n $contentStr = $keyword;\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n\t\t\t\t * \n\t\t\t\t */\n }\n else if($msgType == \"event\")\n {\n $event = $postObj->Event;\n if($event == \"subscribe\")\n {\n $msgType = \"text\";\n \n $contentStr = \"你好,欢迎你的关注!\";\n \n \n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }\n\t\t\t\telse if($event == \"CLICK\")\n\t\t\t\t{\n\t\t\t\t\t$eventKey = $postObj->EventKey;\n\t\t\t\t\t\n\t\t\t\t\tif($eventKey == \"VK_RECENT\")\n\t { \n\t \n\t $query = \"select `id`, `post_title`, `post_content`\n\t from `wp_posts`\n\t where `post_status` like 'publish' and `post_type` like 'post'\n\t order by `post_date` desc\n\t limit 0, 5\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t$sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"近期文章:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= '「<a href=\"'. SITE . '/?p=' . $row['id'] . '\">';\n\t\t $strTitle .= $row['post_title'];\n\t\t $strTitle .= \"</a>」\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\n\t \n\t }\n\t else if($eventKey == \"VK_DATE\")\n\t {\n\t $query = \"select year(`post_date`), month(`post_date`), extract(year_month from(`post_date`)), count(extract(year_month from(`post_date`))) \n\t from `wp_posts`\n\t where `post_status` like 'publish' and `post_type` like 'post' \n\t group by extract(year_month from(`post_date`))\n\t order by extract(year_month from(`post_date`)) desc\";\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$sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"文章归档:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?m=' . $row['extract(year_month from(`post_date`))'] . '\">';\n\t\t $strTitle .= $row['year(`post_date`)'] . \"年\".\n\t\t chineseMonth($row['month(`post_date`)']) . \"月\";\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count(extract(year_month from(`post_date`)))']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t \t}\n\t \n\t }\n\t else if($eventKey == \"VK_CATEGORY\")\n\t {\n\t \t$query = \"select `wp_terms`.`term_id`, `wp_terms`.`name`, `wp_term_taxonomy`.`count`\n\t from `wp_terms`, `wp_term_taxonomy`\n\t where `wp_term_taxonomy`.`taxonomy` like 'category' and `wp_term_taxonomy`.`count` != 0\n\t and `wp_terms`.`term_id` = `wp_term_taxonomy`.`term_id`\";\n\t \n\t \n\t $sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"分类目录:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?cat=' . $row['term_id'] . '\">';\n\t\t $strTitle .= $row['name'];\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t} \n\t }\n\t else if($eventKey == \"VK_TAG\")\n\t {\n\t $query = \"select `wp_terms`.`slug`, `wp_terms`.`name`, `wp_term_taxonomy`.`count`\n\t from `wp_terms`, `wp_term_taxonomy`\n\t where `wp_term_taxonomy`.`taxonomy` like 'post_tag' and `wp_term_taxonomy`.`count` != 0\n\t and `wp_terms`.`term_id` = `wp_term_taxonomy`.`term_id`\";\n\t \n\t \n\t $sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"标签列表:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?tag=' . $row['slug'] . '\">';\n\t\t $strTitle .= $row['name'];\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t }\t\t\t\t\t\n\t\t\t\t}\n }\n\n }\n else\n {\n \techo \"\";\n \texit;\n }\n }", "function addActivityToTicket()\n\t{\n\t\t$input=JFactory::getApplication()->input;\n\t\t$ticketid=$input->post->get('ticketid','','INT');\n\t\t$chatlog=$input->post->get('chatlog','','STRING');\n\n\t\t$params=JComponentHelper::getParams('com_jbolo');\n\t\t//show username OR name\n\t\tif($params->get('chatusertitle')){\n\t\t\t$chatusertitle='username';\n\t\t}else{\n\t\t\t$chatusertitle='name';\n\t\t}\n\n\t\t$user=JFactory::getUser();\n\t\t$support_user_name=$user->name;\n\t\t$support_user_username=$user->username;\n\n\t\t$nid=JFactory::getApplication()->input->get('nid');\n\t\t$nodesHelper=new nodesHelper();\n\t\t$participants=$nodesHelper->getNodeParticipants($nid,$user->id,0);\n\t\t$participants=$participants['participants'];\n\t\tforeach($participants as $p)\n\t\t{\n\t\t\tif($p->uid\t!=$user->id)\n\t\t\t{\n\t\t\t\t$ticket_user=JFactory::getUser($p->uid);\n\t\t\t\t$ticket_user_name=$ticket_user->name;\n\t\t\t\t$ticket_user_username=$ticket_user->username;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//print_r($chatlog);die;\n\n\t\tif($chatusertitle=='username'){\n\t\t\t$chatlog=str_replace($support_user_username.\" : \",\"<br/><b>\".$support_user_username.\" : </b>\",$chatlog);\n\t\t}else{\n\t\t\t$chatlog=str_replace($support_user_name.\" : \",\"<br/><b>\".$support_user_name.\" : </b>\",$chatlog);\n\t\t}\n\n\t\tif($chatusertitle=='username'){\n\t\t\t$chatlog=str_replace($ticket_user_username.\" : \",\"<br/><b>\".$ticket_user_username.\" : </b>\",$chatlog);\n\t\t}else{\n\t\t\t$chatlog=str_replace($ticket_user_name.\" : \",\"<br/><b>\".$ticket_user_name.\" : </b>\",$chatlog);\n\t\t}\n\n\t\tif($chatlog && $ticketid)\n\t\t{\n\t\t\t$db=JFactory::getDBO();\n\t\t\t$sql=\"SELECT id FROM #__support_ticket WHERE ticketmask=\".$ticketid;\n\t\t\t$db->setQuery( $sql );\n\t\t\t$id_ticket=$db->loadResult();\n\n\t\t\t$sql=\"INSERT INTO #__support_note(`id_ticket`, `id_user`, `date_time`, `note`, `show`)\n\t\t\t\tVALUES('\".$id_ticket.\"', '\".$user->id.\"', '\".date(\"Y-m-d H:i:s\").\"', \".$db->quote( $chatlog ).\", '1')\";\n\t\t\t$db->setQuery( $sql );\n\t\t\t$db->execute();\n\t\t\tif($db->getErrorMsg()){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function showMessage(){\n\t\t\n\n\t\ttry {\n\n\t\t\tif(!empty($_POST)){// si un commentaire est poter\n\t\t\t\tTchatModel::setMessage($_POST[\"message\"],$_POST[\"idUsr\"]);\n\t\t\t}\n\n\t\t\t$data = TchatModel::getMessage();\n\t\t} catch (Exception $e) {\n\t\t\t$data = TchatModel::getMessage();\n\t\t\t$warning = $e->getMessage();\n\t\t}\n\t\trequire_once'ViewFrontend/tchat.php';\n\t}", "function getMsg($param) {\n global $msg;\n $msg = \"\";\n $msgCount = 1;\n for($i = 0; $i < strlen('$str'); $i++) {\n if($str[$i] != \"*\" && $msgCount == $param && $activeMsg) {\n $msg .= $str[$i];\n } else if($str[$i] == \"*\") {\n $msgCount++;\n $activeAuthor = true;\n $activeMsg = false;\n } else if($str[$i] == \":\") {\n $activeAuthor = false;\n $activeMsg = true;\n }\n }\n }", "public function show(Chat $chat)\n {\n //\n }", "function ppmess_insert_private_message($data){\n\t\n\tglobal $wpdb;\t\n\t\n\tif( empty($data['sender_id']) || empty($data['receiver_id']) || empty($data['post_id']) )\n\t\treturn FALSE;\n\t\n\tif(!is_numeric($data['sender_id']) || !is_numeric($data['receiver_id']) || !is_numeric($data['post_id']))\n\t\treturn FALSE;\n\t\n\t$sender_id = $data['sender_id'];\n\t$receiver_id = $data['receiver_id'];\n\t$post_id = $data['post_id'];\n\t\n\t// Check whether there is communication between these two users\n \t$select_query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE ((sender_id = $receiver_id AND receiver_id = $sender_id ) \n\t\t\t\t\tOR (sender_id = $sender_id AND receiver_id = $receiver_id)) \n\t\t\t\t\tAND post_id = $post_id AND message_parent = 0 ORDER BY date_created ASC LIMIT 1\";\n\t\n\t$result = $wpdb->get_results( $select_query, ARRAY_A );\n\n\tif($wpdb->num_rows == 1){ // One message exists\n\t\n\t\t$message_parent = $result[0]['message_id'];\n\t\t$show_status = $result[0]['show_status'];\n\t\t$post_name = $result[0]['post_name'];\n\t\t\n\t}else{ // No, this is first one\n\t\t$message_parent = 0;\n\t\t\n\t\t$post_info = get_post($data['post_id']);\n\t\t$post_name = $post_info->post_title;\n\t\t\n\t\tif($data['sender_id'] != $post_info->post_author)\n\t\t\t$user2 = $data['sender_id'];\n\t\telse\n\t\t\t$user2 = $data['receiver_id'];\n\t\t\n\t\t$show_status = '_' . $post_info->post_author . '_' . $user2;\n\t}\n\t\n\t// stripslashes !\n\t$data_value = array(\n\t\t'message_content' \t=> sanitize_text_field($data['message_content']), \n\t\t'sender_id' \t\t=> intval($data['sender_id']), \n\t\t'receiver_id' \t\t=> intval($data['receiver_id']), \n\t\t'post_id' \t\t\t=> intval($data['post_id']),\n\t\t'post_name' \t\t=> $post_name, \n\t\t'message_parent' \t=> $message_parent, // Za drugu, trecu.., i naredne poruke parent je = message_id prve poruke\n\t\t'show_status' \t\t=> $show_status,\n\t\t'sent_to' \t\t\t=> intval($data['receiver_id']) // oznacavanje sent_to u prvom redu ako je parent == 0 (postoji samo jedna poruka) ILI u redu gde je upisan novi komentar ako vec postoji jedna poruka (parent != 0)\t\n\t);\n\t\n\t$wpdb->insert( $wpdb->prefix . 'private_messages', $data_value, array('%s', '%d', '%d', '%d', '%s', '%d', '%s', '%d') );\t\n\t$new_message_id = $wpdb->insert_id;\n\t\n\t// Oznacavanje sanduceta o prijemu nove poruke\n\t// Sanduce se oznacava promenom kolone sent_to = 'receiver_id' ( ID user-a koji prima poruku)\n\tif($new_message_id){\n\t\t\n\t\t// kolona sent_to ima dve funkcije 1) oznacava korisnika koji prima poruku, 2) i u isto vreme status poruke da li je procitana (!= 0) ili ne ( = 0 )\t\n\t\t// ako postoji vise poruka od jedne potrebno je dodatno oznaciti sent_to za trenutno upisanu poruku u PRVOM REDU (message_parent == 0)\n\t\tif($message_parent > 0){\t\t\t\n\t\t\t$wpdb->query( $wpdb->prepare( \"UPDATE {$wpdb->prefix}private_messages SET sent_to = %d WHERE message_parent = %d\n\t\t\t\t\tAND post_id = %d AND ((sender_id = %d AND receiver_id = %d ) \n\t\t\t\t\tOR (sender_id = %d AND receiver_id = %d))\", \n\t\t\t\t\t$data['receiver_id'], 0, $data['post_id'], $data['receiver_id'], $data['sender_id'], \n\t\t\t\t\t$data['sender_id'], $data['receiver_id']) );\t\n\t\t}\n\t\t\n\t\treturn $new_message_id;\n\t\t\n\t}else{\n\t\treturn FALSE;\n\t} \n}", "function taglinMsg()\n\t{\n/*:TODO*/\n\n\t}", "public function execute() {\n \n $message = $this->getMessage(); // Get Message object\n\n $chat_id = $message->getChat()->getId(); // Get the current Chat ID\n $nama = $message->getFrom()->getFirstName() .' '. $message->getFrom()->getLastName();\n \n $text = \"<b>Hai $nama</b>. Berikut ini list perintah yang dapat digunakan di bot Ilkom 2017 Reborn ini.\\n\\n\";\n \n $text .= \"<b>Bot Command</b>\\n\";\n $text .= \"/start = Memulai Bot\\n\";\n $text .= \"/help = Menampilkan daftar perintah.\\n\";\n $text .= \"/about = Tentang Bot ini.\\n\\n\";\n \n $text .= \"<b>Akademik dan Informasi</b>\\n\";\n $text .= \"/jadwal = Perintah untuk menampilkan Jadwal. Klik untuk lebih lanjut.\\n\";\n $text .= \"/info = Perintah menampilkan informasi umum.\\n\";\n $text .= \"/addinfo = Perintah untuk menambahkan informasi kepada yang lain.\\n\";\n $text .= \"/beasiswa = Perintah untuk menampilkan info beasiswa.\\n\";\n $text .= \"/addbeasiswa = Perintah untuk menambahkan informasi beasiswa kepada yang lain.\\n\\n\";\n \n $text .= \"<b>Fitur</b>\\n\";\n $text .= \"/kbbi = Mencari definisi kata dari KBBI.\\n\";\n $text .= \"/github = Fitur pencarian di github.\\n\";\n $text .= \"/buku = Menacari buku seputar IT\\n\";\n $text .= \"/translate atau /tr = Terjemahan bahasa\\n\";\n $text .= \"/stack = Mencari postingan dari Stackoverflow\\n\\n\";\n \n $text .= \"<b>Lainnya</b>\\n\";\n $text .= \"/pesan = Mengirim kritik dan saran ke Bot, bisa juga digunakan untuk request fitur misalnya.\\n\";\n \n Request::sendChatAction([\n \n 'chat_id'=> $chat_id,\n 'action' => 'typing'\n ]);\n \n $kirimpesan = [\n 'chat_id' => $chat_id,\n 'parse_mode' => 'HTML',\n 'text' => $text\n ];\n \n return Request::sendMessage($kirimpesan);\n }", "public function flashchatSave()\n\t{\n\t\t/* INIT */\n\t\t$fc_row['fc_server'] = intval( $this->request['fc_server'] );\n\t\tswitch ($fc_row['fc_server'])\n\t\t{\n\t case 0:\n\t if ($this->request['fc_server_local'])\n\t {\n\t $fc_row['fc_server_host'] = ($this->request['fc_server_host'] != '127.0.0.1') ? $this->request['fc_server_host'] : parse_url($this->settings['upload_url'], PHP_URL_HOST);\n\t $fc_row['fc_server_port'] = $this->request['fc_server_port'] ? $this->request['fc_server_port'] : 51127;\n\t $fc_row['fc_http_port'] = $this->request['fc_http_port'] ? $this->request['fc_http_port'] : 35555;\n\t $fc_row['fc_api_url'] = 'http://' . $fc_row['fc_server_host'] . ':' . $fc_row['fc_http_port'] . '/'; \n\t $fc_row['fc_client_loc'] = $fc_row['fc_api_url'];\n\t $s_own_loc = $this->validate_server($fc_row['fc_server_host'], $fc_row['fc_server_port']);\n\t $c_own_loc = $this->validate_client($fc_row['fc_client_loc']);\n\t $da = $this->validate_data_api($fc_row['fc_api_url'] . 'online.js');\n\t if ($s_own_loc)\n\t {\n\t $error[] = 'Chat Server host or port is configured incorrectly';\n\t }\n\t if ($da || $c_own_loc)\n\t {\n\t $error[] = 'Chat Server host or http_port is configured incorrectly';\n\t }\n }\n else\n {\n $fc_row['fc_server_host'] = parse_url($this->settings['upload_url'], PHP_URL_HOST);\n $fc_row['fc_server_port'] = 51127;\n\t $fc_row['fc_http_port'] = 35555;\n\t $fc_row['fc_api_url'] = 'http://' . $fc_row['fc_server_host'] . ':' . $fc_row['fc_http_port'] . '/'; \n\t $fc_row['fc_client_loc'] = $fc_row['fc_api_url'];\n }\n\t $fc_row['fc_client'] = $this->request['fc_client'];\n\t break;\n\t case 1:\n\t $fc_row['fc_client_loc'] = $this->request['fc_client_loc'] ? ($this->request['fc_client_loc'] . (substr($this->request['fc_client_loc'],-1,1) != '/' ? '/' : '')) : '';\n\t $fc_row['fc_server_host'] = parse_url($fc_row['fc_client_loc'], PHP_URL_HOST);\n\t if ($content = @file_get_contents($fc_row['fc_client_loc']))\n\t {\n\t preg_match('/init_port=([0-9]*)/', $content, $matches);\n\t $fc_row['fc_server_port'] = $matches[1];\n\t }\n\t $fc_row['fc_api_url'] = 'http://' . $fc_row['fc_server_host'] . '/';\n\t $fc_row['fc_group'] = substr(parse_url($fc_row['fc_client_loc'], PHP_URL_PATH),1,-1);\n\t $c_own_loc = $this->validate_client($fc_row['fc_client_loc']);\n\t $da = $this->validate_data_api($fc_row['fc_api_url'] . 'online.js?group=' . $fc_row['fc_group']);\n\t if ($c_own_loc or $da)\n\t {\n\t $error[] = 'Client Location is configured incorrectly';\n\t }\n\t $fc_row['fc_client'] = $this->request['fc_client'];\n\t break;\n\t case 2:\n\t $fc_row['fc_room'] = $this->request['fc_room'] ? $this->request['fc_room'] : parse_url($this->settings['upload_url'], PHP_URL_HOST);\n\t $fc_row['fc_client'] = 0;\n\t break;\n\t\t}\n\t\tif ($fc_row['fc_status'] = $this->request['fc_status'])\n\t\t{\n\t\t if ($fc_row['fc_server'] !=2 )\n\t\t\t{\n\t\t\t\t$fc_row['fc_room_list'] = $this->request['fc_room_list'];\n\t\t\t}\n\t\t $fc_row['fc_user_list'] = $this->request['fc_user_list'];\n\t\t}\n\t\t$fc_row['fc_client_present'] = $this->request['fc_client_present'];\n\t\tif ($this->request['fc_client_size'])\n\t {\n\t $fc_row['fc_client_width'] = '100%';\n\t $fc_row['fc_client_height'] = '100%';\n }\n else\n\t\t{\n\t $fc_row['fc_client_width'] = $this->request['fc_client_width'] ? $this->request['fc_client_width'] : 800;\n $fc_row['fc_client_height'] = $this->request['fc_client_height'] ? $this->request['fc_client_height'] : 600;\n\t\t}\n\t $fc_row['fc_client_lang'] = $this->request['fc_client_lang'];\n if (!$fc_row['fc_client'])\n {\n $fc_row['fc_client_skin'] = $this->request['fc_client_skin'];\n }\n if($this->request['fc_client_present']){\n \t$fc_row['fc_client_width'] = '100%';\n\t $fc_row['fc_client_height'] = '100%';\n }\n\t\t\n\t\t/* Modify 123flashchat */\n if (!sizeof($error))\n \t{\n \n\t\t foreach ( $fc_row as $conf_key => $conf_value)\n\t\t {\n\t\t\t $this->DB->update( 'core_sys_conf_settings', array('conf_value' => $conf_value), \"conf_key ='\" . $conf_key . \"'\");\n\t\t\t //$this->settings['$conf_key'] = $conf_value;\n\t\t }\n\t\t\n\t\t /* Rebuild Caches and Bounce */\n\t\t $this->settingsRebuildCache();\n\t\t $this->flashchatForm($fc_row);\n \t}\n\t else\n\t {\n\t\t $fc_row['fc_error']=implode('<br />',$error);\n\t\t $this->flashchatForm($fc_row);\n\t }\n\t}", "function __construct($input) {\n \n $this->textMessage = $input['entry'][0]['messaging'][0]['message']['text'];\n $this->buttonMessage = $input['entry'][0]['messaging'][0]['postback']['payload'];\n $this->quickReplyMessage = $input['entry'][0]['messaging'][0]['message']['quick_reply']['payload'];\n $this->attachmentMessage = $input['entry'][0]['messaging'][0]['message']['attachments'][0]['type'];\n\n\n }", "public function getAction()\n {\n\n if(Auth::hasLastChatId())\n {\n\n $_POST['last_chat_id'] = Auth::getLastChatId();\n $chat = new Chat($_POST);\n\n if ($chat->hasChatAfter())\n {\n $chats = $chat->getAfter(Auth::getLastChatId());\n\n View::renderTemplate('App/chat.html', [\n 'chats' => $chats\n ]);\n\n Auth::setLastChatId($chat->getLastChatId());\n }\n\n }\n else\n {\n Auth::setLastChatId(0);\n\n }\n }" ]
[ "0.63842607", "0.6353082", "0.63511324", "0.63511324", "0.63511324", "0.63258594", "0.63217807", "0.60072714", "0.5999326", "0.5973857", "0.59590375", "0.5934345", "0.59178627", "0.5891356", "0.5881627", "0.5854293", "0.58467907", "0.5833208", "0.5820362", "0.5787204", "0.57700574", "0.57667613", "0.576486", "0.57643", "0.57376355", "0.572125", "0.5719316", "0.5719179", "0.5711083", "0.56967366", "0.5691938", "0.56887937", "0.56832886", "0.56618667", "0.56597066", "0.56583226", "0.56517994", "0.5647731", "0.5644763", "0.56372565", "0.56339884", "0.5628926", "0.56286", "0.5621352", "0.5614063", "0.5595154", "0.558291", "0.5568891", "0.55667216", "0.55666214", "0.5564873", "0.5562297", "0.55607843", "0.55576617", "0.5548401", "0.55481124", "0.5534866", "0.55335355", "0.5528786", "0.5525337", "0.54948187", "0.5489486", "0.5489401", "0.5467612", "0.54668933", "0.54663986", "0.5457316", "0.54557496", "0.54555523", "0.54517114", "0.5448616", "0.54446137", "0.54387754", "0.5437996", "0.543411", "0.54324514", "0.5414749", "0.54134625", "0.5411367", "0.5408563", "0.54014885", "0.53974354", "0.5393928", "0.5387097", "0.5377999", "0.5374288", "0.53594", "0.5356822", "0.53566706", "0.53524524", "0.5345473", "0.5342477", "0.53398246", "0.5335475", "0.53320444", "0.53282636", "0.532112", "0.5320506", "0.5315608", "0.5314691", "0.53139" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('user_create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}" ]
[ "0.7594622", "0.7594622", "0.7588457", "0.7580005", "0.75723624", "0.7499764", "0.7436887", "0.74322647", "0.7387517", "0.735172", "0.73381543", "0.73117113", "0.72958225", "0.7280436", "0.7273787", "0.72433424", "0.7230227", "0.7225085", "0.71851814", "0.71781176", "0.7174025", "0.7149406", "0.71431303", "0.7142905", "0.7136737", "0.712733", "0.7122102", "0.71148264", "0.71148264", "0.71148264", "0.7111841", "0.7092733", "0.70843536", "0.70822084", "0.7079442", "0.70571405", "0.70571405", "0.7055195", "0.70391846", "0.7039114", "0.7035626", "0.7033991", "0.70300245", "0.7026507", "0.7026417", "0.7019451", "0.7017105", "0.7004775", "0.70031846", "0.6999904", "0.6995238", "0.6994825", "0.699354", "0.6988824", "0.6986871", "0.6965804", "0.6965542", "0.69560695", "0.69515944", "0.6950682", "0.6947703", "0.69433117", "0.6941539", "0.6939613", "0.69377476", "0.69377476", "0.693678", "0.69344354", "0.69314486", "0.6927608", "0.69264024", "0.6922966", "0.69181216", "0.69150716", "0.6911192", "0.69095594", "0.69092506", "0.6907887", "0.69018227", "0.69008595", "0.69006085", "0.6900209", "0.68949944", "0.6892768", "0.6891944", "0.6891552", "0.6891552", "0.6891443", "0.68886423", "0.6888326", "0.68856037", "0.68835604", "0.68813664", "0.6878345", "0.6876079", "0.6873206", "0.6873183", "0.687048", "0.687014", "0.686966", "0.68695843" ]
0.0
-1
Store a newly created resource in storage.
public function store(UserRequest $request) { $user = new User; // $user->create($request->all()); //Maneiras diferente de usar o request // dd($request->email); // dd($request->input('email')); // dd(request('email')); $user->create($request->all()); session()->flash('message', 'Cadastrado com sucesso'); return back(); // $user = new User; // $user->name = 'Fulano'; // $user->email = '[email protected]'; // $user->password = \Hash::make(123); // $user->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update($id, $input);", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445", "0.58630455", "0.58540666", "0.58540666", "0.5851948", "0.5816257", "0.58070177", "0.5752376", "0.5752376", "0.57359827", "0.5723941", "0.57152426", "0.56958807", "0.5691061", "0.56881654", "0.5669518", "0.5655434", "0.5651897", "0.56480426", "0.5636727", "0.56354004", "0.5633156", "0.5632135", "0.5629063", "0.5621358", "0.56089175", "0.5602031", "0.55927175", "0.5582773", "0.558176", "0.5581365", "0.5575607", "0.5571989", "0.55672973", "0.5562929", "0.55623275", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55598706", "0.55560726", "0.55558753", "0.5554241", "0.55534166", "0.5552986", "0.55440396", "0.55438566", "0.5540619", "0.55394524", "0.5536144", "0.5535339", "0.5534803", "0.5524157", "0.55188423", "0.55163455", "0.55135876", "0.5509835", "0.5507501", "0.55068344", "0.55034274", "0.5501476", "0.55010915", "0.5499286", "0.5497852", "0.54958415", "0.54958415", "0.5494513", "0.5494261", "0.54935366", "0.54931587", "0.54917634", "0.54836094", "0.5479455", "0.5478885", "0.5478268", "0.54654354", "0.54645413", "0.5461025", "0.54568535" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Create a new controller instance.
public function __construct() { return $this->drone = new Drone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / SETTERS //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public function setCommentId($comment_id) { $this->comment_id = $comment_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function set();", "private function __construct()\t{}", "private function __() {\n }", "protected function __init__() { }", "public static function setters();", "private function __construct() {\r\n\t\t\r\n\t}", "private function __construct() {\r\n\t\r\n\t}", "function __set($name, $value)\n {\n // TODO: Implement __set() method.\n }", "public function init() {\t\t\n\n }", "public function __set($_name, $_value);", "private function __construct () \n\t{\n\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "private function __construct() { \n\t\t\n\n\t}", "private function __construct()\n\t{\n\t\t\n\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "private function __construct( )\n {\n\t}", "public function __init(){}", "public function init() {\n\t\t\n\t}", "public function __construct()\n {\n $this->set(array());\n }", "protected\tfunction\tsetDefinition() {}", "protected\tfunction\tsetDefinition() {}", "function _setDefaults()\n {\n $this->type = $this->rs['type'] = \"unknown\";\n $this->parent = $this->rs['parent'] = 0;\n $this->lecture_id = $this->rs['lecture_id'] = SessionDataBean::getLectureId();\n $this->title = $this->rs['title'] = \"\";\n $this->mtitle = $this->rs['mtitle'] = \"\";\n $this->text = $this->rs['text'] = \"<p></p>\";\n $this->position = $this->rs['position'] = 0;\n $this->redirect = $this->rs['redirect'] = \"\";\n $this->ival1 = $this->rs['ival1'] = 0;\n $this->copy_parent = $this->rs['copy_parent'] = false;\n }", "protected function init()\n\t{\n\t\t\n\t}", "final private function __construct(){\r\r\n\t}", "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "function __set($name, $value) {\r\n if ($name == 'mr') {\r\n $this->max_rating = intval($value);\r\n } else if ($name == 'st') {\r\n $this->step = intval($value);\r\n } else if ($name == 'vis') {\r\n $this->visible = $value == '1';\r\n } else if ($name == 'seq') {\r\n $this->sequence = intval($value);\r\n } else if ($name == 'cr') {\r\n $this->created = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'upd') {\r\n $this->updated = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'num') {\r\n $this->num_ratings = intval($value);\r\n } else if ($name == 'total') {\r\n $this->tot_ratings = floatval($value);\r\n }\r\n\r\n }", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "function __construct() {\n\t\t\t\n\t\t}", "function __construct()\n\t{\n\t\t\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "private function __construct()\r\n\t{\r\n\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}", "function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}", "function _setDefaults() {}", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $currency->format_money($this->_total_amount);\n\t}", "private function __construct()\r\n {\r\n }", "private function __construct()\r\n {\r\n }", "abstract protected function handle_set($name,$value);", "public function init()\n\t\t{\n\t\n\t\t}", "public function __construct( )\r\n\t{\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "public function init()\n {\t\t\t\n }", "public function init()\n {\t\t\t\n }", "function _setDefaults()\n {\n $this->subtask_id = $this->rs['subtask_id'] = 0;\n $this->student_id = $this->rs['student_id'] = 0;\n $this->assignment_id = $this->rs['assignment_id'] = 0;\n $this->file_id = $this->rs['file_id'] = 0;\n }", "function __set($name,$value) {\n\t\t$this->object[$name]=$value;\n\t}", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "private function __construct()\n\t{\n\n\t}", "function set_property(){\n }", "function __set ($name, $value)\n\t{\n\t\tswitch ($name) {\n\t\t\tcase \"name\":\n\t\t\tcase \"alt\":\n\t\t\tcase \"align\":\n\t\t\tcase \"codeBase\":\n\t\t\tcase \"archive\":\n\t\t\tcase \"code\":\n\t\t\tcase \"object\":\n\t\t\t\t$this->_setProperty($name, $value);\n\t\t\tbreak;\n\t\t\tcase \"width\":\n\t\t\tcase \"height\":\n\t\t\t\t$this->_setProperty($name, $value, \"intperc\");\n\t\t\tbreak;\n\t\t\tcase \"hspace\":\n\t\t\tcase \"vspace\":\n\t\t\t\t$this->_getProperty($name, (int) $value, \"int\", 0);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tparent::__set($name, $value);\n\t\t\tbreak;\n\t\t}\n\t}", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function init ()\r\n {\r\n }", "function __construct (){\n\t\t}", "public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }", "function __construct()\r\n\t{\r\n\t\t\r\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "public function __construct() {\r\n\t\t$this->_val = new \\tinyPHP\\Classes\\Core\\Val();\r\n\t}", "function __construct()\r\n\t{\r\n\t}", "public function __construct()\n\t\t{\t\t\t\n\t\t}", "function setValue ($value) {\n\t\t$this->_value = $value;\n\t}", "public function __construct()\n\t{\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() { \n\t\t\n\n\t\t}", "protected function __construct() {\n\t\t\n\t}", "protected function __construct() {\n\t\t\n\t}", "function __construct()\n\t{\n\n\t}", "public function setData() \n {\n // Empty, to be overridden \n }", "final private function __construct() {\n\t\t\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function init(){\n\t\t\n\t}", "private function __construct() {\n\t\t}", "private function __construct () {}", "public function setPosition() {\n }", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\r\n\t\t//\r\n\t}" ]
[ "0.71946627", "0.6386438", "0.63612854", "0.63112617", "0.62555087", "0.6239267", "0.61973727", "0.6190243", "0.6149702", "0.6149562", "0.6142734", "0.61350167", "0.6123348", "0.61232984", "0.61149085", "0.61149085", "0.61149085", "0.6103065", "0.61015344", "0.6091884", "0.6084859", "0.6072158", "0.6072158", "0.6067231", "0.60603267", "0.6050492", "0.6047365", "0.6047271", "0.6040634", "0.60348904", "0.6025411", "0.6024868", "0.6024868", "0.6024868", "0.6024868", "0.6024868", "0.60219806", "0.60099566", "0.6006025", "0.600203", "0.5999176", "0.59985495", "0.599738", "0.59968525", "0.59968525", "0.5988549", "0.5987514", "0.5981405", "0.59670436", "0.59670436", "0.59640586", "0.59639156", "0.5960814", "0.59604645", "0.5955051", "0.59508705", "0.5944502", "0.5942527", "0.5942527", "0.5942527", "0.5942527", "0.5942527", "0.5942527", "0.5942527", "0.5940387", "0.5939477", "0.5938592", "0.5932667", "0.5929208", "0.5929208", "0.59285414", "0.5928315", "0.5924535", "0.5923793", "0.59233725", "0.5920416", "0.591965", "0.5916155", "0.5916155", "0.5912322", "0.5908445", "0.5902069", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.5901284", "0.589253", "0.58894074", "0.5881262", "0.58722645", "0.58722275", "0.5872217", "0.5872217", "0.5872217", "0.5872217", "0.5870692" ]
0.0
-1
Adds invitations to the list. Duplicated emails and empty invitiation are skipped
public function setInvitations(array $invitations) { foreach ($invitations as $newInvitation) { if (!($newInvitation instanceof ProjectInvitation)) { continue; } foreach ($this->invitations as $invitation) { if ($invitation->getInviteeEmail() === $newInvitation->getInviteeEmail()) { continue 2; } } $this->invitations[] = $newInvitation; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invites();", "function invitations()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tlogout_invalid_user($this);\n\t\t$data['tender'] = $this->_tender->details($data['d']);\n\t\t$data['invited'] = $this->_tender->invitations($data['d']);\n\t\t\n\t\tif(empty($data['invited'])) $data['msg'] = \"ERROR: No invitations can be resolved.\";\n\t\t$this->load->view('tenders/invitations', $data);\n\t}", "public function invite_members(){\n \tif( !isset( $_REQUEST['pmstkn'] ) || !wp_verify_nonce( $_REQUEST['pmstkn'], 'pms_invite_members_form_nonce' ) )\n \t\treturn;\n\n \tif( empty( $_POST['pms_subscription_id'] ) || empty( $_POST['pms_emails_to_invite'] ) )\n \t\treturn;\n\n if( !pms_get_page( 'register', true ) ){\n pms_errors()->add( 'invite_members', esc_html__( 'Registration page not selected. Contact administrator.', 'paid-member-subscriptions' ) );\n\n return;\n }\n\n \t$subscription = pms_get_member_subscription( sanitize_text_field( $_POST['pms_subscription_id'] ) );\n\n if( !pms_gm_is_group_owner( $subscription->id ) )\n return;\n\n \t//try to split the string by comma\n \t$emails = explode( ',', $_POST['pms_emails_to_invite'] );\n\n \t//check if the first entry contains the end of line character and if so, split by EOL\n \t//having more than 1 entry means that the above split worked\n \tif( isset( $emails[0] ) && count( $emails ) == 1 && strstr( $emails[0], PHP_EOL ) )\n \t\t$emails = explode( PHP_EOL, $_POST['pms_emails_to_invite'] );\n\n $invited_members = 0;\n $invited_emails = pms_get_member_subscription_meta( $subscription->id, 'pms_gm_invited_emails' );\n\n \tforeach( $emails as $email ){\n $email = str_replace( array( \"\\r\", \"\\n\", \"\\t\"), '', $email );\n\n if( !$this->members_can_be_invited( $subscription ) )\n return;\n\n if( in_array( $email, $invited_emails ) )\n continue;\n\n // check if user already invited or registered with subscription\n $email = sanitize_text_field( $email );\n\n if( !filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n continue;\n\n $invited_emails[] = $email;\n\n // If a user with this email is already registered, add him to the subscription\n $user = get_user_by( 'email', $email );\n\n if( !empty( $user ) ) {\n\n $existing_subscription = pms_get_member_subscriptions( array( 'user_id' => $user->ID, 'subscription_plan_id' => $subscription->subscription_plan_id ) );\n\n if( !empty( $existing_subscription ) )\n continue;\n\n $subscription_data = array(\n 'user_id' => $user->ID,\n 'subscription_plan_id' => $subscription->subscription_plan_id,\n 'start_date' => $subscription->start_date,\n 'expiration_date' => $subscription->expiration_date,\n 'status' => 'active',\n );\n\n $new_subscription = new PMS_Member_Subscription();\n $new_subscription->insert( $subscription_data );\n\n pms_add_member_subscription_meta( $new_subscription->id, 'pms_group_subscription_owner', $subscription->id );\n pms_add_member_subscription_meta( $subscription->id, 'pms_group_subscription_member', $new_subscription->id );\n\n if( function_exists( 'pms_add_member_subscription_log' ) )\n pms_add_member_subscription_log( $new_subscription->id, 'group_user_subscription_added' );\n\n $invited_members++;\n\n continue;\n }\n\n // Invite user\n //save email as subscription meta\n $meta_id = pms_add_member_subscription_meta( $subscription->id, 'pms_gm_invited_emails', $email );\n\n //generate and save invite key\n $invite_key = $this->generate_invite_key( $meta_id, $email, $subscription->id );\n\n //send email\n if( $invite_key !== false )\n do_action( 'pms_gm_send_invitation_email', $email, $subscription, $invite_key );\n \t}\n\n $invited_members += (int)did_action( 'pms_gm_send_invitation_email' );\n\n if( $invited_members >= 1 )\n pms_success()->add( 'invite_members', sprintf( _n( '%d member invited successfully !', '%d members invited successfully !', $invited_members, 'paid-member-subscriptions' ), $invited_members ) );\n else\n pms_errors()->add( 'invite_members', esc_html__( 'Something went wrong. Please try again.', 'paid-member-subscriptions' ) );\n\n }", "public function getInvitations ()\n {\n return $this->invitations;\n }", "public function invitations() {\n\n return DB::table('invitation')\n ->where('recepteur_id', Auth::User()->id)\n ->where('status', 0)\n ->get();\n }", "public function add_invitation($id)\n {\n $this->invitation_ids[] = $id;\n }", "public function invitationsEnvoyer() {\n \n return DB::table('invitation')\n ->where('emetteur_id', Auth::User()->id)\n ->where('recepteur_id', $this->id)\n ->where('status', 0)\n ->exists();\n\n }", "public function invitations()\n {\n return $this->hasMany(Invitation::class);\n }", "public function actionAutoAddInvites(){\n $users = User::model()->findAll(\"status = :status AND invitations < :invite\",array(\":status\"=>1,\":invite\"=>2));\n $userStats = UserStat::model()->findAll();\n $stat = array();\n foreach ($userStats as $userStat){\n $stat[$userStat->user_id] = $userStat;\n }\n \n // check all users\n foreach ($users as $user){\n if (!isset($stat[$user->id])){\n // not yet calculated %\n $c = new Completeness();\n $c->setPercentage($user->id);\n }else{\n //percentage in now add invitations\n if ($stat[$user->id]->completeness >= PROFILE_COMPLETENESS_MIN){\n if ($stat[$user->id]->invites_send == 0) $user->invitations +=4; // initial 4+1 invites after profile completed\n $user->invitations++;\n }\n if ($stat[$user->id]->invites_send > 5) $user->invitations+=2;\n if ($stat[$user->id]->invites_registered > 5) $user->invitations++;\n $user->save(); \n }\n }\n }", "public function inviteUser()\r\n {\r\n Invite::instance()->from(Yii::$app->user->getIdentity())->about($this)->sendBulk($this->participantUsers);\r\n }", "public function invitations()\n {\n return $this->belongsToMany('App\\User', 'invitations');\n }", "function getInvites() {\n $invites = $this->carddavBackend->getInvites($this->addressBookInfo['id']);\n\n $invites[] = new \\Sabre\\DAV\\Xml\\Element\\Sharee([\n 'href' => \\Sabre\\HTTP\\encodePath($this->getOwner()),\n 'access' => $this->getShareAccess(),\n 'inviteStatus' => SPlugin::INVITE_ACCEPTED,\n 'properties' => [],\n 'principal' => $this->getOwner()\n ]);\n\n return $invites;\n }", "function invite()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tlogout_invalid_user($this);\n\t\t\n\t\t# user has submitted the invitation\n\t\tif(!empty($_POST)){\n\t\t\t$response = $this->_tender->invite($_POST);\n\t\t\t$msg = (!empty($response) && $response['boolean'])? 'The Invitation for Bids/Quotations has been sent.' :'ERROR: The Invitation for Bids/Quotations could not be sent.';\n\t\t\t\n\t\t\t$this->native_session->set('__msg',$msg);\n\t\t}\n\t\telse if(!empty($data['a'])){\n\t\t\t$data['msg'] = $this->native_session->get('__msg');\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t\t$this->load->view('addons/basic_addons', $data);\n\t\t}\n\t\telse {\n\t\t\t$data['tender'] = $this->_tender->details($data['d']);\n\t\t\t$data['invited'] = $this->_tender->invitations($data['d']);\n\t\t\t$this->load->view('tenders/invite', $data);\n\t\t}\n\t}", "public function invites()\n {\n return $this->get('/user/invites');\n }", "function ProcessInvites () {\n global $zLOCALUSER;\n\n global $gINVITES, $gSITEDOMAIN;\n global $gINVITINGUSER, $gGROUPFULLNAME, $gGROUPURL;\n global $gGROUPINVITEACTION, $gGROUPINVITEUSERNAME, $gGROUPINVITEDOMAIN;\n\n // Loop through the action list.\n foreach ($gGROUPINVITEACTION as $count => $action) {\n $username = $gGROUPINVITEUSERNAME[$count];\n $domain = $gGROUPINVITEDOMAIN[$count];\n switch ($action) {\n case GROUP_ACTION_REMOVE:\n $USER = new cOLDUSER ();\n $USER->Select (\"Username\", $username);\n $USER->FetchArray ();\n if ($USER->uID != $this->userAuth_uID) {\n //$this->Leave ($username, $domain);\n } // if\n unset ($USER);\n break;\n } // switch\n } // foreach\n\n $gINVITINGUSER = $zLOCALUSER->userProfile->GetAlias ();\n $gGROUPFULLNAME = $this->Fullname;\n $groupaddress = $this->Name . '@' . $gSITEDOMAIN;\n $gGROUPURL = \"!##asd group='$groupaddress' /##!\";\n\n $invitelist = explode (',', $gINVITES);\n foreach ($invitelist as $id => $address) {\n list ($username, $domain) = explode ('@', $address);\n\n $checkcriteria = array (\"groupInformation_tID\" => $this->tID,\n \"Username\" => $username,\n \"Domain\" => $domain);\n $this->groupMembers->SelectByMultiple ($checkcriteria);\n if ($this->groupMembers->CountResult () > 0) {\n // User is already in the list. Continue.\n continue;\n } // if\n $this->groupMembers->Username = $username;\n $this->groupMembers->Domain = $domain;\n $this->groupMembers->groupInformation_tID = $this->tID;\n $this->groupMembers->Verification = GROUP_VERIFICATION_INVITED;\n $this->groupMembers->Stamp = SQL_NOW;\n $this->groupMembers->Add ();\n \n // NOTE: Message shouldn't use globals for recipients.\n $MESSAGE = new cMESSAGE ();\n\n global $gRECIPIENTNAME, $gRECIPIENTDOMAIN, $gRECIPIENTADDRESS;\n $gRECIPIENTNAME = $username;\n $gRECIPIENTDOMAIN = $domain;\n $gRECIPIENTADDRESS = $gRECIPIENTNAME . '@' . $gRECIPIENTDOMAIN;\n \n global $gSUBJECT, $gBODY;\n $gBODY = __(\"Group Invite Body\", array ( \"name\" => $gRECIPIENTNAME, \"domain\" => $gRECIPIENTDOMAIN, \"address\" => $gRECIPIENTADDRESS ) );\n $gBODY = str_replace (\"!##\", \"<\", $gBODY);\n $gBODY = str_replace (\"##!\", \">\", $gBODY);\n $gSUBJET = __(\"Group Invite Subject\", array ( \"name\" => $gRECIPIENTNAME) );\n $MESSAGE->Send ($zLOCALUSER->Username);\n unset ($MESSAGE);\n } // foreach\n\n $this->Message = __(\"User Invited To Group\");\n $this->Error = 0;\n\n return (TRUE);\n\n }", "public function getAllInvitation()\n {\n try{\n $allInvitations = UserInvite::listAllInvites(Auth::user()->user_id);\n if(is_object($allInvitations)){\n $result = $this->renderSuccess(trans('messages.received_invitation_list'),$allInvitations);\n } else {\n $result = $this->renderFailure(trans('messages.common_error'), StatusCode::$EXCEPTION,[false]);\n }\n }\n catch(\\Exception $e){\n UtilityHelper::logException(__METHOD__, $e);\n $result = $this->renderFailure(trans('messages.error.exception'), Response::HTTP_OK);\n }\n return $result;\n }", "public function invitations()\n {\n return $this->belongsToMany('App\\User')->active();\n }", "public function invites()\n {\n return $this->hasMany(Invite::class);\n }", "public function inviteAction()\n\t{\n\t\t$user = new Default_Model_User();\n\t\t$resultRow = $user->getUserByEmail($this->loggedEmail);\n\t\t\n\t\t$loggedHandle = $resultRow->handle;\n\t\t$loggedId = $resultRow->id;\n\t\t\n\t\t$handle = $this->_request->getParam('handle');\n\t\t$resultRow = $user->getUserByHandle($handle);\n\t\t$handleId = $resultRow->id;\n\n\t\t$invite = new Default_Model_Invitation();\n\t\tif($invite->createInvitation($loggedId, $handleId)){\n\t\t\t$this->view->success = 1;\n\t\t} else{\n\t\t\t$this->view->success = 0;\n\t\t}\n\t}", "public function sentInvitations(){\n return $this->belongsToMany('App\\User', 'invitations');\n }", "public function inviteAction()\n {\n \t$roomId = $this->_getRoomId();\n \t$userDto = Zend_Registry::get('api_user');\n \t$nickname = $this->_getParam('nick_name');\n \t$invited = $this->getMultiUser($this->_getParam('user_list'));\n \t\n \t$result = $this->getBusiness()->invite($roomId, $userDto, $invited, $nickname);\n \t$this->fromArray($result);\n }", "public function actionSendInvitation() {\n\n $dbusers = Yii::app()->db->createCommand()\n ->select('user_name,user_email,user_id')\n ->from(\"user\")\n ->where(\"source='outside'\")\n ->queryAll();\n\n $users = array_chunk($dbusers, 15, true);\n\n $this->render(\"send_invitation\", array(\"users\" => $users));\n }", "private function restoreInvitations(Collection $invitations )\n\t{\n\t\tforeach($invitations AS $invitation)\n\t\t{\n\t\t\t\n\n\t\t\t$this->dispatch( new ResendUserInvite( $invitation ) );\n\t\t}\n\t}", "public function getInvitationsByUserId($id) {\n\t\tglobal $db;\n\n\t\t$invitations = $db->query(\"SELECT * FROM invites WHERE PersonID = $id\");\n\t\treturn $invitations;\n\t}", "public function invite()\n\t{\n\t\t$req_id\t\t\t\t\t=\t$this->input->get_post_multi( 'reqId' );\n\t\t$ar_user\t\t\t\t=\t$this->input->get_post_multi( 'users' );\n\t\t$pessoa_id\t\t\t\t=\t$this->singlepack->get_pessoa_id();\n\t\t$ret\t\t\t\t\t=\tarray();\n\n\t\tif ( $req_id\n\t\t&& is_array( $ar_user )\n\t\t&& $pessoa_id\n\t\t )\n\t\t{\n\t\t\tforeach( $ar_user as $user_id )\n\t\t\t{\n\t\t\t\t$obj_convite\t\t\t\t=\tnew stdClass();\n\t\t\t\t$obj_convite->id\t\t\t=\tNULL;\n\t\t\t\t$obj_convite->data_hora\t\t\t=\t'CURRENT_TIMESTAMP';\n\t\t\t\t$obj_convite->pessoa_id\t\t\t=\t$pessoa_id;\n\t\t\t\t$obj_convite->facebook_id_convidado\t=\t$user_id;\n\t\t\t\t$obj_convite->facebook_id_apprequest\t=\t$req_id;\n\t\t\t\t$obj_convite->data_hora_retorno\t\t=\tNULL;\n\t\t\t\t\n\t\t\t\t$obj_convite->id\t\t\t=\t$this->pessoa_convite->update( $obj_convite );\n\t\t\t\t$ret[]\t\t\t\t\t=\t$obj_convite;\n\t\t\t}\n\t\t}\n\t\techo json_encode( $ret );\n\t}", "public function testInviteWithNewEmail() {\n $expect_map = array(\n 'out' => array(\n null,\n null,\n ),\n 'in' => array(\n 'PhabricatorAuthInviteVerifyException',\n 'PhabricatorAuthInviteRegisteredException',\n ),\n );\n\n $author = $this->generateUser();\n $logged_in = $this->generateUser();\n $logged_out = new PhabricatorUser();\n\n foreach (array('out', 'in') as $is_logged_in) {\n foreach (array(0, 1) as $should_verify) {\n $address = Filesystem::readRandomCharacters(16).'@example.com';\n\n $invite = id(new PhabricatorAuthInvite())\n ->setAuthorPHID($author->getPHID())\n ->setEmailAddress($address)\n ->save();\n\n switch ($is_logged_in) {\n case 'out':\n $viewer = $logged_out;\n break;\n case 'in':\n $viewer = $logged_in;\n break;\n }\n\n $engine = $this->generateEngine($viewer);\n $engine->setUserHasConfirmedVerify($should_verify);\n\n $caught = null;\n try {\n $result = $engine->processInviteCode($invite->getVerificationCode());\n } catch (Exception $ex) {\n $caught = $ex;\n }\n\n $expect = $expect_map[$is_logged_in];\n $expect = $expect[$should_verify];\n\n $this->assertEqual(\n ($expect !== null),\n ($caught instanceof Exception),\n pht(\n 'user=%s, should_verify=%s',\n $is_logged_in,\n $should_verify));\n\n if ($expect === null) {\n $this->assertEqual($invite->getPHID(), $result->getPHID());\n } else {\n $this->assertEqual(\n $expect,\n get_class($caught),\n pht('Actual exception: %s', $caught->getMessage()));\n }\n }\n }\n }", "public function invitationsRecus() {\n \n return DB::table('invitation')\n ->where('emetteur_id', $this->id)\n ->where('recepteur_id', Auth::User()->id)\n ->where('status', 0)\n ->exists();\n\n }", "public function invites()\n {\n return $this->hasMany('App\\Models\\Invite');\n }", "public function sentInvites()\n {\n return $this->hasMany('App\\Invite', 'sender_id');\n }", "static function getInvitations($data){\n $list=MedicalGroupInvitation::find_by_sql(\"SELECT gr.name, gr.image, gri.id, gri.medical_group_id, gri.user_id, gri.email, gri.status, gri.active, gri.created_by, gri.created_on, gri.secret FROM `medical_group_invitations` gri left join medical_groups gr on gri.medical_group_id=gr.id where gri.user_id=\".$data[\"user_id\"].\" and gri.status='\".$data[\"status\"].\"'\");\n $invitation_list=array();\n if(!empty($list)){\n foreach($list as $li){\n $invitation_list[]=array(\n \"id\"=>$li->id,\n \"name\"=>$li->name,\n \"image\"=>$li->image,\n \"status\"=>$li->status,\n \"secret\"=>$li->secret\n );\n }\n }\n return $invitation_list;\n }", "function invite_post(&$a) {\n\n\tif(! local_channel()) {\n\t\tnotice( t('Permission denied.') . EOL);\n\t\treturn;\n\t}\n\n\tcheck_form_security_token_redirectOnErr('/', 'send_invite');\n\n\t$max_invites = intval(get_config('system','max_invites'));\n\tif(! $max_invites)\n\t\t$max_invites = 50;\n\n\t$current_invites = intval(get_pconfig(local_channel(),'system','sent_invites'));\n\tif($current_invites > $max_invites) {\n\t\tnotice( t('Total invitation limit exceeded.') . EOL);\n\t\treturn;\n\t};\n\n\n\t$recips = ((x($_POST,'recipients')) ? explode(\"\\n\",$_POST['recipients']) : array());\n\t$message = ((x($_POST,'message')) ? notags(trim($_POST['message'])) : '');\n\n\t$total = 0;\n\n\tif(get_config('system','invitation_only')) {\n\t\t$invonly = true;\n\t\t$x = get_pconfig(local_channel(),'system','invites_remaining');\n\t\tif((! $x) && (! is_site_admin()))\n\t\t\treturn;\n\t}\n\n\tforeach($recips as $recip) {\n\n\t\t$recip = trim($recip);\n\t\tif(! $recip)\n\t\t\tcontinue;\n\n\t\tif(! valid_email($recip)) {\n\t\t\tnotice( sprintf( t('%s : Not a valid email address.'), $recip) . EOL);\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\tif($invonly && ($x || is_site_admin())) {\n\t\t\t$code = autoname(8) . srand(1000,9999);\n\t\t\t$nmessage = str_replace('$invite_code',$code,$message);\n\n\t\t\t$r = q(\"INSERT INTO `register` (`hash`,`created`) VALUES ('%s', '%s') \",\n\t\t\t\tdbesc($code),\n\t\t\t\tdbesc(datetime_convert())\n\t\t\t);\n\n\t\t\tif(! is_site_admin()) {\n\t\t\t\t$x --;\n\t\t\t\tif($x >= 0)\n\t\t\t\t\tset_pconfig(local_channel(),'system','invites_remaining',$x);\n\t\t\t\telse\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\t$nmessage = $message;\n\n\t\t$account = $a->get_account();\n\n\n\t\t$res = mail($recip, sprintf( t('Please join us on Red'), $a->config['sitename']), \n\t\t\t$nmessage, \n\t\t\t\"From: \" . $account['account_email'] . \"\\n\"\n\t\t\t. 'Content-type: text/plain; charset=UTF-8' . \"\\n\"\n\t\t\t. 'Content-transfer-encoding: 8bit' );\n\n\t\tif($res) {\n\t\t\t$total ++;\n\t\t\t$current_invites ++;\n\t\t\tset_pconfig(local_channel(),'system','sent_invites',$current_invites);\n\t\t\tif($current_invites > $max_invites) {\n\t\t\t\tnotice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tnotice( sprintf( t('%s : Message delivery failed.'), $recip) . EOL);\n\t\t}\n\n\t}\n\tnotice( sprintf( tt(\"%d message sent.\", \"%d messages sent.\", $total) , $total) . EOL);\n\treturn;\n}", "public function organizationInvitations()\n {\n return $this->hasMany(Jetstream::organizationInvitationModel());\n }", "private function inviteMembers(User $invitee, Invitable $invitable)\n {\n $this->logger->debug(\"Sending an invitation to all others members of the invitee [{invitee}] group\",\n array (\"invitee\" => $invitee));\n\n $allMembers = new ArrayCollection();\n /** @var Collection<Collection<User>> $groupsMembers */\n $groupsMembers = $invitee->getGroups()->map(function (Group $group) {\n return $group->getMembers();\n });\n\n /** @var Collection<User> $members */\n foreach ($groupsMembers as $members)\n {\n /** @var User $member */\n foreach ($members as $member)\n {\n if (($invitee->getId() != $member->getId()) && !$allMembers->contains($member))\n {\n $allMembers->add($member);\n }\n }\n }\n\n foreach ($allMembers as $member)\n {\n $entity = new Invitation(get_class($invitable), $invitable->getId(), $member, Invitation::SOURCE_INVITABLE);\n $this->em->persist($entity);\n\n $this->logger->debug(\"Invitation created [{invitation}] for the group member\",\n array (\"invitation\" => $entity));\n }\n }", "function oz_send_invitation (&$ozinviter, &$contacts, $personal_message=NULL)\r\n{\r\n\t$from_name = ozi_get_param('oz_from_name',NULL);\r\n\t$from_email = ozi_get_param('oz_from_email',NULL);\r\n\r\n\t//Build the message\r\n\tglobal $_OZINVITER_CALLBACKS;\r\n\t$func = $_OZINVITER_CALLBACKS['get_invite_message']\t;\r\n\t$msg = $func($from_name,$from_email,$personal_message);\r\n\t$subject = $msg['subject'];\r\n\t$text_body = $msg['text_body'];\r\n\t$html_body = $msg['html_body'];\r\n\tif (ozi_get_config('allow_personal_message',TRUE))\r\n\t{\r\n\t\t$text_body = str_replace('{PERSONALMESSAGE}',$personal_message==NULL?'':$personal_message,$text_body);\r\n\t\t$html_body = str_replace('{PERSONALMESSAGE}',$personal_message==NULL?'':htmlentities($personal_message,ENT_COMPAT,'UTF-8'),$html_body);\r\n\t}\r\n\r\n\t//If inviter isn't a social network, then it can only import and not send emails.\r\n\t$res = is_null($ozinviter) ? OZE_UNSUPPORTED_OPERATION : $ozinviter->send_messages($contacts,$subject,$text_body);\r\n\tif ($res===OZE_UNSUPPORTED_OPERATION)\r\n\t{\r\n\t\t$recplist = array();\r\n\r\n\t\t//----------------------------------------------------------------\t\r\n\t\t//Send invitation by email.\r\n\t\t$cl = array();\r\n\t\t$n = count($contacts);\r\n\t\tfor ($i=0; $i<$n; $i++) {\r\n\t\t\t$c = &$contacts[$i];\r\n\t\t\tif (!is_array($c)) $c2=array('type'=>'email','id'=>$c,'email'=>$c);\r\n\t\t\telse $c2 = $c;\r\n\t\t\t$email = $c2['email'];\r\n\t\t\t//$email = is_array($r) ? (isset($r['email']) ? $r['email'] : '') : $r;\r\n\t\t\tif (!empty($email) && abi_valid_email($email)) \r\n\t\t\t{\r\n\t\t\t\t$cl[]=$c2;\r\n\t\t\t\t$recplist[] = $email;\r\n\t\t\t}\r\n\t\t}\r\n\t\tglobal $_OZINVITER_CALLBACKS;\r\n\t\t$func = $_OZINVITER_CALLBACKS['send_emails'];\r\n\t\t$func($from_name,$from_email,$cl,$personal_message);\r\n\t\t//oz_send_emails($cl,$subject,$text_body,$html_body);\r\n\t\t//----------------------------------------------------------------\t\r\n\r\n\t\t//Store recipients list to be presented in output\t\t\r\n\t\t$_REQUEST['oz_recipients'] = $recplist;\r\n\t\t$res = OZE_SUCCESS;\r\n\t}\r\n\t//Other errors include OZE_CAPTCHA, etc\r\n\t\r\n\treturn $res;\r\n}", "function RealTimeInvites($last_invite,$uid=false){\r\n\r\n$invites=helpers::get_controller(INVITATION)->GetInvites($uid,$last_invite);\r\n\r\nif(!empty($invites)){\r\n\r\nforeach ($invites as $invite){\r\n\r\n$return[]=helpers::WidgetOutput(\"Singleinvite\",array(\"invite\"=>$invite));\r\n\r\n}\r\n\r\nreturn $return;\r\n\r\n}\r\n\r\nreturn array();\r\n\r\n}", "public function teamInvitations(): HasMany\n {\n return $this->hasMany(Hotstream::teamInvitationModel());\n }", "public function addEmails(int $id, array $emails): bool;", "private function _invited()\n {\n // Check we're not over-joined\n if (count($this->_currentChannels) < $this->_maxChannels)\n {\n $this->setChannels($this->_data->message);\n $this->_irc->join($this->_data->message);\n }\n else {\n $this->_privmessage(\n 'Sorry, I\\'m already in too many channels.', \n $this->_data->nick\n );\n }\n }", "public function invitesolo($eventID)\n {\n $u = $this->Auth->user();\n // Create new entity\n $n = $this->Events->newEntity();\n // Share to the view\n $this->set(compact('n'));\n // Request\n $req = $this->Events->find()\n ->where(['Events.id' => $eventID])\n ->contain(['Users', 'Guests', 'Guests.Users'])\n ->select(['Events.id', 'Events.title', 'Events.user_id', 'Users.login', 'Users.id']);\n // Get the first record\n $event = $req->first();\n\n // Check if current user is author's event\n if ($this->isCurrentAuthor($event->user_id)) {\n\n // Query to find all guests\n $req_guests = $this->Events->Guests->find()\n ->select(['user_id'])\n ->where(['event_id' => $eventID]);\n\n // Query to find all users\n $req_users = $this->Events->Users->find()\n ->where(['Users.id !=' => $u['id'], 'Users.id NOT IN' => $req_guests])\n ->select(['Users.id', 'Users.login'])\n ->toArray();\n\n // Create array of all users\n $users = [];\n foreach ($req_users as $user) {\n // For each results add to array ( id as value and login as wording\n $users[$user['id']] = $user['login'];\n }\n // Share to the view\n $this->set(compact('event', 'users', 'req_guests'));\n\n // Check if is from post method\n if ($this->request->is(['post'])) {\n\n // Get form data\n $n = $this->Events->patchEntity($n, $this->request->getData());\n $n->event_id = intval($eventID);\n $n->status = 'validated';\n\n // Disable self invitation\n if ($n->user_id === $u['id']) {\n $this->Flash->error('Vous participez déjà à cet événément');\n return $this->redirect(['action' => 'invite', $eventID]);\n }\n\n // Check if invitation already sent to user\n $existing = $this->Events->Guests->find()->where(['user_id' => $n->user_id, 'event_id' => $n->event_id]);\n $firstEl = $existing->first();\n\n if ($firstEl) {\n $this->Flash->error('Une invitation a déjà été envoyée à l\\'utilisateur');\n return $this->redirect(['action' => 'invite', $eventID]);\n }\n\n // Test saving record on database\n if ($result = $this->Events->Guests->save($n)) {\n $this->Flash->success('Votre invitation a été correctement envoyée');\n return $this->redirect(['action' => 'view', $eventID]);\n } else {\n // Error while trying to save\n $this->Flash->error('Une erreur est survenue. Veuillez réessayer.');\n }\n\n }\n } else {\n $this->Flash->error('Vous n\\'êtes pas autorisé à accéder à ce contenu.');\n return $this->redirect(['action' => 'view', $eventID]);\n }\n }", "function showInvites()\n{\n //we get all invites in a variable\n $pendingInvites = GroupDAO::getAllPendingInvites();\n \n //we initialize a counter\n $countUserInvite = 0;\n //we check every invite of the database\n foreach ($pendingInvites as $key => $value) {\n //if an invite is for our user, we show it to him\n if ($value['Id_User'] == $_SESSION['userID']) {\n //we increment our counter\n $countUserInvite++;\n echo \"<tr><td>Vous avez été invité à rejoindre le groupe \" . GroupDAO::getGroupById($value['Id_Group'])['Nm_Group'] . \" !</td><td><button class=\\\"btn btn-success\\\" type=\\\"submit\\\" value=\\\" \" . $value['Id_Group'] . \"\\\" name=\\\"accept\\\">✓</button></td><td><button class=\\\"btn btn-danger\\\" type=\\\"submit\\\" value=\\\" \" . $value['Id_Group'] . \"\\\" name=\\\"delete\\\">X</button></td></tr>\";\n }\n }\n //if our user have 0 invites, we show him a message telling him to comme back later to check if he got a new invite\n if ($countUserInvite == 0) {\n echo \"<tr><td>Aucune invitation pour le moment... </td></tr><tr><td>Revenez plus tard</td></tr>\";\n }\n}", "public function receivedInvites()\n {\n return $this->hasMany('App\\Invite', 'receiver_id');\n }", "public function getPendingInvitationsForUser(Request $request)\n {\n return $this->teams->getPendingInvitationsForUser($request->user());\n }", "public function getInvites(Request $request)\n {\n $meeting = Meeting::find($request->id);\n\n if ($meeting) {\n return json_encode(['success' => true, 'data' => $meeting->invites ? explode(',', $meeting->invites) : []]);\n }\n\n return json_encode(['success' => false]);\n }", "public static function getInvitationsByInvitor($id_invitor){\n\t\t\t$db = DatabaseFactory::getInstance();\n\t\t\t$sql = \"select invitation.id_invitee as id_invitee, invitation.id_invitation as id_invitation,job.job_title as job_title, job.job_location as job_location,\n\t\t\t\t\tjob.job_description as job_description, invitation.invite_time as invite_time, \n\t\t\t\t\tinvitation.invite_code as invite_code, invitation.applied as applied\n\t\t\t\t\tfrom user,job,invitation\n\t\t\t\t\twhere invitation.id_invitor = user.id_user\n\t\t\t\t\tand invitation.id_job = job.id_job\n\t\t\t\t\tand invitation.id_invitor=\".$id_invitor;\n\t\t\t$res = $db->send_sql($sql);\n\t\t\t$invitations = null;\n\t\t\tif(mysqli_num_rows($res)>0){\n\t\t\t\twhile($row = $db->next_row()){\n\t\t\t\t\t$row = Util::getRawArray($row);\n\t\t\t\t\t$invitation['id_invitation'] = $row['id_invitation'];\n\t\t\t\t\t$invitation['id_invitee'] = $row['id_invitee'];\n\t\t\t\t\t$invitation['job_title'] = $row['job_title'];\n\t\t\t\t\t$invitation['job_location'] = $row['job_location'];\n\t\t\t\t\t$invitation['job_description'] = $row['job_description'];\n\t\t\t\t\t$invitation['invite_time'] = $row['invite_time'];\n\t\t\t\t\t$invitation['invite_code'] = $row['invite_code'];\n\t\t\t\t\t$invitation['applied'] = $row['applied'];\n\t\t\t\t\t$invitations[] = $invitation;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(is_array($invitations)){\n\t\t\t\tforeach($invitations as $k=>$invitation){\n\t\t\t\t\t$invitee = User::getUser($invitation['id_invitee']);\n\t\t\t\t\tif($invitee == null)\n\t\t\t\t\t\t$invitations[$k]['fullname'] = \"\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$invitations[$k]['fullname'] = $invitee['fullname'];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $invitations;\n\t\t}", "public function sendInvite(Request $request)\n {\n $request->validate([\n 'email' => 'required',\n ]);\n\n $meeting = Meeting::find($request->id);\n $meeting->invites .= $meeting->invites ? ',' . $request->email : $request->email;\n\n if ($meeting->save()) {\n Mail::to($request->email)->send(new MeetingInvitation($meeting));\n return json_encode(['success' => true]);\n }\n\n return json_encode(['success' => false]);\n }", "public function addRecepientsToList(Request $request)\n\t{\n\t\t# code...\n\t\t$mgClient = new Mailgun(env('MAILGUN_SECRET'));\n\t\t$address = $request['address'];\n\t\t$member = $request['member'];\n//\t\t$member = substr($member, 1);\n\n\t\ttry {\n\t\t\t$mgClient->post(\"lists/$address/members\", array(\n\t\t\t\t'address' => $member,\n\t\t\t\t'suscribed' => true\n\t\t\t));\n\t\t\treturn ['status' => 'OK'];\n\t\t} catch (Exception $e) {\n\t\t\treturn ['status' => 'ERROR'];\n\t\t}\n\t}", "public function invite()\n {\n return $this->hasMany(Invite::class);\n }", "function ravis_notifier_add_email()\n\t{\n\t\tglobal $wpdb;\n\t\t$user_email = $_POST['email'];\n\t\t$result = array();\n\n\t\t// filter the variable\n\t\tif (filter_var($user_email, FILTER_VALIDATE_EMAIL))\n\t\t{\n\t\t\t$table_name = $wpdb->prefix .'ravis_notifier';\n\t\t\t$check_query = $wpdb->get_results(\n\t\t\t\t\t\t\t\t$wpdb->prepare(\"\n\t\t\t\t\t\t\t\t\tSELECT id FROM $table_name\n\t\t\t\t\t\t\t\t\tWHERE email = %s\n\t\t\t\t\t\t\t\t\t\",\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t$user_email\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\tif($check_query)\n\t\t\t{\n\t\t\t\t$result['message'] = esc_html__( \"You have already subscribed.\", 'pinar');\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$wpdb->insert( \n\t\t\t\t\t$table_name, \n\t\t\t\t\tarray( \n\t\t\t\t\t\t'email' => $user_email,\n\t\t\t\t\t),\n\t\t\t\t\tarray('%s')\n\t\t\t\t);\n\t\t\t\tif($wpdb->insert_id)\n\t\t\t\t{\n\t\t\t\t\t$result['message'] = esc_html__( \"Thanks for your subscription.\", 'pinar');\t\t\t\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Create the emails csv file\n\t\t\t\t\t */\n\t\t\t\t\t$email_list = $wpdb->get_results(\"SELECT email FROM $table_name\");\n\t\t\t\t\tforeach ($email_list as $emails_item) {\n\t\t\t\t\t\t$new_email_list[] = $emails_item->email;\n\t\t\t\t\t}\n\t\t\t\t\t$fp = fopen(PINAR_THEMEROOT.'/notifier_emails.csv', 'w');\n\t\t\t\t fputcsv($fp, $new_email_list);\n\t\t\t\t\tfclose($fp);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$result['message'] = esc_html__( \"Email was not added!\", 'pinar');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result['message'] = esc_html__( \"Please add a valid email format\", 'pinar');\n\t\t}\n\t\techo json_encode($result);\n\t\tdie();\n\t}", "public function invite(){\n $this->validate(request(),[\n 'task_id' => 'required',\n 'user_id'=> 'required'\n ]);\n $task=Task::find(request('task_id'));\n\n $user=User::find(request('user_id'));\n if (\\Gate::denies('taskOwner', $task)) {\n return response()->json(\"Task doesn't Belong To you\");\n }\n \\Mail::to($user)->send(new TaskInvitation($user,$task));\n return response()->json(\"Invitation Mail Sent Successfully\");\n }", "public function invite(Request $request)\n {\n \n $excelData = array();\n $data = $request->all();\n $this->validate($request, [\n // 'location' => \"required\",\n 'emailName.*.email' => 'email|required_without:import_file',\n 'emailName.*.name' => 'required_without:import_file',\n ],[\n 'required_without' => 'Please enter a validate email and Name for the invite new participants',\n ]);\n //Uploading excel if exist\n try{\n if(Input::hasFile('import_file')){\n $path = Input::file('import_file')->getRealPath();\n $Uploaded_file = Excel::load($path, function($reader) {\n })->get();\n if(!empty($Uploaded_file) && $Uploaded_file->count()){\n foreach ($Uploaded_file as $key => $value) {\n if ($value->name != null && $value->email != null) {\n $excelData[] = ['name' => $value->name, 'email' => $value->email];\n }\n }\n }\n }\n }\n catch(Exception $e){\n $error = $e->getMessage();\n $status = \"error\";\n $msg = \"Oops something went wrong\";\n }\n \n\n //$excelData has all the records for users uploaded from excel file\n //dd($excelData);\n \n \n $uniq = unique_multidim_array(array_merge($data['emailName'],$excelData),'email');\n\n //Shakeel code to manage employee\n\n $isEmail = \\Session('isEmployee');\n\n $userEmail = \\Auth::user()->email;\n\n if($isEmail==1) {\n $user_id = getAppOwnerId($userEmail,$request->template_id);\n $employee_id = \\Auth::user()->id;\n\n }\n else {\n $user_id = \\Auth::user()->id;\n $employee_id = 0;\n }\n\n if (isset($uniq) && $uniq != null) {\n foreach ($uniq as $IS){\n \n $spectator = new Spectators();\n $spectatorForm = new SpectatorForm();\n \n //$IS is Invited Spectators\n if ($IS['email'] != \"\" && $IS['name'] != \"\" ) {\n \n $spectators = Spectators::select('id')->where('email',$IS['email'])\n ->where('template_id',$request->get('template_id'))\n ->first();\n \n if(is_null($spectators)) {\n \n $spectator->email = $IS['email'];\n $spectator->name = $IS['name'];\n $spectator->template_id = $request->get('template_id');\n $spectator->invitee_id = $user_id;\n $spectator->invited_master_template = $request->get('invited_master_template');\n $spectator->status = 0;\n $spectator->employee_id = $employee_id;\n\n $spectator->save();\n $forms = $request->get('form_id');\n \n $dataArr = [];\n \n for ($i=0;$i<count($forms);$i++)\n {\n $dataArr[$i]['form_id']= $forms[$i];\n $dataArr[$i]['spectator_id'] = $spectator->id;\n }\n $spectatorForm->insert($dataArr);\n \n }else {\n \n \n $Module = Spectators::findOrFail($spectators->id);\n\n $Module->email = $IS['email'];\n $Module->name = $IS['name'];\n $Module->template_id = $request->get('template_id');\n $Module->invitee_id = $user_id;\n $Module->invited_master_template = $request->get('invited_master_template');\n $spectator->employee_id = $employee_id;\n\n $Module->update();\n\n $forms = $request->get('form_id');\n\n SpectatorForm::where('spectator_id', '=', $spectators->id)->delete();\n $dataArr=[];\n for ($i=0;$i<count($forms);$i++)\n {\n $dataArr[$i]['form_id']= $forms[$i];\n $dataArr[$i]['spectator_id'] = $spectators->id;\n }\n if($dataArr)\n SpectatorForm::insert($dataArr);\n }\n }\n }\n \n \n }\n \n return redirect()->action('UserController@index');\n//\n// if ($request->get('email')) {\n// $sendmail = $this->createAndSendMail($forms,$request,$request->get('email'),$request->get('name'));\n// }\n//\n// if ($sendmail) {\n// \\Session::flash('message', 'Invite has been send to User successfully');\n// return redirect()->action('UserController@index');\n// }\n\n \n }", "public function receivedInvitations(){\n return $this->hasMany('App\\CollaboratorRequest','inviteTo');\n }", "public function run()\n {\n $invitations = Invitation::all();\n $users = User::all()->shuffle();\n \n $invitations->each(function ($invitation) use($users) {\n // 募集の作成者を最初の参加者にする\n $invitation->participants()->attach($invitation->user_id);\n\n $n = rand(0, $invitation->capacity - 1);\n \n for ($i = 0; $i < $n; $i++) {\n $user = $users->get($i);\n if ($user->id === $invitation->user_id) {\n continue;\n }\n $invitation->participants()->attach($user);\n }\n });\n }", "public function payForInvitedUsers(){\n \n $userService = parent::getService('user','user');\n \n $refererUsers = $userService->getUsersWithRefererNotPaid();\n foreach($refererUsers as $user):\n // if created at least 30 days ago\n if(strtotime($user['created_at'])>strtotime('-30 days')){\n continue;\n }\n // if logged within last 5 days ago\n if(!(strtotime($user['last_active'])>strtotime('-7 days'))){\n $user->referer_not_active = 1;\n $user->save();\n continue;\n }\n \n $values = array();\n $values['description'] = 'Referencing FastRally to user '.$user['username'];\n $values['income'] = 1;\n \n \n if($user['gold_member_expire']!=null){\n $amount = 100;\n }\n else{\n $amount = 10;\n }\n \n \n $userService->addPremium($user['referer'],$amount,$values);\n $user->referer_paid = 1;\n $user->save();\n endforeach;\n echo \"done\";exit;\n }", "public function inviteAction() {\n\n if( !$this->_helper->requireUser()->isValid() ) return;\n\n //GET PAGE ID.\n $page_id = $this->_getParam('page_id');\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n \n $automaticallyJoin = Engine_Api::_()->getApi('settings', 'core')->getSetting( 'pagemember.automatically.addmember', 1);\n \n //PREPARE DATA\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->friends = $friends = $viewer->membership()->getMembers();\n\n $hasMembers_viewer = Engine_Api::_()->getDbTable('membership', 'sitepage')->hasMembers($viewer->getIdentity(), $sitepage->getIdentity());\n\n //PREPARE FORM\n $this->view->form = $form = new Sitepagemember_Form_Invite();\n\n $count = 0;\n foreach( $friends as $friend ) {\n \n\t\t\t$friend_id = $friend->getIdentity();\n\n\t\t\t$hasMembers = Engine_Api::_()->getDbTable('membership', 'sitepage')->hasMembers($friend_id, $page_id);\n\n\t\t\tif(!empty($hasMembers)) {\n\t\t\t\tcontinue;\n\t\t }\n //if( $sitepage->membership()->isMember($friend, null) ) continue;\n $form->users->addMultiOption($friend_id, $friend->getTitle());\n $count++;\n }\n\n $this->view->count = $count;\n\n // throw notice if count = 0\n if( $count == 0 ) {\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('You have currently no friends to invite.')),\n 'layout' => 'default-simple',\n 'parentRefresh' => true,\n ));\n }\n\n //NOT POSTING\n if( !$this->getRequest()->isPost() ) {\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n return;\n }\n\n $usersIds = $form->getValue('users');\n\t\tforeach( $friends as $friend ) {\n\t\t\n\t\t\tif( !in_array($friend->getIdentity(), $usersIds) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//GET VALUE FROM THE FORM.\n\t\t\t$values = $this->getRequest()->getPost();\n\t\t\t$membersTable = Engine_Api::_()->getDbtable('membership', 'sitepage');\n\t\t\t$row = $membersTable->createRow();\n\t\t\t$row->resource_id = $page_id;\n\t\t\t$row->page_id = $page_id;\n\t\t\t$row->user_id = $friend->getIdentity();\n\t\t\t$row->resource_approved = 1;\n\t\t\t\n\t\t\tif (!empty($automaticallyJoin) && !empty($sitepage->member_approval)) {\n\t\t\t\t$row->active = 1;\n\t\t\t\t$row->user_approved = 1;\n\n\t\t\t\t//MEMBER COUNT INCREASE WHEN MEMBER JOIN THE PAGE.\n\t\t\t\t$sitepage->member_count++;\n\t\t\t\t$sitepage->save();\n\t\t\t} else {\n\t\t\t\t$row->active = 0;\n\t\t\t\tif(!empty($automaticallyJoin) && empty($sitepage->member_approval)) {\n\t\t\t\t\t$row->resource_approved = 0;\n\t\t\t\t}\n\t\t\t\t$row->user_approved = 0;\n\t\t\t}\n\t\t\t\n\t\t\t$row->save();\n\t\t\t\n if (empty($automaticallyJoin)) {\n\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($friend, $viewer, $sitepage, 'sitepagemember_invite');\n\t\t\t} elseif (!empty($automaticallyJoin) && empty($sitepage->member_approval)) {\n\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($friend, $viewer, $sitepage, 'sitepagemember_invite');\n\t\t\t}\n\t\t}\n if (!empty($automaticallyJoin) && !empty($sitepage->member_approval)) {\n\t\t\t$messages = Zend_Registry::get('Zend_Translate')->_('Members have been successfully added.');\n } else {\n\t\t\t$messages = Zend_Registry::get('Zend_Translate')->_('Members have been successfully invited.');\n }\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_($messages)),\n 'layout' => 'default-simple',\n 'parentRefresh' => true,\n ));\n }", "public function index()\n\t{\n\n\t\t// Retrieve the filter values\n\t\t$inputResults = Input::get('results', 10);\n\t\t$inputStatus = Input::get('status', 'all');\n\t\t$inputInviter = Input::get('inviter', 0);\n\n\t\t// Retrieve count values of invites\n\t\t$openInviteCount = Invite::whereNull('invited_id')->count();\n\t\t$closedInviteCount = Invite::whereNotNull('invited_id')->count();\n\t\t$totalInviteCount = $openInviteCount + $closedInviteCount;\n\n\t\t// Create invite query\n\t\t$invites = null;\n\n\t\t/* Handle filter selections */\n\n\t\tif ($inputStatus === 'all' && $inputInviter == 0) {\n\n\t\t\t$invites = Invite::paginate($inputResults);\n\n\t\t} else {\n\n\t\t\tif ($inputStatus != 'all') {\n\t\t\t\tif ($inputStatus == 'open')\n\t\t\t\t\t$invites = Invite::whereNull('invited_id');\n\t\t\t\telse\n\t\t\t\t\t$invites = Invite::whereNotNull('invited_id');\n\t\t\t}\n\n\t\t\tif ($inputInviter != 0) {\n\t\t\t\tif ($inputStatus != 'all')\n\t\t\t\t\t$invites = $invites->Where('inviter_id', $inputInviter);\n\t\t\t\telse\n\t\t\t\t\t$invites = Invite::where('inviter_id', $inputInviter);\n\t\t\t}\n\n\t\t\t$invites = $invites->paginate($inputResults);\n\n\t\t}\n\n\n\t\t// Retrieve a list of all users\n\t\t$users = User::all();\n\n\t\t// Flash old input\n\t\tInput::flashOnly('status', 'inviter', 'results');\n\n\t\t$this->layout->content = View::make('admin.invite.index')\n\t\t\t\t\t\t\t\t\t->with('invites', $invites)\n\t\t\t\t\t\t\t\t\t->with('openInviteCount', $openInviteCount)\n\t\t\t\t\t\t\t\t\t->with('closedInviteCount', $closedInviteCount)\n\t\t\t\t\t\t\t\t\t->with('totalInviteCount', $totalInviteCount)\n\t\t\t\t\t\t\t\t\t->with('users', $users);\n\n\t}", "public function test_user_cant_accept_not_their_invites()\n {\n $user = factory(User::class, 1)->create()->first();\n factory(Box::class, 3)->create();\n\n Invite::create([\n 'email' => $user->email,\n 'box_id' => 1, //Box doesn't matter\n 'role' => 'coach',\n 'token' => 'fake_token'\n ]);\n\n Invite::create([\n 'email' => $user->email,\n 'box_id' => 2,\n 'role' => 'owner',\n 'token' => 'fake_token'\n ]);\n\n Invite::create([\n 'email' => $user->email,\n 'box_id' => 3,\n 'role' => 'admin',\n 'token' => 'fake_token'\n ]);\n\n $invite = Invite::create([\n 'email' => \"[email protected]\",\n 'box_id' => 3,\n 'role' => 'admin',\n 'token' => 'fake_token'\n ]);\n\n $this->actingAs($user);\n\n $response = $this->post(route('frontend.invites.accept', $invite));\n\n $response->assertStatus(302);\n\n $invites = $user->invites();\n\n $this->assertEquals(3, $invites->count());\n\n }", "public function sentInvitations(){\n return $this->hasMany('App\\CollaboratorRequest','inviteFrom');\n }", "function &getInvitedUsers()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT user_fi FROM svy_inv_usr WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($result_array, $row[\"user_fi\"]);\n\t\t}\n\t\treturn $result_array;\n\t}", "public function external_invite($args) {\n \n $session = Session::getInstance();\n $inviter = new OpenInviter();\n $oi_services = $inviter -> getPlugins();\n if (isset($args['provider_box'])) {\n if (isset($oi_services['email'][$args['provider_box']]))\n $plugType = 'email';\n elseif (isset($oi_services['social'][$args['provider_box']]))\n $plugType = 'social';\n else\n $plugType = '';\n } else\n $plugType = '';\n if (!empty($args['step']))\n $step = $args['step'];\n else\n $step = 'get_contacts';\n $ers = array();\n $oks = array();\n $import_ok = false;\n $done = false;\n if ($step == 'get_contacts') {\n if (empty($args['email_box']))\n $ers['email'] = \"Email missing !\";\n if (empty($args['password_box']))\n $ers['password'] = \"Password missing !\";\n if (empty($args['provider_box']))\n $ers['provider'] = \"Provider missing !\";\n if (count($ers) == 0) {\n $inviter -> startPlugin($args['provider_box']);\n $internal = $inviter -> getInternalError();\n if ($internal)\n $ers['inviter'] = $internal;\n elseif (!$inviter -> login($args['email_box'], $args['password_box'])) {\n $internal = $inviter -> getInternalError();\n $ers['login'] = ($internal ? $internal : \"Login failed. Please check the email and password you have provided and try again later !\");\n } elseif (false === $contacts = $inviter -> getMyContacts())\n $ers['contacts'] = \"Unable to get contacts !\";\n else {\n $import_ok = true;\n $args['contacts'] = $contacts;\n $step = 'send_invites';\n $args['oi_session_id'] = $inviter -> plugin -> getSessionID();\n $args['message_box'] = '';\n }\n }\n } elseif ($step == 'send_mails') {\n $users = array();\n $user_mail = $args['user_mail'];\n if (is_array($user_mail) && count($user_mail)) {\n for ($i = 0; $i < count($user_mail); $i++) {\n list($email, $name) = explode(\"||\", $user_mail[$i]);\n $users[] = array('email' => $email, 'name' => $name);\n }\n global $request_handler;\n global $user_service_url;\n $uri = $user_service_url;\n $session = Session::getInstance();\n $uid = $session -> getVar('fb_uid');\n $uName = $session -> getVar('User_name');\n $params = array(\"__userId\" => $uid, '__userUrl' => WWW_SITE_URL . 'early/home/' . $uid, '__userName' => $uName, 'invites' => json_encode($users), \"method\" => \"send_import_invites\", 'replication' => 'master');\n $request = new HTTPRequestHandler;\n $resp = $request -> makeRequest($uri, 'POST', $params);\n $args['mail_sent'] = \"sent\";\n if (isset($resp['mail'])) {\n $args['mail_sent'] = \"sent\";\n }\n }\n } elseif ($step == 'send_by_comma_separated_mails') {\n $emails = explode(',', preg_replace(\"/[\\s]/\", \"\", $args['user_email']));\n $valid_mail = true;\n foreach ($emails as $email) {\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $valid_mail = false;\n }\n }\n if (!$valid_mail) {\n $ers['invalid_mails_address'] = \"There are invalid email addresse(s)\";\n } else {\n\n $users = array();\n $user_mail = $args['user_mail'];\n if (is_array($emails) && count($emails)) {\n for ($i = 0; $i < count($emails); $i++) {\n list($email, $name) = array($emails[$i], \"\");\n $users[] = array('email' => $email, 'name' => $name);\n }\n global $request_handler;\n global $user_service_url;\n $uri = $user_service_url;\n $session = Session::getInstance();\n $uid = $session -> getVar('fb_uid');\n $uName = $session -> getVar('User_name');\n $params = array(\"__userId\" => $uid, '__userUrl' => WWW_SITE_URL . 'early/home/' . $uid, '__userName' => $uName, 'invites' => json_encode($users), \"method\" => \"send_import_invites\", 'replication' => 'master');\n $request = new HTTPRequestHandler;\n $resp = $request -> makeRequest($uri, 'POST', $params);\n if (isset($resp['mail'])) {\n $args['mail_sent'] = \"sent\";\n }\n }\n }\n }\n if (!count($ers) == 0) {\n $args['invites_errors'] = $ers;\n }\n $args['oi_services'] = $oi_services;\n return $args;\n }", "public function actionAddInvite($id=NULL, $from='invites')\n\t{\n\t\t\t\n\t\tif(!$this->isLogin()){\n\t\t\t$this->redirect('index');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$items = array();\n\t\t$userObj = new Users();\n\t\t$items = $userObj->getAllUsers();\n\t\t$todoListsObj\t=\tnew TodoLists();\n\t\t$myLists\t=\t$todoListsObj->getAllMyList(Yii::app()->session['loginId']);\n\t\tunset($myLists['pendingItems']);\n\t\t$items['from']\t=\t$from;\n\t\t$this->renderPartial('addTodoInvite', array('data'=>$items,'myList'=>$myLists,'listId'=>$id));\n\t}", "public function inviteuserforevent(Request $request)\n\t{\n\t\tif ($request->isMethod('post')) \n\t\t{\n $data = $request->all();\n\t\t\t\n\t\t\t$user_id = $data['friend_id'];\n\t\t\t$event_id = $data['event_id'];\n\t\t\t$login_user = Auth::guard('user')->user(); // login user\n\t\t\t\n\t\t\t$user = User::where('id', $user_id)->first(); // user who invite\n\t\t\t$events = events::where('id', $event_id)->first(); // event data\n\t\t\t\n\t\t\t$invite_friend_data = invite_users::where('friend_id', $user_id)\n ->where('event_id', $event_id)->get()->first();\n\t\t\tif(count($invite_friend_data)==0)\n\t\t\t{\n\t\t\t\t$insert_data['user_id'] = $login_user->id;\n\t\t\t\t$insert_data['event_id'] = $event_id;\n\t\t\t\t$insert_data['friend_id'] = $user_id;\n\t\t\t\t$insert_data['transaction_id'] = \"\";\n\t\t\t\t$insert_data['created_at'] = date('Y-m-d h:m:s');\n\t\t\t\tinvite_users::insert($insert_data);\n\t\t\t\n\t\t\t\t$notification['user_id'] = $user_id;\n\t\t\t\t$notification['another_user'] = $login_user->id;\n\t\t\t\t$notification['notification'] = '<strong>'.$login_user->name.'</strong> invited you to his <strong>'.$events->title.'</strong> Gathering';//'invited you to his';\n\t\t\t\t$notification['event_id'] = $event_id;\n\t\t\t\t$notification['notification_type'] = 'invite';\n\t\t\t\t$notification['is_seen'] = 0;\n\t\t\t\t$notification['created_at'] = date('Y-m-d h:m:s');\n\t\t\t\tnotifications::insert($notification);\n\t\t\t}\n\t\t\t\n\t\t\tMail::send('emails.send_payment_link_for _event', ['login_user' => $login_user, 'invite_user' => $user, 'event' => $events], function ($message) use($user) {\n\t\t\t\t$message->to($user->email, 'giveadinnerparty.com')->subject('Invitation for a dinner party');\n\t\t\t});\n\t\t}\t\n }", "public static function getInvitationsByInvitee($id_invitee){\n\t\t\t$db = DatabaseFactory::getInstance();\n\t\t\t$sql = \"select invitation.id_invitation as id_invitation,job.id_job as id_job,job.job_title as job_title,company.company_name,job.job_location as job_location,\n\t\t\t\t\tjob.job_description as job_description,invitation.invite_time as invite_time,invitation.invite_code as invite_code,invitation.applied as applied\n\t\t\t\t\tfrom job,company,user_company,invitation,user\n\t\t\t\t\twhere invitation.id_invitor = user.id_user\n\t\t\t\t\tand user.id_user = user_company.id_user\n\t\t\t\t\tand user_company.id_company = company.id_company\n\t\t\t\t\tand invitation.id_job = job.id_job\n\t\t\t\t\tand invitation.id_invitee =\".$id_invitee;\n\t\t\t$res = $db->send_sql($sql);\n\t\t\t$invitations = null;\n\t\t\tif(mysqli_num_rows($res)>0){\n\t\t\t\twhile($row = $db->next_row()){\n\t\t\t\t\t$row = Util::getRawArray($row);\n\t\t\t\t\t$invitation['id_invitation'] = $row['id_invitation'];\n\t\t\t\t\t$invitation['id_job'] = $row['id_job'];\n\t\t\t\t\t$invitation['job_title'] = $row['job_title'];\n\t\t\t\t\t$invitation['company_name'] = $row['company_name'];\n\t\t\t\t\t$invitation['job_location'] = $row['job_location'];\n\t\t\t\t\t$invitation['job_description'] = $row['job_description'];\n\t\t\t\t\t$invitation['invite_time'] = $row['invite_time'];\n\t\t\t\t\t$invitation['invite_code'] = $row['invite_code'];\n\t\t\t\t\t$invitation['applied'] = $row['applied'];\n\t\t\t\t\t$invitations[] = $invitation;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $invitations;\n\t\t}", "public function acceptInvitation()\n\t{\n\t\t$id = $this->request->data['id'];\n\t\t$room_name = $this->request->data['roomName'];\n\t\t$invite['MeetingUser']['id'] = $id;\n\t\t//set status 1 as accepted\n\t\t$invite['MeetingUser']['is_accept'] = 1;\n\t\t$invite['MeetingUser']['is_read'] = 1;\n\t\t$invite['MeetingUser']['is_attend'] = 0;\n\t\t//set notification\n\t\t$oldCount1 = $this->Session->read('oldMeetingCount');\n\t\tif ($oldCount1>0) {\n\t\t\t$newCount1 = $oldCount1-1;\n\t\t\t$this->Session->write('oldMeetingCount',$newCount1);\n\t\t}\n\t\tif($this->MeetingUser->save($invite))\n\t\t\techo \"1\";\n\t\telse\n\t\t\techo \"0\";\n\t\texit;\n\t}", "public function accept_all()\n {\n $ids = $_POST['ids'];\n foreach ($ids as $id) {\n $accepted = EventMobile::find($id);\n $accepted->update(['event_status_id' => 2]);\n $accepted->save();\n //Notify Each event owner\n $event_owner = $accepted->user;\n if ($event_owner) {\n $notification_message['en'] = 'YOUR EVENT IS APPROVED';\n $notification_message['ar'] = 'تم الموافقة على الحدث';\n $notification = $this->NotifcationService->save_notification($notification_message, 3, 4, $accepted->id, $event_owner->id);\n $this->NotifcationService->PushToSingleUser($event_owner, $notification);\n }\n //get users have this event in their interests\n $this->NotifcationService->EventInterestsPush($accepted);\n }\n\n }", "public function test_user_can_accept_their_invites()\n {\n $user = factory(User::class, 1)->create()->first();\n factory(Box::class, 3)->create();\n\n $invite = Invite::create([\n 'email' => $user->email,\n 'box_id' => 1, //Box doesn't matter\n 'role' => 'coach',\n 'token' => 'fake_token'\n ]);\n\n Invite::create([\n 'email' => $user->email,\n 'box_id' => 2,\n 'role' => 'owner',\n 'token' => 'fake_token'\n ]);\n\n Invite::create([\n 'email' => $user->email,\n 'box_id' => 3,\n 'role' => 'admin',\n 'token' => 'fake_token'\n ]);\n\n $this->actingAs($user);\n\n $response = $this->post(route('frontend.invites.accept', $invite));\n\n $response->assertStatus(200);\n\n $invites = $user->invites();\n\n $this->assertEquals(2, $invites->count());\n\n }", "public function testDuplicateInvite() {\n $author = $this->generateUser();\n $viewer = $this->generateUser();\n $address = Filesystem::readRandomCharacters(16).'@example.com';\n\n $invite = id(new PhabricatorAuthInvite())\n ->setAuthorPHID($author->getPHID())\n ->setEmailAddress($address)\n ->save();\n\n $engine = $this->generateEngine($viewer);\n $engine->setUserHasConfirmedVerify(true);\n\n $caught = null;\n try {\n $result = $engine->processInviteCode($invite->getVerificationCode());\n } catch (Exception $ex) {\n $caught = $ex;\n }\n\n // This first time should accept the invite and verify the address.\n $this->assertTrue(\n ($caught instanceof PhabricatorAuthInviteRegisteredException));\n\n try {\n $result = $engine->processInviteCode($invite->getVerificationCode());\n } catch (Exception $ex) {\n $caught = $ex;\n }\n\n // The second time through, the invite should not be acceptable.\n $this->assertTrue(\n ($caught instanceof PhabricatorAuthInviteInvalidException));\n }", "public function store()\n\t{\n\t\t\n\t\t// Validation rules\n\t\t$rules = array(\n\t\t\t\t'amount' => 'required|numeric|min:1',\n\t\t\t\t'inviter' => 'required|exists:users,id',\n\t\t\t);\n\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\tSession::flash('actionFlash.status', 'error');\n\t\t\tSession::flash('actionFlash.message', Lang::get(\"admin/invite/messages.store.validator\"));\n\t\t\treturn Redirect::back();\n\t\t\t\n\t\t}\n\n\t\ttry {\n\n\t\t\t$user = Sentry::getUserProvider()->findById(Input::get('inviter'));\n\t\t\t$amount = Input::get('amount');\n\t\t\t$successCount = 0;\n\n\t\t\tfor ($i = 0; $i < $amount; $i++) {\n\t\t\t\t$invite = new Invite;\n\t\t\t\t\n\t\t\t\t$invite->inviter_id = $user->id;\n\t\t\t\t$invite->code = Invite::getRandomString();\n\n\t\t\t\tif ($invite->save()) $successCount++;\n\t\t\t}\n\n\t\t\t$status = ($successCount == $amount) ? 'success' : 'error';\n\n\t\t\tSession::flash('actionFlash.status', $status);\n\t\t\tSession::flash('actionFlash.message', Lang::get(\"admin/invite/messages.store.{$status}\", array('amount' => $successCount, 'userName' => $user->name)));\n\t\t\treturn Redirect::action('AdminInviteController@index');\n\n\t\t} catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n\n\t\t\tApp::abort(404, 'User not found');\n\n\t\t}\n\n\t}", "function invite_members($user_array, $group, $owner = NULL) {\n global $eh;\n $total = count($user_array);\n for ($i = 0; $i < $total; $i++) {\n $this->invite_member($user_array[$i], $group, $owner);\n }\n $eh->flush();\n e(lang(\"invitations_sent\"), \"m\");\n }", "public function addEmail($email)\r\n {\r\n \r\n $new = true;\r\n foreach($this->exchangeEmail as $var)\r\n {\r\n if (strtoupper($var) == strtoupper($email))\r\n {\r\n $new = false;\r\n }\r\n }\r\n if ($new)\r\n $this->exchangeEmail[] = $email;\r\n \r\n }", "public function setHasInvited($hasInvited)\n {\n $this->hasInvited = $hasInvited;\n }", "function ravis_newsletter_add_email()\n{\n\tglobal $wpdb;\n\t$user_email = $_POST['email'];\n\t$result = array();\n\n\t// filter the variable\n\tif (filter_var($user_email, FILTER_VALIDATE_EMAIL))\n\t{\n\t\t$table_name = $wpdb->prefix .'ravis_newsletter';\n\t\t$check_query = $wpdb->get_results(\n\t\t\t\t\t\t\t$wpdb->prepare(\"\n\t\t\t\t\t\t\t\tSELECT id FROM $table_name\n\t\t\t\t\t\t\t\tWHERE email = %s\n\t\t\t\t\t\t\t\t\",\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t$user_email\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\tif($check_query)\n\t\t{\n\t\t\t$result['message'] = esc_html__( \"You have already subscribed.\", 'pinar');\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$wpdb->insert( \n\t\t\t\t$table_name, \n\t\t\t\tarray( \n\t\t\t\t\t'email' => $user_email,\n\t\t\t\t),\n\t\t\t\tarray('%s')\n\t\t\t);\n\t\t\tif($wpdb->insert_id)\n\t\t\t{\n\t\t\t\t$result['message'] = esc_html__( \"Thanks for your subscription.\", 'pinar');\t\t\t\n\n\t\t\t\t/**\n\t\t\t\t * Create the emails csv file\n\t\t\t\t */\n\t\t\t\t$email_list = $wpdb->get_results(\"SELECT email FROM $table_name\");\n\t\t\t\tforeach ($email_list as $emails_item) {\n\t\t\t\t\t$new_email_list[] = $emails_item->email;\n\t\t\t\t}\n\t\t\t\t$fp = fopen(PINAR_THEMEROOT.'/newsletter_emails.csv', 'w');\n\t\t\t fputcsv($fp, $new_email_list);\n\t\t\t\tfclose($fp);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$result['message'] = esc_html__( \"Email was not added!\", 'pinar');\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$result['message'] = esc_html__( \"Please add a valid email format\", 'pinar');\n\t}\n\techo json_encode($result);\n\tdie();\n}", "function add_inv_to_existing_manifesto()\r\n\t{\r\n\t\t$user=$this->auth(KFILE_ROLE);\r\n\t\t$user_det=$this->session->userdata(\"admin_user\");\r\n\t\t\r\n\t\t//get the data throught a post\r\n\t\t$manifesto_id=0;\r\n\t\t$manifesto_id=$this->input->post(\"manifesto_list\");\r\n\t\t$invoices_no=$this->input->post(\"invoice_nos\");\r\n\t\t\r\n\t\t$manifesto_details=$this->db->query(\"select * from pnh_m_manifesto_sent_log where id=?\",$manifesto_id)->row_array();\r\n\t\t\r\n\t\t$main_manifesto_det=$this->db->query(\"select invoice_nos from pnh_manifesto_log where id=?\",$manifesto_details['manifesto_id'])->row_array();\r\n\t\t\r\n\t\tif($main_manifesto_det)\r\n\t\t{\r\n\t\t\t$ins_data=array();\r\n\t\t\t$ins_data['invoice_nos']=$main_manifesto_det['invoice_nos'].','.implode(',',$invoices_no);\t\r\n\t\t\t$ins_data['modified_on'] = date('Y-m-d H:i:s');\r\n\t\t\t$ins_data['modified_by'] = $user['userid'];\r\n\t\t\t$this->db->where('id',$manifesto_details['manifesto_id']);\r\n\t\t\t$this->db->update(\"pnh_manifesto_log\",$ins_data);\r\n\t\t\t\r\n\t\t\tforeach($invoices_no as $inv)\r\n\t\t\t{\r\n\t\t\t\t$trans_logprm=array();\r\n\t\t\t\t$trans_logprm['transid']=$this->db->query(\"select transid from king_invoice where invoice_no=? limit 1\",$inv)->row()->transid;\r\n\t\t\t\t$trans_logprm['admin']=$user['userid'];\r\n\t\t\t\t$trans_logprm['time']=time();\r\n\t\t\t\t$trans_logprm['msg']='Manifesto created for this invoice ('.$inv.')';\r\n\t\t\t\t$this->db->insert(\"transactions_changelog\",$trans_logprm);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//link the manifesto id and invoice number to shipment_batch_process_invoice link table\r\n\t\t$invoices=implode(',',$invoices_no);\r\n\t\t$this->db->query(\"update shipment_batch_process_invoice_link set inv_manifesto_id=? where invoice_no in ($invoices) \",array($manifesto_details['manifesto_id']));\r\n\t\t\r\n\t\t$sent_manifesto_logid=0;\r\n\t\tif($manifesto_details)\r\n\t\t{\r\n\t\t\t$param1=array();\r\n\t\t\t$param1['sent_invoices']=$manifesto_details['sent_invoices'].','.implode(',',$invoices_no);\r\n\t\t\t$param1['remark']=$manifesto_details['remark'].','.implode(',',$invoices_no).' this invoices are newly add this manifesto';\r\n\t\t\t$param1['modified_on']=cur_datetime();\r\n\t\t\t$param1['modified_by']=$user_det['userid'];\r\n\t\t\t$this->db->where('id',$manifesto_id);\r\n\t\t\t$this->db->update(\"pnh_m_manifesto_sent_log\",$param1);\r\n\t\t\t$sent_manifesto_logid = $manifesto_id;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tforeach($invoices_no as $invno)\r\n\t\t{\r\n\t\t\t// insert invnos to transit table\r\n\t\t\t\t$ins_data = array();\r\n\t\t\t\t$ins_data['sent_log_id'] = $sent_manifesto_logid;\r\n\t\t\t\t$ins_data['invoice_no'] = $invno;\r\n\t\t\t\t$ins_data['ref_id'] = $manifesto_details['hndleby_empid'];\r\n\t\t\t\t$ins_data['status'] = 0;\r\n\t\t\t\t$ins_data['logged_on'] = cur_datetime();\r\n\t\t\t\t$ins_data['logged_by'] = $user_det['userid'];\r\n\t\t\t\t$this->db->insert(\"pnh_invoice_transit_log\",$ins_data);\r\n\t\t}\r\n\t\t\r\n\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Invoices added to selected manifesto\");\r\n\t\tredirect(site_url('admin/pnh_pending_shipments'));\r\n\t}", "function addAttendeesIDs($attendees) {\n foreach ($attendees as &$attendee){\n $attendee = addAttendeeID($attendee);\n }\n return $attendees;\n}", "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n $c = 0;\n foreach ($invites as $user){\n \n $create_at = strtotime($user->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue; \n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'invitation-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n $activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can \".$activation_url.\"!\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n Slack::message(\"CRON >> Invite to join reminders: \".$c);\n return 0;\n }", "public function MyInvitationList($post_data){\n $userId = $post_data['userId'];\n $keyword = $post_data['keyword'];\n $limit = $post_data['limit'];\n $offset = $post_data['offset'];\n\n if(!empty($keyword)){\n $keyword = \"AND (s.searchName LIKE '%$keyword%' OR u.firstName LIKE '%$keyword%' OR s.searchId LIKE '%$keyword%' OR u.userId LIKE '%$keyword%' OR t.inviteEmail LIKE '%$keyword%' OR u.email LIKE '%$keyword%')\";\n }\n\n $sql = \"SELECT t.*,u.userId,u.firstName,u.email,s.searchName FROM tribe t\n LEFT JOIN users u ON t.fromuserId = u.userId AND u.deleteFlag !=1\n LEFT JOIN searchcriteria s on t.searchId = s.searchId \n WHERE t.touserId = $userId $keyword AND t.deleteFlag !=1 AND (t.status = '' OR t.status IS NULL) AND s.deleteFlag !=1 ORDER BY t.createdAt DESC LIMIT $offset,$limit\";\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n }else{\n return false;\n }\n }", "public function nueva()\n {\n $ret = 'success';\n if (! $_GET['id_usuario']) {\n return $ret;\n }\n // Invitation exists?\n if (isset($_SESSION['usuario']->invitaciones_amistad_enviadas[$_GET['id_usuario']])) {\n return $ret;\n }\n // Frindship already exists?\n if (isset($_SESSION['usuario']->amigos[$_GET['id_usuario']])) {\n return $ret;\n }\n \n // If the person we invite has invited us too, contacts are made\n $invitacion = new InvitacionAmistad();\n $invitacion->usuario = $_SESSION['usuario'];\n $invitacion->usuario_invita = new Usuario(array(\n 'id_usuario' => $_GET['id_usuario']\n ));\n $invitacion = $this->invitacionAmistadService->find($invitacion);\n if ($invitacion === false) {\n $this->error = $this->invitacionAmistadService->error();\n return 'error';\n }\n if ($invitacion) {\n $invitacion = $invitacion[0];\n $this->usuarioService->inicia_transaccion();\n \n // The friendship relationship between both is created\n if (! $this->usuarioService->crear_amistad($_SESSION['usuario'], $invitacion->usuario_invita)) {\n return $ret;\n }\n \n // The friend's invitation is deleted\n if (! $this->invitacionAmistadService->removeById($invitacion->id_invitacion)) {\n $this->error = $this->invitacionAmistadService->error();\n return 'error';\n }\n if (! $this->usuarioService->cierra_transaccion()) {\n return $ret;\n }\n $_SESSION['usuario']->invitaciones_amistad($invitacion->usuario_invita);\n $_SESSION['usuario']->sugerencia_amistad($invitacion->usuario_invita, true);\n return $ret;\n }\n \n // Is there an invitation already?\n $invitacion = new InvitacionAmistad();\n $invitacion->usuario = new Usuario(array(\n 'id_usuario' => $_GET['id_usuario']\n ));\n $invitacion->usuario_invita = $_SESSION['usuario'];\n $invitacion = $this->invitacionAmistadService->find($invitacion);\n if ($invitacion) {\n return $ret;\n }\n \n // The invitation is created\n $invitacion = new InvitacionAmistad();\n $invitacion->id_invitacion = uniqid();\n $usuario = $this->usuarioService->findById($_GET['id_usuario']);\n if (! $usuario) {\n return $ret;\n }\n $invitacion->usuario = $usuario;\n $invitacion->usuario_invita = $_SESSION['usuario'];\n $this->usuarioService->inicia_transaccion();\n $this->invitacionAmistadService->save($invitacion);\n \n // The email is removed if it is on my mailing list\n $email = new EmailUsuario();\n $email->email = $invitacion->usuario->email;\n $email->usuario = $_SESSION['usuario'];\n if ($email = $this->emailUsuarioService->find($email)) {\n $this->emailUsuarioService->removeById($email[0]->id_email);\n }\n $this->usuarioService->cierra_transaccion();\n \n // Session is created\n $_SESSION['usuario']->invitaciones_amistad_enviadas($invitacion);\n \n // It is removed from the suggested users as contacts\n $_SESSION['usuario']->sugerencia_amistad($invitacion->usuario, true);\n if ($email) {\n \n // It is deleted from the session if the email is\n $_SESSION['usuario']->emails($email[0], true);\n }\n return $ret;\n }", "public function getEmailInboxes () {\n if (!(Yii::app()->controller instanceof EmailInboxesController)) {\n return array ();\n }\n if (!isset ($this->emailInboxes)) \n return array ();\n $emailInboxIds = CJSON::decode ($this->emailInboxes);\n if (!is_array ($emailInboxIds)) \n return array();\n $emailInboxes = array ();\n $newEmailInboxIds = array ();\n foreach ($emailInboxIds as $id) {\n $emailInbox = EmailInboxes::Model ()->findByPk ($id);\n if ($emailInbox && \n Yii::app()->controller->checkPermissions ($emailInbox, 'view')) {\n\n $emailInboxes[$emailInbox->name] = $emailInbox;\n $newEmailInboxIds[] = $id;\n } \n }\n // remove ids for nonexistent inboxes and inboxes for which the user lacks view permissions\n if (count (array_diff ($emailInboxIds, $newEmailInboxIds))) {\n $this->emailInboxes = CJSON::encode ($newEmailInboxIds);\n $this->update ('emailInboxes');\n }\n return $emailInboxes;\n }", "public function showInvitations(){\n return View::make('users.invitations');\n }", "function getAccepted(){\n //check for the requested invitation available or not\n // $get_invite_id=$this->validateInvitationSecret();\n $invitation=MedicalGroupInvitation::find('all',array('conditions' => array('(user_id=? or email=?) and secret=? and active=1',$this->user_id,$this->email,$this->secret)));\n \n if(!empty($invitation)){\n foreach($invitation as $inv){\n $inv->status=\"ACCEPTED\";\n $inv->active=0;\n $inv->updated_on=time();\n $inv->save();\n MedicalGroupUsers::createUser(array(\"medical_group_id\"=>$inv->medical_group_id,\"user_id\"=>$inv->user_id,\"invitation_id\"=>$inv->id));\n }\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "public function cleanUpUserInvitesTable(){\n\t\t\n\t\tif (Cache::has( env('ENVIRONMENT') .'_'. 'is_cron_cleanUpUserInvitesTable')) {\n \t\t\n \t\t$cron = Cache::get( env('ENVIRONMENT') .'_'. 'is_cron_cleanUpUserInvitesTable');\n\n \t\tif ($cron == 'in_progress') {\n \t\t\treturn \"a cron is already running\";\n \t\t}\n \t}\n\n \tCache::put( env('ENVIRONMENT') .'_'. 'is_cron_cleanUpUserInvitesTable', 'in_progress', 10);\n\n\t\t$rbe = new RoleBaseEmail;\n\t\t$qry = DB::connection('bk')->table('users_invites')\n\t\t\t\t\t\t\t\t ->where('source', '!=', 'Mobile App')\n\t\t\t\t\t\t\t\t ->where('is_dup', 0)\n\t\t\t\t\t\t\t\t ->groupBy('invite_email')\n\t\t\t\t\t\t\t\t ->having('cnt', '>', 1)\n\t\t\t\t\t\t\t\t ->orderBy('cnt', 'DESC')\n\t\t\t\t\t\t\t\t ->select(DB::raw(\"count(invite_email) as cnt\"), 'invite_email as email')\n\t\t\t\t\t\t\t\t ->orderBy(DB::raw(\"RAND()\"))\n\t\t\t\t\t\t\t\t ->take(1000)\n\t\t\t\t\t\t\t\t ->get();\n\n\t\tforeach ($qry as $key) {\n\t\t\t$is_role_base = $rbe->isRoleBase($key->email);\n\t\t\tif ($is_role_base) {\n\t\t\t\tUsersInvite::where('invite_email', $key->email)->delete();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$inner = UsersInvite::where('invite_email', $key->email)->get();\n\n\t\t\t$check = false;\n\t\t\tforeach ($inner as $k) {\n\t\t\t\tif (!isset($temp_k)) {\n\t\t\t\t\t$temp_k = $k;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$ac = AdClick::on('bk')->where('user_invite_id', $k->id)->first();\n\t\t\t\tif (!isset($ac)) {\n\t\t\t\t\t$k->is_dup = 1;\n\t\t\t\t\t$k->save();\n\t\t\t\t}elseif(!$check){\n\t\t\t\t\t$temp_k->is_dup = 1;\n\t\t\t\t\t$temp_k->save();\n\n\t\t\t\t\t$temp_k = $k;\n\t\t\t\t\t$check = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCache::put( env('ENVIRONMENT') .'_'. 'is_cron_cleanUpUserInvitesTable', 'done', 10);\n\n\t\treturn \"success\";\n\t}", "function setInvitation($invitation = 0) \n\t{\n\t\tglobal $ilDB, $ilAccess;\n\t\t\n\t\t$this->invitation = $invitation;\n\t\tif ($invitation == self::INVITATION_OFF)\n\t\t{\n\t\t\t$this->disinviteAllUsers();\n\t\t}\n\t\telse if ($invitation == self::INVITATION_ON)\n\t\t{\n\t\t\tif ($this->getInvitationMode() == self::MODE_UNLIMITED)\n\t\t\t{\n\t\t\t\t$result = $ilDB->query(\"SELECT usr_id FROM usr_data\");\n\t\t\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tif ($ilAccess->checkAccessOfUser($row[\"usr_id\"], \"read\", \"\", $this->getRefId(), \"svy\", $this->getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->inviteUser($row['usr_id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "function _sendInterestMail()\r\n {\r\n App::import('Model', 'UserInterest');\r\n $this->UserInterest = new UserInterest();\r\n App::import('Model', 'UserInterestFollower');\r\n $this->UserInterestFollower = new UserInterestFollower();\r\n App::import('Model', 'EmailTemplate');\r\n $this->EmailTemplate = new EmailTemplate();\r\n App::import('Core', 'ComponentCollection');\r\n $collection = new ComponentCollection();\r\n App::import('Component', 'Email');\r\n $this->Email = new EmailComponent($collection);\r\n $i = 0;\r\n do {\r\n $items = $this->find('all', array(\r\n 'conditions' => array(\r\n 'Item.item_status_id' => ConstItemStatus::Open,\r\n 'Item.is_interest_mail_sent' => 0\r\n ) ,\r\n 'contain' => array(\r\n 'Merchant' => array(\r\n 'fields' => array(\r\n 'Merchant.name',\r\n 'Merchant.id',\r\n 'Merchant.url',\r\n 'Merchant.zip',\r\n 'Merchant.address1',\r\n 'Merchant.address2',\r\n 'Merchant.city_id',\r\n 'Merchant.phone'\r\n ) ,\r\n 'City' => array(\r\n 'fields' => array(\r\n 'City.id',\r\n 'City.name',\r\n 'City.slug',\r\n )\r\n ) ,\r\n 'State' => array(\r\n 'fields' => array(\r\n 'State.id',\r\n 'State.name'\r\n )\r\n ) ,\r\n 'Country' => array(\r\n 'fields' => array(\r\n 'Country.id',\r\n 'Country.name',\r\n 'Country.slug',\r\n )\r\n )\r\n ) ,\r\n 'Attachment' => array(\r\n 'fields' => array(\r\n 'Attachment.id',\r\n 'Attachment.dir',\r\n 'Attachment.filename',\r\n 'Attachment.width',\r\n 'Attachment.height'\r\n )\r\n ) ,\r\n 'CitiesItem' => array(\r\n 'City' => array(\r\n 'Subscription' => array(\r\n 'fields' => array(\r\n 'Subscription.id',\r\n 'Subscription.user_id',\r\n 'Subscription.email',\r\n ) ,\r\n 'conditions' => array(\r\n 'Subscription.is_subscribed' => 1\r\n )\r\n ) ,\r\n 'fields' => array(\r\n 'City.id',\r\n 'City.name',\r\n 'City.slug',\r\n )\r\n )\r\n ) ,\r\n 'UserInterestItem' => array(\r\n 'UserInterest' => array(\r\n 'fields' => array(\r\n 'UserInterest.id',\r\n 'UserInterest.name',\r\n 'UserInterest.slug',\r\n )\r\n ) ,\r\n ) ,\r\n 'City' => array(\r\n 'fields' => array(\r\n 'City.id',\r\n 'City.name',\r\n 'City.slug',\r\n )\r\n ) ,\r\n ) ,\r\n 'recursive' => 2,\r\n 'limit' => 2,\r\n 'offset' => $i\r\n ));\r\n if (!empty($items)) {\r\n $itemIds = array();\r\n foreach($items as $item) {\r\n // Updating Item subscriptions\r\n $this->updateAll(array(\r\n 'Item.is_interest_mail_sent' => 1,\r\n ) , array(\r\n 'Item.id' => $item['Item']['id']\r\n ));\r\n /* sending mail to all subscribers starts here */\r\n $city = (!empty($item['Merchant']['City']['name'])) ? $item['Merchant']['City']['name'] : '';\r\n $state = (!empty($item['Merchant']['State']['name'])) ? $item['Merchant']['State']['name'] : '';\r\n $country = (!empty($item['Merchant']['Country']['name'])) ? $item['Merchant']['Country']['name'] : '';\r\n $address = (!empty($item['Merchant']['address1'])) ? $item['Merchant']['address1'] : '';\r\n $address.= (!empty($item['Merchant']['address2'])) ? ', ' . $item['Merchant']['address2'] : '';\r\n $address.= (!empty($item['Merchant']['City']['name'])) ? ', ' . $item['Merchant']['City']['name'] : '';\r\n $address.= (!empty($item['Merchant']['State']['name'])) ? ', ' . $item['Merchant']['State']['name'] : '';\r\n $address.= (!empty($item['Merchant']['Country']['name'])) ? ', ' . $item['Merchant']['Country']['name'] : '';\r\n $address.= (!empty($item['Merchant']['zip'])) ? ', ' . $item['Merchant']['zip'] : '';\r\n $address.= (!empty($item['Merchant']['phone'])) ? ', ' . $item['Merchant']['phone'] : '';\r\n $image_hash = 'small_big_thumb/Item/' . $item['Attachment'][0]['id'] . '.' . md5(Configure::read('Security.salt') . 'Item' . $item['Attachment'][0]['id'] . 'jpg' . 'small_big_thumb' . Configure::read('site.name')) . '.' . 'jpg';\r\n $item_url = Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'view',\r\n 'city' => $item['City']['0']['slug'],\r\n $item['Item']['slug'],\r\n 'admin' => false\r\n ) , false) , 1);\r\n $image_options = array(\r\n 'dimension' => 'subscription_thumb',\r\n 'class' => '',\r\n 'alt' => $item['Item']['name'],\r\n 'title' => $item['Item']['name'],\r\n 'type' => 'jpg'\r\n );\r\n $src = getImageUrl('Item', $item['Attachment'][0], $image_options);\r\n $tmpURL = $this->getCityTwitterFacebookURL($item['City']['0']['slug']);\r\n $item_name = $item['Item']['name'];\r\n $item_price = $item['Item']['price'];\r\n $emailFindReplace = array(\r\n '##SITE_URL##' => Cache::read('site_url_for_shell', 'long') ,\r\n '##SITE_NAME##' => Configure::read('site.name') ,\r\n '##ITEM_NAME##' => $item_name,\r\n '##MERCHANT_NAME##' => $item['Merchant']['name'],\r\n '##MERCHANT_ADDRESS##' => $address,\r\n '##MERCHANT_WEBSITE##' => $item['Merchant']['url'],\r\n '##CITY_NAME##' => $item['City']['0']['name'],\r\n '##SAVINGS##' => '',\r\n '##BUY_PRICE##' => Configure::read('site.currency') . $item_price,\r\n '##DISCOUNT##' => '',\r\n '##DESCRIPTION##' => $item['Item']['description'],\r\n '##MERCHANT_SITE##' => $item['Merchant']['url'],\r\n '##ITEM_URL##' => $item_url,\r\n '##ITEM_LINK##' => $item_url,\r\n '##CONTACT_URL##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'contacts',\r\n 'action' => 'add',\r\n 'city' => $item['City']['0']['slug'],\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##ITEM_IMAGE##' => \"<img src =\" . Router::url('/', true) . $src . \" />\",\r\n '##TWITTER_URL##' => !empty($tmpURL['City']['0']['twitter_url']) ? $tmpURL['City']['0']['twitter_url'] : Configure::read('twitter.site_twitter_url') ,\r\n '##FACEBOOK_URL##' => !empty($tmpURL['City']['0']['facebook_url']) ? $tmpURL['City']['0']['facebook_url'] : Configure::read('facebook.site_facebook_url') ,\r\n '##DATE##' => date('l, F j, Y', strtotime(Date('Y-m-d H:i:s'))) ,\r\n '##END_DATE##' => __l('End Date:') . ' ' . strftime(Configure::read('site.datetime.format') , strtotime($item['Item']['end_date'])) ,\r\n '##FACEBOOK_IMAGE##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'icon-facebook.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##TWITTER_IMAGE##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'icon-twitter.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##COMMENT##' => $item['Item']['description'],\r\n '##CONTACT_US##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'contacts',\r\n 'action' => 'add',\r\n 'city' => $item['City']['0']['slug'],\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##BACKGROUND##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'ing13.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##ITEM_IMAGE##' => $src,\r\n '##BTN_IMAGE##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'btn1.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##READMORE_IMAGE##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'readmore.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##READMORE##' => $item_url,\r\n '##EMAIL-COMMENT-BG##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'email-comment-bg.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##SITE_LOGO##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'logo-email.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n );\r\n $sub_city_id = array();\r\n foreach($item['UserInterestItem'] as $interest_item) {\r\n // Sending mail through MailChimp Server //\r\n if (Configure::read('site.city_url') == 'prefix') {\r\n $url = Router::url('/', true) . 'item/' . $item['Item']['slug'] . '/city:' . $item['City']['0']['slug'];\r\n } else {\r\n $url = 'http://' . $item['City']['0']['slug'] . '.' . $domain . 'item/' . $item['Item']['slug'];\r\n }\r\n if (Configure::read('mailchimp.is_enabled')) {\r\n $merge_vars = array(\r\n 'SITE_URL' => Cache::read('site_url_for_shell', 'long') ,\r\n 'SITE_NAME' => Configure::read('site.name') ,\r\n 'ITEM_NAME' => $item['Item']['name'],\r\n 'C_NAME' => $item['Merchant']['name'],\r\n 'C_ADDRESS' => $address,\r\n 'C_WEBSITE' => $item['Merchant']['url'],\r\n 'INTEREST_NAME' => $interest_item['UserInterest']['name'],\r\n 'PRICE' => Configure::read('site.currency') . $item['Item']['price'],\r\n 'DISCOUNT' => !empty($item['Item']['discount_percentage']) ? $item['Item']['discount_percentage'] . '%' : '',\r\n 'DESCRIP' => $item['Item']['description'],\r\n 'ITEM_URL' => $item_url,\r\n 'ITEM_IMAGE' => \"<img src =\" . Router::url('/', true) . $src . \" />\",\r\n 'FACE_URL' => 'http://www.facebook.com/share.php?u=' . preg_replace('/\\//', '', Router::url('/', true) , 1) . 'item/' . $item['Item']['slug'],\r\n 'TWITT_URL' => 'http://www.twitter.com/home?status=' . urlencode($item['Item']['name'] . ' - ') . $url,\r\n 'DATE' => date('l, F j, Y', strtotime($item['Item']['event_date'])) ,\r\n 'END_DATE' => __l('End Date:') . ' ' . date('M d, Y H:i:s A', strtotime($item['Item']['end_date'])) ,\r\n 'COMMENT' => $item['Item']['description'],\r\n 'CONTACT_US' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'contacts',\r\n 'action' => 'add',\r\n 'city' => $item['City']['0']['slug'],\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n 'ITEM_IMAGE' => $src,\r\n );\r\n App::import('Model', 'MailChimpList');\r\n $citylist_mod = new MailChimpList();\r\n $get_city_list = $citylist_mod->find('first', array(\r\n 'conditions' => array(\r\n 'MailChimpList.user_interest_id' => $interest_item['UserInterest']['id']\r\n ) ,\r\n 'fields' => array(\r\n 'MailChimpList.list_id',\r\n )\r\n ));\r\n include_once (APP . DS . 'vendors' . DS . 'mailchimp' . DS . 'MCAPI.class.php');\r\n include_once (APP . DS . 'vendors' . DS . 'mailchimp' . DS . 'config.inc.php');\r\n $emailFindReplace['##UNSUB_LNK##'] = \"<a href='\" . Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'subscriptions',\r\n 'action' => 'unsubscribe_mailchimp',\r\n 'sub_city' => $item['City'][0]['slug'],\r\n 'email' => \"*|HTML:EMAIL|*\",\r\n 'admin' => false\r\n ) , false) , 1) . \"' title='Unsubscribe'>unsubscribe</a>\" . \".\";\r\n $emailFindReplace['##UNSUB_LBL##'] = '';\r\n $api = new MCAPI(Configure::read('mailchimp.api_key'));\r\n $type = 'regular';\r\n $template = $this->EmailTemplate->selectTemplate('Interest of the day');\r\n $opts['list_id'] = $get_city_list['MailChimpList']['list_id'];\r\n $opts['subject'] = strtr($template['subject'], $emailFindReplace);\r\n $opts['from_email'] = Configure::read('mailchimp.from_mail');\r\n $opts['from_name'] = Configure::read('site.name');\r\n $opts['tracking'] = array(\r\n 'opens' => true,\r\n 'html_clicks' => true,\r\n 'text_clicks' => false\r\n );\r\n $opts['authenticate'] = true;\r\n $opts['auto_footer'] = false;\r\n $opts['analytics'] = array(\r\n 'google' => 'my_google_analytics_key'\r\n );\r\n $opts['title'] = 'Subcription mail';\r\n $text_content_var = $template['email_content'];\r\n $content_var = strtr($template['email_content'], $emailFindReplace);\r\n $content = array(\r\n 'html' => $content_var,\r\n 'text' => $text_content_var\r\n );\r\n $campaignId = $api->campaignCreate($type, $opts, $content);\r\n $retval = $api->campaignSendNow($campaignId);\r\n $itemIds[] = $item['Item']['id'];\r\n\t\t\t\t\t\t\t// END OF MAIL SEND THROUGH MAILCHIMP //\r\n } else {\r\n\t\t\t\t\t\t\t$user_interest = array();\r\n\t\t\t\t\t\t\tforeach($item['UserInterestItem'] as $userInterest) {\r\n\t\t\t\t\t\t\t\t$user_interest[] = $userInterest['user_interest_id'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$conditions = array();\r\n\t\t\t\t\t\t\t$conditions['UserInterestFollower.user_interest_id'] = $user_interest;\r\n\t\t\t\t\t\t\t$userInterestFollowers = $this->UserInterestFollower->find('list', array(\r\n\t\t\t\t\t\t\t\t'conditions' => $conditions,\r\n\t\t\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t\t\t'UserInterestFollower.user_id'\r\n\t\t\t\t\t\t\t\t) ,\r\n\t\t\t\t\t\t\t\t'recursive' => -1\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\tif (!empty($userInterestFollowers)) {\r\n\t\t\t\t\t\t\t\t$userList = $this->User->UserNotification->find('list', array(\r\n\t\t\t\t\t\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t\t\t\t\t\t'UserNotification.user_id' => $userInterestFollowers,\r\n\t\t\t\t\t\t\t\t\t\t'UserNotification.when_new_item_was_added_from_my_interests' => 1\r\n\t\t\t\t\t\t\t\t\t) ,\r\n\t\t\t\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t\t\t\t'UserNotification.user_id'\r\n\t\t\t\t\t\t\t\t\t) ,\r\n\t\t\t\t\t\t\t\t\t'recursive' => -1\r\n\t\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\t\tif (!empty($userList)) {\r\n\t\t\t\t\t\t\t\t\t$userList=array_unique($userList);\r\n\t\t\t\t\t\t\t\t\t$users = $this->User->find('all', array(\r\n\t\t\t\t\t\t\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t'User.id' => $userList\r\n\t\t\t\t\t\t\t\t\t\t) ,\r\n\t\t\t\t\t\t\t\t\t\t'fields' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t'User.id',\r\n\t\t\t\t\t\t\t\t\t\t\t'User.email',\r\n\t\t\t\t\t\t\t\t\t\t\t'User.username'\r\n\t\t\t\t\t\t\t\t\t\t) ,\r\n\t\t\t\t\t\t\t\t\t\t'recursive' => -1\r\n\t\t\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\t\t\tif (!empty($users) && !Configure::read('mailchimp.is_enabled')) {\r\n\t\t\t\t\t\t\t\t\t\tforeach($users as $user) {\r\n\t\t\t\t\t\t\t\t\t\t\t$language_code = $this->getUserLanguageIso($user['User']['id']);\r\n\t\t\t\t\t\t\t\t\t\t\t$template = $this->EmailTemplate->selectTemplate('Interest of the day', $language_code);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->from = ($template['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $template['from'];\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->replyTo = ($template['reply_to'] == '##REPLY_TO_EMAIL##') ? Configure::read('EmailTemplate.reply_to_email') : $template['reply_to'];\r\n\t\t\t\t\t\t\t\t\t\t\tif(!empty($interest_item['UserInterest']['name'])):\r\n\t\t\t\t\t\t\t\t\t\t\t$emailFindReplace['##INTEREST_NAME##'] = $interest_item['UserInterest']['name'];\r\n \t\t\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->to = $user['User']['email'];\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->subject = strtr($template['subject'], $emailFindReplace);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->content = strtr($template['email_content'], $emailFindReplace);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->sendAs = ($template['is_html']) ? 'html' : 'text';\r\n\t\t\t\t\t\t\t\t\t\t\t$this->Email->send($this->Email->content);\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}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n }\r\n }\r\n }\r\n $i+= 2;\r\n }\r\n while (!empty($items));\r\n }", "public function remindTheseInvitations($invitation_ids = array())\n\t\t\t{\n\t\t\t\t$friendHandler = new FriendHandler();\n\t\t\t\t$friendHandler->setDBObject($this->dbObj);\n\t\t\t\t$friendHandler->makeGlobalize($this->CFG, $this->LANG);\n\t\t\t\tif (is_array($invitation_ids) and $invitation_ids)\n\t\t\t\t {\n\t\t\t\t for($i=0; $i<sizeof($invitation_ids); $i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $invitation_ids[$i];\n\t\t\t\t\t\t\t\tif (is_numeric($id))\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $friendHandler->remindFriendInvitaion($id);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\treturn true;\n\t\t\t}", "public function invigilators()\n {\n return $this->belongsToMany(Professor::class, 'timetable_schedule_invigilators', 'timetable_schedule_id', 'invigilator_id');\n }", "public function getSentInvitation()\n {\n try{\n $allInvitations = UserInvite::listSentInvites(Auth::user()->user_id);\n if(is_object($allInvitations)){\n $result = $this->renderSuccess(trans('messages.sent_invitation_list'),$allInvitations);\n } else {\n $result = $this->renderFailure(trans('messages.common_error'), StatusCode::$EXCEPTION,[false]);\n }\n }\n catch(\\Exception $e){\n UtilityHelper::logException(__METHOD__, $e);\n $result = $this->renderFailure(trans('messages.error.exception'), Response::HTTP_OK);\n }\n return $result;\n }", "public function inviteMembersAction() {\n\n if( !$this->_helper->requireUser()->isValid() ) return;\n\n //GET PAGE ID.\n $this->view->page_id = $page_id = $this->_getParam('page_id');\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n \n $viewer = Engine_Api::_()->user()->getViewer();\n \n\t\t$isPageAdmin = Engine_Api::_()->getDbtable('manageadmins', 'sitepage')->isPageAdmins($viewer->getIdentity(), $sitepage->getIdentity());\n\t\t\n $automaticallyJoin = Engine_Api::_()->getApi('settings', 'core')->getSetting( 'pagemember.automatically.addmember', 1);\n\n //PREPARE FORM\n $this->view->form = $form = new Sitepagemember_Form_InviteMembers();\n \n if( !$this->getRequest()->isPost() ) {\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n return;\n }\n\n $values = $form->getValues();\n\n $members_ids = array_filter(explode(\",\", $values['toValues']));\n\n $membersTable = Engine_Api::_()->getDbtable('membership', 'sitepage');\n \n\t\tif (!empty($members_ids)) {\n\t\t\n\t\t\tforeach($members_ids as $members_id) {\n\n\t\t\t\t$row = $membersTable->createRow();\n\t\t\t\t$row->resource_id = $page_id;\n\t\t\t\t$row->page_id = $page_id;\n\t\t\t\t$row->user_id = $members_id;\n\t\t\t\t$row->resource_approved = 1;\n\t\t\t\t\n\t\t\t\tif (!empty($automaticallyJoin) && !empty($sitepage->member_approval)) {\n\t\t\t\t\n\t\t\t\t\t$row->active = 1;\n\t\t\t\t\t$row->user_approved = 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//MEMBER COUNT INCREASE WHEN MEMBER JOIN THE PAGE.\n\t\t\t\t\t$sitepage->member_count++;\n\t\t\t\t\t$sitepage->save();\n\t\t\t\t} elseif (!empty($automaticallyJoin) && empty($sitepage->member_approval) && !empty($isPageAdmin)) {\n\t\t\t\t\t$row->active = 1;\n\t\t\t\t\t$row->user_approved = 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//MEMBER COUNT INCREASE WHEN MEMBER JOIN THE PAGE.\n\t\t\t\t\t$sitepage->member_count++;\n\t\t\t\t\t$sitepage->save();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$row->active = 0;\n\t\t\t\t\t//$row->resource_approved = 0;\n\t\t\t\t\t$row->user_approved = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$row->save();\n\t\t\t\t\n\t\t\t\tif (empty($automaticallyJoin)) {\n\t\t\t\t\t$user_subject = Engine_Api::_()->user()->getUser($members_id);\n\t\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($user_subject, $viewer, $sitepage, 'sitepagemember_invite');\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t $user_subject = Engine_Api::_()->user()->getUser($members_id);\n\t\t\t\t\t//SET THE REQUEST AS HANDLED FOR NOTIFACTION.\n\t\t\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->addNotification($user_subject, $viewer, $sitepage, 'sitepage_addmember');\n\n\t\t\t\t\t//ADD ACTIVITY\n\t\t\t\t\t$action=Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($user_subject, $sitepage, 'sitepage_join');\n\t\t\t\t\tif ( $action ) {\n\t\t\t\t\t\tEngine_Api::_()->getDbtable('actions', 'activity')->attachActivity( $action , $sitepage ) ;\n\t\t\t\t\t}\n\t Engine_Api::_()->getApi('subCore', 'sitepage')->deleteFeedStream($action,true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('The selected members have been successfully added to this page.')),\n 'layout' => 'default-simple',\n \n 'parentRefresh' => true,\n ));\n }", "public function invitedRoomAction()\n {\n \t$userDto = Zend_Registry::get('api_user');\n \t$rooms = $this->getBusiness()->getRoomByState($userDto, Dto_ChatRoomUser::STATE_INVITED);\n \t\n \t$roomArray = $rooms->toArray(array('room_id', 'created_at'));\n \t$this->success(array('rooms' => $roomArray));\n }", "public function get_invites() {\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 15,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\tif (isset($this->args[0])) { \n\t\t\t$results = $http->post($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], \n\t\t\t\tjson_encode(array(\n\t\t\t\t\t'panelistIds' => array(\n\t\t\t\t\t\t$this->args[0]\n\t\t\t\t\t)\n\t\t\t\t)), \n\t\t\t\tarray('header' => array(\n\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t'Content-Type' => 'application/json; charset=UTF-8'\n\t\t\t\t))\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$results = $http->get($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], array(\n\t\t\t\t'maxResults' => '100'\n\t\t\t), $this->options);\n\t\t}\n\t\t\n\t\t$results = json_decode($results, true);\n\t\tCakeLog::write('mbd.invites', print_r($results, true));\n\t\t\n\t\t$this->out('Total of '.count($results).' results');\n\t\tif (!empty($results)) {\n\t\t\tforeach ($results as $result) {\n\t\t\t\t$results = $http->get($result['url'].'&test=true',\n\t\t\t\t\tarray(),\n\t\t\t\t\tarray('header' => array(\n\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t'Content-Type' => 'application/json; charset=UTF-8'\n\t\t\t\t\t))\n\t\t\t\t);\n\t\t\t\t$this->out('#'.$result['panelistId'].' '.$result['url'].': '.$results['body']); \n\t\t\t}\n\t\t}\n\t\t$this->out('invite data logged in mbd.invites.log');\n\t}", "public function get_not_exist_emails($post_data){\n $userId = $post_data['userId'];\n $searchId = $post_data['searchId'];\n //print_r($post_data);exit();\n $invitees = array_key_exists(\"invitees\",$post_data);\n if($invitees){ \n $invitees = $post_data['invitees']; \n $emails = array();\n $nonExistingEmails = array();\n for($i=0;$i<sizeof($invitees);$i++){\n $email = strtolower($invitees[$i]['inviteEmail']);\n $query = $this->db->query(\"select email from users where email = '$email'\");\n if($query->num_rows()==0){\n $emails[$i]['inviteEmail'] = strtolower($invitees[$i]['inviteEmail']); \n $nonExistingEmails[] = strtolower($emails[$i]['inviteEmail']);\n }\n\n }\n return $nonExistingEmails;\n }\n }", "function inviteUser($user_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result = $ilDB->queryF(\"SELECT user_fi FROM svy_inv_usr WHERE user_fi = %s AND survey_fi = %s\",\n\t\t\tarray('integer','integer'),\n\t\t\tarray($user_id, $this->getSurveyId())\n\t\t);\n\t\tif ($result->numRows() < 1)\n\t\t{\n\t\t\t$next_id = $ilDB->nextId('svy_inv_usr');\n\t\t\t$affectedRows = $ilDB->manipulateF(\"INSERT INTO svy_inv_usr (invited_user_id, survey_fi, user_fi, tstamp) \" .\n\t\t\t\t\"VALUES (%s, %s, %s, %s)\",\n\t\t\t\tarray('integer','integer','integer','integer'),\n\t\t\t\tarray($next_id, $this->getSurveyId(), $user_id, time())\n\t\t\t);\n\t\t}\n\t\tif ($this->getInvitation() == self::INVITATION_ON)\n\t\t{\n\t\t\tinclude_once './Services/User/classes/class.ilObjUser.php';\n\t\t\tilObjUser::_addDesktopItem($user_id, $this->getRefId(), \"svy\");\n\t\t}\n\t}", "public function addEmailsWithConfirmation(int $id, array $emails, string $senderEmail): bool;", "public function inviteUser(InviteUserRequest $request)\n {\n // $data = $request->input(['name', 'email', 'phone', 'status', 'country', 'date_of_birth']);\n $data = $request->input('user');\n $email = strtolower($data['email']);\n\n // set company\n $data['company_uuid'] = session('company');\n $data['status'] = 'pending'; // pending acceptance\n $data['type'] = 'user'; // set type as regular user\n $data['created_at'] = Carbon::now(); // jic\n\n // make sure user isn't already invited\n $isAlreadyInvited = Invite::where([\n 'company_uuid' => session('company'),\n 'subject_uuid' => session('company'),\n 'protocol' => 'email',\n 'reason' => 'join_company'\n ])->whereJsonContains('recipients', $email)->exists();\n\n if ($isAlreadyInvited) {\n return response()->error('This user has already been invited to join this organization.');\n }\n\n // get the company inviting\n $company = Company::where('uuid', session('company'))->first();\n\n // check if user exists already\n $user = User::where('email', $email)->first();\n\n // if new user, create user\n if (!$user) {\n $user = User::create($data);\n }\n\n // create invitation\n $invitation = Invite::create([\n 'company_uuid' => session('company'),\n 'created_by_uuid' => session('user'),\n 'subject_uuid' => $company->uuid,\n 'subject_type' => Utils::getMutationType($company),\n 'protocol' => 'email',\n 'recipients' => [$user->email],\n 'reason' => 'join_company'\n ]);\n\n // notify user\n $user->notify(new UserInvited($invitation));\n\n return response()->json(['user' => $user]);\n }", "public function sharedEmailDomainInvitations(): SharedEmailDomainInvitationsRequestBuilder {\n return new SharedEmailDomainInvitationsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function invite(int $id, array $attributes): ResponseInterface;", "private function manageTeamInvitations(Request $request, Team $team): bool\n {\n $success = true;\n\n $teamRequestData = $request->request->get('team');\n if (!isset($teamRequestData['invitations'])) {\n return $success;\n }\n\n foreach ($teamRequestData['invitations'] as &$invitation) {\n $result = $this->handleTeamInvitation($team, $invitation['email'], $invitation['teamInvitationId'], true);\n\n if ($result instanceof TeamInvitation) {\n $invitation['teamInvitationId'] = $result;\n } else {\n $success = false;\n $invitation['result'] = $result;\n }\n }\n\n $request->request->set('team', $teamRequestData);\n\n return $success;\n }", "function setup_notifelms() {\n\n\tglobal $AccountId, $DefaultNotificationElms, $DB;\n\n\t$ids = array();\n\t$insert_failure = false;\n\tif(!is_numeric($AccountId) || $AccountId < 1) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Invalid account id\\n\";\n\t\t}\n\t\treturn $ids;\n\t}\n\n\tforeach($DefaultNotificationElms as $idx => $elmdata) {\n\t\t$sql = \"INSERT INTO NotificationElm (Id, TypeId, AccId, Name, ElmId, Height, Width, Style, DisplayOrder, InnerHtml, DisplayNotifCount, Active, Del) VALUES\n\t\t\t\t(NULL, (SELECT Id FROM NotificationElmType WHERE Type = '{$elmdata[\"type\"]}'), {$AccountId}, '{$elmdata[\"name\"]}', '{$elmdata[\"id\"]}', '{$elmdata[\"h\"]}',\n\t\t\t\t'{$elmdata[\"w\"]}', NULL, '{$elmdata[\"display\"]}', NULL, '{$elmdata[\"count\"]}', 1, 0)\";\n\t\tif(!$DB->Query($sql)) {\n\t\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\t\techo \"Elm Insert Failure: {$DB->GetLastErrorMsg()}\\n\";\n\t\t\t}\n\t\t\t$insert_failure = true;\n\t\t} else {\n\t\t\t$ids[] = $DB->GetLastInsertedId();\n\t\t}\n\n\t\tif($elmdata[\"attribs\"] === true) {\n\t\t\tif(!add_elm_attributes($DB->GetLastInsertedId())) {\n\t\t\t\techo \"****Failed to add attribs for elm id: {$DB->GetLastInsertedId()}\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif($insert_failure) {\n\t\t$tmp = var_export($ids, true);\n\t\techo \"*****************\\nExperienced Insert Failure!. Data:\\n{$tmp}\\n******************\\n\";\n\t}\n\n\treturn $ids;\n}", "public function sendInvitation(Request $request){\n $admin = $request->input('admin');\n $admin = User::find($admin);\n\n if ((int) $request->input('admin') > 0 && !Invitation::where('worker_id',Auth::user()->id)->where('admin_id', $request->input('admin'))->exists()) {\n\n $invitation = new Invitation;\n $invitation->worker_id = Auth::user()->id;\n $invitation->admin_id = (int) $request->input('admin');\n $invitation->save();\n\n }\n return redirect()->back();\n }", "public function store(Request $request)\n {\n $email = $request->email;\n \n if ($email == auth()->user()->email) {\n $data['error'] = \"Can't send self invitations\";\n return $data;\n }\n\n $user = User::firstWhere('email', $email);\n $data = [];\n \n if ($user) {\n $invitation = new Invitation();\n \n $invitation->user_id = auth()->id();\n $invitation->contact_id = $user->id;\n $invitation->viewed = false;\n $saved = $invitation->save(); \n\n $data['success'] = $saved;\n $data['successmsg'] = 'Invitation sent.';\n $data['invitation'] = $invitation;\n \n event(new InvitationSent($invitation));\n }else{\n $data['error'] = \"User not found\";\n }\n\n return $data;\n\n }", "private function _updateInvite(Tx_Magenerator_Domain_Model_FeUser $feUser, Tx_Magenerator_Domain_Model_Invites $inviteModel) {\n\n $inviteModel->setEndtime(time());\n\n $this->invitesRepository->update($inviteModel);\n\n $feUser->setInvite($inviteModel->getInvite());\n\n $length = (int) $this->settings['invites']['perUser'];\n for ($i = 0; $i < $length; ++$i) {\n $newInvite = new Tx_Magenerator_Domain_Model_Invites();\n $newInvite->setInvite($this->generateInviteId());\n $feUser->addFeInvite($newInvite);\n }\n }" ]
[ "0.66967165", "0.6605068", "0.6515697", "0.64643663", "0.64376414", "0.6394086", "0.63173693", "0.62609386", "0.6230056", "0.619493", "0.6146303", "0.6051922", "0.5992582", "0.5896271", "0.5859883", "0.58172053", "0.58092105", "0.5798885", "0.5786823", "0.5785944", "0.5773467", "0.57693964", "0.57583797", "0.5754552", "0.57093525", "0.56771415", "0.56547534", "0.56428874", "0.5615476", "0.56137455", "0.5607977", "0.55935407", "0.5545634", "0.5538577", "0.5473248", "0.5448489", "0.5444005", "0.5428161", "0.5369327", "0.53301084", "0.5312831", "0.5301815", "0.5300933", "0.52888626", "0.528718", "0.52849007", "0.52524114", "0.5251021", "0.52457213", "0.524433", "0.5243028", "0.52284306", "0.52179533", "0.5208061", "0.5192307", "0.5191231", "0.51893103", "0.51808786", "0.5165809", "0.51614076", "0.5154024", "0.5149724", "0.5141885", "0.5132267", "0.5127144", "0.5113245", "0.51107043", "0.51079786", "0.50904053", "0.5081122", "0.5079223", "0.5065777", "0.50623894", "0.50524735", "0.50498", "0.50413644", "0.503237", "0.5025143", "0.5010607", "0.5007242", "0.5000832", "0.4980478", "0.4978876", "0.49776655", "0.49767417", "0.4975121", "0.4968593", "0.49564058", "0.4947263", "0.49442586", "0.4919963", "0.49166656", "0.4914894", "0.4894144", "0.48925748", "0.48830578", "0.48814288", "0.48813128", "0.48499757", "0.48481303" ]
0.61189526
11
generates a simple 'create table xxx based on field names
protected function getCreateTableSQL($tablename) { $SQL=''; foreach ($this->fieldNames as $fieldName) { if ($SQL!='') $SQL.=','."<br>"; $SQL.=$fieldName.' varchar(20)'; } $SQL.=')'; $SQL='create table '.$tablename.' ('.$SQL; return $SQL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function create_table($table_name, $fields, $primary_key = TRUE);", "function mscaffolding_create_table($name, $data)\n\t{\n\t\t$query_string = \"CREATE TABLE `\" . lconf_get(\"db_name\") . \"`.`\" . $name . \"` (`id` INT NOT NULL AUTO_INCREMENT,\";\n\n\t\tfor ($i = 0; $i < count($data) / 2; $i++)\n\t\t{\n\t\t\t$query_string .= \"`\" . $data[\"name\" . $i] . \"`\" . mscaffolding_get_type($data[\"type\" . $i]);\n\t\t}\n\n\t\t$query_string .= \" PRIMARY KEY ( `id` )) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci\";\n\n\t\treturn ldb_query($query_string);\n\t}", "function _generateBasicCreateTable($targetDB, $tableName, &$tableFields, $PKFields, $Indexes)\n{\n $dbFormat = new DBFormat($targetDB); //object that contains DB-specific translations\n //print_r ($dbFormat);\n\n $IndexNames = array();\n\n //fix up index names (need to be unique in at least MS SQL)\n //not so good coding practice for performance but items are few in these arrays\n foreach($Indexes as $key => $value){\n $IndexNames[\"{$tableName}_{$key}\"] = $value;\n }\n\n //start building the statement\n $SQL = \"CREATE TABLE `$tableName` (\\n\";\n // print($SQL);\n // print_r($tableFields);\n //add the fields\n foreach($tableFields as $vName => $value){\n if(!is_object($value)){\n print_r($tableFields);\n die(\"m. _generateBasicCreateTable: Field $vName is not a valid ModuleField.\");\n } else {\n if (strtolower(get_class($value)) == 'tablefield'){\n if(!isset($dbFormat->dataTypes[$value->dataType])){\n trigger_error(\"Data type {$value->dataType} not supported.\", E_USER_ERROR);\n }\n $SQL .= \" {$value->name} {$dbFormat->dataTypes[$value->dataType]}\";\n if (!empty($value->dbFlags)){\n $flag = $value->dbFlags;\n foreach($dbFormat->flags as $k=>$v){\n $flag = str_replace($k, $v, $flag);\n }\n $SQL .= \" $flag\";\n }\n $SQL .= \",\\n\";\n\n }\n }\n\n }\n\n //add primary key definiton\n $SQL .= \" {$dbFormat->PKDeclaration}(\\n \";\n $SQL .= implode(\",\\n \", $PKFields);\n $SQL .= \"\\n )\";\n\n //add MySQL indexes:\n //within the CREATE TABLE statement\n if ($targetDB == 'MySQL'){\n\n/*\n if (count($IndexNames) > 0){\n foreach($IndexNames as $key => $value){\n $SQL .= \",\\n INDEX $key (\\n \";\n $SQL .= implode(\",\\n \", $value);\n $SQL .= \"\\n )\";\n }\n }\n*/\n }\n\n //close the statement\n if ($targetDB == 'MySQL'){\n $SQL .= \"\\n) TYPE=InnoDB;\\n\"; //using transacion-capable tables\n } else {\n $SQL .= \"\\n);\\n\";\n }\n\n //add MS SQL Server indexes:\n //with separate CREATE INDEX statements\n if ($targetDB == 'MSSQL'){\n if (count($IndexNames) > 0){\n foreach($IndexNames as $key => $value){\n $SQL .= \"CREATE INDEX $key ON `$tableName` (\\n \";\n $SQL .= implode(\",\\n \", $value);\n $SQL .= \"\\n);\\n\";\n }\n }\n }\n\n unset($dbFormat);\n\n return $SQL;\n}", "protected function generateTable(){\n\t\t$columns = $this->getConfig()->getColumns();\n\t\t$columns['magento_entity_id'] = array('type' => 'int');\n\n\t\t$sql = 'CREATE TABLE ' . $this->_table . '(';\n\n\t\tforeach ($columns as $name => $params) {\n\t\t\t$type = $this->getConfig()->getTypeForDatabase($params['type'], $name);\n\t\t\t$value = isset($params['default']) ? $params['default'] : 'NULL';\n\t\t\tif ($value != 'NULL') {\n\t\t\t\t$value = 'DEFAULT ' . $value;\n\t\t\t}\n\t\t\t$primary = isset($params['primary']) && $params['primary'] ? ' PRIMARY KEY' : '';\n\n\t\t\t$sql .= \"\\n\" . $name . \" \" . $type . \" \" . $value . $primary . \",\";\n\t\t}\n\t\t$sql = substr($sql, 0, -1) . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;' . \"\\n\";\n\n\t\treturn $sql;\n\t}", "function create_table($table_name, $field_name, $field_type, $field_length){\n // $sql_chk = db::query(\"SELECT COUNT(*) AS TOTAL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='\".strtoupper(db::$_dbName).\"' AND TABLE_NAME = '\".$table_name.\"'\");\n // $rec_chk = db::fetch_array($sql_chk);\n // if($rec_chk['TOTAL'] > 0)\n // {\n // echo \"<script>alert('ตาราง \".$table_name.\" ถูกใช้งานแล้ว กรุณาตรวจสอบ'); window.location.href='\".$_SERVER['HTTP_REFERER'].\"';</script>\";\n // db::db_close();\n // exit;\n // }\n\n $field_length = $field_length == \"\" ? \"\" : \"(\".$field_length.\")\";\n\n $sql_create = \" CREATE TABLE [dbo].[\".$table_name.\"]([\".$field_name.\"] \".$field_type.\" \".$field_length.\" NOT NULL, PRIMARY KEY ([\".$field_name.\"]))\";\n\n }", "function createTable($tablename, $fields, $types, $overwrite = FALSE) {\r\n //CREATE TABLE `TableName` (`FieldName1` DATE, `FieldName2` VARCHAR (50), `FieldName3` TEXT)\r\n $params = \"\";\r\n if (count($fields) == count($types)) {\r\n $params .= \"(\";\r\n $i = 0;\r\n foreach ($fields as $field) {\r\n $params .= $field . \" \" . $types[$i];\r\n if ($i < (count($types) - 1)) {\r\n $params .= \",\";\r\n }\r\n $i++;\r\n }\r\n $params .= \");\";\r\n }\r\n if ($overwrite == TRUE) {\r\n $query = \"drop table if exists $tablename;\";\r\n $this->makeQuery($query);\r\n }\r\n\r\n $query = \"CREATE TABLE $tablename \" . $params;\r\n //echo $query.'<br/>';\r\n return $this->makeQuery($query);\r\n }", "private function createNewTable() {\n //generate the create table statement\n $sql = \"create table $this->tableName(\";\n $comma = \"\";\n $keyNameList = [];\n foreach ($this->columns as $column /* @var $column DbColumn */) {\n $sql .= \" $comma $column->columnName $column->dataType $column->extraStuff\";\n $comma = \",\";\n if ($column->primaryKey === true) {\n $keyNameList[] = $column->columnName;\n }\n }\n //generate the primary key list, if any are present\n $primaryKeySql = \"\";\n if (count($keyNameList) > 0) {\n $primaryKeySql = \"primary key(\";\n $comma = \"\";\n foreach ($keyNameList as $keyName) {\n $primaryKeySql = \"$primaryKeySql $comma $keyName\";\n $comma = \",\";\n }\n $primaryKeySql = \",$primaryKeySql)\";\n }\n\n //constraints\n $cSql = \"\";\n //we are assuming that there is at least one table. otherwise, the query would fail anyway.\n $comma = \",\";\n foreach ($this->constraints as $c) {\n $cSql .= \" $comma\";\n switch ($c->constraintType) {\n case \"foreign key\":\n $cSql .= \" FOREIGN KEY($c->columnName) REFERENCES $c->referencesTableName($c->referencesColumnName)\";\n break;\n }\n }\n $sql = \"$sql $primaryKeySql $cSql)\";\n return DbManager::nonQuery($sql);\n }", "public function createSchemaTable();", "protected function createTableSql($name, $table) {\n $sql_fields = [];\n foreach ($table['fields'] as $field_name => $field) {\n $sql_fields[] = $this->createFieldSql($name, $field_name, $this->processField($field));\n }\n\n // Use already prefixed table name.\n $table_prefixed = $this->connection->prefixTables('{' . $name . '}');\n\n $sql = \"CREATE TABLE [{$table_prefixed}] (\" . PHP_EOL;\n $sql .= implode(\",\" . PHP_EOL, $sql_fields);\n $sql .= PHP_EOL . \")\";\n return $sql;\n }", "function createTable($table_name, $columns_array)\n{\n // $table_name = 'zoho_contact_information_v1';\n $drop_table = \"DROP TABLE IF EXISTS $table_name\";\n execute_sql($drop_table);\n $table = \"CREATE TABLE `$table_name` (\";\n $table .= 'id int NOT NULL PRIMARY KEY AUTO_INCREMENT,';\n\n foreach ($columns_array as $column) {\n $column = str_replace(' ', '__', $column);\n $table .= $column . ' varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,';\n }\n\n $table = trim($table, ',');\n $table .= ') ENGINE=InnoDB DEFAULT CHARSET=utf8;';\n\n execute_sql($table);\n}", "protected function _createTableSql()\n\t{\n\t\treturn 'CREATE TABLE ' . $this->getTable() . ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)';\n\t}", "private function getSchemaSQL(): string\n {\n return <<<EOF\ncreate table if not exists companies\n(\n id integer not null\n constraint companies_pk\n primary key autoincrement,\n name text not null,\n registration_code text not null,\n email text not null,\n phone text not null,\n comment text\n) \nEOF;\n }", "private function createDummyTable() {}", "function createTable($objSchema);", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "function maybe_create_table($table_name, $create_ddl)\n {\n }", "public function createTableSql($name, array $fields, array $options = array())\r\n {\r\n $sql = parent::createTableSql($name, $fields, $options);\r\n\r\n if (isset($options['comment']) && ! empty($options['comment'])) {\r\n \t $sql[] = $this->_createTableCommentSql($name, $options['comment']);\r\n \t}\r\n\r\n foreach ($fields as $fieldName => $field) {\r\n if (isset($field['sequence'])) {\r\n $sql[] = $this->createSequenceSql($field['sequence'], 1);\r\n }\r\n\r\n if (isset($field['autoincrement']) && $field['autoincrement'] ||\r\n (isset($field['autoinc']) && $fields['autoinc'])) { \r\n $sql = array_merge($sql, $this->_makeAutoincrement($fieldName, $name));\r\n }\r\n\r\n if (isset($field['comment']) && ! empty($field['comment'])){\r\n $sql[] = $this->_createColumnCommentSql($name,$fieldName,$field['comment']); \r\n }\r\n }\r\n \r\n if (isset($options['indexes']) && ! empty($options['indexes'])) {\r\n foreach ($options['indexes'] as $indexName => $definition) {\r\n // create nonunique indexes, as they are a part od CREATE TABLE DDL\r\n if ( ! isset($definition['type']) || \r\n (isset($definition['type']) && strtolower($definition['type']) != 'unique')) {\r\n $sql[] = $this->createIndexSql($name, $indexName, $definition);\r\n }\r\n }\r\n }\r\n \r\n return $sql;\r\n }", "protected function createTables()\n {\n $sql = $this->create_table;\n $this->connection->query($sql);\n\n // create again in schema 2\n $sql = str_replace($this->table, \"{$this->schema2}.{$this->table}\", $sql);\n $this->connection->query($sql);\n }", "public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }", "public static function create_table($name = NULL)\n\t{\n\t\treturn new Database_SQLite_DDL_Create_Table($name);\n\t}", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "abstract public function createTable();", "function generateTableDef($createLogTable = false)\n{\n $fieldDefs = array();\n $table_comment = $this->Name;\n if($createLogTable){\n $table_comment .= ' (log table)';\n\n //length should be at least as long as regular table's PK\n $fieldDefs['_RecordID'] = array(\n 'type' => 'integer',\n 'length' => 4,\n 'autoincrement' => 1,\n 'notnull' => 1,\n 'unsigned' => 1\n );\n }\n\n foreach($this->ModuleFields as $fieldName => $field){\n if('tablefield' == strtolower(get_class($field))){\n $def = $field->getMDB2Def();\n if($createLogTable && isset($def['autoincrement'])){\n unset($def['autoincrement']);\n }\n $fieldDefs[$fieldName] = $def;\n }\n }\n\n $indexDefs = array();\n $constraintDefs = array();\n foreach($this->Indexes as $indexName => $index){\n if($index->unique){\n $constraintDefs[$indexName] = $index->getMDB2Def();\n } else {\n $indexDefs[$indexName] = $index->getMDB2Def();\n }\n }\n\n $tableOptions = array();\n if(defined('DB_TYPE')){\n switch(DB_TYPE){\n case 'MySQL':\n $tableOptions = array(\n 'comment' => $table_comment,\n /* 'charset' => 'utf8',\n 'collate' => 'utf8_unicode_ci', */\n 'type' => 'innodb'\n );\n break;\n default:\n break;\n }\n }\n\n return array('fields' => $fieldDefs, 'indexes' => $indexDefs, 'constraints' => $constraintDefs, 'table_options' => $tableOptions);\n}", "private function createTables()\n {\n $query = array();\n\n // creating games table\n $query[] = \"\n CREATE TABLE IF NOT EXISTS games (\n id INTEGER PRIMARY KEY,\n player1_hash TEXT,\n player1_name TEXT,\n player1_ships TEXT,\n player2_hash TEXT,\n player2_name TEXT,\n player2_ships TEXT,\n timestamp NUMERIC\n )\n \";\n\n // creating events table\n $query[] = \"\n CREATE TABLE IF NOT EXISTS events (\n id INTEGER PRIMARY KEY,\n game_id INTEGER,\n player INTEGER,\n event_type TEXT,\n event_value TEXT,\n timestamp NUMERIC\n )\n \";\n\n foreach ($query as $value) {\n $this->oDB->query($value);\n }\n }", "public function create_tables() {\n\t\tglobal $wpdb;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$schema = \"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}cn_addressbooks` ( \n\t\t\t`id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(100) NOT NULL , `address` VARCHAR(255) NULL , \n\t\t\t`phone` VARCHAR(30) NULL , `created_by` BIGINT(20) NOT NULL , `created_at` DATETIME NOT NULL , \n\t\t\tPRIMARY KEY (`id`)) \n\t\t\t$charset_collate\";\n\n\t\tif ( ! function_exists( 'dbDelta') ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t}\n\n\t\tdbDelta( $schema );\n\t}", "static public function writeCreateTable( $table, $fields )\n\t{\n\t\t$tableSQL = \"DROP TABLE IF EXISTS \". Utilities::sqlBackquotes( $table ).\";\\n\";\n\t\t$tableSQL .= \"CREATE TABLE \". Utilities::sqlBackquotes( $table ).\" (\\n\";\n\t\t\n\t\t//Write Fields and attributes\n\t\tforeach( $fields as $field )\n\t\t{\n\t\t\t$tableSQL .= Utilities::sqlBackquotes( $field['name'] ). \" \". $field['type']. \" \". $field['required'].\",\\n\";\n\t\t}\n\t\t\n\t\t$tableSQL .= \"PRIMARY KEY ( \". Utilities::sqlBackquotes( $field['key'] ).\" )\\n\";\n\t\t$tableSQL .= \") ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;\\n\\n\";\n\t\t \n\t\treturn $tableSQL;\n\t}", "function lr_make_table($db, $namespace) {\n\n $table = 'lr_'.$namespace;\n $q = \"SHOW TABLES LIKE '$table'\";\n $result = $db->query($q);\n\n // Create the table with columns 'rec', 'sort', and 'text'.\n\n if ($db->numRows($result) < 1) { // Do this only once if necessary!\n $create = \"CREATE TABLE IF NOT EXISTS ?n (rec INT NOT NULL, sort INT NOT NULL, text varchar(255), PRIMARY KEY(rec, sort))\";\n $result = $db->query($create, $table);\n }\n\n return $table;\n}", "public function createTable($table, array $fields = array(), $pkFields = array(), $fkFields = array(), $execute = true) {\r\n\t\tif (is_string($pkFields) && !empty($pkFields)) {\r\n\t\t\t$pkFields = array($pkFields);\r\n\t\t}\r\n\r\n\t\t$dbtype = $this->getDbtype();\r\n\r\n\t\t$fields = $this->guessTypes($fields, $pkFields);\r\n\r\n\t\tif ($dbtype != 'sqlite' && empty($pkFields) && isset($fields['id'])) {\r\n\t\t\t$pkFields[] = 'id';\r\n\t\t}\r\n\r\n\t\tif (self::isReservedName($table)) {\r\n\t\t\tthrow new Exception($table . ' is a reserved name');\r\n\t\t}\r\n\t\tforeach ($fields as $field => $value) {\r\n\t\t\tif (self::isReservedName($field)) {\r\n\t\t\t\tthrow new Exception($field . ' is a reserved name in table ' . $table);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql = 'CREATE TABLE IF NOT EXISTS ' . $table . \"(\\n\";\r\n\t\tforeach ($fields as $field => $type) {\r\n\t\t\t$sql .= \"\\t\" . $field . ' ' . $type . \",\\n\";\r\n\t\t}\r\n\r\n\t\t//primary key\r\n\t\tif (!($dbtype == 'sqlite' && strpos($sql, 'PRIMARY KEY') !== false)) {\r\n\t\t\tif (!empty($pkFields)) {\r\n\t\t\t\t$sql .= \"\\t\" . 'PRIMARY KEY (' . implode(',', $pkFields) . ')' . \",\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//foreign keys\r\n\t\tif (!empty($fkFields)) {\r\n\t\t\t$constraints = $this->createConstraint($table, $fkFields);\r\n\t\t\t$sql .= implode(\",\\n\", $constraints);\r\n\t\t}\r\n\r\n\t\t$sql = rtrim($sql, \",\\n\");\r\n\r\n\t\t$sql .= \"\\n);\";\r\n\r\n\t\tif ($execute) {\r\n\t\t\t$this->exec($sql);\r\n\t\t}\r\n\r\n\t\treturn $sql;\r\n\t}", "protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "public function create_table($name, $data) {\n\t\t$this->execute($this->engine->create_table_sql($name, $data));\n\t}", "function createTable($name, $rows);", "function createTables($tables, $relations, $parameters)\n{\n\t$out = \"\"; // create empty output string (will be concatenated to final output)\n\n\tforeach($tables as $key => $value)\n\t{\n\t\t$key = mb_strtolower($key, 'UTF-8'); //lower key (program is case insensitive)\n\n\t\t//set and generate the primary key output\n\t\t$primary_key = \"prk_\" . $key . \"_id\";\n\t\t$out .= \"CREATE TABLE \" . $key . \" (\\n\\t\" . $primary_key . \" INT PRIMARY KEY\";\n\n\t\tif(array_key_exists($primary_key, $value[\"keys\"]) || array_key_exists($primary_key, $value[\"attributes\"])) // check if key attribute is not already present in attributes or keys\n\t\t\tprint_error(\"KEY_CONFLICT\");\n\n\t\t// generate attributes output\n\t\t$out .= generate_attributes_output($relations, $parameters, $key, $value);\n\n\t\t$out .= generate_table_members_output($relations, $parameters, $key, $value);\n\n\t\t//if -a is set, no tables from attributes will be generated\n\t\tif(array_key_exists(\"a\", $parameters))\n\t\t{\n\t\t\tif(isset($value[\"value\"])) // generate value with its data type\n\t\t\t\t$out .= \",\\n\\t\" . \"value \" . $value[\"value\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// generate attribute members of table\n\t\t\tforeach($value[\"attributes\"] as $key_attr => $attribute)\n\t\t\t{\n\t\t\t\tif($key_attr != \"value\")\n\t\t\t\t\t$out .= \",\\n\\t\" . $key_attr . \" \" . $attribute;\n\t\t\t\telse\n\t\t\t\t\t$value[\"value\"] = compare_data_type($value[\"value\"], $attribute);\n\t\t\t}\n\n\t\t\tif(isset($value[\"value\"])) // generate value with its data type\n\t\t\t\t$out .= \",\\n\\t\" . \"value \" . $value[\"value\"];\n\t\t}\n\n\t\t$out .= \"\\n);\\n\\n\";\n\t}\n\n\treturn $out;\n}", "function createTables()\n {\n $sqls = $this->simplexmlObject->xpath(\"//table\");\n foreach($sqls as $sql) {\n try {\n $db = $this->getConnection();\n $db->exec($sql);\n $tablename = $sql->getName();\n print(\"Created $tablename table.\\n\");\n $this->closeConnection($db, $sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }\n \n }", "public function create_tables() {\n global $wpdb;\n $charset_collate = $wpdb->get_charset_collate();\n $schema = \"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}wc_addresses` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,\n `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created_by` bigint(20) unsigned NOT NULL,\n `created_at` datetime DEFAULT NULL,\n PRIMARY KEY (`id`)\n ) $charset_collate\";\n if ( !function_exists( 'dbDelta' ) ) {\n require_once ABSPATH . '/wp-admin/includes/upgrade.php';\n }\n\n dbDelta( $schema );\n }", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "function create_table_wf($table_name)\r\n{\r\n\tswitch(db::$_dbType)\r\n\t{\r\n\t\tcase 'MSSQL':\r\n\t\t\t$sql_create = \"CREATE TABLE [dbo].[\".$table_name.\"](\r\n\t\t\t\t\t[WFR_ID] [int] IDENTITY(1,1) NOT NULL,\r\n\t\t\t\t\t[WFR_TIMESTAMP]\t[date],\r\n\t\t\t\t\t[WF_DET_STEP]\t[int],\r\n\t\t\t\t\t[WF_DET_NEXT]\t[int]\r\n\t\t\t\t\t[WFR_UID]\t[int]\r\n\t\t\t\t)\";\r\n\t\t\tbreak;\r\n\t\tcase 'MYSQL':\r\n\t\t\t$sql_create = \"CREATE TABLE \".$table_name.\"(\r\n\t\t\t\t\tWFR_ID int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\tWFR_TIMESTAMP date DEFAULT NULL, \r\n\t\t\t\t\tWF_DET_STEP\tint(11),\r\n\t\t\t\t\tWF_DET_NEXT\tint(11),\r\n\t\t\t\t\tWFR_UID\tint(11),\r\n\t\t\t\t\tPRIMARY KEY (WFR_ID) \r\n\t\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8\";\r\n\t\t\tbreak;\r\n\t\tcase 'ORACLE':\r\n\t\t\t$sql_create = \"CREATE TABLE \".$table_name.\"\r\n\t\t\t\t\t( WFR_ID NUMBER(20) NOT NULL,\r\n\t\t\t\t\t WFR_TIMESTAMP DATE,\r\n\t\t\t\t\t WF_DET_STEP\tNUMBER(20),\r\n\t\t\t\t\t WF_DET_NEXT\tNUMBER(20),\r\n\t\t\t\t\t WFR_UID\tNUMBER(20),\r\n\t\t\t\t\t CONSTRAINT \".$table_name.\"_pk PRIMARY KEY (WFR_ID)\r\n\t\t\t\t\t)\";\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif($sql_create != \"\")\r\n\t{\r\n\t\tdb::query($sql_create);\r\n\t}\r\n}", "protected function buildTable(): string\n {\n $sql = '';\n\n if ( empty($this->tableInto) )\n {\n return $sql;\n }\n\n $sql .= 'INTO' . PHP_EOL;\n $sql .= $this->indent();\n $sql .= $this->tableInto . PHP_EOL;\n\n return $sql;\n }", "function create_form_table($args) {\n\t\t$table_name = $args[\"singular_code_name\"];\n\t\t$result = $GLOBALS['db']->query(\"DROP TABLE \".$table_name);\n\t\t$result = $GLOBALS['db']->query(\"CREATE TABLE IF NOT EXISTS \".$table_name.\" (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY)\");\n\n\t\t$items = $args[\"items\"];\n\n\t\tforeach($items as $item) {\n\t\t\tif($item[\"type\"] == 'input') {\n\t\t\t\tswitch($item[\"var_type\"][0]) {\n\t\t\t\t\tcase 'varchar':\n\t\t\t\t\tcase 'text':\n\t\t\t\t\tcase 'string':\n\n\t\t\t\t\t\t$result = $GLOBALS['db']->query(\"ALTER TABLE \".$table_name.\" ADD \".$item[\"singular_code_name\"].\" VARCHAR(\".$item[\"var_type\"][1].\") NOT NULL\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t$result = $GLOBALS['db']->query(\"ALTER TABLE \".$table_name.\" ADD \".$item[\"singular_code_name\"].\" \".$item[\"var_type\"][0].\"(\".$item[\"var_type\"][1].\") NOT NULL\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$result = $GLOBALS['db']->query(\"ALTER TABLE \".$table_name.\" ADD reg_date TIMESTAMP\");\n\t}", "function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }", "protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "function createTable($ctx){\r\n\t\t$create =\r\n 'CREATE TABLE IF NOT EXISTS `'.$ctx.'` ('.\r\n '`key` VARCHAR( 60 ) NOT NULL ,'.\r\n '`willExpireAt` int NOT NULL DEFAULT 0 ,'.\r\n\t\t'`lastModified` int NOT NULL DEFAULT 0, '.\r\n '`content` TEXT NULL ,PRIMARY KEY ( `key` ));';\r\n\r\n\t\tif(strlen($this->stm['before_create']) > 0 ){\r\n\t\t\t$this->db->Execute($this->stm['before_create'], array()) or die();\r\n\t\t}\r\n\t\t$dict = NewDataDictionary($this->db);\r\n\t\t$x = $dict->ExecuteSQLArray(array($create)) or die();\r\n\t\treturn $x;\r\n\t}", "private function _createTable() {\n $query = \"\n CREATE TABLE `seo_metadata` (\n `metadata_id` int(11) NOT NULL auto_increment,\n `seo_id` char(60) NOT NULL,\n `seo_title` varchar(255) NOT NULL,\n `seo_description` varchar(255) NOT NULL,\n `seo_keyword` varchar(255) NOT NULL,\n PRIMARY KEY (`metadata_id`),\n KEY `id_idx` (`id`)\n )\";\n $this->getAdapter()->query( $query );\n }", "function create_table_sql_string($tablename){\r\n\tglobal $dump_line,$dump_buffer;\r\n $crlf = \"\\r\\n\";\r\n\r\n\t// Start the SQL string for this table\r\n\t$field_header = \"CREATE TABLE `$tablename` (\";\r\n\t$field_string = \"\";\r\n\t\r\n\t// Get the field info and output to a string in the correct MySQL syntax\r\n\t$result = mysqli_query(\"DESCRIBE $tablename\");\r\n\tif (DEBUG) echo \"field_info\\n\\n\";\r\n\twhile ($field_info = mysqli_fetch_array($result)) {\r\n\t\tif (DEBUG) {\r\n\t\t\tfor ($i = 0; $i < count($field_info); $i++) {\r\n\t\t\t\techo \"$i: $field_info[$i]\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$field_name = $field_info[0];\r\n\t\t$field_type = $field_info[1];\r\n\t\t$field_not_null = ($field_info[2] == \"YES\") ? \"\" : \" NOT NULL\";\r\n\t\t$field_default = ($field_info[4] == NULL) ? \"\" : sprintf(\" default '%s'\", $field_info[4]);;\r\n\t\t$field_auto_increment = ($field_info[5] == NULL) ? \"\" : sprintf(\" %s\", $field_info[5]);\r\n\t\t$field_string .= $field_string ? \",\" : $field_header ;\r\n\t\t$field_string .= $crlf.sprintf(\" `%s` %s%s%s%s\", $field_name, $field_type, $field_not_null, $field_auto_increment, $field_default);\r\n\t}\r\n\t// Get the index info and output to a string in the correct MySQL syntax\r\n\t$result = mysqli_query(\"SHOW KEYS FROM $tablename\");\t//SHOW INDEX FROM \r\n\tif (DEBUG) echo \"\\nindex_info\\n\\n\";\r\n\twhile ($row = mysqli_fetch_array($result)) {\r\n $kname = $row['Key_name'];\r\n $ktype = (isset($row['Index_type'])) ? $row['Index_type'] : '';\r\n if (!$ktype && (isset($row['Comment']))) $ktype = $row['Comment']; // For Under MySQL v4.0.2\r\n $sub_part = (isset($row['Sub_part'])) ? $row['Sub_part'] : '';\r\n if ($kname != 'PRIMARY' && $row['Non_unique'] == 0) {\r\n $kname = 'UNIQUE KEY `'.$kname.'`';\r\n }\r\n if ($ktype == 'FULLTEXT') {\r\n $kname = 'FULLTEXT KEY `'.$kname.'`';\r\n }\r\n if (!isset($index[$kname])) {\r\n $index[$kname] = array();\r\n }\r\n if ($sub_part > 1) {\r\n $index[$kname][] = PMA_backquote($row['Column_name'], 0) . '(' . $sub_part . ')';\r\n } else {\r\n $index[$kname][] = PMA_backquote($row['Column_name'], 0);\r\n }\r\n } // end while\r\n mysqli_free_result($result);\r\n $index_string = \"\";\r\n while (list($x, $columns) = @each($index)) {\r\n $index_string .= ',' . $crlf;\r\n if ($x == 'PRIMARY') {\r\n $index_string .= ' PRIMARY KEY (';\r\n } else if (substr($x, 0, 6) == 'UNIQUE') {\r\n $index_string .= ' UNIQUE ' . substr($x, 7) . ' (';\r\n } else if (substr($x, 0, 8) == 'FULLTEXT') {\r\n $index_string .= ' FULLTEXT ' . substr($x, 9) . ' (';\r\n } else {\r\n $index_string .= ' KEY `' . $x . '` (';\r\n }\r\n $index_string .= implode($columns, ', ') . ')';\r\n } // end while\r\n $index_string .= $crlf;\r\n\t\r\n\t// Get the table type and output it to a string in the correct MySQL syntax\r\n\t$result = mysqli_query(\"SHOW TABLE STATUS\");\r\n\tif (DEBUG) echo \"\\nstatus_info\\n\\n\";\r\n\twhile ($status_info = mysql_fetch_array($result)) {\r\n\t\tfor ($i = 0; $i < count($status_info); $i++) {\r\n\t\t\tif (DEBUG) echo \"$i: $status_info[$i]\\n\";\r\n\r\n\t\t\tif ($status_info[0] == $tablename) $table_type = sprintf(\"TYPE=%s\", $status_info[1]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Append the index string to the field string\r\n\t$field_string = sprintf(\"%s%s\", $field_string, $index_string);\r\n\r\n\t// Put the field string in parantheses\r\n\t$field_string = sprintf(\"%s)\", $field_string);\r\n\t\r\n\t// Finalise the MySQL create table string\r\n\t$field_string .= $table_type.\";\";\r\n\t$field_string = \"-- \\r\\n-- \".$tablename.\" structure.\\r\\n-- \".$crlf.$field_string.$crlf;\r\n\t$dump_buffer .= $field_string;\r\n\tpreg_match_all(\"/\\r\\n/\",$field_string,$c);\r\n\t$dump_line += count($c[0]);\r\n}", "public function test_create_table()\n\t{\n\t\t$handler = DB::handler( 'phpunit_sqlite' );\n\t\t\n\t\t$handler->run( \"DROP TABLE IF EXISTS people\" );\n\t\t\n\t\t$handler->run( \n\t\t\"CREATE TABLE people ( \n\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT, \n\t\t\tname VARCHAR, \n\t\t\tage INTEGER\n\t\t);\");\n\t}", "public function tableDefinition()\r\n {\r\n if(is_array($this->cols)){\r\n $table = $this->tableName();\r\n $colString = implode(','.PHP_EOL,$this->cols); // creates a comma separated string of SQL column definitions\r\n return \"CREATE TABLE IF NOT EXISTS $table ($colString)\";\r\n }else{\r\n return false;\r\n }\r\n\r\n }", "protected function createTestTables()\n {\n $db = $this->getDb();\n\n $table = 'EmailTemplateAr';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'subject' => 'string',\n 'bodyHtml' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $columns = [\n 'name' => 'TestActiveMessage',\n 'subject' => 'test subject',\n 'bodyHtml' => 'test body HTML',\n ];\n $db->createCommand()->insert($table, $columns)->execute();\n }", "public function createTable(string $table_name, array $columns){\n\n $datatypes = [\"INT\", \"VARCHAR\", [\"ENUM\" => \"ENUM('Female', 'Male')\"]];\n $sql = \"CREATE TABLE \".$table_name.\"(\";\n $i = 0;\n\n if(count($columns) > 0){\n foreach($columns as $value){\n\n switch ($value) {\n case 'id':\n $sql.= $value.\" \".$datatypes[0];\n $i++;\n break;\n case ('gender'):\n $sql.= $value.\" \".$datatypes[2][\"ENUM\"];\n $i++;\n break;\n\n default:\n $sql.= $value.\" \".$datatypes[1].\"(120)\";\n $i++; \n break;\n }\n\n if($i < count($columns)){\n $sql .= \",\";\n } else if($i === count($columns)){\n $sql .= \"\";\n } else {\n $sql .= \"\";\n }\n \n }\n\n $sql .= \")\";\n\n } else {\n $sql .= \"id INT,\n first_name VARCHAR(80),\n last_name VARCHAR(80),\n email VARCHAR(150),\n gender ENUM('Female','Male'),\n country VARCHAR(80))\";\n }\n\n \n return $sql;\n\n }", "public function createTable( $table ) {\n\t\t$idfield = $this->getIDfield($table, true);\n\t\t$table = $this->safeTable($table);\n\t\t$sql = \"\n CREATE TABLE $table ( $idfield INTEGER PRIMARY KEY AUTOINCREMENT )\n\t\t\t\t \";\n\t\t$this->adapter->exec( $sql );\n\t}", "protected function RetCreateTable() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"CREATE\";\n\n if ($this->\n temporary == 'T' ||\n $this->\n temporary == 'G') {\n\n $return .= \" TEMPORARY\";\n }\n\n $return .= \" TABLE\";\n\n if (isset($this->\n addArgs['notexists']) &&\n $this->\n addArgs['notexists'] === true) {\n\n $return .= \" IF NOT EXISTS\";\n }\n\n $columnsDefn = [];\n $primaryKeys = [];\n $indexes = [];\n $primaryKeysDefn = \"\";\n $indexesDefn = \"\";\n\n $indexesArr = $this->\n indexes;\n\n foreach ($this->\n columns as $column => $parms) {\n\n $parms['type'] = strtoupper($parms['type']);\n\n if (!isset($parms['type']) ||\n !is_string($parms['type']) ||\n !$parms['type']) {\n\n $parms['type'] = 'VARCHAR';\n\n $parms['length'] = !isset($parms['length']) ||\n !is_int($parms['length']) ||\n $parms['length'] < 1 ? 1 : $parms['length'];\n }\n\n $type = $parms['type'];\n\n if (isset($parms['length']) &&\n is_int($parms['length']) &&\n $parms['length'] > 0) {\n\n $type .= \"({$parms['length']})\";\n }\n\n $columnsDefn[$column] = \"`{$column}` {$type}\";\n\n if (isset($parms['isnull']) &&\n $parms['isnull'] === false) {\n\n $columnsDefn[$column] .= \" NOT null\";\n }\n\n if (isset($parms['autoincrement']) &&\n $parms['autoincrement'] === true) {\n\n $columnsDefn[$column] .= \" AUTO_INCREMENT\";\n }\n\n if (isset($parms['default']) &&\n $parms['default']) {\n\n if (isset($parms['default']['function']) &&\n $parms['default']['function']) {\n\n $columnsDefn[$column] .= \" DEFAULT {$parms['default']['function']}\";\n } else if (is_string($parms['default'])) {\n\n $columnsDefn[$column] .= \" DEFAULT '{$parms['default']}'\";\n }\n }\n\n if (isset($parms['primary']) &&\n $parms['primary'] === true) {\n\n $primaryKeys[] = $column;\n }\n\n if (isset($parms['unique']) &&\n $parms['unique'] === true) {\n\n $columnsDefn[$column] .= \" UNIQUE\";\n }\n\n if (isset($parms['index']) &&\n $parms['index'] === true) {\n\n $columnsDefn[$column] .= \" INDEX\";\n }\n\n if (isset($parms['referencetable']) &&\n isset($parms['referencecolumn']) &&\n is_string($parms['referencetable']) &&\n is_string($parms['referencecolumn'])) {\n\n $columnsDefn[$column] .= \" REFERENCES `{$parms['referencetable']}` (`{$parms['referencecolumn']}`)\";\n }\n\n if (isset($parms['check']) &&\n is_string($parms['check'])) {\n\n $indexesArr[] = array(\n 'indextype' => 'CH',\n 'check' => $parms['check']\n );\n }\n }\n\n if (count($primaryKeys) == 1) {\n\n $columnsDefn[$primaryKeys[0]] .= \" PRIMARY KEY\";\n } else if (count($primaryKeys) > 1) {\n\n $primaryKeysDefn = \", PRIMARY KEY (`\" . implode($primaryKeys, \"`, `\") . \"`)\";\n }\n\n foreach ($indexesArr as $index => $parms) {\n\n $indexDefn = \"\";\n $indexName = \"\";\n\n if (is_string($index)) {\n\n $indexName = \" `{$index}`\";\n }\n\n if (!isset($parms['indextype'])) {\n\n $parms['indextype'] = 'I';\n }\n\n $parms['indextype'] = strtoupper($parms['indextype']);\n\n switch ($parms['indextype']) {\n default:\n case 'I':\n $indexDefn .= \"INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'K':\n $indexDefn .= \"KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'U':\n $indexDefn .= \"UNIQUE{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UK':\n $indexDefn .= \"UNIQUE KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'UI':\n $indexDefn .= \"UNIQUE INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FK':\n if (is_string($index)) {\n\n $indexDefn .= \"CONSTRAINT{$indexName} FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n } else {\n\n $indexDefn .= \"FOREIGN KEY (`\" . implode($parms['columns'], \"`, `\") . \"`) REFERENCES `{$parms['referencetable']}` (`\" . implode($parms['referencecolumns'], \"`, `\") . \"`)\";\n }\n break;\n case 'FT':\n $indexDefn .= \"FULLTEXT{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTK':\n $indexDefn .= \"FULLTEXT KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'FTI':\n $indexDefn .= \"FULLTEXT INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'S':\n $indexDefn .= \"SPATIAL{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SK':\n $indexDefn .= \"SPATIAL KEY{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'SI':\n $indexDefn .= \"SPATIAL INDEX{$indexName} (`\" . implode($parms['columns'], \"`, `\") . \"`)\";\n break;\n case 'CH':\n $indexDefn .= \"CHECK{$indexName} {$parms['check']}\";\n break;\n }\n\n $indexes[] = $indexDefn;\n }\n\n if (count($indexes)) {\n $indexesDefn = \", \" . implode($indexes, \", \");\n }\n\n $return .= \" `{$this->\n tables[0]}` (\" . implode($columnsDefn, \", \") . \"{$primaryKeysDefn}{$indexesDefn})\";\n\n return $return . \";\";\n }", "public function getCreateSql() {\n $sql = \"\";\n foreach ($this->tables as $tableName => $sqlTemplate) {\n $tmp = self::formatSql($sqlTemplate, $this->db->getTableSet());\n $sql .= (substr($tmp, -1) === ';') ? $tmp : $tmp . ';';\n } \n return $sql;\n }", "function createFields() {\n\tDB::exec(\"DROP TABLE IF EXISTS fields\");\n\t// create fields table\n\tDB::exec(\"CREATE TABLE fields (\n\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\tname VARCHAR(50) NOT NULL UNIQUE,\n\t\tcontent TEXT\n\t)\");\n\n\toutput(RESULT_INFO, \"Fields setup successfully completed\");\n\treturn 1;\n}", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "protected function _getCreateTablesStatement() {\n\t\t$models = $this->getGarpModels();\n\t\t$statement = '';\n\n\t\tforeach ($models as $model) {\n\t\t\t$statement .= $model->getCreateStatement();\n\t\t}\n\t\t\n\t\t$statement .= $this->getBindingModel()->getCreateStatement();\n\n\t\treturn $statement;\n\t}", "public function createTable($name, $fields=array(), $maxrecords=0, $id=0) {\n if (array_key_exists($name, $this->schema)){\n $this->debugLog(i18n_r(self::FILE.'/TABLE_CREATEERROR'));\n return false;\n }\n \n // quick validation\n if ($name!='_routes') $name = $this->str2Slug($name);\n if (!is_numeric($maxrecords) || empty($maxrecords)) $maxrecords = 0;\n if (!is_numeric($id) || empty($id)) $id = 0;\n \n // start building new schema for table\n $this->schema[(string)$name] = array();\n $this->schema[(string)$name]['id']= $id;\n $this->schema[(string)$name]['maxrecords'] = $maxrecords;\n \n // force $fields to be an array\n if (empty($fields)) $fields = array();\n\n // ensure ID field exists\n if (!array_key_exists('id', $fields)) {\n $idField = array(\n 'name' => 'id',\n 'type' => 'int',\n 'label' => 'ID Field',\n 'size' => 1,\n 'tableview' => 1,\n );\n $fields = array_merge(array($idField), $fields);\n }\n \n \n $dummyfield = array();\n \n // formats the array key for the field schema to be created and fills in defaults\n foreach ($fields as $key => $field) {\n if (is_array($field) && isset($field['name'])) {\n // fill in property defaults\n foreach ($this->fields['properties'] as $fieldKey => $fieldProperty) {\n $dummyfield[$fieldKey] = $fieldProperty['default'];\n if (!isset($fields[$key][$fieldKey])) {\n $field[$fieldKey] = $fieldProperty['default'];\n }\n }\n $fields[$field['name']] = $field;\n }\n unset($fields[$key]);\n }\n \n if (count($fields) == 1) {\n $dummyfield['name'] = 'dummy';\n $fields = array_merge($fields, array($dummyfield));\n }\n \n \n $this->schema[(string)$name]['fields'] = $fields;\n \n // create the folder and save the schema\n $this->createSchemaFolder($name);\n $this->saveSchema();\n $this->debugLog(i18n_r(self::FILE.'/TABLE_CREATESUCCESS'));\n \n // uncomment for debugging\n #var_dump($name);\n #var_dump($fields);\n #var_dump($maxrecords);\n #var_dump($id);\n #var_dump($this->schema);\n #var_dump($this->schema[$name]);\n \n if ($this->tableExists($name) && file_exists($this->directories['data']['core']['dir'].$name.'/')) {\n return true;\n }\n else return false;\n }", "public function createTable()\n\t{\n\t\t$table = $this->getTableName();\n\t\t$indexes = $this->defineIndexes();\n\t\t$columns = array();\n\n\t\t// Add any Foreign Key columns\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$required = !empty($config['required']);\n\t\t\t$columns[$config[2]] = array('column' => ColumnType::Int, 'required' => $required);\n\n\t\t\t// Add unique index for this column?\n\t\t\t// (foreign keys already get indexed, so we're only concerned with whether it should be unique)\n\t\t\tif (!empty($config['unique']))\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($config[2]), 'unique' => true);\n\t\t\t}\n\t\t}\n\n\t\t// Add all other columns\n\t\tforeach ($this->defineAttributes() as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\n\t\t\t// Add (unique) index for this column?\n\t\t\t$indexed = !empty($config['indexed']);\n\t\t\t$unique = !empty($config['unique']);\n\n\t\t\tif ($unique || $indexed)\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($name), 'unique' => $unique);\n\t\t\t}\n\n\t\t\t$columns[$name] = $config;\n\t\t}\n\n\t\t// Create the table\n\t\tblx()->db->createCommand()->createTable($table, $columns);\n\n\t\t// Create the indexes\n\t\tforeach ($indexes as $index)\n\t\t{\n\t\t\t$columns = ArrayHelper::stringToArray($index['columns']);\n\t\t\t$unique = !empty($index['unique']);\n\t\t\t$name = \"{$table}_\".implode('_', $columns).($unique ? '_unique' : '').'_idx';\n\t\t\tblx()->db->createCommand()->createIndex($name, $table, implode(',', $columns), $unique);\n\t\t}\n\t}", "public function createTable( $table ) {\n\t\t$rawTable = $this->safeTable($table,true);\n\t\t$table = $this->safeTable($table);\n\n\t\t$sql = ' CREATE TABLE '.$table.' (\n \"id\" integer AUTO_INCREMENT,\n\t\t\t\t\t CONSTRAINT \"pk_'.$rawTable.'_id\" PRIMARY KEY(\"id\")\n\t\t )';\n\t\t$this->adapter->exec( $sql );\n\t}", "public function createTable($tableName, $schemaName, $definition){ }", "function mmrpg_get_create_table_sql($table_name, $table_settings, $use_prod_if_available = false){\n if (!isset($table_settings['export_table']) || $table_settings['export_table'] !== true){ return false; }\n global $db, $table_def_sql_template;\n $table_name_string = \"`{$table_name}`\";\n if ($use_prod_if_available\n && defined('MMRPG_CONFIG_PULL_LIVE_DATA_FROM')\n && MMRPG_CONFIG_PULL_LIVE_DATA_FROM !== false){\n $prod_db_name = 'mmrpg_'.(defined('MMRPG_CONFIG_IS_LIVE') && MMRPG_CONFIG_IS_LIVE === true ? 'live' : 'local');\n $prod_db_name .= '_'.MMRPG_CONFIG_PULL_LIVE_DATA_FROM;\n $table_name_string = \"`{$prod_db_name}`.{$table_name_string}\";\n }\n $table_def_sql = $db->get_value(\"SHOW CREATE TABLE {$table_name_string};\", 'Create Table');\n $table_def_sql = preg_replace('/(\\s+AUTO_INCREMENT)=(?:[0-9]+)(\\s+)/', '$1=0$2', $table_def_sql);\n $table_def_sql = preg_replace('/^CREATE TABLE `/', 'CREATE TABLE IF NOT EXISTS `', $table_def_sql);\n $table_def_sql = rtrim($table_def_sql, ';').';';\n $final_table_def_sql = $table_def_sql_template;\n $final_table_def_sql = str_replace('{{TABLE_NAME}}', $table_name, $final_table_def_sql);\n $final_table_def_sql = str_replace('{{TABLE_DEF_SQL}}', $table_def_sql, $final_table_def_sql);\n return $final_table_def_sql;\n}", "function createTableToTemplates(){\n\n\tglobal $mysqli,$templatesTableName;\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `$templatesTableName` (\n\t `id` int(8) NOT NULL AUTO_INCREMENT,\n\t `clienteName` varchar(100) NOT NULL,\n\t `method` text NOT NULL,\n\t `created` TIMESTAMP,\n\t PRIMARY KEY (`id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1\";\t\n\n\tif (!$mysqli->query($create)) {\n\t\tshowErrors();\n\t}\n\treturn true;\n}", "public function create_table($table, $definition, $index=array()){\n\t\t$create_sql = \"CREATE TABLE $table (\";\n\t\tif(!is_array($definition)){\n\t\t\tnew DbException(\"Definici&oacute;n invalida para crear la tabla '$table'\");\n\t\t\treturn false;\n\t\t}\n\t\t$create_lines = array();\n\t\t$index = array();\n\t\t$unique_index = array();\n\t\t$primary = array();\n\t\t$not_null = \"\";\n\t\t$size = \"\";\n\t\tforeach($definition as $field => $field_def){\n\t\t\tif(isset($field_def['not_null'])){\n\t\t\t\t$not_null = $field_def['not_null'] ? 'NOT NULL' : '';\n\t\t\t} else {\n\t\t\t\t$not_null = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['size'])){\n\t\t\t\t$size = $field_def['size'] ? '('.$field_def['size'].')' : '';\n\t\t\t} else {\n\t\t\t\t$size = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['index'])){\n\t\t\t\tif($field_def['index']){\n\t\t\t\t\t$index[] = \"INDEX($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['unique_index'])){\n\t\t\t\tif($field_def['unique_index']){\n\t\t\t\t\t$index[] = \"UNIQUE($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['primary'])){\n\t\t\t\tif($field_def['primary']){\n\t\t\t\t\t$primary[] = \"$field\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['auto'])){\n\t\t\t\tif($field_def['auto']){\n\t\t\t\t\t$gen = $this->fetch_one(\"SELECT COUNT(*) FROM RDB\\$GENERATORS WHERE RDB\\$GENERATOR_NAME = UPPER('{$table}_{$field}_seq')\");\n\t\t\t\t\tif(!$gen[0]){\n\t\t\t\t\t\t$this->query(\"INSERT INTO RDB\\$GENERATORS (RDB\\$GENERATOR_NAME) VALUES (UPPER('{$table}_{$field}_seq'))\");\n\t\t\t\t\t}\n\t\t\t\t\t$this->query(\"SET GENERATOR {$table}_{$field}_seq TO 1;\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['extra'])){\n\t\t\t\t$extra = $field_def['extra'];\n\t\t\t} else {\n\t\t\t\t$extra = \"\";\n\t\t\t}\n\t\t\t$create_lines[] = \"$field \".$field_def['type'].$size.' '.$not_null.' '.$extra;\n\t\t}\n\t\t$create_sql.= join(',', $create_lines);\n\t\t$last_lines = array();\n\t\tif(count($primary)){\n\t\t\t$last_lines[] = 'PRIMARY KEY('.join(\",\", $primary).')';\n\t\t}\n\t\tif(count($index)){\n\t\t\t$last_lines[] = join(',', $index);\n\t\t}\n\t\tif(count($unique_index)){\n\t\t\t$last_lines[] = join(',', $unique_index);\n\t\t}\n\t\tif(count($last_lines)){\n\t\t\t$create_sql.= ','.join(',', $last_lines).')';\n\t\t}\n\t\treturn $this->query($create_sql);\n\n\t}", "private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}", "function CreateTable($tableName, $tableDefinition)\n{\n $stmt = SQL_CREATE_TABLE . \" IF NOT EXISTS $tableName ($tableDefinition);\";\n return mysql_query($stmt);\n}", "public static function generateDatabase()\n\t{\n\t\t$entities\t=\tself::getEntities();\n\t\t$query\t\t=\tself::$current_db->query('SHOW TABLES');\n\t\t$tables\t\t=\tarray();\n\n\t\twhile($table = $query->fetch(\\PDO::FETCH_NUM))\n\t\t\t$tables[]\t=\tstrtolower($table[0]);\n\n\t\tforeach($entities as $entity)\n\t\t{\n\t\t\tif( ! in_array(strtolower($entity::getTableName()), $tables))\n\t\t\t\t$entity::createTable();\n\t\t\telse\n\t\t\t\t$entity::updateTable();\n\t\t}\n\t}", "function glv_create_tables(){\r\n global $wpdb;\r\n \r\n //el nombre de la tabla, utilizamos el prefijo de wordpress\r\n $table_forms = $wpdb->prefix.'glv_forms'; \r\n\r\n //sql con el statement de la tabla \r\n $glv_form = \"CREATE TABLE \".$table_forms.\"(\r\n for_id int(11) NOT NULL AUTO_INCREMENT,\r\n for_name varchar(100) DEFAULT NULL,\r\n for_value text DEFAULT NULL,\r\n for_date date,\r\n UNIQUE KEY for_id (for_id)\r\n )\";\r\n\r\n //upgrade contiene la función dbDelta la cuál revisará si existe la tabla o no\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n \r\n //creamos la tabla\r\n dbDelta($glv_form);\r\n }", "protected function createTables() {\n $foreignKeys = array();\n $this->sortTableQueue($this->_tableCreateQueue, $foreignKeys);\n foreach($this->_tableCreateQueue as $table => $fields) {\n $this->createTable($table, $fields);\n }\n foreach($foreignKeys as $table => $columns) {\n $this->useTable($table);\n foreach($columns as $column => $module) {\n $this->useColumn($column.\"_id\");\n $this->toForeignKey($module.\"_\".$column);\n }\n }\n $this->_tableCreateQueue = array();\n }", "public function create($if_not_exists = false) {\n $db = DB::getInstance();\n\n $query = [];\n $query[] = 'CREATE TABLE';\n if ($if_not_exists) {\n $query[] = 'IF NOT EXISTS';\n }\n $query[] = $db->quoteIdentifier($this->prefix . $this->name);\n\n $fields = [];\n foreach ($this->fields as $item) {\n $fields[] = ' ' . $item;\n }\n foreach ($this->keys as $item) {\n $fields[] = ' ' . $item;\n }\n\n $query[] = \"(\\n\" . implode(\",\\n\", $fields) . \"\\n)\";\n\n return implode(' ', $query);\n }", "function createTable() {\n print \"\\nCreate table: \".$dbtable.\"\\n\";\n if (createDB()) {\n print \"OK\\n\";\n }\n interceptExit();\n }", "public function createTable($name, array $fields, array $options = array())\r\n {\r\n $this->conn->beginTransaction();\r\n\r\n foreach ($this->createTableSql($name, $fields, $options) as $sql) {\r\n $this->conn->exec($sql);\r\n }\r\n\r\n $this->conn->commit();\r\n }", "function create()\n {\n $this->definitions['columns'] =& $this->columns;\n return $this->connection->create_table($this->name, $this->definitions);\n }", "public function createTable()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `\".self::TABLE.\"`(\n `migration` VARCHAR(20) NOT NULL,\n `up` VARCHAR(1000) NOT NULL,\n `down` VARCHAR(1000) NOT NULL\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n \";\n\n $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n }", "public function create(array $inputs)\n\t{\n\t\t$this->Sale->crate_temp_table($inputs);\n\t}", "public function createTable($name, array $opts = null);", "public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }", "public function createSQL() {\n $sql = '';\n\n foreach($this->tables as $table) {\n \t$create = $table->createSQL();\n \tif($create !== null) {\n\t\t $sql .= $create . \"\\n\";\n\t }\n }\n\n foreach($this->makers as $maker) {\n $sql .= $maker->createSQL() . \"\\n\";\n }\n\n return $sql;\n }", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n instance char(32) NOT NULL, \n memberid int(11) NOT NULL, \n interactid int(11) NOT NULL, \n time datetime NOT NULL, \n username varchar(150) NOT NULL, \n userrole char(1) NOT NULL, \n PRIMARY KEY (instance), \n INDEX (interactid));\n\n\nSQL;\n\n\t\treturn $query;\n\t}", "function table_creation(){\n\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'wiki';\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS `$table`(\n\t\t\t\t`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t`post_id` bigint(20) NOT NULL,\n\t\t\t\t`author_id` bigint(20) NOT NULL,\t\n\t\t\t\t`post_content` longtext collate utf8_general_ci,\n\t\t\t\t`percent` int(100),\n\t\t\t\t`matched_keys` longtext collate utf8_general_ci,\n\t\t\t\t`time` TIMESTAMP,\t\t\t\t\n\t\t\t\tPRIMARY KEY(id)\n\t\t\t\t\n\t\t\t\t)\";\n\t\t\t//loading the dbDelta function manually\n\t\t\tif(!function_exists('dbDelta')) :\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\t\tendif;\n\t\t\tdbDelta($sql);\n\t}", "public abstract function createFields();", "public function newTable($name, $attr) {\n $t= new DBTable($name);\n foreach ($attr as $key => $definitions) {\n $t->attributes[]= new DBTableAttribute(\n $key,\n $definitions[0], // Type\n TRUE,\n FALSE,\n $definitions[1] // Length\n );\n }\n $t->indexes[]= new DBIndex(\n 'PRIMARY',\n array('deviceinfo_id')\n );\n $t->indexes[0]->unique= TRUE;\n $t->indexes[0]->primary= TRUE;\n $t->indexes[]= new DBIndex(\n 'deviceinfo_I_serial',\n array('serial_number')\n );\n return $t;\n }", "public function create_table()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `whollycoders`.`table_contacts_171005_1207` (\n `contact_ID` INT NOT NULL AUTO_INCREMENT , \n `contact_firstname` VARCHAR(50) NOT NULL , \n `contact_lastname` VARCHAR(50) NOT NULL , \n `contact_phone` VARCHAR(20) NOT NULL , \n `contact_email` VARCHAR(100) NOT NULL , \n `contact_date_added` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , \n PRIMARY KEY (`contact_ID`)\n ) ENGINE = InnoDB;\";\n $result = $this->process_query($sql);\n }", "public function create_table_config(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_config} (\n `id` varchar(100),\n `day` varchar(50) DEFAULT NULL,\n `range` varchar(50) DEFAULT NULL,\n `qty` smallint DEFAULT 0,\n `type` varchar(50) DEFAULT NULL,\n `order` smallint DEFAULT 0,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function createTables() {\n \n foreach($this->G->tableInfo as $table) {\n $this->tables[$table[\"title\"]] = new IdaTable($table[\"title\"]);\n } \n }", "public function create_table($tablename, $vararray) {\n try {\n $str = \"SET AUTOCOMMIT = 0;\\n\";\n $str .= \"START TRANSACTION;\\n\";\n $str .= \"CREATE TABLE `\".$tablename.\"` (\\n\" ;\n $str .= \"\t`id` int(11) NOT NULL,\\n\";\n foreach($vararray as $row) {\n if ($row['name'] == \"id\" || $row['name'] == \"status\") {\n $row['name'] = $tablename.\"_\".$row['name']; // change name\n }\n $str .= \"\t`\".$row['name'].\"` \".$row['type'];\n if ($row['notnull']) $str .= \" NOT NULL\";\n if ($row['default']) $str .= \" DEFAULT '\".$row['default'].\"'\";\n $str .= \",\\n\";\n }\n $str .= \"\t`status` enum('INACTIVE','LOCKED','ACTIVE') NOT NULL DEFAULT 'INACTIVE'\\n\";\n $str .= \") ENGINE=INNODB;\\n\";\n $str .= \"ALTER TABLE `\".$tablename.\"`\\n\";\n $str .= \"\tADD PRIMARY KEY (`id`);\\n\";\n $str .= \"ALTER TABLE `\".$tablename.\"`\\n\";\n $str .= \"\tMODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\\n\";\n $str .= \"COMMIT;\\n\";\n //echo $str.\"<br>\";\n $result = $this->conn->query($str);\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n }", "protected abstract function createTestTable();", "private function prepare($arguments)\n {\n \n $data = explode( '|', $arguments );\n \n $this->tableName = $data[0];\n \n $this->className = 'Create'.studly_case(strtolower( $this->tableName )).'Table';\n \n $this->fileName = date('Y_m_d_His').\"_create_\".strtolower($this->tableName).\"_table\";\n \n if( count( array_filter($data) ) > 1 )\n {\n \n array_shift($data);\n \n foreach($data as $list)\n {\n \n $type = explode(':', $list)[0];\n \n $columns = array_filter( explode( ',', explode(':', $list)[1] ) );\n \n if( $type == 'foreign' )\n {\n \n foreach( $columns as $column )\n {\n \n $foreign_key = explode('-', $column)[0];\n $foreign_table = explode('-', $column)[1];\n \n $this->columns .= '\n $table->integer(\\''.$foreign_key.'\\')->unsigned();\n $table->foreign(\\''.$foreign_key.'\\')->references(\\'id\\')->on(\\''.$foreign_table.'\\')->onDelete(\\'cascade\\');';\n \n }\n \n } elseif( $type == \"nullforeign\" )\n {\n \n foreach( $columns as $column )\n {\n \n $foreign_key = explode('-', $column)[0];\n $foreign_table = explode('-', $column)[1];\n \n $this->columns .= '\n $table->integer(\\''.$foreign_key.'\\')->unsigned()->nullable();\n $table->foreign(\\''.$foreign_key.'\\')->references(\\'id\\')->on(\\''.$foreign_table.'\\')->onDelete(\\'set null\\');';\n \n }\n \n } else{\n \n foreach( $columns as $column )\n {\n \n $type = str_replace('tiny', 'tinyInteger', $type);\n $type = str_replace('tinyIntegerInteger', 'tinyInteger', $type);\n $type = str_replace('time', 'timestamp', $type);\n $type = str_replace('timestamptimestamp', 'timestamp', $type);\n \n $this->columns .= '\n $table->'.$type.'(\\''.$column.'\\');';\n \n }\n \n }\n \n }\n \n }\n \n return $data;\n \n }", "abstract protected function createFields();", "private function _createTablesFromRecords($records)\n\t{\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\tCraft::log('Creating table for record:'. get_class($record));\n\t\t\t$record->createTable();\n\t\t}\n\t}", "function createTable ($name, $query)\n\t{\n\t\tqueryMysql(\"CREATE TABLE IF NOT EXISTS $name($query)\");\n\t\techo \"Table $name created or already exists.<br>\";\n\t}", "public function createTable($connection, $tableName, $fields, $foreignKeys)\n {\n $queryString = \"CREATE TABLE [dbo].[$tableName] \";\n\n $COLUMNS = \"\";\n if (empty($fields))\n return;\n foreach ($fields as $columns)\n {\n foreach ($columns as $column => $type)\n {\n if (\"\" !== $COLUMNS)\n $COLUMNS .= \", \";\n\n $COLUMNS .= \"$column $type\";\n }\n }\n\n $KEYS = \"\";\n if (!empty($foreignKeys))\n {\n foreach ($foreignKeys as $foreignKey)\n {\n $KEYS .= \", \";\n $KEYS .= \"$foreignKey\";\n }\n }\n $queryString .= \"($COLUMNS $KEYS);\";\n print_r(\"Query : \");\n print_r($queryString);\n $resultSet = sqlsrv_query($connection, $queryString, array());\n if (!$resultSet)\n {\n print_r(\"ERROR!\");\n print_r(sqlsrv_errors());\n return;\n }\n print_r(\"Return : \");\n print_r(sqlsrv_execute($resultSet));\n return;\n }", "function create_table_list(){\n $tables = \"{$this->table_name}\";\n if(isset($this->joined_tables) && count($this->joined_tables)){\n foreach($this->joined_tables as $t){\n if(array_key_exists('TABLE', $t) && array_key_exists('ON', $t)){\n $type = (array_key_exists('TYPE', $t)? $t['TYPE']: \"INNER JOIN\");\n $tables .= \" $type {$t['TABLE']} ON {$t['ON']}\";\n }\n }\n }\n return $tables;\n }", "public function create_tables() {\n global $wpdb;\n\n $charset_collate = $wpdb->get_charset_collate();\n\n $schema = \"CREATE TABLE IF NOT EXISTS`{$wpdb->prefix}cmp_data` (\n `code` bigint(20) NOT NULL AUTO_INCREMENT,\n `vendor_provider` longtext DEFAULT NULL,\n `contract_subscription_entity_used` longtext DEFAULT NULL,\n `product_type` longtext DEFAULT NULL,\n `product_description` longtext DEFAULT NULL,\n `contract_value` longtext DEFAULT NULL,\n `contract` longtext DEFAULT NULL,\n `contract_currency` longtext DEFAULT NULL,\n `contract_id` longtext DEFAULT NULL,\n `contract_signed_date` longtext DEFAULT NULL,\n `by_user` longtext DEFAULT NULL,\n `no_of_users` longtext DEFAULT NULL,\n `start_date` longtext DEFAULT NULL,\n `end_date` longtext DEFAULT NULL,\n `coordinator_person_in_change` longtext DEFAULT NULL,\n `vendor_person_in_change` longtext DEFAULT NULL,\n `vendor_email` longtext DEFAULT NULL,\n `vendor_contact` longtext DEFAULT NULL,\n `payment_entity_used` longtext DEFAULT NULL,\n `payment_amount` longtext DEFAULT NULL,\n `payment_currency` longtext DEFAULT NULL,\n `monthly_quarterly_semannual_annual` longtext DEFAULT NULL,\n `invoice_id` longtext DEFAULT NULL,\n `invoice_date` longtext DEFAULT NULL,\n `approval_document` longtext DEFAULT NULL,\n `upload_invoice` longtext DEFAULT NULL,\n `subscription_module` longtext DEFAULT NULL,\n `fullfillment_name` longtext DEFAULT NULL,\n `fullfillment_email` longtext DEFAULT NULL,\n `location_country_user` longtext DEFAULT NULL,\n `amount_per_user` longtext DEFAULT NULL,\n `department_user` longtext DEFAULT NULL,\n PRIMARY KEY (`code`)\n ) {$charset_collate}\";\n// exit($schema);\n if ( ! function_exists( 'dbDelta' ) ) {\n require_once ABSPATH . 'wp-admin/includes/upgrade.php';\n }\n\n dbDelta( $schema );\n }", "public function compileCreate(Blueprint $blueprint, Fluent $command)\n {\n $columns = implode ( ', ', $this->getColumns ( $blueprint ) );\n $sql = 'create table ' . $this->wrapTable ( $blueprint ) . \" ($columns\";\n $sql .= ( string ) $this->addForeignKeys ( $blueprint );\n $sql .= ( string ) $this->addPrimaryKeys ( $blueprint );\n return $sql .= ')';\n }", "function create_tables($pdo){\n $pdo->exec(SQL_CREATE_FILM_TABLE);\n $pdo->exec(SQL_CREATE_ORDER_CHECK_TABLE);\n $pdo->exec(SQL_CREATE_CARRIER_TABLE);\n $pdo->exec(SQL_CREATE_FILM_CARIER_TABLE);\n $pdo->exec(SQL_CREATE_GANRE_TABLE);\n\n $pdo->exec(SQL_CREATE_FILM_GANRE_TABLE);\n\n $pdo->exec(SQL_CREATE_DIRECTOR_TABLE);\n $pdo->exec(SQL_CREATE_FILM_DIRECTOR_TABLE);\n $pdo->exec(SQL_CREATE_ACTOR_TABLE);\n $pdo->exec(SQL_CREATE_FILM_ACTOR_TABLE);\n}", "public function get_creation_sql($node_schema, $node_table) {\n if ( $node_schema->getName() != 'schema' ) {\n throw new exception(\"node_schema object element name is not schema. check stack for offending caller\");\n }\n\n if ( $node_table->getName() != 'table' ) {\n throw new exception(\"node_table object element name is not table. check stack for offending caller\");\n }\n\n $table_name = pgsql8_diff::get_quoted_name($node_schema['name'], dbsteward::$quote_schema_names) . '.' . pgsql8_diff::get_quoted_name($node_table['name'], dbsteward::$quote_table_names);\n\n $sql = \"CREATE TABLE \" . $table_name . \" (\\n\";\n\n foreach(dbx::get_table_columns($node_table) as $column) {\n $sql .= \"\\t\"\n . pgsql8_column::get_full_definition(dbsteward::$new_database, $node_schema, $node_table, $column, false)\n . \",\\n\";\n }\n\n $sql = substr($sql, 0, strlen($sql) - 2);\n $sql .= \"\\n)\";\n if (isset($node_table['inherits']) && strlen($node_table['inherits']) > 0) {\n $sql .= \" INHERITS \" . $node_table['inherits'];\n }\n $sql .= \";\";\n\n // table comment\n if (isset($node_table['description']) && strlen($node_table['description']) > 0) {\n $sql .= \"\\nCOMMENT ON TABLE \" . $table_name . \" IS '\" . pg_escape_string(dbsteward::string_cast($node_table['description'])) . \"';\\n\";\n }\n\n foreach(dbx::get_table_columns($node_table) as $column) {\n if ( isset($column['statistics']) ) {\n $sql .= \"\\nALTER TABLE ONLY \"\n . $table_name\n . \" ALTER COLUMN \" . pgsql8_diff::get_quoted_name($column['name'], dbsteward::$quote_column_names)\n . \" SET STATISTICS \" . $column['statistics'] . \";\\n\";\n }\n\n // column comments\n if ( isset($column['description']) && strlen($column['description']) > 0 ) {\n $sql .= \"\\nCOMMENT ON COLUMN \" . $table_name . '.' . pgsql8_diff::get_quoted_name($column['name'], dbsteward::$quote_column_names)\n . \" IS '\" . pg_escape_string(dbsteward::string_cast($column['description'])) . \"';\\n\";\n }\n }\n\n // table ownership\n if (isset($node_table['owner']) && strlen($node_table['owner']) > 0) {\n // see dtd owner attribute enum: ROLE_OWNER, ROLE_APPLICATION, ROLE_SLONY\n // map ROLE_ enums to database->role->owner etc\n $owner = xml_parser::role_enum(dbsteward::$new_database, $node_table['owner']);\n $sql .= \"\\nALTER TABLE \" . $table_name . \" OWNER TO \" . $owner . \";\\n\";\n\n // set serial columns ownership based on table ownership\n foreach($node_table->column AS $column ) {\n if ( preg_match(pgsql8::PATTERN_TABLE_LINKED_TYPES, dbsteward::string_cast($column['type'])) > 0 ) {\n $sequence_name = pgsql8::identifier_name($node_schema['name'], $node_table['name'], $column['name'], '_seq');\n // we use alter table so we change the ownership of the sequence tracking counter, alter sequence can't do this\n $sql .= \"\\nALTER TABLE \" . $node_schema['name'] . '.' . $sequence_name . \" OWNER TO \" . $owner . \";\\n\";\n }\n }\n }\n\n return $sql;\n }", "protected function generateDbTables()\n\t{\n\t\t$dbTables = $this->getDbTables();\n\t\t\n\t\t//get the describe of the table\n\t\tforeach ($dbTables as $table) {\n\t\t\t$describeTable = $this->describeTable($table);\n\t\t\t\n\t\t\tif ($describeTable) {\n\t\t\t\t$primaryKey = $this->getPrimaryKey($describeTable);\n\t\t\t\t$code = $this->generateDbTableCode($table, $primaryKey);\n\t\t\t\t$this->saveDbTableFile($code);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function createTable($tableName, array $columns);", "function create_table(){\n global $wpdb;\n\n require_once(ABSPATH . \"wp-admin\" . '/includes/upgrade.php');\n\n $table_name = $wpdb->base_prefix . $this->table;\n\n $sql = \"CREATE TABLE IF NOT EXISTS $table_name (\n id bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n post_id bigint(20) unsigned,\n blog_id mediumint(9) NOT NULL,\n post_author bigint(20) unsigned,\n post_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_date_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_content longtext,\n post_title text,\n post_excerpt text,\n post_status varchar(20) DEFAULT 'post_status',\n post_type varchar(20) DEFAULT 'post',\n post_modified_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n guid varchar(255),\n UNIQUE KEY id (id)\n );\";\n\n dbDelta( $sql );\n }", "public function create($fields, $withId = false, $tableName = \"\", $typeText = false, $index = '')\n\t{\n\t\tif (!$tableName)\n\t\t{\n\t\t\t$tableName = uniqid();\n\t\t}\n\t\t$this->tableName = 'temp_' . $tableName;\n\t\n\t\t//sanitize columns\n\t\t$this->setColumns($fields, $withId, $typeText);\n\t\n\t\t$fieldString = \"\";\n\t\tforeach ($this->columns as $col => $type)\n\t\t{\n\t\t\t$fieldString .= \",$col $type\";\n\t\t}\n\t\n\t\t$sql = \"CREATE TEMPORARY TABLE IF NOT EXISTS $this->tableName (\" . substr($fieldString, 1) . ' )';\t\n\t\t\\DB::statement($sql);\n\t\n\t\tif($index)\n\t\t{\n\t\t\t$sql = \"ALTER TABLE {$this->tableName} ADD INDEX ({$index})\";\n\t\t\t\\DB::statement($sql);\n\t\t}\n\t\treturn $this->tableName;\n\t}", "public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }" ]
[ "0.77528113", "0.7174744", "0.7074879", "0.70738554", "0.7069855", "0.70600814", "0.69637346", "0.69040567", "0.68488264", "0.68385315", "0.68304527", "0.67824686", "0.67729896", "0.67478955", "0.67433393", "0.67345285", "0.67339265", "0.66211396", "0.6581889", "0.65568125", "0.6551965", "0.6542028", "0.6532661", "0.64977545", "0.648378", "0.64807445", "0.6478831", "0.6476538", "0.6475532", "0.64736295", "0.6466047", "0.6437204", "0.640307", "0.6398865", "0.6396152", "0.6390561", "0.6357565", "0.6351878", "0.63391125", "0.6321335", "0.6306488", "0.630195", "0.62977356", "0.6294922", "0.6254423", "0.6253074", "0.62424344", "0.62158895", "0.62108", "0.6210632", "0.6202902", "0.62005603", "0.61992383", "0.6192409", "0.619134", "0.61858886", "0.61810815", "0.6180592", "0.61755383", "0.61743176", "0.6167385", "0.61635834", "0.6159909", "0.6159217", "0.6157618", "0.61556643", "0.61550885", "0.6154083", "0.6147091", "0.6146143", "0.61413133", "0.61280924", "0.6124462", "0.61222064", "0.61090815", "0.6103247", "0.60997933", "0.6098686", "0.6094026", "0.60888255", "0.60856295", "0.60810894", "0.60784906", "0.60624695", "0.6048773", "0.6048129", "0.603932", "0.60245174", "0.60220706", "0.6020867", "0.6018686", "0.6016278", "0.60139155", "0.6003693", "0.60027313", "0.5996561", "0.5993473", "0.59852564", "0.59828436", "0.59736633" ]
0.67293704
17
This is actually the rate, wrong wording...
public function getAmountTotal(): float { return $this->amountTotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rate()\n {\n\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "function interestRate($item_id){\n\t\treturn 0.1;\n\t}", "public function getRate() {\n return $this->rate;\n }", "function calculate_rate($rate, $type, $bits) {\n\n\t$output = 0;\n\n\tif ($type == \"overage\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $bits - $rate[\"rate_overage\"][\"threshold\"];\n\t\t}else{\n\t\t\t$bits = 0;\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_overage\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_overage\"][\"amount\"];\n\t} elseif ($type == \"committed\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $rate[\"rate_overage\"][\"threshold\"];\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_committed\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_committed\"][\"amount\"];\n\t\tif (isset($rate[\"rate_committed\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate_committed\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate_committed\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"regular\") {\n\t\t$multi = unit_multi($rate[\"rate\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate\"][\"amount\"];\n\t\tif (isset($rate[\"rate\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"fixed\") {\n\t\t$output = $rate[\"rate_fixed\"][\"amount\"];\n\t}\n\t\n\treturn round($output, 4);\n\n}", "public function getBaseToOrderRate();", "function NSNrate($SFR){ return 0.156*($SFR/(12.26*Msun)); }", "public function getStoreToOrderRate();", "public function getExchangeRate();", "function getExchangeRate($currency);", "public function getShippingrate()\n\t{\n\t\tinclude_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/shipping.php';\n\t\t$shipping = new shipping;\n\t\techo $shipping->getShippingrate_calc();\n\t\texit;\n\t}", "public function getBaseToGlobalRate();", "public function getAmountRate()\n {\n return $this->amountRate;\n }", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "function get_payment_rate($subtotal) {}", "public function getStoreToBaseRate();", "private function _rating($token)\n {\n switch ($token) {\n case '(':\n return 100;\n break;\n \n case '&&':\n return 80;\n break;\n \n case '||':\n return 79;\n break;\n \n case ')':\n return 0;\n break;\n }\n }", "public function getRatePerSecond()\n {\n return $this->rate_per_second;\n }", "public function getDiscountRate(){\n return $this->getParameter('discount_rate');\n }", "public function getRate(Currency $currency);", "protected function LiveDefaultRate()\n {\n $this->defaultTaxObjects();\n\n return self::$default_tax_objects_rate;\n }", "public function unRate()\n {\n\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getTaxRate();", "function getScoreCost (&$labor, $quantity) {\n\tif ($_POST[\"score\"] == \"score\") {\n\t\t$scoreLabor = (HOUR * .16);\n\t\t$scoreLabor += (($quantity * .000833) * HOUR);\n\t}\nelse {\n\t$scoreLabor = 0;\n\t}\n$labor += $scoreLabor;\n}", "function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }", "private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }", "protected function LiveCurrentRate()\n {\n $this->currentTaxObjects();\n\n return self::$current_tax_objects_rate;\n }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public function user_answer_rate() {\n return (float) number_format($this->usersanswered / $this->postsanswered, 2);\n }", "function getBitRate(){\n\t\treturn round($this->bitRate,2);\n\t}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "private function opinion($skill){\n if($skill->my_rate==1){ //5 star\n $calculatedOpinionPoint=5;\n }elseif($skill->my_rate==2){ //3 star\n $calculatedOpinionPoint=3;\n }elseif($skill->my_rate==3){ //1 star\n $calculatedOpinionPoint=1;\n }else{\n $calculatedOpinionPoint=1;\n }\n $finalOpinionPoint=$calculatedOpinionPoint*Config::get('rate')['opinion']['weight'];\n return $finalOpinionPoint;\n }", "public function getAvgRate()\n {\n $avg = 0;\n $nb = 0;\n if (!empty($this->getRates())) {\n foreach($this->getRates() as $rate) {\n $avg += $rate->getNbStar();\n $nb++;\n }\n $avg /= $nb;\n }\n return $avg;\n }", "public function getCompressRate(): string\n {\n }", "private function getINRto1gGOLD(){\n $client = new Client();\n\n $crawler = $client->request('GET','https://www.policybazaar.com/gold-rate/');\n $INR_10g_Gold = $crawler->filterXPath(\"//div[contains(@class,'dailyGoldrate')]\")->text();\n //removing , and converting to float\n $INR_10g_Gold_R = floatval (str_replace(\",\",\"\",$INR_10g_Gold));\n return($INR_10g_Gold_R/10);\n }", "function tep_get_tax_rate_value($class_id) {\n return tep_get_tax_rate($class_id, -1, -1);\n }", "function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "function __toString()\n {\n return $this->rate.\"\";\n }", "public function rate($rate = \"\")\n\t{\n\t\tif (empty($rate) || $rate == \"?\")\n\t\t{\n\t\t\treturn $this->CLI->intQuery($this->SqueezePlyrID.\" rate ?\");\n\t\t}\n\t\tif (!is_numeric($rate))\n\t\t{\n\t\t\tuser_error(\"rate() only accepts numeric values or ?.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" rate \".$rate);\n\t}", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function actionRate()\n\t{\n\t\t$note_id = $_POST['note_id'];\n\t\t$student_id = $_POST['student_id'];\n\t\t$rating = $_POST['rating'];\n\n\t\t$model = $this->loadModel($note_id);\n\t\t$model->rate($student_id, $rating);\n\n\t\t$totalRating = $model->getTotalRating();\n\t\t$ratersCount = $model->getRatersCount();\n\n\t\tif ( ! $totalRating)\n\t\t\techo 'N/A';\n\t\telse\n\t\t\techo '' . ((double)$totalRating / $ratersCount) . ' (dari ' . $ratersCount . ' pengguna)';\n\t}", "function calculate_rating($sentence_words){\r\n\t\t$rating = 0;\r\n\t\tforeach ($sentence_words as $word => $count){\r\n\t\t\tif (!isset($this->word_stats[$word])) continue;\r\n\t\t\t$word_rating = $count * $this->word_stats[$word];\r\n\t\t\t$rating += $word_rating;\r\n\t\t}\r\n\t\treturn $rating;\r\n\t}", "protected function _getRate($row)\n {\n return 1;\n }", "public function soundScore();", "public function getRateTextAttribute()\n {\n $text = '';\n if ((float) $this->base_rate) {\n $text .= store_currency($this->base_rate).' + ';\n }\n if ((float) $this->per_item_rate) {\n $text .= store_currency($this->per_item_rate).' '.lang('store.shipping_rule_per_item').' + ';\n }\n if ((float) $this->per_weight_rate) {\n $text .= store_currency($this->per_weight_rate).' '.lang('store.shipping_rule_per_weight_unit').' + ';\n }\n if ((float) $this->percent_rate) {\n $text .= $this->percent_rate.'% '.lang('store.shipping_of_order_total');\n }\n $text = trim($text, ' +');\n if ((float) $this->min_rate) {\n $text .= ', '.sprintf(lang('store.shipping_with_a_min_of'), store_currency($this->min_rate));\n }\n if ((float) $this->max_rate) {\n $text .= ', '.sprintf(lang('store.shipping_up_to_a_max_of'), store_currency($this->max_rate));\n }\n $text = trim($text, ' ,');\n\n return $text;\n }", "function get_tax_rate()\n\t{\n\t\tif(empty($this->address))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$rate\t= 0;\n\t\t\n\t\t$rate += $this->get_country_tax_rate();\n\t\t$rate += $this->get_zone_tax_rate();\n\t\t$rate += $this->get_area_tax_rate();\n\t\t\n\t\t//returns the total rate not affected by price of merchandise.\n\t\treturn $rate;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}", "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "public function getInterestRate()\n {\n return (1 + ((float) $this->_webserviceHelper->getConfigData('interest_rate') / 100));\n }", "protected function number_to_rate($row) {\n\t\tif ($row['record_type'] == \"e\") {\n\t\t\treturn NULL;\n\t\t} else if (($row['record_type'] == \"9\") && isset($row['called_number'])) {\n\t\t\treturn $row->get('called_number');\n\t\t} else if (($row['record_type'] == \"a\") && isset($row['calling_number'])) {\n\t\t\treturn $row->get('calling_number');\n\t\t} else {\n\t\t\tBillrun_Factory::log(\"Couldn't find rateable number for line : {$row['stamp']}\");\n\t\t}\n\t}", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}", "function convert_rating(){\n\t\t\t\tglobal $plugintable;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\n\t\t\t\tif(!is_object($sqlcr)){ $sqlcr = new db; }\n\t\t\t\t$numr = $sqlcr -> db_Count(\"rate\", \"(*)\", \"WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\tif($numr > 0){\n\t\t\t\t\t$sqlcr -> db_Update(\"rate\", \"rate_table = '\".$plugintable.\"' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\t}\n\t\t}", "function tinhchuvihinhtron($r) {\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "Function UpdateRates()\n{\n\t$query = \"SELECT *,NOW()-(last_update) as dif from HB_lastupdate\";\n \t$res = mysql_query($query);\n\t\n\tif(!$res)\n\t{\n\t\treturn;\n\t}\n\t$ar = mysql_fetch_array($res);\n\t$mydif = (int)($ar[dif]/60) - 1440;\n\tprint \"+++++++++++++++++++++\";$mydif;\n\tif($mydif>0)\n\t{\n\t $fp = fopen(\"http://www.bankofcanada.ca/fmd/exchange.htm\",\"r\");\n\t $x=0;$g=0;\n\t while(!feof($fp))\n\t {\n\t $buf = fgets($fp, 4096);\n\t if(eregi(\"U.S. Dollar\",$buf)) $x=4;\n\t if(eregi(\"</PRE>\",$buf)) $x=0;\n\t if($x==4)\n\t {\n if(!eregi(\"US/CA\",$buf))\n {\n \t$ime = explode(\"/\",$buf);\n\t\tprint_r($ime);\n\t\tprint \"<BR>\";\n \t$s = explode(\" \",$ime[1]);\n \t$r = array_reverse ($s);\n\n \tif(eregi(\"Euro de\",$buf))\n \t{\n \t $ime[0]=\"European Monetary Union EURO\";\n \t $s = explode(\" \",$buf);\n \t $r = array_reverse ($s);\n \t}\n\n \tif($ime[0]<>\"\" and $r[0]<>\"\")\n \t{\n \t $g++;\n \t if(eregi(\"U.S. Dollar\",$buf)) {$koef = (float)$r[0];}\n \t $k = ((float)$r[0]/(float)$koef);\n \t $usd = 1/$k;\n \t $res = mysql_query(\"SELECT * FROM HB_rates WHERE sifra=\\\"$ime[0]\\\"\");\n \t $num = mysql_num_rows($res);\n \t if($num > 0)\n\t\t {\n \tmysql_query(\"UPDATE HB_rates SET rate='$usd' WHERE sifra=\\\"$ime[0]\\\"\");\n\t\t }\n\t\t else\n\t\t {\n \t//mysql_query(\"INSERT INTO HB_rates VAUES( \t\t\t\t\t\t NULL,\t\t\t\t\t\t '$usd', sifra=\\\"$ime[0]\\\"\");\n\t\t }\n \t}\n if(eregi(\"Venezuelan Bolivar\",$buf)) $x=0;\n }\n\t }\n\t }\n\t fclose($fp);\n\t mysql_query(\"UPDATE HB_lastupdate SET last_update=NOW();\");\n\t}\n}", "public function getExternalTaxRate();", "public function getRate(): ?float\n {\n return $this->rate;\n }", "function fn_get_yandex_checkpoint_price($price = 0.00, $currency = 'RUB')\n{\n return array(\n 'amount' => (float) fn_format_rate_value((float) $price, 'F', 2, '.', '', ''),\n 'currency' => $currency\n );\n}", "function getWeight(){return $this->weight;}", "function generate_interest_rate($overdraft)\n {\n global $db;\n\n $interest_rate = 0.000000;\n\n if ($overdraft >= 0.00 && $overdraft < 1000.00) {\n $interest_rate = $interest_rate + 0.001000;\n } elseif ($overdraft >= 1000.00 && $overdraft < 10000.00) {\n $interest_rate = $interest_rate + 0.000100;\n } elseif ($overdraft >= 10000.00 && $overdraft < 100000.00) {\n $interest_rate = $interest_rate + 0.000010;\n } elseif ($overdraft >= 100000.00 && $overdraft < 1000000.00) {\n $interest_rate = $interest_rate + 0.000001;\n }\n \n return $interest_rate;\n }", "public function tax(): float;", "public function getPopularityCoeff()\n {\n $nbRates = count($this->getRates());\n $nbCommentaries = count($this->getCommentaries());\n $avg = $this->getAvgRate();\n return ($nbRates + $nbCommentaries) * $avg;\n }", "function get_linkrating($link)\n {\n }", "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "public function luxScore();", "function get_tax_base_rate() {\n\t\t\n\t\tif ( $this->is_taxable() && get_option('woocommerce_calc_taxes')=='yes') :\n\t\t\t\n\t\t\t$_tax = &new woocommerce_tax();\n\t\t\t$rate = $_tax->get_shop_base_rate( $this->data['tax_class'] );\n\t\t\t\n\t\t\treturn $rate;\n\t\t\t\n\t\tendif;\n\t\t\n\t}", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "public function getRate()\n {\n $ratesData = $this->getDataFromSource();\n\n if (!$ratesData) {\n return null;\n }\n\n $rateElements = $ratesData->xpath('/source/organizations/organization/currencies/c[@id=\"USD\"]');\n\n $rateSourcesCount = count($rateElements);\n\n if (!$rateSourcesCount) {\n return null;\n }\n\n $sumRate = 0;\n\n foreach ($rateElements as $rateSource) {\n $sumRate += (float)$rateSource->attributes()->ar;\n }\n\n return $sumRate / $rateSourcesCount;\n }", "function discount_rate($discount_rate=null)\n {\n if (isset($discount_rate)) $this->discount_rate = $discount_rate;\n return $this->discount_rate;\n }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function averageRate()\n {\n $this->quotes = (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n $rateList = $this->enArrayColumn($this->quotes, 'cost');\n $count = count($this->quotes);\n $count = $count > 0 ? $count : 1;\n $rateSum = array_sum($rateList) / $count;\n $quotesReset = reset($this->quotes);\n\n $rate[] = [\n 'id' => $this->randString(),\n 'carrier_scac' => (isset($quotesReset['carrier_scac'])) ? $quotesReset['carrier_scac'] : \"\",\n 'label' => (isset($quotesReset['label'])) ? $quotesReset['label'] : \"\",\n 'cost' => $rateSum,\n 'markup' => (isset($quotesReset['markup'])) ? $quotesReset['markup'] : \"\",\n 'appendLabel' => (isset($quotesReset['appendLabel'])) ? $quotesReset['appendLabel'] : \"\",\n ];\n return $rate;\n }", "public function getRate()\n {\n // Get number of requests made in the last minute\n $count = 0;\n $Test = new DateTime('-1 min -23 sec');\n\n foreach ($this->Stats['NewConnections'] as $k => $Time) {\n\n // Time is not expired? Add to count\n if ($Time > $Test) {\n $count ++;\n\n // Time too old? Remove from list\n } else {\n unset($this->Stats['NewConnections'][$k]);\n }\n }\n\n // Reindex\n $this->Stats['NewConnections'] = array_values($this->Stats['NewConnections']);\n\n // Convert result to float\n return floatval($count);\n }", "function trader_ht_trendmode($real)\n{\n}", "function getRating()\n{\n $actualRating = rand(0,50) / 10;\n\n $starFull = $actualRating;\n \n $starPartial = 0;\n\n if (is_float($starFull))\n {\n\n $starPartial = 1;\n\n $starFull = (int)$starFull;\n\n }\n\n $star_empty = 5 - $starFull - $starPartial;\n\n $ratingDisplay = '';\n\n for($i = 0; $i < $starFull; $i++) {\n $ratingDisplay .= 'Full Star ';\n }\n\n if ($starPartial)\n {\n $ratingDisplay .= 'Partial Star ';\n }\n\n for($i = 0; $i < $star_empty; $i++) {\n $ratingDisplay .= 'Empty Star ';\n }\n\n echo $ratingDisplay . ' (' . $actualRating . \")\";\n}", "public function get_sampling_rate()\n {\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function RateReview($bRateUp = true)\n {\n if (false == $this->ReviewRatedByActiveUser()) {\n $sRateString = 'helpful_count';\n //helpful_count\n //not_helpful_count\n if (false == $bRateUp) {\n $sRateString = 'not_helpful_count';\n }\n $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"`\n SET `{$sRateString}` = `{$sRateString}`+1\n WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\n LIMIT 1\n \";\n MySqlLegacySupport::getInstance()->query($query);\n // get value from disc\n $query = \"SELECT `{$sRateString}` FROM `\".MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"` WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $this->sqlData[$sRateString] = $aTmp[$sRateString];\n if ($bRateUp) {\n $this->fieldHelpfulCount = $this->sqlData[$sRateString];\n } else {\n $this->fieldNotHelpfulCount = $this->sqlData[$sRateString];\n }\n }\n if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) {\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array();\n }\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time();\n }\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function yards() {\n\t\t$yards_calc = $this->_yards/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$yards_calc -= 3;\n\t\tif ($yards_calc * .25 < 0) {\n\t\t\t$yards_calc = 0;\n\t\t} elseif ($yards_calc * .25 > 2.375) {\n\t\t\t$yards_calc = 2.375;\n\t\t} else {\n\t\t\t$yards_calc *= .25;\n\t\t}\n\t\treturn $yards_calc;\n\t}", "function wordRating($points, $votes) {\n if ($votes == 0) {\n $rating = PLUGIN_KARMA_IMAGE_NONE_RATING;\n } else {\n // Find average karma (-2 to +2)\n $rating = ((float)$points) / ((float)$votes);\n // Put it into the language-specific string format, rounding up\n // I'm mapping invalid cases (rating > 5 and rating < -2) to the extremes\n if ($rating < -1.5) {\n $rating = $this->get_config('rate_vile', PLUGIN_KARMA_VOTEPOINT_1);\n } elseif ($rating < -0.5) {\n $rating = $this->get_config('rate_poor', PLUGIN_KARMA_VOTEPOINT_2);\n } elseif ($rating < 0.5) {\n $rating = $this->get_config('rate_okay', PLUGIN_KARMA_VOTEPOINT_3);\n } elseif ($rating < 1.5) {\n $rating = $this->get_config('rate_good', PLUGIN_KARMA_VOTEPOINT_4);\n } else {\n $rating = $this->get_config('rate_best', PLUGIN_KARMA_VOTEPOINT_5);\n }\n }\n return $rating;\n }", "public function getShippingRate();", "public function getRatePeriod()\n {\n return $this->ratePeriod;\n }", "public function getRates()\n {\n return $this->_rates;\n }", "function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }", "public function getResponseRateValue()\n {\n return isset($this->ResponseRateValue) ? $this->ResponseRateValue : null;\n }", "private function paper($skill){\n $count=[];\n $paperPoint=0;\n $calculatedPaperPoint=0;\n\n //checking for papers\n foreach($skill->papers as $key=>$paper){ //get all the books and articles for the specified skill\n $countLike=$paper->num_like;\n $countDisLike=$paper->num_dislike;\n if($paper->type==2){ //the paper is book\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['book']['like']-($countDisLike*Config::get('paper')['attributes']['book']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['book']['book'];\n }elseif($paper->type==1){ //the paper is article\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['article']['like']-($countDisLike*Config::get('paper')['attributes']['article']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['article']['article'];\n }\n }\n $paperPoint=array_sum($count);\n if($paperPoint>Config::get('rate')['paper']['result'][5]){ //5 star paper\n $calculatedPaperPoint=5;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][4] && $paperPoint<=Config::get('rate')['paper']['result'][5]){\n $calculatedPaperPoint=4;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][3] && $paperPoint<=Config::get('rate')['paper']['result'][4]){\n $calculatedPaperPoint=3;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][2] && $paperPoint<=Config::get('rate')['paper']['result'][3]){\n $calculatedPaperPoint=2;\n }elseif($paperPoint>=Config::get('rate')['paper']['result'][1] && $paperPoint<=Config::get('rate')['paper']['result'][2]){\n $calculatedPaperPoint=1;\n }\n $finalPaperPoint=$calculatedPaperPoint*Config::get('rate')['paper']['weight'];\n return $finalPaperPoint;\n\n }" ]
[ "0.73541623", "0.69482094", "0.69482094", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6822514", "0.6788268", "0.6533004", "0.65031874", "0.6471485", "0.6372346", "0.6359106", "0.63149846", "0.6182789", "0.61517495", "0.6143315", "0.6138426", "0.6135762", "0.61344373", "0.61172694", "0.6080972", "0.6078001", "0.6004941", "0.5983029", "0.5981754", "0.59595776", "0.59595776", "0.5944635", "0.5897591", "0.5896225", "0.58954847", "0.5886045", "0.5885545", "0.58785295", "0.5869269", "0.5865945", "0.58629626", "0.58448076", "0.5842965", "0.5831894", "0.5827684", "0.57923186", "0.579193", "0.5790606", "0.5788125", "0.5786769", "0.57748264", "0.5750126", "0.5745818", "0.57437027", "0.573874", "0.5737611", "0.57375985", "0.57168907", "0.57152647", "0.57107943", "0.57068473", "0.5704549", "0.5704075", "0.5694543", "0.5692534", "0.5688918", "0.5687867", "0.5683221", "0.5646381", "0.5638063", "0.5636704", "0.56291413", "0.562774", "0.56273216", "0.5623692", "0.562012", "0.56129533", "0.56121975", "0.56114954", "0.5610021", "0.5605463", "0.5604768", "0.5600808", "0.55952406", "0.5593424", "0.5589744", "0.5585121", "0.558507", "0.5584329", "0.5580664", "0.5578693", "0.5568229", "0.5568229", "0.5568229", "0.5566627", "0.5561519", "0.55498236", "0.5547912", "0.5542966", "0.5539186", "0.5538314", "0.5530296" ]
0.0
-1
This is actually the rate, wrong wording...
public function setAmountTotal($amountTotal) { $this->amountTotal = (float) $amountTotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rate()\n {\n\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "function interestRate($item_id){\n\t\treturn 0.1;\n\t}", "public function getRate() {\n return $this->rate;\n }", "function calculate_rate($rate, $type, $bits) {\n\n\t$output = 0;\n\n\tif ($type == \"overage\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $bits - $rate[\"rate_overage\"][\"threshold\"];\n\t\t}else{\n\t\t\t$bits = 0;\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_overage\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_overage\"][\"amount\"];\n\t} elseif ($type == \"committed\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $rate[\"rate_overage\"][\"threshold\"];\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_committed\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_committed\"][\"amount\"];\n\t\tif (isset($rate[\"rate_committed\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate_committed\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate_committed\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"regular\") {\n\t\t$multi = unit_multi($rate[\"rate\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate\"][\"amount\"];\n\t\tif (isset($rate[\"rate\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"fixed\") {\n\t\t$output = $rate[\"rate_fixed\"][\"amount\"];\n\t}\n\t\n\treturn round($output, 4);\n\n}", "public function getBaseToOrderRate();", "function NSNrate($SFR){ return 0.156*($SFR/(12.26*Msun)); }", "public function getStoreToOrderRate();", "public function getExchangeRate();", "function getExchangeRate($currency);", "public function getShippingrate()\n\t{\n\t\tinclude_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/shipping.php';\n\t\t$shipping = new shipping;\n\t\techo $shipping->getShippingrate_calc();\n\t\texit;\n\t}", "public function getBaseToGlobalRate();", "public function getAmountRate()\n {\n return $this->amountRate;\n }", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "function get_payment_rate($subtotal) {}", "public function getStoreToBaseRate();", "private function _rating($token)\n {\n switch ($token) {\n case '(':\n return 100;\n break;\n \n case '&&':\n return 80;\n break;\n \n case '||':\n return 79;\n break;\n \n case ')':\n return 0;\n break;\n }\n }", "public function getRatePerSecond()\n {\n return $this->rate_per_second;\n }", "public function getDiscountRate(){\n return $this->getParameter('discount_rate');\n }", "public function getRate(Currency $currency);", "protected function LiveDefaultRate()\n {\n $this->defaultTaxObjects();\n\n return self::$default_tax_objects_rate;\n }", "public function unRate()\n {\n\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getTaxRate();", "function getScoreCost (&$labor, $quantity) {\n\tif ($_POST[\"score\"] == \"score\") {\n\t\t$scoreLabor = (HOUR * .16);\n\t\t$scoreLabor += (($quantity * .000833) * HOUR);\n\t}\nelse {\n\t$scoreLabor = 0;\n\t}\n$labor += $scoreLabor;\n}", "function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }", "private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }", "protected function LiveCurrentRate()\n {\n $this->currentTaxObjects();\n\n return self::$current_tax_objects_rate;\n }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public function user_answer_rate() {\n return (float) number_format($this->usersanswered / $this->postsanswered, 2);\n }", "function getBitRate(){\n\t\treturn round($this->bitRate,2);\n\t}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "private function opinion($skill){\n if($skill->my_rate==1){ //5 star\n $calculatedOpinionPoint=5;\n }elseif($skill->my_rate==2){ //3 star\n $calculatedOpinionPoint=3;\n }elseif($skill->my_rate==3){ //1 star\n $calculatedOpinionPoint=1;\n }else{\n $calculatedOpinionPoint=1;\n }\n $finalOpinionPoint=$calculatedOpinionPoint*Config::get('rate')['opinion']['weight'];\n return $finalOpinionPoint;\n }", "public function getAvgRate()\n {\n $avg = 0;\n $nb = 0;\n if (!empty($this->getRates())) {\n foreach($this->getRates() as $rate) {\n $avg += $rate->getNbStar();\n $nb++;\n }\n $avg /= $nb;\n }\n return $avg;\n }", "public function getCompressRate(): string\n {\n }", "private function getINRto1gGOLD(){\n $client = new Client();\n\n $crawler = $client->request('GET','https://www.policybazaar.com/gold-rate/');\n $INR_10g_Gold = $crawler->filterXPath(\"//div[contains(@class,'dailyGoldrate')]\")->text();\n //removing , and converting to float\n $INR_10g_Gold_R = floatval (str_replace(\",\",\"\",$INR_10g_Gold));\n return($INR_10g_Gold_R/10);\n }", "function tep_get_tax_rate_value($class_id) {\n return tep_get_tax_rate($class_id, -1, -1);\n }", "function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "function __toString()\n {\n return $this->rate.\"\";\n }", "public function rate($rate = \"\")\n\t{\n\t\tif (empty($rate) || $rate == \"?\")\n\t\t{\n\t\t\treturn $this->CLI->intQuery($this->SqueezePlyrID.\" rate ?\");\n\t\t}\n\t\tif (!is_numeric($rate))\n\t\t{\n\t\t\tuser_error(\"rate() only accepts numeric values or ?.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" rate \".$rate);\n\t}", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function actionRate()\n\t{\n\t\t$note_id = $_POST['note_id'];\n\t\t$student_id = $_POST['student_id'];\n\t\t$rating = $_POST['rating'];\n\n\t\t$model = $this->loadModel($note_id);\n\t\t$model->rate($student_id, $rating);\n\n\t\t$totalRating = $model->getTotalRating();\n\t\t$ratersCount = $model->getRatersCount();\n\n\t\tif ( ! $totalRating)\n\t\t\techo 'N/A';\n\t\telse\n\t\t\techo '' . ((double)$totalRating / $ratersCount) . ' (dari ' . $ratersCount . ' pengguna)';\n\t}", "function calculate_rating($sentence_words){\r\n\t\t$rating = 0;\r\n\t\tforeach ($sentence_words as $word => $count){\r\n\t\t\tif (!isset($this->word_stats[$word])) continue;\r\n\t\t\t$word_rating = $count * $this->word_stats[$word];\r\n\t\t\t$rating += $word_rating;\r\n\t\t}\r\n\t\treturn $rating;\r\n\t}", "protected function _getRate($row)\n {\n return 1;\n }", "public function soundScore();", "public function getRateTextAttribute()\n {\n $text = '';\n if ((float) $this->base_rate) {\n $text .= store_currency($this->base_rate).' + ';\n }\n if ((float) $this->per_item_rate) {\n $text .= store_currency($this->per_item_rate).' '.lang('store.shipping_rule_per_item').' + ';\n }\n if ((float) $this->per_weight_rate) {\n $text .= store_currency($this->per_weight_rate).' '.lang('store.shipping_rule_per_weight_unit').' + ';\n }\n if ((float) $this->percent_rate) {\n $text .= $this->percent_rate.'% '.lang('store.shipping_of_order_total');\n }\n $text = trim($text, ' +');\n if ((float) $this->min_rate) {\n $text .= ', '.sprintf(lang('store.shipping_with_a_min_of'), store_currency($this->min_rate));\n }\n if ((float) $this->max_rate) {\n $text .= ', '.sprintf(lang('store.shipping_up_to_a_max_of'), store_currency($this->max_rate));\n }\n $text = trim($text, ' ,');\n\n return $text;\n }", "function get_tax_rate()\n\t{\n\t\tif(empty($this->address))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$rate\t= 0;\n\t\t\n\t\t$rate += $this->get_country_tax_rate();\n\t\t$rate += $this->get_zone_tax_rate();\n\t\t$rate += $this->get_area_tax_rate();\n\t\t\n\t\t//returns the total rate not affected by price of merchandise.\n\t\treturn $rate;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}", "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "public function getInterestRate()\n {\n return (1 + ((float) $this->_webserviceHelper->getConfigData('interest_rate') / 100));\n }", "protected function number_to_rate($row) {\n\t\tif ($row['record_type'] == \"e\") {\n\t\t\treturn NULL;\n\t\t} else if (($row['record_type'] == \"9\") && isset($row['called_number'])) {\n\t\t\treturn $row->get('called_number');\n\t\t} else if (($row['record_type'] == \"a\") && isset($row['calling_number'])) {\n\t\t\treturn $row->get('calling_number');\n\t\t} else {\n\t\t\tBillrun_Factory::log(\"Couldn't find rateable number for line : {$row['stamp']}\");\n\t\t}\n\t}", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}", "function convert_rating(){\n\t\t\t\tglobal $plugintable;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\n\t\t\t\tif(!is_object($sqlcr)){ $sqlcr = new db; }\n\t\t\t\t$numr = $sqlcr -> db_Count(\"rate\", \"(*)\", \"WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\tif($numr > 0){\n\t\t\t\t\t$sqlcr -> db_Update(\"rate\", \"rate_table = '\".$plugintable.\"' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\t}\n\t\t}", "function tinhchuvihinhtron($r) {\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "Function UpdateRates()\n{\n\t$query = \"SELECT *,NOW()-(last_update) as dif from HB_lastupdate\";\n \t$res = mysql_query($query);\n\t\n\tif(!$res)\n\t{\n\t\treturn;\n\t}\n\t$ar = mysql_fetch_array($res);\n\t$mydif = (int)($ar[dif]/60) - 1440;\n\tprint \"+++++++++++++++++++++\";$mydif;\n\tif($mydif>0)\n\t{\n\t $fp = fopen(\"http://www.bankofcanada.ca/fmd/exchange.htm\",\"r\");\n\t $x=0;$g=0;\n\t while(!feof($fp))\n\t {\n\t $buf = fgets($fp, 4096);\n\t if(eregi(\"U.S. Dollar\",$buf)) $x=4;\n\t if(eregi(\"</PRE>\",$buf)) $x=0;\n\t if($x==4)\n\t {\n if(!eregi(\"US/CA\",$buf))\n {\n \t$ime = explode(\"/\",$buf);\n\t\tprint_r($ime);\n\t\tprint \"<BR>\";\n \t$s = explode(\" \",$ime[1]);\n \t$r = array_reverse ($s);\n\n \tif(eregi(\"Euro de\",$buf))\n \t{\n \t $ime[0]=\"European Monetary Union EURO\";\n \t $s = explode(\" \",$buf);\n \t $r = array_reverse ($s);\n \t}\n\n \tif($ime[0]<>\"\" and $r[0]<>\"\")\n \t{\n \t $g++;\n \t if(eregi(\"U.S. Dollar\",$buf)) {$koef = (float)$r[0];}\n \t $k = ((float)$r[0]/(float)$koef);\n \t $usd = 1/$k;\n \t $res = mysql_query(\"SELECT * FROM HB_rates WHERE sifra=\\\"$ime[0]\\\"\");\n \t $num = mysql_num_rows($res);\n \t if($num > 0)\n\t\t {\n \tmysql_query(\"UPDATE HB_rates SET rate='$usd' WHERE sifra=\\\"$ime[0]\\\"\");\n\t\t }\n\t\t else\n\t\t {\n \t//mysql_query(\"INSERT INTO HB_rates VAUES( \t\t\t\t\t\t NULL,\t\t\t\t\t\t '$usd', sifra=\\\"$ime[0]\\\"\");\n\t\t }\n \t}\n if(eregi(\"Venezuelan Bolivar\",$buf)) $x=0;\n }\n\t }\n\t }\n\t fclose($fp);\n\t mysql_query(\"UPDATE HB_lastupdate SET last_update=NOW();\");\n\t}\n}", "public function getExternalTaxRate();", "public function getRate(): ?float\n {\n return $this->rate;\n }", "function fn_get_yandex_checkpoint_price($price = 0.00, $currency = 'RUB')\n{\n return array(\n 'amount' => (float) fn_format_rate_value((float) $price, 'F', 2, '.', '', ''),\n 'currency' => $currency\n );\n}", "function getWeight(){return $this->weight;}", "function generate_interest_rate($overdraft)\n {\n global $db;\n\n $interest_rate = 0.000000;\n\n if ($overdraft >= 0.00 && $overdraft < 1000.00) {\n $interest_rate = $interest_rate + 0.001000;\n } elseif ($overdraft >= 1000.00 && $overdraft < 10000.00) {\n $interest_rate = $interest_rate + 0.000100;\n } elseif ($overdraft >= 10000.00 && $overdraft < 100000.00) {\n $interest_rate = $interest_rate + 0.000010;\n } elseif ($overdraft >= 100000.00 && $overdraft < 1000000.00) {\n $interest_rate = $interest_rate + 0.000001;\n }\n \n return $interest_rate;\n }", "public function tax(): float;", "public function getPopularityCoeff()\n {\n $nbRates = count($this->getRates());\n $nbCommentaries = count($this->getCommentaries());\n $avg = $this->getAvgRate();\n return ($nbRates + $nbCommentaries) * $avg;\n }", "function get_linkrating($link)\n {\n }", "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "public function luxScore();", "function get_tax_base_rate() {\n\t\t\n\t\tif ( $this->is_taxable() && get_option('woocommerce_calc_taxes')=='yes') :\n\t\t\t\n\t\t\t$_tax = &new woocommerce_tax();\n\t\t\t$rate = $_tax->get_shop_base_rate( $this->data['tax_class'] );\n\t\t\t\n\t\t\treturn $rate;\n\t\t\t\n\t\tendif;\n\t\t\n\t}", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "public function getRate()\n {\n $ratesData = $this->getDataFromSource();\n\n if (!$ratesData) {\n return null;\n }\n\n $rateElements = $ratesData->xpath('/source/organizations/organization/currencies/c[@id=\"USD\"]');\n\n $rateSourcesCount = count($rateElements);\n\n if (!$rateSourcesCount) {\n return null;\n }\n\n $sumRate = 0;\n\n foreach ($rateElements as $rateSource) {\n $sumRate += (float)$rateSource->attributes()->ar;\n }\n\n return $sumRate / $rateSourcesCount;\n }", "function discount_rate($discount_rate=null)\n {\n if (isset($discount_rate)) $this->discount_rate = $discount_rate;\n return $this->discount_rate;\n }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function averageRate()\n {\n $this->quotes = (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n $rateList = $this->enArrayColumn($this->quotes, 'cost');\n $count = count($this->quotes);\n $count = $count > 0 ? $count : 1;\n $rateSum = array_sum($rateList) / $count;\n $quotesReset = reset($this->quotes);\n\n $rate[] = [\n 'id' => $this->randString(),\n 'carrier_scac' => (isset($quotesReset['carrier_scac'])) ? $quotesReset['carrier_scac'] : \"\",\n 'label' => (isset($quotesReset['label'])) ? $quotesReset['label'] : \"\",\n 'cost' => $rateSum,\n 'markup' => (isset($quotesReset['markup'])) ? $quotesReset['markup'] : \"\",\n 'appendLabel' => (isset($quotesReset['appendLabel'])) ? $quotesReset['appendLabel'] : \"\",\n ];\n return $rate;\n }", "public function getRate()\n {\n // Get number of requests made in the last minute\n $count = 0;\n $Test = new DateTime('-1 min -23 sec');\n\n foreach ($this->Stats['NewConnections'] as $k => $Time) {\n\n // Time is not expired? Add to count\n if ($Time > $Test) {\n $count ++;\n\n // Time too old? Remove from list\n } else {\n unset($this->Stats['NewConnections'][$k]);\n }\n }\n\n // Reindex\n $this->Stats['NewConnections'] = array_values($this->Stats['NewConnections']);\n\n // Convert result to float\n return floatval($count);\n }", "function trader_ht_trendmode($real)\n{\n}", "function getRating()\n{\n $actualRating = rand(0,50) / 10;\n\n $starFull = $actualRating;\n \n $starPartial = 0;\n\n if (is_float($starFull))\n {\n\n $starPartial = 1;\n\n $starFull = (int)$starFull;\n\n }\n\n $star_empty = 5 - $starFull - $starPartial;\n\n $ratingDisplay = '';\n\n for($i = 0; $i < $starFull; $i++) {\n $ratingDisplay .= 'Full Star ';\n }\n\n if ($starPartial)\n {\n $ratingDisplay .= 'Partial Star ';\n }\n\n for($i = 0; $i < $star_empty; $i++) {\n $ratingDisplay .= 'Empty Star ';\n }\n\n echo $ratingDisplay . ' (' . $actualRating . \")\";\n}", "public function get_sampling_rate()\n {\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function RateReview($bRateUp = true)\n {\n if (false == $this->ReviewRatedByActiveUser()) {\n $sRateString = 'helpful_count';\n //helpful_count\n //not_helpful_count\n if (false == $bRateUp) {\n $sRateString = 'not_helpful_count';\n }\n $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"`\n SET `{$sRateString}` = `{$sRateString}`+1\n WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\n LIMIT 1\n \";\n MySqlLegacySupport::getInstance()->query($query);\n // get value from disc\n $query = \"SELECT `{$sRateString}` FROM `\".MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"` WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $this->sqlData[$sRateString] = $aTmp[$sRateString];\n if ($bRateUp) {\n $this->fieldHelpfulCount = $this->sqlData[$sRateString];\n } else {\n $this->fieldNotHelpfulCount = $this->sqlData[$sRateString];\n }\n }\n if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) {\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array();\n }\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time();\n }\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function yards() {\n\t\t$yards_calc = $this->_yards/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$yards_calc -= 3;\n\t\tif ($yards_calc * .25 < 0) {\n\t\t\t$yards_calc = 0;\n\t\t} elseif ($yards_calc * .25 > 2.375) {\n\t\t\t$yards_calc = 2.375;\n\t\t} else {\n\t\t\t$yards_calc *= .25;\n\t\t}\n\t\treturn $yards_calc;\n\t}", "function wordRating($points, $votes) {\n if ($votes == 0) {\n $rating = PLUGIN_KARMA_IMAGE_NONE_RATING;\n } else {\n // Find average karma (-2 to +2)\n $rating = ((float)$points) / ((float)$votes);\n // Put it into the language-specific string format, rounding up\n // I'm mapping invalid cases (rating > 5 and rating < -2) to the extremes\n if ($rating < -1.5) {\n $rating = $this->get_config('rate_vile', PLUGIN_KARMA_VOTEPOINT_1);\n } elseif ($rating < -0.5) {\n $rating = $this->get_config('rate_poor', PLUGIN_KARMA_VOTEPOINT_2);\n } elseif ($rating < 0.5) {\n $rating = $this->get_config('rate_okay', PLUGIN_KARMA_VOTEPOINT_3);\n } elseif ($rating < 1.5) {\n $rating = $this->get_config('rate_good', PLUGIN_KARMA_VOTEPOINT_4);\n } else {\n $rating = $this->get_config('rate_best', PLUGIN_KARMA_VOTEPOINT_5);\n }\n }\n return $rating;\n }", "public function getShippingRate();", "public function getRatePeriod()\n {\n return $this->ratePeriod;\n }", "public function getRates()\n {\n return $this->_rates;\n }", "function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }", "public function getResponseRateValue()\n {\n return isset($this->ResponseRateValue) ? $this->ResponseRateValue : null;\n }", "private function paper($skill){\n $count=[];\n $paperPoint=0;\n $calculatedPaperPoint=0;\n\n //checking for papers\n foreach($skill->papers as $key=>$paper){ //get all the books and articles for the specified skill\n $countLike=$paper->num_like;\n $countDisLike=$paper->num_dislike;\n if($paper->type==2){ //the paper is book\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['book']['like']-($countDisLike*Config::get('paper')['attributes']['book']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['book']['book'];\n }elseif($paper->type==1){ //the paper is article\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['article']['like']-($countDisLike*Config::get('paper')['attributes']['article']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['article']['article'];\n }\n }\n $paperPoint=array_sum($count);\n if($paperPoint>Config::get('rate')['paper']['result'][5]){ //5 star paper\n $calculatedPaperPoint=5;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][4] && $paperPoint<=Config::get('rate')['paper']['result'][5]){\n $calculatedPaperPoint=4;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][3] && $paperPoint<=Config::get('rate')['paper']['result'][4]){\n $calculatedPaperPoint=3;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][2] && $paperPoint<=Config::get('rate')['paper']['result'][3]){\n $calculatedPaperPoint=2;\n }elseif($paperPoint>=Config::get('rate')['paper']['result'][1] && $paperPoint<=Config::get('rate')['paper']['result'][2]){\n $calculatedPaperPoint=1;\n }\n $finalPaperPoint=$calculatedPaperPoint*Config::get('rate')['paper']['weight'];\n return $finalPaperPoint;\n\n }" ]
[ "0.73541623", "0.69482094", "0.69482094", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6822514", "0.6788268", "0.6533004", "0.65031874", "0.6471485", "0.6372346", "0.6359106", "0.63149846", "0.6182789", "0.61517495", "0.6143315", "0.6138426", "0.6135762", "0.61344373", "0.61172694", "0.6080972", "0.6078001", "0.6004941", "0.5983029", "0.5981754", "0.59595776", "0.59595776", "0.5944635", "0.5897591", "0.5896225", "0.58954847", "0.5886045", "0.5885545", "0.58785295", "0.5869269", "0.5865945", "0.58629626", "0.58448076", "0.5842965", "0.5831894", "0.5827684", "0.57923186", "0.579193", "0.5790606", "0.5788125", "0.5786769", "0.57748264", "0.5750126", "0.5745818", "0.57437027", "0.573874", "0.5737611", "0.57375985", "0.57168907", "0.57152647", "0.57107943", "0.57068473", "0.5704549", "0.5704075", "0.5694543", "0.5692534", "0.5688918", "0.5687867", "0.5683221", "0.5646381", "0.5638063", "0.5636704", "0.56291413", "0.562774", "0.56273216", "0.5623692", "0.562012", "0.56129533", "0.56121975", "0.56114954", "0.5610021", "0.5605463", "0.5604768", "0.5600808", "0.55952406", "0.5593424", "0.5589744", "0.5585121", "0.558507", "0.5584329", "0.5580664", "0.5578693", "0.5568229", "0.5568229", "0.5568229", "0.5566627", "0.5561519", "0.55498236", "0.5547912", "0.5542966", "0.5539186", "0.5538314", "0.5530296" ]
0.0
-1
This is actually the rate, wrong wording...
public function getAmountThisMonth(): float { return $this->amountThisMonth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rate()\n {\n\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "function interestRate($item_id){\n\t\treturn 0.1;\n\t}", "public function getRate() {\n return $this->rate;\n }", "function calculate_rate($rate, $type, $bits) {\n\n\t$output = 0;\n\n\tif ($type == \"overage\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $bits - $rate[\"rate_overage\"][\"threshold\"];\n\t\t}else{\n\t\t\t$bits = 0;\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_overage\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_overage\"][\"amount\"];\n\t} elseif ($type == \"committed\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $rate[\"rate_overage\"][\"threshold\"];\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_committed\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_committed\"][\"amount\"];\n\t\tif (isset($rate[\"rate_committed\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate_committed\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate_committed\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"regular\") {\n\t\t$multi = unit_multi($rate[\"rate\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate\"][\"amount\"];\n\t\tif (isset($rate[\"rate\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"fixed\") {\n\t\t$output = $rate[\"rate_fixed\"][\"amount\"];\n\t}\n\t\n\treturn round($output, 4);\n\n}", "public function getBaseToOrderRate();", "function NSNrate($SFR){ return 0.156*($SFR/(12.26*Msun)); }", "public function getStoreToOrderRate();", "public function getExchangeRate();", "function getExchangeRate($currency);", "public function getShippingrate()\n\t{\n\t\tinclude_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/shipping.php';\n\t\t$shipping = new shipping;\n\t\techo $shipping->getShippingrate_calc();\n\t\texit;\n\t}", "public function getBaseToGlobalRate();", "public function getAmountRate()\n {\n return $this->amountRate;\n }", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "function get_payment_rate($subtotal) {}", "public function getStoreToBaseRate();", "private function _rating($token)\n {\n switch ($token) {\n case '(':\n return 100;\n break;\n \n case '&&':\n return 80;\n break;\n \n case '||':\n return 79;\n break;\n \n case ')':\n return 0;\n break;\n }\n }", "public function getRatePerSecond()\n {\n return $this->rate_per_second;\n }", "public function getDiscountRate(){\n return $this->getParameter('discount_rate');\n }", "public function getRate(Currency $currency);", "protected function LiveDefaultRate()\n {\n $this->defaultTaxObjects();\n\n return self::$default_tax_objects_rate;\n }", "public function unRate()\n {\n\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getTaxRate();", "function getScoreCost (&$labor, $quantity) {\n\tif ($_POST[\"score\"] == \"score\") {\n\t\t$scoreLabor = (HOUR * .16);\n\t\t$scoreLabor += (($quantity * .000833) * HOUR);\n\t}\nelse {\n\t$scoreLabor = 0;\n\t}\n$labor += $scoreLabor;\n}", "private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }", "function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }", "protected function LiveCurrentRate()\n {\n $this->currentTaxObjects();\n\n return self::$current_tax_objects_rate;\n }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public function user_answer_rate() {\n return (float) number_format($this->usersanswered / $this->postsanswered, 2);\n }", "function getBitRate(){\n\t\treturn round($this->bitRate,2);\n\t}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "private function opinion($skill){\n if($skill->my_rate==1){ //5 star\n $calculatedOpinionPoint=5;\n }elseif($skill->my_rate==2){ //3 star\n $calculatedOpinionPoint=3;\n }elseif($skill->my_rate==3){ //1 star\n $calculatedOpinionPoint=1;\n }else{\n $calculatedOpinionPoint=1;\n }\n $finalOpinionPoint=$calculatedOpinionPoint*Config::get('rate')['opinion']['weight'];\n return $finalOpinionPoint;\n }", "public function getAvgRate()\n {\n $avg = 0;\n $nb = 0;\n if (!empty($this->getRates())) {\n foreach($this->getRates() as $rate) {\n $avg += $rate->getNbStar();\n $nb++;\n }\n $avg /= $nb;\n }\n return $avg;\n }", "public function getCompressRate(): string\n {\n }", "private function getINRto1gGOLD(){\n $client = new Client();\n\n $crawler = $client->request('GET','https://www.policybazaar.com/gold-rate/');\n $INR_10g_Gold = $crawler->filterXPath(\"//div[contains(@class,'dailyGoldrate')]\")->text();\n //removing , and converting to float\n $INR_10g_Gold_R = floatval (str_replace(\",\",\"\",$INR_10g_Gold));\n return($INR_10g_Gold_R/10);\n }", "function tep_get_tax_rate_value($class_id) {\n return tep_get_tax_rate($class_id, -1, -1);\n }", "function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "public function rate($rate = \"\")\n\t{\n\t\tif (empty($rate) || $rate == \"?\")\n\t\t{\n\t\t\treturn $this->CLI->intQuery($this->SqueezePlyrID.\" rate ?\");\n\t\t}\n\t\tif (!is_numeric($rate))\n\t\t{\n\t\t\tuser_error(\"rate() only accepts numeric values or ?.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" rate \".$rate);\n\t}", "function __toString()\n {\n return $this->rate.\"\";\n }", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function actionRate()\n\t{\n\t\t$note_id = $_POST['note_id'];\n\t\t$student_id = $_POST['student_id'];\n\t\t$rating = $_POST['rating'];\n\n\t\t$model = $this->loadModel($note_id);\n\t\t$model->rate($student_id, $rating);\n\n\t\t$totalRating = $model->getTotalRating();\n\t\t$ratersCount = $model->getRatersCount();\n\n\t\tif ( ! $totalRating)\n\t\t\techo 'N/A';\n\t\telse\n\t\t\techo '' . ((double)$totalRating / $ratersCount) . ' (dari ' . $ratersCount . ' pengguna)';\n\t}", "function calculate_rating($sentence_words){\r\n\t\t$rating = 0;\r\n\t\tforeach ($sentence_words as $word => $count){\r\n\t\t\tif (!isset($this->word_stats[$word])) continue;\r\n\t\t\t$word_rating = $count * $this->word_stats[$word];\r\n\t\t\t$rating += $word_rating;\r\n\t\t}\r\n\t\treturn $rating;\r\n\t}", "protected function _getRate($row)\n {\n return 1;\n }", "public function soundScore();", "public function getRateTextAttribute()\n {\n $text = '';\n if ((float) $this->base_rate) {\n $text .= store_currency($this->base_rate).' + ';\n }\n if ((float) $this->per_item_rate) {\n $text .= store_currency($this->per_item_rate).' '.lang('store.shipping_rule_per_item').' + ';\n }\n if ((float) $this->per_weight_rate) {\n $text .= store_currency($this->per_weight_rate).' '.lang('store.shipping_rule_per_weight_unit').' + ';\n }\n if ((float) $this->percent_rate) {\n $text .= $this->percent_rate.'% '.lang('store.shipping_of_order_total');\n }\n $text = trim($text, ' +');\n if ((float) $this->min_rate) {\n $text .= ', '.sprintf(lang('store.shipping_with_a_min_of'), store_currency($this->min_rate));\n }\n if ((float) $this->max_rate) {\n $text .= ', '.sprintf(lang('store.shipping_up_to_a_max_of'), store_currency($this->max_rate));\n }\n $text = trim($text, ' ,');\n\n return $text;\n }", "function get_tax_rate()\n\t{\n\t\tif(empty($this->address))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$rate\t= 0;\n\t\t\n\t\t$rate += $this->get_country_tax_rate();\n\t\t$rate += $this->get_zone_tax_rate();\n\t\t$rate += $this->get_area_tax_rate();\n\t\t\n\t\t//returns the total rate not affected by price of merchandise.\n\t\treturn $rate;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}", "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "protected function number_to_rate($row) {\n\t\tif ($row['record_type'] == \"e\") {\n\t\t\treturn NULL;\n\t\t} else if (($row['record_type'] == \"9\") && isset($row['called_number'])) {\n\t\t\treturn $row->get('called_number');\n\t\t} else if (($row['record_type'] == \"a\") && isset($row['calling_number'])) {\n\t\t\treturn $row->get('calling_number');\n\t\t} else {\n\t\t\tBillrun_Factory::log(\"Couldn't find rateable number for line : {$row['stamp']}\");\n\t\t}\n\t}", "public function getInterestRate()\n {\n return (1 + ((float) $this->_webserviceHelper->getConfigData('interest_rate') / 100));\n }", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}", "function convert_rating(){\n\t\t\t\tglobal $plugintable;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\n\t\t\t\tif(!is_object($sqlcr)){ $sqlcr = new db; }\n\t\t\t\t$numr = $sqlcr -> db_Count(\"rate\", \"(*)\", \"WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\tif($numr > 0){\n\t\t\t\t\t$sqlcr -> db_Update(\"rate\", \"rate_table = '\".$plugintable.\"' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\t}\n\t\t}", "function tinhchuvihinhtron($r) {\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "Function UpdateRates()\n{\n\t$query = \"SELECT *,NOW()-(last_update) as dif from HB_lastupdate\";\n \t$res = mysql_query($query);\n\t\n\tif(!$res)\n\t{\n\t\treturn;\n\t}\n\t$ar = mysql_fetch_array($res);\n\t$mydif = (int)($ar[dif]/60) - 1440;\n\tprint \"+++++++++++++++++++++\";$mydif;\n\tif($mydif>0)\n\t{\n\t $fp = fopen(\"http://www.bankofcanada.ca/fmd/exchange.htm\",\"r\");\n\t $x=0;$g=0;\n\t while(!feof($fp))\n\t {\n\t $buf = fgets($fp, 4096);\n\t if(eregi(\"U.S. Dollar\",$buf)) $x=4;\n\t if(eregi(\"</PRE>\",$buf)) $x=0;\n\t if($x==4)\n\t {\n if(!eregi(\"US/CA\",$buf))\n {\n \t$ime = explode(\"/\",$buf);\n\t\tprint_r($ime);\n\t\tprint \"<BR>\";\n \t$s = explode(\" \",$ime[1]);\n \t$r = array_reverse ($s);\n\n \tif(eregi(\"Euro de\",$buf))\n \t{\n \t $ime[0]=\"European Monetary Union EURO\";\n \t $s = explode(\" \",$buf);\n \t $r = array_reverse ($s);\n \t}\n\n \tif($ime[0]<>\"\" and $r[0]<>\"\")\n \t{\n \t $g++;\n \t if(eregi(\"U.S. Dollar\",$buf)) {$koef = (float)$r[0];}\n \t $k = ((float)$r[0]/(float)$koef);\n \t $usd = 1/$k;\n \t $res = mysql_query(\"SELECT * FROM HB_rates WHERE sifra=\\\"$ime[0]\\\"\");\n \t $num = mysql_num_rows($res);\n \t if($num > 0)\n\t\t {\n \tmysql_query(\"UPDATE HB_rates SET rate='$usd' WHERE sifra=\\\"$ime[0]\\\"\");\n\t\t }\n\t\t else\n\t\t {\n \t//mysql_query(\"INSERT INTO HB_rates VAUES( \t\t\t\t\t\t NULL,\t\t\t\t\t\t '$usd', sifra=\\\"$ime[0]\\\"\");\n\t\t }\n \t}\n if(eregi(\"Venezuelan Bolivar\",$buf)) $x=0;\n }\n\t }\n\t }\n\t fclose($fp);\n\t mysql_query(\"UPDATE HB_lastupdate SET last_update=NOW();\");\n\t}\n}", "public function getExternalTaxRate();", "public function getRate(): ?float\n {\n return $this->rate;\n }", "function fn_get_yandex_checkpoint_price($price = 0.00, $currency = 'RUB')\n{\n return array(\n 'amount' => (float) fn_format_rate_value((float) $price, 'F', 2, '.', '', ''),\n 'currency' => $currency\n );\n}", "function getWeight(){return $this->weight;}", "function generate_interest_rate($overdraft)\n {\n global $db;\n\n $interest_rate = 0.000000;\n\n if ($overdraft >= 0.00 && $overdraft < 1000.00) {\n $interest_rate = $interest_rate + 0.001000;\n } elseif ($overdraft >= 1000.00 && $overdraft < 10000.00) {\n $interest_rate = $interest_rate + 0.000100;\n } elseif ($overdraft >= 10000.00 && $overdraft < 100000.00) {\n $interest_rate = $interest_rate + 0.000010;\n } elseif ($overdraft >= 100000.00 && $overdraft < 1000000.00) {\n $interest_rate = $interest_rate + 0.000001;\n }\n \n return $interest_rate;\n }", "public function tax(): float;", "public function getPopularityCoeff()\n {\n $nbRates = count($this->getRates());\n $nbCommentaries = count($this->getCommentaries());\n $avg = $this->getAvgRate();\n return ($nbRates + $nbCommentaries) * $avg;\n }", "function get_linkrating($link)\n {\n }", "public function luxScore();", "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "function get_tax_base_rate() {\n\t\t\n\t\tif ( $this->is_taxable() && get_option('woocommerce_calc_taxes')=='yes') :\n\t\t\t\n\t\t\t$_tax = &new woocommerce_tax();\n\t\t\t$rate = $_tax->get_shop_base_rate( $this->data['tax_class'] );\n\t\t\t\n\t\t\treturn $rate;\n\t\t\t\n\t\tendif;\n\t\t\n\t}", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "public function getRate()\n {\n $ratesData = $this->getDataFromSource();\n\n if (!$ratesData) {\n return null;\n }\n\n $rateElements = $ratesData->xpath('/source/organizations/organization/currencies/c[@id=\"USD\"]');\n\n $rateSourcesCount = count($rateElements);\n\n if (!$rateSourcesCount) {\n return null;\n }\n\n $sumRate = 0;\n\n foreach ($rateElements as $rateSource) {\n $sumRate += (float)$rateSource->attributes()->ar;\n }\n\n return $sumRate / $rateSourcesCount;\n }", "function discount_rate($discount_rate=null)\n {\n if (isset($discount_rate)) $this->discount_rate = $discount_rate;\n return $this->discount_rate;\n }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function averageRate()\n {\n $this->quotes = (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n $rateList = $this->enArrayColumn($this->quotes, 'cost');\n $count = count($this->quotes);\n $count = $count > 0 ? $count : 1;\n $rateSum = array_sum($rateList) / $count;\n $quotesReset = reset($this->quotes);\n\n $rate[] = [\n 'id' => $this->randString(),\n 'carrier_scac' => (isset($quotesReset['carrier_scac'])) ? $quotesReset['carrier_scac'] : \"\",\n 'label' => (isset($quotesReset['label'])) ? $quotesReset['label'] : \"\",\n 'cost' => $rateSum,\n 'markup' => (isset($quotesReset['markup'])) ? $quotesReset['markup'] : \"\",\n 'appendLabel' => (isset($quotesReset['appendLabel'])) ? $quotesReset['appendLabel'] : \"\",\n ];\n return $rate;\n }", "public function getRate()\n {\n // Get number of requests made in the last minute\n $count = 0;\n $Test = new DateTime('-1 min -23 sec');\n\n foreach ($this->Stats['NewConnections'] as $k => $Time) {\n\n // Time is not expired? Add to count\n if ($Time > $Test) {\n $count ++;\n\n // Time too old? Remove from list\n } else {\n unset($this->Stats['NewConnections'][$k]);\n }\n }\n\n // Reindex\n $this->Stats['NewConnections'] = array_values($this->Stats['NewConnections']);\n\n // Convert result to float\n return floatval($count);\n }", "function trader_ht_trendmode($real)\n{\n}", "function getRating()\n{\n $actualRating = rand(0,50) / 10;\n\n $starFull = $actualRating;\n \n $starPartial = 0;\n\n if (is_float($starFull))\n {\n\n $starPartial = 1;\n\n $starFull = (int)$starFull;\n\n }\n\n $star_empty = 5 - $starFull - $starPartial;\n\n $ratingDisplay = '';\n\n for($i = 0; $i < $starFull; $i++) {\n $ratingDisplay .= 'Full Star ';\n }\n\n if ($starPartial)\n {\n $ratingDisplay .= 'Partial Star ';\n }\n\n for($i = 0; $i < $star_empty; $i++) {\n $ratingDisplay .= 'Empty Star ';\n }\n\n echo $ratingDisplay . ' (' . $actualRating . \")\";\n}", "public function get_sampling_rate()\n {\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function RateReview($bRateUp = true)\n {\n if (false == $this->ReviewRatedByActiveUser()) {\n $sRateString = 'helpful_count';\n //helpful_count\n //not_helpful_count\n if (false == $bRateUp) {\n $sRateString = 'not_helpful_count';\n }\n $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"`\n SET `{$sRateString}` = `{$sRateString}`+1\n WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\n LIMIT 1\n \";\n MySqlLegacySupport::getInstance()->query($query);\n // get value from disc\n $query = \"SELECT `{$sRateString}` FROM `\".MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"` WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $this->sqlData[$sRateString] = $aTmp[$sRateString];\n if ($bRateUp) {\n $this->fieldHelpfulCount = $this->sqlData[$sRateString];\n } else {\n $this->fieldNotHelpfulCount = $this->sqlData[$sRateString];\n }\n }\n if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) {\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array();\n }\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time();\n }\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function yards() {\n\t\t$yards_calc = $this->_yards/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$yards_calc -= 3;\n\t\tif ($yards_calc * .25 < 0) {\n\t\t\t$yards_calc = 0;\n\t\t} elseif ($yards_calc * .25 > 2.375) {\n\t\t\t$yards_calc = 2.375;\n\t\t} else {\n\t\t\t$yards_calc *= .25;\n\t\t}\n\t\treturn $yards_calc;\n\t}", "function wordRating($points, $votes) {\n if ($votes == 0) {\n $rating = PLUGIN_KARMA_IMAGE_NONE_RATING;\n } else {\n // Find average karma (-2 to +2)\n $rating = ((float)$points) / ((float)$votes);\n // Put it into the language-specific string format, rounding up\n // I'm mapping invalid cases (rating > 5 and rating < -2) to the extremes\n if ($rating < -1.5) {\n $rating = $this->get_config('rate_vile', PLUGIN_KARMA_VOTEPOINT_1);\n } elseif ($rating < -0.5) {\n $rating = $this->get_config('rate_poor', PLUGIN_KARMA_VOTEPOINT_2);\n } elseif ($rating < 0.5) {\n $rating = $this->get_config('rate_okay', PLUGIN_KARMA_VOTEPOINT_3);\n } elseif ($rating < 1.5) {\n $rating = $this->get_config('rate_good', PLUGIN_KARMA_VOTEPOINT_4);\n } else {\n $rating = $this->get_config('rate_best', PLUGIN_KARMA_VOTEPOINT_5);\n }\n }\n return $rating;\n }", "public function getShippingRate();", "public function getRatePeriod()\n {\n return $this->ratePeriod;\n }", "public function getRates()\n {\n return $this->_rates;\n }", "public function getResponseRateValue()\n {\n return isset($this->ResponseRateValue) ? $this->ResponseRateValue : null;\n }", "function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }", "private function paper($skill){\n $count=[];\n $paperPoint=0;\n $calculatedPaperPoint=0;\n\n //checking for papers\n foreach($skill->papers as $key=>$paper){ //get all the books and articles for the specified skill\n $countLike=$paper->num_like;\n $countDisLike=$paper->num_dislike;\n if($paper->type==2){ //the paper is book\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['book']['like']-($countDisLike*Config::get('paper')['attributes']['book']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['book']['book'];\n }elseif($paper->type==1){ //the paper is article\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['article']['like']-($countDisLike*Config::get('paper')['attributes']['article']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['article']['article'];\n }\n }\n $paperPoint=array_sum($count);\n if($paperPoint>Config::get('rate')['paper']['result'][5]){ //5 star paper\n $calculatedPaperPoint=5;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][4] && $paperPoint<=Config::get('rate')['paper']['result'][5]){\n $calculatedPaperPoint=4;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][3] && $paperPoint<=Config::get('rate')['paper']['result'][4]){\n $calculatedPaperPoint=3;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][2] && $paperPoint<=Config::get('rate')['paper']['result'][3]){\n $calculatedPaperPoint=2;\n }elseif($paperPoint>=Config::get('rate')['paper']['result'][1] && $paperPoint<=Config::get('rate')['paper']['result'][2]){\n $calculatedPaperPoint=1;\n }\n $finalPaperPoint=$calculatedPaperPoint*Config::get('rate')['paper']['weight'];\n return $finalPaperPoint;\n\n }" ]
[ "0.7352856", "0.69476265", "0.69476265", "0.69412124", "0.69412124", "0.69412124", "0.69412124", "0.69412124", "0.68206745", "0.67875", "0.6533301", "0.65019286", "0.647187", "0.6371586", "0.63577384", "0.63143474", "0.6183147", "0.6150288", "0.61427957", "0.61382353", "0.6135294", "0.61337054", "0.6119288", "0.60797024", "0.6077909", "0.60037804", "0.5981195", "0.5980588", "0.5960219", "0.5960219", "0.5944603", "0.58981776", "0.5896486", "0.58958614", "0.5884512", "0.588351", "0.5878433", "0.5868785", "0.58661574", "0.58629566", "0.5844731", "0.58425105", "0.58326215", "0.582866", "0.57922775", "0.57917434", "0.5790608", "0.57884145", "0.5788134", "0.577426", "0.57501704", "0.5745996", "0.574401", "0.5739038", "0.57380193", "0.5737931", "0.57181305", "0.57150435", "0.5710415", "0.5706582", "0.5705791", "0.5704279", "0.56950325", "0.5693116", "0.56906414", "0.56880647", "0.5683057", "0.56459856", "0.5638414", "0.5636556", "0.5628843", "0.56281996", "0.5626699", "0.5624396", "0.5620046", "0.5613258", "0.5612713", "0.56120634", "0.5609271", "0.56071204", "0.56050223", "0.5600718", "0.559425", "0.559278", "0.55873495", "0.55857784", "0.55856293", "0.5583153", "0.55792326", "0.5578737", "0.5567545", "0.5567545", "0.5567545", "0.5566254", "0.55629134", "0.55493224", "0.5546332", "0.55424786", "0.553794", "0.5537584", "0.55319417" ]
0.0
-1
This is actually the rate, wrong wording...
public function setAmountThisMonth($amountThisMonth) { $this->amountThisMonth = (float) $amountThisMonth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rate()\n {\n\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "function interestRate($item_id){\n\t\treturn 0.1;\n\t}", "public function getRate() {\n return $this->rate;\n }", "function calculate_rate($rate, $type, $bits) {\n\n\t$output = 0;\n\n\tif ($type == \"overage\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $bits - $rate[\"rate_overage\"][\"threshold\"];\n\t\t}else{\n\t\t\t$bits = 0;\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_overage\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_overage\"][\"amount\"];\n\t} elseif ($type == \"committed\") {\n\t\tif ($bits > $rate[\"rate_overage\"][\"threshold\"]) {\n\t\t\t$bits = $rate[\"rate_overage\"][\"threshold\"];\n\t\t}\t\n\t\t$multi = unit_multi($rate[\"rate_committed\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate_committed\"][\"amount\"];\n\t\tif (isset($rate[\"rate_committed\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate_committed\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate_committed\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"regular\") {\n\t\t$multi = unit_multi($rate[\"rate\"][\"unit\"]);\n\t\t$output = ($bits / $multi) * $rate[\"rate\"][\"amount\"];\n\t\tif (isset($rate[\"rate\"][\"minimum\"])) {\n\t\t\tif ($output < $rate[\"rate\"][\"minimum\"]) {\n\t\t\t\t$output = $rate[\"rate\"][\"minimum\"];\n\t\t\t}\n\t\t}\n\t} elseif ($type == \"fixed\") {\n\t\t$output = $rate[\"rate_fixed\"][\"amount\"];\n\t}\n\t\n\treturn round($output, 4);\n\n}", "public function getBaseToOrderRate();", "function NSNrate($SFR){ return 0.156*($SFR/(12.26*Msun)); }", "public function getStoreToOrderRate();", "public function getExchangeRate();", "function getExchangeRate($currency);", "public function getShippingrate()\n\t{\n\t\tinclude_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/shipping.php';\n\t\t$shipping = new shipping;\n\t\techo $shipping->getShippingrate_calc();\n\t\texit;\n\t}", "public function getBaseToGlobalRate();", "public function getAmountRate()\n {\n return $this->amountRate;\n }", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "function get_payment_rate($subtotal) {}", "public function getStoreToBaseRate();", "private function _rating($token)\n {\n switch ($token) {\n case '(':\n return 100;\n break;\n \n case '&&':\n return 80;\n break;\n \n case '||':\n return 79;\n break;\n \n case ')':\n return 0;\n break;\n }\n }", "public function getRatePerSecond()\n {\n return $this->rate_per_second;\n }", "public function getDiscountRate(){\n return $this->getParameter('discount_rate');\n }", "public function getRate(Currency $currency);", "protected function LiveDefaultRate()\n {\n $this->defaultTaxObjects();\n\n return self::$default_tax_objects_rate;\n }", "public function unRate()\n {\n\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getRate(): ?string\n {\n return $this->rate;\n }", "public function getTaxRate();", "function getScoreCost (&$labor, $quantity) {\n\tif ($_POST[\"score\"] == \"score\") {\n\t\t$scoreLabor = (HOUR * .16);\n\t\t$scoreLabor += (($quantity * .000833) * HOUR);\n\t}\nelse {\n\t$scoreLabor = 0;\n\t}\n$labor += $scoreLabor;\n}", "function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }", "private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }", "protected function LiveCurrentRate()\n {\n $this->currentTaxObjects();\n\n return self::$current_tax_objects_rate;\n }", "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}", "public function user_answer_rate() {\n return (float) number_format($this->usersanswered / $this->postsanswered, 2);\n }", "function getBitRate(){\n\t\treturn round($this->bitRate,2);\n\t}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "private function opinion($skill){\n if($skill->my_rate==1){ //5 star\n $calculatedOpinionPoint=5;\n }elseif($skill->my_rate==2){ //3 star\n $calculatedOpinionPoint=3;\n }elseif($skill->my_rate==3){ //1 star\n $calculatedOpinionPoint=1;\n }else{\n $calculatedOpinionPoint=1;\n }\n $finalOpinionPoint=$calculatedOpinionPoint*Config::get('rate')['opinion']['weight'];\n return $finalOpinionPoint;\n }", "public function getAvgRate()\n {\n $avg = 0;\n $nb = 0;\n if (!empty($this->getRates())) {\n foreach($this->getRates() as $rate) {\n $avg += $rate->getNbStar();\n $nb++;\n }\n $avg /= $nb;\n }\n return $avg;\n }", "public function getCompressRate(): string\n {\n }", "private function getINRto1gGOLD(){\n $client = new Client();\n\n $crawler = $client->request('GET','https://www.policybazaar.com/gold-rate/');\n $INR_10g_Gold = $crawler->filterXPath(\"//div[contains(@class,'dailyGoldrate')]\")->text();\n //removing , and converting to float\n $INR_10g_Gold_R = floatval (str_replace(\",\",\"\",$INR_10g_Gold));\n return($INR_10g_Gold_R/10);\n }", "function tep_get_tax_rate_value($class_id) {\n return tep_get_tax_rate($class_id, -1, -1);\n }", "function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }", "function __lineItemTotal($qty, $price, $rate) {\n\n\n\n\n\n\n\n// if ($curency_id == 2)\n// $currency = 1;\n//\n// if ($curency_id == 1)\n// $currency = 4.17;\n//\n// if ($curency_id == 3)\n// $currency = 4.50;\n\n\n\n $line_total = $qty * $price * $rate;\n\n //$line_total = $line_total + (($line_total * $taxRate) / 100);\n\n\n\n return $line_total;\n }", "function __toString()\n {\n return $this->rate.\"\";\n }", "public function rate($rate = \"\")\n\t{\n\t\tif (empty($rate) || $rate == \"?\")\n\t\t{\n\t\t\treturn $this->CLI->intQuery($this->SqueezePlyrID.\" rate ?\");\n\t\t}\n\t\tif (!is_numeric($rate))\n\t\t{\n\t\t\tuser_error(\"rate() only accepts numeric values or ?.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" rate \".$rate);\n\t}", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function actionRate()\n\t{\n\t\t$note_id = $_POST['note_id'];\n\t\t$student_id = $_POST['student_id'];\n\t\t$rating = $_POST['rating'];\n\n\t\t$model = $this->loadModel($note_id);\n\t\t$model->rate($student_id, $rating);\n\n\t\t$totalRating = $model->getTotalRating();\n\t\t$ratersCount = $model->getRatersCount();\n\n\t\tif ( ! $totalRating)\n\t\t\techo 'N/A';\n\t\telse\n\t\t\techo '' . ((double)$totalRating / $ratersCount) . ' (dari ' . $ratersCount . ' pengguna)';\n\t}", "function calculate_rating($sentence_words){\r\n\t\t$rating = 0;\r\n\t\tforeach ($sentence_words as $word => $count){\r\n\t\t\tif (!isset($this->word_stats[$word])) continue;\r\n\t\t\t$word_rating = $count * $this->word_stats[$word];\r\n\t\t\t$rating += $word_rating;\r\n\t\t}\r\n\t\treturn $rating;\r\n\t}", "protected function _getRate($row)\n {\n return 1;\n }", "public function soundScore();", "public function getRateTextAttribute()\n {\n $text = '';\n if ((float) $this->base_rate) {\n $text .= store_currency($this->base_rate).' + ';\n }\n if ((float) $this->per_item_rate) {\n $text .= store_currency($this->per_item_rate).' '.lang('store.shipping_rule_per_item').' + ';\n }\n if ((float) $this->per_weight_rate) {\n $text .= store_currency($this->per_weight_rate).' '.lang('store.shipping_rule_per_weight_unit').' + ';\n }\n if ((float) $this->percent_rate) {\n $text .= $this->percent_rate.'% '.lang('store.shipping_of_order_total');\n }\n $text = trim($text, ' +');\n if ((float) $this->min_rate) {\n $text .= ', '.sprintf(lang('store.shipping_with_a_min_of'), store_currency($this->min_rate));\n }\n if ((float) $this->max_rate) {\n $text .= ', '.sprintf(lang('store.shipping_up_to_a_max_of'), store_currency($this->max_rate));\n }\n $text = trim($text, ' ,');\n\n return $text;\n }", "function get_tax_rate()\n\t{\n\t\tif(empty($this->address))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$rate\t= 0;\n\t\t\n\t\t$rate += $this->get_country_tax_rate();\n\t\t$rate += $this->get_zone_tax_rate();\n\t\t$rate += $this->get_area_tax_rate();\n\t\t\n\t\t//returns the total rate not affected by price of merchandise.\n\t\treturn $rate;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}", "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "public function getInterestRate()\n {\n return (1 + ((float) $this->_webserviceHelper->getConfigData('interest_rate') / 100));\n }", "protected function number_to_rate($row) {\n\t\tif ($row['record_type'] == \"e\") {\n\t\t\treturn NULL;\n\t\t} else if (($row['record_type'] == \"9\") && isset($row['called_number'])) {\n\t\t\treturn $row->get('called_number');\n\t\t} else if (($row['record_type'] == \"a\") && isset($row['calling_number'])) {\n\t\t\treturn $row->get('calling_number');\n\t\t} else {\n\t\t\tBillrun_Factory::log(\"Couldn't find rateable number for line : {$row['stamp']}\");\n\t\t}\n\t}", "public function getConversionRateAsString()\n {\n return $this->getConversionRate().'%';\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}", "function convert_rating(){\n\t\t\t\tglobal $plugintable;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\n\t\t\t\tif(!is_object($sqlcr)){ $sqlcr = new db; }\n\t\t\t\t$numr = $sqlcr -> db_Count(\"rate\", \"(*)\", \"WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\tif($numr > 0){\n\t\t\t\t\t$sqlcr -> db_Update(\"rate\", \"rate_table = '\".$plugintable.\"' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\t}\n\t\t}", "function tinhchuvihinhtron($r) {\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "Function UpdateRates()\n{\n\t$query = \"SELECT *,NOW()-(last_update) as dif from HB_lastupdate\";\n \t$res = mysql_query($query);\n\t\n\tif(!$res)\n\t{\n\t\treturn;\n\t}\n\t$ar = mysql_fetch_array($res);\n\t$mydif = (int)($ar[dif]/60) - 1440;\n\tprint \"+++++++++++++++++++++\";$mydif;\n\tif($mydif>0)\n\t{\n\t $fp = fopen(\"http://www.bankofcanada.ca/fmd/exchange.htm\",\"r\");\n\t $x=0;$g=0;\n\t while(!feof($fp))\n\t {\n\t $buf = fgets($fp, 4096);\n\t if(eregi(\"U.S. Dollar\",$buf)) $x=4;\n\t if(eregi(\"</PRE>\",$buf)) $x=0;\n\t if($x==4)\n\t {\n if(!eregi(\"US/CA\",$buf))\n {\n \t$ime = explode(\"/\",$buf);\n\t\tprint_r($ime);\n\t\tprint \"<BR>\";\n \t$s = explode(\" \",$ime[1]);\n \t$r = array_reverse ($s);\n\n \tif(eregi(\"Euro de\",$buf))\n \t{\n \t $ime[0]=\"European Monetary Union EURO\";\n \t $s = explode(\" \",$buf);\n \t $r = array_reverse ($s);\n \t}\n\n \tif($ime[0]<>\"\" and $r[0]<>\"\")\n \t{\n \t $g++;\n \t if(eregi(\"U.S. Dollar\",$buf)) {$koef = (float)$r[0];}\n \t $k = ((float)$r[0]/(float)$koef);\n \t $usd = 1/$k;\n \t $res = mysql_query(\"SELECT * FROM HB_rates WHERE sifra=\\\"$ime[0]\\\"\");\n \t $num = mysql_num_rows($res);\n \t if($num > 0)\n\t\t {\n \tmysql_query(\"UPDATE HB_rates SET rate='$usd' WHERE sifra=\\\"$ime[0]\\\"\");\n\t\t }\n\t\t else\n\t\t {\n \t//mysql_query(\"INSERT INTO HB_rates VAUES( \t\t\t\t\t\t NULL,\t\t\t\t\t\t '$usd', sifra=\\\"$ime[0]\\\"\");\n\t\t }\n \t}\n if(eregi(\"Venezuelan Bolivar\",$buf)) $x=0;\n }\n\t }\n\t }\n\t fclose($fp);\n\t mysql_query(\"UPDATE HB_lastupdate SET last_update=NOW();\");\n\t}\n}", "public function getExternalTaxRate();", "public function getRate(): ?float\n {\n return $this->rate;\n }", "function fn_get_yandex_checkpoint_price($price = 0.00, $currency = 'RUB')\n{\n return array(\n 'amount' => (float) fn_format_rate_value((float) $price, 'F', 2, '.', '', ''),\n 'currency' => $currency\n );\n}", "function getWeight(){return $this->weight;}", "function generate_interest_rate($overdraft)\n {\n global $db;\n\n $interest_rate = 0.000000;\n\n if ($overdraft >= 0.00 && $overdraft < 1000.00) {\n $interest_rate = $interest_rate + 0.001000;\n } elseif ($overdraft >= 1000.00 && $overdraft < 10000.00) {\n $interest_rate = $interest_rate + 0.000100;\n } elseif ($overdraft >= 10000.00 && $overdraft < 100000.00) {\n $interest_rate = $interest_rate + 0.000010;\n } elseif ($overdraft >= 100000.00 && $overdraft < 1000000.00) {\n $interest_rate = $interest_rate + 0.000001;\n }\n \n return $interest_rate;\n }", "public function tax(): float;", "public function getPopularityCoeff()\n {\n $nbRates = count($this->getRates());\n $nbCommentaries = count($this->getCommentaries());\n $avg = $this->getAvgRate();\n return ($nbRates + $nbCommentaries) * $avg;\n }", "function get_linkrating($link)\n {\n }", "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "public function luxScore();", "function get_tax_base_rate() {\n\t\t\n\t\tif ( $this->is_taxable() && get_option('woocommerce_calc_taxes')=='yes') :\n\t\t\t\n\t\t\t$_tax = &new woocommerce_tax();\n\t\t\t$rate = $_tax->get_shop_base_rate( $this->data['tax_class'] );\n\t\t\t\n\t\t\treturn $rate;\n\t\t\t\n\t\tendif;\n\t\t\n\t}", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "public function getRate()\n {\n $ratesData = $this->getDataFromSource();\n\n if (!$ratesData) {\n return null;\n }\n\n $rateElements = $ratesData->xpath('/source/organizations/organization/currencies/c[@id=\"USD\"]');\n\n $rateSourcesCount = count($rateElements);\n\n if (!$rateSourcesCount) {\n return null;\n }\n\n $sumRate = 0;\n\n foreach ($rateElements as $rateSource) {\n $sumRate += (float)$rateSource->attributes()->ar;\n }\n\n return $sumRate / $rateSourcesCount;\n }", "function discount_rate($discount_rate=null)\n {\n if (isset($discount_rate)) $this->discount_rate = $discount_rate;\n return $this->discount_rate;\n }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function averageRate()\n {\n $this->quotes = (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n $rateList = $this->enArrayColumn($this->quotes, 'cost');\n $count = count($this->quotes);\n $count = $count > 0 ? $count : 1;\n $rateSum = array_sum($rateList) / $count;\n $quotesReset = reset($this->quotes);\n\n $rate[] = [\n 'id' => $this->randString(),\n 'carrier_scac' => (isset($quotesReset['carrier_scac'])) ? $quotesReset['carrier_scac'] : \"\",\n 'label' => (isset($quotesReset['label'])) ? $quotesReset['label'] : \"\",\n 'cost' => $rateSum,\n 'markup' => (isset($quotesReset['markup'])) ? $quotesReset['markup'] : \"\",\n 'appendLabel' => (isset($quotesReset['appendLabel'])) ? $quotesReset['appendLabel'] : \"\",\n ];\n return $rate;\n }", "public function getRate()\n {\n // Get number of requests made in the last minute\n $count = 0;\n $Test = new DateTime('-1 min -23 sec');\n\n foreach ($this->Stats['NewConnections'] as $k => $Time) {\n\n // Time is not expired? Add to count\n if ($Time > $Test) {\n $count ++;\n\n // Time too old? Remove from list\n } else {\n unset($this->Stats['NewConnections'][$k]);\n }\n }\n\n // Reindex\n $this->Stats['NewConnections'] = array_values($this->Stats['NewConnections']);\n\n // Convert result to float\n return floatval($count);\n }", "function trader_ht_trendmode($real)\n{\n}", "function getRating()\n{\n $actualRating = rand(0,50) / 10;\n\n $starFull = $actualRating;\n \n $starPartial = 0;\n\n if (is_float($starFull))\n {\n\n $starPartial = 1;\n\n $starFull = (int)$starFull;\n\n }\n\n $star_empty = 5 - $starFull - $starPartial;\n\n $ratingDisplay = '';\n\n for($i = 0; $i < $starFull; $i++) {\n $ratingDisplay .= 'Full Star ';\n }\n\n if ($starPartial)\n {\n $ratingDisplay .= 'Partial Star ';\n }\n\n for($i = 0; $i < $star_empty; $i++) {\n $ratingDisplay .= 'Empty Star ';\n }\n\n echo $ratingDisplay . ' (' . $actualRating . \")\";\n}", "public function get_sampling_rate()\n {\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function RateReview($bRateUp = true)\n {\n if (false == $this->ReviewRatedByActiveUser()) {\n $sRateString = 'helpful_count';\n //helpful_count\n //not_helpful_count\n if (false == $bRateUp) {\n $sRateString = 'not_helpful_count';\n }\n $query = 'UPDATE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"`\n SET `{$sRateString}` = `{$sRateString}`+1\n WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\n LIMIT 1\n \";\n MySqlLegacySupport::getInstance()->query($query);\n // get value from disc\n $query = \"SELECT `{$sRateString}` FROM `\".MySqlLegacySupport::getInstance()->real_escape_string($this->table).\"` WHERE `id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n if ($aTmp = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $this->sqlData[$sRateString] = $aTmp[$sRateString];\n if ($bRateUp) {\n $this->fieldHelpfulCount = $this->sqlData[$sRateString];\n } else {\n $this->fieldNotHelpfulCount = $this->sqlData[$sRateString];\n }\n }\n if (!array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION)) {\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'] = array();\n }\n $_SESSION['TPkgShopArticleReviewShopArticleReviewRated'][(string) $this->id] = time();\n }\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function getExchangeRate()\n {\n return $this->exchangeRate;\n }", "public function yards() {\n\t\t$yards_calc = $this->_yards/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$yards_calc -= 3;\n\t\tif ($yards_calc * .25 < 0) {\n\t\t\t$yards_calc = 0;\n\t\t} elseif ($yards_calc * .25 > 2.375) {\n\t\t\t$yards_calc = 2.375;\n\t\t} else {\n\t\t\t$yards_calc *= .25;\n\t\t}\n\t\treturn $yards_calc;\n\t}", "function wordRating($points, $votes) {\n if ($votes == 0) {\n $rating = PLUGIN_KARMA_IMAGE_NONE_RATING;\n } else {\n // Find average karma (-2 to +2)\n $rating = ((float)$points) / ((float)$votes);\n // Put it into the language-specific string format, rounding up\n // I'm mapping invalid cases (rating > 5 and rating < -2) to the extremes\n if ($rating < -1.5) {\n $rating = $this->get_config('rate_vile', PLUGIN_KARMA_VOTEPOINT_1);\n } elseif ($rating < -0.5) {\n $rating = $this->get_config('rate_poor', PLUGIN_KARMA_VOTEPOINT_2);\n } elseif ($rating < 0.5) {\n $rating = $this->get_config('rate_okay', PLUGIN_KARMA_VOTEPOINT_3);\n } elseif ($rating < 1.5) {\n $rating = $this->get_config('rate_good', PLUGIN_KARMA_VOTEPOINT_4);\n } else {\n $rating = $this->get_config('rate_best', PLUGIN_KARMA_VOTEPOINT_5);\n }\n }\n return $rating;\n }", "public function getShippingRate();", "public function getRatePeriod()\n {\n return $this->ratePeriod;\n }", "public function getRates()\n {\n return $this->_rates;\n }", "function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }", "public function getResponseRateValue()\n {\n return isset($this->ResponseRateValue) ? $this->ResponseRateValue : null;\n }", "private function paper($skill){\n $count=[];\n $paperPoint=0;\n $calculatedPaperPoint=0;\n\n //checking for papers\n foreach($skill->papers as $key=>$paper){ //get all the books and articles for the specified skill\n $countLike=$paper->num_like;\n $countDisLike=$paper->num_dislike;\n if($paper->type==2){ //the paper is book\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['book']['like']-($countDisLike*Config::get('paper')['attributes']['book']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['book']['book'];\n }elseif($paper->type==1){ //the paper is article\n $count[$key]=$countLike*Config::get('rate')['paper']['attributes']['article']['like']-($countDisLike*Config::get('paper')['attributes']['article']['dislike']);\n $count[$key]+=Config::get('rate')['paper']['attributes']['article']['article'];\n }\n }\n $paperPoint=array_sum($count);\n if($paperPoint>Config::get('rate')['paper']['result'][5]){ //5 star paper\n $calculatedPaperPoint=5;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][4] && $paperPoint<=Config::get('rate')['paper']['result'][5]){\n $calculatedPaperPoint=4;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][3] && $paperPoint<=Config::get('rate')['paper']['result'][4]){\n $calculatedPaperPoint=3;\n }elseif($paperPoint>Config::get('rate')['paper']['result'][2] && $paperPoint<=Config::get('rate')['paper']['result'][3]){\n $calculatedPaperPoint=2;\n }elseif($paperPoint>=Config::get('rate')['paper']['result'][1] && $paperPoint<=Config::get('rate')['paper']['result'][2]){\n $calculatedPaperPoint=1;\n }\n $finalPaperPoint=$calculatedPaperPoint*Config::get('rate')['paper']['weight'];\n return $finalPaperPoint;\n\n }" ]
[ "0.73541623", "0.69482094", "0.69482094", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6941969", "0.6822514", "0.6788268", "0.6533004", "0.65031874", "0.6471485", "0.6372346", "0.6359106", "0.63149846", "0.6182789", "0.61517495", "0.6143315", "0.6138426", "0.6135762", "0.61344373", "0.61172694", "0.6080972", "0.6078001", "0.6004941", "0.5983029", "0.5981754", "0.59595776", "0.59595776", "0.5944635", "0.5897591", "0.5896225", "0.58954847", "0.5886045", "0.5885545", "0.58785295", "0.5869269", "0.5865945", "0.58629626", "0.58448076", "0.5842965", "0.5831894", "0.5827684", "0.57923186", "0.579193", "0.5790606", "0.5788125", "0.5786769", "0.57748264", "0.5750126", "0.5745818", "0.57437027", "0.573874", "0.5737611", "0.57375985", "0.57168907", "0.57152647", "0.57107943", "0.57068473", "0.5704549", "0.5704075", "0.5694543", "0.5692534", "0.5688918", "0.5687867", "0.5683221", "0.5646381", "0.5638063", "0.5636704", "0.56291413", "0.562774", "0.56273216", "0.5623692", "0.562012", "0.56129533", "0.56121975", "0.56114954", "0.5610021", "0.5605463", "0.5604768", "0.5600808", "0.55952406", "0.5593424", "0.5589744", "0.5585121", "0.558507", "0.5584329", "0.5580664", "0.5578693", "0.5568229", "0.5568229", "0.5568229", "0.5566627", "0.5561519", "0.55498236", "0.5547912", "0.5542966", "0.5539186", "0.5538314", "0.5530296" ]
0.0
-1
Constructs a class property list node.
public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; $this->type = \is_string($type) ? new Identifier($type) : $type; $this->attrGroups = $attrGroups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createProperty()\n {\n $prop = new LiquibaseProperty();\n $this->properties[] = $prop;\n\n return $prop;\n }", "public function __construct($property, $class = null)\n {\n parent::__construct();\n\n if ($class) {\n $this->setToken('IndexClass', $class);\n }\n\n $this->setToken('Property', $property);\n }", "public function propertyList(){\n try {\n // Sparql11query.g:280:3: ( ( propertyListNotEmpty )? ) \n // Sparql11query.g:281:3: ( propertyListNotEmpty )? \n {\n // Sparql11query.g:281:3: ( propertyListNotEmpty )? \n $alt38=2;\n $LA38_0 = $this->input->LA(1);\n\n if ( ($LA38_0==$this->getToken('A')||$LA38_0==$this->getToken('IRI_REF')||$LA38_0==$this->getToken('PNAME_NS')||$LA38_0==$this->getToken('PNAME_LN')||($LA38_0>=$this->getToken('VAR1') && $LA38_0<=$this->getToken('VAR2'))) ) {\n $alt38=1;\n }\n switch ($alt38) {\n case 1 :\n // Sparql11query.g:281:3: propertyListNotEmpty \n {\n $this->pushFollow(self::$FOLLOW_propertyListNotEmpty_in_propertyList979);\n $this->propertyListNotEmpty();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "function __construct( ) \n {\n parent::__construct(XMLObject_ColumnList::XML_NODE_COLUMNLIST);\n \n }", "function NewClassProp($aParent,$aName,$aLineNbr,$aFileName) {\r\n\treturn new DocClassProp($aParent,$aName,$aLineNbr,$aFileName);\r\n }", "public static function create(ClassProperty $property): Iterator\n {\n foreach ($property->Tags as $tag => $data) {\n if (array_key_exists($tag, self::TAGS)) {\n $class = self::TAGS[$tag];\n yield new $class($property, ...explode(\" \", $data ?? \"\"));\n }\n }\n }", "function mdl_create_property(array $definition)\n{\n $property = PHPClassProperty(\n preg_replace(\"/\\s+/\", \"\", $definition['name']),\n isset($definition['type']) ? str_replace(\"\\\\\\\\\", \"\\\\\", $definition['type']) : null,\n // Class property as defined as private by default\n $definition['modifier'] ?? 'private',\n $definition['default'] ?? null,\n $definition['comment'] ?? null\n );\n if (isset($definition['constant']) && (true === boolval($definition['constant']))) {\n $property = $property->asConstant();\n }\n return $property;\n}", "public function blankNodePropertyList(){\n try {\n // Sparql11query.g:317:3: ( OPEN_SQUARE_BRACE propertyListNotEmpty CLOSE_SQUARE_BRACE ) \n // Sparql11query.g:318:3: OPEN_SQUARE_BRACE propertyListNotEmpty CLOSE_SQUARE_BRACE \n {\n $this->match($this->input,$this->getToken('OPEN_SQUARE_BRACE'),self::$FOLLOW_OPEN_SQUARE_BRACE_in_blankNodePropertyList1089); \n $this->pushFollow(self::$FOLLOW_propertyListNotEmpty_in_blankNodePropertyList1091);\n $this->propertyListNotEmpty();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_SQUARE_BRACE'),self::$FOLLOW_CLOSE_SQUARE_BRACE_in_blankNodePropertyList1093); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function set_classes(array $class_list) : self\n {\n $this->class_list = $class_list;\n return $this;\n }", "public function addClassToList($class, $listName, $options = array())\n {\n return $this->addToList(\n array_merge(\n array(\n 'child' => $class,\n 'list' => $listName,\n ),\n $options\n )\n );\n }", "function mdl_create_class_constructor(array $properties)\n{\n $required_parameters = array_map(function ($item) {\n return mdl_create_function_parameter([\n 'name' => $item['name'],\n 'type' => $item['type'] ?? null,\n 'optional' => false\n ]);\n }, array_filter($properties, function ($item) {\n return !isset($item['optional']) || (isset($item['optional']) && boolval($item['optional']) === false);\n }));\n $optional_parameters = array_map(function ($item) {\n return mdl_create_function_parameter([\n 'name' => $item['name'],\n 'type' => $item['type'] ?? null,\n 'optional' => true,\n 'default' => $item['default'] ?? null\n ]);\n }, array_filter($properties, function ($item) {\n return isset($item['optional']) && boolval($item['optional']) === true;\n }));\n $constructor_parameters = [...$required_parameters, ...$optional_parameters];\n $constructor = PHPClassMethod(\n '__construct',\n $constructor_parameters,\n null,\n 'public',\n 'Create new class instance'\n );\n foreach ($constructor_parameters as $parameter) {\n $constructor = $constructor->addLine(\"\\$this->\" . $parameter->name() . ' = ' . \"\\$\" . $parameter->name());\n }\n return $constructor;\n}", "public function __construct(string $classList = '')\n {\n $this->classList = $classList;\n }", "public function initListObject(DOMElement $node) { return new XDTNodeList($node); }", "public function setUlClass(string $ulClass);", "function BuildProperty($PropNode)\n {\n $objProp = new clsProperty();\n\n foreach ($PropNode->children() as $PropChild)\n {\n switch ($PropChild->getName())\n {\n case \"ID\":\n $objProp->ID = $PropChild;\n break;\n case \"Name\":\n $objProp->Name = $PropChild;\n break;\n case \"Address\":\n $objProp->Address = $PropChild;\n break;\n case \"City\":\n $objProp->City = $PropChild;\n break;\n case \"State\":\n $objProp->State = $PropChild;\n break;\n case \"Zip\":\n $objProp->Zip = $PropChild;\n break;\n case \"Phone\":\n $objProp->Phone = $PropChild;\n break;\n case \"Email\" :\n $objProp->Email = $PropChild;\n break;\n case \"Maint\":\n $objProp->Maint = $PropChild;\n break;\n case \"WebSite\":\n $objProp->WebSite = $PropChild;\n break;\n case \"Desc\" :\n $objProp->Desc = $PropChild;\n break;\n case \"Amenities\":\n $objProp->Amenities = explode(\"--\",$PropChild);\n break;\n case \"Highlights\" :\n $objProp->Highlights = $PropChild;\n break;\n case \"Coupon\" :\n $objProp->Coupon = $PropChild;\n break;\n case \"Vtour\" :\n $objProp->Vtour = $PropChild;\n break;\n case \"MainPic\" :\n $objProp->MainPic = $PropChild;\n break;\n case \"SubPic1\" :\n case \"SubPic2\" :\n case \"SubPic3\" :\n case \"SubPic4\" :\n case \"SubPic5\" :\n array_push($objProp->SubPics, $PropChild) ;\n break;\n case \"OneBedLowPrices\" :\n case \"TwoBedLowPrices\" :\n case \"ThreeBedLowPrices\" :\n case \"FourBedLowPrices\" :\n\n array_push($objProp->BedLowPrices,$PropChild) ;\n // or die(\" Error Creating BedLowPrices object \");\n break;\n\n case \"UnitTypes\" :\n\n $objProp->Units = $this->BuildUnit($objProp->Units,$PropChild);\n // die(\" Error Creating Unit object \") ;\n\n break;\n case \"ReportRoster\" :\n \n\n $objProp->Reports = $this->BuildReport($objProp->Reports,$PropChild) ;\n // or die (\" Error Creating Report object \") ;\n break;\n }\n\n }\n\n return $objProp;\n\n\n }", "function __construct(){\r\n\t\t$this->listLength = 0;\r\n\t\t$this->head = null;\r\n\t\t$this->tail = null;\r\n\t}", "public function __construct($propertyClassType = null, $contentURL = null)\n {\n $this\n ->setPropertyClassType($propertyClassType)\n ->setContentURL($contentURL);\n }", "public function property(&$class, $property);", "function createProperty();", "public function setUlClass($ulClass)\n {\n if (is_string($ulClass)) {\n $this->_ulClass = $ulClass;\n }\n\n return $this;\n }", "public function __construct($list)\n {\n parent::__construct();\n $this->setList($list);\n }", "public function getListItemCssClasses(int $level, int $childrenCount): string\n {\n $classes = $this->getClassesList($level, $childrenCount);\n\n return 'class=\"' . implode(' ', $classes);\n }", "public function writeClassProperties($class)\n {\n $text = array();\n \n $list = array(\n 'public' => array(),\n 'protected' => array(),\n 'private' => array(),\n );\n \n // collect properties into the list by access/visibility\n foreach ($this->api[$class]['properties'] as $name => $info) {\n \n $tmp = array();\n \n // header\n $tmp[] = $this->_title3(\"`\\$$name` {#class.$class.Properties.$name}\");\n \n // summary\n $tmp[] = '_(' . ($info['static'] ? 'static ' : '')\n . $info['type'] . ')_ '\n . $info['summ'];\n $tmp[] = '';\n \n // inherited?\n if ($info['from']) {\n $tmp[] = \"Inherited from [[{$info['from']}::\\$$name | {$info['from']}]].\";\n $tmp[] = '';\n }\n \n // narrative\n if ($info['narr']) {\n $tmp[] = $info['narr'];\n $tmp[] = '';\n }\n \n // save in the list\n $list[$info['access']][] = implode(\"\\n\", $tmp);\n }\n \n // now collapse the list into a single series\n foreach ($list as $access => $properties) {\n \n $text[] = $this->_title2(ucfirst($access));\n \n if ($properties) {\n $text = array_merge($text, $properties);\n } else {\n $text[] = 'None.';\n $text[] = '';\n }\n \n $text[] = '';\n }\n \n $this->_write(\"class\", \"$class/Properties\", $text);\n }", "public function getPropertiesList() : array;", "public function createNodeResultSet($data = array(), $properties = array())\n {\n $result = [];\n\n if (is_array(reset($data))) {\n foreach ($data as $index => $attributes) {\n $result[] = new CypherMap(['node' => $this->createNode($attributes)]);\n }\n } else {\n $node = $this->createNode($data);\n $result[] = new CypherMap(['node' => $node]);\n }\n\n // the ResultSet $result part\n\n return new CypherList($result);\n }", "public function __construct()\n {\n $this->ListItem = [];\n // $this->type='ul';\n }", "private function parseProperties(): void\n {\n $properties = $this->extractProperties();\n\n foreach ($properties as $property)\n {\n if ($property['docblock']===null)\n {\n $docId = null;\n }\n else\n {\n $docId = PhpAutoDoc::$dl->padDocblockInsertDocblock($property['docblock']['doc_line_start'],\n $property['docblock']['doc_line_end'],\n $property['docblock']['doc_docblock']);\n }\n\n PhpAutoDoc::$dl->padClassInsertProperty($this->clsId,\n $docId,\n $property['name'],\n Cast::toManInt($property['is_static']),\n $property['visibility'],\n $property['value'],\n $property['start'],\n $property['end']);\n }\n }", "public function create()\n {\n return view('admin.property-classes.create');\n }", "public function setLiClass(string $liClass);", "public static function listItemProperties( query $query = null, connection $source = null, $properties = null )\n\t{\n\t\tif ( $query !== null ) {\n\t\t\t// clone provided query for starting vanilla set of properties to fetch\n\t\t\t$query = clone $query;\n\t\t\t$query->dropProperties();\n\t\t} else\n\t\t\t$query = static::browse( $source );\n\n\n\t\t/*\n\t\t * adjust query to fetch properties every listed item's ID and label\n\t\t * consist of\n\t\t */\n\n\t\t$db = $query->datasource();\n\t\t$set = $db->qualifyDatasetName( static::$set_prefix . static::$set );\n\n\t\tif ( is_null( $properties ) )\n\t\t\t$properties = array( '.*' );\n\n\t\tif ( is_array( $properties ) )\n\t\t\tforeach ( $properties as $alias => $name )\n\t\t\t{\n\t\t\t\tif ( !preg_match( '/[)(]/', $name ) )\n\t\t\t\t\t$name = $db->quoteName( $name );\n\n\t\t\t\tif ( is_string( $alias ) )\n\t\t\t\t\t$alias = $db->quoteName( $alias );\n\t\t\t\telse\n\t\t\t\t\t$alias = null;\n\n\t\t\t\t$query->addProperty( $set . '.' . $name, $alias );\n\t\t\t}\n\n\n\t\treturn $query;\n\t}", "public function __construct($value, Reflection_Property $property)\n\t{\n\t\tparent::__construct($value, $property->getType()->asReflectionClass());\n\t\t$this->properties = Replaces_Annotations::replaceProperties($this->getProperties());\n\t\t$this->value = array_keys($this->properties);\n\t}", "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TITLE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__EXPORT => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_net_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_net_type',\n 'isys_net_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_bDisabled' => '1',\n 'p_strTable' => 'isys_net_type',\n 'p_bDbFieldNN' => '1'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'address' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'netmask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'Netmask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__MASK_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input input-mini',\n 'p_bReadonly' => ''\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'gateway' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DEF_GW',\n C__PROPERTY__INFO__DESCRIPTION => 'Default Gateway'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_catg_ip_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DEF_GW_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_s_net',\n 'callback_property_gateway'\n ]\n )\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_gateway'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'range_from' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_FROM',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP from'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_from'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_FROM'\n ]\n ]\n ),\n 'range_to' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_TO',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP to'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_to'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_TO'\n ]\n ]\n ),\n 'dns_server' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_SERVER',\n C__PROPERTY__INFO__DESCRIPTION => 'DNS server'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_catg_ip_list',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_SERVER'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_net_dns_server'\n ]\n ]\n ]\n ),\n 'dns_domain' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::multiselect(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__INFO__DESCRIPTION => 'Domain / DNS namespace'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__TABLE_ALIAS => 'dns_domain',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_net_dns_domain',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_net_dns_domain',\n 'placeholder' => _L('LC__CMDB__CATS__NET__DNS_DOMAIN'),\n 'emptyMessage' => _L('LC__CMDB__CATS__NET__NO_DNS_DOMAINS_FOUND'),\n 'p_onComplete' => \"idoit.callbackManager.triggerCallback('cmdb-cats-net-dns_domain-update', selected);\",\n 'multiselect' => true\n //'p_arData' => new isys_callback(array('isys_cmdb_dao_category_s_net', 'callback_property_dns_domain'))\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => false,\n C__PROPERTY__CHECK__VALIDATION => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'dialog_multiselect'\n ]\n ]\n ]\n ),\n 'cidr_suffix' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__CIDR_SUFFIX',\n C__PROPERTY__INFO__DESCRIPTION => 'CIDR-Suffix'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__cidr_suffix'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__CIDR',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'reverse_dns' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATS__NET__REVERSE_DNS',\n C__PROPERTY__INFO__DESCRIPTION => 'Reverse dns'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__reverse_dns'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__REVERSE_DNS'\n ]\n ]\n ),\n 'layer2_assignments' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__LAYER2_NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Layer-2-net assignments'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__LAYER2',\n C__PROPERTY__UI__PARAMS => [\n isys_popup_browser_object_ng::C__TITLE => 'LC__BROWSER__TITLE__NET',\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATS__LAYER2_NET'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'layer_2_assignments'\n ]\n ]\n ]\n ),\n 'address_v6' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::virtual(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net v6'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V6'\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__NET\n ]\n ]\n )\n ];\n }", "abstract protected function splitPropertyParts(string $property, string $resourceClass): array;", "public function __construct() {\n if ( func_num_args() > 0 ) {\n $this->list = func_get_args();\n } else {\n $this->list = array();\n }\n }", "protected function _emitClassProperties($class, $properties) { if (isset($properties) && is_array($properties)) { // YES\n // TODO: Move to the Flag to Configuration File\n $config_sortProperties = true; // Sort Class or Interface Properties?\n if ($config_sortProperties) {\n ksort($properties);\n }\n\n foreach ($properties as $name => $property) {\n if (isset($property['visibility'])) {\n $this->_emitter->emit($property['visibility']);\n }\n $this->_emitter->emit(\"\\${$name}\");\n if (isset($property['default'])) {\n $this->_emitter->emit('=');\n $this->_processExpression($property['default'], $class);\n }\n $this->_emitter->emitEOS();\n }\n }\n }", "public function generateClass($class) {\n $gsTemplate = $this->loader->load('propertyTemplate');\n $namespaceTemplate = $this->loader->load('namespaceTemplate');\n \n $fp = fopen($this->outputdir . $class['className'] . '.php', 'w');\n $newClass = $this->factory->class($class['className'])->extend('\\HighCharts\\AbstractChartOptions');\n $newClassConstructor = $this->factory->method('__construct');\n $namespaceStmt = $namespaceTemplate->getStmts(array('name' => $this->namespace));\n $nsNode = $namespaceStmt[0];\n $properties = $this->getProperties($class['originalName']);\n $propnames = array();\n \n foreach ($properties as $property) {\n //Generate getters/setters for properties \n $placeHolders = array('name' => $property['name'], 'type' => $property['returnType'], 'description' => $this->processDescription($property['description']));\n $propertyStmts = $gsTemplate->getStmts($placeHolders);\n $thisReference = new PHPParser_Node_Expr_PropertyFetch(new PHPParser_Node_Expr_Variable('this'), $property['name']);\n if($property['isParent']) { //Recursively generate classes\n $this->generateClass($property); \n \n if(strpos($property['returnType'], '[]') !== false) { // Create an empty collection for array type parameters that have child classes\n $collectionstmt = new PHPParser_Node_Expr_Assign($thisReference, new PHPParser_Node_Expr_New(new PHPParser_Node_Name('\\HighCharts\\ChartOptionsCollection')));\n $newClassConstructor->addStmt($collectionstmt);\n } else { \n $newClassConstructor->addStmt(new PHPParser_Node_Expr_Assign($thisReference, new PHPParser_Node_Expr_New(new PHPParser_Node_Name($property['className']))));\n }\n } else {\n if(strpos($property['returnType'], '[]') !== false) { // Create an empty collection for unspecified array types\n $collectionstmt = new PHPParser_Node_Expr_Assign($thisReference, new PHPParser_Node_Expr_New(new PHPParser_Node_Name('\\HighCharts\\ChartOptions')));\n $newClassConstructor->addStmt($collectionstmt);\n }\n }\n\n $newClass->addStmts($propertyStmts[0]->stmts);\n $propnames[] = $property['name']; \n }\n //$getOptionsMethod = $this->generateGetOptionsMethodStatement($propnames);\n //$newClass->addStmt($getOptionsMethod);\n $newClass->addStmt($newClassConstructor);\n $node = $newClass->getNode();\n $node->setAttribute('comments', array(new PHPParser_Comment_Doc(\"/**\\n * \" . $class['className'] . \"\\n *\\n * \" . $this->processDescription($class['description']) . \"\\n */\")));\n \n $classDefinition = $this->prettyprinter->prettyPrint(array($nsNode, $node));\n fwrite($fp, \"<?php\\n$classDefinition\");\n fclose($fp);\n\n }", "public function __construct()\n {\n foreach ($this as $key => $property)\n if (is_array($property) && isset($property['path']))\n $this->{$key}['path'] = VPATH . $property['path'] . EXT;\n }", "public function serialize() {\r\n $class = $this->domDocument->createElement( \"class\" );\r\n $class->appendChild(\r\n $this->domDocument->createElement(\"name\", $this->pClass->getName())\r\n );\r\n $class->appendChild($this->serializeFields());\r\n $class->appendChild($this->serializeSuperclasses());\r\n\r\n return $class;\r\n }", "public function getClassAttributeDescription(): static\n {\n $classes = $this->getDocumentedClasses();\n\n $this->attributes = [];\n\n foreach ($classes as $class) {\n $this->attributes[$class] = [\n 'class' => $this->getAttributesDescription(new ReflectionClass($class)),\n 'methods' => [],\n 'properties' => [],\n ];\n }\n\n return $this;\n }", "private function getNodesFromQueryResult($propResult, $node=null){\t\n\t\tif(is_array($propResult)){\n\t\t\tforeach ($propResult as $value){\n\t\t\t\t $values[] = new Node($value['fulltext'], $value['fullurl'], $node);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "public function __construct(Property $property)\n {\n $this->property = $property;\n }", "public static function construct(\\lang\\XPClass $class) {\n return $class->getConstructor()->newInstance([]);\n }", "public function lookup($site_name)\n {\n return new PropertyList((array)$this->sites()->findUuidByName($site_name));\n }", "function NewFuncProp($aClassName,$aName,$aLineNbr,$aArgs,$aArgsVal,$aShortComment) {\r\n\treturn new DocFuncProp($aClassName,$aName,$aLineNbr,$aArgs,$aArgsVal,$aShortComment);\r\n }", "public function __construct($_clazz, $_property) {\n parent::__construct('numeric property name is not allowed in ' . $_clazz . '::' . $_property);\n }", "public function addPropertyStoresElementTypesForCollectionProperties()\n {\n $classSchema = new ClassSchema('SomeClass');\n $classSchema->addProperty('a', 'array<\\Neos\\Flow\\Foo>');\n\n $properties = $classSchema->getProperties();\n self::assertEquals('array', $properties['a']['type']);\n self::assertEquals('Neos\\Flow\\Foo', $properties['a']['elementType']);\n }", "public function __construct( IList $list )\n {\n $this->_setDelegate($list);\n }", "public function __construct()\n {\n $this->productList = new ProductList();\n }", "function addListItemProperty($a_txt, $a_val)\n\t{\n\t\t$this->list_properties[] = array(\"txt\" => $a_txt, \"val\" => $a_val);\n\t}", "public function create($propertyValues = []);", "public function __construct($props)\n {\n $this->props = $props;\n }", "public function newChecklist()\n {\n $this->checklist = new Checklist();\n }", "public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }", "public function getPathListParser ()\n {\n return new \\vc\\Parser\\PathList(\n new \\vc\\Parser\\Path\n );\n }", "protected function _addPropertiesNode(array $parameters = array())\n\t{\n\t\t$this->responseXml->addChild('properties');\n\t\t\n\t\t$whereClause = $this->_generateWhereClause($parameters);\n\t\t$orderByClause = ' ORDER BY properties.properties_id, properties_description.language_id ASC ';\n\t\t$limitation = '';\n\t\t$propertyIdsArray = true;\n\t\t\n\t\tif(count($parameters) > 0)\n\t\t{\n\t\t\t$propertyIdsArray = array();\n\t\t\t\n\t\t\t$groupClause = 'GROUP BY properties.properties_id';\n\t\t\t$limitClause = $this->_generateLimitClause($parameters);\n\t\t\t\n\t\t\t$query = \"SELECT properties.properties_id\n\t\t\t\t\t\t\tFROM properties \n\t\t\t\t\t\t\tLEFT JOIN properties_description USING (properties_id)\n\t\t\t\t\t\t\t\" . $whereClause . \"\n\t\t\t\t\t\t\t\" . $groupClause . \"\n\t\t\t\t\t\t\t\" . $orderByClause . \"\n\t\t\t\t\t\t\t\" . $limitClause;\n\t\t\t$results = xtc_db_query($query);\n\t\t\twhile($row = xtc_db_fetch_array($results))\n\t\t\t{\n\t\t\t\t$propertyIdsArray[] = $row['properties_id'];\n\t\t\t}\n\t\t\t\n\t\t\t$limit = 0;\n\t\t\t$offset = 0;\n\t\t\tif(isset($parameters['offset']) && !empty($parameters['offset']))\n\t\t\t{\n\t\t\t\t$offset = (int)$parameters['offset'];\n\t\t\t}\n\n\t\t\tif(isset($parameters['limit']) && !empty($parameters['limit']))\n\t\t\t{\n\t\t\t\t$limit = (int)$parameters['limit'];\n\t\t\t\t\n\t\t\t\tif(!empty($propertyIdsArray))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tif($whereClause == '' )\n\t\t\t\t\t{\n\t\t\t\t\t\t$limitation = ' WHERE properties.properties_id IN (' . implode(',', $propertyIdsArray) . ') ';\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$limitation .= ' AND properties.properties_id IN (' . implode(',', $propertyIdsArray) . ') ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(empty($propertyIdsArray) == false)\n\t\t{\n\t\t\t$query = \"\n\t\t\t\t\tSELECT * \n\t\t\t\t\tFROM properties \n\t\t\t\t\tLEFT JOIN properties_description USING (properties_id)\n\t\t\t\t\t\" . $whereClause . \"\n\t\t\t\t\t\" . $limitation . \"\n\t\t\t\t\t\" . $orderByClause;\n\t\t\t$results = xtc_db_query($query);\n\n\t\t\t$currRecordId = 0;\n\t\t\twhile($row = xtc_db_fetch_array($results))\n\t\t\t{\n\t\t\t\t// check if new property\n\t\t\t\tif($currRecordId != $row['properties_id'])\n\t\t\t\t{\n\t\t\t\t\t$propertyChildNode = $this->responseXml->properties->addChild('property');\n\t\t\t\t}\n\n\t\t\t\t// add property data\n\t\t\t\t$this->add($row, $propertyChildNode);\n\n\t\t\t\t// check if new property\n\t\t\t\tif($currRecordId != $row['properties_id'])\n\t\t\t\t{\n\t\t\t\t\t$propertyValuesChildNode = $propertyChildNode->addChild('property_values');\n\t\t\t\t\t// add values\n\t\t\t\t\t$gxmlPropertyValues = MainFactory::create_object( 'GxmlPropertyValues' );\n\t\t\t\t\t$gxmlPropertyValues->addPropertyValuesNode( array( 'property_child' => &$propertyValuesChildNode, 'property_id' => $row['properties_id'] ) );\n\t\t\t\t}\n\n\t\t\t\t$currRecordId = $row['properties_id'];\n\t\t\t}\n\t\t}\n\t}", "public function propertyListNotEmpty(){\n try {\n // Sparql11query.g:273:3: ( verb objectList ( SEMICOLON ( verb objectList )? )* ) \n // Sparql11query.g:274:3: verb objectList ( SEMICOLON ( verb objectList )? )* \n {\n $this->pushFollow(self::$FOLLOW_verb_in_propertyListNotEmpty947);\n $this->verb();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_objectList_in_propertyListNotEmpty949);\n $this->objectList();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:274:19: ( SEMICOLON ( verb objectList )? )* \n //loop37:\n do {\n $alt37=2;\n $LA37_0 = $this->input->LA(1);\n\n if ( ($LA37_0==$this->getToken('SEMICOLON')) ) {\n $alt37=1;\n }\n\n\n switch ($alt37) {\n \tcase 1 :\n \t // Sparql11query.g:274:20: SEMICOLON ( verb objectList )? \n \t {\n \t $this->match($this->input,$this->getToken('SEMICOLON'),self::$FOLLOW_SEMICOLON_in_propertyListNotEmpty952); \n \t // Sparql11query.g:274:30: ( verb objectList )? \n \t $alt36=2;\n \t $LA36_0 = $this->input->LA(1);\n\n \t if ( ($LA36_0==$this->getToken('A')||$LA36_0==$this->getToken('IRI_REF')||$LA36_0==$this->getToken('PNAME_NS')||$LA36_0==$this->getToken('PNAME_LN')||($LA36_0>=$this->getToken('VAR1') && $LA36_0<=$this->getToken('VAR2'))) ) {\n \t $alt36=1;\n \t }\n \t switch ($alt36) {\n \t case 1 :\n \t // Sparql11query.g:274:31: verb objectList \n \t {\n \t $this->pushFollow(self::$FOLLOW_verb_in_propertyListNotEmpty955);\n \t $this->verb();\n\n \t $this->state->_fsp--;\n\n \t $this->pushFollow(self::$FOLLOW_objectList_in_propertyListNotEmpty957);\n \t $this->objectList();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop37;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true){\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function buildListTemplate()\n {\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"titre\")\n ->setSize(3)\n ->setHeading(\"Titre\")\n );\n\n $this->addListColumn(\n SharpListTemplateColumnConfig::create(\"soustitre\")\n ->setSize(3)\n ->setHeading(\"Sous-titre\")\n );\n }", "function __construct($name) {\n\t\t$this->styleDocument = ODT::getInstance()->getStyleDocument();\n\t\t$this->name = $name;\n\t\t$this->styleElement = $this->styleDocument->createElement('text:list-style');\n\t\t$this->styleElement->setAttribute('style:name', $name);\n\t\t$this->styleElement->setAttribute('style:display-name', $name);\n\t\t$this->styleDocument->getElementsByTagName('office:styles')->item(0)->appendChild($this->styleElement);\n\t}", "public function get_default_list_config()\n {\n return '[[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_id\",false,\"LC__CMDB__OBJTYPE__ID\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_id\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_title\",false,\"LC__UNIVERSAL__TITLE_LINK\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_title\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"its_type\",\"isys_its_type__title\",\"LC__CMDB__CATG__TYPE\",\"isys_cmdb_dao_category_g_its_type::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_created\",false,\"LC__TASK__DETAIL__WORKORDER__CREATION_DATE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_created\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_changed\",false,\"LC__CMDB__LAST_CHANGE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_changed\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"purpose\",\"isys_purpose__title\",\"LC__CMDB__CATG__GLOBAL_PURPOSE\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"category\",\"isys_catg_global_category__title\",\"LC__CMDB__CATG__GLOBAL_CATEGORY\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_cmdb_status\",false,\"LC__UNIVERSAL__CMDB_STATUS\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_cmdb_status\"]]]';\n }", "function montheme_li_class($classes)\n{\n $classes = [];\n $classes[] = 'nav-item';\n\n return $classes;\n}", "public function __construct($val)\n {\n $this->property = $val;\n }", "public function __construct(SS_List $list, $keyField = \"ID\", $valueField = \"Title\") {\n\t\t$this->list = $list;\n\t\t$this->keyField = $keyField;\n\t\t$this->valueField = $valueField;\n\t}", "public function getPropertyRelatedClasses(): array;", "public function getListChildClass()\n {\n return $this->child_class;\n }", "function gymfitness_li_class($classes,$item,$args) {\n \n $classes[] = 'nav-item';\n \n return $classes;\n\n}", "public function property(array $attributes)\r\n {\r\n $property = $this->dom->createElement('property');\r\n foreach ($attributes as $name => $value) {\r\n $property->setAttribute($name, $value);\r\n }\r\n\r\n $this->project->appendChild($property);\r\n }", "public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true && count($values) > 0 && is_array($values[0])){\n\t\t\t\t$values = current($values);\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function _classSectionProperties($class, $properties) { if (isset($properties) && is_array($properties)) { // YES\n // TODO: Move to the Flag to Configuration File\n $config_sortProperties = true; // Sort Class or Interface Properties?\n if ($config_sortProperties) {\n ksort($properties);\n }\n\n foreach ($properties as $name => $property) {\n if (isset($property['visibility'])) {\n $this->_emitter->emit_keywords($property['visibility']);\n }\n $this->_emitter->emit(\"\\${$name}\");\n if (isset($property['default'])) {\n $this->_emitter->emit_operator('=');\n $this->_processExpression($property['default'], $class);\n }\n $this->_emitter->emit_eos();\n }\n }\n }", "public function __construct( $class, $property )\n {\n parent::__construct( \"The class '{$class}' and property '{$property}' does not contain a template manager which is required.\" );\n }", "public function __construct($createProperty, $property)\n {\n $this->property = $property;\n\n $this->createProperty = $createProperty;\n }", "public function setClass(array $class) {\n \t$this->_class = $class;\n \treturn $this;\n }", "public function __construct(array $list = array())\n {\n $this->list = array_values($list);\n }", "protected function properties()\n {\n return [\n 'mount_point' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE_DRIVELETTER',\n C__PROPERTY__INFO__DESCRIPTION => 'Driveletter'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__driveletter'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_LETTER'\n ]\n ]\n ),\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TITLE'\n ]\n ]\n ),\n 'system_drive' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'System drive'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__system_drive'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO()),\n 'p_bDbFieldNN' => 1\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'filesystem' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'isys_filesystem_type',\n C__PROPERTY__INFO__DESCRIPTION => 'Filesystem'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_filesystem_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_filesystem_type',\n 'isys_filesystem_type__id',\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_FILESYSTEM',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_filesystem_type'\n ]\n ]\n ]\n ),\n 'capacity' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB_CATG__MEMORY_CAPACITY',\n C__PROPERTY__INFO__DESCRIPTION => 'Capacity'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__capacity'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_CAPACITY',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'capacity_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'c_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'serial' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SERIAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Serial number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__serial'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_SERIAL'\n ]\n ]\n ),\n 'assigned_raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD_DRIVE_TYPE__RAID_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Software RAID group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__id__raid_pool',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_RAIDGROUP',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_assigned_raid'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'drive_type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Typ'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catd_drive_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catd_drive_type',\n 'isys_catd_drive_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TYPE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'device' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_stor_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_stor_list',\n 'isys_catg_stor_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Raid-Array'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_raid_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'ldev' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Logical devices (Client)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_ldevclient_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_ldevclient_list',\n 'isys_catg_ldevclient_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'category_const' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__OBJTYPE__CONST',\n C__PROPERTY__INFO__DESCRIPTION => 'Constant'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__const'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__CATEGORY_CONST'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'free_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'free_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'free_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'free_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'fs_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'used_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'used_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'us_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__DRIVE\n ]\n ]\n )\n ];\n }", "public static function createInstanceList($parsed, $class)\n {\n $list = [];\n\n foreach ($parsed as $value) {\n $list[] = $class::create($value);\n }\n\n return $list;\n }", "public function configureProperty(string $property, array $data) {\n $this->properties[$property] = $data;\n return $this;\n }", "public function __construct($input)\n {\n $this->type = gettype($input);\n $types = array('object', 'array');\n\n if (!in_array($this->type, $types)) {\n $this->value = $input;\n } else {\n foreach ($input as $key => $value) {\n $this->nodes[$key] = new self($value);\n $this->nodes[$key]->setParent($this);\n }\n }\n }", "function __construct($propDict = array())\n {\n if (!is_array($propDict)) {\n $propDict = array();\n }\n $this->_propDict = $propDict;\n }", "function __construct($propDict = array())\n {\n if (!is_array($propDict)) {\n $propDict = array();\n }\n $this->_propDict = $propDict;\n }", "public function __construct()\n\t{\n\t\t$this->options = array(\n\t\t\t'class.first' => 'first',\n\t\t\t'class.last' => 'last',\n\t\t\t'class.single' => 'single',\n\t\t);\n\t}", "public function propToConfig()\n {\n $class = new ReflectionClass($this);\n $config = [];\n $propTags = $this->propTags();\n\n foreach ($class->getProperties(\\ReflectionProperty::IS_PUBLIC) as $property) {\n if (!$property->isStatic()) {\n $name = $property->getName();\n if(isset($propTags[$name])){\n $config[] = $propTags[$name];\n }else{\n $default = [];\n $default['prop'] = $name;\n $default['propName'] = $name;\n $default['type'] = 'text';\n $default['required'] = false;\n $default['value'] = '';\n $config[] = $default;\n }\n }\n }\n return $config;\n }", "public function makeFieldList() {}", "function __construct()\n {\n $this->firstNode = NULL;\n $this->lastNode = NULL;\n $this->count = 0;\n }", "protected function define(ClassDefinition $class)\n {\n $class->property($this->money)->asType(Money::collectionType());\n }", "public function getUlClass()\n {\n return $this->_ulClass;\n }", "public function nodeProperties()\n {\n return\n 'Base URI: ' . $this->baseURI . PHP_EOL\n . 'Namespace URI: ' . $this->namespaceURI . PHP_EOL\n . 'Name: ' . $this->name . PHP_EOL\n . 'Local Name: ' . $this->localName . PHP_EOL\n . 'Prefix: ' . $this->prefix . PHP_EOL\n . 'XML Language: ' . $this->xmlLang . PHP_EOL\n \n . 'Node Type: ' . $this->nodeType() . PHP_EOL\n . 'Depth: ' . $this->depth . PHP_EOL\n . 'Value: ' . $this->value . PHP_EOL\n . 'Is Empty Element: ' . ($this->isEmptyElement ? 'Yes' : 'No') . PHP_EOL\n \n . 'Attributes: ' . $this->attributeCount . PHP_EOL\n . 'Is attribute defaulted from DTD: ' . ($this->isDefault ? 'Yes' : 'No') . PHP_EOL\n ;\n }", "function __construct(){\n\t\t$this->head = NULL;\n\t\t$this-> tail = NULL;\n\t}", "public function properties()\r\n {\r\n $props = $this->class->getProperties();\r\n \r\n sort( $props );\r\n \r\n foreach ( $props as $key => $property )\r\n {\r\n // Only show public properties, because Reflection can't get the private ones\n if ( $property->isPublic() )\r\n {\r\n $props[$key] = new Docs_Property( $this->class->name, $property->name );\r\n }\r\n else\r\n {\r\n unset( $props[$key] );\r\n }\r\n }\r\n \r\n return $props;\r\n }", "protected function parsePropertyType()\n {\n $this->debug('parsePropertyType');\n\n // TODO: can the property be lowercase or camelcase as in old spec?\n $types = array(\"STRING\", \"BINARY\", \"LONG\", \"DOUBLE\", \"BOOLEAN\", \"DATE\", \"NAME\", \"PATH\",\n \"REFERENCE\", \"WEAKREFERENCE\", \"DECIMAL\", \"URI\", \"UNDEFINED\", \"*\", \"?\");\n\n $this->expectToken(Token::TK_SYMBOL, '(');\n\n $data = $this->tokenQueue->get()->getData();\n if (!in_array($data, $types)) {\n throw new ParserException($this->tokenQueue, sprintf(\"Invalid property type: %s\", $data));\n }\n\n $this->expectToken(Token::TK_SYMBOL, ')');\n\n $this->debugRes('propertyType: ' . $data);\n\n return new SyntaxTreeNode('propertyType', array('value' => $data));\n }", "public function getClassPropertyAnnotation(string $class, string $annotation): array;", "function __construct() {\r\n\t\t$this->Class = 'form-control';\r\n\t\t$this->SelectedClass = 'active';\r\n\t\t$this->HTML = '';\r\n\t\t$this->ListType = 0;\r\n\t\t$this->ListBoxHeight = 10;\r\n\t\t$this->MultipleSeparator = ', ';\r\n\t\t$this->RadiosPerLine = 1;\r\n\t\t$this->AllowNull = true;\r\n\t\t$this->ApplySelect2 = true;\r\n\t}", "public function __construct()\n {\n $this->indentInc = 4;\n $this->listCache = null;\n }", "public function __construct(array $values = []) {\n\t\tparent::__construct('ul', true);\n\n\t\tforeach ($values as $value) {\n\t\t\t$this->addItem($value);\n\t\t}\n\n\t\tif (!$values) {\n\t\t\t$this->addItem(__('List is empty'), 'empty');\n\t\t\t$this->emptyList = true;\n\t\t}\n\t}", "protected function createItem()\n {\n return new PHP_Depend_Code_Class('clazz', 0);\n }", "private function classlist(&$db, $class, $t=0, $enddate=0)\n\t{\n\t\tif (!$db->tableExists('classes'))\n\t\t{\n\t\t\t\\Notify::error('COM_USAGE_ERROR_MISSING_TABLE', 'classes');\n\t\t\treturn '';\n\t\t}\n\n\t\tif (!$db->tableExists('classvals'))\n\t\t{\n\t\t\t\\Notify::error('COM_USAGE_ERROR_MISSING_TABLE', 'classvals');\n\t\t\treturn '';\n\t\t}\n\n\t\t// Set class list parameters...\n\t\t$hub = 1;\n\t\tif (!$enddate)\n\t\t{\n\t\t\t$dtmonth = date(\"m\") - 1;\n\t\t\t$dtyear = date(\"Y\");\n\t\t\tif (!$dtmonth)\n\t\t\t{\n\t\t\t\t$dtmonth = 12;\n\t\t\t\t$dtyear = $dtyear - 1;\n\t\t\t}\n\t\t\t$enddate = $dtyear . '-' . $dtmonth;\n\t\t}\n\n\t\t// Look up class list information...\n\t\t$classname = '';\n\t\t$sql = \"SELECT name, valfmt, size\n\t\t\t\tFROM classes\n\t\t\t\tWHERE class = \" . $db->Quote($class);\n\t\t$db->setQuery($sql);\n\t\t$result = $db->loadRow();\n\t\tif ($result)\n\t\t{\n\t\t\t$classname = $result[0];\n\t\t\t$valfmt = $result[1];\n\t\t\t$size = $result[2];\n\t\t}\n\t\t$html = '';\n\t\tif ($classname)\n\t\t{\n\t\t\t// Prepare some date ranges...\n\t\t\t$enddate .= '-00';\n\t\t\t$dtmonth = floor(substr($enddate, 5, 2));\n\t\t\t$dtyear = floor(substr($enddate, 0, 4));\n\t\t\t$dt = $dtyear . '-' . sprintf(\"%02d\", $dtmonth) . '-00';\n\t\t\t$dtyearnext = $dtyear + 1;\n\t\t\t$dtmonthnext = floor(substr($enddate, 5, 2) + 1);\n\t\t\tif ($dtmonthnext > 12)\n\t\t\t{\n\t\t\t\t$dtmonthnext = 1;\n\t\t\t\t$dtyearnext++;\n\t\t\t}\n\t\t\t$dtyearprior = substr($enddate, 0, 4) - 1;\n\t\t\t$monthtext = date(\"F\", mktime(0, 0, 0, $dtmonth, 1, $dtyear)) . ' ' . $dtyear;\n\t\t\t$yeartext = \"Jan - \" . date(\"M\", mktime(0, 0, 0, $dtmonth, 1, $dtyear)) . ' ' . $dtyear;\n\t\t\t$twelvetext = date(\"M\", mktime(0, 0, 0, $dtmonthnext, 1, $dtyear)) . ' ' . $dtyearprior . ' - ' . date(\"M\", mktime(0, 0, 0, $dtmonth, 1, $dtyear)) . ' ' . $dtyear;\n\t\t\t$period = array(\n\t\t\t\tarray('key' => 1, 'name' => $monthtext),\n\t\t\t\tarray('key' => 0, 'name' => $yeartext),\n\t\t\t\tarray('key' => 12, 'name' => $twelvetext)\n\t\t\t);\n\n\t\t\t// Process each different date/time periods/range...\n\t\t\t$maxrank = 0;\n\t\t\t$classlist = array();\n\t\t\tfor ($pidx = 0; $pidx < count($period); $pidx++)\n\t\t\t{\n\t\t\t\t// Calculate the total value for this classlist...\n\t\t\t\t$classlistset = array();\n\t\t\t\t$sql = \"SELECT classvals.name, classvals.value\n\t\t\t\t\t\tFROM classes, classvals\n\t\t\t\t\t\tWHERE classes.class = classvals.class\n\t\t\t\t\t\tAND classvals.hub = \" . $db->Quote($hub) . \"\n\t\t\t\t\t\tAND classes.class = \" . $db->Quote($class) . \"\n\t\t\t\t\t\tAND classvals.datetime = \" . $db->Quote($dt) . \"\n\t\t\t\t\t\tAND classvals.period = \" . $db->Quote($period[$pidx][\"key\"]) . \"\n\t\t\t\t\t\tAND classvals.rank = '0'\";\n\t\t\t\t$db->setQuery($sql);\n\t\t\t\t$results = $db->loadObjectList();\n\t\t\t\tif ($results)\n\t\t\t\t{\n\t\t\t\t\tforeach ($results as $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$formattedval = UsageHtml::valformat($row->value, $valfmt);\n\t\t\t\t\t\tif (strstr($formattedval, 'day') !== false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$chopchar = strrpos($formattedval, ',');\n\t\t\t\t\t\t\tif ($chopchar !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$formattedval = substr($formattedval, 0, $chopchar) . '+';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_push($classlistset, array($row->name, $row->value, $formattedval, sprintf(\"%0.1f%%\", 100)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!count($classlistset))\n\t\t\t\t{\n\t\t\t\t\tarray_push($classlistset, array('n/a', 0, 'n/a', 'n/a'));\n\t\t\t\t}\n\n\t\t\t\t// Calculate the class values for the classlist...\n\t\t\t\t$rank = 1;\n\t\t\t\t$sql = \"SELECT classvals.rank, classvals.name, classvals.value\n\t\t\t\t\t\tFROM classes, classvals\n\t\t\t\t\t\tWHERE classes.class = classvals.class\n\t\t\t\t\t\tAND classvals.hub = \" . $db->Quote($hub) . \"\n\t\t\t\t\t\tAND classes.class = \" . $db->Quote($class) . \"\n\t\t\t\t\t\tAND datetime = \" . $db->Quote($dt) . \"\n\t\t\t\t\t\tAND classvals.period = \" . $db->Quote($period[$pidx][\"key\"]) . \"\n\t\t\t\t\t\tAND classvals.rank > '0'\n\t\t\t\t\t\tORDER BY classvals.rank, classvals.name\";\n\t\t\t\t$db->setQuery($sql);\n\t\t\t\t$results = $db->loadObjectList();\n\t\t\t\tif ($results)\n\t\t\t\t{\n\t\t\t\t\tforeach ($results as $row)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($row->rank > 0 && (!$size || $row->rank <= $size))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twhile ($rank < $row->rank)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($classlistset, array('n/a', 0, 'n/a', 'n/a'));\n\t\t\t\t\t\t\t\t$rank++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$formattedval = UsageHtml::valformat($row->value, $valfmt);\n\t\t\t\t\t\t\tif (strstr($formattedval, 'day') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$chopchar = strrpos($formattedval, ',');\n\t\t\t\t\t\t\t\tif ($chopchar !== false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$formattedval = substr($formattedval, 0, $chopchar) . '+';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($classlistset[0][1] > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($classlistset, array($row->name, $row->value, $formattedval, sprintf(\"%0.1f%%\", (100 * $row->value / $classlistset[0][1]))));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($classlistset, array($row->name, $row->value, $formattedval, 'n/a'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$rank++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile ($rank <= $size || $rank == 1)\n\t\t\t\t{\n\t\t\t\t\tarray_push($classlistset, array('n/a', 0, 'n/a', 'n/a'));\n\t\t\t\t\t$rank++;\n\t\t\t\t}\n\t\t\t\tarray_push($classlist, $classlistset);\n\t\t\t\tif ($rank > $maxrank)\n\t\t\t\t{\n\t\t\t\t\t$maxrank = $rank;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cls = 'even';\n\n\t\t\t// Print class list table...\n\t\t\t$html .= '<table>' . \"\\n\";\n\t\t\t$html .= \"\\t\" . '<caption>Table ' . $t . ': ' . $classname . '</caption>' . \"\\n\";\n\t\t\t$html .= \"\\t\" . '<thead>' . \"\\n\";\n\t\t\t$html .= \"\\t\\t\" . '<tr>' . \"\\n\";\n\t\t\tfor ($pidx = 0; $pidx < count($period); $pidx++)\n\t\t\t{\n\t\t\t\t$html .= '<th colspan=\"3\" scope=\"colgroup\">' . $period[$pidx][\"name\"] . '</th>' . \"\\n\";\n\t\t\t}\n\t\t\t$html .= \"\\t\\t\" . '</tr>' . \"\\n\";\n\t\t\t$html .= \"\\t\" . '</thead>' . \"\\n\";\n\t\t\t$html .= \"\\t\" . '<tbody>' . \"\\n\";\n\t\t\t$html .= \"\\t\\t\" . '<tr class=\"summary\">' . \"\\n\";\n\t\t\tfor ($pidx = 0; $pidx < count($period); $pidx++)\n\t\t\t{\n\t\t\t\t$tdcls = ($pidx != 1) ? ' class=\"group\"' : '';\n\t\t\t\t$html .= \"\\t\\t\\t\" . '<th' . $tdcls . ' scope=\"row\">' . $classlist[$pidx][0][0] . '</th>' . \"\\n\";\n\t\t\t\t$html .= \"\\t\\t\\t\" . '<td' . $tdcls . '>' . $classlist[$pidx][0][2] . '</td>' . \"\\n\";\n\t\t\t\t$html .= \"\\t\\t\\t\" . '<td' . $tdcls . '>' . $classlist[$pidx][0][3] . '</td>' . \"\\n\";\n\t\t\t}\n\t\t\t$html .= \"\\t\\t\" . '</tr>' . \"\\n\";\n\t\t\tfor ($i = 1; $i < $maxrank; $i++)\n\t\t\t{\n\t\t\t\t$cls = ($cls == 'even') ? 'odd' : 'even';\n\n\t\t\t\t$html .= \"\\t\\t\" . '<tr class=\"' . $cls . '\">' . \"\\n\";\n\t\t\t\tfor ($pidx = 0; $pidx < count($period); $pidx++)\n\t\t\t\t{\n\t\t\t\t\t$tdcls = ($pidx != 1) ? ' class=\"group\"' : '';\n\t\t\t\t\t$html .= \"\\t\\t\\t\" . '<th' . $tdcls . ' scope=\"row\">';\n\t\t\t\t\t$html .= (isset($classlist[$pidx][$i][0])) ? $classlist[$pidx][$i][0] : '';\n\t\t\t\t\t$html .= '</th>' . \"\\n\";\n\t\t\t\t\t$html .= \"\\t\\t\\t\" . '<td' . $tdcls . '>';\n\t\t\t\t\t$html .= (isset($classlist[$pidx][$i][2])) ? $classlist[$pidx][$i][2] : '';\n\t\t\t\t\t$html .= '</td>' . \"\\n\";\n\t\t\t\t\t$html .= \"\\t\\t\\t\" . '<td' . $tdcls . '>';\n\t\t\t\t\t$html .= (isset($classlist[$pidx][$i][3])) ? $classlist[$pidx][$i][3] : '';\n\t\t\t\t\t$html .= '</td>' . \"\\n\";\n\n\t\t\t\t}\n\t\t\t\t$html .= \"\\t\\t\" . '</tr>' . \"\\n\";\n\t\t\t}\n\t\t\t$html .= \"\\t\" . '</tbody>' . \"\\n\";\n\t\t\t$html .= '</table>' . \"\\n\";\n\t\t}\n\t\treturn $html;\n\t}", "public function __construct(ElementType $type, $properties = false) {\n\n }", "public function embedProperty() {\n\n $this->addEmbed(\"Property\");\n return $this;\n }", "public function __construct($list_json, $list_types)\n\t{\n\t\t$items = \\json_decode($list_json);\n\t\t\n\t\tif(is_array($items))\n\t\t\t$this->data = $items;\n\t\t\n\t\tif(is_array($list_types))\n\t\t\t$this->types = $list_types;\n\t\telse\n\t\t\t$this->types = array('ul');\n\t}", "protected function properties()\n {\n return [\n 'formfactor' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR',\n C__PROPERTY__INFO__DESCRIPTION => 'Form factor'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__isys_catg_formfactor_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_formfactor_type',\n 'isys_catg_formfactor_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_catg_formfactor_type',\n 'p_strClass' => 'input-small'\n ]\n ]\n ]\n ),\n 'rackunits' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__RACKUNITS',\n C__PROPERTY__INFO__DESCRIPTION => 'Rack units'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__rackunits'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_RACKUNITS',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-mini'\n ]\n ]\n ]\n ),\n 'unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_DIMENSION_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'dimension unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__isys_depth_unit__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_depth_unit',\n 'isys_depth_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_DEPTH_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_depth_unit',\n 'p_strClass' => 'input-mini',\n 'p_bDbFieldNN' => 1\n ],\n C__PROPERTY__UI__DEFAULT => C__DEPTH_UNIT__INCH\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'width' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_WIDTH',\n C__PROPERTY__INFO__DESCRIPTION => 'Width'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__installation_width'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_WIDTH',\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['measure']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit'\n ]\n ]\n ),\n 'height' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_HEIGHT',\n C__PROPERTY__INFO__DESCRIPTION => 'Height'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__installation_height'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_HEIGHT',\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['measure']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit'\n ]\n ]\n ),\n 'depth' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_DEPTH',\n C__PROPERTY__INFO__DESCRIPTION => 'Depth'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__installation_depth'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_DEPTH',\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['measure']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit'\n ]\n ]\n ),\n 'weight' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_WEIGHT',\n C__PROPERTY__INFO__DESCRIPTION => 'Weight'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__installation_weight'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_WEIGHT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['weight']\n ],\n C__PROPERTY__FORMAT__UNIT => 'weight_unit'\n ]\n ]\n ),\n 'weight_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__FORMFACTOR_INSTALLATION_WEIGHT_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'weight unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__isys_weight_unit__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_weight_unit',\n 'isys_weight_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__FORMFACTOR_INSTALLATION_WEIGHT_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_weight_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bDbFieldNN' => 1,\n 'p_bInfoIconSpacer' => 0,\n ],\n C__PROPERTY__UI__DEFAULT => C__WEIGHT_UNIT__G,\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_formfactor_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__FORMFACTOR\n ]\n ]\n )\n ];\n }", "public function triplesNode(){\n try {\n // Sparql11query.g:309:3: ( collection | blankNodePropertyList ) \n $alt41=2;\n $LA41_0 = $this->input->LA(1);\n\n if ( ($LA41_0==$this->getToken('OPEN_BRACE')) ) {\n $alt41=1;\n }\n else if ( ($LA41_0==$this->getToken('OPEN_SQUARE_BRACE')) ) {\n $alt41=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 41, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt41) {\n case 1 :\n // Sparql11query.g:310:3: collection \n {\n $this->pushFollow(self::$FOLLOW_collection_in_triplesNode1065);\n $this->collection();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:311:5: blankNodePropertyList \n {\n $this->pushFollow(self::$FOLLOW_blankNodePropertyList_in_triplesNode1071);\n $this->blankNodePropertyList();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function __construct($ordered = FALSE) {\n\t\t$this->ordered = $ordered;\n\t\t$this->result = ($this->ordered ? '<ol>' : '<ul>') . PHP_EOL;\n\t}" ]
[ "0.567661", "0.5623532", "0.54962903", "0.5408018", "0.5300851", "0.52674276", "0.51051277", "0.5090503", "0.5026088", "0.5021043", "0.50142705", "0.4949374", "0.49083596", "0.48735392", "0.4865902", "0.48503703", "0.48286992", "0.4808854", "0.4705104", "0.47040066", "0.46693403", "0.46352264", "0.4600847", "0.45839474", "0.45798633", "0.45642486", "0.45592397", "0.45569456", "0.4547886", "0.45289892", "0.4498839", "0.44955897", "0.44932577", "0.44711104", "0.44476324", "0.44462162", "0.44399709", "0.44383982", "0.44202277", "0.4417064", "0.44008097", "0.439868", "0.439027", "0.43871653", "0.4382558", "0.43723622", "0.43636185", "0.4350329", "0.43413475", "0.43394628", "0.43350044", "0.43306923", "0.43285862", "0.43122536", "0.4310752", "0.43090123", "0.43061528", "0.42964607", "0.42886543", "0.42860973", "0.4285975", "0.42836535", "0.4279829", "0.42780492", "0.4277625", "0.4272507", "0.42563033", "0.42542422", "0.4245249", "0.42399785", "0.42334846", "0.42276266", "0.42217803", "0.42207614", "0.42151383", "0.42093724", "0.42063284", "0.4200313", "0.4200313", "0.41987193", "0.41975766", "0.41922772", "0.41891906", "0.41855928", "0.4178678", "0.41764176", "0.4174116", "0.4173736", "0.4170713", "0.41638795", "0.41618687", "0.41618598", "0.41559434", "0.41516337", "0.4143123", "0.41423318", "0.4138931", "0.4133193", "0.41281882", "0.41260883", "0.41188142" ]
0.0
-1
Whether the property is explicitly or implicitly public.
public function isPublic() : bool { return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPublic()\n\t{\n\t\treturn $this->property->isPublic();\n\t}", "public function isPublic()\n {\n return $this->_public;\n }", "public function isPublic()\n {\n return $this->public;\n }", "public function isPublic() {\n\t\treturn $this->public;\n\t}", "public function isImplicitlyPublic(): bool\n {\n return $this->node->getAttribute('implicitlyPublic', false);\n }", "public function is_public(): bool;", "public function isPublic()\n {\n\n if ($this->visibility == self::VISIBILITY_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function isPublic()\n {\n if ($this->getAccessType() === self::ACCESS_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function isPublic() {}", "public function isPublic()\n\t{\n\t\tif ($this->isNew())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($this->isPrivate())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isPublic() {\n return $this->privacyState == 'public';\n }", "public function isPublic()\n {\n if (! isset($this->isPublic)) {\n $this->isPublic =(($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getIsPublicQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->isPublic;\n }", "function isPublic();", "private function isPublicable(\\ReflectionProperty $reflection, $mode): bool\n {\n if (!$annot = $reflection->getDocComment()) {\n //no annotation\n return false;\n }\n\n if (str_contains($annot, '* #Auto\\Public')) {\n return true;\n }\n\n if ($mode == 'get' && str_contains($annot, '* #Auto\\Get')) {\n return true;\n }\n\n if ($mode == 'set' && str_contains($annot, '* #Auto\\Set')) {\n return true;\n }\n\n return false;\n }", "public function isPublic(): bool\n {\n return $this->node->isPublic();\n }", "public function isPublic(): bool\n {\n return $this->node->isPublic();\n }", "private function modelHasPublicProperty($property)\n {\n $reflectionProperty = new \\ReflectionProperty($this->model, $property);\n\n return $reflectionProperty->isPublic();\n }", "public function isLabelPublic()\n {\n return ($this->label == 'public');\n }", "public function isPrivate(): bool;", "public function isPublicScope()\n {\n return $this->attributes['scope'] == self::PUBLIC_SCOPE;\n }", "public function isAccessible()\n {\n return $this->isPublished();\n }", "public function getPrivate() : bool {\n return $this->private;\n }", "public function getPublicAccess()\n {\n return $this->_publicAccess;\n }", "public function getPrivate() : bool\n {\n return $this->private;\n }", "public function setPublic()\n {\n $this->private = false;\n }", "public function is_ajax_public(): bool {\n\t\treturn $this->ajax_public;\n\t}", "private function isPublicProperty($class, $property)\n {\n try {\n $reflectionProperty = new \\ReflectionProperty($class, $property);\n\n return $reflectionProperty->isPublic();\n } catch (\\ReflectionException $e) {\n // Return false if the property doesn't exist\n }\n\n return false;\n }", "public function is_accessible() {\n return $this->_accessible;\n }", "public function isPublic($name);", "public function isNonPublic()\n {\n return empty($this->rules);\n }", "public function isPublic()\n {\n $allowsAllHosts = false;\n $allowsRListings = false;\n foreach ($this->rules as $rule) {\n if (self::READ & $rule['mask']) {\n if (!empty($rule['rlistings'])) {\n $allowsRListings = true;\n } elseif (!empty($rule['host']) && trim($rule['host']) == '*') {\n $allowsAllHosts = true;\n }\n }\n }\n\n return $allowsAllHosts && $allowsRListings;\n }", "public function AllowAccessToStepPublic()\n {\n return $this->AllowAccessToStep();\n }", "public function isPrivate() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);\n }", "public function isPrivateValues(): bool;", "public function esPublica()\n {\n return false;\n }", "public function getIsPublic() {\n return $this->is_public == true ? Yii::t('common', 'event_is_public') : Yii::t('common', 'event_not_public');\n }", "public function isPublicCalendarEnabled()\n {\n return $this->isPublicEnabled;\n }", "function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }", "#[@test]\n public function publicModifier() {\n $this->assertTrue(Modifiers::isPublic(MODIFIER_PUBLIC));\n $this->assertEquals('public', Modifiers::stringOf(MODIFIER_PUBLIC));\n }", "public function isPerishable(): bool\n {\n return static::$perishable;\n }", "public function setPublic( $public = true ){\n\t\t$this->public = $public;\n\t}", "public function setPublic($public)\n {\n $this->_public = $public;\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function isPublicResource(): bool {\n // Long enough\n return count($this->elements) >= 2\n // Inside public directory\n && $this->startsWith(new self(App::getConfig('app.publicDir')))\n // Is readable file\n && $this->prepend(App::getRootDir())->isReadableFile();\n }", "function getVisibility() {\n if($this->visibility === false) {\n $this->visibility = $this->canSeePrivate() ? VISIBILITY_PRIVATE : VISIBILITY_NORMAL;\n } // if\n return $this->visibility;\n }", "public function isWriteable(): bool;", "public function hasPublicUrl() {\n return $this->_has(4);\n }", "public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}", "function is_visible()\n\t{\n\t\treturn $this->visible;\n\t}", "public function getVisibility()\n {\n if ($this->isPrivate()) {\n return 'private';\n }\n \n if ($this->isProtected()) {\n return 'protected';\n }\n \n return 'public';\n }", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function isReadOnly(): bool;", "public function getIsInternalOnly(): bool\n {\n return (bool) $this->Type()->getField('InternalOnly');\n }", "public static function right_public(){return false;}", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "public function isInternal(): bool;", "public function hasAccess(){\n \treturn $this->hasAccess;\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function getSetPublicPtr()\n {\n return isset($this->set_public_ptr) ? $this->set_public_ptr : false;\n }", "public function isReadonly(): bool;", "public function isIndexPrivate()\n {\n\n return static::$indexPrivate;\n\n }", "public function isInPropertyBehavior() {\n return $this->isInPropertyBehavior;\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "public function isInternal() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->isInternal();\n } else {\n return parent::isInternal();\n }\n }", "public function setPublic($value)\n {\n return $this->set('Public', $value);\n }", "public function setPublic($value)\n {\n return $this->set('Public', $value);\n }", "protected function getPublicProperties() {\n\t\t$getPublicProperties = function($obj) { return get_object_vars($obj); };\n\t\treturn $getPublicProperties($this);\n\t}", "public function isPrivate()\n {\n if ($this->getAccessType() === self::ACCESS_ON_DEMAND) {\n return true;\n }\n\n return false;\n }", "public function getCanPublishAttribute()\n {\n return false;\n }", "private function isPublic($id)\n {\n $article = Article::find($id);\n if($article->public === 0):\n return true;\n else:\n return false;\n endif;\n }", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function getDefaultAccessorVisibility()\n {\n return $this->defaultAccessorVisibility;\n }", "public function isPublic(ReadBlockInterface $block)\n {\n return true;\n }", "public static function is_accessible() {\n\t\t$value = get_transient( self::transient_name() );\n\n\t\t// If the value is not set, check the table.\n\t\tif ( false === $value ) {\n\t\t\treturn self::check_table();\n\t\t}\n\n\t\treturn $value === self::ACCESSIBLE;\n\t}", "public function set_public($value) {\r\n $this->public = $value;\r\n data::add(\"public\", $this->public == \"\" ? 1 : $this->public, $this->table_fields);\r\n }", "public function IsViewable() {\r\n return false;\r\n }", "function isProtected()\n {\n return $this->protected;\n }", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly();", "static public function isVisible(): bool\n {\n return static::$visible;\n }", "public function getAccessorVisibility()\n {\n if ($this->accessorVisibility !== null) {\n return $this->accessorVisibility;\n } else {\n return self::DEFAULT_VISIBILITY;\n }\n }", "public function getNeedIsMember()\n {\n return $this->getProperty('needIsMember');\n }", "public function is_public_allowed( $entry ) {\n\t\treturn false;\n\t}", "public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}", "public function publicUser()\n {\n return $this->state(function (array $attributes) {\n return [\n 'is_public' => 1,\n ];\n });\n }", "function visible () {\n\t\treturn isadmin();\n\t}" ]
[ "0.8748482", "0.82945853", "0.8206692", "0.8168307", "0.80445457", "0.80025643", "0.78572184", "0.77828765", "0.77181906", "0.7708724", "0.7577971", "0.73268676", "0.7324548", "0.7304451", "0.7302177", "0.7302177", "0.72548133", "0.7251892", "0.71335876", "0.71273106", "0.7105278", "0.7092736", "0.7070152", "0.6989099", "0.69590974", "0.6871393", "0.6852941", "0.6840618", "0.68061584", "0.67094994", "0.6673185", "0.6663917", "0.6656477", "0.66344994", "0.66297257", "0.66150844", "0.6614131", "0.65691614", "0.65612066", "0.65416557", "0.6516495", "0.6487496", "0.6427386", "0.6427386", "0.6427386", "0.6405915", "0.63772094", "0.63479453", "0.63177407", "0.63034683", "0.6294543", "0.6293485", "0.62794036", "0.62794036", "0.62765324", "0.6265573", "0.6258144", "0.6252007", "0.6245628", "0.6213011", "0.6193076", "0.6193076", "0.6193076", "0.6193076", "0.6193076", "0.6193076", "0.6193076", "0.6193076", "0.61597043", "0.61585236", "0.61460596", "0.6139992", "0.6138431", "0.61294943", "0.6090572", "0.60889757", "0.60889757", "0.608642", "0.6066733", "0.606007", "0.6052034", "0.6040583", "0.60392845", "0.60392845", "0.6039197", "0.60385776", "0.6027758", "0.6020669", "0.6019276", "0.601453", "0.60095656", "0.60095656", "0.60095656", "0.600568", "0.60045975", "0.5998611", "0.5997884", "0.5996396", "0.59943116", "0.5991985" ]
0.7906713
6
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 }", "public function getIsReadOnly()\n {\n if (array_key_exists(\"isReadOnly\", $this->_propDict)) {\n return $this->_propDict[\"isReadOnly\"];\n } else {\n return null;\n }\n }", "public function getReadProtected() {\n\t\t$readProtected = FALSE;\n\t\tif ($this->getUsersWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\n\t\treturn $readProtected;\n\t}", "public function isReadOnly()\n\t{\n\t\treturn $this->_readOnly;\n\t}", "public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}", "public function getWriteProtected() {\n\t\t$writeProtected = FALSE;\n\t\tif ($this->getUsersWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\n\t\treturn $writeProtected;\n\t}", "public function isPrivate() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);\n }", "public function isReadOnly()\n {\n return $this->readOnly;\n }", "public function isReadonly()\n {\n return $this->_isReadonly;\n }", "public function isReadOnly ()\n {\n return $this->readOnly;\n }", "public function isReadonly(): bool\n {\n return $this->readonly;\n }", "public function getGroupProtectedProperty()\n {\n return $this->attributeGroupToDelete ?\n $this->attributeGroupToDelete->attributes->filter(\n fn ($attribute) => (bool) $attribute->system\n )->count() : false;\n }", "function setProtected($bool = true)\n {\n $this->protected = (boolean) $bool;\n return $this;\n }", "public function isPrivateValues(): bool;", "public function isReadonly(): bool;", "public function isReadOnly(): bool;", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function allowProperties() {}", "public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }", "public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }", "public function isReadOnly() {\n\t\treturn false;\n\t}", "public function isReadOnly()\n {\n }", "public function protect_meta_key( $protected, $meta_key, $meta_type ) {\n\t\tif ( $meta_key === self::$post_meta_key && 'post' === $meta_type ) {\n\t\t\t$protected = true;\n\t\t}\n\n\t\treturn $protected;\n\t}", "public function isReadonly()\n {\n return false;\n }", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly()\r\n {\r\n return $this->isReadOnly;\r\n }", "public function isReadOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_READ_ONLY);\n }", "public function isPrivate(): bool;", "public function isInPropertyBehavior() {\n return $this->isInPropertyBehavior;\n }", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly();", "function getReadOnly() { return $this->_readonly; }", "function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }", "public function isNotAccessible()\n {\n return ! $this->isAccessible();\n }", "public function isReadOnly(): bool\n {\n return $this->getConfig('read_only');\n }", "public function readOnly()\n {\n return !$this->_allowModifications;\n }", "public function roles_protected() {\n return true;\n }", "function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }", "public function isAccessible()\n {\n return $this->isPublished();\n }", "public function isReadOnly(): bool\n {\n return (bool)$this->config['config']['readOnly'];\n }", "public function get_readonly() {\n return $this->readonly;\n }", "public function isPrivate()\n {\n if ($this->getAccessType() === self::ACCESS_ON_DEMAND) {\n return true;\n }\n\n return false;\n }", "protected function getProtected(){\n return \"I am a protected function\";\n }", "public function isFrontendProtected() {\n return ($this->protection & FRONTEND_PROTECTION) >= 1;\n }", "public function getReadOnly()\n {\n return $this->readOnly;\n }", "public static function is_accessible() {\n\t\t$value = get_transient( self::transient_name() );\n\n\t\t// If the value is not set, check the table.\n\t\tif ( false === $value ) {\n\t\t\treturn self::check_table();\n\t\t}\n\n\t\treturn $value === self::ACCESSIBLE;\n\t}", "public function getIsAccess()\n {\n return $this->isAccess;\n }", "function is($prop){\n \treturn $this->get_property($prop)==1?true:false;\n }", "public function isPublic()\n {\n return $this->_public;\n }", "public function isUserProtected() {\n\t $mobileStatus = $this->getMobileUserStatus($this->getAuthUserId(), $this->getAuthUserEmail());\n\t return ($mobileStatus == RublonMagentoModule::YES ? RublonMagentoModule::PROTECTION_TYPE_MOBILE : RublonMagentoModule::PROTECTION_TYPE_EMAIL); \t \n\t}", "public function isPublic()\n {\n return $this->public;\n }", "public function readonly()\n {\n return $this->readOnly;\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "public function canGetProperty($name) {\r\n return parent::canGetProperty($name)||$this->__isset($name);\r\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "private function isPublicable(\\ReflectionProperty $reflection, $mode): bool\n {\n if (!$annot = $reflection->getDocComment()) {\n //no annotation\n return false;\n }\n\n if (str_contains($annot, '* #Auto\\Public')) {\n return true;\n }\n\n if ($mode == 'get' && str_contains($annot, '* #Auto\\Get')) {\n return true;\n }\n\n if ($mode == 'set' && str_contains($annot, '* #Auto\\Set')) {\n return true;\n }\n\n return false;\n }", "public function isPublic() : bool {\n return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0\n || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;\n }", "public function isPerishable(): bool\n {\n return static::$perishable;\n }", "private static function checkCanAccessProtectedElement(CodeBase $code_base, FullyQualifiedClassName $defining_fqsen, FullyQualifiedClassName $accessing_class_fqsen): bool\n {\n $accessing_class_type = $accessing_class_fqsen->asType();\n $type_of_class_of_property = $defining_fqsen->asType();\n\n // If the definition of the property is protected,\n // then the subclasses of the defining class can access it.\n try {\n if ($accessing_class_type->isSubclassOf($type_of_class_of_property, $code_base)) {\n return true;\n }\n // and base classes of the defining class can access it\n if ($type_of_class_of_property->isSubclassOf($accessing_class_type, $code_base)) {\n return true;\n }\n } catch (RecursionDepthException $_) {\n }\n return false;\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.6337187", "0.6333036", "0.6331797", "0.63280976", "0.63205075", "0.63149875", "0.62965906", "0.6282517", "0.6272827", "0.6260061", "0.62390906", "0.623592", "0.62153935", "0.6212945", "0.61906445", "0.61764497", "0.61715615", "0.61647004", "0.61647004", "0.6154052", "0.61528987", "0.61525905", "0.6151694", "0.61450243", "0.614438", "0.614438", "0.61323476", "0.6123479", "0.6121023", "0.6096843", "0.60856503", "0.60856503", "0.60856503", "0.6060917", "0.60522515", "0.6042449", "0.6011848", "0.5997942", "0.5996675", "0.5988589", "0.59478414", "0.594256", "0.5931496", "0.5918628", "0.5915747", "0.59093654", "0.58937764", "0.58865625", "0.58525395", "0.58444566", "0.5828531", "0.58199245", "0.58157367", "0.5807561", "0.5803068", "0.5803068", "0.5803068", "0.5803068", "0.5803068", "0.5803068", "0.5803068", "0.5803068", "0.57987523", "0.57918483", "0.57918483", "0.57918483", "0.57845604", "0.5778128", "0.5778009", "0.5775219" ]
0.81763554
1
Whether the property is private.
public function isPrivate() : bool { return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrivate() : bool {\n return $this->private;\n }", "public function getPrivate() : bool\n {\n return $this->private;\n }", "public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}", "public function isPrivate(): bool;", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function isPrivate(): bool\n {\n return $this->node->isPrivate();\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "public function isPrivateValues(): bool;", "public function isPrivate()\n {\n if ($this->getAccessType() === self::ACCESS_ON_DEMAND) {\n return true;\n }\n\n return false;\n }", "public function isLabelPrivate()\n {\n return ($this->label == 'private');\n }", "public function isPublic()\n\t{\n\t\treturn $this->property->isPublic();\n\t}", "function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }", "public function getPrivate()\n {\n return $this->private;\n }", "public function getPrivate()\n {\n return $this->private;\n }", "protected function isPrivate(string $name) : bool\n {\n return in_array($name, $this->privateProperties);\n }", "public static function isUnaccessible(\\ReflectionProperty $property) {\r\n return ($property->isPrivate() || $property->isProtected());\r\n }", "public function setPrivate()\n {\n $this->private = true;\n }", "public function setPrivate($var)\n {\n GPBUtil::checkBool($var);\n $this->private = $var;\n\n return $this;\n }", "public function setPrivate(bool $value) {\n $this->private = $value;\n }", "public function isImplicitlyPublic(): bool\n {\n return $this->node->getAttribute('implicitlyPublic', false);\n }", "public function get_private()\n\t{\n\t\treturn $this->data['private'];\n\t}", "function news_is_private( $p_news_id ) {\r\n\t\treturn ( news_get_field( $p_news_id, 'view_state' ) == VS_PRIVATE );\r\n\t}", "public function isNotAccessible()\n {\n return ! $this->isAccessible();\n }", "public function is_private() {\n\n\t\t/**\n\t\t * If the post is of post_type \"revision\", we need to access the parent of the Post\n\t\t * so that we can check access rights of the parent post. Revision access is inherit\n\t\t * to the Parent it is a revision of.\n\t\t */\n\t\tif ( isset( $this->data->post_type ) && 'revision' === $this->data->post_type ) {\n\n\t\t\t// Get the post\n\t\t\t$parent_post = get_post( $this->data->post_parent );\n\n\t\t\t// If the parent post doesn't exist, the revision should be considered private\n\t\t\tif ( ! $parent_post instanceof WP_Post ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Determine if the revision is private using capabilities relative to the parent\n\t\t\treturn $this->is_post_private( $parent_post );\n\n\t\t}\n\n\t\t/**\n\t\t * Media Items (attachments) are all public. Once uploaded to the media library\n\t\t * they are exposed with a public URL on the site.\n\t\t *\n\t\t * The WP REST API sets media items to private if they don't have a `post_parent` set, but\n\t\t * this has broken production apps, because media items can be uploaded directly to the\n\t\t * media library and published as a featured image, published inline within content, or\n\t\t * within a Gutenberg block, etc, but then a consumer tries to ask for data of a published\n\t\t * image and REST returns nothing because the media item is treated as private.\n\t\t *\n\t\t * Currently, we're treating all media items as public because there's nothing explicit in\n\t\t * how WP Core handles privacy of media library items. By default they're publicly exposed.\n\t\t */\n\t\tif ( 'attachment' === $this->data->post_type ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Published content is public, not private\n\t\t */\n\t\tif ( 'publish' === $this->data->post_status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->is_post_private( $this->data );\n\t}", "public function isPublic()\n {\n return $this->_public;\n }", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isPublic()\n {\n return $this->public;\n }", "public function isPublic() {\n\t\treturn $this->public;\n\t}", "public function isPublic()\n\t{\n\t\tif ($this->isNew())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($this->isPrivate())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isPublic()\n {\n\n if ($this->visibility == self::VISIBILITY_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function isPublic() : bool {\n return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0\n || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;\n }", "function is_config_private_mode() {\n\treturn conditional_config('private_mode');\n}", "public function setPrivate(bool $private)\n {\n $this->private = $private;\n\n return $this;\n }", "protected function isPrivate($rule)\n {\n\n\n return in_array($rule, $this->privateRules);\n }", "public function isNonPublic()\n {\n return empty($this->rules);\n }", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isPublic()\n {\n if ($this->getAccessType() === self::ACCESS_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function isPublic() {\n return $this->privacyState == 'public';\n }", "public function setPrivate(bool $private) : self\n {\n $this->initialized['private'] = true;\n $this->private = $private;\n return $this;\n }", "public function is_ajax_private(): bool {\n\t\treturn $this->ajax_private;\n\t}", "private function has_private_mod($mods)\n {\n // private by default\n if (!$mods) return true;\n \n $other = false;\n \n foreach ($mods as $mod) {\n if ($mod->type === T_PRIVATE) \n return true;\n \n if ($mod->type === T_PUBLIC ||\n $mod->type === T_PROTECTED) {\n $other = true;\n break;\n }\n }\n \n return !$other;\n }", "public function isIndexPrivate()\n {\n\n return static::$indexPrivate;\n\n }", "public function testUserCanViewPrivatePropertyTheyOwn()\n {\n // Create a user with team and one private property\n $userOne = User::factory()->withPersonalTeam()->create();\n $userOne->assignRole(Role::findByName('user'));\n $userOne->assignRole(Role::findByName('team-admin'));\n $team = $userOne->personalTeam();\n $privateProperty = Property::factory()->create([\n 'team_id' => $team->getKey(),\n 'is_private' => true\n ]);\n\n $response = $this->actingAs($userOne)->get('/properties/' . $privateProperty->getKey());\n $response->assertStatus(200);\n $response->assertInertia(function(Assert $page) use ($privateProperty, $team) {\n $page->component('Properties/Show')\n ->has('property.data', null, function(Assert $page) use ($privateProperty, $team) {\n $page->has('type')\n ->has('id')\n ->has('links')\n ->where('type', 'properties')\n ->where('id', $privateProperty->getKey())\n ->where('attributes.is_private', true)\n ->where('attributes.team_id', $team->getKey());\n });\n });\n }", "public function setPrivate()\r\n {\r\n $this->data['security'] = 'private';\r\n }", "public function hasServerPrivateIpAddr()\n {\n return $this->server_private_ip_addr !== null;\n }", "public function hasPrivateExponentParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_RSA_D);\n }", "public function is_public(): bool;", "public function isUserPrivate()\n\t{\n\t\t$q = new BN_query('rights');\n\t\t$q->addTable('assocs', 'rght_themeid = asso_id');\n\t\t$q->addField('count(*)');\n\t\t$q->addWhere('rght_theme = ' . THEME_ASSOS);\n\t\t$q->addWhere(\"rght_status ='\" . AUTH_MANAGER . \"'\");\n\t\t$q->addWhere('rght_userid =' . Bn::getValue('user_id', -1));\n\t\t$q->addWhere('asso_type =' . OASSO_TYPE_PRIVATE);\n\t\t$nb = $q->getFirst();\n\t\treturn (Bn::getValue('user_type') == AUTH_PRIVATE || $nb);\n\t}", "public function isAccessible()\n {\n return $this->isPublished();\n }", "public function hasIsInternal()\n {\n return $this->IsInternal !== null;\n }", "public function getIsInternalOnly(): bool\n {\n return (bool) $this->Type()->getField('InternalOnly');\n }", "public function is_accessible() {\n return $this->_accessible;\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 isPrivateKeySet ()\n {\n return $this->paymillOptionHelperHelper->getPrivateKey() !== \"\";\n }", "public function setPublic()\n {\n $this->private = false;\n }", "public function setPrivate($private)\n {\n $this->entity->setPrivate($private);\n }", "function is_attachment_private( $attachment_id ) {\n\n\t\treturn get_post_meta( $attachment_id, 'mphpf_is_private', true );\n\n\t}", "public function is_internal() {\n return false;\n }", "function isProtected()\n {\n return $this->protected;\n }", "protected function hasPrivateKey() {}", "public function isLabelPublic()\n {\n return ($this->label == 'public');\n }", "public function hasProperties(): bool\n {\n return !!$this->getProperties();\n }", "public function getTripPrivate()\n {\n return $this->trip_private;\n }", "public function isPublic(): bool\n {\n return $this->node->isPublic();\n }", "public function isPublic(): bool\n {\n return $this->node->isPublic();\n }", "function getVisibility() {\n if($this->visibility === false) {\n $this->visibility = $this->canSeePrivate() ? VISIBILITY_PRIVATE : VISIBILITY_NORMAL;\n } // if\n return $this->visibility;\n }", "public function isPublic() {}", "private function isPublicable(\\ReflectionProperty $reflection, $mode): bool\n {\n if (!$annot = $reflection->getDocComment()) {\n //no annotation\n return false;\n }\n\n if (str_contains($annot, '* #Auto\\Public')) {\n return true;\n }\n\n if ($mode == 'get' && str_contains($annot, '* #Auto\\Get')) {\n return true;\n }\n\n if ($mode == 'set' && str_contains($annot, '* #Auto\\Set')) {\n return true;\n }\n\n return false;\n }", "public function isInternal(): bool;", "public function isInternal() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->isInternal();\n } else {\n return parent::isInternal();\n }\n }", "public function isPublic()\n {\n if (! isset($this->isPublic)) {\n $this->isPublic =(($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getIsPublicQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->isPublic;\n }", "public function isPublicScope()\n {\n return $this->attributes['scope'] == self::PUBLIC_SCOPE;\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "function isHidden()\n {\n return $this->_hidden;\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "private function modelHasPublicProperty($property)\n {\n $reflectionProperty = new \\ReflectionProperty($this->model, $property);\n\n return $reflectionProperty->isPublic();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "public function isInternal()\n {\n return false;\n }", "public function hasAccess()\n {\n return $this->access !== null;\n }", "public function hasVisibility()\n {\n return $this->visibility !== null;\n }", "private function isPublicProperty($class, $property)\n {\n try {\n $reflectionProperty = new \\ReflectionProperty($class, $property);\n\n return $reflectionProperty->isPublic();\n } catch (\\ReflectionException $e) {\n // Return false if the property doesn't exist\n }\n\n return false;\n }", "public function isHidden(): bool\n {\n return $this->hidden;\n }", "public function isHidden(): bool\n {\n return $this->hidden;\n }", "public function isReadOnly(): bool;", "public function isInPropertyBehavior() {\n return $this->isInPropertyBehavior;\n }", "function isAccessibleWithoutCode()\n\t{\n\t\treturn ($this->getAnonymize() == self::ANONYMIZE_OFF || \n\t\t\t$this->getAnonymize() == self::ANONYMIZE_FREEACCESS);\t\t\n\t}" ]
[ "0.8409907", "0.8401558", "0.7941218", "0.7888888", "0.7772115", "0.7772115", "0.7766804", "0.7766804", "0.7766804", "0.7656637", "0.7656637", "0.7656637", "0.7656637", "0.7656637", "0.7656637", "0.7656637", "0.7656637", "0.7610267", "0.7543198", "0.7455794", "0.7397863", "0.73151046", "0.7133209", "0.7133209", "0.7010669", "0.6941766", "0.6850926", "0.6828971", "0.6790507", "0.67526746", "0.6723671", "0.6686931", "0.6664334", "0.6633389", "0.6627529", "0.65707666", "0.65617913", "0.653324", "0.6530751", "0.65118474", "0.6511369", "0.64820415", "0.64402914", "0.6419647", "0.6417095", "0.6413934", "0.64097553", "0.63456255", "0.62977093", "0.62826955", "0.62778246", "0.6254387", "0.6250993", "0.62217027", "0.6209671", "0.62095064", "0.61965", "0.61921906", "0.6178382", "0.6166468", "0.61536306", "0.6152881", "0.6140003", "0.6140003", "0.61353177", "0.6116711", "0.60912937", "0.6081944", "0.60696006", "0.6064098", "0.6030218", "0.60296756", "0.6016309", "0.5996476", "0.5982036", "0.5982036", "0.59760845", "0.59760785", "0.5962441", "0.59436613", "0.5915295", "0.590363", "0.5893247", "0.5890156", "0.5879898", "0.5875197", "0.5858061", "0.5855363", "0.5828493", "0.5828493", "0.5828493", "0.58184135", "0.5815023", "0.58028066", "0.57944894", "0.57855463", "0.57855463", "0.5763791", "0.5761687", "0.575975" ]
0.8158895
2
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}", "private function isValidStaticTypeFile(): bool\n {\n return $this->oHttpRequest->getExists('t') &&\n in_array($this->oHttpRequest->get('t'), self::ASSET_FILES_ACCEPTED, true);\n }", "public function hasProperties(): bool\n {\n return !!$this->getProperties();\n }", "public function isPublic()\n {\n return $this->_public;\n }", "public function testClassWithStaticPropertyProxyGeneration()\n {\n if (! class_exists('Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\StaticPropertyClass', false)) {\n $className = StaticPropertyClass::class;\n $metadata = $this->createClassMetadata($className, []);\n $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy');\n\n $this->generateAndRequire($proxyGenerator, $metadata);\n }\n\n $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyStaticPropertyClass.php');\n self::assertEquals(1, substr_count($classCode, 'function __sleep'));\n self::assertStringNotContainsString('protectedStaticProperty', $classCode);\n }", "public function isDynamic() : bool {\n return $this->isDynamic;\n }", "public function isReadOnly(): bool\n {\n return $this->getConfig('read_only');\n }", "public function is_home_static_page() {\n return ( is_front_page() && 'page' == get_option( 'show_on_front' ) && is_page( get_option( 'page_on_front' ) ) );\n }", "public function getIsSingleton() {}", "public function hasStatic(string $path, string $method = null): bool;", "public function getIsReadOnly()\n {\n if (array_key_exists(\"isReadOnly\", $this->_propDict)) {\n return $this->_propDict[\"isReadOnly\"];\n } else {\n return null;\n }\n }", "public static function initialized()\n\t{\n\t\treturn !is_null(self::$instance);\n\t}", "public function isSingleton() {\n return true;\n }", "public function getIsShared()\n {\n if (array_key_exists(\"isShared\", $this->_propDict)) {\n return $this->_propDict[\"isShared\"];\n } else {\n return null;\n }\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "public function isDynamicAttribute()\n {\n return in_array($this->arrConfig['attribute'], Attribute::getDynamicAttributeFields());\n }", "function is_visible()\n\t{\n\t\treturn $this->visible;\n\t}", "public function isReadOnly(): bool;", "protected function matchesStaticClassProperty(Node $node, $class, $property)\n {\n return ($node instanceof StaticPropertyFetch || $node instanceof PropertyProperty || $node instanceof Property)\n && $this->nodeMatchesClassSymbol($node, $class, $property);\n }", "public function isImplicitlyPublic(): bool\n {\n return $this->node->getAttribute('implicitlyPublic', false);\n }", "public function staticValue() { //public non-static means you can use -> to access\r\n return self::$my_static; //the function\r\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "public function providesStatic($staticName);", "public function isSingleton() : bool;", "public function hasWriteReference(): bool\n {\n return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_WRITTEN);\n }", "public function isInit() {\n return $this->init;\n }", "private function modelHasPublicProperty($property)\n {\n $reflectionProperty = new \\ReflectionProperty($this->model, $property);\n\n return $reflectionProperty->isPublic();\n }", "public function isPublic() {\n return $this->privacyState == 'public';\n }", "static function isInitialized(): bool\n\t{\n\t\treturn self::$initialized;\n\t}", "public function isSpecial()\n {\n static $special = false;\n\n if ($special === false) {\n $this->resetSpecial();\n $special = true;\n }\n\n return $this->special;\n }", "public function getIsPublic() {\n return $this->is_public == true ? Yii::t('common', 'event_is_public') : Yii::t('common', 'event_not_public');\n }", "public function isInstantiable() {\n\t\treturn !is_null($this->domain->class);\n\t}", "static public function isDynamic() {\n return FALSE;\n }", "public function isPublishedField()\n {\n return $this->get('check_publish') == 1;\n }", "public function getIsExternallyVisible()\n {\n if (array_key_exists(\"isExternallyVisible\", $this->_propDict)) {\n return $this->_propDict[\"isExternallyVisible\"];\n } else {\n return null;\n }\n }", "public function is_visible() {\n\t\treturn isset( $this->data['visible'] ) && $this->data['visible'];\n\t}", "public function hasScriptType()\n {\n return $this->script_type !== null;\n }", "public function isReadOnly()\r\n {\r\n return $this->isReadOnly;\r\n }", "public function isPublic()\n {\n\n if ($this->visibility == self::VISIBILITY_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function hasVisibility()\n {\n return $this->visibility !== null;\n }", "public function isShared()\n {\n return $this->isShared;\n }", "public function hasDynamic()\n {\n\tif(is_null($this->_hasDynamic))\n\t{\n\t $this->_hasDynamic = false;\n\n\t if(!is_null($this->_validRules) && count($this->_validRules)) {\n\t\tforeach($this->_validRules as $rule) {\n\t\t if($rule->getActionRuleType() == Ewave_Temando_Model_System_Config_Source_Rule_Type::DYNAMIC)\n\t\t {\n\t\t\t$this->_hasDynamic = true;\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t }\n\t}\n\t\n\treturn $this->_hasDynamic;\n }", "public function getSetting() : bool\n {\n return $this->setting;\n }", "public function isSyncable()\n {\n\n return static::$isSyncable;\n\n }", "function isSingleton(){\n return true;\n }", "public function hasProperties() {\n if ($this->hasProperties !== null) {\n return $this->hasProperties;\n }\n\n try {\n new ReflectionMethod($this, self::METHOD_PROPERTIES);\n $this->hasProperties = true;\n } catch (ReflectionException $exception) {\n $this->hasProperties = false;\n }\n\n return $this->hasProperties;\n }", "function is_source_static($src)\n\t{\n\t\t// @since 1.3.0 check for query string in `$src`\n\t\tif (false !== strpos($src, '?'))\n\t\t{\n\t\t\t$src = explode('?', $src);\n\t\t\t$src = $src[0];\n\t\t}\n\n\t\t// Source that doesn't have .css or .js extesion is dynamic\n\t\tif (!preg_match('#.*\\.(css|js)$#ui', $src))\n\t\t\treturn false;\n\n\t\t// Source that contains =, & is dynamic\n\t\t// @since 1.3.0 ? is considered static\n\t\tif (strpos($src, '=') === false && strpos($src, '&') === false)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public function is_property_cached($key) {\n\t\treturn array_key_exists($key, $this->_cached_properties);\n\t}", "public static function hasIdProperty(): bool\n {\n return static::getIdProperty() !== null;\n }", "public function isReadonly()\n {\n return $this->_isReadonly;\n }", "private function isPublicProperty($class, $property)\n {\n try {\n $reflectionProperty = new \\ReflectionProperty($class, $property);\n\n return $reflectionProperty->isPublic();\n } catch (\\ReflectionException $e) {\n // Return false if the property doesn't exist\n }\n\n return false;\n }", "public function isPublic()\n {\n if ($this->getAccessType() === self::ACCESS_PUBLIC) {\n return true;\n }\n\n return false;\n }", "public function getIsPublished()\n\t{\n\t\treturn $this->is_published;\n\t}", "public function isReadOnly(): bool\n {\n return (bool)$this->config['config']['readOnly'];\n }", "protected function getIsCustomAttribute()\n {\n return !$this->is_organizational;\n }", "public function isStato()\n {\n return $this->stato;\n }", "public function isPublic() : bool {\n return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0\n || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;\n }", "public function is_ajax_public(): bool {\n\t\treturn $this->ajax_public;\n\t}", "public function isReadonly(): bool;", "public function testIsTransientTrue()\n {\n $reflectedProperty = new PropertyReflection('TRex\\Reflection\\resources\\Foo', 'foo');\n $this->assertTrue($reflectedProperty->isTransient());\n }", "private static function hasProperty($class, $name)\n\t{\n\t\t$prop = & self::$props[$class][$name];\n\t\tif ($prop === NULL) {\n\t\t\t$prop = FALSE;\n\t\t\ttry {\n\t\t\t\t$rp = new \\ReflectionProperty($class, $name);\n\t\t\t\tif ($name === $rp->getName() && $rp->isPublic() && !$rp->isStatic()) {\n\t\t\t\t\t$prop = preg_match('#^on[A-Z]#', $name) ? 'event' : TRUE;\n\t\t\t\t}\n\t\t\t} catch (\\ReflectionException $e) {}\n\t\t}\n\t\treturn $prop;\n\t}", "public function isPerishable(): bool\n {\n return static::$perishable;\n }", "public function fooStatic() {\r\n return parent::$my_static; //this uses the parent keyword to access the public static\r\n }", "public static function canDisplayPropertyTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PROPERTY_TYPE);\n\t}", "public function isPublished()\n\t{\n\t\treturn ($this->get('published') == self::STATE_PUBLISHED);\n\t}", "public function isPublic()\n {\n if (! isset($this->isPublic)) {\n $this->isPublic =(($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getIsPublicQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->isPublic;\n }", "public function isReadOnly()\n\t{\n\t\treturn $this->_readOnly;\n\t}", "function isReadonly()\n {\n return $this->readonly;\n }", "public function hasReadReference(): bool\n {\n return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_READ);\n }", "public function has_debug_constant() {\n\t\treturn defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ? true : false;\n\t}", "public function isReadOnly()\n {\n return $this->_readOnly;\n }" ]
[ "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.55873305", "0.5562159", "0.55492634", "0.5522936", "0.5521382", "0.55094826", "0.54872286", "0.54826766", "0.54591084", "0.5456598", "0.5454835", "0.5441513", "0.54380906", "0.53981435", "0.53935635", "0.5389883", "0.53772545", "0.5375185", "0.5374365", "0.5370897", "0.5368495", "0.53633785", "0.5352328", "0.53470653", "0.5346092", "0.5343481", "0.53318393", "0.5321494", "0.53171295", "0.53126043", "0.530655", "0.5302235", "0.5294947", "0.5293391", "0.5290548", "0.52826625", "0.52781177", "0.52766377", "0.5276127", "0.52641416", "0.5263302", "0.5254934", "0.5245156", "0.5241012", "0.5238461", "0.5237816", "0.52335954", "0.52335364", "0.52328664", "0.5230529", "0.52282727", "0.5227745", "0.5227678", "0.52269924", "0.5221285", "0.5215633", "0.5209312", "0.5203489", "0.51910233", "0.51864296", "0.5182677", "0.51765376", "0.51624465", "0.5158683", "0.515522", "0.5154332", "0.5154211", "0.5151042", "0.5150837", "0.51474357" ]
0.8106914
0
Whether the property is readonly.
public function isReadonly() : bool { return (bool) ($this->flags & Class_::MODIFIER_READONLY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isReadonly(): bool\n {\n return $this->readonly;\n }", "function isReadonly()\n {\n return $this->readonly;\n }", "public function isReadonly()\n {\n return $this->_isReadonly;\n }", "public function isReadonly()\n {\n return false;\n }", "public function isReadOnly()\n {\n return $this->readOnly;\n }", "public function isReadOnly()\n\t{\n\t\treturn $this->_readOnly;\n\t}", "public function isReadOnly()\n {\n return $this->_readOnly;\n }", "public function isReadOnly ()\n {\n return $this->readOnly;\n }", "public function isReadOnly() {\n\t\treturn false;\n\t}", "public function isReadonly(): bool;", "public function isReadOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_READ_ONLY);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "public function isReadOnly()\r\n {\r\n return $this->isReadOnly;\r\n }", "public function readonly()\n {\n return $this->readOnly;\n }", "public function isReadOnly(): bool\n {\n return $this->getConfig('read_only');\n }", "public function get_readonly() {\n return $this->readonly;\n }", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly();", "public function isReadOnly()\n {\n }", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function isReadOnly() {}", "public function getReadonly() {\n\t\treturn $this->readonly;\n\t}", "function getReadOnly() { return $this->_readonly; }", "public function isReadOnly(): bool;", "public function getIsReadOnly()\n {\n if (array_key_exists(\"isReadOnly\", $this->_propDict)) {\n return $this->_propDict[\"isReadOnly\"];\n } else {\n return null;\n }\n }", "public function isReadOnly(): bool\n {\n return (bool)$this->config['config']['readOnly'];\n }", "public function getReadOnly()\n {\n return $this->readOnly;\n }", "public function getReadOnlyFlag() {}", "public function isReadonly()\n\t{\n\t\treturn $this->getSlider()->getContentReadonly();\n\t}", "public function isReadOnly(bool $readOnly=null) {\r\n //TODO: Implement filePermission\r\n return !is_writable($this->fullName());\r\n }", "public function readOnly()\n {\n return !$this->_allowModifications;\n }", "public function getReadOnlyAttribute()\n {\n return $this->source === PirepFieldSource::ACARS;\n }", "public function setReadOnlyFlag($readOnly = true) {}", "public function setReadOnly($readOnly = true) {}", "public function setReadOnly($readOnly = true) {}", "public function setReadOnly($readOnly = true);", "public function setReadOnly($readOnly = true);", "public function isReadProtected() {\n\t\treturn $this->getReadProtected();\n\t}", "public function set_readonly() {\n $this->readonly = true;\n\n return $this;\n }", "public function wasReadOnlyError() {\n\t\treturn false;\n\t}", "public function setReadOnly($readOnly)\n {\n $this->readOnly = (boolean) $readOnly;\n }", "public function isWriteOnly(): bool\n {\n return $this->getPhanFlagsHasState(Flags::IS_WRITE_ONLY);\n }", "final public function setReadOnly($readOnly = true)\n {\n return $readOnly ? $this->setOption('readonly', '') : $this;\n }", "public function setReadOnly($flag);", "public function setReadOnly($readOnly) {\n\t\t\tif (is_bool($readOnly)) {\n\t\t\t\t$this->_readOnly = $readOnly;\n\t\t\t}\n\t\t}", "function isReadable() { return $this->flagAccessRead; }", "public function setIsReadOnly($val)\n {\n $this->_propDict[\"isReadOnly\"] = boolval($val);\n return $this;\n }", "public function define_readonly($p_readonly)\r\n\t\t{\r\n\t\t\t$this->c_readonly = $p_readonly;\r\n\t\t}", "public function setReadOnly ()\n {\n $this->resetNeedsSaving();\n $this->readOnly = true;\n }", "protected function _getReadonlyProperties()\n {\n return array();\n }", "public function setReadOnly($readOnly)\n {\n $this->_readOnly = $readOnly;\n }", "public function setReadonly($readonly = true)\n\t{\n\t\t$this->readonly = $readonly;\n\t\treturn $this;\n\t}", "public function isPublic()\n\t{\n\t\treturn $this->property->isPublic();\n\t}", "public function setReadonly(bool $readonly): self\n {\n $this->readonly = $readonly;\n\n return $this;\n }", "public function getReadOnlyFields();", "public function setReadOnly($ro){\n\t\tparent::setReadOnly($ro);\n\t\t$this->_year->setReadOnly($ro);\n\t\t$this->_month->setReadOnly($ro);\n\t\t$this->_day->setReadOnly($ro);\n\t}", "public function setReadOnly($flag = true)\n {\n $this->readOnly = (boolean)$flag;\n }", "public function isWriteable(): bool;", "public function isRead()\n {\n return $this->object->isRead();\n }", "public function getName()\n {\n return 'readonly';\n }", "protected function _retrieve($field, $readonly = false)\n {\n return false;\n }", "function isReadOnly($args)\n {\n return true;\n }", "function isReadOnly($args)\n {\n return true;\n }", "function isReadOnly($args)\n {\n return true;\n }", "private function portalIsReadOnly() {\n $configServ = new \\org\\gocdb\\services\\Config();\n return $configServ->IsPortalReadOnly();\n }", "function isReadOnly($args)\n {\n return false;\n }", "function isReadOnly($args)\n {\n return false;\n }", "function isReadOnly($args)\n {\n return false;\n }", "function isReadOnly($args)\n {\n return false;\n }", "public function isImmutable()\n\t{\n\t\treturn $this->immutable;\n\t}", "public function setReadOnly($flag)\n\t{\n\t\t$this->_readOnly = (bool) $flag;\n\t}", "public function isWriteProtected() {\n\t\treturn $this->getWriteProtected();\n\t}", "function performReadonlyTransformation() {\n\t\t$stars = '*****';\n\n\t\t$field = new ReadonlyField($this->name, $this->title ? $this->title : '', $stars);\n\t\t$field->setForm($this->form);\n\t\t$field->setReadonly(true);\n\t\treturn $field;\n\t}", "public function editable()\n {\n if ($this->getMode() == \"only_external\") {\n return false;\n }\n if ($this->hasScript()) {\n // can't edit calculated fields\n return false;\n }\n if (!isset($this->data[\"editable\"])) {\n return true;\n }\n return (true == $this->data[\"editable\"]);\n }", "function isReadOnly($only_new = FALSE) {\n if (!empty($this->txn_id)) {\n if ($only_new) {\n return TRUE;\n }\n if ($this->orig_status !== NULL && $this->orig_status <> UserpointsTransaction::STATUS_PENDING) {\n return TRUE;\n }\n }\n return FALSE;\n }", "function IsReadOnlyDataType($dataType) {\r\n\t return false;\r\n }", "public function set_writable() {\n $this->readonly = false;\n\n return $this;\n }", "public function makeReadonly()\n {\n $this->transform(new ReadonlyTransformation());\n return $this;\n }", "public function publicReadonly($bool = true)\n {\n $this->publicReadonly = (bool)$bool;\n\n return $this;\n }", "public function getIsRead()\n {\n return $this->isRead;\n }", "public function readonly($locale)\n {\n if ($locale instanceof Locale) {\n $locale = $locale->id();\n }\n\n return \\in_array((int) $locale, $this->readonly, true);\n }", "public function setReadDataOnly($pValue = false) {\n\t\t$this->_readDataOnly = $pValue;\n\t}", "public function setIsReadonly($value)\n {\n $this->_isReadonly = (bool) $value;\n return $this;\n }", "public function hasReadReference(): bool\n {\n return $this->getPhanFlagsHasState(Flags::WAS_PROPERTY_READ);\n }", "public function readonly()\n {\n $this->editable = false;\n\n return $this;\n }", "public function getReadProtected() {\n\t\t$readProtected = FALSE;\n\t\tif ($this->getUsersWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\n\t\treturn $readProtected;\n\t}", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function isReadable() {\n\t\treturn $this->pathway->getTitleObject()->userCan( 'read' );\n\t}", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function setReadOnly()\n {\n $this->_allowModifications = false;\n foreach ($this->_data as $key => $value) {\n if ($value instanceof Zend_Config) {\n $value->setReadOnly();\n }\n }\n }", "public function setReadOnly(bool $state = true)\n {\n if ($state) {\n $this->config['config']['readOnly'] = true;\n } else {\n unset($this->config['config']['readOnly']);\n }\n \n return $this;\n }", "public function isWritable() {\n\t\treturn $this->writable;\n\t}", "public function isRead()\n {\n return $this->isRead;\n }", "public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }", "function _readOnly($id)\n {\n return $this->read($id);\n }", "public function isImmutable()\n\t{\n\t\treturn false;\n\t}", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function is_accessible() {\n return $this->_accessible;\n }" ]
[ "0.8707159", "0.86648536", "0.8519748", "0.8339267", "0.8332303", "0.83156174", "0.83086103", "0.8211605", "0.81598216", "0.8140601", "0.8137887", "0.8074169", "0.8073864", "0.80503345", "0.8017648", "0.8008397", "0.798483", "0.798483", "0.798483", "0.7980149", "0.7941318", "0.7941318", "0.79402214", "0.7928857", "0.79272175", "0.7917374", "0.78471744", "0.7828072", "0.78087604", "0.76554173", "0.74788725", "0.744266", "0.7376129", "0.73117006", "0.7153641", "0.71237683", "0.71227056", "0.7059561", "0.7059014", "0.68128246", "0.68021435", "0.67761195", "0.67567647", "0.67532635", "0.66961145", "0.6689978", "0.66857654", "0.65925986", "0.6565967", "0.6544611", "0.65413463", "0.6519791", "0.6501986", "0.64808", "0.6424923", "0.642345", "0.6396292", "0.63943934", "0.63657594", "0.6313104", "0.6306062", "0.6234761", "0.6233877", "0.6230614", "0.6230614", "0.6230614", "0.6229467", "0.62203455", "0.62203455", "0.62203455", "0.62203455", "0.6192662", "0.61648965", "0.61504424", "0.61261415", "0.61074996", "0.6097658", "0.60943925", "0.60793275", "0.6078219", "0.6067426", "0.60376036", "0.6027888", "0.60233414", "0.6021037", "0.60087925", "0.6006906", "0.60063684", "0.60028845", "0.5991475", "0.5990146", "0.59786195", "0.59754705", "0.59509593", "0.5944806", "0.59325296", "0.5930675", "0.5903724", "0.5892805", "0.58846486" ]
0.8507971
3
$modifs = [ [ "modtype" => "add", "entry" => array("cn"=>["SmithJones"]), ], ];
public function getModifyValues() { $a = array(); foreach($this->_states_ as $n => $v ){ if(($v === self::MODTYPE_ADD || $v === self::MODTYPE_RM || $v === self::MODTYPE_REPLACE) && !($this->_values_[$n]==="")){ $a [] = array( "modtype"=>$v, "entry" =>array("$n" => $this->_values_[$n]) ); } } return $a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(array $entry);", "public function add_entry($entry);", "function addMember($arr, $key, $name, $birthday, $email){\n\t\t$arr[$key]['name'] = $name;\n\t\t$arr[$key]['birthday'] = $birthday;\n\t\t$arr[$key]['email'] = $email;\n\t\treturn $arr;\n\t}", "function eio_grp_add($grp, $req)\n{\n}", "function mnk($mod = \"\") {\n $mod_defaut = array(\"db\", \"ui\", \"metro\",\"theme\", \"msg\", \"file\", \"form\", \"str\",\"img\",\"user\");\n $mod_list = ($mod != \"\") ? array_merge($mod, $mod_defaut) : $mod_defaut;\n\n foreach ($mod_list as $val)\n self::mod_load($val);\n }", "function addEntry($newentry) {\n\t\t$this->data[] = $newentry;\n\t}", "public function add_entry($entry)\n {\n }", "public function addEntry(Arrayable $entry);", "function groupListManage(&$array)\n{\n\tglobal $db;\n\n\t$res = $db->query('select group_def_id, group_def_name from group_def order by group_def_id');\n\n\tforeach($res as $row)\n\t{\n\t\tarray_push($array, array(\n\t\t\tdecode($row['group_def_name']),\n\t\t\tmakeLink('Manage', 'a=edit-group&g=' . $row['group_def_id'])\n\t\t));\n\t}\n}", "function system_mod_group($paramvect)\n{\n}", "function put_announce_urls($dict,$anarray){\n\tglobal $dict;\n\t$liststring = '';\n\tunset($dict['value']['announce']);\n\tunset($dict['value']['announce-list']);\n\t$dict['value']['announce'] = bdec(benc_str($anarray[0]));\n\n\n\tif (is_array($anarray))\n\tforeach ($anarray as $announce) {\n\t\t$announces[] = array('type' => 'list', 'value' => array(bdec(benc_str($announce))), 'strlen' => strlen(\"l\".$announce.\"e\"), 'string' => \"l\".$announce.\"e\");\n\t\t$liststring .= \"l\".$announce.\"e\";\n\t}\n\t$dict['value']['announce-list']['type'] = 'list';\n\t$dict['value']['announce-list']['value'] = $announces;\n\n\n\t$dict['value']['announce-list']['string'] = \"l\".$liststring.\"e\";\n\t$dict['value']['announce-list']['strlen'] = strlen($dict['value']['announce-list']['string']);\n\n}", "function addPOSEntry()\n{\n\n}", "function attach_repository_id(&$value, $key, $id){\n $value['repo_id'] = $id;\n}", "public function addEntryByName($entries)\r\n {\r\n if (is_string($entries)) {\r\n $entries = array($entries);\r\n }\r\n \r\n if (is_array($entries)) {\r\n foreach($entries as $entry) {\r\n $id = Warecorp_User_Addressbook::get($this->userId, $entry);\r\n $this->addEntry($id);\r\n }\r\n } else {\r\n throw new Zend_Exception(\"Incorrect entries format!\");\r\n }\r\n }", "function pnAddressBook_admin_updatecustomfields() {\r\n\r\n\t$output = new pnHTML();\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n\tlist($id,$del,$name,$cus_type,$newname,$newtype) = pnVarCleanFromInput('id','del','name','cus_type','newname','newtype');\r\n\tif(is_array($del)) {\r\n $dels = implode(',',$del);\r\n }\r\n\t$modID = $modName = array();\r\n\t$modType = array();\r\n\t$modDel = array();\r\n\t$modDelType = array();\r\n\r\n\tif(isset($id)) {\r\n\t\tforeach($id as $k=>$i) {\r\n \t$found = false;\r\n \tif(count($del)) {\r\n \tforeach($del as $d) {\r\n \tif($i == $d) {\r\n \t$found = true;\r\n\t\t\t\t\t\tarray_push($modDel,$i);\r\n\t\t\t\t\t\tarray_push($modDelType,$cus_type[$k]);\r\n \tbreak;\r\n \t}\r\n \t}\r\n \t}\r\n \tif(!$found) {\r\n \tarray_push($modID,$i);\r\n \tarray_push($modName,$name[$k]);\r\n\t\t\t\tarray_push($modType,$cus_type[$k]);\r\n }\r\n \t}\r\n\t}\r\n\r\n\t$pntable = pnDBGetTables();\r\n\t$cus_table = $pntable['pnaddressbook_customfields'];\r\n\t$cus_column = $pntable['pnaddressbook_customfields_column'];\r\n\t$adr_table = $pntable['pnaddressbook_address'];\r\n\t$adr_column = $pntable['pnaddressbook_address_column'];\r\n\r\n\t$updates = array();\r\n\r\n\tforeach($modID as $k=>$id) {\r\n \tarray_push($updates,\"UPDATE $cus_table\r\n SET $cus_column[name]='\".pnVarPrepForStore($modName[$k]).\"',\r\n\t\t\t\t\t\t\t $cus_column[type]='\".pnVarPrepForStore($modType[$k]).\"'\r\n WHERE $cus_column[nr]=$id\");\r\n\t\tif (($modType[$k] != 'smallint default NULL') && ($modType[$k] != 'tinyint default NULL')) {\r\n\t\t\tarray_push($updates,\"ALTER TABLE $adr_table CHANGE adr_custom_\".$id.\" adr_custom_\".$id.\" \".pnVarPrepForStore($modType[$k]));\r\n\t\t}\r\n\t}\r\n\r\n\t$error = '';\r\n\r\n\tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','updateCustomfields',array('updates'=>$updates))) {\r\n \tif (empty($error)) { $error .= 'UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\telse { $error .= ' - UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t}\r\n\r\n\tif (count($modDel)) {\r\n\t\t$deletes = array();\r\n\t\tforeach($modDel as $k=>$id) {\r\n\t\t\t\tarray_push($deletes,\"DELETE FROM $cus_table WHERE $cus_column[nr] = $id\");\r\n\t\t\t\tif (($modDelType[$k] != 'smallint default NULL') && ($modDelType[$k] != 'tinyint default NULL')) {\r\n\t\t\t\t\tarray_push($deletes,\"ALTER TABLE $adr_table DROP adr_custom_\".$id);\r\n\t\t\t\t}\r\n\t\t}\r\n \tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','deleteCustomfields',array('deletes'=>$deletes))) {\r\n \t\tif (empty($error)) { $error .= 'DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n \t}\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'tinyint default NULL')) {\r\n\t\t$newname = '[ ]';\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'smallint default NULL')) {\r\n\t\t$newname = '[------]';\r\n\t}\r\n\tif( (isset($newname)) && ($newname != '') ) {\r\n\t\tlist($dbconn) = pnDBGetConn();\r\n\t\t$result = $dbconn->Execute(\"SELECT MAX($cus_column[nr]) FROM $cus_table\");\r\n\t\tlist($nextID) = $result->fields;\r\n\t\t$nextID++;\r\n\t\t$result->close;\r\n\t\t$inserts = array();\r\n\t\tarray_push($inserts,\"INSERT INTO $cus_table ($cus_column[nr],$cus_column[name],$cus_column[type],$cus_column[position])\r\n VALUES ($nextID,'\".pnVarPrepForStore($newname).\"','\".pnVarPrepForStore($newtype).\"',9999999999)\");\r\n\t\tif (($newtype != 'smallint default NULL') && ($newtype != 'tinyint default NULL')) {\r\n\t\t\tarray_push($inserts,\"ALTER TABLE $adr_table ADD adr_custom_\".$nextID.\" \".pnVarPrepForStore($newtype));\r\n\t\t}\r\n\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','addCustomfields',array('inserts'=>$inserts))) {\r\n if (empty($error)) { $error .= 'INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t}\r\n }\r\n\r\n\t$args=array('msg'=>$error);\r\n\r\n\tpnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'customfields',$args));\r\n\treturn true;\r\n}", "function CustomAdd(&$values, &$keys, &$error, $inline, &$pageObject)\n{\n\n\t\tcalendar_AddRecord($values);\n\nreturn false;\n;\t\t\n}", "function changes(&$asset) {\n $asset[\"applicableGroups\"] = $asset[\"applicableGroups\"] . \";WWWDevelopers\";\n echo 'Applicable Groups would now be: '.$asset[\"applicableGroups\"].\"<br>\";\n}", "function getListEntry()\n {\n $fields = goService::getListEntry();\n $fields['Message'] = _(\"Spamassassin\");\n#$fields['AllowEdit'] = true;\n return($fields);\n }", "function hook_roomify_rights_group() {\n $rights['roomify_rights'] = array(\n 'group_manager' => array(\n 'add member',\n ),\n );\n\n return $rights;\n}", "public function entryList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('Generate a list of all entries in the database. There is no filter in the query.'),\n ];\n\n $rows = [];\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t \n\t $this->t('status'),\n\t\t$this->t('link'),\n ];\n//print_r($this->repository);exit;\n\n$results = $this->repository->load();\n//echo\"<pre>\";//print_r($entries);exit;\n \n\t\n\t\n\t$k1=array();\n $output=array();\n\n foreach($results as $k=>$data){\n\n \n//print_r($results[$k]);exit;\n if($results[$k]->status ==1)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n\t\t 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Granted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n if($results[$k]->status ==0)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Notgranted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n\n\n\n//print_r($output);exit;\n\n array_push($k1,$output);\n //display data in site\n\n }\n//print_r($k1);exit;\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $output,\n '#empty' => t('No users found'),\n ];\n return $content;\n\n }", "function add()\r\n {\r\n\t$mid = $_POST['modules'];\r\n\t$mid2 = $_POST['modules2'];\r\n\t$gid = isset($_POST['groups'])?$_POST['groups']:'';\r\n\tif(isset($_POST['content'])) $content = $_POST['content'];\r\n\telseif(isset($_POST['elm3'])) $content = $_POST['elm3'];\r\n\r\n\tif (get_magic_quotes_gpc()) {\r\n\t\t$title = trim($_POST['input_title_3']);\r\n\t\t$author = trim($_POST['input_author_3']);\r\n\t\t$notes = trim($_POST['input_notes_3']);\r\n\t}\r\n\telse {\r\n\t\t$title = $this->mdb2->escape(trim($_POST['input_title_3']));\r\n\t\t$author = $this->mdb2->escape(trim($_POST['input_author_3']));\r\n\t\t$notes = $this->mdb2->escape(trim($_POST['input_notes_3']));\r\n\t\t$content = $this->mdb2->escape($content);\r\n\t}\r\n\r\n\t$content = strip_tags($content,$this->allowedTags);\r\n\r\n\t$query = \"INSERT INTO contents (title, author, notes, content, createdby, created, updatedby,mid,gid,mname,gname)\r\n\t\tVALUES('\".$title.\"', '\".$author.\"', '\".$notes.\"', '\" . $content . \"', '\" . $this->username . \"', NOW(), '\".$this->username.\"', \".\r\n\t\t$mid . \", \" . $gid . \", '\".$this->get_mname_from_mid($mid).\"', '\" . $this->get_gname_from_gid($gid) . \"')\";\r\n\r\n\t$affected = $this->mdb2->exec($query);\r\n\tif (PEAR::isError($affected)) {\r\n\t\tdie($affected->getMessage().' line: ' . __LINE__.$query);\r\n\t}\r\n\t\r\n\t$id = $this->mdb2->lastInsertID();\r\n\t$query = \"SELECT * FROM contents WHERE cid=\" . $id;\r\n\t$row = $this->mdb2->queryRow($query, '', MDB2_FETCHMODE_ASSOC);\r\n\r\n\t$ary = array();\r\n\t$ary['cid'] = $id;\r\n\t$ary['title'] = $row['title'];\r\n\t$ary['author'] = $row['author'];\r\n\t$ary['notes'] = $row['notes'];\r\n\t$ary['content'] = $row['content'];\r\n\t$ary['mid'] = $row['mid'];\r\n\t$ary['gid'] = $row['gid'];\r\n\t$ary['mname'] = $row['mname'];\r\n\t$ary['gname'] = $row['gname'];\r\n\t$encodedArray = array_map(\"utf8_encode\", $ary);\r\n\treturn $encodedArray;\r\n }", "function createRepID($sfConn, $dataArray){\n\t\techo(\"<P> createRepID <P>\");\n $sObjects = array();\n foreach ($dataArray as $fieldset)\n {\n\t\techo(\"<P> Set records to Rep_ID_c <P>\");\n $sObject = new sObject();\n $sObject->type = 'Rep_ID_c'; \n $sObject->fields = $fieldset;\n array_push($sObjects, $sObject);\n }\n\t\techo(\"<P> Ready to roll <P>\");\n $success = create_multiple($sfConn, $sObjects);\n return $success; \n }", "function document_map_function(&$data, $maps) {\n $stype = $data['subsystem'];\n $sid = $data['subsystem_id'];\n if ($stype > 0) {\n if (isset($maps[$stype][$sid])) {\n $data['subsystem_id'] = $maps[$stype][$sid];\n } else {\n return false;\n }\n }\n if (!isset($data['extra_path'])) {\n $data['extra_path'] = '';\n }\n if (!$data['author']) {\n $data['author'] = '';\n }\n return true;\n}", "function monitis_addon_config() {\n $configarray = array(\n \"name\" => \"Monitis Addon\",\n \"description\" => \"Integration with Monitis\",\n \"version\" => \"1.0\",\n \"author\" => \"Monitis\",\n \"language\" => \"english\",\n \"fields\" => array(\n \"apikey\" => array (\"FriendlyName\" => \"API Key\", \"Type\" => \"text\", \"Size\" => \"25\", \"Description\" => \"Monitis API Key\", \"Default\" => \"\", ),\n \"secretkey\" => array (\"FriendlyName\" => \"Secret Key\", \"Type\" => \"password\", \"Size\" => \"25\", \"Description\" => \"Monitis Secret Key\", ),\n \"endpoint\" => array (\"FriendlyName\" => \"API Endpoint\", \"Type\" => \"text\", \"Size\" => \"25\", \"Description\" => \"API Endpoint\", \"Default\" => \"https://www.monitis.com/api\", ),\n ));\n return $configarray;\n}", "public function add_entry($entry)\r\n {\r\n if (is_array($entry)) {\r\n $entry = new Translation_Entry($entry);\r\n }\r\n $key = $entry->key();\r\n if (false === $key) {\r\n return false;\r\n }\r\n $this->entries[$key] = &$entry;\r\n return true;\r\n }", "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Permission Modify\");\t\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\t## for check admin or not\t##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"permission_modify\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"permission_modify_add\", $data, true, \"permission_modify\");\n\t\t$this->template->build_admin_output($data);\n\t}", "function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$ID=$keys['ID'];\n//give uppercase name\n$uppername=strtoupper($values['Name']);\n\n$give_matric = \"UPDATE staff_info set Name='$uppername' where ID='$ID' \";\ndb_exec($give_matric,$conn);\n;\t\t\n}", "function sevenconcepts_pre_insertion($flux){\n if ($flux['args']['table']=='spip_auteurs'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=_request($value['options']['nom']); \n }\n $flux['data']['name']=_request('nom_inscription'); \n }\nreturn $flux;\n}", "function nice_get_entries()\n\t{\n\t\t$_m=$GLOBALS['SITE_DB']->query_select('f_welcome_emails',array('*'));\n\t\t$entries=new ocp_tempcode();\n\t\tforeach ($_m as $m)\n\t\t{\n\t\t\t$entries->attach(form_input_list_entry(strval($m['id']),false,$m['w_name']));\n\t\t}\n\n\t\treturn $entries;\n\t}", "function set_new_module()\n{\n\tglobal $modules, $_POST;\n\n\t$return = array();\n\tforeach ($modules as $name => $value) {\n\t\tif (isset($_POST[$name]))\n\t\t\t$return[] = $name;\n\t}\n\n\treturn $return;\n}", "function contactmod_add_instance(stdClass $contactmod, mod_contactmod_mod_form $mform = null) {\n global $DB;\n\n $contactmod->timecreated = time();\n\n # You may have to add extra stuff in here #\n\n return $DB->insert_record('contactmod', $contactmod);\n}", "function my_new_contactmethods( $contactmethods ) {\n// Add Twitter\n$contactmethods['twitter'] = 'Twitter';\n//add Facebook\n$contactmethods['facebook'] = 'Facebook';\n\n\n \nreturn $contactmethods;\n}", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}", "function to_entry() \n {\n $entry = array(\"entry\" => array(\"content\" => array()));\n # set file array\n $entry[\"entry\"][\"content\"][\"file\"] = array();\n foreach ($this->file_objs as $f) {\n array_push($entry[\"entry\"][\"content\"][\"file\"], $f->to_array());\n }\n # set params dict\n $entry[\"entry\"][\"content\"][\"params\"] = array();\n $entry[\"entry\"][\"content\"][\"params\"][\"name\"] = $this->name;\n $entry[\"entry\"][\"content\"][\"params\"][\"yt_id\"] = $this->yt_id;\n $entry[\"entry\"][\"content\"][\"params\"][\"tag\"] = $this->tags;\n if (! empty($this->meta_objs) ) {\n $entry[\"entry\"][\"content\"][\"params\"][\"meta\"] = array();\n foreach ($this->meta_objs as $m) {\n array_push($entry[\"entry\"][\"content\"][\"params\"][\"meta\"], $m->to_array());\n }\n }\n # set file_params dict\n $entry[\"entry\"][\"content\"][\"file_params\"] = array();\n $entry[\"entry\"][\"content\"][\"file_params\"][\"thumb_used\"] = $this->thumb_used;\n $entry[\"entry\"][\"content\"][\"file_params\"][\"update_files\"] = $this->update_files;\n # set chapters\n $entry[\"entry\"][\"content\"][\"chapter\"] = array();\n foreach ($this->chapters as $ch) {\n array_push($entry[\"entry\"][\"content\"][\"chapter\"], $ch->to_array());\n }\n # set comments\n $entry[\"entry\"][\"content\"][\"comment\"] = array();\n // foreach ($this->comments as $ch) {\n // array_push($entry[\"entry\"][\"content\"][\"comment\"], $ch->to_array());\n // }\n\n return $entry;\n }", "function initialiseRecord() { //{{{\n global $map;\n \n $record = array();\n \n foreach (array_keys($map) as $tag) {\n $record[$tag] = array();\n }\n \n return $record;\n}", "function creatureaddon_getmoduleinfo(){\n\t$info = array(\n\t\t\"name\"=>\"Creature Addon\",\n\t\t\"author\"=>\"Billie Kennedy\",\n\t\t\"version\"=>\"1.1\",\n\t\t\"category\"=>\"General\",\n\t\t\"download\"=>\"http://www.orpgs.com/modules.php?name=Downloads&d_op=viewdownload&cid=6\",\n\t\t\"vertxtloc\"=>\"http://www.orpgs.com/downloads/\",\n\t\t\"prefs-creatures\"=>array(\n\t\t\t\"Creature Addons,title\",\n\t\t\t\"addhit\"=>\"How many hit points do you want to add?,int|0\",\n\t\t\t\"addattack\"=>\"How much additional attack do you wish to add?,int|0\",\n\t\t\t\"adddefense\"=>\"How much additional defense do you wish to add?,int|0\",\n\t\t\t\"addgold\"=>\"How much additional gold for this creature?,int|0\",\n\t\t\t\"gemchance\"=>\"What are the chances of finding an extra gem with this creature?,range,0,100,1|0\",\n\t\t\t\"gemmessage\"=>\"What is the message shown when the user finds a gem for this creature?,text\",\n\t\t\t\"description\"=>\"Give the creature a full description.,textarea\",\n\t\t\t\"image\"=>\"What is the image name?,text\",\n\t\t\t\"image_note\"=>\"The images should be placed in the images directory of your root. Use the entire file name, ie 'creature.jpg',note\",\n\t\t),\n\t\t\"prefs\"=>array(\n\t\t\t\"Module Preferences,title\",\n\t\t\t\"user_showimages\"=>\"Show creature images during combat?,bool|0\",\n\t\t\t\"user_note\"=>\"This will also enable/disable the descriptions if there are any.,note\",\n\t\t)\n\t);\n\treturn $info;\n}", "function prepare_ldap_entry($in){\n global $conf;\n global $FIELDS;\n global $OCLASSES;\n\n //check dateformats\n if(!preg_match('/\\d\\d\\d\\d-\\d\\d-\\d\\d/',$in['anniversary'])) $in['anniversary']='';\n if(!preg_match('/\\d\\d\\d\\d-\\d\\d-\\d\\d/',$in['birthday'])) $in['birthday']='';\n\n // we map all internal names to the configured LDAP attributes here\n foreach($in as $key => $value){\n if($FIELDS[$key]){\n // normal mapped field\n $out[$FIELDS[$key]][] = $value;\n }elseif($FIELDS[\"_$key\"]){\n // mapped multi field\n if(is_array($value)){\n $out[$FIELDS[\"_$key\"]] = $value;\n }else{\n $out[$FIELDS[\"_$key\"]][] = $value; //shouldn't happen, but to be sure\n }\n }else{\n // no mapping found we ignore it\n }\n }\n\n // special tag handling for Thunderbird\n if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){\n if($in['marker'][0]) $out['custom1'][] = $in['marker'][0];\n if($in['marker'][1]) $out['custom2'][] = $in['marker'][1];\n if($in['marker'][2]) $out['custom3'][] = $in['marker'][2];\n if($in['marker'][3]) $out['custom4'][] = $in['marker'][3];\n }\n\n\n // add the Objectclasses\n $out['objectclass'] = $OCLASSES;\n\n return clear_array($out);\n}", "function parseEntry( array $entry ) {\n\tlist( $index, $id, $expression, $de, $fi, $page ) = $entry;\n\n\tif ( $id ) {\n\t\t$id = \"$expression ($id)\";\n\t} elseif ( strpos( $expression, '.' ) !== false ) {\n\t\t// SMW does not allow dots in the first five characters\n\t\t$id = str_replace( '.', '_', $expression );\n\t}\n\n\t$values = [\n\t\t'expression' => $expression,\n\t\t'de' => $de,\n\t\t'fi' => $fi,\n\t\t'page' => $page,\n\t\t'id' => $id,\n\t];\n\n\t$values = array_filter( $values );\n\n\treturn [ \"Sosva:$index\" => $values ];\n}", "function create_link_array($current_rank,$rank_id,$max_rank,$searchchecksum)\n{\n\tglobal $_SERVER;\n\tmail('[email protected],[email protected]','create_link_array() called in search.inc',$_SERVER);\n}", "public function add($datas, $options=''){\n $fields = array_keys($datas[0]);\n foreach($datas as $data){\n $value = array();\n foreach($data as $key => $val){\n\t\t\t\t$val = $this->parseValue($val);\n\t\t\t\tif(is_scalar($val)){\n\t \t\t\t$value[] = $val;\n\t\t\t\t}\n }\n $values[] = '('.implode(',', $value).')';\n }\n $sql = \"insert into \". $this->modName. \"(\". implode(',', $fields). ') values '.implode(',',$values);\n// echo $sql.\"<br/>\";\n $mysql = new DbMysql(Config::$config);\n return $mysql->execute($sql);\n }", "function info_module_mod_search_simple(){\n\n //\n // Описание модуля\n //\n\n //Заголовок (на сайте)\n $_module['title'] = 'Простой модуль поиска';\n\n //Название (в админке)\n $_module['name'] = 'Простой модуль поиска';\n\n //описание\n $_module['description'] = 'Модуль Простой поиск';\n\n //ссылка (идентификатор)\n $_module['link'] = 'mod_search_simple';\n\n //позиция\n $_module['position'] = 'sidebar';\n\n //автор\n $_module['author'] = 'soft-solution.ru';\n\n //текущая версия\n $_module['version'] = '1.0';\n\n //\n // Настройки по-умолчанию\n //\n //$_module['config'] = array();\n\n return $_module;\n\n }", "function opensky_add_usage_and_version_elements_to_mods (AbstractObject $object, $usage, $version) {\n\n $refuse_msg = t('Refusing to add usage and publication version statements alone');\n if (empty($object['MODS'])) {\n drupal_set_message(t('No MODS in object @pid. %refuse.', array('@pid' => $object->id, '%refuse' => $refuse_msg)), 'error');\n return;\n }\n $namespace = 'http://www.loc.gov/mods/v3';\n $doc = new DOMDocument();\n $doc->loadXML($object['MODS']->content);\n $xpath = new DOMXPath($doc);\n $xpath->registerNamespace('mods', $namespace);\n // Remove all instances of mods:accessCondition and mods:physicalDescription\n // from every mods:mods element instance.\n // OpenSky change\n $physical_description_query = '//mods:physicalDescription';\n $results = $xpath->query(\"$physical_description_query\");\n foreach ($results as $result) {\n $result->parentNode->removeChild($result);\n }\n // Regardless of the number of mods:mods elements in the document we only\n // add the usage and version to the first one.\n $results = $xpath->query('//mods:mods[1]');\n if ($results->length == 0) {\n drupal_set_message(t('Could not find MODS element in object @pid is empty. %refuse.', array('@pid' => $object->id, '%refuse' => $refuse_msg)), 'error');\n return;\n }\n $mods_element = $results->item(0);\n\n # // Add mods:physicalDescription to the first mods:mods element.\n $physical_description_element = $doc->createElementNS($namespace, 'physicalDescription');\n\n $physical_description_note_element = $doc->createElementNS($namespace, 'note');\n $physical_description_note_element->setAttribute('type', 'version');\n $physical_description_note_element->nodeValue = $version;\n $physical_description_element->appendChild($physical_description_note_element);\n $mods_element->appendChild($physical_description_element);\n\n // Commit changes to datastream.\n $object['MODS']->setContentFromString($doc->saveXML());\n}", "function lobby_membersapi_add($args)\r\n{\r\n\t$uid = (int)$args['uid'];\r\n\t$gid = (int)$args['gid'];\r\n\t$text = $args['text'];\r\n\tif (!($uid > 1) || !($gid > 0)) {\r\n \t \tLogUtil::registerError(_LOBBY_GROUP_ADDMEMBER_FAILURE);\r\n\t\treturn false;\r\n\t} else {\r\n\t \t// get Group\r\n\t \t$group = pnModAPIFunc('lobby','groups','get',array('id' => $gid));\r\n \t\t$groupOwner = (($group['uid'] == pnUserGetVar('uid')) || (SecurityUtil::checkPermission('lobby::'.$id, '::', ACCESS_ADMIN)));\r\n\t \tif ($group['id'] != $gid) {\r\n\t \t \t// Something went wrong, groups not existent or something like that\r\n\t \t \tLogUtil::registerError(_LOBBY_GROUP_ADDMEMBER_FAILURE);\r\n\t\t return false;\r\n\t\t} else {\r\n\t\t\t$obj = array(\r\n\t\t\t\t'gid' \t=> $gid, \r\n\t\t\t\t'uid' \t=> $uid,\r\n\t\t\t\t'text'\t=> $text,\r\n\t\t\t\t'date'\t=> date(\"Y-m-d H:i:s\",time())\r\n\t\t\t\t);\r\n\t\t\tif (($group['moderated'] == 1) && ($group['uid'] != $uid)) {\r\n\t\t\t \t// is the member already member or pending?\r\n\t\t\t \t$table = pnDBGetTables();\r\n\t\t\t \t$column_pending = $table['lobby_members_pending_column'];\r\n\t\t\t \t$column_members = $table['lobby_members_column'];\r\n\t\t\t \t$where_pending = $column_pending['uid'].\" = \".$uid.\" AND \".$column_pending['gid'].\" = \".$gid;\r\n\t\t\t \t$where_members = $column_members['uid'].\" = \".$uid.\" AND \".$column_members['gid'].\" = \".$gid;\r\n\t\t\t \t$pending_count = (int)DBUtil::selectObjectCount('lobby_members_pending',$where_pending);\r\n\t\t\t \t$members_count = (int)DBUtil::selectObjectCount('lobby_members',$where_members);\r\n\t\t\t \tif ($pending_count > 0) {\r\n\t\t\t \t \t// if the call was done by the group owner we will move the contact from pending status\r\n\t\t\t \t \tif ($groupOwner) {\r\n\t\t\t \t \t \t// get object, add it into member table and delete delte it from pending table\r\n\t\t\t\t\t\t$pending = DBUtil::selectObject('lobby_members_pending',$where_pending);\r\n\t\t\t\t\t\t$result = DBUtil::deleteObject($pending,'lobby_members_pending');\r\n\t\t\t\t\t\tif (!$result) {\r\n\t\t\t\t\t\t\treturn LogUtil::registerError('_LOBBY_GROUP_PENDING_ACCEPT_ERROR');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($members_count == 0) {\r\n\t\t\t\t\t\t \tif (!$result) {\r\n\t\t\t\t\t\t\t\treturn LogUtil::registerError('_LOBBY_GROUP_PENDING_ACCEPT_ERROR');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn LogUtil::registerError(_LOBBY_GROUP_ADD_ALREDY_MEMBER);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn LogUtil::registerError(_LOBBY_GROUP_ADD_ALREDY_PENDING);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ($members_count > 0) {\r\n\t\t\t\t return LogUtil::registerError(_LOBBY_GROUP_ADD_ALREDY_MEMBER);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$result = DBUtil::insertObject($obj,'lobby_members_pending');\r\n\t\t\t\t\tif ($result) {\r\n\t\t\t\t\t\treturn LogUtil::registerStatus(_LOBBY_GROUP_REQUESTSENT);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn LogUtil::registerError(_LOBBY_GROUP_JOINERROR);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t \t// Insert Member now into database\r\n\t\t\t$result = DBUtil::insertObject($obj,'lobby_members');\r\n\t\t\t// Set message\r\n\t\t\tif ($result) {\r\n\t\t\t\tLogUtil::registerStatus(str_replace('%member%',pnUserGetVar('uname', $uid),_LOBBY_GROUPS_MEMBERADDED));\r\n\t\t\t} else {\r\n\t\t\t \tLogUtil::registerError(_LOBBY_GROUPS_ADDERROR);\r\n\t\t\t}\r\n\t\t\t// Send an Email to the user that was added\r\n\t\t\tif ($group['uid'] == $uid) {\r\n\t\t\t\t// ToDo: Email schicken \"wurde hinzugefügt\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function appendMetadata($item, $metadataElement)\n {\n $document = $metadataElement->ownerDocument;\n $mods = $document->createElementNS(\n self::METADATA_NAMESPACE, 'mods');\n $metadataElement->appendChild($mods);\n\n $mods->declareSchemaLocation(self::METADATA_NAMESPACE, self::METADATA_SCHEMA);\n \n $titles = $item->getElementTexts( 'Dublin Core','Title');\n foreach($titles as $title)\n {\n $titleInfo = $mods->appendNewElement('titleInfo');\n $titleInfo->appendNewElement('title', $title->text);\n }\n \n $creators = $item->getElementTexts('Dublin Core','Creator');\n foreach($creators as $creator)\n {\n $name = $mods->appendNewElement('name');\n $name->appendNewElement('namePart', $creator->text);\n $role = $name->appendNewElement('role');\n $roleTerm = $role->appendNewElement('roleTerm', 'creator');\n $roleTerm->setAttribute('type', 'text');\n }\n \n $contributors = $item->getElementTexts('Dublin Core','Contributor');\n foreach($contributors as $contributor)\n {\n $name = $mods->appendNewElement('name');\n $name->appendNewElement('namePart', $contributor->text);\n $role = $name->appendNewElement('role');\n $roleTerm = $role->appendNewElement('roleTerm', 'contributor');\n $roleTerm->setAttribute('type', 'text');\n }\n \n $subjects = $item->getElementTexts('Dublin Core','Subject');\n foreach($subjects as $subject)\n {\n $subjectTag = $mods->appendNewElement('subject');\n $subjectTag->appendNewElement('topic', $subject->text);\n }\n \n $descriptions = $item->getElementTexts('Dublin Core','Description');\n foreach($descriptions as $description)\n {\n $mods->appendNewElement('note', $description->text);\n }\n \n $formats = $item->getElementTexts('Dublin Core','Format');\n foreach($formats as $format)\n {\n $physicalDescription = $mods->appendNewElement('physicalDescription');\n $physicalDescription->appendNewElement('form', $format->text);\n }\n \n $languages = $item->getElementTexts('Dublin Core','Language');\n foreach($languages as $language)\n {\n $languageElement = $mods->appendNewElement('language');\n $languageTerm = $languageElement->appendNewElement('languageTerm', $language->text);\n $languageTerm->setAttribute('type', 'text');\n }\n \n $rights = $item->getElementTexts('Dublin Core','Rights');\n foreach($rights as $right)\n {\n $mods->appendNewElement('accessCondition', $right->text);\n }\n\n // Prepend the item type, if any.\n if (get_option('oaipmh_repository_expose_item_type') && $dcType = $item->getProperty('item_type_name')) {\n $mods->appendNewElement('genre', $dcType);\n }\n\n $types = $item->getElementTexts('Dublin Core','Type');\n foreach ($types as $type)\n {\n $mods->appendNewElement('genre', $type->text);\n }\n\n\n $identifiers = $item->getElementTexts( 'Dublin Core','Identifier');\n foreach ($identifiers as $identifier)\n {\n $text = $identifier->text;\n $idElement = $mods->appendNewElement('identifier', $text);\n if ($this->_isUrl($text)) {\n $idElement->setAttribute('type', 'uri');\n } else {\n $idElement->setAttribute('type', 'local');\n }\n }\n\n $sources = $item->getElementTexts('Dublin Core','Source');\n foreach ($sources as $source)\n {\n $this->_addRelatedItem($mods, $source->text, true);\n }\n\n $relations = $item->getElementTexts('Dublin Core','Relation');\n foreach ($relations as $relation)\n {\n $this->_addRelatedItem($mods, $relation->text);\n }\n\n $location = $mods->appendNewElement('location');\n $url = $location->appendNewElement('url', record_url($item, 'show', true));\n $url->setAttribute('usage', 'primary display');\n\n $publishers = $item->getElementTexts('Dublin Core','Publisher');\n $dates = $item->getElementTexts('Dublin Core','Date');\n\n // Empty originInfo sections are illegal\n if(count($publishers) + count($dates) > 0) \n {\n $originInfo = $mods->appendNewElement('originInfo');\n \n foreach($publishers as $publisher)\n {\n $originInfo->appendNewElement('publisher', $publisher->text);\n }\n\n foreach($dates as $date)\n {\n $originInfo->appendNewElement('dateOther', $date->text);\n }\n }\n \n $recordInfo = $mods->appendNewElement('recordInfo');\n $recordInfo->appendNewElement('recordIdentifier', $item->id);\n }", "function add_fin($arr=array(),$inorout='i'){\n $db['fin_cid']=$arr['cid'];\n $db['fin_amont']=$arr['amont'];\n $db['\tfin_mt']=$arr['mt'];\n $db['fin_outorin']=$inorout;\n $db['fin_refid']=$arr['rid'];\n $db['fin_reftbl']=$arr['tbl'];\n global $dbase;\n return $dbase->RowInsert($db,'sob_finance');\n }", "public function install_module_entries_table()\n {\n $this->EE->load->dbforge();\n\n $this->EE->dbforge->add_field(array(\n 'log_entry_id' => array(\n 'auto_increment' => TRUE,\n 'constraint' => 10,\n 'type' => 'INT',\n 'unsigned' => TRUE\n ),\n 'site_id' => array(\n 'constraint' => 5,\n 'type' => 'INT',\n 'unsigned' => TRUE\n ),\n 'addon_name' => array(\n 'constraint' => 50,\n 'type' => 'VARCHAR'\n ),\n 'admin_emails' => array(\n 'type' => 'MEDIUMTEXT'\n ),\n 'date' => array(\n 'constraint' => 10,\n 'type' => 'INT',\n 'unsigned' => TRUE\n ),\n 'notify_admin' => array(\n 'constraint' => 1,\n 'default' => 'n',\n 'type' => 'CHAR'\n ),\n 'type' => array(\n 'constraint' => 10,\n 'type' => 'VARCHAR'\n ),\n 'message' => array(\n 'type' => 'TEXT'\n ),\n 'extended_data' => array(\n 'type' => 'TEXT'\n )\n ));\n\n $this->EE->dbforge->add_key('log_entry_id', TRUE);\n $this->EE->dbforge->add_key('addon_name');\n $this->EE->dbforge->create_table('omnilog_entries', TRUE);\n }", "public function addEntry($entries)\r\n {\r\n if (is_numeric($entries)) {\r\n $entries = array($entries);\r\n }\r\n \r\n if (is_array($entries)) {\r\n foreach($entries as $entryId) {\r\n $entry = new Warecorp_User_Addressbook($entryId);\r\n if ($entry->ownerId == $this->userId) {\r\n $this->entries[] = array('id' => $entryId);\r\n } else {\r\n throw new Zend_Exception(\"You are not owner of this entry!\");\r\n }\r\n }\r\n } else {\r\n throw new Zend_Exception(\"Incorrect entries format!\");\r\n }\r\n \r\n }", "public function mass_add()\n {\n }", "function fn_giftreg_add_fields($fields)\n{\n if (empty($fields)) {\n return false;\n }\n\n foreach ($fields as $v) {\n\n if (empty($v['description'])) {\n continue;\n }\n\n // Insert main data\n $field_id = db_query(\"INSERT INTO ?:giftreg_fields ?e\", $v);\n // Insert descriptions\n $_data = array(\n 'object_id' => $field_id,\n 'object_type' => 'F',\n 'description' => $v['description'],\n );\n\n foreach (fn_get_translation_languages() as $_data['lang_code'] => $_v) {\n db_query(\"INSERT INTO ?:giftreg_descriptions ?e\", $_data);\n }\n\n if (substr_count('SR', $v['field_type']) && is_array($v['variants'])) {\n fn_giftreg_add_field_variants($v['variants'], $field_id);\n }\n }\n\n return true;\n}", "function add($num = \"\")\n{\n\t\n$internalnum = 10;\t\nreturn array($num,$internalnum );\t\n}", "function tbldef($tbl)\n{\n$memp=array();$mfields=array();\n$sql_fields=\"select fieldid,tblid,name,alias,type from field where tblid=(select tblid from config where name='$tbl')\";\necho $sql_fields;\n$resultf=mysql_query($sql_fields) or die(\"from here\".mysql_error());\nwhile($rowf=mysql_fetch_array($resultf))\n{\n$mfields[$rowf['alias']]=$rowf['name'];\n$mfields[$rowf['name'].'type']=$rowf['type'];\n$mfields[$rowf['name'].'fieldid']=$rowf['fieldid'];\n$mfields[$rowf['name'].'tblid']=$rowf['tblid'];\n}\n//$memp[$empid]=$mfields;\n\n//$memp['1011']=array('vipul'=>'great');\n//$memp['1011']=array_add('neha');\n//var_dump($mfields);\nreturn $mfields;\n}", "function modify_filters ($filter,$mods) \n{ \n $new_filter = array_merge($filter,$mods);\n return $new_filter;\n}", "function addByName(){\n //turn user profile into assoc array\n $medsJSON = file_get_contents(\"userData.json\");\n \n $medsPHP = json_decode($medsJSON);\n $medComp = $_POST['medComp'];\n $medComp = $medComp ?:'Not entered';\n $medName = $_POST['medName'];\n $medStrength = $_POST['strength']; \n $medTabs = $_POST['medTabs']; \n $medPack = $_POST['medPack']; \n \n \n \n \n $tempArray = array(\n \"company\" => $medComp,\n \"medication\" => $medName,\n \"strength\" => $medStrength,\n \"barcode\" => \"Not entered\",\n \"notabs\" => $medPack,\n \"tabsperday\" => $medTabs,\n );\n\n \n $newObject = (object) $tempArray;\n \n array_push($medsPHP->meds, $newObject);\n \n \n \n \n //recode to json\n $newMedsJSON = json_encode($medsPHP);\n \n \n //rewrite file\n file_put_contents(\"userData.json\", $newMedsJSON);\n header(\"Location: medication.html\");\n die();\n}", "function add_artist(&$artists, $new_artists) {\n foreach($new_artists as $new_artist_name => $new_artist_data) {\n if (!array_key_exists($new_artist_name, $artists)) {\n $artists[$new_artist_name] = $new_artist_data;\n }\n }\n}", "function fieldCek()\r\n {\r\n $f = array(\r\n 'kodeorg'=>'Kode Organisasi' \r\n );\r\n return $f;\r\n }", "function ldap_mod_replace($link_identifier, $dn, $entry)\n{\n}", "function ww_taxonomies_addon($addons){\n $addons['Taxonomies'] = new WW_Taxonomies();\n return $addons;\n}", "function DF_extra_contact_info($contactmethods) {\r\n //unset($contactmethods['aim']);\r\n //unset($contactmethods['yim']);\r\n //unset($contactmethods['jabber']);\r\n $contactmethods['googleplus'] = 'Google+ Account Url';\r\n\r\n\r\n return $contactmethods;\r\n}", "private function mod_prep($row){\n $meta = new dbMeta(); \n $cols = $meta->get_tabel_columns(); // array w/ all metadata \n $form_array_mod = $meta->buildFormArray($cols); // make to nice form ready\n // insert the values to the form array for mod form\n foreach($row as $k => $v) {\n $form_array_mod[$k]['VALUE'] = $v;\n } \n \n update_form($form_array_mod); // returns array ready to be processed \n }", "function domains_add($files){\n $res = array();\n foreach($files as $key=>$file) $res[$key] = $this->domain_add($key,$file);\n return $res;\n }", "function entries_to_assoc($ldap_entries)\n{\n\t$assoc_entries = array();\n\n\tfor ($i=0;$i<$ldap_entries['count'];$i++)\n\t{\n\t\tfor ($j=0;$j<$ldap_entries[$i]['count'];$j++)\n\t\t{\n\t\t\t$assoc_entries[$i][$ldap_entries[$i][$j]] = $ldap_entries[$i][$ldap_entries[$i][$j]][0];\n\t\t}\n\t}\n\n\treturn $assoc_entries;\n}", "public function getAdd()\n {\n return array(\n 'Currency.name' => array('type' => 'text', 'label' => __(\"Name\")),\n 'Currency.code' => array('type' => 'text', 'label' => __(\"Code\")),\n 'Currency.rate' => array('type' => 'text', 'label' => __(\"Rate\"))\n );\n }", "public function editEntries()\n {\n $commands = array();\n $availableSections = craft()->sections->getEditableSections();\n foreach ($availableSections as $section) {\n $type = ucfirst(Craft::t(ucfirst($section->type)));\n if ($section->type != SectionType::Single) {\n // We have to get the entries for this section first\n $commands[] = array(\n 'name' => $type . ': ' . $section->name,\n 'more' => true,\n 'call' => 'editEntry',\n 'service' => 'amCommand_entries',\n 'vars' => array(\n 'sectionHandle' => $section->handle\n )\n );\n } else {\n // Get the Single entry\n $criteria = craft()->elements->getCriteria(ElementType::Entry);\n $criteria->sectionId = $section->id;\n $criteria->limit = 1;\n $criteria->status = null;\n $criteria->locale = craft()->i18n->getPrimarySiteLocaleId();\n $entry = $criteria->first();\n\n if ($entry) {\n $commands[] = array(\n 'name' => $type . ': ' . $section->name,\n 'url' => $entry->getCpEditUrl()\n );\n }\n }\n }\n return $commands;\n }", "function get_custom_info(&$update_list, $file)\n\t{\n\t\tif (empty($this->update_info['custom']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (isset($this->update_info['custom'][$file]))\n\t\t{\n\t\t\tforeach ($this->update_info['custom'][$file] as $_file)\n\t\t\t{\n\t\t\t\t$update_list[] = array('filename' => $_file, 'custom' => true, 'original' => $file);\n\t\t\t}\n\t\t}\n\t}", "protected function createMenuEntriesForTbeModulesExt() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "public function addUpdateContact($params = []) {\n\n kavalogin_log('Adding/updating CiviCRM contact. Params: ' . print_r($params, TRUE), FALSE, WATCHDOG_INFO);\n\n try {\n\n $contactParams = ['contact_type' => 'Individual'];\n\n if (!empty($params['contacttype']) && $params['contacttype'] != 'none') {\n $contactParams['contact_sub_type'] = $params['contacttype'];\n }\n\n foreach (['contact_id', 'first_name', 'last_name'] as $contactField) {\n if (!empty($params[$contactField])) {\n $contactParams[$contactField] = $params[$contactField];\n }\n }\n\n $usernameFieldName = 'custom_' . $this->getCustomFieldId('contact_extra', 'KAVA_account_login');\n $barcodeFieldName = 'custom_' . $this->getCustomFieldId('contact_extra', 'barcode');\n if (!empty($params['username'])) {\n $contactParams[$usernameFieldName] = $params['username'];\n }\n if (!empty($params['barcode'])) {\n $contactParams[$barcodeFieldName] = $params['barcode'];\n }\n\n if (!empty($params['street_name'])) {\n $contactParams['api.address.create'] = [\n 'location_type_id' => 3,\n 'is_primary' => 1,\n 'street_address' => $params['street_name'].\" \".$params['street_number'],\n 'postal_code' => $params['postal_code'],\n 'city' => $params['city'],\n 'country_id' => (!empty($params['country_id']) ? $params['country_id'] : $this->getDefaultCountry()),\n ];\n }\n\n if (!empty($params['phone'])) {\n $contactParams['api.phone.create'] = [\n 'location_type_id' => 3,\n 'is_primary' => 1,\n 'phone' => $params['phone'],\n ];\n }\n\n if (!empty($params['email'])) {\n $contactParams['api.email.create'] = [\n 'is_primary' => 1,\n 'email' => $params['email'],\n ];\n }\n\n $ret = civicrm_api3('Contact', 'create', $contactParams);\n if ($ret && !$ret['is_error']) {\n return $ret['id'];\n }\n\n return FALSE;\n\n } catch (\\CiviCRM_API3_Exception $e) {\n kavalogin_log('CiviCRM API error: ' . $e->getMessage());\n return FALSE;\n }\n }", "function pnAddressBook_admin_updatelabels() {\r\n\r\n\t$output = new pnHTML();\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n\tlist($id,$del,$name,$newname) = pnVarCleanFromInput('id','del','name','newname');\r\n\tif(is_array($del)) {\r\n $dels = implode(',',$del);\r\n }\r\n\r\n\t$modID = $modName = array();\r\n\r\n\tif(isset($id)) {\r\n\t\tforeach($id as $k=>$i) {\r\n \t$found = false;\r\n \tif(count($del)) {\r\n \tforeach($del as $d) {\r\n \tif($i == $d) {\r\n \t$found = true;\r\n \tbreak;\r\n \t}\r\n \t}\r\n \t}\r\n \tif(!$found) {\r\n \tarray_push($modID,$i);\r\n \tarray_push($modName,$name[$k]);\r\n }\r\n \t}\r\n\t}\r\n\r\n\t$pntable = pnDBGetTables();\r\n\t$lab_table = $pntable[pnaddressbook_labels];\r\n\t$lab_column = $pntable['pnaddressbook_labels_column'];\r\n\r\n\t$updates = array();\r\n foreach($modID as $k=>$id) {\r\n array_push($updates,\"UPDATE $lab_table\r\n SET $lab_column[name]='\".pnVarPrepForStore($modName[$k]).\"'\r\n WHERE $lab_column[nr]=$id\");\r\n\t}\r\n\r\n\t$error = '';\r\n\r\n\tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','updatelabels',array('updates'=>$updates))) {\r\n if (empty($error)) { $error .= 'UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\telse { $error .= ' - UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n }\r\n\r\n\t$delete = \"DELETE FROM $lab_table WHERE $lab_column[nr] IN ($dels)\";\r\n\tif(isset($dels)) {\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','deletelabels',array('delete'=>$delete))) {\r\n if (empty($error)) { $error .= 'DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n }\r\n }\r\n\r\n\tif( (isset($newname)) && ($newname != '') ) {\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','addlabels',array('name'=>$newname))) {\r\n if (empty($error)) { $error .= 'INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n }\r\n }\r\n\r\n\tif ($error > 0) {\r\n\t\t$msg = pnVarPrepHTMLDisplay(_ERROR);\r\n\t}\r\n\telse {\r\n\t\t$msg = pnVarPrepHTMLDisplay(_pnAB_SUCCESS);\r\n\t}\r\n\r\n\t$args=array('msg'=>$error);\r\n\tpnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'labels',$args));\r\n\treturn true;\r\n}", "function &addEntry($entry) {\n $reuslt = NULL;\n if (is_object($entry) && is_a($entry, 'papaya_atom_entry')) {\n $result = $this->add();\n $result->assign($entry);\n }\n return $result;\n }", "function access_scheme_add_list() {\n drupal_set_title(t('Add an access scheme'), PASS_THROUGH);\n\n $content = array();\n foreach (access_scheme_info() as $type => $info) {\n $content[$type] = array(\n 'title' => $info['label'],\n 'description' => $info['description'],\n 'href' => 'admin/structure/access/add/' . str_replace('_', '-', $type),\n 'localized_options' => array(),\n );\n }\n return theme('admin_block_content', array('content' => $content));\n}", "function createContact($sfConn, $dataArray){\n\t\techo(\"<P> createContact <P>\");\n $sObjects = array();\n foreach ($dataArray as $fieldset)\n {\n\t\techo(\"<P> Set records to Contact <P>\");\n $sObject = new sObject();\n $sObject->type = 'Contact'; \n $sObject->fields = $fieldset;\n array_push($sObjects, $sObject);\n }\n\t\techo(\"<P> Ready to roll <P>\");\n $success = create_multiple($sfConn, $sObjects);\n return $success; \n }", "function add($item);", "function db_addAtomElement($db, $contents)\n{\n\t// $retv[0] = $stmt->errno (0 if success)\n\t// $retv[1] = $eid (assigned) or $stmt->error if some error occurred.\n\t\n\t$retv = array();\n\t$stmt = $db->prepare(QUERY_ADD_AtomElement);\n\t$eid = uuidv4();\n\t$stmt->bind_param(QUERY_ADD_AtomElement_TYPES, $eid, $contents);\n\t$stmt->execute();\n\t//\n\t$stmt->store_result();\n\t$retv[0] = $stmt->errno;\n\tif($stmt->errno == 0){\n\t\t$retv[1] = $eid;\n\t} else{\n\t\t$retv[1] = $stmt->error;\n\t}\n\t$stmt->close();\n\treturn $retv;\n}", "function addToListM($listname,$entry){\n $sql= \"INSERT INTO `all_list`(`$listname`) VALUES ('$entry')\";\n $result= $this-> db-> query($sql);\n if (!$result) {\n echo \"Duplicate Entry Exist !\";\n } else {\n echo \"Entry Added to List !\";\n }\n }", "public function hook_before_add(&$arr) {\n\n }", "function system_add_group($paramv)\n{\n}", "function languagelab_check_backup_mods_instances($instance,$backup_unique_code) {\n //First the course data\n $info[$instance->id.'0'][0] = '<b>'.$instance->name.'</b>';\n $info[$instance->id.'0'][1] = '';\n return $info;\n }", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $Language;\n\t\tif (!$this->AuditTrailOnAdd) return;\n\t\t$table = 't_gaji_detail';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t$key .= $rs['gjd_id'];\n\n\t\t// Write Audit Trail\n\t\t$dt = ew_StdCurrentDateTime();\n\t\t$id = ew_ScriptName();\n\t\t$usr = CurrentUserName();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $this->fields) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") {\n\t\t\t\t\t$newvalue = $Language->Phrase(\"PasswordMask\"); // Password Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) {\n\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$newvalue = \"[MEMO]\"; // Memo Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) {\n\t\t\t\t\t$newvalue = \"[XML]\"; // XML Field\n\t\t\t\t} else {\n\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"A\", $table, $fldname, $key, \"\", $newvalue);\n\t\t\t}\n\t\t}\n\t}", "private function push_mods($mods) \n {\n if (!$mods) return;\n \n $skip = [];\n \n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (in_array($mod, $skip))\n continue;\n \n if (isset ($nmo[$mod->type])) {\n $skip[] = $mod;\n continue;\n }\n }\n }\n \n $marr = [];\n \n foreach ($mods as $mod)\n if (!in_array($mod, $skip))\n $marr[$mod->type] = $mod->loc;\n \n array_push($this->nmods, $marr);\n }", "function jas_get_more_info( $arg ){\n\n\tglobal $storage;\n\n\t$ret['type'] = jas_set_value_by_key($arg['mod']['type_fields'],$arg['field'],'text');\n\n\t$ret['edit'] = (in_array($arg['field'],(array)$arg['mod']['update']['fields'])) ? 'yes' : 'no';\n\n\t$ret['name'] = (isset($arg['mod']['fields'][$arg['field']]['name'])) ? $arg['mod']['fields'][$arg['field']]['name'] : $arg['format']['global']['names'][$arg['field']];\n\n\n\t// Extra\n\tif( is_array($arg['mod'][$arg['r']['action']]['fields_extra']))\n\t\tforeach ( $arg['mod'][$arg['r']['action']]['fields_extra'] as $field_extra => $value_extra ){\n\n\t\t\tif( in_array($arg['field'], $value_extra) and isset($arg['format']['global']['extra'][$field_extra]) )\n\t\t\t\t$extra = $arg['format']['global']['extra'][$field_extra]+(array)$extra;\n\t\t}\n\n\tif( $extra)\n\t\t$ret['extra'] = $extra;\n\n\n\tif( array_key_exists($arg['field'],$arg['mod']['select']['select_fields']) )\n\t\t$ret = jas_create_options($arg,$ret);\n\t\n\treturn $ret;\n}", "function add($table_name, $data_array)\n\t{\n\n\t}", "public static function importFromXMLString($mods_xml) {\n\n $mods_doc = new SimpleXMLElement($mods_xml);\n\n $mods_doc->registerXPathNamespace(\"xml\", \"http://www.w3.org/XML/1998/namespace\");\n $mods_doc->registerXPathNamespace(\"mods\", \"http://www.loc.gov/mods/v3\"); //http://www.loc.gov/mods/v3\n\n if( property_exists($mods_doc, 'mods')) {\n\n $mods_doc = $mods_doc->mods;\n }\n\n $mods_array = array();\n\n $template_map = array(\n\t\t\t /*\n\t\t\t LDR Collections\n\t\t\t */\n 'dc.contributors.author' => array('xpath' => \"./mods:name/mods:role/mods:roleTerm[text()='aut']/../../mods:namePart\",\n\t\t\t\t\t\t\t 'facet' => true),\n\n\t\t\t 'affiliation' => './mods:affiliation',\n\n 'dc.contributors.other' => array('xpath' => \"./mods:name/mods:role/mods:roleTerm[text()='oth']/../../mods:namePart\",\n\t\t\t\t\t\t\t 'facet' => true),\n\n\t\t\t 'dc.title' => \"./mods:titleInfo/mods:title\",\n\n\t\t\t 'dc.date.accessioned' => array('xpath' => \"./mods:originInfo/mods:dateCaptured\",\n\t\t\t\t\t\t\t 'facet' => true,\n\t\t\t\t\t\t\t 'date' => true),\n\t\t\t 'dc.date.available' => array('xpath' => \"./mods:originInfo/mods:dateIssued\",\n\t\t\t\t\t\t\t 'facet' => true,\n\t\t\t\t\t\t\t 'date' => true),\n\n\t\t\t 'dc.identifier.citation' => './mods:note[@type=\"citation/reference\"]',\n\t\t\t \n\t\t\t 'dc.identifier.uri' => './mods:identifier[@type=\"uri\"]',\n\t\t\t 'dc.identifier.doi' => './mods:identifier[@type=\"doi\"]',\n\t\t\t 'dc.identifier.issn' => './mods:identifier[@type=\"issn\"]',\n\t\t\t 'dc.identifier.isbn' => './mods:identifier[@type=\"isbn\"]',\n\n\t\t\t 'dc.publisher' => './mods:publisher',\n\n\t\t\t 'dc.type' => './mods:genre',\n\n\t\t\t 'dc.description.abstract' => './mods:abstract',\n\n\t\t\t 'dc.subject' => './mods:subject/mods:topic',\n\n\t\t\t 'dc.subject' => './mods:subject/mods:topic',\n\n\t\t\t 'dc.relation.ispartofseries' => './mods:relatedItem/mods:title',\n\n\t\t\t 'dc.description' => './mods:note[@type=\"contents\"]',\n );\n\n foreach($template_map as $facet => $value) {\n\n $is_facet = false;\n $is_date = false;\n\n if(is_array($value)) {\n\n\t$xpath = $value['xpath'];\n\t$is_facet = $value['facet'];\n\n\tif(array_key_exists('date', $value)) {\n\n\t $is_date = $value['date'];\n\t}\n } else {\n\n\t$xpath = $value;\n }\n\n $map = function($element) {\n\n $lang = 'en-US';\n\n // Need to scrape\n // Refactor\n $m = preg_match('/xml\\:lang\\=\"(.+)\"/', $element->asXML(), $matches);\n\n if($m) {\n\n $lang = $matches[1];\n }\n\n return array('label' => $element->getName(),\n 'language' => $lang,\n 'value' => (string) $element,\n\t\t 'class' => drupal_strtolower(preg_replace('/[^A-Za-z0-9]/', '-', $element->getName())));\n };\n\n $mods_elements = array_map($map, $mods_doc->xpath($xpath));\n\n // Refactor\n foreach($mods_elements as $i => &$element) {\n\n\tif($is_facet) {\n\t \n\t $element['facet'] = $facet;\n\t}\n\n\tif($is_date) {\n\t \n\t $element['date_value'] = date('F, Y', strtotime($element['value']));\n\t}\n\n\t// Specific to migrated collections\n\t$element['label'] = $facet;\n }\n\n $mods_array = array_merge($mods_array, $mods_elements);\n }\n\n return $mods_array;\n }", "public function submitBulkAdd(array &$form, FormStateInterface $form_state)\n {\n $eid = $form_state->get('eid');\n $vals = $form_state->getValues();\n\n $connection = \\Drupal::database();\n $query = $connection->select('conreg_members', 'm');\n $query->leftJoin('conreg_airtable_members', 'a', 'a.mid = m.mid');\n $query->addField('m', 'mid');\n $query->condition('m.eid', $eid);\n $query->condition('m.is_deleted', 0);\n $query->condition('m.is_paid', 1);\n $query->isNull('a.mid');\n \n $result = $query->execute()->fetchAll(\\PDO::FETCH_ASSOC);\n $mids = [];\n foreach ($result as $mid) {\n $mids[] = $mid['mid'];\n if (count($mids) >= 10) {\n AirTable::addMembers($eid, $mids);\n $mids = [];\n }\n }\n if (count($mids)) {\n AirTable::addMembers($eid, $mids);\n }\n\n $form_state->setRebuild();\n }", "private function add(): array {\n return [\n 'title' => $this->t('Add Team Member'),\n ];\n }", "function usp_ews_get_monitorable_modules() {\n global $DB;\n\n return array(\n 'assign' => array(\n 'defaultTime' => 'duedate',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {assign_submission}\n WHERE assignment = :eventid\n AND userid = :userid\n AND status = 'submitted'\",\n 'marked' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assign'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assign'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'assignment' => array(\n 'defaultTime' => 'timedue',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {assignment_submissions}\n WHERE assignment = :eventid\n AND userid = :userid\n AND (\n numfiles >= 1\n OR {$DB->sql_compare_text('data2')} <> ''\n )\",\n 'marked' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assignment'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assignment'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'bigbluebuttonbn' => array(\n 'defaultTime' => 'timedue',\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'bigbluebuttonbn'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'recordingsbn' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'recordingsbn'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'book' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'book'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'certificate' => array(\n 'actions' => array(\n 'awarded' => \"SELECT id\n FROM {certificate_issues}\n WHERE certificateid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'awarded'\n ),\n 'chat' => array(\n 'actions' => array(\n 'posted_to' => \"SELECT id\n FROM {chat_messages}\n WHERE chatid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'choice' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'answered' => \"SELECT id\n FROM {choice_answers}\n WHERE choiceid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'answered'\n ),\n 'data' => array(\n 'defaultTime' => 'timeviewto',\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'data'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'feedback' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'responded_to' => \"SELECT id\n FROM {feedback_completed}\n WHERE feedback = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'responded_to'\n ),\n 'resource' => array( // AKA file.\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'resource'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'flashcardtrainer' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'flashcardtrainer'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'folder' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'folder'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'forum' => array(\n 'defaultTime' => 'assesstimefinish',\n 'actions' => array(\n\t\t\t\t'viewed' => \"SELECT id\n\t\t\t\t\t\t\t\t\t FROM {log}\n\t\t\t\t\t\t\t\t\tWHERE course = :courseid\n\t\t\t\t\t\t\t\t\t AND module = 'forum'\n\t\t\t\t\t\t\t\t\t AND action = 'view forum' \n\t\t\t\t\t\t\t\t\t AND cmid = :cmid\n\t\t\t\t\t\t\t\t\t AND userid = :userid\",\n 'posted_to' => \"SELECT id\n FROM {forum_posts}\n WHERE userid = :userid AND discussion IN (\n SELECT id\n FROM {forum_discussions}\n WHERE forum = :eventid\n )\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'glossary' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'glossary'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'hotpot' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {hotpot_attempts}\n WHERE hotpotid = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {hotpot_attempts}\n WHERE hotpotid = :eventid\n AND userid = :userid\n AND timefinish <> 0\",\n ),\n 'defaultAction' => 'finished'\n ),\n 'imscp' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'imscp'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'journal' => array(\n 'actions' => array(\n 'posted_to' => \"SELECT id\n FROM {journal_entries}\n WHERE journal = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'lesson' => array(\n 'defaultTime' => 'deadline',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {lesson_attempts}\n WHERE lessonid = :eventid\n AND userid = :userid\n UNION ALL\n SELECT id\n FROM {lesson_branch}\n WHERE lessonid = :eventid1\n AND userid = :userid1\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'lesson'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\"\n ),\n 'defaultAction' => 'attempted'\n ),\n 'page' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'page'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'questionnaire' => array(\n 'defaultTime' => 'closedate',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {questionnaire_attempts}\n WHERE qid = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {questionnaire_response}\n WHERE complete = 'y'\n AND username = :userid\n AND survey_id = :eventid\",\n ),\n 'defaultAction' => 'finished'\n ),\n 'quiz' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {quiz_attempts}\n WHERE quiz = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {quiz_attempts}\n WHERE quiz = :eventid\n AND userid = :userid\n AND timefinish <> 0\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'quiz'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'quiz'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'finished'\n ),\n 'scorm' => array(\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\",\n 'completed' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\n AND element = 'cmi.core.lesson_status'\n AND {$DB->sql_compare_text('value')} = 'completed'\",\n 'passedscorm' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\n AND element = 'cmi.core.lesson_status'\n AND {$DB->sql_compare_text('value')} = 'passed'\"\n ),\n 'defaultAction' => 'attempted'\n ),\n 'turnitintool' => array(\n 'defaultTime' => 'defaultdtdue',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {turnitintool_submissions}\n WHERE turnitintoolid = :eventid\n AND userid = :userid\n AND submission_score IS NOT NULL\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'url' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'url'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'wiki' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'wiki'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'workshop' => array(\n 'defaultTime' => 'assessmentend',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {workshop_submissions}\n WHERE workshopid = :eventid\n AND authorid = :userid\",\n 'assessed' => \"SELECT s.id\n FROM {workshop_assessments} a, {workshop_submissions} s\n WHERE s.workshopid = :eventid\n AND s.id = a.submissionid\n AND a.reviewerid = :userid\n AND a.grade IS NOT NULL\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'workshop'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\"\n ),\n 'defaultAction' => 'submitted'\n ),\n );\n}", "public function add(...$items);", "function system_addto_group($paramv)\n{\n}", "function biocomment_getmoduleinfo(){\n\t$info = array(\n\t\t\"name\"=>\"Bio Commentary\",\n\t\t\"version\"=>\"1.1\",\n\t\t\"author\"=>\"Sneakabout\",\n\t\t\"category\"=>\"Administrative\",\n\t\t\"download\"=>\"core_module\",\n\t\t\"prefs\"=>array(\n\t\t\t\"Bio Commentary Preferences,title\",\n\t\t\t\"canaddcomments\"=>\"Can this person add comments?,bool|0\",\n\t\t),\n\t);\n\treturn $info;\n}", "function acf_add_array_key_prefix($array, $prefix)\n{\n}", "public function addModule($modname,$typeAuht = 0,$uriPage = '',$extraData = NULL)\n\t{\n\t\t$arguments\t=\t(object)array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'modName'=>$modname,\n\t\t\t\t\t\t\t'authType'=>$typeAuht,\n\t\t\t\t\t\t\t'index_page'=>$uriPage,\n\t\t\t\t\t\t\t'extra'=>$extraData\n\t\t\t\t\t\t);\n\n\t\t$this->_modules[$modname] = $arguments;\n\t}", "static function stdRec_addFieldList($fldList, $flags=0) {\n $fldList[] = 'rKd:KidId';\n $fldList[] = 'rKd:EarliestYearSemester';\n $fldList[] = 'rKd:LatestYearSemester';\n $fldList[] = 'rKd:FirstName';\n $fldList[] = 'rKd:LastName';\n $fldList[] = 'rKd:NickName';\n $fldList[] = 'rKd:Grade'; // adjusted for GradeSchoolYear\n $fldList[] = 'rKd:GradeSchoolYear';\n $fldList[] = 'rKd:NotesForCoach';\n $fldList[] = 'rKd:NotesForSiteLeader';\n $fldList[] = 'rKd:PhotoReleaseStatus';\n return $fldList;\n}", "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"member_id\"] = $values[member_id];\n$data[\"group_id\"] = $values[group_id];\n$rs = DB::Select(\"group_member\", $data );\nwhile( $record = $rs->fetchAssoc() )\n{\n $group_member_id = $record[\"group_member_id\"];\n}\n\n\n$data = array();\n$keyvalues = array();\n$data[\"group_member_id\"] = $group_member_id;\n$data[\"valid\"] = 0;\n$keyvalues[\"group_member_checkin_id\"] = $values[group_member_checkin_id];\nDB::Update(\"group_member_checkin\", $data , $keyvalues);\n\n\n$data = array();\n\t$data[\"group_id\"] = $values[group_id];\n\t$rs = DB::Select(\"group\", $data );\n\n\twhile( $record = $rs->fetchAssoc() )\n\t{\n\t\t$group = $record[\"group_name\"];\n\t}\n\n$msg = \"Transaksi Check In anda di \" . $group . \" dengan id \" . $values[group_member_checkin_id] . \n\t\t\t\t\" sukses, ada mendapatkan kamar dengan id \" . $values[id_room] . \". Anda dapat melakukan Check In pada \" . \n\t\t\t\t$values[checkin_date] . \". Terimakasih.\";\n\n$rs = DB::Query(\"select chat_id from personal_channel\nwhere member_id = '$values[member_id]' AND channel_id = 1\");\n$dataChannelTele=$rs->fetchAssoc();\nif($dataChannelTele)\n{\n\t$data = array();\n\t$data[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t$data[\"out_msg\"] = $msg;\n\t$data[\"type\"] = \"msg\";\n\t$data[\"flag\"] = 1;\n\t$data[\"tgl\"] = NOW();\n\tDB::Insert(\"outbox_telegram\", $data );\n}\nelse\n{\n\t// if dont exist do something else\n}\n\n$rs = DB::Query(\"select chat_id from personal_channel\nwhere member_id = '$values[member_id]' AND channel_id = 2\");\n$dataChannelTele=$rs->fetchAssoc();\nif($dataChannelTele)\n{\n\t$data = array();\n\t$data[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t$data[\"out_msg\"] = $msg;\n\t$data[\"type\"] = \"msg\";\n\t$data[\"flag\"] = 1;\n\t$data[\"tgl\"] = NOW();\n\tDB::Insert(\"outbox_mail_aws\", $data );\n}\nelse\n{\n\t// if dont exist do something else\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "function add_additional_field($details) {\r\n\t\t$sql = \"INSERT INTO sys_man_additional_fields (field_name, field_type, field_placement, group_id) VALUES (?, ?, ?, ?)\";\r\n\t\t$data=array(\"$details->field_name\", \"$details->field_type\", \"$details->field_placement\", \"$details->group_id\");\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\treturn;\r\n\t}", "function cemhub_create_webform_fields_mapping($field_cid, $webform_nid, $question_code, $answer_code, $active) {\n db_insert('cemhub_fields')\n ->fields(\n array(\n 'cid' => $field_cid,\n 'nid' => $webform_nid,\n 'question_code' => $question_code,\n 'answer_code' => $answer_code,\n 'active' => $active,\n )\n )\n ->execute();\n}", "function add_prof_field($contactmethods) {\n\t$contactmethods['twitter'] = 'Twitter';\n\t$contactmethods['facebook'] = 'Facebook';\n\treturn $contactmethods;\n}", "function add( $env ){\n\t\t$temp = array();\n\t\tforeach( $this->fields as $field )\n\t\t{\n\t\t\t//$temp[] = $field.\"='\".addslashes($env[$field]).\"'\";\n\t\t\t$field_name[] = $field;\n\t\t\t$field_value[] = \"'\".addslashes($env[$field]).\"'\";\n\t\t}\n\t\t$query = \"INSERT INTO \".$this->table.\" (\".implode(',', $field_name).\") VALUES (\".join(\",\",$field_value).\") \";\n\t\t//echo \">>\".$query;exit;\n\t\tmysql_query($query) or die( \"An error has ocured in query1: \" .mysql_error (). \":\" .mysql_errno ()); \n\t}", "public function getInfoStudent($cin) {\n$info = array(\"CIN:\".$cin , \"Ahmed\", \"JRABA\",\"12/09/1997\"); \nreturn $info;\n}", "function add_local_field_group(){\n // ...\n }", "function v1_record_obj($key, $code, $data) {\n\t\n\tglobal $checked_data;\n\tglobal $xml_id_cnt;\n\t\n\tif (!isset($checked_data[$key])) {\n\t\t$checked_data[$key]=array();\n\t}\n\t\n\tif (!isset($checked_data[$key][$code])) {\n\t\t$checked_data[$key][$code]=array();\n\t}\n\t\n\t// XML ID\n\t$data['xml_id']=$xml_id_cnt;\n\t$xml_id_cnt++;\n\t\n\tarray_push($checked_data[$key][$code], $data);\n\t\n}", "public function newEntry()\n {\n $commands = array();\n $availableSections = craft()->sections->getEditableSections();\n foreach ($availableSections as $section) {\n if ($section->type != SectionType::Single) {\n $commands[] = array(\n 'name' => $section->name,\n 'url' => UrlHelper::getUrl('entries/' . $section->handle . '/new')\n );\n }\n }\n return $commands;\n }" ]
[ "0.57095605", "0.55301386", "0.537621", "0.53369457", "0.5316902", "0.51243466", "0.5092822", "0.5088854", "0.5060994", "0.50297606", "0.5028835", "0.50194687", "0.5004327", "0.50026685", "0.4979404", "0.49465567", "0.4938897", "0.49335468", "0.49330348", "0.49307767", "0.4912837", "0.49086708", "0.49071983", "0.4878102", "0.48747003", "0.4864628", "0.4850472", "0.48305273", "0.48303476", "0.48264736", "0.48205054", "0.48120904", "0.4798557", "0.4791498", "0.4787401", "0.47777897", "0.4774178", "0.47514856", "0.4744819", "0.47414404", "0.47323245", "0.4716335", "0.47126287", "0.4710124", "0.4705453", "0.47033596", "0.47031495", "0.4701285", "0.47012717", "0.4693857", "0.46927875", "0.46863678", "0.468559", "0.46729854", "0.46622372", "0.4658359", "0.46570864", "0.46564925", "0.4651902", "0.4648985", "0.46485347", "0.4644564", "0.4643871", "0.46358532", "0.462957", "0.462957", "0.46196106", "0.4617061", "0.46119744", "0.4607593", "0.45992067", "0.4597544", "0.4585677", "0.45826885", "0.45733735", "0.45693964", "0.4568896", "0.45590377", "0.45588535", "0.45550212", "0.45532322", "0.45485803", "0.4544622", "0.45440266", "0.45416424", "0.45302957", "0.4524168", "0.45214242", "0.4520498", "0.4519702", "0.45170948", "0.45150772", "0.4514852", "0.4504753", "0.4502452", "0.45016047", "0.4501041", "0.44991806", "0.44955713", "0.4493315" ]
0.47924474
33
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 }", "public function getCurrentChats(Request $request)\n {\n// 'search_text' => 'required|string',\n// ]);\n// if ($validator->fails()) {\n// return sendError('The given data is invalid', $validator->getMessageBag());\n// }\n $text = isset($request->search_text)?$request->search_text:\"\";\n $per_page = isset($request->per_page) ? $request->per_page : 20;\n $user_id = Auth::id();\n if (!empty($text)) {\n $ids = User::Where('first_name', 'like', '%' . $text . '%')->orWhere('last_name', 'like', '%' . $text . '%')->distinct('id')->pluck('id');\n\n if (!$ids) {\n\n return sendSuccess('No result found!', null);\n }\n $per_page = isset($request->per_page) ? $request->per_page : 20;\n\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')->where(function ($q) use ($ids) {\n $q->where('sender_id', Auth::id());\n $q->orWhere('receiver_id', Auth::id());\n })->where(function ($q) use ($ids) {\n $q->whereIn('sender_id', $ids);\n $q->orWhereIn('receiver_id', $ids);\n })->paginate($per_page);\n\n\n return sendSuccess('Search Result!', $chats);\n } else {\n\n if (!$request->type || $request->type == 'current') {\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')\n ->withCount(['messages' => function ($q) {\n $q->where('is_read', 0);\n }])\n ->where(function ($q) use ($user_id) {\n $q->where('sender_id', $user_id);\n $q->orWhere('receiver_id', $user_id);\n })\n ->whereRaw(\"IF(`sender_id` = $user_id, `sender_deleted`, `receiver_deleted`)= 0\")\n ->orderBy('updated_at', 'desc')\n ->paginate($per_page);\n return sendSuccess('Got chat successfully.', $chats);\n } else if ($request->type == 'past') {\n\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')\n ->withCount(['messages' => function ($q) {\n $q->where('is_read', 0);\n }])\n ->where(function ($q) use ($user_id) {\n $q->where('sender_id', $user_id);\n $q->orWhere('receiver_id', $user_id);\n })\n ->whereRaw(\"IF(`sender_id` = $user_id, `sender_deleted`, `receiver_deleted`)= 0\")\n ->orderBy('updated_at', 'desc')\n ->paginate($per_page);\n return sendSuccess('Got chat successfully.', $chats);\n } else {\n return sendError(\"Invalid type only allowed 'current' or 'past' \", null);\n }\n\n\n }\n }", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "protected function checkConference($id)\n {\n if (!$this->getConference() || $id !== $this->getConference()->id) {\n throw new NotFoundHttpException();\n }\n }", "function ViewAll_Campaigns() {\n\t\t$db = &GetDatabase();\n\t\t$this->Db = &$db;\n\t}", "public function viewappointments(){\n $appointments_table = TableRegistry::get('Appointments');\n $appointments = $appointments_table->find()->contain(['Users','Patients'])->order(['appointment_date'=>'DESC']);\n $this->set('appointments', $appointments);\n $this->viewBuilder()->setLayout('backend');\n }", "public function conversation()\r\n {\r\n // belongsTo(RelatedModel, foreignKey = conversation_id, keyOnRelatedModel = id)\r\n return $this->belongsTo(Conversation::class,'conversation_id');\r\n }", "public function __construct()\n {\n// if(!Session::has('program_id') && get_programs()->count() > 0){\n// $p = get_programs();\n// Session::set('program_id', $p[0]->id);\n// }\n $this->beforeFilter('admin');\n $this->beforeFilter('program', array('except'=>array('get_answers')));\n $this->program = Program::find(Session::get('program_id')); \n }", "public function viewOICEntry(Request $request){\n $nic=Auth::User()->nic;\n $oicDetails = db::table('users')->where('nic',$nic)->First();\n $branches = db::table('police_offices')->where('headPoliceOffice',$oicDetails->policeOffice)->where('policeOfficeType','Branch Police Office')->get();\n\n\n $entry=db::table('entries')->where('entryID',$request->entryID)->First();\n $evidences=db::table('evidence')->where('entryId',$request->entryID)->where('policeView',\"Yes\")->get();\n $suspects=db::table('suspects')->where('entryID',$request->entryID)->where('policeView',\"Yes\")->get();\n $entryProgresses=db::table('entry_progresses')->where('entryID',$request->entryID)->where('policeView',\"Yes\")->get();\n $currentBranch=db::table('police_offices')->where('id',$entry->branch)->First();\n return view('oic/entryView',compact('entry','evidences','suspects','entryProgresses','oicDetails','branches','currentBranch'));\n }", "public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}", "function pre_query() {\n $this->view->field += $this->casetracker_fields;\n unset($this->view->field['cuid']); // this could be more surgical.\n }", "public function showOld($id)\n {\n // dd(\\Session::has('accepted_success'));\n $booking=DB::table('bookings')->where('id','=',$id)->first();\n // dd($booking);\n $status=$booking->status;\n $room=DB::table('rooms')->where('id','=',$booking->room_id)->first();\n $house=DB::table('houses')->where('id','=',$room->house_id)->first();\n $booking->manager_info = DB::table('managers')\n ->join('users','users.id','=','managers.user_id')\n ->where('managers.id','=',$house->manager_id)\n ->first();\n $user=DB::table('users')->where('id','=',$booking->user_id)->first();\n $image_room = DB::table('image_rooms')\n ->select('image_rooms.image')\n ->where('image_rooms.room_id','=',$booking->room_id)\n ->orderBy('priority')\n ->first();\n if ($image_room == null) {\n $non_image = ['priority'=>'100','id'=>'0','room_id'=>$booking->room_id,'image'=>'room_4.jpeg'];\n $non_image= (object) $non_image;\n $image_room=$non_image;\n }\n $available = DB::table('bookings')\n ->where('bookings.room_id','=',$booking->room_id)\n ->where('bookings.status','=',4)\n ->exists(); // is true if exists some booking is reserved\n // $deadline = DB::table('status_update')->where('booking_id', '=', $booking->id)->orderByDesc('created_at')->first();\n // $deadline = Carbon::parse($deadline->created_at)->addDays(1);\n $count = DB::table('bookings')->where('bookings.user_id','=',$booking->user_id)->count();\n // dd($country);\n\n $messages = DB::table('messages')\n ->where('messages.bookings_id','=',$booking->id)\n ->get();\n $vico_chat=View('bookings.vico_chat_show',[\n 'booking' => $booking,\n 'messages' => $messages,\n 'user'=> $user,\n 'room' => $room,\n 'house' => $house,\n // 'deadline' => $deadline\n\n ])->render();\n\n $whatsappnumberforlink = substr($user->phone, 1);\n\n $user_country = Country::find($user->country_id);\n\n $verification = Verification::firstOrCreate(['user_id' => $user->id],\n [\n 'user_id' => $user->id,\n 'phone_verified' => false,\n 'whatsapp_verified' => false,\n 'document_verified' => false,\n ]\n );\n // dd($user_country);\n return view('bookings.show',[\n 'user_country' => $user_country,\n 'image_room' => $image_room->image,\n 'available' => $available,\n 'count' => $count -1,\n 'booking' => $booking,\n 'room' => $room,\n 'house' => $house,\n 'user' => $user,\n 'whatsappnumberforlink' => $whatsappnumberforlink,\n 'countries' => Country::all('id','name','icon')->sortBy('name'),\n 'houses' => House::all(),\n 'status' => $this->STATUS,\n 'today_date' => Carbon::now()->toDateString(),\n 'today_time' => Carbon::now()->toTimeString(),\n 'messages' => $messages,\n 'vico_chat' => $vico_chat,\n 'verification' => $verification,\n // 'deadline' => $deadline\n\n ]);\n }", "public function index(Request $request)\n {\n if(Auth::user()->can('listar_propuestas_laborales')){\n\n $juridicaId = Auth::user()->persona->juridica->id;\n\n $mostrar_filtro_carreras = false;\n $carreras = Carrera::all();\n foreach ($carreras as $key => $carrera) {\n $carreraId = $carrera->id;\n $carreras[$key]->cantidad = Propuesta_Laboral::whereHas('requisitosCarrera', function($query) use ($carreraId){\n $query->where('carrera_id',$carreraId)\n ->where('juridica_id',Auth::user()->persona->juridica->id);\n })->count();\n\n if($carreras[$key]->cantidad > 0 ){\n $mostrar_filtro_carreras = true;\n }\n }\n\n $mostrar_filtro_tipos_trabajo = false;\n $tipos_trabajo = Tipo_Trabajo::all()->where('estado', 'activo');\n foreach ($tipos_trabajo as $key => $tipo_trabajo) {\n $tipo_trabajoId = $tipo_trabajo->id;\n $tipos_trabajo[$key]->cantidad = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('tipo_trabajo_id',$tipo_trabajoId)\n ->count();\n\n if($tipos_trabajo[$key]->cantidad > 0 ){\n $mostrar_filtro_tipos_trabajo = true;\n }\n }\n\n $mostrar_filtro_tipos_jornada = false;\n $tipos_jornada = Tipo_Jornada::all()->where('estado', 'activo');\n foreach ($tipos_jornada as $key => $tipo_jornada) {\n $tipo_jornadaId = $tipo_jornada->id;\n $tipos_jornada[$key]->cantidad = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('tipo_jornada_id',$tipo_jornadaId)\n ->count();\n\n if($tipos_jornada[$key]->cantidad > 0 ){\n $mostrar_filtro_tipos_jornada = true;\n }\n }\n\n $mostrar_filtro_idiomas = false;\n $idiomas = Idioma::all()->where('estado', 'activo');\n foreach ($idiomas as $key => $idioma) {\n $idiomaId = $idioma->id;\n $idiomas[$key]->cantidad = Propuesta_Laboral::whereHas('requisitosIdioma', function($query) use ($idiomaId){\n $query->where('idioma_id',$idiomaId)\n ->where('juridica_id',Auth::user()->persona->juridica->id);\n })->count();\n if($idiomas[$key]->cantidad > 0 ){\n $mostrar_filtro_idiomas = true;\n }\n }\n\n //dd($idiomas);\n\n $busqueda = true;\n $filtro = \"Últimas Propuestas\";\n\n // Filtro por Palabra Clave\n if(isset($request->buscar) && $request->buscar != null) {\n $palabra_a_buscar = preg_replace(\"/[^A-Za-z0-9+ .áÁéÉíÍóÓúÚñÑ-]/\", '', $request->buscar);\n $filtro = \"Palabra Clave - \".$palabra_a_buscar;\n\n $propuestas = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('titulo','LIKE', '%'.$palabra_a_buscar.'%')\n ->orWhere('lugar_de_trabajo','LIKE', '%'.$palabra_a_buscar.'%')\n ->orWhere('descripcion','LIKE', '%'.$palabra_a_buscar.'%')\n ->where('estado_propuesta','activo')\n ->orderBy('created_at','DESC')\n ->paginate(self::CANT_PAGINA,['*'], 'pag_buscar');\n $pagina = \"buscar\";\n }\n else {\n //Filtro carrera.\n if (isset($request->carrera)) {\n $carreraId = $request->carrera;\n $propuestas = Propuesta_Laboral::whereHas('requisitosCarrera', function($query) use ($carreraId){\n $query->where('carrera_id',$carreraId)\n ->where('juridica_id',Auth::user()->persona->juridica->id);\n })\n ->orderBy('propuestas_laborales.created_at','DESC')\n ->paginate(self::CANT_PAGINA,['*'], 'pag_carrera');\n $tipo_carrera_buscado = Carrera::find($request->carrera);\n $filtro = \"Carrera - \".$tipo_carrera_buscado->nombre_carrera;\n $pagina = \"carrera\";\n }\n else {\n //Filtro tipo de trabajo.\n if (isset($request->tipo_trabajo)) {\n $tipo_trabajoId = $request->tipo_trabajo;\n $propuestas = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('tipo_trabajo_id',$tipo_trabajoId)\n ->orderBy('propuestas_laborales.created_at','DESC')\n ->paginate(self::CANT_PAGINA,['*'], 'pag_tipo_trabajo');\n $pagina = \"tipo_trabajo\";\n $tipo_trabajo_buscado = Tipo_Trabajo::find($request->tipo_trabajo);\n $filtro = \"Tipo de Trabajo - \".$tipo_trabajo_buscado->nombre_tipo_trabajo;\n }\n else{\n //Filtro tipo de jornada.\n if (isset($request->tipo_jornada)) {\n $tipo_jornadaId = $request->tipo_jornada;\n $propuestas = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('tipo_jornada_id',$tipo_jornadaId)\n ->orderBy('propuestas_laborales.created_at','DESC')\n ->paginate(self::CANT_PAGINA,['*'], 'pag_tipo_jornada');\n $pagina = \"tipo_jornada\";\n $tipo_jornada_buscado = Tipo_Jornada::find($request->tipo_jornada);\n $filtro = \"Tipo de Jornada - \".$tipo_jornada_buscado->nombre_tipo_jornada;\n }\n else {\n //Filtro idioma\n if (isset($request->idioma)) {\n $idiomaId = $request->idioma;\n $propuestas = Propuesta_Laboral::whereHas('requisitosIdioma', function($query) use ($idiomaId){\n $query->where('idioma_id',$idiomaId)\n ->where('juridica_id',Auth::user()->persona->juridica->id);\n })\n ->orderBy('propuestas_laborales.created_at','DESC')\n ->paginate(self::CANT_PAGINA,['*'], 'pag_idioma');\n $pagina = \"idioma\";\n $idioma_buscado = Idioma::find($request->idioma);\n $filtro = \"Idioma - \".$idioma_buscado->nombre_idioma;\n }\n else{\n // Sin Filtro, ultimas postulaciones.\n $busqueda = false;\n $propuestas = Propuesta_Laboral::where('juridica_id',Auth::user()->persona->juridica->id)\n ->where('estado_propuesta','activo')\n ->orderBy('created_at','DESC')\n ->paginate(self::CANT_PAGINA);\n $pagina = \"\";\n }\n }\n }\n }\n }\n\n foreach ($propuestas as $key => $propuesta) {\n $today = Carbon::today()->toDateString();\n $propuestas[$key]->finalizada = false;\n if ($today > $propuestas[$key]->fecha_fin_propuesta) {\n $propuestas[$key]->finalizada = true;\n }\n $propuestas[$key]->cant_postulantes = count($propuestas[$key]->estudiantes);\n $propuestas[$key]->descripcion = substr($propuestas[$key]->descripcion,0,self::DESCRIPCION).'...';\n $propuestas[$key]->fecha_inicio_propuesta = date('d-m-Y', strtotime($propuestas[$key]->fecha_inicio_propuesta));\n }\n\n return view('in.propuestas_laborales.index')\n ->with('pagina',$pagina)\n ->with('propuestas',$propuestas)\n ->with('busqueda',$busqueda)\n ->with('filtro',$filtro)\n ->with('carreras',$carreras)\n ->with('mostrar_filtro_carreras',$mostrar_filtro_carreras)\n ->with('tipos_trabajo',$tipos_trabajo)\n ->with('mostrar_filtro_tipos_trabajo',$mostrar_filtro_tipos_trabajo)\n ->with('tipos_jornada',$tipos_jornada)\n ->with('mostrar_filtro_tipos_jornada',$mostrar_filtro_tipos_jornada)\n ->with('idiomas',$idiomas)\n ->with('mostrar_filtro_idiomas',$mostrar_filtro_idiomas);\n\n }else{\n return redirect()->route('in.sinpermisos.sinpermisos');\n }\n }", "function allowed() {\n $this->model('invitation');\n \n if ($_SESSION['user']->guest) {\n $sql = \"SELECT * FROM invitations WHERE id = {$_SESSION['user']->id}\";\n $invite = $this->invitation->one($sql);\n if (!$invite) {\n $this->message('Ungültige Einladung');\n unset($_SESSION['user']);\n $this->redirect('/');\n }\n \n if ($_SESSION['user']->object_type == 'topic') { \n if (count($this->path) < 3) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n $photo_id = $this->path[2];\n \n $sql = \"SELECT * FROM photos WHERE id = {$photo_id} LIMIT 1\";\n $photo = $this->photo->one($sql);\n if (!$photo) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n \n if ($photo->topic_id != $_SESSION['user']->object_id) {\n $this->message('Sie haben kein Zugriff auf diese Inhalte');\n return FALSE;\n }\n \n return TRUE;\n }\n }\n return parent::allowed();\n }", "public function belongsToCurrent()\n {\n return Auth::id() == $this->user_id;\n }", "public function agency_meeting()\n {\n //获取该拍卖会信息\n $meeting = M('AuctionMeeting')->field('id, name, thumb, address, pre_starttime,pre_endtime, pre_address,starttime,endtime, agencyid, introduce')->find(I('get.id', '', 'int'));\n $this->meeting_res = $meeting;\n //dump($this->meeting_res);\n //p($this->meeting_res);\n\n $data['hits'] = array('exp', 'hits+1'); // 拍品点击量+1\n M('AuctionMeeting')->where(array('id' => I('get.id', 0, 'int')))->save($data); // 根据条件保存修改的数据\n\n#无数据\n //查询该拍卖会的最新预展信息\n $time = time();\n $this->meeting_yz = M('AuctionExhibit')->field('id, pre_starttime, pre_endtime')->where(\"UNIX_TIMESTAMP(starttime) > $time && meetingid >= '\" . mysql_real_escape_string(I('get.id', '', 'int')) . \"' && isshow = 1\")->order('starttime desc')->limit(1)->select();\n // p( $this->meeting_yz);//无数据\n#无数据\n //查询该拍卖会的最新拍卖信息\n $this->meeting_jg = M('AuctionExhibit')->field('id, starttime, endtime')->where(\"UNIX_TIMESTAMP(endtime) <= $time && meetingid >= '\" . mysql_real_escape_string(I('get.id', '', 'int')) . \"' && isshow = 1\")->order('starttime desc')->limit(1)->select();\n //p($this->meeting_jg);//无数据\n\n //获取该拍卖会所属机构信息\n $this->agency_res = $this->Model->field('id, name, address, thumb, tel, email, website, post')->where(array('id' => $meeting['agencyid']))->find();\n // p($this->agency_res);\n\n //获取该拍卖会下专场信息\n $this->list_num = M('AuctionMeeting')->where(array('pid' => I('get.id', '', 'int'), 'status' => 0))->count();\n// /p($this->list_num);\n// / $this->list = M('AuctionMeeting')->field('id, name, pid, money,pre_starttime, thumb, pre_endtime, starttime, address, endtime')->where(array('pid' => I('get.id', '', 'int'), 'status' => 0))->order('starttime desc')->select();\n\n $p = isset($_GET['p']) ? $_GET['p'] : 1;\n //每页显示的数量\n $prePage = 8;\n $list = M('AuctionMeeting')->field('id, name, pid, money,pre_starttime, thumb, pre_endtime, starttime, address, endtime')->where(array('pid' => I('get.id', '', 'int'), 'status' => 0))->order('starttime desc')->page($p . ',' . $prePage)->select();\n //p($list);\n $this->assign(\"list\", $list);\n $count = M('AuctionMeeting')->where(array('pid' => I('get.id', '', 'int'), 'status' => 0))->count(); // 查询满足要求的总记录数\n $Page = new \\Think\\Page($count, $prePage); // 实例化分页类 传入总记录数和每页显示的记录数\n $Page->setConfig('header', '共%TOTAL_ROW%条记录');\n $Page->setConfig('prev', '上一页');\n $Page->setConfig('next', '下一页');\n $Page->setConfig('first', '首页');\n $Page->setConfig('last', '尾页');\n\n $Page->setConfig('theme', '%HEADER% %FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%');\n $show = $Page->show(); // 分页显示输出\n //p($show);\n $this->assign('page', $show); // 赋值分页输出\n\n //p($this->list);\n\n //拍品推荐\n $this->pptj_res = M('AuctionExhibit')->field('id, name, thumb, price, endprice, areaid, starttime')->where('isshow = 1')->limit(10)->order('hits desc')->select();\n //p( $this->pptj_res);\n //分配body css\n $this->assign(\"css\", 'selling-panel selling-preview-detail');\n $this->display('Front:agency_meeting');\n }", "protected function _prepareCollection()\n {\n $currentCampaign = Mage::getSingleton('adminhtml/session')->getCurrentCampaign();\n $collection = Mage::getModel('campaign/bannerslider')->getCollection();\n $collection->getSelect()\n ->joinLeft(array('campaign'=>$collection->getTable('campaign/campaign')),\n 'main_table.campaign_id = campaign.campaign_id', '')\n ->columns(array('campaign_name'=>'IF(main_table.campaign_id = \"'.$currentCampaign->getId().'\", \"Current\", campaign.name)'))\n ->group('main_table.bannerslider_id');\n $filter = Mage::registry('banner_reloaded_ids');\n if(!isset($filter)){//if reset no filter\n $selected_id = $this->_selectedId();\n if(!empty($selected_id)){\n $collection->addFieldToFilter('bannerslider_id', array('in'=>$selected_id));\n }\n }\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('record');\n }", "public function search()\n {\n $query = Channel::find();\n $query->alias('ch');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n// $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'ch.id' => $this->id,\n 'ch.type' => $this->type,\n 'ch.om' => $this->om,\n 'ch.master_channel' => $this->master_channel,\n 'ch.created_time' => $this->created_time,\n 'ch.updated_time' => $this->updated_time,\n 'ch.qq' => $this->qq,\n 'ch.firstaccess' => $this->firstaccess,\n 'ch.lastaccess' => $this->lastaccess,\n 'ch.picture' => $this->picture,\n 'ch.confirmed' => $this->confirmed,\n 'ch.suspended' => $this->suspended,\n 'ch.deleted' => $this->deleted,\n 'ch.status' => $this->status,\n 'ch.traffic_source' => $this->traffic_source,\n 'ch.pricing_mode' => $this->pricing_mode,\n 'ch.total_revenue' => $this->total_revenue,\n 'ch.payable' => $this->payable,\n 'ch.level' => $this->level,\n// 'os' => $this->os,\n 'ch.recommended' => $this->recommended,\n ]);\n\n $query->leftJoin('channel cch', 'ch.master_channel = cch.id');\n $query->leftJoin('user o', 'ch.om = o.id');\n\n $query->andFilterWhere(['like', 'ch.username', $this->username])\n ->andFilterWhere(['like', 'ch.firstname', $this->firstname])\n ->andFilterWhere(['like', 'ch.lastname', $this->lastname])\n ->andFilterWhere(['like', 'ch.auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'ch.password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'ch.password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'ch.payment_way', $this->payment_way])\n ->andFilterWhere(['like', 'ch.payment_term', $this->payment_term])\n ->andFilterWhere(['like', 'ch.beneficiary_name', $this->beneficiary_name])\n ->andFilterWhere(['like', 'ch.bank_country', $this->bank_country])\n ->andFilterWhere(['like', 'ch.bank_name', $this->bank_name])\n ->andFilterWhere(['like', 'ch.bank_address', $this->bank_address])\n ->andFilterWhere(['like', 'ch.swift', $this->swift])\n ->andFilterWhere(['like', 'ch.account_nu_iban', $this->account_nu_iban])\n ->andFilterWhere(['like', 'ch.company_address', $this->company_address])\n ->andFilterWhere(['like', 'ch.note', $this->note])\n ->andFilterWhere(['like', 'ch.system', $this->system])\n ->andFilterWhere(['like', 'ch.contacts', $this->contacts])\n ->andFilterWhere(['like', 'ch.email', $this->email])\n ->andFilterWhere(['like', 'ch.cc_email', $this->cc_email])\n ->andFilterWhere(['like', 'ch.company', $this->company])\n ->andFilterWhere(['like', 'ch.country', $this->country])\n ->andFilterWhere(['like', 'ch.city', $this->city])\n ->andFilterWhere(['like', 'ch.address', $this->address])\n ->andFilterWhere(['like', 'ch.phone1', $this->phone1])\n ->andFilterWhere(['like', 'ch.phone2', $this->phone2])\n ->andFilterWhere(['like', 'ch.wechat', $this->wechat])\n ->andFilterWhere(['like', 'ch.skype', $this->skype])\n ->andFilterWhere(['like', 'ch.alipay', $this->alipay])\n ->andFilterWhere(['like', 'ch.lang', $this->lang])\n ->andFilterWhere(['like', 'ch.timezone', $this->timezone])\n ->andFilterWhere(['like', 'ch.post_back', $this->post_back])\n ->andFilterWhere(['like', 'ch.paid', $this->paid])\n ->andFilterWhere(['like', 'ch.strong_geo', $this->strong_geo])\n ->andFilterWhere(['like', 'ch.strong_category', $this->strong_category])\n ->andFilterWhere(['like', 'ch.os', $this->os])\n ->andFilterWhere(['like', 'cch.username', $this->master_channel_name])\n ->andFilterWhere(['like', 'o.username', $this->om_name]);\n return $dataProvider;\n }", "public function search(Request $request) {\n\n //sidebar\n $current = Auth::guard('person')->user()->id;\n // $current2 = Session::all();\n // return $current2;\n\n\n $currentmatchids = DB::table('match_id')\n\n ->where([\n [ 'member_id', '=', $current]\n\n ])\n ->pluck('id');\n $currentmatchids = $currentmatchids->toArray();\n $currentpidgroups = DB::table('match_pid_groups')\n\n ->where([\n [ 'p_id', '=', $currentmatchids]\n\n ])\n ->pluck('pid_group_id');\n\n $currentusergroups = DB::table('match_member_groups')\n\n ->where([\n [ 'member_id', '=', $current]\n\n ])\n ->pluck('member_group_id');\n $currentorg = DB::table('persons')->where('id',$current)->where('type',2)->pluck('id');\n $currentfamily = DB::table('family_auths')\n\n ->where([\n [ 'member_id', '=', $current],\n\n ])\n ->where('status','=','Accept')\n ->pluck('family_id');\n\n\n\n\n //$notebook = $this->getArrayAlldBlock($currentstruc,$currentid,$notebook);\n $currents = DB::table('persons')->where('id',$current)->pluck('id');\n\n $matchviews = DB::table('match_views_mem as m')\n ->leftJoin('views_mem', 'm.view_id', '=', 'views_mem.id')\n\n\n\n\n\n\n\n ->orwhereIn(\n 'pid_groups.id',$currentpidgroups\n )\n ->orwhereIn(\n 'member_groups.id',$currentusergroups\n )\n ->orwhereIn(\n 'm.org_id',$currentorg\n )\n ->orwhereIn(\n 'm.member_id',$currents\n )\n ->orwhereIn(\n 'm.group_id',$currentfamily\n )\n ->orwhere(\n 'm.all_member','=','Yes'\n )\n\n\n ->leftJoin('member_groups', 'm.member_group_id', '=', 'member_groups.id')\n\n ->leftJoin('pid_groups', 'm.pid_group_id', '=', 'pid_groups.id')\n\n ->select('m.*','m.id', 'views_mem.name as view_name', 'views_mem.id as view_id',\n 'pid_groups.name as pid_group_name', 'pid_groups.id as pid_group_id','member_groups.name as member_group_name', 'member_groups.id as member_group_id')\n ->pluck('view_id');\n\n\n $views = Viewper::whereIn('id',$matchviews )\n ->where('belong_to','=',NULL )->get();\n $viewss = Viewper::whereIn('id',$matchviews )\n ->pluck('id');\n $viewss =$viewss->toArray();\n $tree='<li class=\"treeview\"></li>';\n foreach ($views as $view) {\n\n if(count($view->childs) &&in_array($view->id, $viewss)&& $view->add_to_side == \"Yes\"){\n $tree .='<li class=\"treeview\" ><a href =\"'.$view->view_url.'\"><i class=\"fa fa-link\"></i>'.$view->name.' <span class=\"pull-right-container\">\n <i class=\"fa fa-angle-left pull-right\"></i>\n </span></a>';\n\n }elseif($view->add_to_side == \"Yes\"){\n $tree .='<li class=\"treeview\" ><a href =\"'.$view->view_url.'\"><i class=\"fa fa-link\"></i>'.$view->name.'\n </span></a>';\n }\n\n if(count($view->childs)) {\n\n $tree .=$this->childView($view,$viewss);\n }\n }\n $tree .='<ul class=\"sidebar-menu\">';\n\n\n \t\t//sidebar\n\n\n\n $constraints = [\n 'member_id' => $request['member_id'],\n 'organize_id' => $request['organize_id'],\n\n 'description' => $request['description'],\n 'organize.name' => $request['organize_name'],\n\n 'persons.name' => $request['member_name']\n ];\n\n $userauths = $this->doSearchingQuery($constraints);\n $constraints['organize_name'] = $request['organize_name'];\n $constraints['member_name'] = $request['member_name'];\n\n return view('system-mgmt/organizeauth/index', ['userauths' => $userauths, 'searchingVals' => $constraints,'tree'=>$tree]);\n }", "public function viewprescriptions(){\n \n $prescriptions_table = TableRegistry::get('Prescriptions');\n $prescriptions = $prescriptions_table->find()->contain(['Users','Patients','Diagnosisreports','Labtests'])\n ->order(['creation_timestamp'=>'Desc']);\n $this->set('prescriptions', $prescriptions);\n $this->viewBuilder()->setLayout('backend');\n }", "public function index()\n {\n\n\n if(Auth::user()->type_id == 3){\n $provinces = Auth::user()->provinces;\n $countries = Auth::user()->countries;\n\n if(Auth::user()->provinces()->count() > 0){\n $polls = Poll::where('province_id', Auth::user()->provinces()->first()->id)->get();\n }else{\n $polls = null;\n }\n\n if(Auth::user()->countries()->count() > 0){\n $pollsForeign = Poll::where('country_id', Auth::user()->countries()->first()->id)->get();\n }else{\n $pollsForeign = null;\n }\n\n }else{\n $provinces = Province::orderBy('name', 'ASC')->get();\n $polls = Poll::where('country_id', 1)->where('province_id', 1);\n $pollsForeign = Poll::where('country_id', 2)->where('');\n $countries = Country::all();\n }\n\n\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n $noCoordinators = Contact::where('no_coordinator', 1)->get();\n\n return view('backend.polls.index', compact('polls', 'pollsForeign', 'noCoordinators', 'countries', 'provinces', 'not_responded', 'section', 'menuSections', 'menuLeftSections'));\n }", "function viewPatients(){\n\n $PatientType = Type::where(\"type_name\",\"Patient\")->get();\n // Complete Data of Hospital Table join with Types Table\n $hospital_data = Hospital_data::join('types', 'types.type_id', '=', 'hospital_datas.type_id')\n ->where(\"hospital_datas.type_id\",$PatientType[0]->type_id)\n ->get(['hospital_datas.*', 'types.type_name']);\n\n $rowsReturn = count($hospital_data);\n\n if($rowsReturn == 0){\n return view('labtechnician.viewPatients', ['dataFetched'=>$hospital_data, 'msg'=>'No Records Found']);\n }else{\n return view('labtechnician.viewPatients', ['dataFetched'=>$hospital_data]);\n }\n }", "protected function _checkForeignKeysRestrict() {}", "public function show($id)\n {\n $candidat = Candidat::find($id);\n $title = trans_choice('general.candidate',1).': '.($candidat->nom).' '.($candidat->prenom);\n\n //TODO réglé relation many to one\n $localite = Localite::find($candidat->localite_id);\n\n $candidatDiplomeEcoles = CandidatDiplomeEcole::select('candidat_diplome_ecole.id as cde_id',\n 'candidat_diplome_ecole.candidat_id as candidat_id',\n 'candidat_diplome_ecole.diplome_ecole_id as de_id',\n 'diplomes_ecoles.diplome_id as diplome_id',\n 'diplomes_ecoles.ecole_id as ecole_id',\n 'diplomes.code_diplome as code_diplome',\n 'diplomes.designation as designation',\n 'diplomes.finalite as finalite',\n 'diplomes.niveau as niveau',\n 'ecoles.code_ecole as code_ecole')\n ->join('diplomes_ecoles','candidat_diplome_ecole.diplome_ecole_id','=','diplomes_ecoles.id')\n ->join('diplomes','diplomes_ecoles.diplome_id','=','diplomes.id')\n ->leftJoin('ecoles','diplomes_ecoles.ecole_id','=','ecoles.id')\n ->where('candidat_id','=',$id)\n ->orderBy('designation')\n ->orderBy('niveau')\n ->get();\n\n $actualSociety = Societe::select('societes.id','nom_entreprise')\n ->join('societe_candidat','societes.id','=','societe_candidat.societe_id')\n ->where('candidat_id','=',$id)\n ->where('societe_actuelle','=',1)->get()->first();\n \n \n $lastFunction = Fonction::select('fonction', 'date_debut','date_fin') \n ->join('societe_candidat','fonctions.id','=','societe_candidat.fonction_id')\n ->where('candidat_id','=',$id)\n ->orderBy('societe_actuelle','DESC')\n ->orderBy('date_fin','DESC')\n ->get()->first();\n \n\n $societeCandidats = CandidatSociete::where('candidat_id','=',$id)\n ->orderBy('societe_actuelle','DESC')\n ->orderBy('date_fin','DESC')\n ->get();\n\n if($societeCandidats->first() && $societeCandidats->first()->societe_id == $actualSociety->id) {\n $societeCandidats->shift();\n }\n\n return view('candidats.show',[\n 'candidat'=>$candidat,\n 'title' =>$title,\n 'candidatDiplomeEcoles' => $candidatDiplomeEcoles,\n 'societeCandidats' => $societeCandidats,\n 'lastFunction' => $lastFunction,\n 'actualSociety' => $actualSociety,\n ]);\n }", "public function getIndex()\n\t{\n\t\tif (auth()->check()) {\n\t\t\t$resourceList = ResourceList::where('resource_list.reStatus', '审核通过')->where('resource_list.uid', '!=', auth()->user()->id);\n\t\t}\n\t\telse {\n\t\t\t$resourceList = ResourceList::where('resource_list.reStatus', '审核通过');\n\t\t}\n\t\t\n\t\tif (Input::get('dlTms') == 'desc') {\n\t\t\t$resourceList->orderby('resource_list.dlTms', 'desc');\n\t\t}\n\t\telseif (Input::get('dlTms') == 'asc') {\n\t\t\t$resourceList->orderby('resource_list.dlTms', 'asc');\n\t\t}\n\t\telse {\n\t\t\t$resourceList->orderby('resource_list.created_at', 'desc');\n\t\t}\n\t\tif (Input::get('action') == 'attention') \n\t\t\t$resourceList->leftJoin('res_attention_rel', 'resource_list.id', '=', 'res_attention_rel.rlid')->where('res_attention_rel.uid', auth()->user()->id)->select('resource_list.*', 'res_attention_rel.*', 'resource_list.id');\n\t\t$this->filter = \\DataFilter::source($resourceList);\n\t\t$this->filter->attributes(['class'=>'form-custom member-search mt20 mb20 clearfix']);\n\t\t$this->filter->add('coopManu')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('variety')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('cmpy')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('city')->attributes(['style'=>'display:none']);\n\t\t$this->filter->submit(trans('panel::fields.query'));\n\t\t$this->filter->build();\n\t\t\n\t\t$this->grid = \\DataGrid::source($this->filter);\n\t\t$this->setGridCommon();\n\t\t$this->grid->add('id');\n\t\t$this->grid->add('cmpy');\n\t\t$this->grid->add('contact');\n\t\t$this->grid->add('variety');\n\t\t$this->grid->add('coopManu');\n\t\t$this->grid->add('city');\n\t\t$this->grid->add('dlTms');\n\t\t$this->grid->add('annex');\n\t\t$this->grid->add('annexName');\n\t\t$this->grid->add('uid');\n\t\t$this->grid->add('isAttention');\n\t\t//$this->grid->paginate(1);\n\t\t$this->grid->row(function ($row) {\n\t\t\tif (auth()->check()) {\n\t\t\t\t$row->cell('isAttention')->value = ResAttentionRel::firstOrNew(['uid'=>auth()->user()->id, 'rlid'=>$row->cell('id')->value])->exists;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row->cell('isAttention')->value = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t$this->grid->getGrid('rapyd::datagrid_custom_resource');\n\t\t\n\t\t/*\n\t\t * 资源单地区数据\n\t\t */\n\t\t$city = ResourceArea::lists('city', 'id')->all();\n\t\t/*\n\t\t * 厂商数据\n\t\t */\n\t\t$coopManu = $this->getOptionGroupData(new CoopManu(), 'cname');\n\t\t\n\t\treturn view('fore.resource', array(\n\t\t\t\t'grid' \t => $this->grid,\n\t\t\t\t'city' \t => $city,\n\t\t\t\t'coopManu' \t => $coopManu,\n\t\t\t\t'filter' \t => $this->filter,\n\t\t\t\t'import_message' => Input::get('import_message'),\n\t\t));\n\t}", "public function participants()\n{\n $participants = DB::table('association_user_actions')->where('action_id', $this->id)->get();\n\n return $participants;\n}", "public function show($id)\n {\n $user_id = Auth::user()->id;\n\n $talk = Talks::with(['event'])->findOrFail($id);\n $participants = User::where('role_id',2)->get();\n $tags = Tag::all();\n $ratings = Rating::all();\n $user_rating = User_ratings::where('user_id',$user_id)->where('talk_id',$id)->get();\n\n $speaker_id = $talk->speaker_id;\n $recommended_talks = Talks::with(['event'])->where('speaker_id',$speaker_id)->whereJsonContains('participants',(string)$user_id)->where('id', '!=' , $id)->take(5)->get();\n\n return view('participants.show', compact('talk','participants','tags','ratings','user_rating','recommended_talks'));\n }", "public function beforeQuery()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "protected function modifyQueryForFilter()\n {\n //the following select includes the mobile number, but overrides\n //the columns with an empty string if the matching boolean is false\n $this->q->getDoctrineQuery()->addSelect(\n 'if(x.is_show_mobile_number_in_phonebook is not FALSE, x.mobile_number, \\'\\') as mobile_number'\n );\n \n if ($this->isLocationView)\n {\n //order results by location name first\n $this->q->addOrderByPrefix('UllLocation->name');\n }\n\n if (!empty($this->phoneSearchFilter))\n {\n $this->q->getDoctrineQuery()->openParenthesisBeforeLastPart();\n \n //we need special handling here because we don't want hidden\n //numbers to be searchable\n $phoneSearchFilterPattern = '%' . $this->phoneSearchFilter . '%';\n \n $this->q->getDoctrineQuery()->orWhere(\n '(is_show_extension_in_phonebook is not FALSE AND phone_extension LIKE ?) ' .\n 'OR (is_show_extension_in_phonebook is FALSE AND alternative_phone_extension LIKE ?)',\n array($phoneSearchFilterPattern, $phoneSearchFilterPattern));\n\n $this->q->orWhere('is_show_mobile_number_in_phonebook is not FALSE ' .\n 'AND mobile_number LIKE ?', $phoneSearchFilterPattern);\n \n $this->q->getDoctrineQuery()->closeParenthesis();\n }\n \n\n if (!empty($this->filter_location_id))\n {\n $this->q->addWhere('ull_location_id = ?', $this->filter_location_id);\n }\n \n //we only want users which are active and have their\n //show-in-phonebook not set to false\n $this->q->addWhere('UllUserStatus->is_active is TRUE and is_show_in_phonebook is not FALSE');\n }", "public function filterVisible(): self;", "public function searchApplicants()\n {\n $query = Channel::find();\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n // grid filtering conditions\n\n $query->andFilterWhere(['!=', 'om', Yii::$app->user->id]);\n $query->andFilterWhere(['=', 'status', 2]);\n\n return $dataProvider;\n }", "public function beforeFilter() {\n\t\t\n\t\tif($this->Auth->user('professor')==true) {\n\t\t\t$this->Ressource->Behaviors->attach('LightAuthFiltered', array('match_field'=>'creator'));\n\t\t} else {\n\t\t\t$this->Ressource->Behaviors->attach('LightAuthFiltered', array('match_field'=>'cours_id', 'auth_field'=>'cours_id'));\n\t\t}\n\t\t\n\t\tparent::beforeFilter();\n\t\t$this->Auth->authorize = 'Controller';\n\n if (isset($this->Security) && in_array($this->action, array('display'))) {\n\t\t$this->Security->validatePost = false;\n\t\t$this->Security->csrfCheck = false;\n\t}\n\n // Controller specific beforeFilter \n }", "public function userMeetings()\n\t{\n\t\t//get user session\n\t\t$currenttime = time();\n\t\t$extra_time = Configure::read('extra_meetingtime'); //done in bootstrap\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options['conditions'][] = array(\n\t\t\t\t'MeetingInfo.chat_from_course'=>$course_name,\n\t\t\t\t'MeetingInfo.chat_from_section'=>$sections_list,\n\t\t\t\t'OR'=>array('MeetingInfo.is_active' => '1', 'MeetingInfo.chat_meeting_startdate >='=> $currenttime-$extra_time)\n\t\t);\t\t\n\t\t$options['joins'][] = array(\n\t\t\t\t'table' => 'chat_meeting_users',\n\t\t\t\t'alias' => 'Meetingusers',\n\t\t\t\t'type' => 'INNER',\n\t\t\t\t'conditions'=> array('Meetingusers.chat_meeting_name = MeetingInfo.chat_meeting_name',\n\t\t\t\t\t\t'Meetingusers.to_user' => $user,\n\t\t\t\t\t\t'Meetingusers.is_accept !=' => 2)\n\t\t);\n\t\t$options['fields'] = array( 'MeetingInfo.*', 'Meetingusers.id', 'Meetingusers.is_accept' );\n\t\t$options['order'] = array('MeetingInfo.chat_meeting_startdate ASC');\n\t\t$meeting_list = $this->MeetingInfo->find('all', $options);\n\t\t$join_group_img= $this->webroot.\"img/join.png\";\n\t\t$accept_imgsrc= $this->webroot.\"img/accept.png\";\n\t\t$reject_imgsrc= $this->webroot.\"img/reject.png\";\n\t\t$detail_imgsrc= $this->webroot.\"img/meeting_detail.png\";\n\t\t$msgstr = '';\n\t\tif (count($meeting_list))\n\t\t foreach ($meeting_list as $mettings) {\n\t\t \t$meetinguser_id = $mettings['Meetingusers']['id'];\n\t\t \t$meeting_tilte = $mettings['MeetingInfo']['chat_meeting_title'];\n\t\t \t$meeting_name = $mettings['MeetingInfo']['chat_meeting_name'];\n\t\t \t$meeting_date = $mettings['MeetingInfo']['chat_meeting_startdate'];\n\t\t \t$meeting_active = $mettings['MeetingInfo']['is_active'];\n\t\t \t$is_accept = \t$mettings['Meetingusers']['is_accept'];\n\t\t \t@$meetingDetails = $this->__mettingDetail($meeting_name);\n\t\t \t$meetingUserNames = implode(', ', $meetingDetails['users']);\n\t\t\t $msgstr .= \"<li id='meeting_\".$meetinguser_id.\"'><span class='meeting_title'>\".ucfirst($meeting_tilte).\"</span>\";\n\t\t\t //if meeting is not accepted or/denied then showing the buttons for action.\n// \t\t\t if(!$is_accept)\n// \t\t\t \t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n// \t\t\t \t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n// \t\t\t \t\";\n\t\t\t //showing the join meeting from the start date time of the meeting date till 30 minuteslater.\n\t\t\t if (($meeting_date <= $currenttime || $meeting_active) && $is_accept == 1) {\n\t\t\t \t$msgstr .= \"<span class='meeting-detail' id='meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t <span class='meeting-date' style='display:none;'> Meeting @ \".date('m/d/Y h:i A', $meetingDetails['date'][0]).\"</span>\n\t\t\t\t <input type='image' class='detail-image' id='detail_meeting_\".$meetinguser_id.\"' onclick=detailMeeting('\".$meetinguser_id.\"') src='\".$detail_imgsrc.\"' title='meeting detail' alt='Detail'/></span>\n\t\t\t \t<span class='join_meeting_area'><input type='image' title='start meeting' id='joinmetting_\".$meeting_name.\"' onclick=joinmeeting('\".$meetinguser_id.\"','\".$meeting_name.\"') src='\".$join_group_img.\"' /></span>\";\n\t\t\t \tif(!$is_accept)\n\t\t\t \t\t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n\t\t\t \t\t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n\t\t\t \t\t\";\n\t\t\t\t$msgstr .= \"<div class='meeting-detail-area' id='below_meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t\t <span class='meeting-users'><b>Participants:</b> $meetingUserNames</span>\n\t\t\t \t</div>\n\t\t\t \t</li>\";\n\t\t\t } else {\n\t\t\t \t$msgstr .= \" <span class='meeting-detail' id='meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t<span class='meeting-date'> Meeting @ \".date('m/d/Y h:i A', $meetingDetails['date'][0]).\"</span>\n\t\t\t \t<input type='image' class='detail-image' id='detail_meeting_\".$meetinguser_id.\"' onclick=detailMeeting('\".$meetinguser_id.\"') src='\".$detail_imgsrc.\"' title='meeting detail' alt='Detail'/></span>\";\n\t\t\t \tif(!$is_accept)\n\t\t\t \t\t$msgstr .= \"<span class='prq_icon_meeting' id='meetingaction_\".$meetinguser_id.\"'><input type='image' src='\".$accept_imgsrc.\"' title='accept invitation' onClick=acceptMeetingInvitaion('$meetinguser_id','$meeting_name') />\n\t\t\t \t\t&nbsp;&nbsp;&nbsp;<input type='image' src='\".$reject_imgsrc.\"' title='reject invitation' onClick=rejectMeetingInvitaion('$meetinguser_id') /></span>\n\t\t\t \t\t\";\n\t\t\t \t$msgstr .= \"<div class='meeting-detail-area' id='below_meeting_detail_\".$meetinguser_id.\"'>\n\t\t\t \t<span class='meeting-users'>Participants: $meetingUserNames</span>\n\t\t\t \t</div>\n\t\t\t \t</li>\";\n\t\t\t }\n\t\t }\n\t\t \n\t\t //get current login user\n\t\t //updating the mark read for meeting users as read \n\t\t $user = $this->Session->read('UserData.userName');\n\t\t $this->MeetingUser->updateAll(\n\t\t \t\tarray('MeetingUser.is_read' => 1),\n\t\t \t\tarray('MeetingUser.to_user' => $user)\n\t\t );\n\t\t \n\t\t if ($msgstr == \"\") {\n\t\t \techo \"<span class='noresultfound'>No result found</span>\";\n\t\t \texit;\n\t\t }\n\t\t echo $msgstr;\n\t\t exit;\n\t}", "public function isUser1InConvo()\n {\n return $this->hasMany(Conversation::class, 'user_1_id', 'id');\n }", "public function show(ChatModel $chatModel)\n {\n //\n }", "public function beforeQuery()\n\t{\n\t\tif (!$this->checkPermissions()) {\n\t\t\treturn $this->modx->lexicon('access_denied');\n\t\t}\n\n\t\treturn true;\n\t}", "public function actionIndex()\n {\n if (Yii::$app->user->isGuest) return $this->redirect('/site/login');\n else {\n\n $searchModel = new RoomsSearch();\n $model = new Rooms;\n\n $countryModel = Country::find()->asArray()->all();\n $countryModel = ArrayHelper::map($countryModel, 'id', 'name');\n $districtModel = Region::find()->select(['id', 'name'])->asArray()->where(['country_id' => 1])->all();\n $districtModel = ArrayHelper::map($districtModel, 'id', 'name');\n\n\n $currentUser = Yii::$app->user->identity->username;\n $currentUserId = Yii::$app->user->identity->id;\n\n $wishListModel = Wishlist::find()->select('ads')->asArray()->where(['username' => $currentUser])->limit(1)->one();\n $notesModel = Notes::find()->select(['ads_id', 'note'])->asArray()->where(['user_id' => $currentUserId])->all();\n $arrNotes = ArrayHelper::map($notesModel, 'ads_id', 'note');\n }\n\n if (Yii::$app->request->get('Rooms')) {\n\n $dataProvider = $searchModel->filter(Yii::$app->request->get('Rooms'));\n\n if (Yii::$app->request->get('Rooms')['districtSearch']) {\n\n $cityModel = City::find()->select(['id', 'name'])->asArray()->where(['region_id' => Yii::$app->request->get('Rooms')['districtSearch']])->all();\n $cityModel = ArrayHelper::map($cityModel, 'id', 'name');\n }\n\n// if ( Yii::$app->request->get('Rooms')['citySearch'] ) {\n// $cityModel = City::find()->select(['id', 'name'])->asArray()->where( ['region_id' => Yii::$app->request->get('Rooms')['districtSearch'] ] )->all();\n// $cityModel = ArrayHelper::map($cityModel, 'id', 'name');\n// }\n\n } else {\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];\n\n }\n\n if(\\Yii::$app->request->isAjax) {\n\n if ( Yii::$app->request->post('district') ) {\n\n $districtModel = City::find()->select(['id', 'name'])->asArray()->where(['region_id' => Yii::$app->request->post('district')])->all();\n\n $str;\n foreach ($districtModel as $item) {\n $str .= $item['id'] . \":\" . $item['name'] . \",\";\n }\n }\n return $str;\n }\n\n $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'model' => $model,\n 'districtModel' => $districtModel,\n 'cityModel' => @$cityModel,\n 'wishListModel' => $wishListModel,\n 'arrNotes' => $arrNotes,\n ]);\n }", "function query() {\n // Don't filter if we're exposed and the checkbox isn't selected.\n\n if ((!empty($this->options['exposed'])) && empty($this->value)) {\n return;\n }\n if (!$this->options['exposed']) {\n $value = $this->options['uid'];\n }\n else {\n $value = $this->validated_exposed_input[0];\n }\n\n\n $this->ensure_my_table();\n\n\n $table = 'scheduling_appointments';\n //$field1 = $this->query->add_field($table, 'nid');\n //$field2 = $this->query->add_field($table, 'title');\n\n\n //$field1 = $table . '.nid';\n //$field2 = $table . '.title';\n if ($value != '') {\n $this->query->add_where(\n $this->options['group'],\n db_and()\n ->condition($table . '.uid', $value, '=')\n );\n }\n }", "public function executeShow()\r\n\t{\r\n\t\t$this->subscriber = Doctrine_Query::create()\r\n\t\t->from('User u, u.Questions q, u.Interests ui, ui.Question, u.Answers ua, ua.Question')\r\n\t\t->where('u.nickname = ?', $this->getRequestParameter('nickname'))\r\n\t\t->execute()->getFirst();\r\n\r\n\t\t$this->forward404Unless($this->subscriber);\r\n\r\n\t\t$this->questions = $this->subscriber->getQuestions();\r\n\r\n\t\t$this->interests = $this->subscriber->getInterests();\r\n\r\n\t\t$this->answers = $this->subscriber->getAnswers();\r\n\r\n\t}", "public function CleanFilter(){\n\t\t$this->_objectFilter = new Model_Aclusuariosonline();\n\t}", "function filter($request){\r\n global $context;\r\n $i= new $this->model;\r\n\r\n if(!$this->authRequired){\r\n $i->supperUser();\r\n }\r\n\r\n foreach($request->get as $key=>$value){\r\n if($i->field_exists($key)){\r\n $i->where($key,$value);\r\n }\r\n }\r\n\r\n $data=$i->get();\r\n\r\n if($request->UseApi() ){\r\n json_success(\"Success\",$data);//where(['id','<','50'])->orderBy('id','desc')->limit(2,1)->\r\n }else{\r\n return $this->view(compact('data'));\r\n }\r\n }", "public function search($params)\n {\n $query = PrivateMeeting::find()->where(['delete' => false]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination'=>[\n \"defaultPageSize\"=> isset($params[\"pagesize\"])? intval($params[\"pagesize\"]):10\n ],\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere(['like', '_id', $this->_id])\n ->andFilterWhere(['status' => $this->status]);\n\n return $dataProvider;\n }", "public function getPatientScreening() {\n\n $where = [];\n $encselect = $this->request->input(\"encselect\");\n if ($encselect && ($encselect != \"Choose ENC Type\")) {\n\n $where[\"enc_type\"] = $encselect;\n }\n $phcselect = $this->request->input(\"phcselect\");\n if ($phcselect && ($phcselect != \"Choose PHC\")) {\n $where[\"phc_name\"] = $phcselect;\n }\n\n $villageselect = $this->request->input(\"villageselect\");\n if ($villageselect && ($villageselect != \"Choose Village\")) {\n\n $where[\"vill_name\"] = $villageselect;\n }\n\n $startdate = $this->request->input(\"startdate\");\n if ($startdate) {\n $startdate = date(\"Y-m-d H:i:s\", strtotime($startdate));\n $where[\"created_date\"] = $startdate;\n }\n\n $enddate = $this->request->input(\"enddate\");\n if ($enddate) {\n $enddate = date(\"Y-m-d H:i:s\", strtotime($enddate));\n $where[\"created_date\"] = $enddate;\n }\n\n $patient_id = $this->request->input(\"patient_id\");\n if ($patient_id) {\n\n $where[\"patient_id\"] = $patient_id;\n }\n\n\n// \\DB::enableQueryLog();\n $paitents = $this->usersModel->patientScreening($where);\n $paitents = json_decode(json_encode($paitents), true);\n\n// $query = \\DB::getQueryLog();\n// $query = end($query);\n// var_dump($query);exit;\n// echo \"<pre>\";\n// print_r($households);exit;\n return $paitents;\n }", "public function showDashboard(){\n $currentUserEmail = Sentinel::getUser()[\"email\"];\n //get logged Panel Member Member ID\n $currentPanelMemberId = PanelMember::where('email',$currentUserEmail)->pluck('id');\n //get future events belongs to current panel member asc order\n $currentPanelMemberTimeLine = event_time_line::where('memberID',$currentPanelMemberId)->where('eventDate','>=',date(\"Y-m-d\"))->where('validity','1')->orderBy('eventDate', 'asc')->get();\n //get requested Supervisor Meetings belongs to current panel member\n $SupervisorMeetingRequests = event_time_line::where('memberID',$currentPanelMemberId)->where('validity','0')->get();\n //get Accepted Supervisor Meetings belongs to current panel member\n $AcceptedSupervisorMeetingRequests = event_time_line::where('memberID',$currentPanelMemberId)->where('validity','1')->get();\n //get proposal presentation time slots belong to the current panel member\n $FutureProposalTimeSlotsForCurrentPanelMember = PanelMemberController::getFutureProposalTimeSlotsForCurrentPanelMember($currentPanelMemberId);\n //get Thesis presentation time slots belong to the current panel member\n $FutureThesisTimeSlotsForCurrentPanelMember = PanelMemberController::getFutureThesisTimeSlotsForCurrentPanelMember($currentPanelMemberId);\n //add Thesis presentation time slots to array\n $thesis_array = PanelMemberController::getArrayForEvents($FutureThesisTimeSlotsForCurrentPanelMember,'thesis');\n //add Proposal presentation time slots to array\n $proposal_array = PanelMemberController::getArrayForEvents($FutureProposalTimeSlotsForCurrentPanelMember,'proposal');\n //add Thesis presentation time slots to array\n $accepted_supervisor_requests_array =PanelMemberController::getSupervisorMeetingRequests($AcceptedSupervisorMeetingRequests);\n //add Supervisor Requests to array\n $supervisor_requests_array =PanelMemberController::getSupervisorMeetingRequests($SupervisorMeetingRequests);\n //merge supervisor requests,Proposal Presentation, Thesis Presentation array into one array\n $all_events_belongs_to_current_panel_member = array_merge($thesis_array,$proposal_array,$accepted_supervisor_requests_array);//array_merge($thesis_array,$proposal_array);\n\n return view('dashboards.panel_member_dashboard',compact('currentPanelMemberTimeLine','supervisor_requests_array','all_events_belongs_to_current_panel_member'));\n }", "function beforeFind($queryData) {\n $isQueryClubSpecific = !isset($queryData['clubSpecific']) || $queryData['clubSpecific'] === true;\n if ($this->clubSpecific && $isQueryClubSpecific) {\n $key = $this->name.\".club_id\";\n\n if (!empty($queryData['conditions'])) {\n foreach($queryData['conditions'] as $condition => $value) {\n // matching conditions\n $exploded = explode(' ', $condition, 2);\n if ($exploded[0] === $key) {\n return $queryData;\n }\n }\n }\n $queryData['conditions'][$key] = Configure::read(\"Club.id\");\n }\n return $queryData;\n }", "public function create()\n {\n\n //sidebar\n $current = Auth::guard('person')->user()->id;\n // $current2 = Session::all();\n // return $current2;\n\n\n $currentmatchids = DB::table('match_id')\n\n ->where([\n [ 'member_id', '=', $current]\n\n ])\n ->pluck('id');\n $currentmatchids = $currentmatchids->toArray();\n $currentpidgroups = DB::table('match_pid_groups')\n\n ->where([\n [ 'p_id', '=', $currentmatchids]\n\n ])\n ->pluck('pid_group_id');\n\n $currentusergroups = DB::table('match_member_groups')\n\n ->where([\n [ 'member_id', '=', $current]\n\n ])\n ->pluck('member_group_id');\n $currentorg = DB::table('persons')->where('id',$current)->where('type',2)->pluck('id');\n $currentfamily = DB::table('family_auths')\n\n ->where([\n [ 'member_id', '=', $current],\n\n ])\n ->where('status','=','Accept')\n ->pluck('family_id');\n\n\n\n\n //$notebook = $this->getArrayAlldBlock($currentstruc,$currentid,$notebook);\n $currents = DB::table('persons')->where('id',$current)->pluck('id');\n\n $matchviews = DB::table('match_views_mem as m')\n ->leftJoin('views_mem', 'm.view_id', '=', 'views_mem.id')\n\n\n\n\n\n\n\n ->orwhereIn(\n 'pid_groups.id',$currentpidgroups\n )\n ->orwhereIn(\n 'member_groups.id',$currentusergroups\n )\n ->orwhereIn(\n 'm.org_id',$currentorg\n )\n ->orwhereIn(\n 'm.member_id',$currents\n )\n ->orwhereIn(\n 'm.group_id',$currentfamily\n )\n ->orwhere(\n 'm.all_member','=','Yes'\n )\n\n\n ->leftJoin('member_groups', 'm.member_group_id', '=', 'member_groups.id')\n\n ->leftJoin('pid_groups', 'm.pid_group_id', '=', 'pid_groups.id')\n\n ->select('m.*','m.id', 'views_mem.name as view_name', 'views_mem.id as view_id',\n 'pid_groups.name as pid_group_name', 'pid_groups.id as pid_group_id','member_groups.name as member_group_name', 'member_groups.id as member_group_id')\n ->pluck('view_id');\n\n\n $views = Viewper::whereIn('id',$matchviews )\n ->where('belong_to','=',NULL )->get();\n $viewss = Viewper::whereIn('id',$matchviews )\n ->pluck('id');\n $viewss =$viewss->toArray();\n $tree='<li class=\"treeview\"></li>';\n foreach ($views as $view) {\n\n if(count($view->childs) &&in_array($view->id, $viewss)&& $view->add_to_side == \"Yes\"){\n $tree .='<li class=\"treeview\" ><a href =\"'.$view->view_url.'\"><i class=\"fa fa-link\"></i>'.$view->name.' <span class=\"pull-right-container\">\n <i class=\"fa fa-angle-left pull-right\"></i>\n </span></a>';\n\n }elseif($view->add_to_side == \"Yes\"){\n $tree .='<li class=\"treeview\" ><a href =\"'.$view->view_url.'\"><i class=\"fa fa-link\"></i>'.$view->name.'\n </span></a>';\n }\n\n if(count($view->childs)) {\n\n $tree .=$this->childView($view,$viewss);\n }\n }\n $tree .='<ul class=\"sidebar-menu\">';\n\n\n\n //sidebar\n\n\n\n\n\n\n\n // $structures = Organize::where('created_by','=',$current)->get();\n //return $structures;\n $structures = Portfolio::where('member_id' ,'=', $current)->get();\n\n $users = Person::all();\n\n return view('system-mgmt/portauth/create', ['structures' => $structures, 'users' => $users,'tree' =>$tree]);\n\n }", "public function initialize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"hotel_id\");\n $this->hasMany(\"id\", \"HotelRoom\", \"hotel_id\");\n $this->belongsTo(\"city_id\", \"City\", \"id\");\n $this->belongsTo(\"province_id\", \"Province\", \"id\");\n $this->belongsTo(\"country_id\", \"Country\", \"id\");\n\n }", "public function listperiods()\n {\n if (!Gate::allows('Administrator')) return redirect('/home')->with('warning', __('Somehow you the system tried to let you do something which is not allowed. So you are sent home!'));\n $year = Carbon::now()->year;\n $search = Input::all();\n $models = Periodcontract::filter(Input::all())->orderBy('from')->whereDate('from', '>', Carbon::createFromDate($year,1,1))->with('house')->paginate(26);\n $houses = ['' => __('Please select house')] + House::filter(Input::all())->pluck('name', 'id')->toArray();\n\n $fields = ['from', 'to'];\n return view('house/listperiods', ['models' => $models, 'fields' => $fields, 'houses' => $houses, 'search' => $search]);\n }", "public function activities(){\n return $this->belongsToMany('App\\Models\\ActivitySpeaker', 'activity_id', 'speaker_id');\n }", "public function initialize()\r\n {\r\n $this->belongsTo('encuesta_personalId', 'Personal', 'personal_id', array('alias' => 'Personal'));\r\n $this->belongsTo('encuesta_alojamientoId', 'Alojamiento', 'alojamiento_id', array('alias' => 'Alojamiento'));\r\n $this->belongsTo('encuesta_recepcionId', 'Recepcion', 'recepcion_id', array('alias' => 'Recepcion'));\r\n $this->belongsTo('encuesta_unidadId', 'Unidad', 'unidad_id', array('alias' => 'Unidad'));\r\n $this->belongsTo('encuesta_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\r\n $this->belongsTo('encuesta_sorteoId', 'Sorteo', 'sorteo_id', array('alias' => 'Sorteo'));\r\n }", "public function initialize()\n {\n $this->hasMany('id', 'GroupProfile', 'media_id', array('alias' => 'GroupProfile'));\n $this->belongsTo('profile_id', 'Profile', 'id', array('alias' => 'Profile'));\n $this->belongsTo('evenement_id', 'Event', 'id', array('alias' => 'Event'));\n }", "public function getAllConferences() : array {\n $query='SELECT * FROM Publication WHERE categorie_id=2 ORDER BY ID;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function houseAuction($request)\r\n { \r\n // GET \r\n $filters = $request->get('_filter');\r\n \r\n $selectedDate = $this->selectedDate($request);\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n $house = $em->getRepository('AppBundle:HouseAuction')->createQueryBuilder('ha');\r\n $house->select('ha.id, ha.city, ha.image, ha.addDate, ha.startDate, ha.approved, ha.status')\r\n ->join('ha.langs', 'hal')->addSelect('hal.title, hal.description')\r\n ->join('hal.lang', 'lang')->addSelect('lang.shortcut, lang.enabled')\r\n ->andWhere('ha.approved = :approved')\r\n ->andWhere('lang.shortcut= :shortcut')\r\n ->andWhere('ha.status IN(0,1)')\r\n ->setParameter(':approved', 1)\r\n ->setParameter(':shortcut', $request->getLocale()); \r\n \r\n if(empty($filters['type']) and empty($filters['city']) and empty($filters['time'])) {\r\n $house ->getQuery()->getResult(); \r\n \r\n return $house->getQuery()->getResult();\r\n } elseif(!empty($filters['type']) and empty($filters['city']) and empty($filters['time'])) {\r\n if($filters['type'] == 16 || $filters['type'] == 17) {\r\n $house ->getQuery()->getResult(); \r\n \r\n return $house->getQuery()->getResult();\r\n } else {\r\n return false;\r\n } \r\n\r\n } elseif(empty($filters['type']) and !empty($filters['city']) and empty($filters['time']) ) {\r\n $house->andWhere('ha.city = :city')\r\n ->setParameter(':city', $filters['city']);\r\n $house ->getQuery()->getResult(); \r\n \r\n return $house->getQuery()->getResult();\r\n \r\n } elseif(empty($filters['type']) and empty($filters['city']) and !empty($filters['time']) ) {\r\n $house ->getQuery()->getResult(); \r\n \r\n return $house->getQuery()->getResult();\r\n } elseif(!empty($filters['type']) and !empty($filters['city']) and empty($filters['time']) ) {\r\n if($filters['type'] == 16 || $filters['type'] == 17) {\r\n $house->andWhere('ha.city = :city')\r\n ->setParameter(':city', $filters['city']);\r\n $house ->getQuery()->getResult(); \r\n return $house->getQuery()->getResult(); \r\n } else {\r\n return false;\r\n } \r\n \r\n } elseif(!empty($filters['type']) and empty($filters['city']) and !empty($filters['time']) ) {\r\n if($filters['type'] == 16 || $filters['type'] == 17) {\r\n $house ->getQuery()->getResult(); \r\n return $house->getQuery()->getResult(); \r\n } else {\r\n return false;\r\n } \r\n } elseif(empty($filters['type']) and !empty($filters['city']) and !empty($filters['time']) ) { \r\n $house->andWhere('ha.city = :city')\r\n ->setParameter(':city', $filters['city']);\r\n $house ->getQuery()->getResult(); \r\n return $house->getQuery()->getResult(); \r\n \r\n } elseif(!empty($filters['type']) and !empty($filters['city']) and !empty($filters['time']) ) {\r\n if($filters['type'] == 16 || $filters['type'] == 17) {\r\n $house->andWhere('ha.city = :city')\r\n ->setParameter(':city', $filters['city']);\r\n $house ->getQuery()->getResult(); \r\n return $house->getQuery()->getResult(); \r\n } else {\r\n return false;\r\n } \r\n }\r\n \r\n return false; \r\n \r\n \r\n \r\n// if(empty($filters['type']) and empty($filters['city']) and empty($filters['time'])) {\r\n// \r\n// } elseif(!empty($filters['type']) and empty($filters['city']) and empty($filters['time']) ) {\r\n// \r\n// } elseif(empty($filters['type']) and !empty($filters['city']) and empty($filters['time']) ) {\r\n// \r\n// } elseif(empty($filters['type']) and empty($filters['city']) and !empty($filters['time']) ) {\r\n// \r\n// } elseif(!empty($filters['type']) and !empty($filters['city']) and empty($filters['time']) ) {\r\n// \r\n// } elseif(!empty($filters['type']) and empty($filters['city']) and !empty($filters['time']) ) {\r\n// \r\n// } elseif(empty($filters['type']) and !empty($filters['city']) and !empty($filters['time']) ) {\r\n// \r\n// } elseif(!empty($filters['type']) and !empty($filters['city']) and !empty($filters['time']) ) {\r\n// \r\n// }\r\n \r\n }", "public function fetchData()\n {\n $invoice = InvoiceAppointment::leftjoin('appointments as appt','appt.id','invoice_appointment.detail_id')\n ->leftjoin('appointment_status as appt_stat','appt_stat.appt_id','invoice_appointment.detail_id')\n ->where(fn($query) => $query\n ->where( 'appt.name', 'like', '%' . $this->search . '%')\n ->orWhere('invoice_appointment.total', 'like', '%' . $this->search . '%')\n )\n ->orderBy($this->sortBy, $this->sortDirection)\n ->paginate($this->perPage);\n $this->invappt = $invoice;\n\n /*For notifications*/\n $appoint = Appointment::leftjoin('appointment_status as apts','apts.appt_id','appointments.id')\n ->where('apts.status','Pending')\n ->latest()->get();\n $this->appt = $appoint;\n }", "public function loadMemberData (Request $request){\n\n if(!(($request->companyId)&&($request->email))){\n return response()->json([\n 'message' => 'We can \\'t find members',\n 'status' =>false,\n ], 200);\n }elseif(($request->companyId)&&($request->email)){\n\n $update_compnay_updated_at = array(\n 'updated_at' => date('Y-m-d H:i:s', time())\n );\n Company::where('id', $request->companyId)\n ->update($update_compnay_updated_at);\n \n //$loggedUserEmail = $request->email;\n $loggedUserEmail = $this->clearEmail($request->email);\n $loggedUserId = User::where('email', $loggedUserEmail)->value('id');\n $createdUserId = Company::where('id', $request->companyId)->value('created_by');\n\n $companyInfo = Company::where('id', $request->companyId)->first();\n $incoDate = $companyInfo->incorporation_at;\n $companyType = $this->settings($companyInfo->type_id,'id');\n\n if($companyType->key == 'COMPANY_TYPE_OVERSEAS' || $companyType->key == 'COMPANY_TYPE_OFFSHORE') {\n\n return response()->json([\n 'message' => 'company type not allowed.',\n 'status' =>false,\n 'data' => array(\n 'companytypeValid' => false\n ),\n \n ], 200);\n \n }\n\n $inArray1 = array(\n $this->settings('DERECTOR', 'key')->id,\n $this->settings('SECRETARY', 'key')->id\n );\n \n \n $membs = CompanyMember::leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.company_id',$request->companyId)\n ->where('company_members.email',$loggedUserEmail)\n ->where('company_members.status', '=', $this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->whereIn('company_members.designation_type', $inArray1)\n ->get();\n \n $membfirms = CompanyFirms::leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.company_id',$request->companyId)\n ->where('company_member_firms.email',$loggedUserEmail)\n ->where('company_member_firms.status', '=', $this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->where('company_member_firms.type_id', $this->settings('SECRETARY','key')->id)\n ->get();\n \n if( !( (count($membs) > 0) || (count($membfirms) > 0) ) ) {\n return response()->json([\n 'message' => 'Invalid Profile for this company.',\n 'status' =>false,\n 'data' => array(\n 'createrValid' => false\n ),\n \n ], 200);\n }\n\n // if($loggedUserId === $createdUserId){\n if(true){\n $changeRequestID = '';\n $changeRequest = CompanyChangeRequestItem::where('company_id', $request->companyId)\n ->where('request_type', $this->settings('DIRECTOR_SECRETORY_CHANGE','key')->id)\n ->whereNotIn('status', array(\n $this->settings('COMPANY_CHANGE_APPROVED','key')->id,\n $this->settings('COMPANY_CHANGE_REJECTED','key')->id,\n \n \n ) \n )\n ->first();\n if(!isset($changeRequest->id)){\n $createChangeReqItem = new CompanyChangeRequestItem();\n $createChangeReqItem->company_id = $request->companyId;\n $createChangeReqItem->request_by = $loggedUserId;\n $createChangeReqItem->request_type = $this->settings('DIRECTOR_SECRETORY_CHANGE','key')->id;\n $createChangeReqItem->status = $this->settings('COMPANY_CHANGE_PROCESSING','key')->id;\n $createChangeReqItem->save();\n $changeRequestID = $createChangeReqItem->id;\n }else{\n $changeRequestID = CompanyChangeRequestItem::where('company_id', $request->companyId)\n ->where('request_type', $this->settings('DIRECTOR_SECRETORY_CHANGE','key')->id)\n ->whereNotIn('status', array(\n $this->settings('COMPANY_CHANGE_APPROVED','key')->id,\n $this->settings('COMPANY_CHANGE_REJECTED','key')->id,\n \n \n ) \n )\n ->value('id');\n } \n\n $requestInfo = CompanyChangeRequestItem::where('company_id', $request->companyId)\n ->where('request_type', $this->settings('DIRECTOR_SECRETORY_CHANGE','key')->id)\n ->whereNotIn('status', array(\n $this->settings('COMPANY_CHANGE_APPROVED','key')->id,\n $this->settings('COMPANY_CHANGE_REJECTED','key')->id,\n \n \n ) \n )->first();\n \n if($requestInfo->status == $this->settings('COMPANY_CHANGE_RESUBMISSION','key')->id){\n $changeRequest = CompanyChangeRequestItem::leftJoin('settings','company_change_requests.signed_by_table_type','=','settings.id')->where('company_change_requests.id',$changeRequestID)->get(['company_change_requests.signed_by','settings.key as tableType']);\n $signedby = $changeRequest[0]['signed_by'];\n $signedbytype = $changeRequest[0]['tableType'];\n }\n else{\n $signedby = null;\n $signedbytype = null;\n } \n \n \n\n $directorList = CompanyMember::where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('DERECTOR','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get();\n\n $secretaryList = CompanyMember::where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get();\n\n $secretaryFirmList = CompanyFirms::where('company_id',$request->companyId)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where('status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get();\n\n $oldDirectorList = CompanyMember::where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('DERECTOR','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // }) \n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n // ->get(['id','first_name','last_name','email']);\n //->whereIn('ceased_reason', [null,''])\n\n $oldSecretaryList = CompanyMember::where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // })\n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n // ->get(['id','first_name','last_name','email']);\n\n $oldSecretaryFirmList = CompanyFirms::where('company_id',$request->companyId)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // })\n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n // ->get(['id','name']);\n\n\n ////////////// signed by array bulding ////////////////////////// \n \n\n $oldMemberList = CompanyMember::where('company_id',$request->companyId)\n ->where('designation_type','!=',$this->settings('SHAREHOLDER','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // }) \n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n $oldSecretaryfirmList = CompanyFirms::where('company_id',$request->companyId)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n // ->where(function ($query) {\n // $query->where('ceased_reason', '=', '')\n // ->orWhere('ceased_reason', '=', NULL);\n // })\n ->where('status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get();\n\n $newMembers = CompanyMember::leftJoin('addresses','company_members.address_id','=','addresses.id')\n ->leftJoin('settings','company_members.designation_type','=','settings.id')\n ->where('company_members.company_id',$request->companyId)\n ->where('company_members.designation_type','!=',$this->settings('SHAREHOLDER','key')->id)\n ->where('company_members.status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get(['company_members.id','company_members.first_name','company_members.last_name','company_members.designation_type','company_members.email','company_members.date_of_appointment','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n\n $newMemberFirms = CompanyFirms::leftJoin('addresses','company_member_firms.address_id','=','addresses.id')\n ->leftJoin('settings','company_member_firms.type_id','=','settings.id')\n ->where('company_member_firms.company_id',$request->companyId)\n ->where('company_member_firms.type_id','!=',$this->settings('SHAREHOLDER','key')->id)\n ->where('company_member_firms.status',$this->settings('COMMON_STATUS_PENDING','key')->id)\n ->get(['company_member_firms.id','company_member_firms.name','company_member_firms.email','company_member_firms.date_of_appointment','addresses.address1 as address1','addresses.address2 as address2','addresses.city as city','settings.value as value']);\n \n \n $date = array();\n\n // foreach ($newMembers as $key => $value) {\n // $date[] = [\n // \"id\" => $value->id,\n // \"_id\" => $value->id .'-'. 0,\n // 'type' => 0,\n // \"title\" => $value->title,\n // \"first_name\" => $value->first_name,\n // \"name\" => $value->first_name .' '. $value->last_name,\n // \"last_name\" => $value->last_name,\n // \"designation\" => ($value->designation_type == $this->settings('SECRETARY','key')->id) ? 'Secretary' : 'Director',\n // ];\n // }\n \n // foreach ($newMemberFirms as $key => $value) {\n // $date[] = [\n // \"id\" => $value->id,\n // \"_id\" => $value->id .'-'. 1,\n // 'type' => 1,\n // \"title\" => '',\n // \"first_name\" => $value->name,\n // \"name\" => $value->name,\n // \"last_name\" => '',\n // \"designation\" => 'Secretary Firm',\n // ];\n // }\n\n foreach($oldMemberList as $member){\n\n $isMemberEdited = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('old_record_id',$member['id'])\n ->first();\n\n $isMemberDeleted = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('item_id',$member['id'])\n ->first(); \n // $directorID = $director['id'];\n // $newdirectorID = null;\n // $isdeleted = null;\n\n if($isMemberEdited){\n\n $newEditedMember = CompanyMember::where('id',$isMemberEdited->item_id)\n ->where('company_id',$request->companyId)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $member = $newEditedMember;\n\n // $directorID = $isDirectorEdited->old_record_id;\n // $newdirectorID = $newEditedDirector->id; \n\n }\n if($isMemberDeleted){\n\n continue; \n\n }\n \n \n $address ='';\n $forAddress = '';\n if( $member->address_id) {\n $address = Address::where('id',$member->address_id)->first();\n }\n if( $member->foreign_address_id) {\n $forAddress = Address::where('id', $member->foreign_address_id)->first();\n }\n\n \n\n $date[] = [\n \"id\" => $member->id,\n \"_id\" => $member->id .'-'. 0,\n 'type' => 0,\n \"title\" => $member->title,\n \"first_name\" => $member->first_name,\n \"name\" => $member->first_name .' '. $member->last_name,\n \"last_name\" => $member->last_name,\n \"designation\" => ($member->designation_type == $this->settings('SECRETARY','key')->id) ? 'Secretary' : 'Director',\n ];\n }\n foreach($oldSecretaryfirmList as $sec){\n $isSecEdited = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('old_record_id',$sec['id'])\n ->first();\n $isSecDeleted = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('item_id',$sec['id'])\n ->first(); \n\n // $secID = $sec['id'];\n // $newsecID = null;\n // $isdeleted = null;\n\n if($isSecEdited){\n\n $newEditedSec = CompanyFirms::where('id',$isSecEdited->item_id)\n ->where('company_id',$request->companyId)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $sec = $newEditedSec;\n\n // $secID = $isSecEdited->old_record_id;\n // $newsecID = $newEditedSec->id; \n\n }\n if($isSecDeleted){\n\n continue; \n\n }\n\n \n\n $address_id = $sec->foreign_address_id ? $sec->foreign_address_id : $sec->address_id;\n if(!$sec->foreign_address_id){\n $address = Address::where('id',$address_id)->first();\n }else{\n $address = Address::where('id',$address_id)->first();\n }\n\n $date[] = [\n \"id\" => $sec->id,\n \"_id\" => $sec->id .'-'. 1,\n 'type' => 1,\n \"title\" => '',\n \"first_name\" => $sec->name,\n \"name\" => $sec->name,\n \"last_name\" => '',\n \"designation\" => 'Secretary Firm',\n ];\n } \n \n ///// signed by array bulding end //////////////////////// \n\n $company_info = Company::where('id',$request->companyId)->first();\n $companyType = $this->settings($company_info->type_id,'id');\n $dir_count = 0;\n $director_as_sh_count =0;\n $director_as_sec_count = 0;\n $directors = array();\n $olddirectors = array();\n\n foreach($oldDirectorList as $director){\n\n $isDirectorEdited = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('old_record_id',$director['id'])\n ->first();\n\n $isDirectorDeleted = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('item_id',$director['id'])\n ->first(); \n $directorID = $director['id'];\n $newdirectorID = null;\n $isdeleted = null;\n if($isDirectorEdited){\n\n $newEditedDirector = CompanyMember::where('id',$isDirectorEdited->item_id)\n ->where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('DERECTOR','key')->id)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $director = $newEditedDirector;\n $directorID = $isDirectorEdited->old_record_id;\n $newdirectorID = $newEditedDirector->id; \n\n }\n if($isDirectorDeleted){\n\n $isdeleted = true; \n\n } \n $dir_count++; \n $director_nic_or_pass = ($director->is_srilankan =='yes') ? $director->nic : $director->passport_no;\n $director_nic_or_pass_field = ($director->is_srilankan =='yes') ? 'nic' : 'passport_no';\n \n //director as a secrotory list\n $directors_as_sec = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where($director_nic_or_pass_field,$director_nic_or_pass)\n ->get()\n ->count(); \n if($directors_as_sec){\n $director_as_sec_count ++;\n } \n \n //director as a shareholder list\n $directors_as_sh = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SHAREHOLDER','key')->id)\n ->where('is_beneficial_owner','no')\n ->where($director_nic_or_pass_field,$director_nic_or_pass)\n ->get()\n ->count();\n \n if($directors_as_sh){\n $director_as_sh_count ++;\n } \n $address ='';\n $forAddress = '';\n if( $director->address_id) {\n $address = Address::where('id',$director->address_id)->first();\n }\n if( $director->foreign_address_id) {\n $forAddress = Address::where('id', $director->foreign_address_id)->first();\n } \n $can_director_as_sec = true;\n $sec_reg_no = '';\n \n if( $director->nic && ( $companyType->key =='COMPANY_TYPE_PUBLIC' || $companyType->key =='COMPANY_TYPE_GUARANTEE_32' || $companyType->key =='COMPANY_TYPE_GUARANTEE_34' )) { \n \n $members_sec_nic_lower =Secretary::where('nic', strtolower($director->nic))->first();\n $members_sec_nic_lowercount = Secretary::where('nic', strtolower($director->nic))->count(); \n $members_sec_nic_upper =Secretary::where('nic', strtoupper($director->nic))->first();\n $members_sec_nic_uppercount = Secretary::where('nic',strtoupper($director->nic))->count(); \n $members_sec = ($members_sec_nic_lowercount ) ? $members_sec_nic_lower : $members_sec_nic_upper; \n $sec_reg_no = isset($members_sec->certificate_no) && $members_sec->certificate_no ? $members_sec->certificate_no : '';\n $can_director_as_sec = ($sec_reg_no) ? true : false;\n } \n $rec = array(\n 'id' => $directorID,\n 'newid' => $newdirectorID,\n 'isdeleted' => $isdeleted,\n 'type' => ($director->is_srilankan =='yes' ) ? 'local' : 'foreign', \n 'firstname' => $director->first_name,\n 'lastname' => $director->last_name,\n 'title' => $director->title, \n 'province' => ( isset($address->province) && $address->province) ? $address->province : '',\n 'district' => ( isset($address->district) && $address->district) ? $address->district : '',\n 'city' => ( isset($address->city) && $address->city) ? $address->city : '',\n 'localAddress1' => ( isset($address->address1) && $address->address1) ? $address->address1 : '',\n 'localAddress2' => ( isset($address->address2) && $address->address2) ? $address->address2 : '',\n 'postcode' => (isset($address->postcode) && $address->postcode) ? $address->postcode : '', \n 'forProvince' => ( isset($forAddress->province) && $forAddress->province) ? $forAddress->province : '',\n 'forCity' => ( isset($forAddress->city) && $forAddress->city) ? $forAddress->city : '',\n 'forAddress1' => ( isset($forAddress->address1) && $forAddress->address1) ? $forAddress->address1 : '',\n 'forAddress2' => ( isset($forAddress->address2) && $forAddress->address2) ? $forAddress->address2 : '',\n 'forPostcode' => (isset($forAddress->postcode) && $forAddress->postcode) ? $forAddress->postcode : '', \n 'nic' => $director->nic,\n 'passport' => $director->passport_no,\n // 'country' =>($address->country) ? $address->country : '',\n 'country' => ( $director->foreign_address_id) ? $forAddress->country : $address->country,\n 'passport_issued_country' => $director->passport_issued_country,\n // 'share' => $director->no_of_shares, \n 'date' => '1970-01-01' == $director->date_of_appointment ? null : $director->date_of_appointment,\n 'changedate' => '1970-01-01' == $director->date_of_change ? null : $director->date_of_change,\n 'phone' => $director->telephone,\n 'mobile' => $director->mobile,\n 'email' => $director->email,\n 'occupation' => $director->occupation,\n 'directors_as_sec' =>$directors_as_sec,\n 'directors_as_sh' => $directors_as_sh,\n 'can_director_as_sec' => $can_director_as_sec,\n 'secRegDate' => $sec_reg_no \n );\n $olddirectors[] = $rec;\n }\n foreach($directorList as $director){ \n $dir_count++; \n $director_nic_or_pass = ($director->is_srilankan =='yes') ? $director->nic : $director->passport_no;\n $director_nic_or_pass_field = ($director->is_srilankan =='yes') ? 'nic' : 'passport_no';\n \n //director as a secrotory list\n $directors_as_sec = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where($director_nic_or_pass_field,$director_nic_or_pass)\n ->get()\n ->count(); \n if($directors_as_sec){\n $director_as_sec_count ++;\n } \n \n //director as a shareholder list\n $directors_as_sh = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SHAREHOLDER','key')->id)\n ->where('is_beneficial_owner','no')\n ->where($director_nic_or_pass_field,$director_nic_or_pass)\n ->get()\n ->count();\n \n if($directors_as_sh){\n $director_as_sh_count ++;\n } \n $address ='';\n $forAddress = '';\n if( $director->address_id) {\n $address = Address::where('id',$director->address_id)->first();\n }\n if( $director->foreign_address_id) {\n $forAddress = Address::where('id', $director->foreign_address_id)->first();\n } \n $can_director_as_sec = true;\n $sec_reg_no = '';\n \n if( $director->nic && ( $companyType->key =='COMPANY_TYPE_PUBLIC' || $companyType->key =='COMPANY_TYPE_GUARANTEE_32' || $companyType->key =='COMPANY_TYPE_GUARANTEE_34' )) { \n \n $members_sec_nic_lower =Secretary::where('nic', strtolower($director->nic))->first();\n $members_sec_nic_lowercount = Secretary::where('nic', strtolower($director->nic))->count(); \n $members_sec_nic_upper =Secretary::where('nic', strtoupper($director->nic))->first();\n $members_sec_nic_uppercount = Secretary::where('nic',strtoupper($director->nic))->count(); \n $members_sec = ($members_sec_nic_lowercount ) ? $members_sec_nic_lower : $members_sec_nic_upper; \n $sec_reg_no = isset($members_sec->certificate_no) && $members_sec->certificate_no ? $members_sec->certificate_no : '';\n $can_director_as_sec = ($sec_reg_no) ? true : false;\n } \n $rec = array(\n 'id' => $director['id'],\n 'type' => ($director->is_srilankan =='yes' ) ? 'local' : 'foreign', \n 'firstname' => $director->first_name,\n 'lastname' => $director->last_name,\n 'title' => $director->title, \n 'province' => ( isset($address->province) && $address->province) ? $address->province : '',\n 'district' => ( isset($address->district) && $address->district) ? $address->district : '',\n 'city' => ( isset($address->city) && $address->city) ? $address->city : '',\n 'localAddress1' => ( isset($address->address1) && $address->address1) ? $address->address1 : '',\n 'localAddress2' => ( isset($address->address2) && $address->address2) ? $address->address2 : '',\n 'postcode' => (isset($address->postcode) && $address->postcode) ? $address->postcode : '', \n 'forProvince' => ( isset($forAddress->province) && $forAddress->province) ? $forAddress->province : '',\n 'forCity' => ( isset($forAddress->city) && $forAddress->city) ? $forAddress->city : '',\n 'forAddress1' => ( isset($forAddress->address1) && $forAddress->address1) ? $forAddress->address1 : '',\n 'forAddress2' => ( isset($forAddress->address2) && $forAddress->address2) ? $forAddress->address2 : '',\n 'forPostcode' => (isset($forAddress->postcode) && $forAddress->postcode) ? $forAddress->postcode : '', \n 'nic' => $director->nic,\n 'passport' => $director->passport_no,\n // 'country' =>($address->country) ? $address->country : '',\n 'country' => ( $director->foreign_address_id) ? $forAddress->country : $address->country,\n 'passport_issued_country' => $director->passport_issued_country,\n // 'share' => $director->no_of_shares, \n 'date' => '1970-01-01' == $director->date_of_appointment ? null : $director->date_of_appointment,\n 'phone' => $director->telephone,\n 'mobile' => $director->mobile,\n 'email' => $director->email,\n 'occupation' => $director->occupation,\n 'directors_as_sec' =>$directors_as_sec,\n 'directors_as_sh' => $directors_as_sh,\n 'can_director_as_sec' => $can_director_as_sec,\n 'secRegDate' => $sec_reg_no \n );\n $directors[] = $rec;\n }\n $sec_count =0;\n $secs = array();\n $oldsecs = array();\n\n foreach($oldSecretaryList as $sec){\n $isSecEdited = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('old_record_id',$sec['id'])\n ->first();\n $isSecDeleted = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBERS','key')->id)\n ->where('item_id',$sec['id'])\n ->first(); \n $secID = $sec['id'];\n $newsecID = null;\n $isdeleted = null;\n if($isSecEdited){\n\n $newEditedSec = CompanyMember::where('id',$isSecEdited->item_id)\n ->where('company_id',$request->companyId)\n ->where('designation_type',$this->settings('SECRETARY','key')->id)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $sec = $newEditedSec;\n $secID = $isSecEdited->old_record_id;\n $newsecID = $newEditedSec->id; \n\n }\n if($isSecDeleted){\n\n $isdeleted = true; \n\n }\n\n $sec_nic_or_pass = ($sec->is_srilankan =='yes') ? $sec->nic : $sec->passport_no;\n $sec_nic_or_pass_field = ($sec->is_srilankan =='yes') ? 'nic' : 'passport_no'; \n $sec_as_sh = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SHAREHOLDER','key')->id)\n ->where('nic',$sec->nic)\n ->whereNull('company_member_firm_id' )\n ->get();\n $sec_as_sh_count = $sec_as_sh->count();\n $sec_sh_comes_from_director = false;\n $sec_count ++; \n $address ='';\n $forAddress = '';\n if( $sec->address_id) {\n $address = Address::where('id',$sec->address_id)->first();\n }\n if( $sec->foreign_address_id) {\n $forAddress = Address::where('id', $sec->foreign_address_id)->first();\n } \n $firm_info = array();\n if($sec->company_member_firm_id){\n $firm_info = CompanyFirms::where('id',$sec->company_member_firm_id)->first(); \n $firm_address = Address::where('id', $firm_info->address_id)->first(); \n $firm_info['address']=$firm_address; \n } \n $rec = array(\n 'id' => $secID,\n 'newid' => $newsecID,\n 'isdeleted' => $isdeleted,\n 'type' => ($sec->is_srilankan =='yes' ) ? 'local' : 'foreign',\n 'firstname' => $sec->first_name,\n 'lastname' => $sec->last_name,\n 'title' => $sec->title,\n 'province' => ( isset($address->province) && $address->province) ? $address->province : '',\n 'district' => ( isset($address->district) && $address->district) ? $address->district : '',\n 'city' => ( isset($address->city) && $address->city) ? $address->city : '',\n 'localAddress1' => ( isset($address->address1) && $address->address1) ? $address->address1 : '',\n 'localAddress2' => ( isset($address->address2) && $address->address2) ? $address->address2 : '',\n 'postcode' => (isset($address->postcode) && $address->postcode) ? $address->postcode : '',\n 'forProvince' => ( isset($forAddress->province) && $forAddress->province) ? $forAddress->province : '',\n 'forCity' => ( isset($forAddress->city) && $forAddress->city) ? $forAddress->city : '',\n 'forAddress1' => ( isset($forAddress->address1) && $forAddress->address1) ? $forAddress->address1 : '',\n 'forAddress2' => ( isset($forAddress->address2) && $forAddress->address2) ? $forAddress->address2 : '',\n 'forPostcode' => (isset($forAddress->postcode) && $forAddress->postcode) ? $forAddress->postcode : '',\n 'nic' => $sec->nic,\n 'passport' => $sec->passport_no,\n // 'country' =>($address->country) ? $address->country : '',\n 'country' => ( $sec->foreign_address_id && isset( $forAddress->country) ) ? $forAddress->country : $address->country,\n // 'country' => ( $sec->foreign_address_id && isset( $forAddress->country) ) ? 'test' : 'fail',\n 'passport_issued_country' => $sec->passport_issued_country,\n //'share' =>0,\n 'date' => '1970-01-01' == $sec->date_of_appointment ? null : $sec->date_of_appointment,\n 'changedate' => '1970-01-01' == $sec->date_of_change ? null : $sec->date_of_change,\n 'isReg' => ($sec->is_registered_secretary =='yes') ? true :false,\n 'regDate' => ($sec->is_registered_secretary =='yes' || $companyType->key =='COMPANY_TYPE_PUBLIC' ) ? $sec->secretary_registration_no :'',\n 'phone' => $sec->telephone,\n 'mobile' => $sec->mobile,\n 'email' => $sec->email,\n 'occupation' => $sec->occupation,\n // 'secType' => ( $sec->is_natural_person == 'yes') ? 'natural' : 'firm',\n 'secType' => 'natural',\n 'secCompanyFirmId' => $sec->company_member_firm_id,\n 'sec_as_sh' => $sec_as_sh_count,\n 'sec_sh_comes_from_director' => $sec_sh_comes_from_director,\n 'firm_info' =>$firm_info,\n 'pvNumber' => ($sec->company_member_firm_id) ? $firm_info['registration_no'] : '',\n 'firm_name' => ($sec->company_member_firm_id) ? $firm_info['name'] : '',\n 'firm_province' => ($sec->company_member_firm_id) ? $firm_address['province'] : '',\n 'firm_district' => ($sec->company_member_firm_id) ? $firm_address['district'] : '',\n 'firm_city' => ($sec->company_member_firm_id) ? $firm_address['city'] : '',\n 'firm_localAddress1' => ($sec->company_member_firm_id) ? $firm_address['address1'] : '',\n 'firm_localAddress2' => ($sec->company_member_firm_id) ? $firm_address['address2'] : '',\n 'firm_postcode' => ($sec->company_member_firm_id) ? $firm_address['postcode'] : '' \n );\n $oldsecs[] = $rec;\n }\n foreach($secretaryList as $sec){ \n $sec_nic_or_pass = ($sec->is_srilankan =='yes') ? $sec->nic : $sec->passport_no;\n $sec_nic_or_pass_field = ($sec->is_srilankan =='yes') ? 'nic' : 'passport_no'; \n $sec_as_sh = CompanyMember::select('id','first_name','last_name','title','nic','passport_no')\n ->where('company_id', $request->companyId)\n ->where('designation_type',$this->settings('SHAREHOLDER','key')->id)\n ->where('nic',$sec->nic)\n ->whereNull('company_member_firm_id' )\n ->get();\n $sec_as_sh_count = $sec_as_sh->count();\n $sec_sh_comes_from_director = false;\n $sec_count ++; \n $address ='';\n $forAddress = '';\n if( $sec->address_id) {\n $address = Address::where('id',$sec->address_id)->first();\n }\n if( $sec->foreign_address_id) {\n $forAddress = Address::where('id', $sec->foreign_address_id)->first();\n } \n $firm_info = array();\n if($sec->company_member_firm_id){\n $firm_info = CompanyFirms::where('id',$sec->company_member_firm_id)->first(); \n $firm_address = Address::where('id', $firm_info->address_id)->first(); \n $firm_info['address']=$firm_address; \n } \n $rec = array(\n 'id' => $sec['id'],\n 'type' => ($sec->is_srilankan =='yes' ) ? 'local' : 'foreign',\n 'firstname' => $sec->first_name,\n 'lastname' => $sec->last_name,\n 'title' => $sec->title,\n 'province' => ( isset($address->province) && $address->province) ? $address->province : '',\n 'district' => ( isset($address->district) && $address->district) ? $address->district : '',\n 'city' => ( isset($address->city) && $address->city) ? $address->city : '',\n 'localAddress1' => ( isset($address->address1) && $address->address1) ? $address->address1 : '',\n 'localAddress2' => ( isset($address->address2) && $address->address2) ? $address->address2 : '',\n 'postcode' => (isset($address->postcode) && $address->postcode) ? $address->postcode : '',\n 'forProvince' => ( isset($forAddress->province) && $forAddress->province) ? $forAddress->province : '',\n 'forCity' => ( isset($forAddress->city) && $forAddress->city) ? $forAddress->city : '',\n 'forAddress1' => ( isset($forAddress->address1) && $forAddress->address1) ? $forAddress->address1 : '',\n 'forAddress2' => ( isset($forAddress->address2) && $forAddress->address2) ? $forAddress->address2 : '',\n 'forPostcode' => (isset($forAddress->postcode) && $forAddress->postcode) ? $forAddress->postcode : '',\n 'nic' => $sec->nic,\n 'passport' => $sec->passport_no,\n // 'country' =>($address->country) ? $address->country : '',\n 'country' => ( $sec->foreign_address_id && isset( $forAddress->country) ) ? $forAddress->country : $address->country,\n // 'country' => ( $sec->foreign_address_id && isset( $forAddress->country) ) ? 'test' : 'fail',\n 'passport_issued_country' => $sec->passport_issued_country,\n //'share' =>0,\n 'date' => '1970-01-01' == $sec->date_of_appointment ? null : $sec->date_of_appointment,\n 'isReg' => ($sec->is_registered_secretary =='yes') ? true :false,\n 'regDate' => ($sec->is_registered_secretary =='yes' || $companyType->key =='COMPANY_TYPE_PUBLIC' ) ? $sec->secretary_registration_no :'',\n 'phone' => $sec->telephone,\n 'mobile' => $sec->mobile,\n 'email' => $sec->email,\n 'occupation' => $sec->occupation,\n // 'secType' => ( $sec->is_natural_person == 'yes') ? 'natural' : 'firm',\n 'secType' => 'natural',\n 'secCompanyFirmId' => $sec->company_member_firm_id,\n 'sec_as_sh' => $sec_as_sh_count,\n 'sec_sh_comes_from_director' => $sec_sh_comes_from_director,\n 'firm_info' =>$firm_info,\n 'pvNumber' => ($sec->company_member_firm_id) ? $firm_info['registration_no'] : '',\n 'firm_name' => ($sec->company_member_firm_id) ? $firm_info['name'] : '',\n 'firm_province' => ($sec->company_member_firm_id) ? $firm_address['province'] : '',\n 'firm_district' => ($sec->company_member_firm_id) ? $firm_address['district'] : '',\n 'firm_city' => ($sec->company_member_firm_id) ? $firm_address['city'] : '',\n 'firm_localAddress1' => ($sec->company_member_firm_id) ? $firm_address['address1'] : '',\n 'firm_localAddress2' => ($sec->company_member_firm_id) ? $firm_address['address2'] : '',\n 'firm_postcode' => ($sec->company_member_firm_id) ? $firm_address['postcode'] : '' \n );\n $secs[] = $rec;\n }\n \n $sec_firm_count =0;\n $oldsecs_firms = array();\n foreach($oldSecretaryFirmList as $sec){\n $isSecEdited = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('EDIT','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('old_record_id',$sec['id'])\n ->first();\n $isSecDeleted = CompanyItemChange::where('request_id',$requestInfo->id)\n ->where('changes_type',$this->settings('DELETE','key')->id)\n ->where('item_table_type',$this->settings('COMPANY_MEMBER_FIRMS','key')->id)\n ->where('item_id',$sec['id'])\n ->first(); \n $secID = $sec['id'];\n $newsecID = null;\n $isdeleted = null;\n if($isSecEdited){\n\n $newEditedSec = CompanyFirms::where('id',$isSecEdited->item_id)\n ->where('company_id',$request->companyId)\n ->where('type_id',$this->settings('SECRETARY','key')->id)\n ->where(function ($query) {\n $query->where('ceased_reason', '=', '')\n ->orWhere('ceased_reason', '=', NULL);\n }) \n ->where('status',$this->settings('COMMON_STATUS_EDIT','key')->id)\n ->first();\n\n $sec = $newEditedSec;\n $secID = $isSecEdited->old_record_id;\n $newsecID = $newEditedSec->id; \n\n }\n if($isSecDeleted){\n\n $isdeleted = true; \n\n }\n\n $sec_as_sh_count = ( intval( $sec->sh_firm_of ) > 0 ) ? 1 : 0 ;\n $sec_firm_count++;\n $address_id = $sec->foreign_address_id ? $sec->foreign_address_id : $sec->address_id;\n if(!$sec->foreign_address_id){\n $address = Address::where('id',$address_id)->first();\n }else{\n $address = Address::where('id',$address_id)->first();\n }\n $rec = array(\n 'id' => $secID,\n 'newid' => $newsecID,\n 'isdeleted' => $isdeleted,\n 'type' => ($address->country != 'Sri Lanka') ? 'foreign' : 'local',\n 'pvNumber' => $sec->registration_no,\n 'firm_name' => $sec->name,\n 'firm_province' => ( $address->province) ? $address->province : '',\n 'firm_district' => ($address->district) ? $address->district : '',\n 'firm_city' => ( $address->city) ? $address->city : '',\n 'firm_localAddress1' => ($address->address1) ? $address->address1 : '',\n 'firm_localAddress2' => ($address->address2) ? $address->address2 : '',\n 'firm_country' => ($address->country) ? $address->country : '',\n 'firm_postcode' => ($address->postcode) ? $address->postcode : '',\n 'firm_email' => $sec->email,\n 'firm_phone' => $sec->phone,\n 'firm_mobile' => $sec->mobile,\n 'firm_date' => $sec->date_of_appointment,\n 'firm_date_change' => $sec->date_of_change,\n 'sec_as_sh' => $sec_as_sh_count,\n 'secType' => 'firm',\n 'secBenifList' => array(\n 'ben' => array()\n )\n );\n $oldsecs_firms[] = $rec;\n }\n\n $sec_firm_count =0;\n $secs_firms = array();\n foreach($secretaryFirmList as $sec){\n $sec_as_sh_count = ( intval( $sec->sh_firm_of ) > 0 ) ? 1 : 0 ;\n $sec_firm_count++;\n $address_id = $sec->foreign_address_id ? $sec->foreign_address_id : $sec->address_id;\n if(!$sec->foreign_address_id){\n $address = Address::where('id',$address_id)->first();\n }else{\n $address = Address::where('id',$address_id)->first();\n }\n $rec = array(\n 'id' => $sec['id'],\n 'type' => ($address->country != 'Sri Lanka') ? 'foreign' : 'local',\n 'pvNumber' => $sec->registration_no,\n 'firm_name' => $sec->name,\n 'firm_province' => ( $address->province) ? $address->province : '',\n 'firm_district' => ($address->district) ? $address->district : '',\n 'firm_city' => ( $address->city) ? $address->city : '',\n 'firm_localAddress1' => ($address->address1) ? $address->address1 : '',\n 'firm_localAddress2' => ($address->address2) ? $address->address2 : '',\n 'firm_country' => ($address->country) ? $address->country : '',\n 'firm_postcode' => ($address->postcode) ? $address->postcode : '',\n 'firm_email' => $sec->email,\n 'firm_phone' => $sec->phone,\n 'firm_mobile' => $sec->mobile,\n 'firm_date' => $sec->date_of_appointment,\n 'sec_as_sh' => $sec_as_sh_count,\n 'secType' => 'firm',\n 'secBenifList' => array(\n 'ben' => array()\n )\n );\n $secs_firms[] = $rec;\n }\n\n $case = CourtCase::where('company_court_cases.company_id',$request->companyId)\n ->where('company_court_cases.request_id',$changeRequestID)\n ->first();\n\n $countryList= Cache::rememberForever('countryList', function () {\n return Country::all();\n });\n\n\n $core_groups_list = array();\n $core_groups = ShareGroup::where('type','core_share')\n ->where('company_id', $request->companyId)->get();\n if(count($core_groups)){\n foreach($core_groups as $g ){ \n $grec = array(\n 'group_id' => $g->id,\n 'group_name' => \"$g->name ($g->no_of_shares)\"\n );\n $core_groups_list[] = $grec;\n }\n }\n\n $form18Cost;\n $form19Cost;\n $form20Cost = $this->settings('PAYMENT_FORM20','key')->value;\n $form18CostKey;\n $form19CostKey;\n if($companyType->key =='COMPANY_TYPE_PUBLIC'){\n $form18Cost = $this->settings('PAYMENT_PUBLIC_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_PUBLIC_FORM19','key')->value;\n $form18CostKey = 'PAYMENT_PUBLIC_FORM18';\n $form19CostKey = 'PAYMENT_PUBLIC_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_PRIVATE'){\n $form18Cost = $this->settings('PAYMENT_PRIVATE_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_PRIVATE_FORM19','key')->value;\n $form18CostKey = 'PAYMENT_PRIVATE_FORM18';\n $form19CostKey = 'PAYMENT_PRIVATE_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_UNLIMITED'){\n $form18Cost = $this->settings('PAYMENT_UNLIMITED_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_UNLIMITED_FORM19','key')->value; \n $form18CostKey = 'PAYMENT_UNLIMITED_FORM18';\n $form19CostKey = 'PAYMENT_UNLIMITED_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_GUARANTEE_32'){\n $form18Cost = $this->settings('PAYMENT_GA32_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_GA32_FORM19','key')->value;\n $form18CostKey = 'PAYMENT_GA32_FORM18';\n $form19CostKey = 'PAYMENT_GA32_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_GUARANTEE_34'){\n $form18Cost = $this->settings('PAYMENT_GA34_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_GA34_FORM19','key')->value;\n $form18CostKey = 'PAYMENT_GA34_FORM18';\n $form19CostKey = 'PAYMENT_GA34_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_OVERSEAS'){\n $form18Cost = $this->settings('PAYMENT_PUBLIC_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_PUBLIC_FORM19','key')->value; \n $form18CostKey = 'PAYMENT_PUBLIC_FORM18';\n $form19CostKey = 'PAYMENT_PUBLIC_FORM19'; \n }else if($companyType->key =='COMPANY_TYPE_OFFSHORE'){\n $form18Cost = $this->settings('PAYMENT_PUBLIC_FORM18','key')->value;\n $form19Cost = $this->settings('PAYMENT_PUBLIC_FORM19','key')->value; \n $form18CostKey = 'PAYMENT_PUBLIC_FORM18';\n $form19CostKey = 'PAYMENT_PUBLIC_FORM19'; \n }\n\n \n\n $external_comment_key_id = $this->settings('COMMENT_EXTERNAL','key')->id;\n \n $external_comment_query = CompanyStatus::where('company_id',$request->companyId)\n ->where('comment_type', $external_comment_key_id )\n ->where('request_id', $changeRequestID)\n ->orderBy('id', 'DESC')\n ->first();\n $external_global_comment = ( isset($external_comment_query->comments) && $external_comment_query->comments ) \n ? $external_comment_query->comments\n : '';\n $regsecs = Secretary::leftJoin('secretary_certificates','secretary_certificates.secretary_id','=','secretaries.id')\n ->where('secretaries.status',$this->settings('SECRETARY_APPROVED','key')->id)\n ->where('secretary_certificates.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get(['secretaries.id','secretaries.nic','secretary_certificates.certificate_no as certno']);\n \n $regsecfirms = SecretaryFirm::leftJoin('secretary_certificates','secretary_certificates.firm_id','=','secretary_firm.id')\n ->where('secretary_firm.status',$this->settings('SECRETARY_APPROVED','key')->id)\n ->where('secretary_certificates.status',$this->settings('COMMON_STATUS_ACTIVE','key')->id)\n ->get(['secretary_firm.id','secretary_firm.registration_no as regno','secretary_certificates.certificate_no as certno']);\n \n return response()->json([\n 'message' => 'success',\n 'status' =>true,\n 'changeRequestID' =>$changeRequestID,\n 'incoDate' =>$incoDate,\n 'external_global_comment' => $external_global_comment,\n 'moduleStatus' => isset( $requestInfo->status ) && $requestInfo->status && isset($this->settings($requestInfo->status,'id')->key) ? $this->settings($requestInfo->status,'id')->key : '',\n // 'moduleStatus' => 'COMPANY_CHANGE_RESUBMISSION',\n 'processStatus' => isset($companyInfo->status) && $companyInfo->status && isset($this->settings($companyInfo->status,'id')->key) ? $this->settings($companyInfo->status,'id')->key : '',\n 'oldDirectorList' =>$olddirectors,\n 'oldSecretaryList' =>$oldsecs,\n 'oldSecretaryFirmList' =>$oldsecs_firms,\n 'countryList' => $countryList,\n 'data' => array(\n 'directorList' => $directors,\n 'secretaryFirmList' =>$secs_firms,\n 'secretaryList' =>$secs,\n 'coreShareGroups' => $core_groups_list,\n 'form18Cost' =>$form18Cost,\n 'form19Cost' =>$form19Cost,\n 'form20Cost' =>$form20Cost,\n 'form18CostKey' =>$form18CostKey,\n 'form19CostKey' =>$form19CostKey,\n 'companyTypeKey' =>$companyType->key,\n 'regsecs' => $regsecs,\n 'regsecfirms' => $regsecfirms,\n 'members' => $date,\n 'case' => $case,\n 'signedby' => $signedby,\n 'signedbytype' => $signedbytype,\n )\n ], 200);\n }else{\n return response()->json([\n 'message' => 'unauthorized user detected',\n 'status' =>false,\n ], 404); \n } \n }\n }", "protected function listConversations() {\n $conversations = Participant::where('user_id', Auth::user()->id)->get(['conversation_id']);\n\n return Conversation::with(['participants' => function($query) {\n $query->with(['user' => function($query) {\n $query->select('id', 'username', 'picture');\n }]);\n }])->whereIn('id', $conversations)->get();\n }", "public function index()\n {\n if (Auth::user()->type=='Supervisor') {\n $department = Auth::user()->department;\n $mytime = date(\"H\")+1;\n $date = date(\"m/d/yy\");\n\n switch ($mytime) {\n case 8:\n case 9:\n $session = 1;\n break;\n case 10:\n case 11:\n $session = 2;\n break;\n case 12:\n case 13:\n $session = 3;\n break;\n case 14:\n case 15:\n $session = 4;\n break;\n case 16:\n case 17:\n $session = 5;\n break;\n case 18:\n $session = 6;\n break;\n default:\n $session = 'NONE';\n break;\n };\n $day = strtolower(date(\"l\"));\n $timetable = ClassroomTimetable::where('day','monday')->where('session_number',1)->where('department',$department)->get();\n foreach ($timetable as $item) {\n $user = User::find($item->professor_id);\n if (empty($user)) {\n $item->setAttribute('professor_name',null);\n }else{\n $item->setAttribute('professor_name',$user->name);\n }\n }\n\n $presencetab = PresenceArchive::where('date',$date)->where('session',1)->get();\n\n\n\n return view('home')->with('timetable',$timetable)->with('presencetab',$presencetab);\n }else\n return view('home');\n\n }", "public function anyIndex()\n\t{\n\t\t/*\n\t\t * Obj\n\t\t */\n\t\t$contract = $this->contract;\n\n\t\t/*\n\t\t * Paginate\n\t\t */\n\n $pag = Input::get('pag', 50);\n\n\t\t/*\n\t\t * Sort filter\n\t\t */\n\n \t$sort = in_array(Input::get('sort'), ['partner_id', 'agent1_name']) ? Input::get('sort') : 'id';\n\n\t\t/*\n\t\t * Order filter\n\t\t */\n\n \t$order = Input::get('order') === 'asc' ? 'asc' : 'desc';\n\n\t\t/*\n\t\t * Search filters\n\t\t */\n\t\tif (Input::has('id')) {\n\t\t\t$contract = $contract->where('id', Input::get('id'));\n\t\t}\n\n\t\tif (Input::has('consultant_id')) {\n\t\t\t$contract = $contract->where('consultant_id', Input::get('consultant_id'));\n\t\t}\n\n\t\tif (Input::has('is_signed')) {\n\t\t\t$contract = $contract->where('is_signed', (int) Input::get('is_signed'));\n\t\t}\n\n\t\tif (Input::has('is_sent')) {\n\t\t\t$contract = $contract->where('is_sent', (int) Input::get('is_sent'));\n\t\t}\n\n\t\tif (Input::has('created_at_begin')) {\n\t\t\t$contract = $contract->where('created_at', '>=', Input::get('created_at_begin'));\n\t\t}\n\n\t\tif (Input::has('created_at_end')) {\n\t\t\t$contract = $contract->where('created_at', '<=', Input::get('created_at_end'));\n\t\t}\n\n\t\tif (Input::has('signed_at_begin')) {\n\t\t\t$contract = $contract->where('signed_at', '>=', Input::get('signed_at_begin'));\n\t\t}\n\n\t\tif (Input::has('signed_at_end')) {\n\t\t\t$contract = $contract->where('signed_at', '<=', Input::get('signed_at_end'));\n\t\t}\n\n\t\t/*\n\t\t * Finally Obj\n\t\t */\n\t\t$contract = $contract->with(['partner', 'consultant'])\n\t\t->whereExists(function($query){\n\t\t if (Input::has('partner_name')) {\n\t\t\t\t$query->select(DB::raw(1))\n\t\t ->from('profiles')\n\t\t\t\t\t ->whereRaw('contracts.partner_id = profiles.user_id')\n\t\t\t\t\t ->whereRaw('CONCAT(CONCAT(COALESCE(profiles.first_name, \"\"), \" \", COALESCE(profiles.last_name, \"\")), \" \", profiles.company_name) LIKE \\'%'.str_replace(\"'\", \"\\'\", Input::get('partner_name')).'%\\'');\n\t\t\t}\n\t\t})\n\t\t->orderBy($sort, $order)->paginate($pag)->appends([\n\t\t\t'sort' => $sort,\n\t\t\t'order' => $order,\n\t\t\t'pag' => $pag,\n\t\t\t'id' => Input::get('id'),\n\t\t\t'partner_name' => Input::get('partner_name'),\n\t\t\t'consultant_id' => Input::get('consultant_id'),\n\t\t\t'is_signed' => Input::get('is_signed'),\n\t\t\t'is_sent' => Input::get('is_sent'),\n\t\t\t'created_at_begin' => Input::get('created_at_begin'),\n\t\t\t'created_at_end' => Input::get('created_at_end'),\n\t\t\t'signed_at_begin' => Input::get('signed_at_begin'),\n\t\t\t'signed_at_end' => Input::get('signed_at_end'),\n\t\t]);\n\n\t\t/*\n\t\t * Layout / View\n\t\t */\n\t\t$this->layout->content = View::make('admin.contract.list', compact('sort', 'order', 'pag', 'contract'));\n\t}", "public function production_chat () {\n\t\treturn $this->belongsTo('App\\ProductionChat');\n\t}", "public function getHousehold() {\n $setWhere = FALSE;\n $ashaselect = $this->request->input(\"ashaselect\");\n if ($ashaselect && ($ashaselect != \"Choose ANM\")) {\n $where = [];\n $where[] = [\"asha_assigned\", \"=\", $ashaselect];\n $setWhere = TRUE;\n }\n\n $phcselect = $this->request->input(\"phcselect\");\n if ($phcselect && ($phcselect != \"Choose PHC\")) {\n $where = [];\n $where[] = [\"phc_name\", \"=\", $phcselect];\n $setWhere = TRUE;\n }\n\n $villageselect = $this->request->input(\"villageselect\");\n if ($villageselect && ($villageselect != \"Choose Village\")) {\n\n $where[] = [\"village_name\", \"=\", $villageselect];\n }\n\n $startdate = $this->request->input(\"startdate\");\n if ($startdate) {\n $startdate = date(\"Y-m-d H:i:s\", strtotime($startdate));\n $where[] = [\"date\", \">=\", $startdate];\n }\n\n $enddate = $this->request->input(\"enddate\");\n if ($enddate) {\n $enddate = date(\"Y-m-d H:i:s\", strtotime($enddate));\n $where[] = [\"date\", \"<=\", $enddate];\n }\n// echo 888; \n// var_dump( $this->request->all()) ;exit;\n //pagination\n $startingIndex = 0;\n $pageNo = 1;\n if ($this->request->input(\"page\")) {\n $pageNo = $this->request->input(\"page\");\n }\n\n $perPage = 1000; //default value\n if ($this->request->input(\"page_size\")) {\n $perPage = $this->request->input(\"page_size\");\n }\n\n if ($pageNo > 1) {\n $startingIndex = ($pageNo - 1) * $perPage;\n }\n $this->usersModel->setStartingIndex($startingIndex);\n $this->usersModel->setRecords($perPage);\n\n //\n\n $this->usersModel->setTableName(\"household\");\n\n if ($setWhere) {\n $this->usersModel->setWhere($where);\n }\n\n// \\DB::enableQueryLog();\n $households = $this->usersModel->getOrderByData(\"_id\");\n\n $households = json_decode(json_encode($households), true);\n\n// $query = \\DB::getQueryLog();\n// $query = end($query);\n// var_dump($query);exit;\n// echo \"<pre>\";\n// print_r($households);exit;\n return $households;\n }", "public function index(Request $request)\n {\n if(!\\Auth::user()->can('property.view')) {\n return view('backend.partial.no-permission', ['title' => 'No-permission']);\n }\n\n $limit = $request->get('limit', 10);\n $properties = [];\n $districts = [];\n $communes = [];\n\n $staffs = Staff::whereIn('type', [3,1,4])->get();\n\n if(!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isOffice()) {\n $staffObj = \\Auth::user()->staff;\n /*\n * Get properties in office\n */\n if (!empty($staffObj->office)) {\n if($staffObj->office->properties()->count()) {\n $properties = $staffObj->office->properties();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n /*\n * Get properties in staff\n */\n } \n elseif (!empty($staffObj->properties) && count($staffObj->properties) > 0) {\n $properties = $staffObj->properties();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n }\n\n /*\n * Get all properties\n */\n if(\\Auth::user()->isAdministrator()) {\n $properties = $this->propertyRepo->model();//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n /*\n * Get properties for user role type cellector [Statue pending]\n */\n if (!\\Auth::user()->hasRole('administrator') && \\Auth::user()->isCollector()) {\n $properties = $properties->where('status', 0);//->orderBy(\"id\", \"desc\")->paginate($limit);\n }\n\n $search_txt = $request->q;\n if(!empty($search_txt)) {\n $properties = $properties->where(function ($query) use($search_txt) {\n return $query->orWhere(\"code\", \"LIKE\", \"%{$search_txt}%\");\n });\n }\n\n // dd($request->all());\n if($request->province != null) {\n $properties = $properties->where('province_id', $request->province);\n $districts = $this->districtRepo->lists()->where('province_id', $request->province)->pluck('title', 'id')->toArray();\n }\n if($request->district != null) {\n $properties = $properties->where('district_id', $request->district);\n\n $communes = $this->communeRepo->lists()->where('district_id', $request->district)->pluck('title', 'id')->toArray();\n }\n if($request->commune != null) {\n $properties = $properties->where('commune_id', $request->commune);\n }\n if($request->type != null) {\n $properties = $properties->where('listing_type', $request->type);\n }\n if($request->property_type != null) {\n $properties = $properties->where('property_type_id', $request->property_type);\n }\n if($request->status != null) {\n $properties = $properties->where('status', $request->status);\n }\n $properties = $properties->orderBy(\"id\", \"desc\")->paginate($limit);\n\n $agents = Staff::where(\"type\", \\Constants::ROLE_KEY_AGENT)\n ->with(\"user\", \"property_link\")\n ->orderBy(\"id\", \"DESC\")\n ->get();\n $agents = json_decode($agents);\n $provinces = $this->provinceRepo->lists()->pluck('title', 'id')->toArray();\n $property_types = PropertyType::get();\n\n $status = [ \"Pending\", \"Submitted\", \"Reviewed\", \"Published\", \"Solved\", \"Deposit\", \"Unpublished\" ];\n $colors = [ \"#fd397a\", \"#17a2b8\", \"#5867dd\", \"#0abb87\", \"#545b62\", \"#fd397a\", \"#5867dd\" ];\n $propertiesCount = Property::groupBy('status')->get(['status', DB::raw(\"COUNT(id) AS total\")])->map(function($property) use($status, $colors) {\n return [\n 'label' => __($status[$property->status]),\n 'value' => $property->total,\n 'color' => $colors[$property->status]\n ];\n });\n\n $total_properties = [\n 'data' => $propertiesCount,\n 'total' => $propertiesCount->sum('value'),\n ];\n\n $requestQuery = collect($request)->map(function($items) {\n $items = ($items==null) ? '' : $items;\n return $items;\n })->all();\n\n return view('backend.property.index', compact('properties', \"agents\", \"property_types\", \"provinces\", \"districts\", \"communes\", \"total_properties\", \"requestQuery\", \"staffs\"));\n }", "public function search($params)\n {\n \n $query = Party::find();\n\n // $query->joinWith(['payments']);\n\n $dataProvider = new \\yii\\data\\ActiveDataProvider([\n 'query' => $query,\n 'sort'=> ['defaultOrder' => ['id' => SORT_DESC]]\n ]);\n\n $this->load($params);\n\n if(!$this->validate()){\n return $dataProvider;\n }\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'id' => $this->id,\n // 'phone' => $this->phone,\n 'pincode' => $this->pincode, \n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at\n ]);\n \n $query->andFilterWhere(['like','name', $this->name])\n ->andFilterWhere(['like','contact_name',$this->contact_name])\n ->andFilterWhere(['like','phone',$this->phone])\n ->andFilterWhere(['like','email',$this->email])\n ->andFilterWhere(['like','street_address', $this->street_address])\n ->andFilterWhere(['like','city', $this->city])\n ->andFilterWhere(['like','location', $this->location])\n ->andFilterWhere(['like','state', $this->state])\n ->andFilterWhere(['like','gst', $this->gst]);\n\n $operator = 'like';\n $comparator = $this->due;\n // because https://stackoverflow.com/a/7091714/3690154\n // var_dump($this->due_condition); die;\n if(isset($this->due_condition) && strlen($this->due_condition) > 0){\n \n $queryString = $this->due_condition;\n switch($queryString){\n case strpos($queryString,'>') === 0:\n $operator = '>'; $comparator = 0;break;\n case strpos($queryString,'<') === 0:\n $operator = '<'; $comparator = 0;break;\n case strpos($queryString,'=') === 0:\n $operator = '='; $comparator = 0;break;\n default:\n $operator = 'like'; $comparator = $this->due; break;\n }\n }\n // var_dump($comparator); die;\n $query->andFilterWhere([$operator, 'due', $comparator]);\n return $dataProvider;\n }", "function Release_model()\n {\n parent::__construct();\n\t\t\t\t$this->load->database($this->session->userdata('database'));\n\t\t\t\tself::$access_where = $this->allowed_access->limit_access($this->session->userdata('access_filter'));\n }", "public function show(Request $request)\n {\n $conversation = Conversation::findOrFail($request->conversation_id);\n $messages = $conversation->messages;\n foreach($messages as $message){\n $profilePic = User::findOrFail($message->sender_id)->photo()\n ->where('photo_type','=','profile')\n ->where('current','=','1')->first();\n if($profilePic) {\n $message->profilePic = $profilePic->url;\n }\n if($message->sender_id == auth()->user()->id){\n $message->own = true;\n }else{\n $message->own = false;\n }\n }\n return $messages;\n }", "public function show_qualified_candidate(){\r\n\t\tif(function_exists('date_default_timezone_set')) {\r\n\t\t\tdate_default_timezone_set(\"Asia/Kolkata\");\r\n\t\t}\r\n\t\t$date = date(\"Y-m-d\");\r\n\t\t$query = $this->conn->query(\"select candidate.cnum, candidate.name, candidate.department, candidate.profile, candidate.register_time from candidate\r\n\t\tinner join interview\r\n\t\ton (candidate.cnum=interview.cnum and interview.recomendation = 'proceed' and candidate.register_date = '$date')\");\r\n\t\t\r\n\t\twhile($row = $query->fetch_array(MYSQLI_ASSOC)){\r\n\t\t\t$this->candidate[] = $row;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $this->candidate;\r\n\t\t\r\n\t}", "public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }", "public function onExtbaseQueryFilter(ModifyQueryBeforeFetchingObjectDataEvent $e): void\n {\n $query = $e->getQuery();\n $source = $query->getSource();\n if (! $source instanceof Selector) {\n return;\n }\n \n if (! $this->visibilityAspect->includeHiddenOfTable($source->getSelectorName())) {\n return;\n }\n \n $settings = $query->getQuerySettings();\n $settings->setIgnoreEnableFields(true);\n $settings->setEnableFieldsToBeIgnored(['disabled']);\n }", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function show($id)\n {\n if($id && $id > 0){\n if(Auth::user()->role == 'admin'){\n $challenge = Challenge::find($id);\n } else{\n $challenge = Challenge::where('id',$id)->where('company_id', Auth::user()->id)->first();\n // $challenge = DB::table('challenge')\n // ->join('builds', 'builds.id', '=', 'challenge.build_id')\n // ->select('challenge.*')\n // ->where('challenge.id', $id)\n // ->where('builds.company_id', Auth::user()->id)\n // ->first();\n }\n if($challenge){\n\n $build = Builds::select('id','build_text')->where('challenge_id', $challenge->id)->first();\n $challenge->build_name = '--';\n if($build && !empty($build) && $build->build_text != ''){\n $challenge->build_name = $build->build_text;\n }\n $user = Users::select('id','name')->where('id', $challenge->company_id)->first();\n $challenge->company_name = '--';\n if($user && !empty($user) && $user->user_text != ''){\n $challenge->company_name = $user->user_text;\n }\n $challenge->category_name = '--';\n // $challenge->employee_name = '--';\n // if(!empty($build)){\n $category = Categories::select('category_name')->where('id', $challenge->category_id)->first();\n \n if($category && !empty($category) && $category->category_name != ''){\n $challenge->category_name = $category->category_name;\n }\n // $employee = Employee::select('full_name', 'is_deleted')->where('id', $build->employee_id)->first();\n \n // if($employee && !empty($employee) && $employee->full_name != ''){\n // if($employee->is_deleted == '0'){\n // $challenge->employee_name = $employee->full_name;\n // } else {\n // $challenge->employee_name = 'Employee deleted';\n // }\n // }\n // }\n\n $user = Users::select('name')->where('id', $challenge->company_id)->first();\n $challenge->company_name = '--';\n if($user && !empty($user) && $user->name != ''){\n $challenge->company_name = $user->name;\n }\n\n return view('challenge.show',compact('challenge'));\n } else {\n return redirect()->route('challenge.index')->with('errors','No challenge Found.');\n }\n \n } else {\n return redirect()->route('challenge.index')->with('errors','No challenge Found.');\n }\n }", "public function index()\n {\n if($this->is_admin()){\n $homecells = Homecell::where('homecells.church_id', Auth::user()->church_id)\n ->join('users','homecells.creator_id','=', 'users.id')\n ->select('users.*', 'homecells.*', 'users.id as user_id','homecells.id as cell_id')\n ->get();\n\n return view('admin.homecell.show')->with(['homecell' => null,'homecells' => $homecells]);\n\n\n }\n $homecell = HomeCellMembers::where('member_id', Auth::user()->id)\n ->join('homecells', 'homecells.id', '=','home_cell_members.cell_id')->first();\n\n if($homecell){ //get list of team members\n $members = HomeCellMembers::where('cell_id', $homecell->id)->join('users', 'users.id','=','home_cell_members.member_id')->get();\n\n return view('homecell.show')->with(['homecell' => $homecell,'members' => $members]);\n\n }else{ // get all homecells one can join\n $homecells = Homecell::where('homecells.church_id', Auth::user()->church_id)\n ->join('users','homecells.creator_id','=', 'users.id')\n ->select('users.*', 'homecells.*', 'users.id as user_id','homecells.id as cell_id')\n ->get();\n\n\n if(count($homecells) < 1){ $homecells = null; }\n return view('homecell.show')->with(['homecell' => null,'homecells' => $homecells]);\n\n }\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.45043784", "0.45037028", "0.4503036", "0.45013383", "0.4501273", "0.45004663", "0.44863832", "0.44779932", "0.4470217", "0.44621938", "0.44621077", "0.44616693", "0.44596604", "0.44559148", "0.44500792", "0.44476154", "0.44400734", "0.44335178", "0.443094", "0.44289505", "0.44200897", "0.44125977", "0.4412174", "0.44011697", "0.44007477", "0.43961182", "0.43915692", "0.43889293", "0.43880206", "0.43860164", "0.43851015", "0.438055", "0.43710193", "0.4370082", "0.4366039", "0.43652573", "0.43633008", "0.43604016", "0.43555897", "0.43478903", "0.4344975", "0.4344061", "0.43412995", "0.4340861", "0.43401164", "0.43371907", "0.4337098", "0.43356425", "0.43329144", "0.43320674", "0.4328078", "0.4325465", "0.43243673", "0.43235594", "0.4320941", "0.43192267", "0.4316784", "0.4315417", "0.43131414", "0.43064973", "0.4303742", "0.43016383", "0.42984766", "0.42961672", "0.4295567", "0.42940965", "0.42919415", "0.42899546", "0.42883876", "0.42870873" ]
0.58388996
1
Return column/value pairs with date values transformed to Zend_Date objects
public function toMagicArray($dateFormat = null) { $metadata = $this->getTable()->info('metadata'); foreach ($metadata as $column => $metadata) { if ($metadata['DATA_TYPE'] == 'timestamptz') { if ($this->$column) { $this->$column = $this->_isoToNormalDate($this->$column, $dateFormat); } } } return $this->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDates()\n {\n $sql = $this->tableGateway->getSql();\n $select = $sql->select();\n\n $select->columns(array('date'));\n $select->group('date');\n $select->where('TIMESTAMP(`date`,`to`) > NOW()');\n //$select->order('date ASC');\n $select->limit(10);\n $statement = $sql->prepareStatementForSqlObject($select);\n\n return $statement->execute();\n }", "public function getDates()\n {\n $this->getFields()->each(function ($field) {\n if ($field instanceof FieldTypeDateInterface) {\n $this->dates[] = $field->getDBKey();\n }\n });\n\n if ($this->hasField(static::CREATED_AT) and $this->hasField(static::UPDATED_AT)) {\n $this->timestamps = true;\n }\n\n return parent::getDates();\n }", "private function _date_format($results) {\n\t\tif ( $this->date_format) {\n\n\t\t\t$date_cols = $this->date_cols;\n\t\t\tif (!in_array($this->date_column, $this->date_cols)) {\n\t\t\t\t$date_cols[] = $this->date_column;\n\t\t\t}\n\n\t\t\tforeach ($results as &$r) {\n\t\t\t\tforeach ($date_cols as $key) {\n\t\t\t\t\tif (isset($r[$key]) && !empty($r[$key])) {\n\t\t\t\t\t\t$date = date_create($r[$key]);\n\t\t\t\t\t\t$r[$key] = date_format($date, $this->date_format);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "protected function _convertDates (&$model, $data=array(), $to='mysql') {\r\n\t\t\r\n\t\tif (empty($data)) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($data as $key => $value) {\r\n\t\t\tforeach ($value as $model_alias => $fields) {\r\n\t\t\t\tforeach ($fields as $field => $field_value) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!empty($model->_schema[$field]['type']) && \r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'date' || \r\n\t\t\t\t\t\t\t$model->_schema[$field]['type'] == 'datetime'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t$date_format = ($model->_schema[$field]['type'] == 'date') ? 'Y-m-d' : 'Y-m-d H:i:s';\r\n\t\t\t\t\t\t$data[$key][$model_alias][$field] = ($to == 'mysql') ? date($date_format, $field_value) : strtotime($field_value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "function Dates()\n {\n if (empty($this->Dates))\n {\n $this->Dates=\n $this->DatesObj()->Sql_Select_Hashes\n (\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n )\n );\n\n foreach (array_keys($this->Dates) as $did)\n {\n $this->Dates[ $did ][ \"Text\" ]=$this->MyTime_Sort2Date($this->Dates[ $did ][ \"Name\" ]);\n }\n }\n\n return $this->Dates;\n }", "public function getdates() {\n\n $dates = array();\n\n // This can be multiple reservations per property\n foreach ($this->data as $changelog) {\n\n $status_flag = strtolower($changelog['strStatusFlag']);\n\n $rows = $this->createDateRows($changelog, $status_flag);\n\n foreach ($rows as $row ) {\n $dates[] = $row;\n }\n\n }\n\n return $dates;\n }", "function &toArray($dateFormat = null) {\n if (empty($dateFormat)) {\n $dateFormat = Config::$dateFormat;\n }\n $a = array();\n foreach ($this->_data as $k => $v) {\n if ($v->dataType == DATATYPE_DATETIME || $v->dataType == DATATYPE_DATE) {\n if ($v->value == null || $v->value == '') {\n $a[$k] = null;\n } else {\n $a[$k] = date($dateFormat, $v->value);\n }\n } else if ($v->dataType == DATATYPE_BOOL) {\n $a[$k] = (bool)$v->value;\n } else if ($v->dataType <= DATATYPE_INT) {\n $a[$k] = (int)$v->value;\n } else if ($v->dataType <= DATATYPE_DOUBLE) {\n $a[$k] = (double)$v->value;\n } else {\n $a[$k] = $v->value;\n }\n }\n\n foreach ($this->_extra as $k => $v) {\n if (is_object($v) && is_subclass_of($v, 'DataObject')) {\n $a[$k] = $v->toArray($dateFormat);\n } else if (is_array($v)) {\n $a[$k] = self::objectListToArrayList($v, $dateFormat);\n } else {\n $a[$k] = $v;\n }\n }\n return $a;\n }", "public function getDateList()\n {\n $return = array();\n \n for (\n $i = strtotime($this->from_date); \n $i <= strtotime($this->to_date); \n $i = strtotime('+ 1 day', $i)\n )\n {\n $date = date('Y-m-d', $i);\n $weekday = date('w', $i);\n $weekend = (in_array($weekday, array(0,6))) ? true : false;\n $calendarWeek = (int) date('W', $i); //cast to integer to remove leading 0\n \n $return[$date] = array('date' => $date, 'weekend' => $weekend, 'calendarWeek' => $calendarWeek);\n }\n \n return $return;\n }", "public function getDates()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'producedAt' => $this->producedAt,\r\n\t\t\t'thisUpdate' => $this->getThisUpdate(),\r\n\t\t\t'nextUpdate' => $this->getNextUpdate()\r\n\t\t);\r\n\t}", "public function provideDate()\n {\n return array(\n array(array(\"date\\before{date:'2013-04-04'}\"), true),\n array(array(\"date\\before{date:'1998-04-04'}\"), false),\n array(array(\"date\\after{date:'2013-04-04'}\"), false),\n array(array(\"date\\after{date:'1998-04-04'}\"), true),\n );\n }", "public static function resolveDateFilterValue($dateFilterRow)\n\t{\n\t\t$stdfilterlist = ['columnname' => $dateFilterRow['columnname'], 'stdfilter' => $dateFilterRow['stdfilter']];\n\t\tif ($dateFilterRow['stdfilter'] === 'custom' || $dateFilterRow['stdfilter'] === '' || $dateFilterRow['stdfilter'] === 'e' || $dateFilterRow['stdfilter'] === 'n') {\n\t\t\tif ($dateFilterRow['startdate'] !== '0000-00-00' && $dateFilterRow['startdate'] !== '') {\n\t\t\t\t$startDateTime = new \\DateTimeField($dateFilterRow['startdate'] . ' ' . date('H:i:s'));\n\t\t\t\t$stdfilterlist['startdate'] = $startDateTime->getDisplayDate();\n\t\t\t}\n\t\t\tif ($dateFilterRow['enddate'] !== '0000-00-00' && $dateFilterRow['enddate'] !== '') {\n\t\t\t\t$endDateTime = new \\DateTimeField($dateFilterRow['enddate'] . ' ' . date('H:i:s'));\n\t\t\t\t$stdfilterlist['enddate'] = $endDateTime->getDisplayDate();\n\t\t\t}\n\t\t} else { //if it is not custom get the date according to the selected duration\n\t\t\t$datefilter = static::getDateforStdFilterBytype($dateFilterRow['stdfilter']);\n\t\t\t$startDateTime = new \\DateTimeField($datefilter[0] . ' ' . date('H:i:s'));\n\t\t\t$stdfilterlist['startdate'] = $startDateTime->getDisplayDate();\n\t\t\t$endDateTime = new \\DateTimeField($datefilter[1] . ' ' . date('H:i:s'));\n\t\t\t$stdfilterlist['enddate'] = $endDateTime->getDisplayDate();\n\t\t}\n\t\treturn $stdfilterlist;\n\t}", "public function asArray() : array\n\t{\n\t\t$item = parent::toArray(TableMap::TYPE_FIELDNAME);\n\n\t\tif (array_key_exists('created_dt', $item))\n\t\t{\n\t\t\t$item['created_dt'] = $this->toW3cDate($item['created_dt']);\n\t\t}\n\n\t\tif (array_key_exists('updated_dt', $item))\n\t\t{\n\t\t\t$item['updated_dt'] = $this->toW3cDate($item['updated_dt']);\n\t\t}\n\n\t\tif (array_key_exists('modified_dt', $item))\n\t\t{\n\t\t\t$item['modified_dt'] = $this->toW3cDate($item['modified_dt']);\n\t\t}\n\n\t\tif (array_key_exists('expire_dt', $item))\n\t\t{\n\t\t\t$item['expire_dt'] = $this->toW3cDate($item['expire_dt']);\n\t\t}\n\n\t\treturn $item;\n\t}", "public function getDates()\n {\n return $this->timestamps\n ? array_merge($this->dates, ['created_at', 'updated_at'])\n : $this->dates;\n }", "public function getDatePairs()\n {\n return isset($this->DatePairs) ? $this->DatePairs : null;\n }", "private function ical_dt_date($key, $value)\n\t{\n\t$value = $this->ical_date_to_unix($value);\n\n\t// zjisteni TZID\n\t$temp = explode(\";\", $key);\n\n\tif (empty($temp[1])) // neni TZID\n\t{\n\t\t\t// 2011-06-02 ms fix\n\t\t$value = str_replace('T', '', $value);\n\t\treturn [$key, $value];\n\t}\n\t// pridani $value a $tzid do pole\n\t$key = $temp[0];\n\t$temp = explode(\"=\", $temp[1]);\n\t$return_value[$temp[0]] = $temp[1];\n\t$return_value['unixtime'] = $value;\n\n\treturn [$key, $return_value];\n\t}", "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "public function getDates()\n\t{\n\t\treturn array('date');\n\t}", "public function convertDateProvider()\n {\n return [\n [\n 'fieldValue' => '@1534505233',\n 'expected' => 'Aug 17, 2018 11:27:13 AM',\n ],\n [\n 'fieldValue' => '@1534530000',\n 'expected' => 'Aug 17, 2018 06:20:00 PM',\n ],\n ];\n }", "public function iCalendarDateDataProvider() {\n\t\treturn array(\n\t\t\t'emptyValue' => array(\n\t\t\t\t'',\n\t\t\t\t''\n\t\t\t),\n\t\t\t'dateTimeObject' => array(\n\t\t\t\tnew \\DateTime('@1425234250'),\n\t\t\t\t'20150301T182410Z'\n\t\t\t)\n\t\t);\n\t}", "public function toArray()\n {\n $objectArray = get_object_vars($this);\n\n //Specific data\n if (null !== $objectArray['dateStart']) {\n $objectArray['dateStart'] = $objectArray['dateStart']->format('Y-m-d');\n $objectArray['dateEnd'] = $this->getDateStart()->add(new DateInterval('P7D'))->format('Y-m-d');\n }\n\n return $objectArray;\n }", "public function stdWrap_dateDataProvider() {}", "public function convertDates(&$results) {\n\t\tif (is_array($results)) {\n\t\t\tforeach($results as &$row) {\n\t\t\t\t$this->convertDates($row);\n\t\t\t}\n\t\t} elseif (is_a($results, 'MongoDate')) {\n\t\t\t$results = date('Y-M-d h:i:s', $results->sec);\n\t\t}\n\t}", "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "public function get_exception_dates();", "public function getDates()\n {\n // Apply the default filters\n foreach(self::$registered_default_filters as $filter_alias => $filter_class) {\n $filter = new $filter_class($this->dates);\n $this->applyFilter($filter, null);\n }\n\n // Apply the user defined filters\n foreach($this->filters_to_apply as $filter_alias => $parameters) {\n $filter = new self::$registered_filters[$filter_alias]($this->dates);\n $this->applyFilter($filter, $parameters);\n }\n\n return $this->dates;\n }", "public static function date_keys()\n {\n $nullable = static::$nullable??[];\n $zero_date = static::$zero_date??[];\n\t\t$zero_datetime = static::$zero_datetime??[];\n return array_merge($nullable,$zero_date,$zero_datetime);\n }", "public function getDatesAtAttributes(){\n\t\t$this->_connect();\n\t\treturn $this->_getDatesAtAttributes();\n\t}", "protected function prepareDates(array $data): array\n {\n return $this->formatDateFields(['start_date', 'due_date'], $data);\n }", "public function getDates()\n {\n return $this->dates;\n }", "public function getCalendarColumns() {\n $dates = array();\n $date = new DateTime();\n\n $dates[] = $date->format(\"Y-m\");\n\n for ($i = 1; $i < 12; $i++) {\n $date->modify('+1 month');\n $dates[] = $date->format(\"Y-m\");\n }\n return $dates;\n }", "public function parseDate(){\n \t$attrs = ['requested_at', 'replied_at', 'fixed_begin', 'fixed_end'];\n \tforeach ($attrs as $a){\n \t\tif (is_string($d = $this->getAttribute($a))){\n \t\t\t$d = \\DateTime::createFromFormat('Y-m-d H:i:s', $d);\n \t\t\tif ($d){\n\t \t\t\t$this->setAttribute($a, ['date' => $d->format('Y-m-d'), 'time' => $d->format('H:i:s')]);\n \t\t\t} else {\n\t \t\t\t$this->setAttribute($a, ['date' => date('Y-m-d'), 'time' => date('H:i:s')]);\n \t\t\t}\n \t\t}\n \t}\n }", "public function getArray()\n{\n\t$ts=$this->getTimestamp();return array('year'=>date('Y',$ts),'month'=>date('m',$ts),'day'=>date('d',$ts),'hour'=>date('H',$ts),'minute'=>date('i',$ts),'second'=>date('s',$ts));\n}", "private function handleDates()\n {\n if ( ! $this->dates) {\n return;\n }\n\n foreach ($this->dates as $field) {\n $value = $this->data[$field];\n\n if (empty($value)) {\n // No value provided\n continue;\n }\n\n $isConverted = isset($this->convertedDates[$field]) ? $this->convertedDates[$field] : false;\n\n if ($isConverted) {\n // This values is already converted\n // Prevent double conversion\n continue;\n }\n\n try {\n if (is_string($value) && isset($this->data['timezone'])) {\n // Use provided timezone field\n // Build full DateTime object\n $value = new \\DateTime($value, new \\DateTimeZone($this->data['timezone']));\n }\n\n if ($value instanceof \\DateTime) {\n // Explicitly convert to UTC\n $value->setTimezone(new \\DateTimeZone('UTC'));\n\n // Use correct format\n $this->data[$field] = $value->format('Y-m-d H:i:s');\n continue;\n }\n }\n catch(\\Exception $e) {\n // Convert all exceptions into our ValidationException\n }\n\n // No timezone field and not a DateTime object\n throw new ValidationException('You must either provide `timezone` field, or a DateTime object for a date field');\n }\n }", "public function getDates()\n\t{\n\t\treturn $this->dates;\n\t}", "public function migrateDateDataProvider()\n {\n return [\n [['20120111235330', '20120116183504'], '20120118', '20120116183504', 'Failed to migrate all migrations when migrate to date is later than all the migrations'],\n [['20120111235330', '20120116183504'], '20120115', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is between 2 migrations'],\n [['20120111235330', '20120116183504'], '20120111235330', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is one of the migrations'],\n [['20120111235330', '20120116183504'], '20110115', null, 'Failed to migrate 0 migrations when the migrate to date is before all the migrations'],\n ];\n }", "public function dateProvider()\n {\n return array(\n array('2017-03-21', null, null),\n array('2017-01-01', null, array('name' => 'Jour de l\\'an')),\n array('2017-04-17', null, array('name' => 'Lundi de Pâques')),\n array('2017-05-01', null, array('name' => 'Premier Mai')),\n array('2017-05-09', null, null),\n array('2019-05-09', null, array('name' => 'Journée de l\\'Europe')),\n array('2017-05-25', null, array('name' => 'Ascension')),\n array('2017-06-05', null, array('name' => 'Lundi de Pentecôte')),\n array('2017-06-23', null, array('name' => 'Jour de la célébration de l\\'anniversaire du Grand-Duc')),\n array('2017-08-15', null, array('name' => 'Assomption')),\n array('2017-11-01', null, array('name' => 'Toussaint')),\n array('2017-12-25', null, array('name' => 'Premier jour de Noël')),\n );\n }", "function exportValue()\n\t{\n\t\t$values = parent::getValue();\n\t\t$y = $values['Y'][0];\n\t\t$m = $values['F'][0];\n\t\t$d = $values['d'][0];\n\t\t$m = $m < 10 ? '0'.$m : $m;\n\t\t$d = $d < 10 ? '0'.$d : $d;\n\t\t$datetime = $y.'-'.$m.'-'.$d;\n\t\t$result[$this->getName()]= $datetime;\n\t\treturn $result;\n\t}", "public function getDates()\n {\n return ['created_at', 'updated_at', 'openingbalancedate'];\n }", "protected function _getDatesAtAttributes(){\n\t\treturn ActiveRecordMetaData::getDatesAt($this->_source, $this->_schema);\n\t}", "public function get_dates()\r\n {\r\n $sql=\"SELECT clearance_dates.*, status.status FROM clearance_dates, status WHERE clearance_dates.status=status.status_id\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "public function transform($date)\n {\n return [\n 'id' => $date->id,\n 'description' => $date->description,\n 'time_timestamp' => Carbon::parse($date->time)\n ->format(config('cortejando.timestamp_format')),\n 'location_name' => $date->location_name,\n 'state' => $date->state\n ];\n }", "public function toArray()\n {\n $dt = $this->getValueDatetime();\n return array(\n 'id' => $this->getId(),\n 'value_string' => $this->getValueString(),\n 'value_integer' => $this->getValueInteger(),\n 'value_float' => $this->getValueFloat(),\n 'value_boolean' => $this->getValueBoolean(),\n 'value_datetime' => $dt ? $dt->getTimestamp() : null\n );\n }", "public function dates($value) {\n return $this->setProperty('dates', $value);\n }", "public function toDate()\n {\n return $this->cast('date');\n }", "public function createDataRow()\n\t{\n\t\t$row = array() ;\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\t$row[$field] = $this->$field ;\n\t\t}\n\t\treturn $row ;\n\t}", "public function getArrayCopy() \n { \n $obj_vars = get_object_vars($this);\n $obj_vars['startDate'] = $obj_vars['startDate']->format('d/m/y');\n $obj_vars['endDate'] = $obj_vars['endDate']->format('d/m/y');\n return $obj_vars;\n // return get_object_vars($this);\n }", "public function toArray($params = array())\n\t{\n\t\t$metadata = self::em()->getRepository(static::class)->getMetadata();\n\t\t$columns = $metadata->getColumnsKeys();\n\t\t$data = array();\n\t\tforeach ($columns as $key) {\n\t\t\tif (array_key_exists($key, $this->_data) || array_key_exists($key, $this->_associations)) {\n\t\t\t\t$type = $metadata->getColumnType($key);\n\t\t\t\tif ($type == 'd' || $type == 't') {\n\t\t\t\t\t$d = $this->$key;\n\t\t\t\t\tif (!$d) {\n\t\t\t\t\t\t$value = NULL;\n\t\t\t\t\t}\n\t\t\t\t\telseif (isset($params['dateFormat'])) {\n\t\t\t\t\t\t$value = $d->format($params['dateFormat']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$value = (string)$d;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$value = $this->$key;\n\t\t\t\t}\n\n\t\t\t\t$data[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function dates()\n {\n if ($this->isRange()) {\n return $this->range;\n }\n\n return $this->date;\n }", "public function mapDateTimeHandlesDifferentFieldEvaluationsDataProvider() {}", "public function getDates()\n {\n $defaults = [static::CREATED_AT, static::UPDATED_AT];\n\n return array_merge($this->dates, $defaults);\n }", "public function getDates()\n {\n return ['created_at', 'updated_at'];\n }", "public function getDateTimes() {\n\n if ($this->dateTimes)\n return $this->dateTimes;\n\n $dts = array();\n\n if (!$this->value) {\n $this->dateTimes = null;\n $this->dateType = null;\n return null;\n }\n\n foreach(explode(',',$this->value) as $val) {\n list(\n $type,\n $dt\n ) = DateTime::parseData($val, $this);\n $dts[] = $dt;\n $this->dateType = $type;\n }\n $this->dateTimes = $dts;\n return $this->dateTimes;\n\n }", "public function provideData()\n {\n if ($this->computedData !== false) {\n return $this->computedData;\n }\n\n $data = array();\n\n foreach ($this->dataProvider->provideData() as $post) {\n $date = \\DateTime::createFromFormat('U', 0);\n if ($post->date() !== \"\") {\n $date = \\DateTime::createFromFormat('U', $post->date());\n }\n\n $year = $date->format('Y');\n $month = $date->format('m');\n $keyDate = \\DateTime::createFromFormat('Y-m',$year.'-'.$month);\n\n if (!isset($data[$year])) {\n $data[$year] = array(\n 'posts' => array(),\n 'months' => array(),\n 'date' => $keyDate\n );\n }\n\n if (!isset($data[$year]['months'])) {\n $data[$year]['months'] = array('posts' => array(), 'date' => $keyDate);\n }\n\n $data[$year]['posts'][] = $post;\n $data[$year]['months'][$month]['posts'][] = $post;\n }\n\n $this->computedData = $data;\n\n return $data;\n }", "protected static function transformRow($row)\n {\n foreach ($row as $key => $value) {\n if ($value instanceof DateTime) {\n $row[$key] = $value->format('Y-m-d H:i:s');\n } else {\n if (is_object($value) && method_exists($value, '__toString')) {\n $row[$key] = $value->__toString();\n } else {\n $row[$key] = $value;\n }\n }\n }\n\n return $row;\n }", "#[@test]\n public function selectDate() {\n $cmp= new Date('2009-08-14 12:45:00');\n $result= $this->db()->query('select cast(%s as date) as value', $cmp)->next('value');\n \n $this->assertInstanceOf('util.Date', $result);\n $this->assertEquals($cmp->toString('Y-m-d'), $result->toString('Y-m-d'));\n }", "public function setValue($val) {\n\t\t$locale = new Zend_Locale($this->locale);\n\t\t//Debug::dump($val);\n\t\tif(empty($val)) {\n\t\t\t$this->value = null;\n\t\t\t$this->valueObj = null;\n\t\t} else {\n\t\t\tif($this->getConfig('dmyfields')) {\n\t\t\t\tuser_error(\"MultiDateField doen't work with separate fields for day/month/year\");\n\t\t\t} else {\n\t\t\t\tif(!empty($val)){\n\t\t\t\t\t// Setting in corect locale.\n\t\t\t\t\t$first = true;\n\t\t\t\t\t$valueArr = array();\n\t\t\t\t\tforeach(explode(self::$dbseparator, $val) as $ts){\n\t\t\t\t\t\t//Debug::dump($ts);\n\t\t\t\t\t\tif(Zend_Date::isDate(trim($ts), $this->getConfig('dateformat'), $locale)) {\n\t\t\t\t\t\t\t//Debug::dump('isdate');\n\t\t\t\t\t\t\t$dateobj = new Zend_Date(trim($ts), $this->getConfig('dateformat'), $locale);\n\t\t\t\t\t\t\t$valueArr[] = $dateobj->get($this->getConfig('dateformat'), $locale);\n\t\t\t\t\t\t\tif($first){ // reset array\n\t\t\t\t\t\t\t\t$this->valueObj = array($dateobj);\n\t\t\t\t\t\t\t} else { // add to array\n\t\t\t\t\t\t\t\t$this->valueObj[] = $dateobj;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\t\t\telse if(Zend_Date::isDate(trim($ts), $this->getConfig('datavalueformat'))) {\n\t\t\t\t\t\t\t//Debug::dump('isodate');\n\t\t\t\t\t\t\t$dateobj = new Zend_Date(trim($ts), $this->getConfig('datavalueformat'));\n\t\t\t\t\t\t\t$valueArr[] = $dateobj->get($this->getConfig('dateformat'), $locale);\n\t\t\t\t\t\t\tif($first){ // reset array\n\t\t\t\t\t\t\t\t$this->valueObj = array($dateobj);\n\t\t\t\t\t\t\t} else { // add to array\n\t\t\t\t\t\t\t\t$this->valueObj[] = $dateobj;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$first = false;\n\t\t\t\t\t}\n\t\t\t\t\t// Join (implode) all together into $this->value string\n\t\t\t\t\t$this->value = implode(\n\t\t\t\t\t\t\t($this->getConfig('separator') ? $this->getConfig('separator') : ', '), \n\t\t\t\t\t\t\t$valueArr);\n\t\t\t\t}\n\t\t\t\t// this will probably never be executed in MultiDatefield, invalid dates will be discarded\n\t\t\t\telse {\n\t\t\t\t\t$this->value = $val;\n\t\t\t\t\t$this->valueObj = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public function datesProvider(): array\n {\n return [\n // Time Dates Match?\n ['January 1st 2018', ['2018-01-01'], true],\n ['January 1st 2018', ['2018-01-02'], false],\n ['January 1st 2018', ['2018-02-01'], false],\n ['January 1st 2018', ['2019-01-01'], false],\n ['January 2nd 2018', ['2018-01-01'], false],\n ['February 1st 2018', ['2018-02-01'], true],\n ['January 1st 2019', ['2019-01-01'], true],\n ['January 1st 2018', ['2018-01-01', '2018-05-23'], true],\n ['January 1st 2018', ['2018-01-02', '2018-01-01'], true],\n ['January 1st 2018', ['2018-02-01', '2018-01-01'], true],\n ['January 1st 2018', ['2019-01-01', '2018-01-01'], true],\n ['January 2nd 2018', ['2018-01-01', '2018-01-02'], true],\n ['February 1st 2018', ['2018-02-01', '2019-02-01'], true],\n ['January 1st 2019', ['2019-01-01', '2019-02-01'], true],\n ['February 29th 2020', ['2020-02-29'], true],\n ['February 29th 2020', ['2020-03-01'], false],\n ];\n }", "private function getTemporalDateFieldsEvents()\r\n\t{\r\n\t\t$temporalDateFieldsEvents = array();\r\n\t\t$sql = \"select distinct event_id, temporal_field from redcap_ddp_mapping \r\n\t\t\t\twhere project_id = \" . $this->project_id . \" and temporal_field is not null\";\r\n\t\t$q = db_query($sql);\r\n\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t$temporalDateFieldsEvents[$row['event_id']][$row['temporal_field']] = true;\r\n\t\t}\r\n\t\treturn $temporalDateFieldsEvents;\r\n\t}", "public function getResultDate(array $result)\n\t{\n\t\treturn $result['quote_date'];\n\t}", "public function CreateSelectArray()\n {\n\t\t//Make the array relative to today.... ill do later.\n\t\t$this->TodayDate = \"\";\n\t\t$this->TodaysDate = $this->GetTodaysDate();\t \t\n\t\t$days = 0;\t\t\n \n\t\t$LISTofDATES = [];\n\t\t\n\t\tfor($ya = 2020; $ya < 2040; $ya++) {\n\t\t\t$year = \"\".$ya.\"\";\n\t\t\t$LISTofDATES[$year] = [ \"January\" => 0, \"February\" => 0, \"March\" => 0, \"April\" => 0, \"May\" => 0, \"June\" => 0, \"July\" => 0, \"August\" => 0, \"September\" => 0, \"October\" => 0, \"November\" => 0, \"December\" => 0 ];\t \n\t\t}\n\n\t\tforeach ( $LISTofDATES as $Year => $Months )\n\t\t{\t\t\t\n\t\t\tfor( $Month = 1; $Month <= 12; $Month++ )\n\t\t\t{\n\t\t\t\tif ( $Month == 1 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['January'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 2 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['February'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 3 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['March'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 4 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['April'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 5 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['May'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 6 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['June'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 7 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['July'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 8 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['August'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 9 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['September'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 10 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['October'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 11 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['November']= $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 12 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['December'] = $days;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\t \n\t\t}//For each Year done\t\t\n\t\t/*Should have a fully populated array of days for each month in 2 years*/\t\t\n\t\treturn json_encode($LISTofDATES);\t\t\t\t\n }", "public function getAllSortByDate()\n\t{\n\t\t$table = \"\";\n\t\t$table = $this->getTableName();\n\t\t$db_connection = get_db_connection();\n\t\t$dataArray = array();\n\t\t\n\t\t$query = \"select * from $table order by year_posted, month_posted\";\t\t\n\t\t$result = mysqli_query($db_connection, $query);\n\t\t$dataArray = $this->getData($result, $db_connection);\n\t\tmysqli_close($db_connection);\n\t\t\n\t\treturn $dataArray;\n\t}", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "public function db2value($rec)\n {\n $value = $rec[$this->fieldName()]; // in the form YYYY-- or YYYY-MM- or YYYY-MM-DD\n if (empty($value)) {\n return null;\n }\n if (strlen($value) == 6) {\n return ['year' => substr($value, 0, 4), 'month' => '', 'day' => ''];\n }\n if (strlen($value) == 8) {\n return ['year' => substr($value, 0, 4), 'month' => substr($value, 5, 2), 'day' => ''];\n }\n if (strlen($value) == 10) {\n return ['year' => substr($value, 0, 4), 'month' => substr($value, 5, 2), 'day' => substr($value, 8, 2)];\n }\n Tools::atkwarning(\"FuzzyDateAttribute(\".$this->fieldName().\")Unable to decode database value '$value'.\");\n return null;\n }", "public function getDataWithTypeDate() {}", "protected function createModel()\n {\n $groupby['period_1'] = new \\Zend_Db_Expr(\"YEAR($this->dateFrom)\");\n\n $date = new \\MUtil_Date();\n\n switch ($this->dateType) {\n case 'D':\n $keyCount = 1;\n $groupby['period_1'] = new \\Zend_Db_Expr(\"CONVERT($this->dateFrom, DATE)\");\n\n $date->setTime(0);\n $date->addDay($this->dateFactor - $this->dateRange);\n\n $start = $date->getIso();\n for ($i = -$this->dateRange; $i <= $this->dateRange; $i++) {\n if (0 == $i) {\n $this->dateCurrentStart = clone $date;\n $this->dateCurrentEnd = clone $date;\n $this->dateCurrentEnd->setTimeToDayEnd();\n }\n\n $values = array();\n $values['period_1'] = $date->get('yyyy-MM-dd');\n $values['range'] = $i;\n $requiredRows[$i] = $values;\n $date->addDay(1);\n }\n $date->subSecond(1);\n $end = $date->getIso();\n break;\n\n case 'W':\n $keyCount = 2;\n\n // Use MONDAY as start of week\n $groupby['period_1'] = new \\Zend_Db_Expr(\"substr(YEARWEEK(gto_valid_from, 3),1,4)\");\n //$groupby['period_1'] = new \\Zend_Db_Expr(\"YEAR($this->dateFrom) - CASE WHEN WEEK($this->dateFrom, 1) = 0 THEN 1 ELSE 0 END\");\n $groupby['period_2'] = new \\Zend_Db_Expr(\"WEEK($this->dateFrom, 3)\");\n\n $date->setWeekday(1);\n $date->setTime(0);\n $date->addWeek($this->dateFactor - $this->dateRange);\n\n $start = $date->getIso();\n for ($i = -$this->dateRange; $i <= $this->dateRange; $i++) {\n if (0 == $i) {\n $this->dateCurrentStart = clone $date;\n $this->dateCurrentEnd = clone $date;\n $this->dateCurrentEnd->addWeek(1)->subSecond(1);\n }\n\n $values = array();\n $values['period_1'] = $date->get(\\Zend_Date::YEAR);\n $values['period_2'] = (int) $date->get(\\Zend_Date::WEEK); // Use constant but drop leading zero\n // When monday is in the previous year, add one to the year\n if ($date->get(\\Zend_Date::DAY_OF_YEAR)>14 && $date->get(\\Zend_Date::WEEK) == 1) {\n $values['period_1'] = $values['period_1'] + 1;\n }\n $values['range'] = $i;\n $requiredRows[$i] = $values;\n $date->addWeek(1);\n }\n $date->subSecond(1);\n $end = $date->getIso();\n break;\n\n case 'M':\n $keyCount = 2;\n $groupby['period_2'] = new \\Zend_Db_Expr(\"MONTH($this->dateFrom)\");\n\n $date->setDay(1);\n $date->setTime(0);\n $date->addMonth($this->dateFactor - $this->dateRange);\n\n $start = $date->getIso();\n for ($i = -$this->dateRange; $i <= $this->dateRange; $i++) {\n if (0 == $i) {\n $this->dateCurrentStart = clone $date;\n $this->dateCurrentEnd = clone $date;\n $this->dateCurrentEnd->addMonth(1)->subSecond(1);\n }\n\n $values = array();\n $values['period_1'] = $date->get(\\Zend_Date::YEAR);\n $values['period_2'] = $date->get(\\Zend_Date::MONTH);\n $values['range'] = $i;\n $requiredRows[$i] = $values;\n $date->addMonth(1);\n }\n $date->subSecond(1);\n $end = $date->getIso();\n break;\n\n case 'Y':\n $keyCount = 1;\n $date->setDay(1);\n $date->setMonth(1);\n $date->setTime(0);\n $date->addYear($this->dateFactor - $this->dateRange);\n $start = $date->getIso();\n for ($i = -$this->dateRange; $i <= $this->dateRange; $i++) {\n if (0 == $i) {\n $this->dateCurrentStart = clone $date;\n $this->dateCurrentEnd = clone $date;\n $this->dateCurrentEnd->addYear(1)->subSecond(1);\n }\n\n $values = array();\n $values['period_1'] = $date->get(\\Zend_Date::YEAR);\n $values['range'] = $i;\n $requiredRows[$i] = $values;\n $date->addYear(1);\n }\n $date->subSecond(1);\n $end = $date->getIso();\n break;\n\n default:\n throw new \\Gems_Exception_Coding('Incorrect date_type value: ' . $this->dateType);\n }\n $where = \"$this->dateFrom BETWEEN '$start' AND '$end'\";\n\n for ($i = -$this->dateRange; $i <= $this->dateRange; $i++) {\n $requiredRows[$i]['date_factor'] = $this->dateFactor + $i;\n $requiredRows[$i]['df_link'] = null;\n $requiredRows[$i]['df_label'] = null;\n }\n if ($this->dateRange > 0) {\n $requiredRows[-$this->dateRange]['df_link'] = $this->dateFactor - ($this->dateRange * 2);\n $requiredRows[-$this->dateRange]['df_label'] = $this->_('<<');\n $requiredRows[ $this->dateRange]['df_link'] = $this->dateFactor + ($this->dateRange * 2);\n $requiredRows[ $this->dateRange]['df_label'] = $this->_('>>');\n if ($this->dateRange > 1) {\n $i = intval($this->dateRange / 2);\n $requiredRows[-$i]['df_link'] = $this->dateFactor - 1;\n $requiredRows[-$i]['df_label'] = $this->_('<');\n $requiredRows[ $i]['df_link'] = $this->dateFactor + 1;\n $requiredRows[ $i]['df_label'] = $this->_('>');\n }\n $requiredRows[ 0]['df_link'] = $this->dateFactor ? '0' : null;\n $requiredRows[ 0]['df_label'] = $this->_('Now!');\n }\n\n if ($this->dateFactor) {\n $today = new \\MUtil_Date();\n $this->dateFactorChanges['D'] = $this->dateCurrentStart->diffDays($today);\n $this->dateFactorChanges['W'] = $this->dateCurrentStart->diffWeeks($today);\n $this->dateFactorChanges['M'] = $this->dateCurrentStart->diffMonths($today);\n $this->dateFactorChanges['Y'] = $this->dateCurrentStart->diffYears($today);\n } else {\n $this->dateFactorChanges = array_fill_keys(array('D', 'W', 'M', 'Y'), 0);\n }\n // \\MUtil_Echo::track($requiredRows);\n // \\MUtil_Echo::rs($start, $end, $where);\n\n $select = new \\Zend_Db_Select($this->db);\n $select->from($this->dataTableName, $groupby + $this->getDbFields());\n $select->where($where);\n $select->group($groupby);\n $select->order($groupby);\n\n $this->processSelect($select);\n\n // \\MUtil_Echo::r((string) $select);\n\n $model = new \\MUtil_Model_SelectModel($select, $this->dataTableName);\n\n $this->processModel($model);\n \n // Display by column cannot use formatFunction as it is a simple repeater\n // $model->set('duration_avg', 'formatFunction', $this->util->getLocalized()->formatNumber);\n\n $transformer = new \\MUtil_Model_Transform_RequiredRowsTransformer();\n $transformer->setDefaultRow($this->getDefaultRow());\n $transformer->setRequiredRows($requiredRows);\n $transformer->setKeyItemCount($keyCount);\n $model->addTransformer($transformer);\n\n return $model;\n }", "public static function dates2timestamp( &$v, $k ) {\n\t\t$v['start_date'] = strtotime($v['start_date']);\n\t\t$v['end_date'] = strtotime($v['end_date']);\n\t}", "public function getTemporalColumns();", "public function arrayToDate($array){\n if ($array['year'] === '' || $array['month'] === ''|| $array['day'] === '' ){\n return null;\n }else{\n $y = $array['year'] ?? '0000';\n $m = $array['month'] ?? '00';\n $d = $array['day'] ?? '00';\n\n return new \\DateTime($y.'-'.$m.'-'.$d);\n }\n\n }", "private static function convertDateTimeArray($date, $format, $exceptions) {\n\n $date_array = [];\n\n $map = [\n 'Y' => 'year',\n 'm' => 'month',\n 'd' => 'day',\n 'H' => 'hour',\n 'i' => 'minute',\n 's' => 'second',\n 'O' => 'offset'\n ];\n\n foreach($map as $date_part_key => $date_part_name) {\n if(array_key_exists($date_part_key, $exceptions)) {\n // Use the exception value if it exists, and continue to stop further execution\n $date_array[$date_part_name] = $exceptions[$date_part_key];\n continue;\n }\n // No exception was provided for this date_part_key, check if it is required for the format\n if(strpos($format, $date_part_key) !== false) {\n $date_array[$date_part_name] = $date->format($date_part_key);\n // Offset can be string, but others are all integers\n if($date_part_key !== 'O') $date_array[$date_part_name] = (int)$date_array[$date_part_name]; \n }\n }\n\n $date_array['iso8601'] = $date->format($format);\n\n return $date_array;\n\n }", "public function getDateIndexList() {\n\n static $dateIndexes = null;\n if (null === $dateIndexes) {\n $dateIndexes = array();\n foreach ($this->getIndexList() as $indexName=>$indexInfos) {\n if ($indexInfos['kind'] === 'date') {\n $dateIndexes[] = $indexName;\n }\n }\n }\n return $dateIndexes;\n }", "private function getCalendarData($data, $date)\n {\n $calendarData = array();\n // loop through the date data\n foreach ($date as $key => $timestampRecords) {\n // loop throught the timestamp records\n foreach ($timestampRecords as $timestampKeys => $timestamp) {\n // check first if there is no timestamp data\n if (empty($timestamp)) {\n $calendarData[$key][$timestampKeys][] = array();\n continue;\n }\n\n // check if there's no data from the database\n if (empty($data)) {\n $calendarData[$key][$timestampKeys][] = date('Y-m-d', strtotime($timestamp));\n continue;\n }\n\n // now start mapping the data based from the timestamp\n foreach ($data as $dataKey => $dataVal) {\n $day = date('Y-m-d', strtotime($dataVal->date));\n\n // if they do not match then just put it as a date.\n if ($timestamp !== $day) {\n $calendarData[$key][$timestampKeys][] = date('Y-m-d', strtotime($timestamp));\n continue;\n }\n\n // now if values match then put the corresponding data on based from the timestamp.\n $infos = $dataVal->info;\n $calendarData[$key][$timestampKeys][(int)$infos] = $dataVal;\n }\n }\n }\n\n return $calendarData;\n }", "public static function formatDates($data){\n\t\tif(!isset($data)){\n\t\t\tthrow new InvalidArgumentException(\"the object to format dates is null \");\n\t\t}\n\t\t\n\t\tif(!is_object($data) && !is_array($data) ){\n\t\t\tthrow new InvalidArgumentException(\"the parameter to format dates is not a object or array\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tforeach($data as $k => $v){\n\t\t\tif(PayURequestObjectUtil::isKeyDateField($k)){\n\t\t\t\tif(is_array($data)){\n\t\t\t\t\t$miliseconds = $data[$k];\n\t\t\t\t\t$data[$k] = PayURequestObjectUtil::getDate($miliseconds); \n\t\t\t\t}else if(is_object($data)){\n\t\t\t\t\t$miliseconds = $data->$k;\n\t\t\t\t\t$data->$k = PayURequestObjectUtil::getDate($miliseconds);\n\t\t\t\t}\n\t\t\t}else if(is_object($data) && (is_object($data->$k) || is_array($data->$k))){\n\t\t\t\t$data->$k = PayURequestObjectUtil::formatDates($data->$k);\n\t\t\t}else if(is_array($data) && (is_object($data[$k]) || is_array($data[$k]))){\n\t\t\t\t$data[$k] = PayURequestObjectUtil::formatDates($data[$k]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "function process_date(&$list, $field, $add_age = false)\n{\n\t$today = strtotime('2018-09-14');\t// RAR was 'today'\n\tforeach ($list as $index => $row) {\n\t\t$d = $row[$field];\n\t\tif (empty ($d) || ($d == '0000-00-00'))\n\t\t\t$d = '';\n\t\telse\n\t\t\t$d = date ('j M y', strtotime ($d));\n\t\t$list[$index][$field] = $d;\n\n\t\tif ($add_age) {\n\t\t\tif (empty($d)) {\n\t\t\t\t$a = '';\n\t\t\t\t$m = '';\n\t\t\t} else {\n\t\t\t\t$a = floor (($today - strtotime($d)) / 86400);\n\t\t\t\t$m = sprintf ('%.1f', $a / 30.44);\n\t\t\t}\n\n\t\t\t$list[$index]['age'] = $a;\n\t\t\t$list[$index]['months'] = $m;\n\t\t}\n\t}\n\n}", "private function formatTourDates($result) {\n\t\t$formatedResults = array();\n\n\t\tforeach($result as $item) {\n\t\t\t$item->days = maybe_unserialize($item->days);\n\n\t\t\tif(!array_key_exists($item->id, $formatedResults)) {\n\t\t\t\t$timeInstance = array();\n\n\t\t\t\tif($item->time_id && $item->time) {\n\t\t\t\t\t$timeInstance['id'] = $item->time_id;\n\t\t\t\t\t$timeInstance['time'] = $item->time;\n\n\t\t\t\t\t$item->times = array($timeInstance);\n\t\t\t\t}\n\n\t\t\t\tunset($item->time_id);\n\t\t\t\tunset($item->time);\n\n\t\t\t\t$formatedResults[$item->id] = $item;\n\t\t\t} else {\n\n\t\t\t\tif($item->time_id && $item->time) {\n\t\t\t\t\t$timeInstance = array(\n\t\t\t\t\t\t'id' => $item->time_id,\n\t\t\t\t\t\t'time' => $item->time\n\t\t\t\t\t);\n\n\t\t\t\t\t$formatedResults[$item->id]->times[] = $timeInstance;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $formatedResults;\n\t}", "public function afterFind(){\n // Format dates based on the locale\n foreach($this->metadata->tableSchema->columns as $columnName => $column){\n if ($column->dbType == 'date'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd\");\n $this->$columnName = ($aux != null )?date('d/m/Y',$aux ):null;\n }elseif ($column->dbType == 'datetime'){\n $aux= CDateTimeParser::parse($this->$columnName,\"yyyy-MM-dd HH:mm:ss\");\n $this->$columnName = ($aux != null )?date('d/m/Y H:i:s',$aux ):null;\n }\n }\n }", "public function getDates()\n\t{\n\t\treturn [\n\t\t\t'created_at',\n\t\t\t'updated_at',\n\t\t\t'deleted_at',\n\t\t\t'published_at',\n\t\t\t'registered_at',\n\t\t\t'confirmed_at',\n\t\t\t'blocked_at',\n\t\t];\n\t}", "protected static function convertDateArray($arr) {\n\t\t$date = new DateTime($arr['date']);\n\t\t$date->setTimezone(new DateTimeZone($arr['timezone']));\n\n\t\treturn $date;\n\t}", "public function setPropertyValues($values)\n\t{\n\t\tif ($values != null && is_array($values))\n\t\t{//print_r($values);\n\t\t\t$rf = new ReflectionClass($this);\n\t\t\t$props = $rf->getProperties();\n\t\t\tforeach($props as $prop)\n\t\t\t{\n\t\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\t\t$datatype = AttributeReader::PropertyAttributes($this,$prop->getName())->DataType;\n\t\t\t\t$required = AttributeReader::PropertyAttributes($this,$prop->getName())->Required;\n\n\t\t\t\tif ($column != null && $column != \"\" && array_key_exists($column,$values))//isset($values[$column])\n\t\t\t\t{\n\t\t\t\t\t//if($prop->getName()=='salvage_date')var_dump(__FILE__,__LINE__,$values[$column],$datatype,$required,isset($values[$column]),\"<br>\");\n\t\t\t\t\t\n\t\t\t\t\tif ($datatype == \"datetime\")\n\t\t\t\t\t{//echo $values[$column].\", \";\n\t\t\t\t\t\t//$trace=debug_backtrace();if(count($trace)>0)print_r($trace);//,$t['file'],$trace['line']);\n\t\t\t\t\t\t//if (date(\"Y-m-d\", strtotime($values[$column])) != \"1969-12-31\")\n\t\t\t\t\t\tif (trim($values[$column]) != \"\")\n\t\t\t\t\t\t\t$prop->setValue($this, date(\"Y-m-d G:i:s\", strtotime(preg_replace(\"/:[0-9]{3}/\",\" \",$values[$column])))); // remove :000 at the end of dates\n\t\t\t\t\t\t\t//$prop->setValue($this, date(\"Y-m-d\", strtotime($values[$column])));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$prop->setValue($this, \"\"); // set to empty (and eventually to NULL) if no date is provided\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//if($prop->getName()=='salvage_date')echo(var_dump($values[$column],$datatype,$required));\n\t\t\t\t\t\t$prop->setValue($this,trim($values[$column]));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//if($prop->getName()=='salvage_date')var_dump($prop->getValue($obj),$datatype,$required,\"<br>\");\n\t\t\t\t\t//$prop->setValue($this,trim($values[$column]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//throw new Exception(\"Values passed are not valid in array format\");\n\t\t}\n\t}", "static function splitMysqlDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn array(\r\n\t\t\t'year' => date('Y', $date),\r\n\t\t\t'month' => date('m', $date),\r\n\t\t\t'day' => date('d', $date),\r\n\t\t);\r\n\t}", "function get_datevalues(&$results, $params, $downzoom) {\r\n\n\n$datevalues = array();\r\n\r\n\tforeach ($results->facet_counts->facet_ranges->file_modified_dt->counts as $facet=>$count) {\r\n\t\t$newstart = $facet;\r\n\r\n\t\tif ($downzoom=='decade') {\r\n\t\t\t$newend = $facet . '+10YEARS';\r\n\r\n\t\t\t$value = substr($facet, 0, 4);\r\n\r\n\t\t} elseif ($downzoom=='year') {\r\n\t\t\t$newend = $facet . '+1YEAR';\r\n\t\t\t$value = substr($facet, 0, 4);\r\n\r\n\t\t} elseif ($downzoom=='month') {\r\n\t\t\t$newend = $facet . '+1MONTH';\r\n\t\t\t$value = substr($facet, 5, 2);\r\n\r\n\t\t} elseif ($downzoom=='day') {\r\n\t\t\t$newend = $facet . '+1DAY';\r\n\t\t\t$value = substr($facet, 8, 2);\r\n\r\n\t\t} elseif ($downzoom=='hour') {\r\n\t\t\t$newend = $facet . '+1HOUR';\r\n\t\t\t$value = substr($facet, 11, 2);\r\n\r\n\t\t} elseif ($downzoom=='minute') {\r\n\t\t\t$newend = $facet . '+1MINUTE';\r\n\t\t\t$value = substr($facet, 14, 2);\r\n\r\n\t\t} else {\r\n\t\t\t$newend = $facet . '+1YEAR';\r\n\t\t\t$value = $facet;\r\n\t\t};\r\n\r\n\r\n\t\t$link = buildurl($params,'start_dt', $newstart, 'end_dt', $newend, 'zoom', $downzoom, 's', false);\r\n\r\n\t\t$datevalues[] = array('label'=> $value, 'count' => $count, 'link' => $link);\r\n\t}\r\n\n\treturn $datevalues;\r\n}", "function getDate() {\n\t\treturn $this->data_array['adddate'];\n\t}", "protected function set_date_column( $column, $value ) {\n\t\tif ( is_a( $value, 'DateTime' ) ) {\n\t\t\t// convert to UTC time\n\t\t\t$utc_date = new DateTime();\n\t\t\t$utc_date->setTimestamp( $value->getTimestamp() );\n\t\t\t$this->set_prop( $column, $utc_date->format( 'Y-m-d H:i:s' ) );\n\t\t}\n\t\telseif ( $value ) {\n\t\t\t$this->set_prop( $column, ES_Clean::string( $value ) );\n\t\t}\n\t}", "function get_imc($dataSet) {\n $index_imc = 2;\n $column_imc = $dataSet[0][$index_imc];\n $imc = array();\n for ($i = 1; $i < count($dataSet); $i++){\n $daily_imc = $dataSet[$i][$column_imc];\n $imc[] = array(\"date\" => $dataSet[$i][\"date\"],\n $dataSet[0][$index_imc] => $daily_imc);\n }\n return $imc;\n}", "public function toArray()\n {\n $objectArray = get_object_vars($this);\n\n //Specific data\n if (null !== $objectArray['dateSended']) {\n $objectArray['dateSended'] = $objectArray['dateSended']->format('Y-m-d');\n }\n if (null !== $objectArray['timeSended']) {\n $objectArray['timeSended'] = $objectArray['timeSended']->format('H:i:s');\n }\n\n return $objectArray;\n }", "private function _convertDateTimes(&$value, $timezone = null)\n\t{\n\t\tif (is_array($value) && ($columns = $this->getSettings()->columns))\n\t\t{\n\t\t\tforeach ($value as &$row)\n\t\t\t{\n\t\t\t\tforeach ($columns as $colId => $col)\n\t\t\t\t{\n\t\t\t\t\tif ((array_key_exists($colId, $row)) && (in_array($col['type'], array('datetime', 'date', 'time'))))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((is_string($row[$colId]) && $row[$colId]) || (is_array($row[$colId]) && (isset($row[$colId]['date']) || isset($row[$colId]['time']))))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$row[$colId] = DateTime::createFromString($row[$colId], $timezone);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$row[$colId] = '';\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}", "function formatDateParams() {\n $session = CRM_Core_Session::singleton();\n $dateType = $session->get('dateTypes');\n $setDateFields = array_intersect_key($this->_params, array_flip($this->_dateFields));\n foreach ($setDateFields as $key => $value) {\n CRM_Utils_Date::convertToDefaultDate($this->_params, $dateType, $key);\n $this->_params[$key] = CRM_Utils_Date::processDate($this->_params[$key]);\n }\n }", "public function adaptaFechas($resultados){\n\n foreach($resultados as $resultado ){\n $fecha=Carbon::createFromFormat('Y-m-d H:i:s', $resultado->fecha);\n $resultado->fecha=$fecha->format('d/m/Y');\n }\n\n }", "function makeArray($res,$from,$to,$exc_entries){\n /* order result by days */\n\t\t$entries=array();\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$row = $this->setItems($row, $from, $to, $exc_entries);\n if (is_array($row)) {\n\t\t\t\tforeach($row as $item){\n\t\t\t\t\t$d = strftime('%d', $item['begin']);\n\t\t\t\t\t$m = strftime('%m', $item['begin']);\n\t\t\t\t\t $entries[$m][$d][] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $entries;\n\t}", "public function convertToDate($varValue,$objDC=null)\n\t{\n\t\tif(empty($varValue))\n\t\t{\n\t\t\treturn $varValue;\n\t\t}\n\t\t\n\t\t$varValue = deserialize($varValue);\n\t\t\n\t\tif(!is_array($varValue))\n\t\t{\n\t\t\t$varValue = explode(',',$varValue);\n\t\t}\n\t\t\n\t\t$strFormat = 'm/d/Y';\n\t\tif(strlen($objDC->customFormat) > 0)\n\t\t{\n\t\t\t$strFormat = $objDC->customFormat;\n\t\t}\n\t\t\n\t\t$arrReturn = array();\n\t\tforeach($varValue as $value)\n\t\t{\n\t\t\t// convert unix timestamps back to date format\n\t\t\tif(is_int((int)$value) && is_numeric($value))\n\t\t\t{\n\t\t\t\t$value = \\System::parseDate($strFormat,$value);\n\t\t\t}\n\t\t\t$arrReturn[] = $value;\n\t\t}\n\t\t\n\t\t// sort values\n\t\tsort($arrReturn);\n\t\t\n\t\treturn $arrReturn;\n\t}", "public static function getDateFormats()\n {\n return array( 'm/d/y' => 'mm/dd/yy', 'd/m/y' => 'dd/mm/yy' );\n }", "public function column_date($post)\n {\n }", "public function toArray() {\n\t\ttry {\n\t\t\t// Setup\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach($this->_columns as $column) {\n\t\t\t\t$result[$column->name] = $this->_data[$column->name];\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('There was a problem converting the Record to an array.');\n\t\t}\n\t}", "public function column_date($post)\n {\n }", "public function selectDate($did, $version, $fkTable)\n {\n $qq = 'select_date';\n\n $query = 'select\n aa.id, aa.version, aa.ic_id, aa.is_range, aa.descriptive_note,\n aa.from_date, aa.from_bc, aa.from_not_before, aa.from_not_after, aa.from_original,\n aa.to_date, aa.to_bc, aa.to_not_before, aa.to_not_after, aa.to_original, aa.fk_table, aa.fk_id,\n aa.from_type,aa.to_type\n from date_range as aa,\n (select id,max(version) as version from date_range where fk_id=$1 and fk_table=$3 and version<=$2 group by id) as bb\n where not is_deleted and aa.id=bb.id and aa.version=bb.version';\n\n $this->sdb->prepare($qq, $query);\n\n $result = $this->sdb->execute($qq, array($did, $version, $fkTable));\n $all = array();\n while($row = $this->sdb->fetchrow($result))\n {\n array_push($all, $row);\n }\n $this->sdb->deallocate($qq);\n return $all;\n }", "protected function get_dates(): array {\n global $CFG;\n\n require_once($CFG->dirroot . '/mod/assign/locallib.php');\n\n $course = get_course($this->cm->course);\n $context = \\context_module::instance($this->cm->id);\n $assign = new \\assign($context, $this->cm, $course);\n\n $timeopen = $this->cm->customdata['allowsubmissionsfromdate'] ?? null;\n $timedue = $this->cm->customdata['duedate'] ?? null;\n\n $activitygroup = groups_get_activity_group($this->cm, true);\n if ($activitygroup) {\n if ($assign->can_view_grades()) {\n $groupoverride = \\cache::make('mod_assign', 'overrides')->get(\"{$this->cm->instance}_g_{$activitygroup}\");\n if (!empty($groupoverride->allowsubmissionsfromdate)) {\n $timeopen = $groupoverride->allowsubmissionsfromdate;\n }\n if (!empty($groupoverride->duedate)) {\n $timedue = $groupoverride->duedate;\n }\n }\n }\n\n $now = time();\n $dates = [];\n\n if ($timeopen) {\n $openlabelid = $timeopen > $now ? 'activitydate:submissionsopen' : 'activitydate:submissionsopened';\n $date = [\n 'label' => get_string($openlabelid, 'mod_readaloud'),\n 'timestamp' => (int) $timeopen,\n ];\n if ($course->relativedatesmode && $assign->can_view_grades()) {\n $date['relativeto'] = $course->startdate;\n }\n $dates[] = $date;\n }\n\n if ($timedue) {\n $date = [\n 'label' => get_string('activitydate:submissionsdue', 'mod_readaloud'),\n 'timestamp' => (int) $timedue,\n ];\n if ($course->relativedatesmode && $assign->can_view_grades()) {\n $date['relativeto'] = $course->startdate;\n }\n $dates[] = $date;\n }\n\n return $dates;\n }", "public function findSaneparDate(){\n $data = $this->sanepar->findSaneparDate();\n foreach($data as $dt){\n $data[$dt] = substr($dt,0,4) . '/' . substr($dt,4,5);\n }\n return $data;\n }", "private static function addDateValues($args, array $post_types) {\n if (!empty($args['values'])) return $args;\n\n $date_format = (empty($args['date_format'])) ? false : $args['date_format'];\n $date_type = (empty($args['date_type'])) ? 'year' : $args['date_type'];\n\n $args['values'] = self::getDates($date_type, $date_format, $post_types);\n return $args;\n }", "public function beforeSave() {\n foreach ($this->dateFields as $item) {\n $this->data[$this->name][$item] = $this->_date4Db($this->data[$this->name][$item]);\n }\n return parent::beforeSave();\n }", "function oa_date_views_data_alter(&$data) {\n foreach ($data as $table => $data_table) {\n foreach ($data_table as $field => $data_field) {\n if (!empty($data_field['field']['handler']) && $data_field['field']['handler'] === 'views_handler_field_date') {\n $data[$table][$field]['field']['handler'] = 'oa_date_handler_field_date';\n }\n }\n }\n}", "function getDateFilterSelectedRange() {\n $from = $this->getAdditionalProperty('date_filter_from');\n $to = $this->getAdditionalProperty('date_filter_to');\n \n return $from && $to ? array(new DateValue($from), new DateValue($to)) : array(null, null);\n }" ]
[ "0.6017713", "0.5983906", "0.5954415", "0.59288406", "0.58567744", "0.58438146", "0.58105385", "0.5755734", "0.57237107", "0.56834817", "0.5656623", "0.56048656", "0.5531684", "0.5494284", "0.5487669", "0.5473291", "0.54728496", "0.5461339", "0.5459324", "0.5450524", "0.5410763", "0.5402762", "0.5360699", "0.5348187", "0.5346843", "0.53414214", "0.5322926", "0.5308535", "0.52925783", "0.52813756", "0.52693605", "0.523526", "0.5214999", "0.521447", "0.5211718", "0.52095973", "0.52035475", "0.5186066", "0.5183085", "0.5161503", "0.51572526", "0.5150959", "0.51472664", "0.5146497", "0.5121913", "0.50941765", "0.5064247", "0.5049092", "0.50396174", "0.5013739", "0.50107425", "0.5003165", "0.49991468", "0.49983397", "0.49924743", "0.49914977", "0.49841493", "0.49786708", "0.49614736", "0.49558148", "0.4952237", "0.4949174", "0.49393365", "0.4936882", "0.49293205", "0.49255943", "0.49219668", "0.4918773", "0.49039593", "0.4903567", "0.4899311", "0.48972473", "0.48965666", "0.48685932", "0.4859844", "0.48523194", "0.48312932", "0.483083", "0.48303068", "0.48226196", "0.48190075", "0.48132536", "0.48122874", "0.48035324", "0.47947228", "0.47833127", "0.47815818", "0.47807068", "0.4768214", "0.47629273", "0.47599655", "0.47565573", "0.47556657", "0.47442272", "0.4742585", "0.47354972", "0.4728328", "0.47261924", "0.47218978", "0.47211984" ]
0.52105993
35
Transforms DB timestamp to normal date
protected function _isoToNormalDate($value, $dateFormat = null) { $zendDate = new Zend_Date( $value, Zend_Date::ISO_8601, Zend_Registry::get('Zend_Locale') //@todo: it seems I can remove this, because Zend gets this automatically ); if ($dateFormat) { return $zendDate->get($dateFormat); } return $zendDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function variant_date_from_timestamp($timestamp) {}", "function toDate ($timestamp)\n\t{\n\t\treturn date('Y-m-d', $timestamp);\n\t}", "function timestampToDate($t) {\n return date(\"d-m-Y\",$t);\n}", "private function ConvertPayPalTimestampToDBDateTime($timestamp)\n {\n\tif(strlen($timestamp) == 0) {\n return \"\";\n\t}\n\t\t\n\treturn gmdate('Y-m-d H:i:s', strtotime($timestamp));\n }", "function variant_date_to_timestamp($variant) {}", "function convertTimestamp($ugly){\n $date = new DateTime($ugly);\n return $date->format('l, F jS, Y');\n}", "protected function get_timestamp_as_date($timestamp)\n {\n }", "function datetime_unix2mysql($timestamp) {\n\treturn date('Y-m-d H:i:s', $timestamp);\n}", "function dateToCal($timestamp) {\nreturn date('Ymd\\THis', $timestamp);\n}", "function crystal_sqlite_from_unixtime($timestamp)\n {\n $timestamp = trim($timestamp);\n if (!preg_match(\"/^[0-9]+$/is\", $timestamp))\n $ret = strtotime($timestamp);\n else\n $ret = $timestamp;\n \n $ret = date(\"Y-m-d H:i:s\", $ret);\n crystal_sqlite_debug(\"FROM_UNIXTIME ($timestamp) = $ret\");\n return $ret;\n }", "function convertTimestamp($timestamp, $timezone = \"-0000\"){\r\n \treturn \"/Date($timestamp$timezone)/\";\r\n }", "function date_sql2timestamp($date)\r\n\t{\r\n\t\t$date = explode(\"-\", $date);\r\n\r\n\t\t$timestamp = mktime(0, 0, 0, $date[1], $date[2], $date[0]);\r\n\t\treturn $timestamp;\r\n\t}", "public function getDateInTimestamp(){\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));\n $timestamp = strtotime($this->_getData('date'));\n date_default_timezone_set($defaultTimeZone);\n return $timestamp;\n }", "public function unixTimeToDBTime($time) {\n return date(\"Y-m-d\", $time);\n }", "function convert_timestamp($timestamp){ \n $limit=date(\"U\"); \n $limiting=$timestamp-$limit; \n return date (\"Ymd\", mktime (0,0,$limiting)); \n}", "public static function timestampToDateTime($timestamp) {\n\t\treturn date(self::MYSQL_DATETIME_FORMAT, $timestamp);\n\t}", "function dbToUIdate() {\r\n\t\t\r\n\t\t$year = substr($this->event_date_time, -19, 4);\r\n\t\t$month = substr($this->event_date_time, -14, 2);\r\n\t\t$day = substr($this->event_date_time, -11, 2);\r\n\r\n\t\t$this->date = $month . \"/\" . $day . \"/\" . $year;\r\n\t\r\n\t}", "function ts2dt($timestamp) {\n $pieces = explode(\"_\",$timestamp);\n $date = new DateTime();\n $date->setDate($pieces[0],$pieces[1],$pieces[2]);\n $date->setTime($pieces[3],$pieces[4],$pieces[5]);\n return $date;\n}", "function TimeToDatabaseDate($unixtime = null)\n{\n $unixtime == null ? $unixtime = time() : $unixtime;\n return date(\"Y-m-d\", $unixtime);\n}", "function dateConvert($date,$format){\n //Casting created_at\n $date = new DateTime($date);\n $waktu = $date->Format($format);\n return $waktu;\n}", "public static function dbDateFormat($timestamp)\n\t{\n\t\treturn strftime(\"%Y-%m-%d %H:%M:%S\",$timestamp);\n\t}", "function convDate($theDate) {\r\n return date(\"Y-m-d H:i:s\", strtotime($theDate));\r\n}", "function timeStampToDateFR($timestamp) {\n return date('Y-m-d H:i:s', $timestamp);\n}", "static public function toDatetime($timestamp) {\r\n\t\tif ($timestamp === null) return null;\r\n\t\telse return \\date('Y-m-d H:i:s', $timestamp);\r\n\t}", "public static function database_datetime($unix_timestamp = NULL)\n\t{\n\t\tif (is_null($unix_timestamp)) {\n\t\t\t$unix_timestamp = time();\n\t\t}\n\n\t\treturn date('Y-m-d H:i:s', $unix_timestamp);\n\t}", "function toDateTime ($timestamp)\n\t{\n\t\treturn date('Y-m-d h:i:s', $timestamp);\n\t}", "static public function fromTimestamp($timestamp){\n\t\treturn self::getDatefromTimestamp($timestamp);\n\t}", "public function GetAsTimestamp(){\r\n\t\t\t$timestamp = null;\r\n\t\t\tif( $this->year !== null && $this->month !== null && $this->day !== null ){\r\n\t\t\t\t$timestamp = strtotime( $this->year . '/' . $this->month . '/' . $this->day . ' ' . $this->hours . ':' . $this->minutes . ':' . $this->seconds );\r\n\t\t\t}\r\n\t\t\treturn $timestamp;\r\n\t\t}", "function mysqldate($timestamp) {\n return \"'\" . date('Y-m-d H:i:s', $timestamp) . \"'\";\n}", "function str2DBDT($str)\n{\n $intTime = strtotime($str);\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}", "public static function toDate($ts){\n return date('d.m.Y',$ts); \n }", "public function getTimestamp()\n {\n return strtotime($this->getValue());\n }", "static public function getDateFromTimestamp($timestamp){\n\t\t// 32bit timestamp\n if(abs($timestamp)<=0x7FFFFFFF){\n\t\t\treturn new Date(date('Y-m-d', $timestamp));\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($timestamp, true);\n\t\t\t$fecha = $dateParts['year'].'-'.sprintf('%02s', $dateParts['mon']).'-'.sprintf('%02s', $dateParts['mday']);\n\t\t\treturn new Date($fecha);\n\t\t}\n\t}", "protected function formatTimestamp($timestamp)\n {\n if ($this->timestampType === 'date')\n {\n $timestamp = new MongoDate(round($timestamp));\n }\n else\n {\n if ($this->timestampType === 'string')\n {\n $timestamp = date('Y-m-d H:i:s', $timestamp);\n }\n else\n {\n $timestamp = $timestamp;\n }\n }\n\n return $timestamp;\n }", "function time_2_timestamp(&$time) {\r\n if ($time instanceof \\DateTime)\r\n $time = $time->getTimestamp();\r\n else\r\n $time = strtotime($time);\r\n}", "function datetime_sql2timestamp($datetime)\r\n\t{\r\n\t\t$datetime = explode(\" \", $datetime);\r\n\t\t$datetime[\"date\"] = explode(\"-\", $datetime[0]);\r\n\t\t$datetime[\"time\"] = explode(\":\", $datetime[1]);\r\n\t\t\r\n\t\t$timestamp = mktime($datetime[\"time\"][0], $datetime[\"time\"][1], $datetime[\"time\"][2], $datetime[\"date\"][1], $datetime[\"date\"][2], $datetime[\"date\"][0]);\r\n\t\treturn $timestamp;\r\n\t}", "function convertDate($sql_date) \r\n{\r\n\t$date = strtotime($sql_date);\r\n\t$final_date = date(\"Y-m-d H:i:s\", $date);\r\n\treturn $final_date;\r\n}", "function format_timestamp_for_display($timestamp)\n{\n return (new Carbon($timestamp))->format('Y-m-d');\n}", "public function toDatabase()\n {\n return $this->format(Config::get('settings.database_datetime_format'));\n }", "function dateToTimestamp($date){\n\t$dia=substr($date,0,2);\n\t$mes=substr($date,3,2);\n\t$ano=substr($date, 6,4);\t\n\t\n\t$timestamp= mktime(0,0,0,$mes,$dia,$ano);\n\treturn $timestamp;\n }", "public function toDate()\n {\n return $this->cast('date');\n }", "function date_to_ts($value) {\n\treturn strtotime($value);\n}", "function MysqlToUnix($timestamp)\n\t{\n\t\t// and returns the unix timestamp in seconds since 1970\n\t\t$timestamp = (string)$timestamp;\n\t\t$yyyy = substr($timestamp, 0, 4);\n\t\t$month = substr($timestamp, 4, 2);\n\t\t$dd = substr($timestamp, 6, 2);\n\t\t$hh = substr($timestamp, 8, 2);\n\t\t$mm = substr($timestamp, 10, 2);\n\t\t$ss = substr($timestamp, 12, 2);\n\t\t$time = mktime($hh, $mm, $ss, $month, $dd, $yyyy);\n\t\treturn $time;\n\t}", "public static function format_date($timestamp) {\n\t\tif ( is_object($timestamp) ) {\n\t\t\treturn $timestamp->format('Y-m-d\\TH:i:s');\n\t\t} else {\n\t\t\treturn date('Y-m-d\\TH:i:s', $timestamp);\n\t\t}\n\t}", "function standard_date_time2($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d M, Y h:i A', $timestamp);\n\treturn $fdate;\n\t}", "public function DateFR2DateSQL ($date) {\n //29/12/1990 23:30\n $day = substr($date,0,2);\n $month = substr($date,3,2);\n $year = substr($date,6,4);\n $hour = substr($date,11,2);\n $minute = substr($date,14,2);\n $second = substr($date,18,2);\n //debug($hour.'-'.$minute.'-'.$second.'-'.$month.'-'.$day.'-'.$year);die;\n\n $timestamp= mktime($hour,$minute,$second,$month,$day,$year);\n return date('Y-m-d H:i:s',$timestamp); \n }", "function ConvertToSqlDate($date)\n {\n if($date != \"\")\n return $this->app->String->Convert($date,\"%3.%2.%1\",\"%1-%2-%3\");\n }", "function dbdatetime2unix ($tanggal = '') {\r\n list($year,$month,$day,$hour,$minute,$second) = sscanf($tanggal,'%4d-%2d-%2d %2d:%2d:%2d');\r\n return mktime($hour,$minute,$second,$month,$day,$year);\r\n}", "function timestamp_from_mysql($timestamp)\n{\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\n\tif (sizeof($regs)>1)\n\t{\n\t\tif (sizeof($regs)>4)\n\t\t{\n\t\t\t$date=mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date=mktime(0,0,0,$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$date=0;\n\t}\n\treturn $date;\n}", "protected function convert_time_stamp($timestamp) {\n return $timestamp ? gmdate('Y-m-d h:i:s a', $timestamp) : null;\n }", "function erp_mysqldate_to_phptimestamp( $time, $timestamp = true ) {\n\n if ( ! preg_match( '/\\d{2}:\\d{2}:\\d{2}$/', $time ) ) {\n $time = $time . ' 00:00:00';\n }\n\n $timezone = erp_wp_timezone();\n $datetime = DateTimeImmutable::createFromFormat( 'Y-m-d H:i:s', $time, $timezone );\n\n if ( false === $datetime ) {\n return false;\n }\n\n if ( $timestamp ) {\n return $datetime->getTimestamp();\n }\n\n return $datetime;\n}", "private function castToDate($value)\n {\n if ($value instanceof \\DateTimeInterface) {\n return \\DateTimeImmutable::createFromFormat('Y-m-d H:i:s.u', $value->format('Y-m-d H:i:s.u'), $value->getTimezone());\n }\n if (is_numeric($value)) {\n return \\DateTimeImmutable::createFromFormat(\\DateTimeImmutable::ATOM, date(\\DateTimeImmutable::ATOM, (int) $value));\n }\n try {\n // Try to parse using database connection format\n $date = \\DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $value);\n } catch (\\InvalidArgumentException $e) {\n // fallback to ISO8601 standard if format does not match database connection format\n $date = \\DateTimeImmutable::createFromFormat(\\DateTime::ATOM, $value);\n }\n return $date ?: \\DateTimeImmutable::createFromFormat(\\DateTime::ATOM, $value);\n }", "public function timestampToDate()\n {\n $tmp = new DateTime();\n return $tmp->setTimestamp( $this->timestamp );\n }", "function date_to_timestamp($d) {\n return mktime(substr($d, 8, 2), // hour\n substr($d, 10, 2), // minute\n 0, // second\n substr($d, 4, 2), // month\n substr($d, 6, 2), // day\n substr($d, 0, 4)); // year\n}", "function mysql2date($format, $date, $translate = \\true)\n {\n }", "function convertTbsDate($tbsDate){\r\n \t//regex to extract timestamp\r\n\t\tpreg_match(\r\n\t\t\t'/(?:Date\\()([0-9]+)(?:\\+|\\-)/',\r\n\t\t $tbsDate, \r\n\t\t $matches\r\n\t );\r\n\t // grab the capture group \r\n\t $epochTimeInMilliseconds = $matches[1];\r\n \t// regex to extract time zone: not needed currently\r\n\t //convert milliseconds to seconds\r\n\t\t$timestamp = round($epochTimeInMilliseconds / 1000);\r\n \ttry {\r\n\t\t $dateTime = new DateTime('@' . $timestamp);\r\n\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'Conversion of a TBS date failed.\r\n\t\t\t\t\tTBS date: %s\r\n\t\t\t\t\tException: %s',\r\n\t\t\t\t\t$tbsDate,\r\n\t\t\t\t\t$e->getMessage()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t exit('An error has occured converting a TBS date. Please see the TBS API log file for more details.');\r\n\t\t}\r\n\t\treturn $dateTime->format('Y-m-d');\r\n }", "static public function formatDateFromTimestamp($string) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $format = self::$_static_handler->getDateTimeFormat();\n return date($format, $string);\n }", "public function getAsDateTime() {}", "function timestamp($date){\n\t \n\t$return = strtotime($date);\n\treturn $return;\n}", "function convert_timestamp($timestamp)\n\t{\n\t\t$timestamp_bits = explode('T', $timestamp);\n\n\t\tif(isset($timestamp_bits[0], $timestamp_bits[0])):\n\t\t\t$date_bits = explode('-', $timestamp_bits[0]);\n\t\t\t$time_bits = explode(':', $timestamp_bits[1]);\n\t\t\t$year = $date_bits[0];\n\t\t\t$month = $date_bits[1];\n\t\t\t$day = $date_bits[2];\n\t\t\t$hour = $time_bits[0];\n\t\t\t$minute = $time_bits[1];\n\t\t\t$second = $time_bits[2];\n\n\t\t\treturn mktime($hour,$minute,$second, $month, $day, $year);\n\t\tendif;\n\n\t\treturn false;\n\n\t}", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "function time_sql2php($sqltime){\n return strtotime($sqltime . \" GMT\");\n}", "public function getTimestamp();", "public function getTimestamp();", "public function getTimestamp();", "function str2DBDT($str=null)\n{\n $intTime = (!empty($str))?strtotime($str):time();\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}", "function modify_lora_date($time)\n\t{\n\t\t$cdate = strtotime($time);\n\t\t# miliseconds unix time\n\t\tif( $cdate == false ) {\n\t\t\t$militime = DateTime::createFromFormat('U.u', $time/1000);\n\t\t\t$militime->setTimezone(new DateTimeZone(date_default_timezone_get())); \n\t\t\treturn $militime->format(\"Y.m.d H:i:s.u\");\n\t\t}\n\t\treturn Date(\"Y.m.d H:i:s\", $cdate);\n\t}", "function date2Timestamp($date) {\r\n //2003-04-12 00:05:43\r\n if ($date == null) {\r\n return 0;\r\n }\r\n list($y, $mth, $d, $h, $min, $sec) = sscanf($date,\"%d-%d-%d %d:%d:%d\");\r\n return mktime ( $h, $min, $sec, $mth, $d, $y);\r\n}", "function date_to_timestamp($date)\n {\n $with_time = explode(' ', $date);\n $date = explode('/', $with_time[0]);\n\n if (count($date) == 3) {\n $hour = null;\n $minutes = null;\n\n if (isset($with_time[1])) {\n $time = explode(':', $with_time[1]);\n\n $hour = $time[0];\n $minutes = $time[1];\n }\n\n if ($timestamp = \\Carbon\\Carbon::create($date[2], $date[1], $date [0], $hour, $minutes)) {\n return $timestamp->format(\\DateTime::RFC3339);\n }\n }\n }", "public function prepareDate($timestamp, $fieldType = 'DATETIME') {\n $date = '';\n if (!$timestamp === false && $timestamp > 0) {\n switch ($fieldType) {\n case 'DATE' :\n $date = date('Y-m-d', $timestamp);\n break;\n case 'TIME' :\n $date = date('H:i:s', $timestamp);\n break;\n case 'YEAR' :\n $date = date('Y', $timestamp);\n break;\n default :\n $date = date('Y-m-d H:i:s', $timestamp);\n break;\n }\n }\n return $date;\n }", "function mysql_timestamp(): string {\n\treturn date('Y-m-d H:i:s');\n}", "protected function mutateDate($value)\n\t{\n\t\tif ($value instanceof Timestamp)\n\t\t{\n\t\t\t// Convert to an int timestamp\n\t\t\t$value = $value->formatForApi()['seconds'];\n\t\t}\n\n\t\treturn parent::mutateDate($value);\n\t}", "function date_get_date($timestamp) {\n return app_date($GLOBALS['i18']['formats']['date'], $timestamp);\n}", "public static function unix_timestamp_to_datetime($value)\n\t{\n\t\treturn date(conf(\"format.datetime\"), $value);\n\t}", "function date_get_date_time($timestamp) {\n return app_date($GLOBALS['i18']['formats']['date_time'], $timestamp);\n}", "public function valueOf()\n {\n return $this->getPreciseTimestamp(3);\n }", "function to_mysqlDate($time)\r\n{\r\n // format 2012-05-21 18:54:49\r\n $mysqldate =strftime(\"%Y-%m-%d %H:%M:%S\",$time);\r\n \r\n return $mysqldate;\r\n \r\n}", "public function GetAsDateTime(){\r\n\t\t\treturn new DateTime( $this->GetAsMySQLDateTime() );\r\n\t\t}", "function _convert_to_unix_timestamp($timestamp)\n\t{\n\t\tlist($time, $date) = explode('.', $timestamp);\n\t\t\n\t\t// breakdown time\n\t\t$hour = substr($time, 0, 2);\n\t\t$minute = substr($time, 2, 2);\n\t\t$second = substr($time, 4, 2);\n\t\t\n\t\t// breakdown date\n\t\t$day = substr($date, 0, 2);\n\t\t$month = substr($date, 2, 2);\n\t\t$year = substr($date, 4, 2);\n\t\t\n\t\treturn gmmktime($hour, $minute, $second, $month, $day, $year);\n\t}", "public function GetAsMySQLDateTime(){\r\n\t\t\tif( $this->day > 0 ){\r\n\t\t\t\treturn $this->Format( 'Y-m-d H:i:s' );\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime->format(self::DATE_FORMAT);\n }", "function php2MySqlTime($phpDate) {\n\t\treturn date(\"Y-m-d\", $phpDate);\n\t}", "public function toTimestamp(): ?int\n {\n $gc = new GregorianCalendar();\n $julianDay = $gc->ymdToJd(($this->year > 0 && $this->epoch) ? -$this->year : $this->year, $this->monthDigital ?: 1, $this->day ?: 1);\n return ($julianDay - 2440588) * 86400;\n }", "public function formatValueForDatabase($value) {\n\t\tswitch ($this->type) {\n\t\t\tcase 'Date':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d');\n\t\t\t\tbreak;\n\n\t\t\tcase 'DateTime':\n\t\t\t\t/**\n\t\t\t\t * @var \\DateTime $value\n\t\t\t\t */\n\t\t\t\t$value = $value->format('Y-m-d H:i:s');\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "private function getTimestamp()\n {\n $originalTime = microtime(true);\n $micro = sprintf(\"%06d\", ($originalTime - floor($originalTime)) * 1000000);\n $date = new DateTime(date('Y-m-d H:i:s.'.$micro, $originalTime));\n\n return $date->format($this->config['dateFormat']);\n }", "function returnDate($timestamp) {\n\t$format = \"F j, Y, G:i:s e\";\n\t$timestamp = ($timestamp > 0 || (int)$timestamp === 0) ? (int)$timestamp : time();\n\t$f_date = date($format, time());\n\n\treturn $f_date;\n}", "function time_php2sql($unixtime){\n return gmdate(\"Y-m-d H:i:s\", $unixtime);\n}", "private function formatTime($timestamp)\n {\n return date('Y-m-d', $timestamp);\n }", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}", "function dateToDB($date) {\n\tglobal $config;\n\treturn date($config['db_date_format'], strtotime($date));\t\n}", "function mysqldatetime_to_date($datetime = '', $format = 'd.m.Y, H:i:s')\r\n {\r\n return date($format, mysqldatetime_to_unix($datetime));\r\n }", "function convertdate($date) {\r\n\t$date = strtotime($date);\r\n\treturn date(\"M j, Y g:ia\", $date);\r\n}", "function MakeDateForDb($date)\n\t{\n\t\tif (strpos($date, '-'))\n\t\t{\n\t\t\t$dateArray = explode('-', $date);\n\t\t}\n\t\telse if (strpos($date, '/'))\n\t\t{\n\t\t\t$dateArray = explode('/', $date);\n\t\t}\n\t\telse\n\t\t{\n echo ERROR_DOB;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$dateArray = explode('-', $date);\n\t\t// $dateArray is somethink like [0]=01, [1]=22, [2]=1975\n\t\t// make a unix timestamp out of the original date string.\n\t\t$timestamp = mktime(0, 0, 0, $dateArray[0], $dateArray[1], $dateArray[2]);\n\t\treturn $timestamp;\n\t}", "public static function ToDate($Timestamp = '') {\n if ($Timestamp == '')\n $Timestamp = time();\n elseif (!is_numeric($Timestamp))\n $Timestamp = self::ToTimestamp($Timestamp);\n\n return date('Y-m-d', $Timestamp);\n }", "public static function timestamp($time=false) {\n\t\tglobal $db; //TODO: REMOVE GLOBAL REFERENCE\n\t\treturn pudl::convert_tz(\n\t\t\tself::from_unixtime($time !== false ? $time : $db->time()),\n\t\t\tnew pudlGlobal('time_zone'),\n\t\t\t'UTC'\n\t\t);\n\t}", "function dateFormatMDYTimeStamp($date){\n return Carbon::createFromFormat('Y-m-d H:i:s', $date)\n ->format('m/d/Y');\n}", "protected function createDatesFromTimestamp($timestamp) {\n // date of event if existing, else current time\n if ($timestamp != \"\" && $timestamp != 0) {\n return date($this -> options['date_new_format'], $timestamp);\n } else {\n return \"\";\n }\n }", "public static function getDatabaseDateTime() {\n return date(\"Y-m-d H:i:s\");\n }", "function epochToDate($epoch,$format){\n /*\n @epoch = 1483228800;\n $format= Y,m,d,j,n,H,i,s\n */\n $dt = new DateTime(\"@$epoch\");\n $convert= $dt->format($format);\n return $convert;\n}", "function format_date($timestamp) {\n //determine the format\n $format = get_string('date_format', 'rlreport_course_completion_by_cluster');\n\n //figure out the correct timezone\n $timezone = 99;\n\n if ($user_record = get_record('user', 'id', $this->userid)) {\n //determine the user's timezone\n $timezone = php_report::get_user_timezone($user_record, $user_record->timezone);\n }\n\n //perform the formatting\n return userdate($timestamp, $format, $timezone, false);\n }" ]
[ "0.6715593", "0.6697303", "0.66312283", "0.66169554", "0.6590467", "0.6546678", "0.6516426", "0.64353454", "0.63989764", "0.6393552", "0.6364486", "0.63637686", "0.63245696", "0.632122", "0.63062197", "0.62946856", "0.6279762", "0.62361616", "0.6199128", "0.6193797", "0.61703813", "0.6157704", "0.61529446", "0.61042917", "0.6078657", "0.6070307", "0.60412306", "0.6035071", "0.5949079", "0.59448934", "0.5930529", "0.59199196", "0.5913131", "0.58998024", "0.5891262", "0.58827156", "0.58823276", "0.5838468", "0.58373475", "0.58361053", "0.5830219", "0.5828688", "0.57784826", "0.5760028", "0.5759905", "0.57285726", "0.5726899", "0.5723742", "0.57188237", "0.5715097", "0.5713514", "0.5713237", "0.57029176", "0.56753194", "0.5669477", "0.5661713", "0.5660758", "0.5658697", "0.56423396", "0.56358874", "0.5635642", "0.5633449", "0.5626961", "0.5626961", "0.5626961", "0.5626135", "0.5624324", "0.5608091", "0.5601613", "0.559917", "0.55937564", "0.55886376", "0.5587084", "0.5586043", "0.55839896", "0.5568741", "0.5559039", "0.5554216", "0.55532235", "0.55372715", "0.5536783", "0.5535348", "0.5535028", "0.5534248", "0.5524145", "0.5523784", "0.55226916", "0.55209386", "0.55045056", "0.5501012", "0.5495479", "0.54939765", "0.5484604", "0.54816926", "0.5479132", "0.54762316", "0.5474648", "0.5472741", "0.5470547", "0.54678535", "0.5467731" ]
0.0
-1